From 91989a79e461d4d470f5a106d69221a907497940 Mon Sep 17 00:00:00 2001 From: soyuka Date: Sun, 9 Feb 2025 13:01:37 +0100 Subject: [PATCH] chore: update client-side deps --- package-lock.json | 6072 +- .../Resources/public/fonts/open-sans/400.css | 12 +- .../Resources/public/fonts/open-sans/700.css | 12 +- .../Resources/public/graphiql/graphiql.css | 2011 +- .../Resources/public/graphiql/graphiql.min.js | 127025 ++++++++------- .../public/graphql-playground/middleware.js | 37 +- .../public/react/react.production.min.js | 31 - .../public/redoc/redoc.standalone.js | 400 +- .../public/swagger-ui/swagger-ui-bundle.js | 2 +- .../swagger-ui-standalone-preset.js | 2 +- .../public/swagger-ui/swagger-ui.css | 2 +- .../public/swagger-ui/swagger-ui.css.map | 2 +- update-js.sh | 4 +- 13 files changed, 74761 insertions(+), 60851 deletions(-) delete mode 100644 src/Symfony/Bundle/Resources/public/react/react.production.min.js diff --git a/package-lock.json b/package-lock.json index cfae087122d..8cd2bea63d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,26 @@ { - "name": "core", + "name": "core2", "lockfileVersion": 3, "requires": true, "packages": { "": { "dependencies": { - "@fontsource/open-sans": "^5.0.28", + "@fontsource/open-sans": "^5.1.1", "es6-promise": "^4.2.8", "fetch": "^1.1.0", - "graphiql": "^3.2.2", - "graphql-playground-react": "^1.7.26", - "react": "^18.3.1", + "graphiql": "^3.8.3", + "graphql-playground-react": "^1.7.28", + "react": "^19.0.0", "react-dom": "^18.3.1", - "redoc": "^2.1.4", - "swagger-ui": "^5.17.14" + "redoc": "^2.4.0", + "swagger-ui": "^5.18.3" } }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -33,6 +34,7 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/@ardatan/sync-fetch/-/sync-fetch-0.0.1.tgz", "integrity": "sha512-xhlTqH0m31mnsG0tIP4ETgfSB6gXDaYYsUWTrlUV93fFQPI9dd8hE0Ot6MHLCtqgB32hwJAC3YZMWlXZw7AleA==", + "license": "MIT", "dependencies": { "node-fetch": "^2.6.1" }, @@ -40,50 +42,14 @@ "node": ">=14" } }, - "node_modules/@ardatan/sync-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@ardatan/sync-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@ardatan/sync-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@ardatan/sync-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/@babel/code-frame": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz", - "integrity": "sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.6", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -91,30 +57,33 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.6.tgz", - "integrity": "sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.6.tgz", - "integrity": "sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.8.tgz", + "integrity": "sha512-l+lkXCHS6tQEc5oUpK28xBOZ6+HwaH7YwoYQbLFiYb4nS2/l1tKnZEtEWkD0GuiYdvArf9qBS0XlQGXzPMsNqQ==", + "license": "MIT", "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helpers": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/template": "^7.24.6", - "@babel/traverse": "^7.24.6", - "@babel/types": "^7.24.6", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.8", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.7", + "@babel/parser": "^7.26.8", + "@babel/template": "^7.26.8", + "@babel/traverse": "^7.26.8", + "@babel/types": "^7.26.8", + "@types/gensync": "^1.0.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -129,49 +98,44 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.6.tgz", - "integrity": "sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.8.tgz", + "integrity": "sha512-ef383X5++iZHWAXX0SXQR6ZyQhw/0KtTkrTz61WXRhFM6dhpHulO/RJz79L8S6ugZHJkOOkUrUdxgdF2YiPFnA==", + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6", + "@babel/parser": "^7.26.8", + "@babel/types": "^7.26.8", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz", - "integrity": "sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/compat-data": "^7.24.6", - "@babel/helper-validator-option": "^7.24.6", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -179,68 +143,46 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "license": "ISC", "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz", - "integrity": "sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz", - "integrity": "sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w==", "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" + "yallist": "^3.0.2" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz", - "integrity": "sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA==", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "license": "ISC", + "peer": true }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", - "integrity": "sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz", - "integrity": "sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-module-imports": "^7.24.6", - "@babel/helper-simple-access": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -250,156 +192,64 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz", - "integrity": "sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g==", - "peer": true, - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz", - "integrity": "sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw==", - "dependencies": { - "@babel/types": "^7.24.6" - }, + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz", - "integrity": "sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz", - "integrity": "sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz", - "integrity": "sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.6.tgz", - "integrity": "sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA==", + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", + "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz", - "integrity": "sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.6", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.8.tgz", + "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.26.8" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz", - "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", "bin": { "parser": "bin/babel-parser.js" }, @@ -408,11 +258,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -422,9 +273,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", - "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz", + "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==", + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -433,9 +285,10 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.6.tgz", - "integrity": "sha512-tbC3o8uHK9xMgMsvUm9qGqxVpbv6yborMBLbDteHIc7JDNHsTV0vDMQ5j1O1NXvO+BDELtL9KgoWYaUVIVGt8w==", + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.26.7.tgz", + "integrity": "sha512-55gRV8vGrCIYZnaQHQrD92Lo/hYE3Sj5tmbuf0hhHR7sj2CWhEhHU89hbq+UVDXvFG1zUVXJhUkEq1eAfqXtFw==", + "license": "MIT", "dependencies": { "core-js-pure": "^3.30.2", "regenerator-runtime": "^0.14.0" @@ -445,31 +298,30 @@ } }, "node_modules/@babel/template": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.6.tgz", - "integrity": "sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.8.tgz", + "integrity": "sha512-iNKaX3ZebKIsCvJ+0jd6embf+Aulaa3vNBqZ41kM7iTWjx5qzWKXGHiJUW3+nTpQ18SG11hdF8OAzKrpXkb96Q==", + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.8", + "@babel/types": "^7.26.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.6.tgz", - "integrity": "sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw==", - "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-hoist-variables": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.8.tgz", + "integrity": "sha512-nic9tRkjYH0oB2dzr/JoGIm+4Q6SuYeLEiIiZDwBscRMYFJ+tMAz98fuel9ZnbXViA2I0HVSSRRK8DW5fjXStA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.8", + "@babel/parser": "^7.26.8", + "@babel/template": "^7.26.8", + "@babel/types": "^7.26.8", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -478,27 +330,29 @@ } }, "node_modules/@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz", + "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@braintree/sanitize-url": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.0.2.tgz", - "integrity": "sha512-NVf/1YycDMs6+FxS0Tb/W8MjJRDQdXF+tBfDtZ5UZeiRUkTmwKc4vmYCKZTyymfJk1gnMsauvZSX/HiV9jOABw==" + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.0.4.tgz", + "integrity": "sha512-hPYRrKFoI+nuckPgDJfyYAkybFvheo4usS0Vw0HNAe+fmGBQA5Az37b/yStO284atBoqqdOUhKJ3d9Zw3PQkcQ==", + "license": "MIT" }, "node_modules/@codemirror/language": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.0.0.tgz", "integrity": "sha512-rtjk5ifyMzOna1c7PBu7J1VCt0PvA5wy3o8eMVnxMKb7z8KA7JFecvD04dSn14vj/bBaAbqRsGed5OjtofEnLA==", + "license": "MIT", "peer": true, "dependencies": { "@codemirror/state": "^6.0.0", @@ -510,69 +364,83 @@ } }, "node_modules/@codemirror/state": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz", - "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==", - "peer": true + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", + "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } }, "node_modules/@codemirror/view": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.3.tgz", - "integrity": "sha512-gmqxkPALZjkgSxIeeweY/wGQXBfwTUaLs8h7OKtSwfbj9Ct3L11lD+u1sS7XHppxFQoMDiMDp07P9f3I2jWOHw==", + "version": "6.36.2", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.2.tgz", + "integrity": "sha512-DZ6ONbs8qdJK0fdN7AB82CgI6tYXf4HWk1wSVa0+9bhVznCuuvhQtX8bFBoy3dv8rZSQqUd8GvhVAcielcidrA==", + "license": "MIT", "peer": true, "dependencies": { - "@codemirror/state": "^6.4.0", + "@codemirror/state": "^6.5.0", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "node_modules/@emotion/is-prop-valid": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", - "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "license": "MIT", + "peer": true, "dependencies": { - "@emotion/memoize": "0.7.4" + "@emotion/memoize": "^0.8.1" } }, "node_modules/@emotion/memoize": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", - "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "license": "MIT", + "peer": true }, "node_modules/@emotion/unitless": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", + "license": "MIT", "peer": true }, "node_modules/@exodus/schemasafe": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", - "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "license": "MIT" }, "node_modules/@floating-ui/core": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.4.1.tgz", - "integrity": "sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==", + "version": "1.6.9", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz", + "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==", + "license": "MIT", "dependencies": { - "@floating-ui/utils": "^0.1.1" + "@floating-ui/utils": "^0.2.9" } }, "node_modules/@floating-ui/dom": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.2.tgz", - "integrity": "sha512-6ArmenS6qJEWmwzczWyhvrXRdI/rI78poBcW0h/456+onlabit+2G+QxHx5xTOX60NBJQXjsCLFbW2CmsXpUog==", + "version": "1.6.13", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz", + "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", + "license": "MIT", "dependencies": { - "@floating-ui/core": "^1.4.1", - "@floating-ui/utils": "^0.1.1" + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.9" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", + "license": "MIT", "dependencies": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -580,52 +448,28 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.2.tgz", - "integrity": "sha512-ou3elfqG/hZsbmF4bxeJhPHIf3G2pm0ujc39hYEZrfVqt7Vk/Zji6CXc3W0pmYM8BW1g40U+akTl9DKZhFhInQ==" + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", + "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==", + "license": "MIT" }, "node_modules/@fontsource/open-sans": { - "version": "5.0.28", - "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.0.28.tgz", - "integrity": "sha512-hBvJHY76pJT/JynGUB5EXWhnzjYfLdcMn655J5p1v9lTT9HdQSy+keq2KPVXO2Htlg998BBa3p6u/jlrZ6w0kg==" - }, - "node_modules/@graphiql/react": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@graphiql/react/-/react-0.22.1.tgz", - "integrity": "sha512-PBClhO2juCvVvmE5qD4PHivJLkhp0dqIX1zgId8Z83UCKpxO2M+bEspRL9aOQQaE4F4xqExCUk5B2AL+wc+agg==", - "dependencies": { - "@graphiql/toolkit": "^0.9.1", - "@headlessui/react": "^1.7.15", - "@radix-ui/react-dialog": "^1.0.4", - "@radix-ui/react-dropdown-menu": "^2.0.5", - "@radix-ui/react-tooltip": "^1.0.6", - "@radix-ui/react-visually-hidden": "^1.0.3", - "@types/codemirror": "^5.60.8", - "clsx": "^1.2.1", - "codemirror": "^5.65.3", - "codemirror-graphql": "^2.0.11", - "copy-to-clipboard": "^3.2.0", - "framer-motion": "^6.5.1", - "graphql-language-service": "^5.2.0", - "markdown-it": "^14.1.0", - "set-value": "^4.1.0" - }, - "peerDependencies": { - "graphql": "^15.5.0 || ^16.0.0", - "react": "^16.8.0 || ^17 || ^18", - "react-dom": "^16.8.0 || ^17 || ^18" - } + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.1.1.tgz", + "integrity": "sha512-Wfio5om0XH24ZUu6FfW4r50e4xLdoLzvd8midtqUFT2unniyWQj6GJ05RW1YQsHp4Sug3i+agFBIxEmYQzUHSg==", + "license": "OFL-1.1" }, "node_modules/@graphiql/toolkit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.9.1.tgz", - "integrity": "sha512-LVt9pdk0830so50ZnU2Znb2rclcoWznG8r8asqAENzV0U1FM1kuY0sdPpc/rBc9MmmNgnB6A+WZzDhq6dbhTHA==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.11.1.tgz", + "integrity": "sha512-G02te70/oYYna5UhbH6TXwNxeQyWa+ChlPonUrKwC5Ot9ItraGJ9yUU4sS+YRaA+EvkzNoHG79XcW2k1QaAMiw==", + "license": "MIT", "dependencies": { "@n1ru4l/push-pull-async-iterable-iterator": "^3.1.0", "meros": "^1.1.4" }, "peerDependencies": { - "graphql": "^15.5.0 || ^16.0.0", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", "graphql-ws": ">= 4.5.0" }, "peerDependenciesMeta": { @@ -638,6 +482,7 @@ "version": "8.5.22", "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.5.22.tgz", "integrity": "sha512-hcV1JaY6NJQFQEwCKrYhpfLK8frSXDbtNMoTur98u10Cmecy1zrqNKSqhEyGetpgHxaJRqszGzKeI3RuroDN6A==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "dataloader": "^2.2.2", @@ -648,10 +493,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/batch-execute/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/delegate": { "version": "9.0.35", "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-9.0.35.tgz", "integrity": "sha512-jwPu8NJbzRRMqi4Vp/5QX1vIUeUPpWmlQpOkXQD2r1X45YsVceyUUBnktCrlJlDB4jPRVy7JQGwmYo3KFiOBMA==", + "license": "MIT", "dependencies": { "@graphql-tools/batch-execute": "^8.5.22", "@graphql-tools/executor": "^0.0.20", @@ -665,10 +517,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/delegate/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/executor": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-0.0.20.tgz", "integrity": "sha512-GdvNc4vszmfeGvUqlcaH1FjBoguvMYzxAfT6tDd4/LgwymepHhinqLNA5otqwVLW+JETcDaK7xGENzFomuE6TA==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "@graphql-typed-document-node/core": "3.2.0", @@ -684,6 +543,7 @@ "version": "0.0.14", "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-0.0.14.tgz", "integrity": "sha512-P2nlkAsPZKLIXImFhj0YTtny5NQVGSsKnhi7PzXiaHSXc6KkzqbWZHKvikD4PObanqg+7IO58rKFpGXP7eeO+w==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "@repeaterjs/repeater": "3.0.4", @@ -697,10 +557,23 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/executor-graphql-ws/node_modules/@repeaterjs/repeater": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", + "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==", + "license": "MIT" + }, + "node_modules/@graphql-tools/executor-graphql-ws/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/executor-graphql-ws/node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -721,6 +594,7 @@ "version": "0.1.10", "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-0.1.10.tgz", "integrity": "sha512-hnAfbKv0/lb9s31LhWzawQ5hghBfHS+gYWtqxME6Rl0Aufq9GltiiLBcl7OVVOnkLF0KhwgbYP1mB5VKmgTGpg==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "@repeaterjs/repeater": "^3.0.4", @@ -735,10 +609,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/executor-http/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/executor-legacy-ws": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.11.tgz", "integrity": "sha512-4ai+NnxlNfvIQ4c70hWFvOZlSUN8lt7yc+ZsrwtNFbFPH/EroIzFMapAxM9zwyv9bH38AdO3TQxZ5zNxgBdvUw==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "@types/ws": "^8.0.0", @@ -750,10 +631,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/executor-legacy-ws/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/executor-legacy-ws/node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -770,10 +658,17 @@ } } }, + "node_modules/@graphql-tools/executor/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/graphql-file-loader": { "version": "7.5.17", "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.17.tgz", "integrity": "sha512-hVwwxPf41zOYgm4gdaZILCYnKB9Zap7Ys9OhY1hbwuAuC4MMNY9GpUjoTU3CQc3zUiPoYStyRtUGkHSJZ3HxBw==", + "license": "MIT", "dependencies": { "@graphql-tools/import": "6.7.18", "@graphql-tools/utils": "^9.2.1", @@ -785,10 +680,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/graphql-file-loader/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/import": { "version": "6.7.18", "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.18.tgz", "integrity": "sha512-XQDdyZTp+FYmT7as3xRWH/x8dx0QZA2WZqfMF5EWb36a0PiH7WwlRQYIdyYXj8YCLpiWkeBXgBRHmMnwEYR8iQ==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "resolve-from": "5.0.0", @@ -798,10 +700,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/import/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/json-file-loader": { "version": "7.4.18", "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.18.tgz", "integrity": "sha512-AJ1b6Y1wiVgkwsxT5dELXhIVUPs/u3VZ8/0/oOtpcoyO/vAeM5rOvvWegzicOOnQw8G45fgBRMkkRfeuwVt6+w==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "globby": "^11.0.3", @@ -812,10 +721,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/json-file-loader/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/load": { "version": "7.8.14", "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.8.14.tgz", "integrity": "sha512-ASQvP+snHMYm+FhIaLxxFgVdRaM0vrN9wW2BKInQpktwWTXVyk+yP5nQUCEGmn0RTdlPKrffBaigxepkEAJPrg==", + "license": "MIT", "dependencies": { "@graphql-tools/schema": "^9.0.18", "@graphql-tools/utils": "^9.2.1", @@ -826,10 +742,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/load/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/merge": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "license": "MIT", "dependencies": { "@graphql-tools/utils": "^9.2.1", "tslib": "^2.4.0" @@ -838,10 +761,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/merge/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/schema": { "version": "9.0.19", "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "license": "MIT", "dependencies": { "@graphql-tools/merge": "^8.4.1", "@graphql-tools/utils": "^9.2.1", @@ -852,10 +782,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/schema/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/url-loader": { "version": "7.17.18", "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-7.17.18.tgz", "integrity": "sha512-ear0CiyTj04jCVAxi7TvgbnGDIN2HgqzXzwsfcqiVg9cvjT40NcMlZ2P1lZDgqMkZ9oyLTV8Bw6j+SyG6A+xPw==", + "license": "MIT", "dependencies": { "@ardatan/sync-fetch": "^0.0.1", "@graphql-tools/delegate": "^9.0.31", @@ -875,10 +812,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/url-loader/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/utils": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "license": "MIT", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "tslib": "^2.4.0" @@ -887,10 +831,17 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/utils/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-tools/wrap": { "version": "9.4.2", "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-9.4.2.tgz", "integrity": "sha512-DFcd9r51lmcEKn0JW43CWkkI2D6T9XI1juW/Yo86i04v43O9w2/k4/nx2XTJv4Yv+iXwUw7Ok81PGltwGJSDSA==", + "license": "MIT", "dependencies": { "@graphql-tools/delegate": "^9.0.31", "@graphql-tools/schema": "^9.0.18", @@ -902,90 +853,26 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/wrap/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@graphql-typed-document-node/core": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@headlessui/react": { - "version": "1.7.17", - "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.17.tgz", - "integrity": "sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==", - "dependencies": { - "client-only": "^0.0.1" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": "^16 || ^17 || ^18", - "react-dom": "^16 || ^17 || ^18" - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -996,9 +883,10 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -1007,63 +895,84 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@lezer/common": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", - "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.3.tgz", + "integrity": "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==", + "license": "MIT", "peer": true }, "node_modules/@lezer/highlight": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.0.tgz", - "integrity": "sha512-WrS5Mw51sGrpqjlh3d4/fOwpEV2Hd3YOkp9DBt4k8XZQcoTHZFB7sx030A6OcahF4J1nDQAa3jXlTVVYH50IFA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz", + "integrity": "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==", + "license": "MIT", "peer": true, "dependencies": { "@lezer/common": "^1.0.0" } }, "node_modules/@lezer/lr": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.1.tgz", - "integrity": "sha512-CHsKq8DMKBf9b3yXPDIU4DbH+ZJd/sJdYOW2llbW/HudP5u0VS6Bfq1hLYfgU7uAYGFIyGGQIsSOXGPEErZiJw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "license": "MIT", "peer": true, "dependencies": { "@lezer/common": "^1.0.0" } }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "license": "MIT", + "peer": true + }, "node_modules/@motionone/animation": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz", - "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==", - "dependencies": { - "@motionone/easing": "^10.15.1", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", + "integrity": "sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==", + "license": "MIT", + "dependencies": { + "@motionone/easing": "^10.18.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, + "node_modules/@motionone/animation/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@motionone/dom": { "version": "10.12.0", "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "license": "MIT", "dependencies": { "@motionone/animation": "^10.12.0", "@motionone/generators": "^10.12.0", @@ -1073,44 +982,73 @@ "tslib": "^2.3.1" } }, + "node_modules/@motionone/dom/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@motionone/easing": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz", - "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.18.0.tgz", + "integrity": "sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==", + "license": "MIT", "dependencies": { - "@motionone/utils": "^10.15.1", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, + "node_modules/@motionone/easing/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@motionone/generators": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz", - "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.18.0.tgz", + "integrity": "sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==", + "license": "MIT", "dependencies": { - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, + "node_modules/@motionone/generators/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@motionone/types": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz", - "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA==" + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.1.tgz", + "integrity": "sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==", + "license": "MIT" }, "node_modules/@motionone/utils": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz", - "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.18.0.tgz", + "integrity": "sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==", + "license": "MIT", "dependencies": { - "@motionone/types": "^10.15.1", + "@motionone/types": "^10.17.1", "hey-listen": "^1.0.8", "tslib": "^2.3.1" } }, + "node_modules/@motionone/utils/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@n1ru4l/push-pull-async-iterable-iterator": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-3.2.0.tgz", "integrity": "sha512-3fkKj25kEjsfObL6IlKPAlHYPq/oYwUkkQ03zsTTiDjD7vg/RxjdiLeCydqtxHZP0JgsXL3D/X5oAkMGzuUp/Q==", + "license": "MIT", "engines": { "node": ">=12" } @@ -1119,6 +1057,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1131,6 +1070,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", "engines": { "node": ">= 8" } @@ -1139,6 +1079,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1148,19 +1089,27 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", - "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.15.tgz", + "integrity": "sha512-QPeD8UA8axQREpgR5UTAfu2mqQmm97oUqahDtNdBcfj3qAnoXzFdQW+aNf/tD2WVXF8Fhmftxoj0eMIT++gX2w==", + "license": "MIT", "dependencies": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" } }, + "node_modules/@peculiar/asn1-schema/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@peculiar/json-schema": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -1168,42 +1117,53 @@ "node": ">=8.0.0" } }, + "node_modules/@peculiar/json-schema/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz", - "integrity": "sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", + "license": "MIT", "dependencies": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.2", - "tslib": "^2.5.0", - "webcrypto-core": "^1.7.7" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.8.0" }, "engines": { "node": ">=10.12.0" } }, + "node_modules/@peculiar/webcrypto/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@radix-ui/primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", - "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", + "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==", + "license": "MIT" }, "node_modules/@radix-ui/react-arrow": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz", - "integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz", + "integrity": "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1215,21 +1175,21 @@ } }, "node_modules/@radix-ui/react-collection": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", - "integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.2.tgz", + "integrity": "sha512-9z54IEKRxIa9VityapoEYMuByaG42iSy1ZXlY2KcuLSEtq8x4987/N6m15ppoMffgZX72gER2uHe1D9Y6Unlcw==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1241,15 +1201,13 @@ } }, "node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", - "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1258,15 +1216,13 @@ } }, "node_modules/@radix-ui/react-context": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz", - "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.1.tgz", + "integrity": "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1275,31 +1231,31 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.4.tgz", - "integrity": "sha512-hJtRy/jPULGQZceSAP2Re6/4NpKo8im6V8P2hUqZsdFiSL8l35kYsw3qbRI6Ay5mQd2+wlLqje770eq+RJ3yZg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.4", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.3", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-portal": "1.0.3", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.6.tgz", + "integrity": "sha512-/IVhJV5AceX620DUJ4uYVMymzsipdKBzo3edo+omeskCKGm9FRHM0ebIdbPnlQVJqyuHbuBltQUOG2mOTq2IYw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1311,15 +1267,13 @@ } }, "node_modules/@radix-ui/react-direction": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", - "integrity": "sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1328,22 +1282,22 @@ } }, "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.4.tgz", - "integrity": "sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz", + "integrity": "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-escape-keydown": "1.0.3" + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1355,24 +1309,24 @@ } }, "node_modules/@radix-ui/react-dropdown-menu": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.5.tgz", - "integrity": "sha512-xdOrZzOTocqqkCkYo8yRPCib5OkTkqN7lqNCdxwPOdE466DOaNl4N8PkUIlsXthQvW5Wwkd+aEmWpfWlBoDPEw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-menu": "2.0.5", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.6.tgz", + "integrity": "sha512-no3X7V5fD487wab/ZYSHXq3H37u4NVeLDKI/Ks724X/eEFSSEFYZxWgsIlr1UBeEyDaM29HM5x9p1Nv8DuTYPA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-menu": "2.1.6", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1384,15 +1338,13 @@ } }, "node_modules/@radix-ui/react-focus-guards": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz", - "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz", + "integrity": "sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1401,20 +1353,20 @@ } }, "node_modules/@radix-ui/react-focus-scope": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.3.tgz", - "integrity": "sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.2.tgz", + "integrity": "sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1426,16 +1378,16 @@ } }, "node_modules/@radix-ui/react-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz", - "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1444,35 +1396,35 @@ } }, "node_modules/@radix-ui/react-menu": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.5.tgz", - "integrity": "sha512-Gw4f9pwdH+w5w+49k0gLjN0PfRDHvxmAgG16AbyJZ7zhwZ6PBHKtWohvnSwfusfnK3L68dpBREHpVkj8wEM7ZA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.4", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.3", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.2", - "@radix-ui/react-portal": "1.0.3", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-roving-focus": "1.0.4", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-callback-ref": "1.0.1", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.6.tgz", + "integrity": "sha512-tBBb5CXDJW3t2mo9WlO7r6GTmWV0F0uzHZVFmlRmYpiSK1CDU5IKojP1pm7oknpBOrFZx/YgBRW9oorPO2S/Lg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-roving-focus": "1.1.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1484,27 +1436,27 @@ } }, "node_modules/@radix-ui/react-popper": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.2.tgz", - "integrity": "sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz", + "integrity": "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1", - "@radix-ui/react-use-rect": "1.0.1", - "@radix-ui/react-use-size": "1.0.1", - "@radix-ui/rect": "1.0.1" + "@radix-ui/react-arrow": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-rect": "1.1.0", + "@radix-ui/react-use-size": "1.1.0", + "@radix-ui/rect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1516,18 +1468,19 @@ } }, "node_modules/@radix-ui/react-portal": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.3.tgz", - "integrity": "sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz", + "integrity": "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1539,19 +1492,19 @@ } }, "node_modules/@radix-ui/react-presence": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", - "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.2.tgz", + "integrity": "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1563,18 +1516,18 @@ } }, "node_modules/@radix-ui/react-primitive": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", - "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", + "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1586,26 +1539,26 @@ } }, "node_modules/@radix-ui/react-roving-focus": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz", - "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-controllable-state": "1.0.1" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.2.tgz", + "integrity": "sha512-zgMQWkNO169GtGqRvYrzb0Zf8NhMHS2DuEB/TiEmVnpr5OqPU3i8lfbxaAmC2J/KYuIQxyoQQ6DxepyXp61/xw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1617,16 +1570,16 @@ } }, "node_modules/@radix-ui/react-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", - "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1635,29 +1588,29 @@ } }, "node_modules/@radix-ui/react-tooltip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.6.tgz", - "integrity": "sha512-DmNFOiwEc2UDigsYj6clJENma58OelxD24O4IODoZ+3sQc3Zb+L8w1EP+y9laTuKCLAysPw4fD6/v0j4KNV8rg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.2", - "@radix-ui/react-portal": "1.0.3", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-visually-hidden": "1.0.3" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.1.8.tgz", + "integrity": "sha512-YAA2cu48EkJZdAMHC0dqo9kialOcRStbtiY4nJPaht7Ptrhcvpo+eDChaM6BIs8kL6a8Z5l5poiqLnXcNduOkA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-visually-hidden": "1.1.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1669,15 +1622,13 @@ } }, "node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz", - "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1686,16 +1637,16 @@ } }, "node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz", - "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1704,16 +1655,16 @@ } }, "node_modules/@radix-ui/react-use-escape-keydown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz", - "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1722,15 +1673,13 @@ } }, "node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz", - "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "license": "MIT", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1739,16 +1688,16 @@ } }, "node_modules/@radix-ui/react-use-rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz", - "integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", + "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/rect": "1.0.1" + "@radix-ui/rect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1757,16 +1706,16 @@ } }, "node_modules/@radix-ui/react-use-size": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz", - "integrity": "sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1775,18 +1724,18 @@ } }, "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz", - "integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.2.tgz", + "integrity": "sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -1798,22 +1747,21 @@ } }, "node_modules/@radix-ui/rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz", - "integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", + "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==", + "license": "MIT" }, "node_modules/@redocly/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-9GWx27t7xWhDIR02PA18nzBdLcKQRgc46xNQvjFkrYk4UOmvKhJ/dawwiX0cCOeetN5LcaaiqQbVOWYK62SGHw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js-replace": "^1.0.1" }, "funding": { "type": "github", @@ -1821,40 +1769,52 @@ } }, "node_modules/@redocly/config": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.5.0.tgz", - "integrity": "sha512-oA1ezWPT2tSV9CLk0FtZlViaFKtp+id3iAVeKBme1DdP4xUCdxEdP8umB21iLKdc6leRd5uGa+T5Ox4nHBAXWg==" + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.20.3.tgz", + "integrity": "sha512-Nyyv1Bj7GgYwj/l46O0nkH1GTKWbO3Ixe7KFcn021aZipkZd+z8Vlu1BwkhqtVgivcKaClaExtWU/lDHkjBzag==", + "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.14.0.tgz", - "integrity": "sha512-sraF4PGVcc6t6CaYw5raO/GWeOaa6UjcEvH/+Qm7zp+q/fbWAMwbj+1QzaNvpMspCwF+xW6TddDcnXrCDmqYVA==", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.28.5.tgz", + "integrity": "sha512-eAuL+x1oBbodJksPm4UpFU57A6z1n1rx9JNpD87CObwtbRf5EzW29Ofd0t057bPGcHc8cYZtZzJ69dcRQ9xGdg==", + "license": "MIT", "dependencies": { - "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.5.0", + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.20.1", "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", "js-levenshtein": "^1.1.6", "js-yaml": "^4.1.0", - "lodash.isequal": "^4.5.0", "minimatch": "^5.0.1", - "node-fetch": "^2.6.1", "pluralize": "^8.0.0", "yaml-ast-parser": "0.0.43" }, "engines": { - "node": ">=14.19.0", - "npm": ">=7.0.0" + "node": ">=18.17.0", + "npm": ">=9.5.0" } }, "node_modules/@redocly/openapi-core/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } }, "node_modules/@redocly/openapi-core/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1862,48 +1822,23 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@redocly/openapi-core/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "node_modules/@redocly/openapi-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", "dependencies": { - "whatwg-url": "^5.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@redocly/openapi-core/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@redocly/openapi-core/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@redocly/openapi-core/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "node": ">=10" } }, "node_modules/@redux-saga/core": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@redux-saga/core/-/core-1.2.3.tgz", - "integrity": "sha512-U1JO6ncFBAklFTwoQ3mjAeQZ6QGutsJzwNBjgVLSWDpZTRhobUzuVDS1qH3SKGJD8fvqoaYOjp6XJ3gCmeZWgA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@redux-saga/core/-/core-1.3.0.tgz", + "integrity": "sha512-L+i+qIGuyWn7CIg7k1MteHGfttKPmxwZR5E7OsGikCL2LzYA0RERlaUY00Y3P3ZV2EYgrsYlBrGs6cJP5OKKqA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.6.3", "@redux-saga/deferred": "^1.2.1", @@ -1911,7 +1846,6 @@ "@redux-saga/is": "^1.1.3", "@redux-saga/symbols": "^1.1.3", "@redux-saga/types": "^1.2.1", - "redux": "^4.0.4", "typescript-tuple": "^2.2.1" }, "funding": { @@ -1922,12 +1856,14 @@ "node_modules/@redux-saga/deferred": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@redux-saga/deferred/-/deferred-1.2.1.tgz", - "integrity": "sha512-cmin3IuuzMdfQjA0lG4B+jX+9HdTgHZZ+6u3jRAOwGUxy77GSlTi4Qp2d6PM1PUoTmQUR5aijlA39scWWPF31g==" + "integrity": "sha512-cmin3IuuzMdfQjA0lG4B+jX+9HdTgHZZ+6u3jRAOwGUxy77GSlTi4Qp2d6PM1PUoTmQUR5aijlA39scWWPF31g==", + "license": "MIT" }, "node_modules/@redux-saga/delay-p": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@redux-saga/delay-p/-/delay-p-1.2.1.tgz", "integrity": "sha512-MdiDxZdvb1m+Y0s4/hgdcAXntpUytr9g0hpcOO1XFVyyzkrDu3SKPgBFOtHn7lhu7n24ZKIAT1qtKyQjHqRd+w==", + "license": "MIT", "dependencies": { "@redux-saga/symbols": "^1.1.3" } @@ -1936,6 +1872,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/@redux-saga/is/-/is-1.1.3.tgz", "integrity": "sha512-naXrkETG1jLRfVfhOx/ZdLj0EyAzHYbgJWkXbB3qFliPcHKiWbv/ULQryOAEKyjrhiclmr6AMdgsXFyx7/yE6Q==", + "license": "MIT", "dependencies": { "@redux-saga/symbols": "^1.1.3", "@redux-saga/types": "^1.2.1" @@ -1944,46 +1881,36 @@ "node_modules/@redux-saga/symbols": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@redux-saga/symbols/-/symbols-1.1.3.tgz", - "integrity": "sha512-hCx6ZvU4QAEUojETnX8EVg4ubNLBFl1Lps4j2tX7o45x/2qg37m3c6v+kSp8xjDJY+2tJw4QB3j8o8dsl1FDXg==" + "integrity": "sha512-hCx6ZvU4QAEUojETnX8EVg4ubNLBFl1Lps4j2tX7o45x/2qg37m3c6v+kSp8xjDJY+2tJw4QB3j8o8dsl1FDXg==", + "license": "MIT" }, "node_modules/@redux-saga/types": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@redux-saga/types/-/types-1.2.1.tgz", - "integrity": "sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==" + "integrity": "sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==", + "license": "MIT" }, "node_modules/@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dependencies": { - "type-detect": "4.0.8" - } + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==", + "license": "MIT" }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } + "node_modules/@scarf/scarf": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz", + "integrity": "sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==", + "hasInstallScript": true, + "license": "Apache-2.0" }, "node_modules/@swagger-api/apidom-ast": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-1.0.0-alpha.5.tgz", - "integrity": "sha512-ZH3xryzmwd8OvUdOJH4ujNAyQMXN6NCrRT0HGR8z9TnA0nFPFoOAswq7317mCn77VJmViu/tpCuvmRS0a9BROg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-1.0.0-beta.11.tgz", + "integrity": "sha512-QvKVHSYdYNISzq5ONqdfl0QfbVdNosVsgDMrXrB6AP0HoF0rR84Hvj16aPKfYYKU4cfB+orz4u4dWi0xdiDqtA==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", + "@swagger-api/apidom-error": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -1991,13 +1918,14 @@ } }, "node_modules/@swagger-api/apidom-core": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-1.0.0-alpha.5.tgz", - "integrity": "sha512-iArtPxwcQ/EpQU/VqwBDrD+F0lngyUyLVCa8zR4gT+7mP6fpiU7jcerizw0hDpFmvieXddx5UdfO28Pxuq204g==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-1.0.0-beta.11.tgz", + "integrity": "sha512-WnowOdBwezElnbyhw5DXiQc6fFw9ld3g3aMqCmal4tleN3QB4bnlWWXVXKDDDhvhfTx3HaQB/UlPWUMQwInb7g==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", + "@swagger-api/apidom-ast": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "minim": "~0.23.8", "ramda": "~0.30.0", @@ -2007,36 +1935,39 @@ } }, "node_modules/@swagger-api/apidom-error": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-1.0.0-alpha.5.tgz", - "integrity": "sha512-5UEgSZuQPdkqKSKDtRXQ0cm7x1o4EPyusLBVsCG4l8QtJvAhG1OOpEzJbTZ48/nRt7VkbK7MTj/up+oEILzVvw==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-1.0.0-beta.11.tgz", + "integrity": "sha512-J/GrqtjrNZUWhgdKS90A3+ctBhkR5DBRGZUHxoBjNPR61iGWd/GLJjAcChwmNM7gWKi7PGwOi2q1AqMecqubkQ==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7" } }, "node_modules/@swagger-api/apidom-json-pointer": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-1.0.0-alpha.5.tgz", - "integrity": "sha512-eDAz7/UaGpGCvB0y1GoRjFwxFWseCsF/0ZYIQvvq9PS025inc/I6M+XX8dWMmkpNpbbf+KfD7WlwfqnUZLv/MQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-1.0.0-beta.11.tgz", + "integrity": "sha512-dR9Kj4W26YpxiacSYiGye63vPQlumo7Gdqlb7wtfIEKBI3H6QIXmN6ehGbgQ65AfM/eYo/LlUMfFygQNzWLP3A==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-ns-api-design-systems": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-1.0.0-alpha.5.tgz", - "integrity": "sha512-aq9Ix2Wo2TMfYW3HmheTO3qVd2MYrdinjLFHn9uozzC2x+CSzALhvKkwOc29HiGOn4QQ6QHHPRojNgD86WkwUg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-1.0.0-beta.11.tgz", + "integrity": "sha512-otqTNZf+yG7ZTDo5wzin6jcTqO9KwoAni8iwS8s359Et8sp5DwjTSR86vSg1rZsUIqw/WWDGrPRkTHU73tOX8w==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2044,28 +1975,62 @@ } }, "node_modules/@swagger-api/apidom-ns-asyncapi-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-JFtQBhCOkYuyNVcYGMFd9+U0UO6lEj9kO5qCgUjPOTgkOpZOZQslVEtg3TDmRlBATwVdmRv39xy3ZLK8O/JdmQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-1.0.0-beta.11.tgz", + "integrity": "sha512-xFu/xZlmhbCo2WAyfTlaiRquH7AEnArAwjNynd3CWnerNJ0NMuO1OBsUh8JI3WJQPRKdtYyH0zP5bnVk9aHSYA==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-json-schema-draft-7": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-7": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", "ts-mixer": "^6.0.3" } }, + "node_modules/@swagger-api/apidom-ns-json-schema-2019-09": { + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-2019-09/-/apidom-ns-json-schema-2019-09-1.0.0-beta.11.tgz", + "integrity": "sha512-aNU+5qylnl9//pywt/aJHece6sJaSHE5PoCoBQYQ+La6Dt7xhMU5zRQv2inCpxcPP4H3F2yapXqsB+VU/If3yA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-7": "^1.0.0-beta.11", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-2020-12": { + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-2020-12/-/apidom-ns-json-schema-2020-12-1.0.0-beta.11.tgz", + "integrity": "sha512-3WzQ9ykmTYR14cvjgZCpMODvaTcSLcScayAjWPXfH6cc8qtAf786654C52qtpMaQNbpWrdMz93LUvBFrBrGJhA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-2019-09": "^1.0.0-beta.11", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-1.0.0-alpha.5.tgz", - "integrity": "sha512-aDmcpGikL5JZmDTg7J6EJfLFjtUmX/MfduS4hQeopFCkw91dZsqxO10j7KEiRVVuJBuGStbYoHI5aIsQTlebzA==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-1.0.0-beta.11.tgz", + "integrity": "sha512-5iAzcjFfai5mVKDeytG2M9R8kG9xSMhfzgNFvFX5X7NwPrHZeNJwS02BXwHPksBiE6QdfS6tDeF9iMToDCR+Yw==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^1.0.0-alpha.5", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", + "@swagger-api/apidom-ast": "^1.0.0-beta.11", + "@swagger-api/apidom-core": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2073,15 +2038,15 @@ } }, "node_modules/@swagger-api/apidom-ns-json-schema-draft-6": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-1.0.0-alpha.5.tgz", - "integrity": "sha512-ylh96E59aaV1VDv9sDrNwpTmjVT6vmOSncpmytlc0ynb374dwZkLZ63Hd30rcMFAhKmg5aYOG+i5O1QXKFYz8A==", - "optional": true, + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-1.0.0-beta.11.tgz", + "integrity": "sha512-Cmaw1JWP1UWrqFKgbRp+BTCsB0yuhLVBOL1Glf439+jk95cz7v14B7+P+/wN4tqn4bcmzXyhD6KJ9DYzHiHd2A==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2089,15 +2054,15 @@ } }, "node_modules/@swagger-api/apidom-ns-json-schema-draft-7": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-1.0.0-alpha.5.tgz", - "integrity": "sha512-Mks9gabJvz4atkjzLDwjWbo12xirul7a9ifHYZQJc/jfVKfVNy1e3QgFG1+EbSWWG5Yfbr3WKyxUDJLgr75qKg==", - "optional": true, + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-1.0.0-beta.11.tgz", + "integrity": "sha512-I0Ls6It89Dvkm5lOMGF79Sbk3QcPP7Ijo7Ay5QEiLTD+u7jcfpJIp/scOCzdQLCpTWxzzLe4FY88NuauzTfuJw==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-json-schema-draft-6": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-6": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2105,15 +2070,16 @@ } }, "node_modules/@swagger-api/apidom-ns-openapi-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-2/-/apidom-ns-openapi-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-uY+1G4oRf9UT/6sGuatvWKstmlRnEiN9XqaVvV8euXESxI4jtwcPbRwoEX31vEYXoTqq2ZScFy8UQJ2CJ2ZADw==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-2/-/apidom-ns-openapi-2-1.0.0-beta.11.tgz", + "integrity": "sha512-aVi48Dv3pk/QzxPXH/jmOReiGU01gkgkEFUbBiNGxuHD/bzS4SbLLdkw6ai8f8eQPpXI6xKP5F6LhFHWTE0IJg==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2121,14 +2087,15 @@ } }, "node_modules/@swagger-api/apidom-ns-openapi-3-0": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-1.0.0-alpha.5.tgz", - "integrity": "sha512-UAOGZaGMDVRQ10l8OgXCAfxS9PxGoCW66o/vFmhPfrK8NwU1GEo6sYHYoo1mflNMHCN2eVYyM5LxA+qYm0SJgQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-1.0.0-beta.11.tgz", + "integrity": "sha512-amY1KI9Vx0Vye1OQ3K1mPJmL4ONWSZwWcH6COWer8aExNq66W7oWTXOfL3q6NAgRC6NGobbrXgFGXd196N7fNw==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2136,15 +2103,17 @@ } }, "node_modules/@swagger-api/apidom-ns-openapi-3-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-8VkdZ2MfxXIdmzQZrV0qGk18MG7XNJKIL3GT9lad9NyXyiKSvBVFJDmS4S43qcQTL0rjHXF6ds25yErDSTprjg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-1.0.0-beta.11.tgz", + "integrity": "sha512-Y9rChJPfBZYJzo33XZivRSEgnZf07GLRLV5eX4kLGeNNI6UtzxJ1mQR4WpLn9CkrN+JrGguNpH1xMdDs/b/J7g==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^1.0.0-alpha.5", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-json-pointer": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-alpha.5", + "@swagger-api/apidom-ast": "^1.0.0-beta.11", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-json-pointer": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-2020-12": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2152,14 +2121,15 @@ } }, "node_modules/@swagger-api/apidom-ns-workflows-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-workflows-1/-/apidom-ns-workflows-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-6cMv37y4kftJySoMAeubz5yhHaRKnSK0YglvCv8v7rE2OBduR/yEITDOej2/KFAnt29LxkhotSbNsmHx0weICQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-workflows-1/-/apidom-ns-workflows-1-1.0.0-beta.11.tgz", + "integrity": "sha512-tsQicBkvHfpEWaBap4Ip0F2BbyI+qbLAdmP1e9LwYeqchrCjE4FJuDGCpHzmdNBIgkGw0aH3OyPUeZsUKM3r2A==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-json-schema-2020-12": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", @@ -2167,263 +2137,332 @@ } }, "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-1.0.0-alpha.5.tgz", - "integrity": "sha512-QVWS2sPKA1sG52UIJut/St6+j7zO8QxzPlL5akR/8QPX2FWKqmw808Ewvjq9WLtqlPhVY2G33tv90d4/FJUNwQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-1.0.0-beta.11.tgz", + "integrity": "sha512-kya/aWYL/tkJ7P12FOztRzGo8w8zajkN33KPbi0cVwiyB82yDlor2A4CodSXsy/vSEWVrqMVvz5lBVsUe2YgFQ==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-api-design-systems": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-api-design-systems": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-1.0.0-alpha.5.tgz", - "integrity": "sha512-T7UD/SWd5u2zlPyswDdtfAStm6Qt5hQWAWvCmQKxy37qJA9QGXcQKNavaSMPGvN660hufNaJEBxgJ/B0Zd5iaw==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-1.0.0-beta.11.tgz", + "integrity": "sha512-tGzU7/FH/PqiUxHvbADtrSH9Lp7otwY9gpYXz2m4KmmvPKAH4VmCaVZKYCaB5TZT+UkgLKShtNt5PqdFHKdChQ==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-api-design-systems": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-api-design-systems": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-UfCS9DFIURTUfaHfmEn8omHaevIV2i24Ncp46M/Pnk6JwZHjAEMxmPxsgMl4TTGbzqvySUQsJka8Qz1ziYZ1og==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-1.0.0-beta.11.tgz", + "integrity": "sha512-mQmHfugQLd8pSLj5atOavc2eY7HQVtmnyiL4KOc3xIhtFhjrtXHKkkYh7cGMYCCQCGjE+bcfSyOWu345PtrbPg==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-X5avFyLnlu6Zjyul35f8Ff0DRE70aNc+Bk7il+eV8g+FR/qgrmuNziQEBOhCrIUnYB1kFbTty6BZRsNLdjW9XQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-1.0.0-beta.11.tgz", + "integrity": "sha512-tnEQIkD/SKdWlIBSOnjCjCt34JCIawZBgoOa1ZYJNPchs9pbn014YlHSxpoB+XqMMcQoHphzn1gHrC3Hl2HEMg==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-json": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-1.0.0-alpha.5.tgz", - "integrity": "sha512-NdVjlRrtr1EvrBsk6DHSkjI8zdnSve/bjeGgo0NR2IRmA/8BRcY6rffM1BR76Ku+CjxhCB2mfQxotilD71dL+g==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-1.0.0-beta.11.tgz", + "integrity": "sha512-vN9AY/HL1JxuvXUjiPSBvMlAZSZGUiNDuXjfKotKqsBlnbhfTlVcnwFkshY4V9iomjc3cSg2EV1K6eX7ZKh/sg==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^1.0.0-alpha.5", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", + "@swagger-api/apidom-ast": "^1.0.0-beta.11", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", - "tree-sitter": "=0.20.4", - "tree-sitter-json": "=0.20.2", - "web-tree-sitter": "=0.20.3" + "tree-sitter": "=0.22.1", + "tree-sitter-json": "=0.24.8", + "web-tree-sitter": "=0.24.5" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-json/node_modules/tree-sitter": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.22.1.tgz", + "integrity": "sha512-gRO+jk2ljxZlIn20QRskIvpLCMtzuLl5T0BY6L9uvPYD17uUrxlxWkvYCiVqED2q2q7CVtY52Uex4WcYo2FEXw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.2.1", + "node-gyp-build": "^4.8.2" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-2/-/apidom-parser-adapter-openapi-json-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-qOwQl2WezfdDVmtf9ZlOiqT1hcDS52j7ZbBdH9MqMGJ+/mo6sv0qEY2ZXS104lWeRamgi4o/4o4jGqjZS1YrMg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-2/-/apidom-parser-adapter-openapi-json-2-1.0.0-beta.11.tgz", + "integrity": "sha512-ZcjMGWVDpRaBf5ndoN0nHSBcJazUHqFod8Ug4HIqGpHguQ0Aa2pk22yb9oaAwkg4eFPnNlZROwNXM+ygIxvfRw==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-2": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-2": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-1.0.0-alpha.5.tgz", - "integrity": "sha512-t5oj7XteTu2Yh8uNkzXAcKU81CQky+q6Qt/ImQ/S6MGxpXJnWwgVfm/j/dH2wnHFKghNS3vgm6IewpojSbUw4w==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-1.0.0-beta.11.tgz", + "integrity": "sha512-OOZWoqPSvx+t8vdQ99AnVfQM+nRuCUdArVHkKe7UnPRacdGZ52z1b6diIzTdRl8uGDL1IfMYLRjY5SmmcugwvQ==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-w0G53HXYdzcespfa3atN90jVLDRoH9FU7XEWG4DvFWM90WGwuNscojcaB28r8pZMhSQAKMPxggh6PnmvK3gdEQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-1.0.0-beta.11.tgz", + "integrity": "sha512-4hESez5ciPzDNR+Kk6u1gJLD6or19g+D9MQnCmzaVq2Jk6V5Jke/lLW1xOoL2EWCWaz3LClIr5uU5JnQosXntA==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-2/-/apidom-parser-adapter-openapi-yaml-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-nfeYRL0o6QwtKsyF30d2JmtW7fzoI/EYKSFgzaDm7IFlrQWMpB6BidpZKdk5MtYN4zvmfAM+lOhrqR7a5BvHMg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-2/-/apidom-parser-adapter-openapi-yaml-2-1.0.0-beta.11.tgz", + "integrity": "sha512-kk7DZYfhLXLaldOIOiN/bF2RyLkdjrplYT+zDgQj4ESJSFCQF6gD4EdUyiLKjtZoOItu9oQAVneg3AbzBVbj1g==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-2": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-2": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-1.0.0-alpha.5.tgz", - "integrity": "sha512-HRziGD/YUcO21hmDIYNzwYivp/faeZRxcq8Gex7RLLhJZ60fGTJJ1k1yhWFPNSe9DEJUNBN949SDxMdZnGT9PQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-1.0.0-beta.11.tgz", + "integrity": "sha512-QVataLENINvA9QKdX8cWPezurQXsb8sSU6EzlikpOb/hQLEJMaIGEHYhs3obl0NQNJGdCggrFQRYjo3ocWZtwQ==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-aul2wSOvkdp9jQjSv1pvEGllVaDUnTKmRbCy7M/dFQyIhJQBvwW+/Cu//PprzAODtFNraOBjIXiJ5tVdv6NuIQ==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-1.0.0-beta.11.tgz", + "integrity": "sha512-q4wWs4+LHxj1zPzOGqvchtx1lTTnwSjxC9eWkm3zQWLL9wPFCogu4hBY7ojnBqMX0iFnXLt3V9oOG7nHP9IibA==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-workflows-json-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-json-1/-/apidom-parser-adapter-workflows-json-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-R1LVe/gx7fRSCuDmmN3qScWonz6Xlaw11J+NAfiJzrNXBy1Qa1mCxgGs47w0slQN+FjYkVj5Y/q29jJgpUbLHA==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-json-1/-/apidom-parser-adapter-workflows-json-1-1.0.0-beta.11.tgz", + "integrity": "sha512-DUvYf3yKQQBk0Qy6S4njmj7z81HjAgW9wMNPPLGUid4zyhDTcpLZ1P/ryxH8HNaj8UNxCShCJ09EN6aosh9rZA==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-workflows-1": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-workflows-1": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-workflows-yaml-1": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-yaml-1/-/apidom-parser-adapter-workflows-yaml-1-1.0.0-alpha.5.tgz", - "integrity": "sha512-W5wD+TdGNdW4aP9uqkxFbVmjWvLOXyV02VvyStyTlzxdUaPzKY3FGaxjxk8TGVRqwe2yEQVUc2zfGalrScA/Sg==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-yaml-1/-/apidom-parser-adapter-workflows-yaml-1-1.0.0-beta.11.tgz", + "integrity": "sha512-Kg/qevFBIqVNl5ycSUUABHd76I5TZPF8ohRdhrQ4/zfZHWI44VLLjMDJcJTBg7kxbd3w4lIK7bJo4JvomiuRXQ==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-ns-workflows-1": "^1.0.0-alpha.5", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-ns-workflows-1": "^1.0.0-beta.11", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" } }, "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-1.0.0-alpha.5.tgz", - "integrity": "sha512-21TIQPkB+Z4ekNj5dh1uN0dhOBBCPeK572YpooA/pBTFLeH6Wtildx7ZZYfpJEejHaQKaqoRx3hp0G42GDOb7g==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-1.0.0-beta.11.tgz", + "integrity": "sha512-3iiwF87EmYMCzvjCJX5gW+lopH7mhKWKlFuqapZoFG/1VngD3MKyL8Ko+njzAon/dx8g2P/hR2pK5m1brxlEdw==", + "license": "Apache-2.0", "optional": true, "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^1.0.0-alpha.5", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", - "@swagger-api/apidom-error": "^1.0.0-alpha.5", + "@swagger-api/apidom-ast": "^1.0.0-beta.11", + "@swagger-api/apidom-core": "^1.0.0-beta.11", + "@swagger-api/apidom-error": "^1.0.0-beta.11", + "@tree-sitter-grammars/tree-sitter-yaml": "=0.7.0", "@types/ramda": "~0.30.0", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0", - "tree-sitter": "=0.20.4", - "tree-sitter-yaml": "=0.5.0", - "web-tree-sitter": "=0.20.3" + "tree-sitter": "=0.22.1", + "web-tree-sitter": "=0.24.5" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/node_modules/@tree-sitter-grammars/tree-sitter-yaml": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@tree-sitter-grammars/tree-sitter-yaml/-/tree-sitter-yaml-0.7.0.tgz", + "integrity": "sha512-GOMIK3IaDvECD0eZEhAsLl03RMtM1E8StxuGMn6PpMKFg7jyQ+jSzxJZ4Jmc/tYitah9/AECt8o4tlRQ5yEZQg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + }, + "peerDependencies": { + "tree-sitter": "^0.22.1" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/node_modules/tree-sitter": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.22.1.tgz", + "integrity": "sha512-gRO+jk2ljxZlIn20QRskIvpLCMtzuLl5T0BY6L9uvPYD17uUrxlxWkvYCiVqED2q2q7CVtY52Uex4WcYo2FEXw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.2.1", + "node-gyp-build": "^4.8.2" } }, "node_modules/@swagger-api/apidom-reference": { - "version": "1.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-1.0.0-alpha.5.tgz", - "integrity": "sha512-zPMTScWI8oVUAT//RdAhl9GJuwtQLibP8iCrqFQDGjBzKQS5Uxz4hSXr/jqKPdkCJXbEoP94yYjvQjtI5yrv1A==", + "version": "1.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-1.0.0-beta.11.tgz", + "integrity": "sha512-T3wlUar5spN54ne9UQKVUs6RtDcul1SzkOY51ZL7tlbvb4/Tq+Pjo9/t3LUAOG3eiQ9wlV8spSDKoLF5ATYNOw==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^1.0.0-alpha.5", + "@swagger-api/apidom-core": "^1.0.0-beta.11", "@types/ramda": "~0.30.0", - "axios": "^1.4.0", + "axios": "^1.7.4", "minimatch": "^7.4.3", "process": "^0.11.10", "ramda": "~0.30.0", "ramda-adjunct": "^5.0.0" }, "optionalDependencies": { - "@swagger-api/apidom-error": "^1.0.0-alpha.1", - "@swagger-api/apidom-json-pointer": "^1.0.0-alpha.1", - "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-ns-openapi-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-alpha.1", - "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-ns-workflows-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-json": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-json-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-workflows-json-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-workflows-yaml-1": "^1.0.0-alpha.1", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-alpha.1" + "@swagger-api/apidom-error": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-json-pointer": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-ns-asyncapi-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-ns-openapi-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-ns-openapi-3-0": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-ns-workflows-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-json": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-json-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-workflows-json-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-workflows-yaml-1": "^1.0.0-beta.3 <1.0.0-rc.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.0.0-beta.3 <1.0.0-rc.0" + } + }, + "node_modules/@swagger-api/apidom-reference/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/@swagger-api/apidom-reference/node_modules/minimatch": { "version": "7.4.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2434,116 +2473,139 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "node_modules/@swaggerexpert/cookie": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swaggerexpert/cookie/-/cookie-1.4.1.tgz", + "integrity": "sha512-ZRbRC2017wMs+uZeIOC55ghwgbTxeolo+s6I0njzqina7MTrOhz8WMfTj0KGk3hfBUO/yhTQD/aQZ0lQHEIKxQ==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.3" + }, "engines": { - "node": ">= 10" + "node": ">=12.20.0" + } + }, + "node_modules/@tanstack/react-virtual": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.0.tgz", + "integrity": "sha512-CchF0NlLIowiM2GxtsoKBkXA4uqSnY2KvnXo+kyUFD4a4ll6+J0qzoRsUPMwXV/H26lRsxgJIr/YmjYum2oEjg==", + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.13.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.0.tgz", + "integrity": "sha512-NBKJP3OIdmZY3COJdWkSonr50FMVIi+aj5ZJ7hI/DTpEKg2RMfo/KvP8A3B/zOSpMgIe52B5E2yn7rryULzA6g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@types/codemirror": { - "version": "5.60.10", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.10.tgz", - "integrity": "sha512-ZTA3teiCWKT8HUUofqlGPlShu5ojdIajizsS0HpH6GL0/iEdjRt7fXbCLHHqKYP5k7dC/HnnWIjZAiELUwBdjQ==", + "version": "5.60.15", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.15.tgz", + "integrity": "sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==", + "license": "MIT", "dependencies": { "@types/tern": "*" } }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" + }, + "node_modules/@types/gensync": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/gensync/-/gensync-1.0.4.tgz", + "integrity": "sha512-C3YYeRQWp2fmq9OryX+FoDy8nXS6scQ7dPptD8LnFDAUNcKWJjXQKDNJD3HVm+kOUsXhTOkpi69vI4EuAr95bA==", + "license": "MIT", + "peer": true }, "node_modules/@types/hast": { "version": "2.3.10", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", + "license": "MIT", "dependencies": { "@types/unist": "^2" } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.6.tgz", + "integrity": "sha512-lPByRJUer/iN/xa4qpyL0qmL11DqNW81iU/IG1S3uvRUq4oKagz8VCxZjiWkumgt66YT3vOdDgZ0o32sGKtCEw==", + "license": "MIT", "dependencies": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" } }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "node_modules/@types/hoist-non-react-statics/node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" + "react-is": "^16.7.0" } }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==" + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "license": "MIT" }, "node_modules/@types/lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-QjCOmf5kYwekcsfEKhcEHMK8/SvgnneuSDXFERBuC/DPca2KJIO/gpChTsVb35BoWLBpEAJWz1GFVEArSdtKtw==" + "integrity": "sha512-QjCOmf5kYwekcsfEKhcEHMK8/SvgnneuSDXFERBuC/DPca2KJIO/gpChTsVb35BoWLBpEAJWz1GFVEArSdtKtw==", + "license": "MIT" }, "node_modules/@types/node": { - "version": "20.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", - "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==" - }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } }, "node_modules/@types/ramda": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.30.0.tgz", - "integrity": "sha512-DQtfqUbSB18iM9NHbQ++kVUDuBWHMr6T2FpW1XTiksYRGjq4WnNPZLt712OEHEBJs7aMyJ68Mf2kGMOP1srVVw==", + "version": "0.30.2", + "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.30.2.tgz", + "integrity": "sha512-PyzHvjCalm2BRYjAU6nIB3TprYwMNOUY/7P/N8bSzp9W/yM2YrtGtAnnVtaCNSeOZ8DzKyFDvaqQs7LnWwwmBA==", + "license": "MIT", "dependencies": { - "types-ramda": "^0.30.0" + "types-ramda": "^0.30.1" } }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "19.0.8", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.8.tgz", + "integrity": "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==", + "license": "MIT", "dependencies": { - "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-redux": { - "version": "7.1.26", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.26.tgz", - "integrity": "sha512-UKPo7Cm7rswYU6PH6CmTNCRv5NYF3HrgKuHEYTK8g/3czYLrUux50gQ2pkxc9c7ZpQZi+PNhgmI8oNIRoiVIxg==", + "version": "7.1.34", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.34.tgz", + "integrity": "sha512-GdFaVjEbYv4Fthm2ZLvj1VSCedV7TqE5y1kNwnjSdBOTXuRSgowux6J8TAct15T3CKBr63UMk+2CO7ilRhyrAQ==", + "license": "MIT", "dependencies": { "@types/hoist-non-react-statics": "^3.3.0", "@types/react": "*", @@ -2551,70 +2613,70 @@ "redux": "^4.0.0" } }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" + "node_modules/@types/react-redux/node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } }, "node_modules/@types/stylis": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==", + "license": "MIT", "peer": true }, "node_modules/@types/tern": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.5.tgz", - "integrity": "sha512-POau56wDk3TQ0mQ0qG7XDzv96U5whSENZ9lC0htDvEH+9YUREo+J2U+apWcVRgR2UydEE70JXZo44goG+akTNQ==", + "version": "0.23.9", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz", + "integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==", + "license": "MIT", "dependencies": { "@types/estree": "*" } }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==" + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true }, "node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" }, "node_modules/@types/use-sync-external-store": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", - "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", + "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", - "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", + "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", + "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" - }, "node_modules/@whatwg-node/events": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==" + "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", + "license": "MIT" }, "node_modules/@whatwg-node/fetch": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "license": "MIT", "dependencies": { "@peculiar/webcrypto": "^1.4.0", "@whatwg-node/node-fetch": "^0.3.6", @@ -2627,6 +2689,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "license": "MIT", "dependencies": { "@whatwg-node/events": "^0.0.3", "busboy": "^1.6.0", @@ -2635,29 +2698,26 @@ "tslib": "^2.3.1" } }, + "node_modules/@whatwg-node/node-fetch/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@wry/equality": { "version": "0.1.11", "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz", "integrity": "sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA==", + "license": "MIT", "dependencies": { "tslib": "^1.9.3" } }, - "node_modules/@wry/equality/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "deprecated": "Use your platform's native atob() and btoa() methods instead" - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -2667,9 +2727,10 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -2677,65 +2738,56 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", - "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", - "dependencies": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "license": "MIT", "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/apg-lite": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/apg-lite/-/apg-lite-1.0.3.tgz", - "integrity": "sha512-lOoNkL7vN7PGdyQMFPey1aok2oVVqvs3n7UMFBRvQ9FoELSbKhgPc3rd7JptaGwCmo4125gLX9Cqb8ElvLCFaQ==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/apg-lite/-/apg-lite-1.0.4.tgz", + "integrity": "sha512-B32zCN3IdHIc99Vy7V9BaYTUzLeRA8YXYY1aQD1/5I2aqIrO0coi4t6hJPqMisidlBxhyME8UexkHt31SlR6Og==", + "license": "BSD-2-Clause" }, "node_modules/apollo-link": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.14.tgz", "integrity": "sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg==", + "license": "MIT", "dependencies": { "apollo-utilities": "^1.3.0", "ts-invariant": "^0.4.0", @@ -2750,6 +2802,7 @@ "version": "1.5.17", "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.17.tgz", "integrity": "sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg==", + "license": "MIT", "dependencies": { "apollo-link": "^1.2.14", "apollo-link-http-common": "^0.2.16", @@ -2763,6 +2816,7 @@ "version": "0.2.16", "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz", "integrity": "sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg==", + "license": "MIT", "dependencies": { "apollo-link": "^1.2.14", "ts-invariant": "^0.4.0", @@ -2772,20 +2826,11 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, - "node_modules/apollo-link-http-common/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/apollo-link-http/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/apollo-link-ws": { "version": "1.0.20", "resolved": "https://registry.npmjs.org/apollo-link-ws/-/apollo-link-ws-1.0.20.tgz", "integrity": "sha512-mjSFPlQxmoLArpHBeUb2Xj+2HDYeTaJqFGOqQ+I8NVJxgL9lJe84PDWcPah/yMLv3rB7QgBDSuZ0xoRFBPlySw==", + "license": "MIT", "dependencies": { "apollo-link": "^1.2.14", "tslib": "^1.9.3" @@ -2794,20 +2839,11 @@ "subscriptions-transport-ws": "^0.9.0" } }, - "node_modules/apollo-link-ws/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/apollo-link/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/apollo-utilities": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.4.tgz", "integrity": "sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==", + "license": "MIT", "dependencies": { "@wry/equality": "^0.1.2", "fast-json-stable-stringify": "^2.0.0", @@ -2818,23 +2854,20 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, - "node_modules/apollo-utilities/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -2842,15 +2875,23 @@ "node": ">=10" } }, + "node_modules/aria-hidden/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "license": "MIT", "engines": { "node": ">=8" } @@ -2859,6 +2900,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "license": "BSD-3-Clause", "dependencies": { "pvtsutils": "^1.3.2", "pvutils": "^1.1.3", @@ -2868,28 +2910,44 @@ "node": ">=12.0.0" } }, + "node_modules/asn1js/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/autolinker": { "version": "3.16.2", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz", "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" } }, + "node_modules/autolinker/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -2900,6 +2958,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz", "integrity": "sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==", + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-module-imports": "^7.22.5", @@ -2915,6 +2974,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "license": "MIT", "dependencies": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -2925,22 +2985,26 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true + "hasInstallScript": true, + "license": "MIT" }, "node_modules/babel-runtime/node_modules/regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "license": "MIT" }, "node_modules/backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" + "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==", + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -2959,12 +3023,14 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/bfj": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.2.tgz", "integrity": "sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==", + "license": "MIT", "dependencies": { "bluebird": "^3.5.5", "check-types": "^8.0.3", @@ -2979,6 +3045,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/biskviit/-/biskviit-1.0.1.tgz", "integrity": "sha512-VGCXdHbdbpEkFgtjkeoBN8vRlbj1ZRX2/mxhE8asCCRalUx2nBzOomLJv8Aw/nRt5+ccDb+tPKidg4XxcfGW4w==", + "license": "MIT", "dependencies": { "psl": "^1.1.7" }, @@ -2986,37 +3053,28 @@ "node": ">=1.0.0" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "optional": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -3029,6 +3087,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -3036,45 +3095,36 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/boom": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/boom/-/boom-7.3.0.tgz", "integrity": "sha512-Swpoyi2t5+GhOEGw8rEsKvTxFLIDiiKoUc2gsoV6Lyr43LHBIzch3k2MvYUs8RTROrIkVJ3Al0TkaOGjnb+B6A==", "deprecated": "This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.", + "license": "BSD-3-Clause", "dependencies": { "hoek": "6.x.x" } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3083,12 +3133,13 @@ "node_modules/browser-fingerprint": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/browser-fingerprint/-/browser-fingerprint-0.0.1.tgz", - "integrity": "sha512-b8SXP7yOlzLUJXF8WUvIjmbJzkJC0X6OHe7J9a/SHqEBC7a9Eglag6AANSTJz82h5U582kuxm/5TPudnD68EPA==" + "integrity": "sha512-b8SXP7yOlzLUJXF8WUvIjmbJzkJC0X6OHe7J9a/SHqEBC7a9Eglag6AANSTJz82h5U582kuxm/5TPudnD68EPA==", + "license": "MIT" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "funding": [ { "type": "opencollective", @@ -3103,12 +3154,13 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -3117,30 +3169,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "optional": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -3156,6 +3184,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3163,18 +3192,48 @@ "node_modules/calculate-size": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/calculate-size/-/calculate-size-1.1.1.tgz", - "integrity": "sha512-jJZ7pvbQVM/Ss3VO789qpsypN3xmnepg242cejOAslsmlZLYw2dnj7knnNowabQ0Kzabzx56KFTy2Pot/y6FmA==" + "integrity": "sha512-jJZ7pvbQVM/Ss3VO789qpsypN3xmnepg242cejOAslsmlZLYw2dnj7knnNowabQ0Kzabzx56KFTy2Pot/y6FmA==", + "license": "MIT" }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -3186,12 +3245,14 @@ "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", - "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "license": "MIT" }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", "engines": { "node": ">=6" } @@ -3200,14 +3261,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001625", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz", - "integrity": "sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w==", + "version": "1.0.30001699", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001699.tgz", + "integrity": "sha512-b+uH5BakXZ9Do9iK+CkDmctUSEqZl+SP056vc5usa0PL+ev5OHw003rZXcnjNDv3L8P5j6rwT6C0BPKSikW08w==", "funding": [ { "type": "opencollective", @@ -3222,27 +3284,28 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "CC-BY-4.0", "peer": true }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=4" } }, "node_modules/character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3252,6 +3315,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3261,6 +3325,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3269,42 +3334,26 @@ "node_modules/check-types": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/check-types/-/check-types-8.0.3.tgz", - "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==" - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "optional": true - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } + "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==", + "license": "MIT" }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT" }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -3318,62 +3367,57 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/codemirror": { - "version": "5.65.15", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.15.tgz", - "integrity": "sha512-YC4EHbbwQeubZzxLl5G4nlbLc1T21QTrKGaOal/Pkm9dVDMZXMH7+ieSPEOZCtO9I68i8/oteJKOxzHC2zR+0g==" + "version": "5.65.18", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.18.tgz", + "integrity": "sha512-Gaz4gHnkbHMGgahNt3CA5HBk5lLQBqmD/pBgeB4kQU6OedZmqMBjlRF0LSrp2tJ4wlLNPm2FfaUd1pDy0mdlpA==", + "license": "MIT" }, "node_modules/codemirror-graphql": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-2.0.11.tgz", - "integrity": "sha512-j1QDDXKVkpin2VsyS0ke2nAhKal6/N1UJtgnBGrPe3gj9ZSP6/K8Xytft94k0xW6giIU/JhZjvW0GwwERNzbFA==", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-0.12.4.tgz", + "integrity": "sha512-gWxmLk2OzPVzvwAXO0K52MtU1n6ylMNbKp0LtZHioK0NEUwLnSL5iPKVXn8MgvYqS8Yos/CG5WrP9Y7RWTO4mg==", + "license": "MIT", "dependencies": { - "@types/codemirror": "^0.0.90", - "graphql-language-service": "5.2.0" + "graphql-language-service-interface": "^2.4.3", + "graphql-language-service-parser": "^1.6.5" }, "peerDependencies": { - "@codemirror/language": "6.0.0", - "codemirror": "^5.65.3", - "graphql": "^15.5.0 || ^16.0.0" - } - }, - "node_modules/codemirror-graphql/node_modules/@types/codemirror": { - "version": "0.0.90", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.90.tgz", - "integrity": "sha512-8Z9+tSg27NPRGubbUPUCrt5DDG/OWzLph5BvcDykwR5D7RyZh5mhHG0uS1ePKV1YFCA+/cwc4Ey2AJAEFfV3IA==", - "dependencies": { - "@types/tern": "*" + "codemirror": "^5.54.0", + "graphql": "^14.0.0 || ^15.0.0" } }, "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3385,6 +3429,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3393,17 +3438,20 @@ "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -3415,6 +3463,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3423,12 +3472,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "license": "MIT", "peer": true }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3436,21 +3487,24 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" }, "node_modules/copy-to-clipboard": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "license": "MIT", "dependencies": { "toggle-selection": "^1.0.6" } }, "node_modules/core-js": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", - "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.40.0.tgz", + "integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==", "hasInstallScript": true, + "license": "MIT", "peer": true, "funding": { "type": "opencollective", @@ -3458,10 +3512,11 @@ } }, "node_modules/core-js-pure": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.1.tgz", - "integrity": "sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA==", + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.40.0.tgz", + "integrity": "sha512-AtDzVIgRrmRKQai62yuSIN5vNiQjcJakJb4fbhVw3ehxx7Lohphvw9SGNWKhLFqSxC4ilD0g/L1huAYFQU3Q6A==", "hasInstallScript": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -3471,6 +3526,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", + "license": "MIT", "dependencies": { "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -3484,12 +3540,14 @@ "node_modules/cosmiconfig/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/cosmiconfig/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3501,6 +3559,7 @@ "version": "15.7.0", "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", + "license": "MIT", "dependencies": { "loose-envify": "^1.3.1", "object-assign": "^4.1.1" @@ -3511,6 +3570,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-4.1.2.tgz", "integrity": "sha512-U2ALcoAHvA1oO2xOreyHvtkQ+IELqDG2WVWRI1GH/XEmmfGIOalnM5MU5Dd2ITyWfr3m6kNqXiy8XuYyd4wKJw==", "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "license": "BSD-3-Clause", "dependencies": { "boom": "7.x.x" }, @@ -3522,6 +3582,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", + "license": "ISC", "engines": { "node": ">=4" } @@ -3530,6 +3591,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", + "license": "MIT", "peer": true, "dependencies": { "camelize": "^1.0.0", @@ -3540,39 +3602,21 @@ "node_modules/css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==" - }, - "node_modules/cssom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", - "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "license": "MIT" }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" }, "node_modules/cuid": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/cuid/-/cuid-1.3.8.tgz", "integrity": "sha512-MoL67ZZuBetDMxzrZtO+Iq1ATajFACQCP52QRinBgd3yTjYdv54mJO8ibUrh06fojKCoX5P2i7KkEatm4VTIOQ==", "deprecated": "Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.", + "license": "MIT", "dependencies": { "browser-fingerprint": "0.0.1", "core-js": "^1.1.1", @@ -3583,32 +3627,28 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha512-ZiPp9pZlgxpWRu0M+YWbm6+aQ84XEfH1JRXvfOc/fILWI0VKhLC2LX13X1NYq4fULzLMq7Hfh43CSo2/aIaUPA==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js." - }, - "node_modules/data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=12" - } + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "license": "MIT" }, "node_modules/dataloader": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.2.2.tgz", - "integrity": "sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.2.3.tgz", + "integrity": "sha512-y2krtASINtPFS1rSDjacrFgn1dcUuoREVabwlOGOe4SdxenREqwjwjElAdwvbGM7kgZz9a3KVicWR7vcz8rnzA==", + "license": "MIT" + }, + "node_modules/debounce-promise": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/debounce-promise/-/debounce-promise-3.1.2.tgz", + "integrity": "sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg==", + "license": "MIT" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3619,11 +3659,6 @@ } } }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" - }, "node_modules/decko": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", @@ -3633,29 +3668,16 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "license": "MIT", "engines": { "node": ">=0.10" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "optional": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", "engines": { "node": ">=4.0.0" } @@ -3664,6 +3686,7 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3672,6 +3695,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3688,6 +3712,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3696,6 +3721,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3704,29 +3730,23 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "optional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "license": "MIT" }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -3738,77 +3758,92 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.1.2" } }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/dompurify": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.4.tgz", - "integrity": "sha512-2gnshi6OshmuKil8rMZuQCGiUF3cUxHY3NGDzUAdUx/NPEe5DVnO8BDoAQouvgwnx0R/+a6jUn36Z0FSdq8vww==" + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.4.tgz", + "integrity": "sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } }, "node_modules/drange": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/dset": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz", - "integrity": "sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz", + "integrity": "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==", + "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "license": "MIT" }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/ejs": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", "hasInstallScript": true, + "license": "Apache-2.0", "engines": { "node": ">=0.10.0" } }, "node_modules/electron-to-chromium": { - "version": "1.4.787", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.787.tgz", - "integrity": "sha512-d0EFmtLPjctczO3LogReyM2pbBiiZbnsKnGF+cdZhsYzHm/A0GV7W94kqzLD8SN4O3f3iHlgLUChqghgyznvCQ==", + "version": "1.5.96", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.96.tgz", + "integrity": "sha512-8AJUW6dh75Fm/ny8+kZKJzI1pgoE8bKLZlzDU2W1ENd+DXKJrx7I7l9hb8UWR4ojlnb5OlixMt00QWiYJoVw1w==", + "license": "ISC", "peer": true }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3817,26 +3852,16 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha512-bl1LAgiQc4ZWr++pNYUdRe/alecaHFeHxIJ/pNciqGdKXghaTCOwKkbKp6ye7pKZGu/GcaSXFk8PBVhgs+dJdA==", + "license": "MIT", "dependencies": { "iconv-lite": "~0.4.13" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "optional": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" - }, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "license": "BSD-2-Clause", "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -3845,17 +3870,16 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -3864,6 +3888,19 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, "engines": { "node": ">= 0.4" } @@ -3871,12 +3908,14 @@ "node_modules/es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -3884,40 +3923,23 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", "engines": { - "node": ">=8" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" + "node": ">=0.8.0" } }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3926,26 +3948,11 @@ "node": ">=4" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3953,53 +3960,47 @@ "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" }, "node_modules/exenv": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "optional": true, - "engines": { - "node": ">=6" - } + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==", + "license": "BSD-3-Clause" }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -4008,20 +4009,17 @@ }, "engines": { "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "engines": { - "node": ">= 0.6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4029,31 +4027,20 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/extract-files": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-11.0.0.tgz", "integrity": "sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ==", + "license": "MIT", "engines": { "node": "^12.20 || >= 14.13" }, @@ -4064,23 +4051,26 @@ "node_modules/fast-decode-uri-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==" + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -4089,17 +4079,20 @@ "node_modules/fast-json-patch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" }, "node_modules/fast-querystring": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "license": "MIT", "dependencies": { "fast-decode-uri-component": "^1.0.1" } @@ -4107,25 +4100,45 @@ "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" }, "node_modules/fast-url-parser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "license": "MIT", "dependencies": { "punycode": "^1.3.2" } }, - "node_modules/fast-url-parser/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + "node_modules/fast-xml-parser": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz", + "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -4134,6 +4147,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "license": "MIT", "dependencies": { "format": "^0.2.0" }, @@ -4146,6 +4160,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fetch/-/fetch-1.1.0.tgz", "integrity": "sha512-5O8TwrGzoNblBG/jtK4NFuZwNCkZX6s5GfRNOaGtm+QGJEuNakSC/i2RW0R93KX6E0jVjNXm6O3CRN4Ql3K+yA==", + "license": "MIT", "dependencies": { "biskviit": "1.0.1", "encoding": "0.1.12" @@ -4155,14 +4170,16 @@ "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "license": "BSD-3-Clause", "engines": { "node": ">= 0.4.0" } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -4171,12 +4188,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -4191,6 +4209,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4198,18 +4217,20 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -4222,12 +4243,14 @@ "node_modules/foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", - "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==" + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "license": "MIT" }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4249,6 +4272,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4257,6 +4281,7 @@ "version": "6.5.1", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "license": "MIT", "dependencies": { "@motionone/dom": "10.12.0", "framesync": "6.0.1", @@ -4273,32 +4298,58 @@ "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0" } }, + "node_modules/framer-motion/node_modules/@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "license": "MIT", + "optional": true, + "dependencies": { + "@emotion/memoize": "0.7.4" + } + }, + "node_modules/framer-motion/node_modules/@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "license": "MIT", + "optional": true + }, + "node_modules/framer-motion/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/framesync": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "license": "MIT", "dependencies": { "tslib": "^2.1.0" } }, + "node_modules/framesync/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "optional": true - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4307,6 +4358,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" @@ -4316,20 +4368,27 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4342,20 +4401,41 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "optional": true + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-value": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-3.0.1.tgz", + "integrity": "sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA==", + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=6.0" + } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -4367,6 +4447,7 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", "engines": { "node": ">=4" } @@ -4375,6 +4456,7 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -4391,41 +4473,163 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, "node_modules/graphiql": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-3.2.2.tgz", - "integrity": "sha512-Tpv9gz9/xfOCJq2RTU/ByPgCFkh3ftN16xmcJxNms3j7C0eJ9z7xg6J0lASGGJ6mTeIW9myEI98SJBPL1c4vcA==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-3.8.3.tgz", + "integrity": "sha512-cuPDYtXVKV86Pu5PHBX642Odi/uVEE2y1Jxq5rGO/Qy1G2lRp7ZZ7a/T30RzxhuLSWo9zUbzq0P3U49//H0Ugw==", + "license": "MIT", + "dependencies": { + "@graphiql/react": "^0.28.2" + }, + "peerDependencies": { + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", + "react": "^16.8.0 || ^17 || ^18", + "react-dom": "^16.8.0 || ^17 || ^18" + } + }, + "node_modules/graphiql/node_modules/@graphiql/react": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@graphiql/react/-/react-0.28.2.tgz", + "integrity": "sha512-6PE2Ff9dXpyQMHy3oKzCjT738kY2+wdQ4Xce8+1K+G2yMGZ716Fo0i4vW3S6ErHVI4S/C76gFTQlv/pzxU5ylg==", + "license": "MIT", "dependencies": { - "@graphiql/react": "^0.22.1", - "@graphiql/toolkit": "^0.9.1", - "graphql-language-service": "^5.2.0", - "markdown-it": "^14.1.0" + "@graphiql/toolkit": "^0.11.0", + "@headlessui/react": "^1.7.15", + "@radix-ui/react-dialog": "^1.0.4", + "@radix-ui/react-dropdown-menu": "^2.0.5", + "@radix-ui/react-tooltip": "^1.0.6", + "@radix-ui/react-visually-hidden": "^1.0.3", + "@types/codemirror": "^5.60.8", + "clsx": "^1.2.1", + "codemirror": "^5.65.3", + "codemirror-graphql": "^2.2.0", + "copy-to-clipboard": "^3.2.0", + "framer-motion": "^6.5.1", + "get-value": "^3.0.1", + "graphql-language-service": "^5.3.0", + "markdown-it": "^14.1.0", + "react-compiler-runtime": "19.0.0-beta-37ed2a7-20241206", + "set-value": "^4.1.0" }, "peerDependencies": { - "graphql": "^15.5.0 || ^16.0.0", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", "react": "^16.8.0 || ^17 || ^18", "react-dom": "^16.8.0 || ^17 || ^18" } }, + "node_modules/graphiql/node_modules/@graphiql/react/node_modules/@headlessui/react": { + "version": "1.7.19", + "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.19.tgz", + "integrity": "sha512-Ll+8q3OlMJfJbAKM/+/Y2q6PPYbryqNTXDbryx7SXLIDamkF6iQFbriYHga0dY44PvDhvvBWCx1Xj4U5+G4hOw==", + "license": "MIT", + "dependencies": { + "@tanstack/react-virtual": "^3.0.0-beta.60", + "client-only": "^0.0.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": "^16 || ^17 || ^18", + "react-dom": "^16 || ^17 || ^18" + } + }, + "node_modules/graphiql/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/graphiql/node_modules/codemirror-graphql": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-2.2.0.tgz", + "integrity": "sha512-egIiewf5zEH5LLSkJpJDpYxO1OkNruD0gTWiBrS1JmXk7yjt5WPw7jSmDRkWJx8JheHONltaJPNPWdTUT5LRIQ==", + "license": "MIT", + "dependencies": { + "@types/codemirror": "^0.0.90", + "graphql-language-service": "5.3.0" + }, + "peerDependencies": { + "@codemirror/language": "6.0.0", + "codemirror": "^5.65.3", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/graphiql/node_modules/codemirror-graphql/node_modules/@types/codemirror": { + "version": "0.0.90", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.90.tgz", + "integrity": "sha512-8Z9+tSg27NPRGubbUPUCrt5DDG/OWzLph5BvcDykwR5D7RyZh5mhHG0uS1ePKV1YFCA+/cwc4Ey2AJAEFfV3IA==", + "license": "MIT", + "dependencies": { + "@types/tern": "*" + } + }, + "node_modules/graphiql/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/graphiql/node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/graphiql/node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/graphiql/node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "license": "MIT" + }, + "node_modules/graphiql/node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "license": "MIT" + }, "node_modules/graphql": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz", - "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==", + "version": "15.10.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.10.1.tgz", + "integrity": "sha512-BL/Xd/T9baO6NFzoMpiMD7YUZ62R6viR5tp/MULVEnbYJXZA//kRNW7J0j1w/wXArgL0sCxhDfK5dczSKn3+cg==", + "license": "MIT", "engines": { "node": ">= 10.x" } @@ -4434,6 +4638,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.5.0.tgz", "integrity": "sha512-x6D0/cftpLUJ0Ch1e5sj1TZn6Wcxx4oMfmhaG9shM0DKajA9iR+j1z86GSTQ19fShbGvrSSvbIQsHku6aQ6BBw==", + "license": "MIT", "dependencies": { "@graphql-tools/graphql-file-loader": "^7.3.7", "@graphql-tools/json-file-loader": "^7.3.7", @@ -4460,31 +4665,19 @@ } } }, - "node_modules/graphql-config/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/graphql-config/node_modules/minimatch": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.3.tgz", - "integrity": "sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": ">=10" - } + "node_modules/graphql-config/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/graphql-language-service": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.2.0.tgz", - "integrity": "sha512-o/ZgTS0pBxWm3hSF4+6GwiV1//DxzoLWEbS38+jqpzzy1d/QXBidwQuVYTOksclbtOJZ3KR/tZ8fi/tI6VpVMg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.3.0.tgz", + "integrity": "sha512-gCQIIy7lM9CB1KPLEb+DNZLczA9zuTLEOJE2hEQZTFYInogdmMDRa6RAkvM4LL0LcgcS+3uPs6KtHlcjCqRbUg==", + "license": "MIT", "dependencies": { + "debounce-promise": "^3.1.2", "nullthrows": "^1.0.0", "vscode-languageserver-types": "^3.17.1" }, @@ -4492,7 +4685,7 @@ "graphql": "dist/temp-bin.js" }, "peerDependencies": { - "graphql": "^15.5.0 || ^16.0.0" + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0-alpha.2" } }, "node_modules/graphql-language-service-interface": { @@ -4500,6 +4693,7 @@ "resolved": "https://registry.npmjs.org/graphql-language-service-interface/-/graphql-language-service-interface-2.10.2.tgz", "integrity": "sha512-RKIEBPhRMWdXY3fxRs99XysTDnEgAvNbu8ov/5iOlnkZsWQNzitjtd0O0l1CutQOQt3iXoHde7w8uhCnKL4tcg==", "deprecated": "this package has been merged into graphql-language-service", + "license": "MIT", "dependencies": { "graphql-config": "^4.1.0", "graphql-language-service-parser": "^1.10.4", @@ -4516,6 +4710,7 @@ "resolved": "https://registry.npmjs.org/graphql-language-service-parser/-/graphql-language-service-parser-1.10.4.tgz", "integrity": "sha512-duDE+0aeKLFVrb9Kf28U84ZEHhHcvTjWIT6dJbIAQJWBaDoht0D4BK9EIhd94I3DtKRc1JCJb2+70y1lvP/hiA==", "deprecated": "this package has been merged into graphql-language-service", + "license": "MIT", "dependencies": { "graphql-language-service-types": "^1.8.7" }, @@ -4528,6 +4723,7 @@ "resolved": "https://registry.npmjs.org/graphql-language-service-types/-/graphql-language-service-types-1.8.7.tgz", "integrity": "sha512-LP/Mx0nFBshYEyD0Ny6EVGfacJAGVx+qXtlJP4hLzUdBNOGimfDNtMVIdZANBXHXcM41MDgMHTnyEx2g6/Ttbw==", "deprecated": "this package has been merged into graphql-language-service", + "license": "MIT", "dependencies": { "graphql-config": "^4.1.0", "vscode-languageserver-types": "^3.15.1" @@ -4541,6 +4737,7 @@ "resolved": "https://registry.npmjs.org/graphql-language-service-utils/-/graphql-language-service-utils-2.7.1.tgz", "integrity": "sha512-Wci5MbrQj+6d7rfvbORrA9uDlfMysBWYaG49ST5TKylNaXYFf3ixFOa74iM1KtM9eidosUbI3E1JlWi0JaidJA==", "deprecated": "this package has been merged into graphql-language-service", + "license": "MIT", "dependencies": { "@types/json-schema": "7.0.9", "graphql-language-service-types": "^1.8.7", @@ -4550,26 +4747,23 @@ "graphql": "^15.5.0 || ^16.0.0" } }, - "node_modules/graphql-language-service-utils/node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" - }, "node_modules/graphql-playground-react": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/graphql-playground-react/-/graphql-playground-react-1.7.26.tgz", - "integrity": "sha512-OtJZ8DXota2F/fKXfwrO0sTAg+i7XiTy6CLqoFvG36ZEx0rdpUsl3rJgreQig0dGNUpc2Zn0qu2qa+IJgOxnxw==", + "version": "1.7.28", + "resolved": "https://registry.npmjs.org/graphql-playground-react/-/graphql-playground-react-1.7.28.tgz", + "integrity": "sha512-YPR33Ph9kuKlFOMpc8mKGsL/fOiX0ltgzV1BokXYNsBLtTVQnhdCSKQuZg80CcxWKD8syNuWXDkGZSAdFkwmRg==", + "license": "MIT", "dependencies": { "@types/lru-cache": "^4.1.1", "apollo-link": "^1.2.13", "apollo-link-http": "^1.5.16", "apollo-link-ws": "^1.0.19", "calculate-size": "^1.1.1", - "codemirror": "^5.52.2", - "codemirror-graphql": "^0.12.0-alpha.8", + "codemirror": "^5.58.1", + "codemirror-graphql": "^0.12.3", "copy-to-clipboard": "^3.0.8", "cryptiles": "4.1.2", "cuid": "^1.3.8", + "escape-html": "^1.0.3", "graphiql": "^0.17.5", "graphql": "^15.3.0", "immutable": "^4.0.0-rc.9", @@ -4579,8 +4773,8 @@ "keycode": "^2.1.9", "lodash": "^4.17.11", "lodash.debounce": "^4.0.8", - "markdown-it": "^8.4.1", - "marked": "^0.8.2", + "lru-cache": "^6.0.0", + "markdown-it": "^12.2.0", "prettier": "2.0.2", "prop-types": "^15.7.2", "query-string": "5", @@ -4593,7 +4787,7 @@ "react-helmet": "^5.2.0", "react-input-autosize": "^2.2.1", "react-modal": "^3.1.11", - "react-redux": "^7.2.0", + "react-redux": "^7.2.1", "react-router-dom": "^4.2.2", "react-sortable-hoc": "^0.8.3", "react-transition-group": "^2.2.1", @@ -4614,38 +4808,49 @@ "zen-observable": "^0.7.1" } }, + "node_modules/graphql-playground-react/node_modules/@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "0.7.4" + } + }, + "node_modules/graphql-playground-react/node_modules/@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "license": "MIT" + }, "node_modules/graphql-playground-react/node_modules/@emotion/unitless": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" - }, - "node_modules/graphql-playground-react/node_modules/codemirror-graphql": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-0.12.4.tgz", - "integrity": "sha512-gWxmLk2OzPVzvwAXO0K52MtU1n6ylMNbKp0LtZHioK0NEUwLnSL5iPKVXn8MgvYqS8Yos/CG5WrP9Y7RWTO4mg==", - "dependencies": { - "graphql-language-service-interface": "^2.4.3", - "graphql-language-service-parser": "^1.6.5" - }, - "peerDependencies": { - "codemirror": "^5.54.0", - "graphql": "^14.0.0 || ^15.0.0" - } + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", + "license": "MIT" }, "node_modules/graphql-playground-react/node_modules/css-to-react-native": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", + "license": "MIT", "dependencies": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", "postcss-value-parser": "^3.3.0" } }, + "node_modules/graphql-playground-react/node_modules/entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "license": "BSD-2-Clause" + }, "node_modules/graphql-playground-react/node_modules/graphiql": { "version": "0.17.5", "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-0.17.5.tgz", "integrity": "sha512-ogNsrg9qM1py9PzcIUn+C29JukOADbjIfB6zwtfui4BrpOEpDb5UZ6TjAmSL/F/8tCt4TbgwKtkSrBeLNNUrqA==", + "license": "MIT", "dependencies": { "codemirror": "^5.47.0", "codemirror-graphql": "^0.11.6", @@ -4665,6 +4870,7 @@ "version": "0.11.6", "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-0.11.6.tgz", "integrity": "sha512-/zVKgOVS2/hfjAY0yoBkLz9ESHnWKBWpBNXQSoFF4Hl5q5AS2DmM22coonWKJcCvNry6TLak2F+QkzPeKVv3Eg==", + "license": "MIT", "dependencies": { "graphql-language-service-interface": "^2.3.3", "graphql-language-service-parser": "^1.5.2" @@ -4674,15 +4880,11 @@ "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0" } }, - "node_modules/graphql-playground-react/node_modules/graphiql/node_modules/entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" - }, "node_modules/graphql-playground-react/node_modules/graphiql/node_modules/markdown-it": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "entities": "~2.0.0", @@ -4694,56 +4896,35 @@ "markdown-it": "bin/markdown-it.js" } }, - "node_modules/graphql-playground-react/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/graphql-playground-react/node_modules/linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "node_modules/graphql-playground-react/node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", "dependencies": { - "uc.micro": "^1.0.1" + "react-is": "^16.7.0" } }, - "node_modules/graphql-playground-react/node_modules/markdown-it": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "node_modules/graphql-playground-react/node_modules/linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "entities": "~1.1.1", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" + "uc.micro": "^1.0.1" } }, - "node_modules/graphql-playground-react/node_modules/markdown-it/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, - "node_modules/graphql-playground-react/node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" - }, "node_modules/graphql-playground-react/node_modules/postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "license": "MIT" }, "node_modules/graphql-playground-react/node_modules/react": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -4757,6 +4938,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/react-codemirror/-/react-codemirror-1.0.0.tgz", "integrity": "sha512-pPvL8b1vwLyfX5f3EMLyqZVXYY/qAKdqURYxi3izYfjWbnUdqVaFBA7z78o9eEM+UzgxuKjI864BJkPIRVS2JA==", + "license": "MIT", "dependencies": { "classnames": "^2.2.5", "codemirror": "^5.18.2", @@ -4770,10 +4952,24 @@ "react-dom": ">=15.5 <16" } }, + "node_modules/graphql-playground-react/node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "license": "MIT", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/graphql-playground-react/node_modules/react-dom": { "version": "16.14.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -4788,6 +4984,7 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.2.tgz", "integrity": "sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw==", + "license": "MIT", "dependencies": { "prop-types": "^15.5.8" }, @@ -4795,10 +4992,42 @@ "react": "^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0" } }, + "node_modules/graphql-playground-react/node_modules/react-redux": { + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.15.4", + "@types/react-redux": "^7.1.20", + "hoist-non-react-statics": "^3.3.2", + "loose-envify": "^1.4.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "peerDependencies": { + "react": "^16.8.3 || ^17 || ^18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/graphql-playground-react/node_modules/react-redux/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "license": "MIT" + }, "node_modules/graphql-playground-react/node_modules/react-sortable-hoc": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-0.8.4.tgz", "integrity": "sha512-J9AFEQAJ7u2YWdVzkU5E3ewrG82xQ4xF1ZPrZYKliDwlVBDkmjri+iKFAEt6NCDIRiBZ4hiN5vzI8pwy/dGPHw==", + "license": "MIT", "dependencies": { "babel-runtime": "^6.11.6", "invariant": "^2.2.1", @@ -4812,12 +5041,14 @@ "node_modules/graphql-playground-react/node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT" }, "node_modules/graphql-playground-react/node_modules/scheduler": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -4828,6 +5059,7 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.4.1.tgz", "integrity": "sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g==", "hasInstallScript": true, + "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.0.0", @@ -4851,36 +5083,23 @@ "node_modules/graphql-playground-react/node_modules/stylis": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", - "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==", + "license": "MIT" }, "node_modules/graphql-playground-react/node_modules/stylis-rule-sheet": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==", + "license": "MIT", "peerDependencies": { "stylis": "^3.5.0" } }, - "node_modules/graphql-playground-react/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/graphql-playground-react/node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" - }, "node_modules/graphql-ws": { "version": "5.12.1", "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.12.1.tgz", "integrity": "sha512-umt4f5NnMK46ChM2coO36PTFhHouBrK9stWWBczERguwYrGnPNxJ9dimU6IyOBfOkC6Izhkg4H8+F51W/8CYDg==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -4892,6 +5111,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "license": "MIT", "dependencies": { "duplexer": "^0.1.1", "pify": "^4.0.1" @@ -4901,17 +5121,19 @@ } }, "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -4919,21 +5141,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4945,6 +5157,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -4956,6 +5169,7 @@ "version": "2.2.5", "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -4965,6 +5179,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "license": "MIT", "dependencies": { "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", @@ -4980,20 +5195,29 @@ "node_modules/hey-listen": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", - "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==", + "license": "MIT" }, "node_modules/highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "license": "BSD-3-Clause", "engines": { "node": "*" } }, + "node_modules/highlightjs-vue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", + "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==", + "license": "CC0-1.0" + }, "node_modules/history": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.1.2", "loose-envify": "^1.2.0", @@ -5007,39 +5231,29 @@ "version": "6.1.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.3.tgz", "integrity": "sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==", - "deprecated": "This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues." + "deprecated": "This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.", + "license": "BSD-3-Clause" }, "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==", + "license": "BSD-3-Clause" }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "license": "MIT", "engines": { "node": ">= 6.0.0" } }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -5051,40 +5265,30 @@ "node": ">= 0.8" } }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/http2-client": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", - "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", + "license": "MIT" }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", "dependencies": { - "agent-base": "6", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -5109,25 +5313,29 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/immutable": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", - "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==" + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "license": "MIT" }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -5143,6 +5351,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", "engines": { "node": ">=4" } @@ -5150,18 +5359,14 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "optional": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", "dependencies": { "loose-envify": "^1.0.0" } @@ -5170,6 +5375,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -5178,6 +5384,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5187,6 +5394,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "license": "MIT", "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" @@ -5199,12 +5407,14 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT" }, "node_modules/is-decimal": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5214,6 +5424,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5222,6 +5433,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { "node": ">=8" } @@ -5230,6 +5442,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -5241,6 +5454,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5250,6 +5464,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -5258,6 +5473,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -5265,15 +5481,11 @@ "node": ">=0.10.0" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" - }, "node_modules/is-primitive": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz", "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5282,6 +5494,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5289,17 +5502,20 @@ "node_modules/is-what": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", - "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "license": "MIT" }, "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5308,15 +5524,27 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", + "license": "MIT", "dependencies": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" } }, + "node_modules/isomorphic-fetch/node_modules/node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "license": "MIT", + "dependencies": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, "node_modules/isomorphic-ws": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", "peerDependencies": { "ws": "*" } @@ -5324,86 +5552,14 @@ "node_modules/iterall": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" - }, - "node_modules/jest-environment-jsdom": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", - "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "license": "MIT" }, "node_modules/jiti": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.1.tgz", "integrity": "sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw==", + "license": "MIT", "bin": { "jiti": "bin/jiti.js" } @@ -5411,12 +5567,14 @@ "node_modules/js-file-download": { "version": "0.4.12", "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", - "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==" + "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==", + "license": "MIT" }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5424,12 +5582,14 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -5438,70 +5598,29 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", - "dependencies": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" }, "node_modules/json-pointer": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "license": "MIT", "dependencies": { "foreach": "^2.0.4" } @@ -5509,14 +5628,23 @@ "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" }, "node_modules/json-stable-stringify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", - "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz", + "integrity": "sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA==", + "license": "MIT", "dependencies": { - "jsonify": "^0.0.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5526,6 +5654,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", "peer": true, "bin": { "json5": "lib/cli.js" @@ -5538,6 +5667,7 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "license": "Public Domain", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5545,50 +5675,60 @@ "node_modules/just-curry-it": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.2.1.tgz", - "integrity": "sha512-Q8206k8pTY7krW32cdmPsP+DqqLgWx/hYPSj9/+7SYqSqz7UuwPbfSe07lQtvuuaVyiSJveXk0E5RydOuWwsEg==" + "integrity": "sha512-Q8206k8pTY7krW32cdmPsP+DqqLgWx/hYPSj9/+7SYqSqz7UuwPbfSe07lQtvuuaVyiSJveXk0E5RydOuWwsEg==", + "license": "MIT" }, "node_modules/keycode": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz", - "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==" + "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==", + "license": "MIT" }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT" }, "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "license": "MIT", "dependencies": { - "uc.micro": "^2.0.0" + "uc.micro": "^1.0.1" } }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" }, "node_modules/lodash._getnative": { "version": "3.9.1", "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==" + "integrity": "sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==", + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "license": "MIT" }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "license": "MIT" }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -5600,6 +5740,7 @@ "version": "1.20.0", "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "license": "MIT", "dependencies": { "fault": "^1.0.0", "highlight.js": "~10.7.0" @@ -5610,65 +5751,83 @@ } }, "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "peer": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "license": "ISC", "dependencies": { - "yallist": "^3.0.2" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "license": "MIT" }, "node_modules/mark.js": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", - "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==" + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "license": "MIT" }, "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" }, "bin": { - "markdown-it": "bin/markdown-it.mjs" + "markdown-it": "bin/markdown-it.js" } }, "node_modules/markdown-it/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "license": "MIT", "bin": { - "marked": "bin/marked" + "marked": "bin/marked.js" }, "engines": { - "node": ">= 8.16.2" + "node": ">= 12" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" } }, "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "license": "MIT" }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5676,25 +5835,32 @@ "node_modules/memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", + "license": "MIT" }, "node_modules/merge-anything": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.4.tgz", "integrity": "sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ==", + "license": "MIT", "dependencies": { "is-what": "^3.3.1" } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", "engines": { "node": ">= 8" } @@ -5703,6 +5869,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/meros/-/meros-1.3.0.tgz", "integrity": "sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w==", + "license": "MIT", "engines": { "node": ">=13" }, @@ -5719,16 +5886,18 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -5739,6 +5908,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -5750,6 +5920,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5758,6 +5929,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -5765,22 +5937,11 @@ "node": ">= 0.6" } }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "optional": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/minim": { "version": "0.23.8", "resolved": "https://registry.npmjs.org/minim/-/minim-0.23.8.tgz", "integrity": "sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==", + "license": "MIT", "dependencies": { "lodash": "^4.15.0" }, @@ -5789,11 +5950,12 @@ } }, "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.3.tgz", + "integrity": "sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==", + "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { "node": ">=10" @@ -5803,6 +5965,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5811,6 +5974,7 @@ "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -5818,16 +5982,11 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "optional": true - }, "node_modules/mobx": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.12.3.tgz", - "integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw==", + "version": "6.13.6", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.13.6.tgz", + "integrity": "sha512-r19KNV0uBN4b+ER8Z0gA4y+MzDYIQ2SvOmn3fUrqPnWXdQfakd9yfbPBDBF/p5I+bd3N5Rk1fHONIvMay+bJGA==", + "license": "MIT", "peer": true, "funding": { "type": "opencollective", @@ -5835,19 +5994,20 @@ } }, "node_modules/mobx-react": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-7.6.0.tgz", - "integrity": "sha512-+HQUNuh7AoQ9ZnU6c4rvbiVVl+wEkb9WqYsVDzGLng+Dqj1XntHu79PvEWKtSMoMj67vFp/ZPXcElosuJO8ckA==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.0.tgz", + "integrity": "sha512-dkGWCx+S0/1mfiuFfHRH8D9cplmwhxOV5CkXMp38u6rQGG2Pv3FWYztS0M7ncR6TyPRQKaTG/pnitInoYE9Vrw==", + "license": "MIT", "dependencies": { - "mobx-react-lite": "^3.4.0" + "mobx-react-lite": "^4.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" }, "peerDependencies": { - "mobx": "^6.1.0", - "react": "^16.8.0 || ^17 || ^18" + "mobx": "^6.9.0", + "react": "^16.8.0 || ^17 || ^18 || ^19" }, "peerDependenciesMeta": { "react-dom": { @@ -5859,16 +6019,20 @@ } }, "node_modules/mobx-react-lite": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-3.4.3.tgz", - "integrity": "sha512-NkJREyFTSUXR772Qaai51BnE1voWx56LOL80xG7qkZr6vo8vEaLF3sz1JNUVh+rxmUzxYaqOhfuxTfqUh0FXUg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-4.1.0.tgz", + "integrity": "sha512-QEP10dpHHBeQNv1pks3WnHRCem2Zp636lq54M2nKO2Sarr13pL4u6diQXf65yzXUn0mkk18SyIDCm9UOJYTi1w==", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.4.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" }, "peerDependencies": { - "mobx": "^6.1.0", - "react": "^16.8.0 || ^17 || ^18" + "mobx": "^6.9.0", + "react": "^16.8.0 || ^17 || ^18 || ^19" }, "peerDependenciesMeta": { "react-dom": { @@ -5880,26 +6044,22 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/nan": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", - "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", - "optional": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -5908,36 +6068,39 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "optional": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/node-abi": { - "version": "3.63.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.63.0.tgz", - "integrity": "sha512-vAszCsOUrUxjGAmdnM/pq7gUgie0IRteCQMX6d4A534fQCR93EJU5qgzBvU6EkFfK27s0T3HEV3BOyJIr7OMYw==", - "optional": true, - "dependencies": { - "semver": "^7.3.5" - }, + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">= 10" } }, "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.3.0.tgz", + "integrity": "sha512-8VOpLHFrOQlAH+qA0ZzuGRlALRA6/LVh8QJldbrC4DY0hXoMP0l4Acq8TzFC018HztWiRqyCEj2aTWY2UvnJUg==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^18 || ^20 || >= 21" + } }, "node_modules/node-domexception": { "version": "1.0.0", @@ -5953,23 +6116,36 @@ "url": "https://paypal.me/jimmywarting" } ], + "license": "MIT", "engines": { "node": ">=10.5.0" } }, "node_modules/node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/node-fetch-commonjs": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/node-fetch-commonjs/-/node-fetch-commonjs-3.3.2.tgz", "integrity": "sha512-VBlAiynj3VMLrotgwOS3OyECFxas5y7ltLcK4t41lMUZeaK15Ym4QRkqN0EQKAFL42q9i21EPKjzLUPfltR72A==", + "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -5986,6 +6162,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "license": "MIT", "dependencies": { "http2-client": "^1.2.5" }, @@ -5996,12 +6173,26 @@ "node_modules/node-fingerprint": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/node-fingerprint/-/node-fingerprint-0.0.2.tgz", - "integrity": "sha512-vPFfTD5EBJieQ4SI3v61fWxlV1kav3m9Dbejd6CjWhOJn8s+XMxpOOosCNAyIrUQ/jJOlPndfrZ0lSw4+RgwcA==" + "integrity": "sha512-vPFfTD5EBJieQ4SI3v61fWxlV1kav3m9Dbejd6CjWhOJn8s+XMxpOOosCNAyIrUQ/jJOlPndfrZ0lSw4+RgwcA==", + "license": "MIT" + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } }, "node_modules/node-readfiles": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", + "license": "MIT", "dependencies": { "es6-promise": "^3.2.1" } @@ -6009,18 +6200,21 @@ "node_modules/node-readfiles/node_modules/es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "license": "MIT", "peer": true }, "node_modules/normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "license": "MIT", "dependencies": { "remove-trailing-separator": "^1.0.1" }, @@ -6031,17 +6225,14 @@ "node_modules/nullthrows": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", - "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==" - }, - "node_modules/nwsapi": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", - "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==" + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "license": "MIT" }, "node_modules/oas-kit-common": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "license": "BSD-3-Clause", "dependencies": { "fast-safe-stringify": "^2.0.7" } @@ -6050,6 +6241,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", + "license": "BSD-3-Clause", "dependencies": { "@exodus/schemasafe": "^1.0.0-rc.2", "should": "^13.2.1", @@ -6063,6 +6255,7 @@ "version": "2.5.6", "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", + "license": "BSD-3-Clause", "dependencies": { "node-fetch-h2": "^2.3.0", "oas-kit-common": "^1.0.8", @@ -6081,6 +6274,7 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "license": "BSD-3-Clause", "funding": { "url": "https://github.com/Mermade/oas-kit?sponsor=1" } @@ -6089,6 +6283,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "license": "BSD-3-Clause", "dependencies": { "call-me-maybe": "^1.0.1", "oas-kit-common": "^1.0.8", @@ -6107,22 +6302,37 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -6130,39 +6340,46 @@ "node": ">= 0.8" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "optional": true, - "dependencies": { - "wrappy": "1" - } - }, "node_modules/openapi-path-templating": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/openapi-path-templating/-/openapi-path-templating-1.5.1.tgz", - "integrity": "sha512-kgRHToVP571U1YzUnaZnWaUIygon2itg5g96kwaFIi8bnpsw4oXYOk7k59Ivn+ley1iQnMENe/1HSovpPVZuXA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/openapi-path-templating/-/openapi-path-templating-2.1.0.tgz", + "integrity": "sha512-fLs5eJmLyU8wPRz+JSH5uLE7TE4Ohg6VHOtj0C0AlD3GTCCcw2LgKW6MSN1A8ZBKHEg2O4/d02knmVU1nvGAKQ==", + "license": "Apache-2.0", "dependencies": { - "apg-lite": "^1.0.3" + "apg-lite": "^1.0.4" }, "engines": { "node": ">=12.20.0" } }, "node_modules/openapi-sampler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.5.1.tgz", - "integrity": "sha512-tIWIrZUKNAsbqf3bd9U1oH6JEXo8LNYuDlXw26By67EygpjT+ArFnsxxyTMjFWRfbqo5ozkvgSQDK69Gd8CddA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.6.1.tgz", + "integrity": "sha512-s1cIatOqrrhSj2tmJ4abFYZQK6l5v+V4toO5q1Pa0DyN8mtyqy2I+Qrj5W9vOELEtybIMQs/TBZGVO/DtTFK8w==", + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.7", + "fast-xml-parser": "^4.5.0", "json-pointer": "0.6.2" } }, + "node_modules/openapi-server-url-templating": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/openapi-server-url-templating/-/openapi-server-url-templating-1.3.0.tgz", + "integrity": "sha512-DPlCms3KKEbjVQb0spV6Awfn6UWNheuG/+folQPzh/wUaKwuqvj8zt5gagD7qoyxtE03cIiKPgLFS3Q8Bz00uQ==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.4" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "license": "(WTFPL OR MIT)", "bin": { "opener": "bin/opener-bin.js" } @@ -6171,6 +6388,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6185,6 +6403,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -6196,6 +6415,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "license": "MIT", "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -6213,6 +6433,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -6226,21 +6447,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6248,38 +6459,50 @@ "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", + "license": "MIT", "dependencies": { "isarray": "0.0.1" } }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/perfect-scrollbar": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", - "integrity": "sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==" + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.6.tgz", + "integrity": "sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==", + "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -6291,6 +6514,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "license": "MIT", "engines": { "node": ">=6" } @@ -6299,6 +6523,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", "engines": { "node": ">=4" } @@ -6307,6 +6532,7 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/polished/-/polished-4.3.1.tgz", "integrity": "sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.17.8" }, @@ -6318,6 +6544,7 @@ "version": "11.0.3", "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "license": "MIT", "dependencies": { "framesync": "6.0.1", "hey-listen": "^1.0.8", @@ -6325,10 +6552,16 @@ "tslib": "^2.1.0" } }, + "node_modules/popmotion/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "funding": [ { "type": "opencollective", @@ -6343,11 +6576,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -6357,38 +6591,14 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "license": "MIT", "peer": true }, - "node_modules/prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "optional": true, - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/prettier": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz", "integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==", + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -6396,39 +6606,11 @@ "node": ">=10.13.0" } }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -6437,6 +6619,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", "engines": { "node": ">= 0.6.0" } @@ -6445,6 +6628,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -6455,6 +6639,7 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "license": "MIT", "dependencies": { "xtend": "^4.0.0" }, @@ -6467,6 +6652,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -6478,59 +6664,74 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "optional": true, + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" } }, - "node_modules/punycode": { + "node_modules/psl/node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "license": "MIT" + }, "node_modules/punycode.js": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", "dependencies": { - "tslib": "^2.6.1" + "tslib": "^2.8.1" } }, + "node_modules/pvtsutils/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/pvutils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" }, @@ -6545,6 +6746,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "license": "MIT", "dependencies": { "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", @@ -6557,7 +6759,8 @@ "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -6576,21 +6779,24 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/ramda": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.30.0.tgz", - "integrity": "sha512-13Y0iMhIQuAm/wNGBL/9HEqIfRGmNmjKnTPlKWfA9f7dnDkr8d45wQ+S7+ZLh/Pq9PdcGxkqKUEA7ySu1QSd9Q==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.30.1.tgz", + "integrity": "sha512-tEF5I22zJnuclswcZMc8bDIrwRHRzf+NqVEmqg50ShAZMP7MWeR/RGDthfM/p+BlqvF2fXAzpn8i+SJcYD3alw==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/ramda" } }, "node_modules/ramda-adjunct": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-5.0.0.tgz", - "integrity": "sha512-iEehjqp/ZGjYZybZByDaDu27c+79SE7rKDcySLdmjAwKWkz6jNhvGgZwzUGaMsij8Llp9+1N1Gy0drpAq8ZSyA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-5.1.0.tgz", + "integrity": "sha512-8qCpl2vZBXEJyNbi4zqcgdfHtcdsWjOGbiNSEnEBrM6Y0OKOT8UxJbIVGm1TIcjaSu2MxaWcgtsNlKlCk7o7qg==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.3" }, @@ -6606,6 +6812,7 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "license": "MIT", "dependencies": { "drange": "^1.0.2", "ret": "^0.2.0" @@ -6618,6 +6825,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -6626,14 +6834,16 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -6644,28 +6854,11 @@ "node": ">= 0.8" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "optional": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6674,43 +6867,31 @@ "version": "15.6.3", "resolved": "https://registry.npmjs.org/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.3.tgz", "integrity": "sha512-EDJbgKTtGRLhr3wiGDXK/+AEJ59yqGS+tKE6mue0aNXT6ZMR7VJbbzIiT6akotmHg1BLj46ElJSb+NBMp80XBg==", + "license": "MIT", "dependencies": { "object-assign": "^4.1.0" } }, - "node_modules/react-copy-to-clipboard": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", - "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", - "dependencies": { - "copy-to-clipboard": "^3.3.1", - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "react": "^15.3.0 || 16 || 17 || 18" - } - }, - "node_modules/react-debounce-input": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", - "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", - "dependencies": { - "lodash.debounce": "^4", - "prop-types": "^15.8.1" - }, + "node_modules/react-compiler-runtime": { + "version": "19.0.0-beta-37ed2a7-20241206", + "resolved": "https://registry.npmjs.org/react-compiler-runtime/-/react-compiler-runtime-19.0.0-beta-37ed2a7-20241206.tgz", + "integrity": "sha512-9e6rCpVylr9EnVocgYAjft7+2v01BDpajeHKRoO+oc9pKcAMTpstHtHvE/TSVbyf4FvzCGjfKcfHM9XGTXI6Tw==", + "license": "MIT", "peerDependencies": { - "react": "^15.3.0 || 16 || 17 || 18" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/react-display-name": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/react-display-name/-/react-display-name-0.2.5.tgz", - "integrity": "sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg==" + "integrity": "sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg==", + "license": "MIT" }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -6722,12 +6903,14 @@ "node_modules/react-fast-compare": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", - "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==" + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==", + "license": "MIT" }, "node_modules/react-helmet": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.1.tgz", "integrity": "sha512-CnwD822LU8NDBnjCpZ4ySh8L6HYyngViTZLfBBb3NjtrpN8m49clH8hidHouq20I51Y6TpCTISCBbqiY5GamwA==", + "license": "MIT", "dependencies": { "object-assign": "^4.1.1", "prop-types": "^15.5.4", @@ -6742,6 +6925,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.2.0.tgz", "integrity": "sha512-v1ht1aHg5k/thv56DRcjw+WtojuuDHFUgGfc+bFHOWsF4ZK6C2V57DO0Or0GPsg6+LSTE0M6Ry/gfzhzSwbc5w==", + "license": "MIT", "dependencies": { "shallowequal": "^1.0.1" }, @@ -6753,6 +6937,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz", "integrity": "sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ==", + "license": "MIT", "dependencies": { "invariant": "^2.2.2" }, @@ -6764,94 +6949,59 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", + "license": "MIT", "peerDependencies": { "immutable": ">= 2 || >= 4.0.0-rc", "react": ">= 16.6", "react-dom": ">= 16.6" } }, - "node_modules/react-inspector": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", - "integrity": "sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==", - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "license": "MIT" }, "node_modules/react-modal": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", - "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", + "version": "3.16.3", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.3.tgz", + "integrity": "sha512-yCYRJB5YkeQDQlTt17WGAgFJ7jr2QYcWa1SHqZ3PluDmnKJ/7+tVU+E6uKyZ0nODaeEj+xCpK4LcSnKXLMC0Nw==", + "license": "MIT", "dependencies": { "exenv": "^1.2.0", "prop-types": "^15.7.2", "react-lifecycles-compat": "^3.0.0", "warning": "^4.0.3" }, - "engines": { - "node": ">=8" - }, "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", - "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18 || ^19", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18 || ^19" } }, - "node_modules/react-redux": { - "version": "7.2.9", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", - "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", - "dependencies": { - "@babel/runtime": "^7.15.4", - "@types/react-redux": "^7.1.20", - "hoist-non-react-statics": "^3.3.2", - "loose-envify": "^1.4.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - }, - "peerDependencies": { - "react": "^16.8.3 || ^17 || ^18" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, - "node_modules/react-redux/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, "node_modules/react-remove-scroll": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", - "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", + "license": "MIT", "dependencies": { - "react-remove-scroll-bar": "^2.3.3", - "react-style-singleton": "^2.2.1", + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6860,19 +7010,20 @@ } }, "node_modules/react-remove-scroll-bar": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz", - "integrity": "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", + "license": "MIT", "dependencies": { - "react-style-singleton": "^2.2.1", + "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -6880,10 +7031,23 @@ } } }, + "node_modules/react-remove-scroll-bar/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/react-remove-scroll/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/react-router": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "license": "MIT", "dependencies": { "history": "^4.7.2", "hoist-non-react-statics": "^2.5.0", @@ -6901,6 +7065,7 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz", "integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==", + "license": "MIT", "dependencies": { "history": "^4.7.2", "invariant": "^2.2.4", @@ -6913,26 +7078,21 @@ "react": ">=15" } }, - "node_modules/react-router/node_modules/hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" - }, "node_modules/react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", + "license": "MIT", "dependencies": { "get-nonce": "^1.0.0", - "invariant": "^2.2.4", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6940,13 +7100,21 @@ } } }, + "node_modules/react-style-singleton/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/react-syntax-highlighter": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", - "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz", + "integrity": "sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.3.1", "highlight.js": "^10.4.1", + "highlightjs-vue": "^1.0.0", "lowlight": "^1.17.0", "prismjs": "^1.27.0", "refractor": "^3.6.0" @@ -6956,21 +7124,32 @@ } }, "node_modules/react-tabs": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-4.3.0.tgz", - "integrity": "sha512-2GfoG+f41kiBIIyd3gF+/GRCCYtamC8/2zlAcD8cqQmqI9Q+YVz7fJLHMmU9pXDVYYHpJeCgUSBJju85vu5q8Q==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.0.tgz", + "integrity": "sha512-6QtbTRDKM+jA/MZTTefvigNxo0zz+gnBTVFw2CFVvq+f2BuH0nF0vDLNClL045nuTAdOoK/IL1vTP0ZLX0DAyQ==", + "license": "MIT", "dependencies": { - "clsx": "^1.1.0", + "clsx": "^2.0.0", "prop-types": "^15.5.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-0 || ^18.0.0" + "react": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/react-tabs/node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" } }, "node_modules/react-transition-group": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==", + "license": "BSD-3-Clause", "dependencies": { "dom-helpers": "^3.4.0", "loose-envify": "^1.4.0", @@ -6983,9 +7162,10 @@ } }, "node_modules/react-virtualized": { - "version": "9.22.5", - "resolved": "https://registry.npmjs.org/react-virtualized/-/react-virtualized-9.22.5.tgz", - "integrity": "sha512-YqQMRzlVANBv1L/7r63OHa2b0ZsAaDp1UhVNEdUaXI8A5u6hTpA5NYtUueLH2rFuY/27mTGIBl7ZhqFKzw18YQ==", + "version": "9.22.6", + "resolved": "https://registry.npmjs.org/react-virtualized/-/react-virtualized-9.22.6.tgz", + "integrity": "sha512-U5j7KuUQt3AaMatlMJ0UJddqSiX+Km0YJxSqbAzIiGw5EmNz0khMyqP2hzgu4+QUtm+QPIrxzUX4raJxmVJnHg==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.7.2", "clsx": "^1.0.4", @@ -6995,56 +7175,43 @@ "react-lifecycles-compat": "^3.0.4" }, "peerDependencies": { - "react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0", - "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0" + "react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/react-virtualized/node_modules/dom-helpers": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "optional": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/redoc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.1.4.tgz", - "integrity": "sha512-wqStZ9oPDTCmp2DMLqecxvxjltX4Bi2xfJiQq3+5Ty1g9Au7TGpJi9PPs42x7p/FxG8t+HlJ6xA7pXpWLZ+UyQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.4.0.tgz", + "integrity": "sha512-rFlfzFVWS9XJ6aYAs/bHnLhHP5FQEhwAHDBVgwb9L2FqDQ8Hu8rQ1G84iwaWXxZfPP9UWn7JdWkxI6MXr2ZDjw==", + "license": "MIT", "dependencies": { "@redocly/openapi-core": "^1.4.0", "classnames": "^2.3.2", "decko": "^1.2.0", "dompurify": "^3.0.6", "eventemitter3": "^5.0.1", - "jest-environment-jsdom": "^29.7.0", "json-pointer": "^0.6.2", "lunr": "^2.3.9", "mark.js": "^8.11.1", "marked": "^4.3.0", - "mobx-react": "^7.2.0", + "mobx-react": "^9.1.1", "openapi-sampler": "^1.5.0", "path-browserify": "^1.0.1", "perfect-scrollbar": "^1.5.5", "polished": "^4.2.2", "prismjs": "^1.29.0", "prop-types": "^15.8.1", - "react-tabs": "^4.3.0", + "react-tabs": "^6.0.2", "slugify": "~1.4.7", "stickyfill": "^1.1.1", "swagger2openapi": "^7.0.8", @@ -7057,31 +7224,22 @@ "peerDependencies": { "core-js": "^3.1.4", "mobx": "^6.0.4", - "react": "^16.8.4 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0", + "react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0", "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5" } }, - "node_modules/redoc/node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/reduce-reducers": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.4.3.tgz", - "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" + "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==", + "license": "MIT" }, "node_modules/redux": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.9.2" } @@ -7090,6 +7248,7 @@ "version": "2.6.5", "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.6.5.tgz", "integrity": "sha512-pFhEcWFTYNk7DhQgxMGnbsB1H2glqhQJRQrtPb96kD3hWiZRzXHwwmFPswg6V2MjraXRXWNmuP9P84tvdLAJmw==", + "license": "MIT", "dependencies": { "invariant": "^2.2.4", "just-curry-it": "^3.1.0", @@ -7102,6 +7261,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", + "license": "BSD-3-Clause", "peerDependencies": { "immutable": "^3.8.1 || ^4.0.0-rc.1" } @@ -7109,12 +7269,14 @@ "node_modules/redux-localstorage": { "version": "1.0.0-rc5", "resolved": "https://registry.npmjs.org/redux-localstorage/-/redux-localstorage-1.0.0-rc5.tgz", - "integrity": "sha512-7Vv82DGrsb3ncDJxpkEStVoT+qgI9UdrRc5Pl/l6rWsq4j1hQCyG7U+tiOsposeWgSRuqMQRyIe9scR8eED5tA==" + "integrity": "sha512-7Vv82DGrsb3ncDJxpkEStVoT+qgI9UdrRc5Pl/l6rWsq4j1hQCyG7U+tiOsposeWgSRuqMQRyIe9scR8eED5tA==", + "license": "MIT" }, "node_modules/redux-localstorage-debounce": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/redux-localstorage-debounce/-/redux-localstorage-debounce-0.1.0.tgz", "integrity": "sha512-1SMGRkUhsH3SHp2x1yse1/4FKIlqSjxvvDP63J7ike8vGI1lWRatG8gSRyhDDcfjNagvnzhoY57P36HcvFXFqw==", + "license": "MIT", "dependencies": { "lodash.debounce": "^3.1.1" } @@ -7123,6 +7285,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz", "integrity": "sha512-lcmJwMpdPAtChA4hfiwxTtgFeNAaow701wWUgVUqeD0XJF7vMXIN+bu/2FJSGxT0NUbZy9g9VFrlOFfPjl+0Ew==", + "license": "MIT", "dependencies": { "lodash._getnative": "^3.0.0" } @@ -7130,20 +7293,23 @@ "node_modules/redux-localstorage-filter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/redux-localstorage-filter/-/redux-localstorage-filter-0.1.1.tgz", - "integrity": "sha512-qWx0stDxleQJEO0M4n7DNCWb7VJa+FzOSpYaMPq6aUIYlmlQf9rc197+6uvbNsW3Jsc4G/SYrGPd9s8KQpP5pg==" + "integrity": "sha512-qWx0stDxleQJEO0M4n7DNCWb7VJa+FzOSpYaMPq6aUIYlmlQf9rc197+6uvbNsW3Jsc4G/SYrGPd9s8KQpP5pg==", + "license": "MIT" }, "node_modules/redux-saga": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.2.3.tgz", - "integrity": "sha512-HDe0wTR5nhd8Xr5xjGzoyTbdAw6rjy1GDplFt3JKtKN8/MnkQSRqK/n6aQQhpw5NI4ekDVOaW+w4sdxPBaCoTQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.3.0.tgz", + "integrity": "sha512-J9RvCeAZXSTAibFY0kGw6Iy4EdyDNW7k6Q+liwX+bsck7QVsU78zz8vpBRweEfANxnnlG/xGGeOvf6r8UXzNJQ==", + "license": "MIT", "dependencies": { - "@redux-saga/core": "^1.2.3" + "@redux-saga/core": "^1.3.0" } }, "node_modules/refractor": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", + "license": "MIT", "dependencies": { "hastscript": "^6.0.0", "parse-entities": "^2.0.0", @@ -7158,6 +7324,7 @@ "version": "1.27.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -7166,19 +7333,22 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "license": "BSD-3-Clause", "funding": { "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" }, "node_modules/remarkable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "license": "MIT", "dependencies": { "argparse": "^1.0.10", "autolinker": "^3.11.0" @@ -7193,12 +7363,14 @@ "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==" + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "license": "ISC" }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "license": "MIT", "engines": { "node": ">=0.10" } @@ -7207,6 +7379,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7215,6 +7388,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7222,17 +7396,20 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" }, "node_modules/reselect": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "license": "MIT" }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "license": "MIT", "engines": { "node": ">=8" } @@ -7240,12 +7417,14 @@ "node_modules/resolve-pathname": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", - "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "license": "MIT" }, "node_modules/ret": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "license": "MIT", "engines": { "node": ">=4" } @@ -7254,6 +7433,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -7277,6 +7457,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -7298,28 +7479,20 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } @@ -7327,24 +7500,24 @@ "node_modules/seamless-immutable": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/seamless-immutable/-/seamless-immutable-7.1.4.tgz", - "integrity": "sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A==" + "integrity": "sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A==", + "license": "BSD-3-Clause" }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "optional": true, + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "peer": true, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -7368,6 +7541,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -7375,17 +7549,23 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } }, "node_modules/serialize-error": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -7397,14 +7577,15 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" @@ -7414,6 +7595,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -7435,6 +7617,7 @@ "https://paypal.me/jonathanschlinkert", "https://jonschlinkert.dev/sponsor" ], + "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", "is-primitive": "^3.0.1" @@ -7446,12 +7629,14 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -7463,12 +7648,14 @@ "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "license": "MIT" }, "node_modules/short-unique-id": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/short-unique-id/-/short-unique-id-5.2.0.tgz", "integrity": "sha512-cMGfwNyfDZ/nzJ2k2M+ClthBIh//GlZl1JEf47Uoa9XR11bz8Pa2T2wQO4bVrRdH48LrIDWJahQziKo3MjhsWg==", + "license": "Apache-2.0", "bin": { "short-unique-id": "bin/short-unique-id", "suid": "bin/short-unique-id" @@ -7478,6 +7665,7 @@ "version": "13.2.3", "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "license": "MIT", "dependencies": { "should-equal": "^2.0.0", "should-format": "^3.0.3", @@ -7490,6 +7678,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "license": "MIT", "dependencies": { "should-type": "^1.4.0" } @@ -7498,6 +7687,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", + "license": "MIT", "dependencies": { "should-type": "^1.3.0", "should-type-adaptors": "^1.0.1" @@ -7506,12 +7696,14 @@ "node_modules/should-type": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==" + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", + "license": "MIT" }, "node_modules/should-type-adaptors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "license": "MIT", "dependencies": { "should-type": "^1.3.0", "should-util": "^1.0.0" @@ -7520,17 +7712,20 @@ "node_modules/should-util": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", - "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "license": "MIT" }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7539,55 +7734,64 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "optional": true + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "optional": true, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", "engines": { "node": ">=8" } @@ -7596,23 +7800,16 @@ "version": "1.4.7", "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.7.tgz", "integrity": "sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==", + "license": "MIT", "engines": { "node": ">=8.0.0" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": ">=0.10.0" @@ -7622,6 +7819,7 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -7630,23 +7828,14 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -7668,28 +7857,22 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "optional": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-env-interpolation": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz", - "integrity": "sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==" + "integrity": "sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==", + "license": "MIT" }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7703,6 +7886,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7710,34 +7894,40 @@ "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "optional": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "license": "MIT" }, "node_modules/style-mod": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==", + "license": "MIT", "peer": true }, "node_modules/style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "license": "MIT", "dependencies": { "hey-listen": "^1.0.8", "tslib": "^2.1.0" } }, + "node_modules/style-value-types/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/styled-components": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.11.tgz", - "integrity": "sha512-Ui0jXPzbp1phYij90h12ksljKGqF8ncGx+pjrNPsSPhbUUjWT2tD1FwGo2LF6USCnbrsIhNngDfodhxbegfEOA==", + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.15.tgz", + "integrity": "sha512-PpOTEztW87Ua2xbmLa7yssjNyUF9vE7wdldRfn1I2E6RTkqknkBYpj771OxM/xrvRGinLy2oysa7GOd7NcZZIA==", + "license": "MIT", "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", @@ -7745,7 +7935,7 @@ "@types/stylis": "4.2.5", "css-to-react-native": "3.2.0", "csstype": "3.1.3", - "postcss": "8.4.38", + "postcss": "8.4.49", "shallowequal": "1.1.0", "stylis": "4.3.2", "tslib": "2.6.2" @@ -7762,25 +7952,18 @@ "react-dom": ">= 16.8.0" } }, - "node_modules/styled-components/node_modules/@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", - "peer": true, - "dependencies": { - "@emotion/memoize": "^0.8.1" - } - }, - "node_modules/styled-components/node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "node_modules/styled-components/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "license": "0BSD", "peer": true }, "node_modules/stylis": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==", + "license": "MIT", "peer": true }, "node_modules/subscriptions-transport-ws": { @@ -7788,6 +7971,7 @@ "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.19.tgz", "integrity": "sha512-dxdemxFFB0ppCLg10FTtRqH/31FNRL1y1BQv8209MK5I4CwALb7iihQg+7p65lFcIl8MHatINWBLOqpgU4Kyyw==", "deprecated": "The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md", + "license": "MIT", "dependencies": { "backo2": "^1.0.2", "eventemitter3": "^3.1.0", @@ -7802,12 +7986,14 @@ "node_modules/subscriptions-transport-ws/node_modules/eventemitter3": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "license": "MIT" }, "node_modules/subscriptions-transport-ws/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", "engines": { "node": ">=8.3.0" }, @@ -7825,57 +8011,54 @@ } }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/swagger-client": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.28.1.tgz", - "integrity": "sha512-tt3/54GTImgOLrjzl83FZ+koJ7Kq6uuyBNS7mTpZeUQsBi2a/4IvqPcfY2qKhf7CFrbv6lzPm+MmSudrxU8J5g==", + "version": "3.34.0", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.34.0.tgz", + "integrity": "sha512-DQyg74J1XjpzmoOrSX0/x8OP7feeEzLTQ4ILe15TJ7oTXeC6XKQvnc5z59H5rW7vFxe+rkMlbzLCg/ri0w7Rag==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.22.15", - "@swagger-api/apidom-core": ">=1.0.0-alpha.3 <1.0.0-beta.0", - "@swagger-api/apidom-error": ">=1.0.0-alpha.1 <1.0.0-beta.0", - "@swagger-api/apidom-json-pointer": ">=1.0.0-alpha.3 <1.0.0-beta.0", - "@swagger-api/apidom-ns-openapi-3-1": ">=1.0.0-alpha.3 <1.0.0-beta.0", - "@swagger-api/apidom-reference": ">=1.0.0-alpha.3 <1.0.0-beta.0", - "cookie": "~0.6.0", + "@scarf/scarf": "=1.4.0", + "@swagger-api/apidom-core": ">=1.0.0-beta.11 <1.0.0-rc.0", + "@swagger-api/apidom-error": ">=1.0.0-beta.11 <1.0.0-rc.0", + "@swagger-api/apidom-json-pointer": ">=1.0.0-beta.11 <1.0.0-rc.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=1.0.0-beta.11 <1.0.0-rc.0", + "@swagger-api/apidom-reference": ">=1.0.0-beta.11 <1.0.0-rc.0", + "@swaggerexpert/cookie": "^1.4.1", "deepmerge": "~4.3.0", "fast-json-patch": "^3.0.0-1", - "is-plain-object": "^5.0.0", "js-yaml": "^4.1.0", + "neotraverse": "=0.6.18", "node-abort-controller": "^3.1.1", "node-fetch-commonjs": "^3.3.2", - "openapi-path-templating": "^1.5.1", - "qs": "^6.10.2", - "ramda-adjunct": "^5.0.0", - "traverse": "=0.6.8" + "openapi-path-templating": "^2.0.1", + "openapi-server-url-templating": "^1.2.0", + "ramda": "^0.30.1", + "ramda-adjunct": "^5.0.0" } }, "node_modules/swagger-client/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/swagger-client/node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "engines": { - "node": ">=0.10.0" - } + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/swagger-client/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -7884,17 +8067,19 @@ } }, "node_modules/swagger-ui": { - "version": "5.17.14", - "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-5.17.14.tgz", - "integrity": "sha512-z9pOymwowrgkoMKNsRSN6QjOyYrMAnc4iohEebnS/ELT5jjdB13Lu4f3Bl4+o2Mw5B6QOyo4vibr/A/Vb7UbMQ==", - "dependencies": { - "@babel/runtime-corejs3": "^7.24.5", - "@braintree/sanitize-url": "=7.0.2", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-5.18.3.tgz", + "integrity": "sha512-Jg+vnmVZA8N0hy8rJIu2So4UUhYkouahajoAiTN2zT6ihtcqkjUBCwnyWqMKz/plA70Hk59G3vPMF4roeSD3xw==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.24.7", + "@braintree/sanitize-url": "=7.0.4", + "@scarf/scarf": "=1.4.0", "base64-js": "^1.5.1", "classnames": "^2.5.1", "css.escape": "1.5.1", "deep-extend": "0.6.0", - "dompurify": "=3.1.4", + "dompurify": "=3.1.6", "ieee754": "^1.2.1", "immutable": "^3.x.x", "js-file-download": "^0.4.12", @@ -7915,10 +8100,10 @@ "redux": "^5.0.1", "redux-immutable": "^4.0.0", "remarkable": "^2.0.1", - "reselect": "^5.1.0", + "reselect": "^5.1.1", "serialize-error": "^8.1.0", "sha.js": "^2.4.11", - "swagger-client": "^3.28.1", + "swagger-client": "^3.34.0", "url-parse": "^1.5.10", "xml": "=1.0.1", "xml-but-prettier": "^1.0.1", @@ -7928,12 +8113,20 @@ "node_modules/swagger-ui/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/swagger-ui/node_modules/dompurify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz", + "integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==", + "license": "(MPL-2.0 OR Apache-2.0)" }, "node_modules/swagger-ui/node_modules/immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7942,6 +8135,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -7949,17 +8143,65 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/swagger-ui/node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/swagger-ui/node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "license": "MIT", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/swagger-ui/node_modules/react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "license": "MIT", + "dependencies": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/swagger-ui/node_modules/react-inspector": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", + "integrity": "sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/swagger-ui/node_modules/react-redux": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz", - "integrity": "sha512-0OA4dhM1W48l3uzmv6B7TXPCGmokUU4p1M44DGN2/D9a1FjVPukVjER1PcPX97jIg6aUeLq1XJo1IpfbgULn0w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz", + "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==", + "license": "MIT", "dependencies": { - "@types/use-sync-external-store": "^0.0.3", - "use-sync-external-store": "^1.0.0" + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" }, "peerDependencies": { - "@types/react": "^18.2.25", - "react": "^18.0", + "@types/react": "^18.2.25 || ^19", + "react": "^18.0 || ^19", "redux": "^5.0.0" }, "peerDependenciesMeta": { @@ -7974,17 +8216,20 @@ "node_modules/swagger-ui/node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", - "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" }, "node_modules/swagger-ui/node_modules/reselect": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.0.tgz", - "integrity": "sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg==" + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", + "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", + "license": "MIT" }, "node_modules/swagger2openapi": { "version": "7.0.8", "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", + "license": "BSD-3-Clause", "dependencies": { "call-me-maybe": "^1.0.1", "node-fetch": "^2.6.1", @@ -8007,120 +8252,47 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/swagger2openapi/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/swagger2openapi/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/swagger2openapi/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/swagger2openapi/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "optional": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "optional": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tiny-invariant": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", - "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" }, "node_modules/tiny-warning": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "license": "MIT" }, "node_modules/to-camel-case": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz", "integrity": "sha512-nD8pQi5H34kyu1QDMFjzEIYqk0xa9Alt6ZfrdEMuHCFOfTLhDG5pgTu/aAM9Wt9lXILwlXmWP43b8sav0GNE8Q==", + "license": "MIT", "dependencies": { "to-space-case": "^1.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "engines": { - "node": ">=4" - } - }, "node_modules/to-no-case": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", - "integrity": "sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==" + "integrity": "sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==", + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -8132,6 +8304,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", "integrity": "sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==", + "license": "MIT", "dependencies": { "to-no-case": "^1.0.0" } @@ -8139,140 +8312,95 @@ "node_modules/toggle-selection": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", - "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==", + "license": "MIT" }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/traverse": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", - "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, "node_modules/tree-sitter": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.4.tgz", - "integrity": "sha512-rjfR5dc4knG3jnJNN/giJ9WOoN1zL/kZyrS0ILh+eqq8RNcIbiXA63JsMEgluug0aNvfQvK4BfCErN1vIzvKog==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.1.tgz", + "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", "hasInstallScript": true, + "license": "MIT", "optional": true, + "peer": true, "dependencies": { - "nan": "^2.17.0", - "prebuild-install": "^7.1.1" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" } }, "node_modules/tree-sitter-json": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.20.2.tgz", - "integrity": "sha512-eUxrowp4F1QEGk/i7Sa+Xl8Crlfp7J0AXxX1QdJEQKQYMWhgMbCIgyQvpO3Q0P9oyTrNQxRLlRipDS44a8EtRw==", + "version": "0.24.8", + "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.24.8.tgz", + "integrity": "sha512-Tc9ZZYwHyWZ3Tt1VEw7Pa2scu1YO7/d2BCBbKTx5hXwig3UfdQjsOPkPyLpDJOn/m1UBEWYAtSdGAwCSyagBqQ==", "hasInstallScript": true, + "license": "MIT", "optional": true, "dependencies": { - "nan": "^2.18.0" - } - }, - "node_modules/tree-sitter-yaml": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/tree-sitter-yaml/-/tree-sitter-yaml-0.5.0.tgz", - "integrity": "sha512-POJ4ZNXXSWIG/W4Rjuyg36MkUD4d769YRUGKRqN+sVaj/VCo6Dh6Pkssn1Rtewd5kybx+jT1BWMyWN0CijXnMA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "nan": "^2.14.0" + "node-addon-api": "^8.2.2", + "node-gyp-build": "^4.8.2" + }, + "peerDependencies": { + "tree-sitter": "^0.21.1" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } } }, "node_modules/tryer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", - "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "license": "MIT" }, "node_modules/ts-invariant": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz", "integrity": "sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==", + "license": "MIT", "dependencies": { "tslib": "^1.9.3" } }, - "node_modules/ts-invariant/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/ts-mixer": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", - "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", + "license": "MIT" }, "node_modules/ts-toolbelt": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", - "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==" + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "license": "Apache-2.0" }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "optional": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -8284,6 +8412,7 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -8293,9 +8422,10 @@ } }, "node_modules/types-ramda": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.30.0.tgz", - "integrity": "sha512-oVPw/KHB5M0Du0txTEKKM8xZOG9cZBRdCVXvwHYuNJUVkAiJ9oWyqkA+9Bj2gjMsHgkkhsYevobQBWs8I2/Xvw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.30.1.tgz", + "integrity": "sha512-1HTsf5/QVRmLzcGfldPFvkVsAdi1db1BBKzi7iW3KBUlOICg/nKnFS+jGqDJS3YD8VsWbAh7JiHeBvbsw8RPxA==", + "license": "MIT", "dependencies": { "ts-toolbelt": "^9.6.0" } @@ -8304,6 +8434,7 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", + "license": "MIT", "dependencies": { "typescript-logic": "^0.0.0" } @@ -8311,33 +8442,35 @@ "node_modules/typescript-logic": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", - "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==" + "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", + "license": "MIT" }, "node_modules/typescript-tuple": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", + "license": "MIT", "dependencies": { "typescript-compare": "^0.0.2" } }, "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "license": "MIT" }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "engines": { - "node": ">= 4.0.0" - } + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" }, "node_modules/unixify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unixify/-/unixify-1.0.0.tgz", "integrity": "sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==", + "license": "MIT", "dependencies": { "normalize-path": "^2.1.1" }, @@ -8349,6 +8482,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -8356,12 +8490,13 @@ "node_modules/unraw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unraw/-/unraw-3.0.0.tgz", - "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==" + "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==", + "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "funding": [ { "type": "opencollective", @@ -8376,10 +8511,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -8388,18 +8524,17 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "license": "MIT" }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -8408,17 +8543,20 @@ "node_modules/url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" + "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", + "license": "BSD" }, "node_modules/urlpattern-polyfill": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==" + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "license": "MIT" }, "node_modules/use-callback-ref": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", - "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -8426,8 +8564,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -8435,10 +8573,17 @@ } } }, + "node_modules/use-callback-ref/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "license": "MIT", "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" @@ -8447,8 +8592,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -8456,24 +8601,26 @@ } } }, + "node_modules/use-sidecar/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/use-sync-external-store": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", - "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", + "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==", + "license": "MIT", "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "optional": true - }, "node_modules/utility-types": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-1.1.0.tgz", "integrity": "sha512-6PGyowB/ZDDAygpdZzdLu/9mn2EMf08/V1OOqTTc5EhADgd+/BQhinslzhD9xTVw3EWYa1jI3aBMZy5neBbSfw==", + "license": "MIT", "engines": { "node": ">= 4" } @@ -8482,6 +8629,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -8489,12 +8637,14 @@ "node_modules/value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", - "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "license": "MIT" }, "node_modules/value-or-promise": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "license": "MIT", "engines": { "node": ">=12" } @@ -8503,36 +8653,29 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" }, "node_modules/w3c-keyname": { "version": "2.2.8", "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT", "peer": true }, - "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "license": "MIT", "dependencies": { "loose-envify": "^1.0.0" } @@ -8541,40 +8684,48 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/web-tree-sitter": { - "version": "0.20.3", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.3.tgz", - "integrity": "sha512-zKGJW9r23y3BcJusbgvnOH2OYAW40MXAOi9bi3Gcc7T4Gms9WWgXF8m6adsJWpGJEhgOzCrfiz1IzKowJWrtYw==", + "version": "0.24.5", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.24.5.tgz", + "integrity": "sha512-+J/2VSHN8J47gQUAvF8KDadrfz6uFYVjxoxbKWDoXVsH2u7yLdarCnIURnrMA6uSRkgX3SdmqM5BOoQjPdSh5w==", + "license": "MIT", "optional": true }, "node_modules/webcrypto-core": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", - "integrity": "sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.1.tgz", + "integrity": "sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==", + "license": "MIT", "dependencies": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.13", "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "asn1js": "^3.0.5", + "pvtsutils": "^1.3.5", + "tslib": "^2.7.0" } }, + "node_modules/webcrypto-core/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "engines": { - "node": ">=12" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" }, "node_modules/webpack-bundle-analyzer": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.9.0.tgz", "integrity": "sha512-Ob8amZfCm3rMB1ScjQVlbYYUEJyEjdEtQ92jqiFUYt5VkEeO2v5UMbv49P/gnmCZm3A6yaFQzCBvpZqN4MUsdA==", + "license": "MIT", "dependencies": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1", @@ -8597,148 +8748,36 @@ "node": ">= 6.14.4" } }, - "node_modules/webpack-bundle-analyzer/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/webpack-bundle-analyzer/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", + "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", + "license": "MIT", "dependencies": { "async-limiter": "~1.0.0" } }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/whatwg-fetch": { - "version": "3.6.19", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz", - "integrity": "sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==" - }, - "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "engines": { - "node": ">=12" - } + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "license": "MIT" }, "node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -8751,16 +8790,44 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "optional": true + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -8780,33 +8847,23 @@ "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==" + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "license": "MIT" }, "node_modules/xml-but-prettier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml-but-prettier/-/xml-but-prettier-1.0.1.tgz", "integrity": "sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==", + "license": "MIT", "dependencies": { "repeat-string": "^1.5.2" } }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", "engines": { "node": ">=0.4" } @@ -8815,20 +8872,22 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "peer": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "license": "ISC", "engines": { "node": ">= 6" } @@ -8836,12 +8895,14 @@ "node_modules/yaml-ast-parser": { "version": "0.0.43", "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==" + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "license": "Apache-2.0" }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -8859,6 +8920,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "engines": { "node": ">=12" } @@ -8867,6 +8929,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -8877,31 +8940,30 @@ "node_modules/zen-observable": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.7.1.tgz", - "integrity": "sha512-OI6VMSe0yeqaouIXtedC+F55Sr6r9ppS7+wTbSexkYdHbdt4ctTuPNXP/rwm7GTVI63YBc+EBT0b0tl7YnJLRg==" + "integrity": "sha512-OI6VMSe0yeqaouIXtedC+F55Sr6r9ppS7+wTbSexkYdHbdt4ctTuPNXP/rwm7GTVI63YBc+EBT0b0tl7YnJLRg==", + "license": "MIT" }, "node_modules/zen-observable-ts": { "version": "0.8.21", "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz", "integrity": "sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg==", + "license": "MIT", "dependencies": { "tslib": "^1.9.3", "zen-observable": "^0.8.0" } }, - "node_modules/zen-observable-ts/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/zen-observable-ts/node_modules/zen-observable": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", - "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" + "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==", + "license": "MIT" }, "node_modules/zenscroll": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", - "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==" + "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==", + "license": "Unlicense" } } } diff --git a/src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css b/src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css index 747609daf22..46a80ff9004 100644 --- a/src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css +++ b/src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css @@ -5,7 +5,7 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-cyrillic-ext-400-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-ext-400-normal.woff) format('woff'); - unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; + unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; } /* open-sans-cyrillic-400-normal */ @@ -45,7 +45,7 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-hebrew-400-normal.woff2) format('woff2'), url(./files/open-sans-hebrew-400-normal.woff) format('woff'); - unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; + unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; } /* open-sans-math-400-normal */ @@ -55,7 +55,7 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-math-400-normal.woff2) format('woff2'), url(./files/open-sans-math-400-normal.woff) format('woff'); - unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0330,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2034-2037,U+2057,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2102,U+210A-210E,U+2110-2112,U+2115,U+2119-211D,U+2124,U+2128,U+212C-212D,U+212F-2131,U+2133-2138,U+213C-2140,U+2145-2149,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B6,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF; + unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF; } /* open-sans-symbols-400-normal */ @@ -65,7 +65,7 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-symbols-400-normal.woff2) format('woff2'), url(./files/open-sans-symbols-400-normal.woff) format('woff'); - unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8B1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA88,U+1FA90-1FABD,U+1FABF-1FAC5,U+1FACE-1FADB,U+1FAE0-1FAE8,U+1FAF0-1FAF8,U+1FB00-1FBFF; + unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB00-1FBFF; } /* open-sans-vietnamese-400-normal */ @@ -85,7 +85,7 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-latin-ext-400-normal.woff2) format('woff2'), url(./files/open-sans-latin-ext-400-normal.woff) format('woff'); - unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; + unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; } /* open-sans-latin-400-normal */ @@ -95,5 +95,5 @@ font-display: swap; font-weight: 400; src: url(./files/open-sans-latin-400-normal.woff2) format('woff2'), url(./files/open-sans-latin-400-normal.woff) format('woff'); - unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; + unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; } \ No newline at end of file diff --git a/src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css b/src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css index ee4ec1fb0d3..bcdad62528d 100644 --- a/src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css +++ b/src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css @@ -5,7 +5,7 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-cyrillic-ext-700-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-ext-700-normal.woff) format('woff'); - unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; + unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; } /* open-sans-cyrillic-700-normal */ @@ -45,7 +45,7 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-hebrew-700-normal.woff2) format('woff2'), url(./files/open-sans-hebrew-700-normal.woff) format('woff'); - unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; + unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; } /* open-sans-math-700-normal */ @@ -55,7 +55,7 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-math-700-normal.woff2) format('woff2'), url(./files/open-sans-math-700-normal.woff) format('woff'); - unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0330,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2034-2037,U+2057,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2102,U+210A-210E,U+2110-2112,U+2115,U+2119-211D,U+2124,U+2128,U+212C-212D,U+212F-2131,U+2133-2138,U+213C-2140,U+2145-2149,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B6,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF; + unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF; } /* open-sans-symbols-700-normal */ @@ -65,7 +65,7 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-symbols-700-normal.woff2) format('woff2'), url(./files/open-sans-symbols-700-normal.woff) format('woff'); - unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8B1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA88,U+1FA90-1FABD,U+1FABF-1FAC5,U+1FACE-1FADB,U+1FAE0-1FAE8,U+1FAF0-1FAF8,U+1FB00-1FBFF; + unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB00-1FBFF; } /* open-sans-vietnamese-700-normal */ @@ -85,7 +85,7 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-latin-ext-700-normal.woff2) format('woff2'), url(./files/open-sans-latin-ext-700-normal.woff) format('woff'); - unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; + unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; } /* open-sans-latin-700-normal */ @@ -95,5 +95,5 @@ font-display: swap; font-weight: 700; src: url(./files/open-sans-latin-700-normal.woff2) format('woff2'), url(./files/open-sans-latin-700-normal.woff) format('woff'); - unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; + unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; } \ No newline at end of file diff --git a/src/Symfony/Bundle/Resources/public/graphiql/graphiql.css b/src/Symfony/Bundle/Resources/public/graphiql/graphiql.css index e99012ff6f5..31de30fda19 100644 --- a/src/Symfony/Bundle/Resources/public/graphiql/graphiql.css +++ b/src/Symfony/Bundle/Resources/public/graphiql/graphiql.css @@ -339,7 +339,2012 @@ /*!********************************************************************************************!*\ !*** css ../../../node_modules/css-loader/dist/cjs.js!../../graphiql-react/dist/style.css ***! \********************************************************************************************/ -.graphiql-container *{box-sizing:border-box;font-variant-ligatures:none}.graphiql-container,.CodeMirror-info,.CodeMirror-lint-tooltip,.graphiql-dialog,.graphiql-dialog-overlay,.graphiql-tooltip,[data-radix-popper-content-wrapper]{--color-primary: 320, 95%, 43%;--color-secondary: 242, 51%, 61%;--color-tertiary: 188, 100%, 36%;--color-info: 208, 100%, 46%;--color-success: 158, 60%, 42%;--color-warning: 36, 100%, 41%;--color-error: 13, 93%, 58%;--color-neutral: 219, 28%, 32%;--color-base: 219, 28%, 100%;--alpha-secondary: .76;--alpha-tertiary: .5;--alpha-background-heavy: .15;--alpha-background-medium: .1;--alpha-background-light: .07;--font-family: "Roboto", sans-serif;--font-family-mono: "Fira Code", monospace;--font-size-hint:.75rem;--font-size-inline-code:.8125rem;--font-size-body:.9375rem;--font-size-h4:1.125rem;--font-size-h3:1.375rem;--font-size-h2:1.8125rem;--font-weight-regular: 400;--font-weight-medium: 500;--line-height: 1.5;--px-2: 2px;--px-4: 4px;--px-6: 6px;--px-8: 8px;--px-10: 10px;--px-12: 12px;--px-16: 16px;--px-20: 20px;--px-24: 24px;--border-radius-2: 2px;--border-radius-4: 4px;--border-radius-8: 8px;--border-radius-12: 12px;--popover-box-shadow: 0px 6px 20px rgba(59, 76, 106, .13), 0px 1.34018px 4.46726px rgba(59, 76, 106, .0774939), 0px .399006px 1.33002px rgba(59, 76, 106, .0525061);--popover-border: none;--sidebar-width: 60px;--toolbar-width: 40px;--session-header-height: 51px}@media (prefers-color-scheme: dark){body:not(.graphiql-light) .graphiql-container,body:not(.graphiql-light) .CodeMirror-info,body:not(.graphiql-light) .CodeMirror-lint-tooltip,body:not(.graphiql-light) .graphiql-dialog,body:not(.graphiql-light) .graphiql-dialog-overlay,body:not(.graphiql-light) .graphiql-tooltip,body:not(.graphiql-light) [data-radix-popper-content-wrapper]{--color-primary: 338, 100%, 67%;--color-secondary: 243, 100%, 77%;--color-tertiary: 188, 100%, 44%;--color-info: 208, 100%, 72%;--color-success: 158, 100%, 42%;--color-warning: 30, 100%, 80%;--color-error: 13, 100%, 58%;--color-neutral: 219, 29%, 78%;--color-base: 219, 29%, 18%;--popover-box-shadow: none;--popover-border: 1px solid hsl(var(--color-neutral))}}body.graphiql-dark .graphiql-container,body.graphiql-dark .CodeMirror-info,body.graphiql-dark .CodeMirror-lint-tooltip,body.graphiql-dark .graphiql-dialog,body.graphiql-dark .graphiql-dialog-overlay,body.graphiql-dark .graphiql-tooltip,body.graphiql-dark [data-radix-popper-content-wrapper]{--color-primary: 338, 100%, 67%;--color-secondary: 243, 100%, 77%;--color-tertiary: 188, 100%, 44%;--color-info: 208, 100%, 72%;--color-success: 158, 100%, 42%;--color-warning: 30, 100%, 80%;--color-error: 13, 100%, 58%;--color-neutral: 219, 29%, 78%;--color-base: 219, 29%, 18%;--popover-box-shadow: none;--popover-border: 1px solid hsl(var(--color-neutral))}.graphiql-container,.CodeMirror-info,.CodeMirror-lint-tooltip,.graphiql-dialog,.graphiql-container:is(button),.CodeMirror-info:is(button),.CodeMirror-lint-tooltip:is(button),.graphiql-dialog:is(button){color:hsla(var(--color-neutral),1);font-family:var(--font-family);font-size:var(--font-size-body);font-weight:var(----font-weight-regular);line-height:var(--line-height)}.graphiql-container input,.CodeMirror-info input,.CodeMirror-lint-tooltip input,.graphiql-dialog input{color:hsla(var(--color-neutral),1);font-family:var(--font-family);font-size:var(--font-size-caption)}.graphiql-container input::placeholder,.CodeMirror-info input::placeholder,.CodeMirror-lint-tooltip input::placeholder,.graphiql-dialog input::placeholder{color:hsla(var(--color-neutral),var(--alpha-secondary))}.graphiql-container a,.CodeMirror-info a,.CodeMirror-lint-tooltip a,.graphiql-dialog a{color:hsl(var(--color-primary))}.graphiql-container a:focus,.CodeMirror-info a:focus,.CodeMirror-lint-tooltip a:focus,.graphiql-dialog a:focus{outline:hsl(var(--color-primary)) auto 1px}.graphiql-un-styled,button.graphiql-un-styled{all:unset;border-radius:var(--border-radius-4);cursor:pointer}:is(.graphiql-un-styled,button.graphiql-un-styled):hover{background-color:hsla(var(--color-neutral),var(--alpha-background-light))}:is(.graphiql-un-styled,button.graphiql-un-styled):active{background-color:hsla(var(--color-neutral),var(--alpha-background-medium))}:is(.graphiql-un-styled,button.graphiql-un-styled):focus{outline:hsla(var(--color-neutral),var(--alpha-background-heavy)) auto 1px}.graphiql-button,button.graphiql-button{background-color:hsla(var(--color-neutral),var(--alpha-background-light));border:none;border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),1);cursor:pointer;font-size:var(--font-size-body);padding:var(--px-8) var(--px-12)}:is(.graphiql-button,button.graphiql-button):hover,:is(.graphiql-button,button.graphiql-button):active{background-color:hsla(var(--color-neutral),var(--alpha-background-medium))}:is(.graphiql-button,button.graphiql-button):focus{outline:hsla(var(--color-neutral),var(--alpha-background-heavy)) auto 1px}.graphiql-button-success:is(.graphiql-button,button.graphiql-button){background-color:hsla(var(--color-success),var(--alpha-background-heavy))}.graphiql-button-error:is(.graphiql-button,button.graphiql-button){background-color:hsla(var(--color-error),var(--alpha-background-heavy))}.graphiql-button-group{background-color:hsla(var(--color-neutral),var(--alpha-background-light));border-radius:calc(var(--border-radius-4) + var(--px-4));display:flex;padding:var(--px-4)}.graphiql-button-group>button.graphiql-button{background-color:transparent}.graphiql-button-group>button.graphiql-button:hover{background-color:hsla(var(--color-neutral),var(--alpha-background-light))}.graphiql-button-group>button.graphiql-button.active{background-color:hsl(var(--color-base));cursor:default}.graphiql-button-group>*+*{margin-left:var(--px-8)}.graphiql-dialog-overlay{position:fixed;inset:0;background-color:hsla(var(--color-neutral),var(--alpha-background-heavy));z-index:10}.graphiql-dialog{background-color:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-12);box-shadow:var(--popover-box-shadow);margin:0;max-height:80vh;max-width:80vw;overflow:auto;padding:0;width:unset;transform:translate(-50%,-50%);top:50%;left:50%;position:fixed;z-index:10}.graphiql-dialog-close>svg{color:hsla(var(--color-neutral),var(--alpha-secondary));display:block;height:var(--px-12);padding:var(--px-12);width:var(--px-12)}.graphiql-dropdown-content{background-color:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-8);box-shadow:var(--popover-box-shadow);font-size:inherit;max-width:250px;padding:var(--px-4);font-family:var(--font-family);color:hsl(var(--color-neutral));max-height:min(calc(var(--radix-dropdown-menu-content-available-height) - 10px),400px);overflow-y:scroll}.graphiql-dropdown-item{border-radius:var(--border-radius-4);font-size:inherit;margin:var(--px-4);overflow:hidden;padding:var(--px-6) var(--px-8);text-overflow:ellipsis;white-space:nowrap;outline:none;cursor:pointer;line-height:var(--line-height)}.graphiql-dropdown-item[data-selected],.graphiql-dropdown-item[data-current-nav],.graphiql-dropdown-item:hover{background-color:hsla(var(--color-neutral),var(--alpha-background-light));color:inherit}.graphiql-dropdown-item:not(:first-child){margin-top:0}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) blockquote{margin-left:0;margin-right:0;padding-left:var(--px-8)}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code,:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre{border-radius:var(--border-radius-4);font-family:var(--font-family-mono);font-size:var(--font-size-inline-code)}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code{padding:var(--px-2)}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre{overflow:auto;padding:var(--px-6) var(--px-8)}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre code{background-color:initial;border-radius:0;padding:0}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol,:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul{padding-left:var(--px-16)}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol{list-style-type:decimal}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul{list-style-type:disc}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) img{border-radius:var(--border-radius-4);max-height:120px;max-width:100%}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation)>:first-child{margin-top:0}:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation)>:last-child{margin-bottom:0}:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a{color:hsl(var(--color-primary));text-decoration:none}:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a:hover{text-decoration:underline}:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) blockquote{border-left:1.5px solid hsla(var(--color-neutral),var(--alpha-tertiary))}:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) code,:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) pre{background-color:hsla(var(--color-neutral),var(--alpha-background-light));color:hsla(var(--color-neutral),1)}:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description)>*{margin:var(--px-12) 0}:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) a{color:hsl(var(--color-warning));text-decoration:underline}:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) blockquote{border-left:1.5px solid hsl(var(--color-warning))}:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) code,:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) pre{background-color:hsla(var(--color-warning),var(--alpha-background-heavy))}:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation)>*{margin:var(--px-8) 0}.graphiql-markdown-preview>:not(:first-child){display:none}.CodeMirror-hint-information-deprecation,.CodeMirror-info .info-deprecation{background-color:hsla(var(--color-warning),var(--alpha-background-light));border:1px solid hsl(var(--color-warning));border-radius:var(--border-radius-4);color:hsl(var(--color-warning));margin-top:var(--px-12);padding:var(--px-6) var(--px-8)}.CodeMirror-hint-information-deprecation-label,.CodeMirror-info .info-deprecation-label{font-size:var(--font-size-hint);font-weight:var(--font-weight-medium)}.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation-reason{margin-top:var(--px-6)}.graphiql-spinner{height:56px;margin:auto;margin-top:var(--px-16);width:56px}.graphiql-spinner:after{animation:rotation .8s linear 0s infinite;border:4px solid transparent;border-radius:100%;border-top:4px solid hsla(var(--color-neutral),var(--alpha-tertiary));content:"";display:inline-block;height:46px;vertical-align:middle;width:46px}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.graphiql-tooltip{background:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-4);box-shadow:var(--popover-box-shadow);color:hsl(var(--color-neutral));font-size:inherit;padding:var(--px-4) var(--px-6);font-family:var(--font-family)}.graphiql-tabs{display:flex;align-items:center;overflow-x:auto;padding:var(--px-12)}.graphiql-tabs>:not(:first-child){margin-left:var(--px-12)}.graphiql-tab{align-items:stretch;border-radius:var(--border-radius-8);color:hsla(var(--color-neutral),var(--alpha-secondary));display:flex}.graphiql-tab>button.graphiql-tab-close{visibility:hidden}.graphiql-tab.graphiql-tab-active>button.graphiql-tab-close,.graphiql-tab:hover>button.graphiql-tab-close,.graphiql-tab:focus-within>button.graphiql-tab-close{visibility:unset}.graphiql-tab.graphiql-tab-active{background-color:hsla(var(--color-neutral),var(--alpha-background-heavy));color:hsla(var(--color-neutral),1)}button.graphiql-tab-button{padding:var(--px-4) 0 var(--px-4) var(--px-8)}button.graphiql-tab-close{align-items:center;display:flex;padding:var(--px-4) var(--px-8)}button.graphiql-tab-close>svg{height:var(--px-8);width:var(--px-8)}.graphiql-history-header{font-size:var(--font-size-h2);font-weight:var(--font-weight-medium);display:flex;justify-content:space-between;align-items:center}.graphiql-history-header button{font-size:var(--font-size-inline-code);padding:var(--px-6) var(--px-10)}.graphiql-history-items{margin:var(--px-16) 0 0;list-style:none;padding:0}.graphiql-history-item{border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),var(--alpha-secondary));display:flex;font-size:var(--font-size-inline-code);font-family:var(--font-family-mono);height:34px}.graphiql-history-item:hover{color:hsla(var(--color-neutral),1);background-color:hsla(var(--color-neutral),var(--alpha-background-light))}.graphiql-history-item:not(:first-child){margin-top:var(--px-4)}.graphiql-history-item.editable{background-color:hsla(var(--color-primary),var(--alpha-background-medium))}.graphiql-history-item.editable>input{background:transparent;border:none;flex:1;margin:0;outline:none;padding:0 var(--px-10);width:100%}.graphiql-history-item.editable>input::placeholder{color:hsla(var(--color-neutral),var(--alpha-secondary))}.graphiql-history-item.editable>button{color:hsl(var(--color-primary));padding:0 var(--px-10)}.graphiql-history-item.editable>button:active{background-color:hsla(var(--color-primary),var(--alpha-background-heavy))}.graphiql-history-item.editable>button:focus{outline:hsl(var(--color-primary)) auto 1px}.graphiql-history-item.editable>button>svg{display:block}button.graphiql-history-item-label{flex:1;padding:var(--px-8) var(--px-10);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button.graphiql-history-item-action{align-items:center;color:hsla(var(--color-neutral),var(--alpha-secondary));display:flex;padding:var(--px-8) var(--px-6)}button.graphiql-history-item-action:hover{color:hsla(var(--color-neutral),1)}button.graphiql-history-item-action>svg{height:14px;width:14px}.graphiql-history-item-spacer{height:var(--px-16)}.graphiql-doc-explorer-default-value{color:hsl(var(--color-success))}a.graphiql-doc-explorer-type-name{color:hsl(var(--color-warning));text-decoration:none}a.graphiql-doc-explorer-type-name:hover{text-decoration:underline}a.graphiql-doc-explorer-type-name:focus{outline:hsl(var(--color-warning)) auto 1px}.graphiql-doc-explorer-argument>*+*{margin-top:var(--px-12)}.graphiql-doc-explorer-argument-name{color:hsl(var(--color-secondary))}.graphiql-doc-explorer-argument-deprecation{background-color:hsla(var(--color-warning),var(--alpha-background-light));border:1px solid hsl(var(--color-warning));border-radius:var(--border-radius-4);color:hsl(var(--color-warning));padding:var(--px-8)}.graphiql-doc-explorer-argument-deprecation-label{font-size:var(--font-size-hint);font-weight:var(--font-weight-medium)}.graphiql-doc-explorer-deprecation{background-color:hsla(var(--color-warning),var(--alpha-background-light));border:1px solid hsl(var(--color-warning));border-radius:var(--px-4);color:hsl(var(--color-warning));padding:var(--px-8)}.graphiql-doc-explorer-deprecation-label{font-size:var(--font-size-hint);font-weight:var(--font-weight-medium)}.graphiql-doc-explorer-directive{color:hsl(var(--color-secondary))}.graphiql-doc-explorer-section-title{align-items:center;display:flex;font-size:var(--font-size-hint);font-weight:var(--font-weight-medium);line-height:1}.graphiql-doc-explorer-section-title>svg{height:var(--px-16);margin-right:var(--px-8);width:var(--px-16)}.graphiql-doc-explorer-section-content{margin-left:var(--px-8);margin-top:var(--px-16)}.graphiql-doc-explorer-section-content>*+*{margin-top:var(--px-16)}.graphiql-doc-explorer-root-type{color:hsl(var(--color-info))}.graphiql-doc-explorer-search{color:hsla(var(--color-neutral),var(--alpha-secondary))}.graphiql-doc-explorer-search:not([data-state="idle"]){border:var(--popover-border);border-radius:var(--border-radius-4);box-shadow:var(--popover-box-shadow);color:hsla(var(--color-neutral),1)}.graphiql-doc-explorer-search:not([data-state="idle"]) .graphiql-doc-explorer-search-input{background:hsl(var(--color-base))}.graphiql-doc-explorer-search-input{align-items:center;background-color:hsla(var(--color-neutral),var(--alpha-background-light));border-radius:var(--border-radius-4);display:flex;padding:var(--px-8) var(--px-12)}.graphiql-doc-explorer-search [role=combobox]{border:none;background-color:transparent;margin-left:var(--px-4);width:100%}.graphiql-doc-explorer-search [role=combobox]:focus{outline:none}.graphiql-doc-explorer-search [role=listbox]{background-color:hsl(var(--color-base));border:none;border-bottom-left-radius:var(--border-radius-4);border-bottom-right-radius:var(--border-radius-4);border-top:1px solid hsla(var(--color-neutral),var(--alpha-background-heavy));max-height:400px;overflow-y:auto;margin:0;font-size:var(--font-size-body);padding:var(--px-4);position:relative}.graphiql-doc-explorer-search [role=option]{border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),var(--alpha-secondary));overflow-x:hidden;padding:var(--px-8) var(--px-12);text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.graphiql-doc-explorer-search [role=option][data-headlessui-state=active]{background-color:hsla(var(--color-neutral),var(--alpha-background-light))}.graphiql-doc-explorer-search [role=option]:hover{background-color:hsla(var(--color-neutral),var(--alpha-background-medium))}.graphiql-doc-explorer-search [role=option][data-headlessui-state=active]:hover{background-color:hsla(var(--color-neutral),var(--alpha-background-heavy))}:is(.graphiql-doc-explorer-search [role="option"])+:is(.graphiql-doc-explorer-search [role="option"]){margin-top:var(--px-4)}.graphiql-doc-explorer-search-type{color:hsl(var(--color-info))}.graphiql-doc-explorer-search-field{color:hsl(var(--color-warning))}.graphiql-doc-explorer-search-argument{color:hsl(var(--color-secondary))}.graphiql-doc-explorer-search-divider{color:hsla(var(--color-neutral),var(--alpha-secondary));font-size:var(--font-size-hint);font-weight:var(--font-weight-medium);margin-top:var(--px-8);padding:var(--px-8) var(--px-12)}.graphiql-doc-explorer-search-empty{color:hsla(var(--color-neutral),var(--alpha-secondary));padding:var(--px-8) var(--px-12)}a.graphiql-doc-explorer-field-name{color:hsl(var(--color-info));text-decoration:none}a.graphiql-doc-explorer-field-name:hover{text-decoration:underline}a.graphiql-doc-explorer-field-name:focus{outline:hsl(var(--color-info)) auto 1px}.graphiql-doc-explorer-item>:not(:first-child){margin-top:var(--px-12)}.graphiql-doc-explorer-argument-multiple{margin-left:var(--px-8)}.graphiql-doc-explorer-enum-value{color:hsl(var(--color-info))}.graphiql-doc-explorer-header{display:flex;justify-content:space-between;position:relative}.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-title{visibility:hidden}.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-back:not(:focus){color:transparent}.graphiql-doc-explorer-header-content{display:flex;flex-direction:column;min-width:0}.graphiql-doc-explorer-search{position:absolute;right:0;top:0}.graphiql-doc-explorer-search:focus-within{left:0}.graphiql-doc-explorer-search [role=combobox]{height:24px;width:4ch}.graphiql-doc-explorer-search [role=combobox]:focus{width:100%}a.graphiql-doc-explorer-back{align-items:center;color:hsla(var(--color-neutral),var(--alpha-secondary));display:flex;text-decoration:none}a.graphiql-doc-explorer-back:hover{text-decoration:underline}a.graphiql-doc-explorer-back:focus{outline:hsla(var(--color-neutral),var(--alpha-secondary)) auto 1px}a.graphiql-doc-explorer-back:focus+.graphiql-doc-explorer-title{visibility:unset}a.graphiql-doc-explorer-back>svg{height:var(--px-8);margin-right:var(--px-8);width:var(--px-8)}.graphiql-doc-explorer-title{font-weight:var(--font-weight-medium);font-size:var(--font-size-h2);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.graphiql-doc-explorer-title:not(:first-child){font-size:var(--font-size-h3);margin-top:var(--px-8)}.graphiql-doc-explorer-content>*{color:hsla(var(--color-neutral),var(--alpha-secondary));margin-top:var(--px-20)}.graphiql-doc-explorer-error{background-color:hsla(var(--color-error),var(--alpha-background-heavy));border:1px solid hsl(var(--color-error));border-radius:var(--border-radius-8);color:hsl(var(--color-error));padding:var(--px-8) var(--px-12)}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.graphiql-container .CodeMirror{height:100%;position:absolute;width:100%}.graphiql-container .CodeMirror{font-family:var(--font-family-mono)}.graphiql-container .CodeMirror,.graphiql-container .CodeMirror-gutters{background:none;background-color:var(--editor-background, hsl(var(--color-base)))}.graphiql-container .CodeMirror-linenumber{padding:0}.graphiql-container .CodeMirror-gutters{border:none}.cm-s-graphiql{color:hsla(var(--color-neutral),var(--alpha-tertiary))}.cm-s-graphiql .cm-keyword{color:hsl(var(--color-primary))}.cm-s-graphiql .cm-def{color:hsl(var(--color-tertiary))}.cm-s-graphiql .cm-punctuation{color:hsla(var(--color-neutral),var(--alpha-tertiary))}.cm-s-graphiql .cm-variable{color:hsl(var(--color-secondary))}.cm-s-graphiql .cm-atom{color:hsl(var(--color-tertiary))}.cm-s-graphiql .cm-number{color:hsl(var(--color-success))}.cm-s-graphiql .cm-string{color:hsl(var(--color-warning))}.cm-s-graphiql .cm-builtin{color:hsl(var(--color-success))}.cm-s-graphiql .cm-string-2{color:hsl(var(--color-secondary))}.cm-s-graphiql .cm-attribute,.cm-s-graphiql .cm-meta{color:hsl(var(--color-tertiary))}.cm-s-graphiql .cm-property{color:hsl(var(--color-info))}.cm-s-graphiql .cm-qualifier{color:hsl(var(--color-secondary))}.cm-s-graphiql .cm-comment{color:hsla(var(--color-neutral),var(--alpha-secondary))}.cm-s-graphiql .cm-ws{color:hsla(var(--color-neutral),var(--alpha-tertiary))}.cm-s-graphiql .cm-invalidchar{color:hsl(var(--color-error))}.cm-s-graphiql .CodeMirror-cursor{border-left:2px solid hsla(var(--color-neutral),var(--alpha-secondary))}.cm-s-graphiql .CodeMirror-linenumber{color:hsla(var(--color-neutral),var(--alpha-tertiary))}.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket,.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket{color:hsl(var(--color-warning))}.graphiql-container .CodeMirror-selected,.graphiql-container .CodeMirror-focused .CodeMirror-selected{background:hsla(var(--color-neutral),var(--alpha-background-heavy))}.graphiql-container .CodeMirror-dialog{background:inherit;color:inherit;left:0;right:0;overflow:hidden;padding:var(--px-2) var(--px-6);position:absolute;z-index:6}.graphiql-container .CodeMirror-dialog-top{border-bottom:1px solid hsla(var(--color-neutral),var(--alpha-background-heavy));padding-bottom:var(--px-12);top:0}.graphiql-container .CodeMirror-dialog-bottom{border-top:1px solid hsla(var(--color-neutral),var(--alpha-background-heavy));bottom:0;padding-top:var(--px-12)}.graphiql-container .CodeMirror-search-hint{display:none}.graphiql-container .CodeMirror-dialog input{border:1px solid hsla(var(--color-neutral),var(--alpha-background-heavy));border-radius:var(--border-radius-4);padding:var(--px-4)}.graphiql-container .CodeMirror-dialog input:focus{outline:hsl(var(--color-primary)) solid 2px}.graphiql-container .cm-searching{background-color:hsla(var(--color-warning),var(--alpha-background-light));padding-bottom:1.5px;padding-top:.5px}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"▾"}.CodeMirror-foldgutter-folded:after{content:"▸"}.CodeMirror-foldgutter{width:var(--px-12)}.CodeMirror-foldmarker{background-color:hsl(var(--color-info));border-radius:var(--border-radius-4);color:hsl(var(--color-base));font-family:inherit;margin:0 var(--px-4);padding:0 var(--px-8);text-shadow:none}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{color:hsla(var(--color-neutral),var(--alpha-tertiary))}.CodeMirror-foldgutter-open:after,.CodeMirror-foldgutter-folded:after{margin:0 var(--px-2)}.graphiql-editor{height:100%;position:relative;width:100%}.graphiql-editor.hidden{left:-9999px;position:absolute;top:-9999px;visibility:hidden}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid black;border-radius:4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=)}.CodeMirror-lint-mark-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==)}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=)}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=)}.CodeMirror-lint-marker-multiple{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-lint-line-error{background-color:#b74c5114}.CodeMirror-lint-line-warning{background-color:#ffd3001a}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-repeat:repeat-x;background-size:10px 3px;background-position:0 95%}.cm-s-graphiql .CodeMirror-lint-mark-error{color:hsl(var(--color-error))}.CodeMirror-lint-mark-error{background-image:linear-gradient(45deg,transparent 65%,hsl(var(--color-error)) 80%,transparent 90%),linear-gradient(135deg,transparent 5%,hsl(var(--color-error)) 15%,transparent 25%),linear-gradient(135deg,transparent 45%,hsl(var(--color-error)) 55%,transparent 65%),linear-gradient(45deg,transparent 25%,hsl(var(--color-error)) 35%,transparent 50%)}.cm-s-graphiql .CodeMirror-lint-mark-warning{color:hsl(var(--color-warning))}.CodeMirror-lint-mark-warning{background-image:linear-gradient(45deg,transparent 65%,hsl(var(--color-warning)) 80%,transparent 90%),linear-gradient(135deg,transparent 5%,hsl(var(--color-warning)) 15%,transparent 25%),linear-gradient(135deg,transparent 45%,hsl(var(--color-warning)) 55%,transparent 65%),linear-gradient(45deg,transparent 25%,hsl(var(--color-warning)) 35%,transparent 50%)}.CodeMirror-lint-tooltip{background-color:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-8);box-shadow:var(--popover-box-shadow);font-size:var(--font-size-body);font-family:var(--font-family);max-width:600px;overflow:hidden;padding:var(--px-12)}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{background-image:none;padding:0}.CodeMirror-lint-message-error{color:hsl(var(--color-error))}.CodeMirror-lint-message-warning{color:hsl(var(--color-warning))}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.CodeMirror-hints{background:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-8);box-shadow:var(--popover-box-shadow);display:grid;font-family:var(--font-family);font-size:var(--font-size-body);grid-template-columns:auto fit-content(300px);max-height:264px;padding:0}.CodeMirror-hint{border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),var(--alpha-secondary));grid-column:1 / 2;margin:var(--px-4);padding:var(--px-6) var(--px-8)!important}.CodeMirror-hint:not(:first-child){margin-top:0}li.CodeMirror-hint-active{background:hsla(var(--color-primary),var(--alpha-background-medium));color:hsl(var(--color-primary))}.CodeMirror-hint-information{border-left:1px solid hsla(var(--color-neutral),var(--alpha-background-heavy));grid-column:2 / 3;grid-row:1 / 99999;max-height:264px;overflow:auto;padding:var(--px-12)}.CodeMirror-hint-information-header{display:flex;align-items:baseline}.CodeMirror-hint-information-field-name{font-size:var(--font-size-h4);font-weight:var(--font-weight-medium)}.CodeMirror-hint-information-type-name-pill{border:1px solid hsla(var(--color-neutral),var(--alpha-tertiary));border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),var(--alpha-secondary));margin-left:var(--px-6);padding:var(--px-4)}.CodeMirror-hint-information-type-name{color:inherit;text-decoration:none}.CodeMirror-hint-information-type-name:hover{text-decoration:underline dotted}.CodeMirror-hint-information-description{color:hsla(var(--color-neutral),var(--alpha-secondary));margin-top:var(--px-12)}.CodeMirror-info{background-color:hsl(var(--color-base));border:var(--popover-border);border-radius:var(--border-radius-8);box-shadow:var(--popover-box-shadow);color:hsla(var(--color-neutral),1);max-height:300px;max-width:400px;opacity:0;overflow:auto;padding:var(--px-12);position:fixed;transition:opacity .15s;z-index:10}.CodeMirror-info a{color:inherit;text-decoration:none}.CodeMirror-info a:hover{text-decoration:underline dotted}.CodeMirror-info .CodeMirror-info-header{display:flex;align-items:baseline}.CodeMirror-info .CodeMirror-info-header>.type-name,.CodeMirror-info .CodeMirror-info-header>.field-name,.CodeMirror-info .CodeMirror-info-header>.arg-name,.CodeMirror-info .CodeMirror-info-header>.directive-name,.CodeMirror-info .CodeMirror-info-header>.enum-value{font-size:var(--font-size-h4);font-weight:var(--font-weight-medium)}.CodeMirror-info .type-name-pill{border:1px solid hsla(var(--color-neutral),var(--alpha-tertiary));border-radius:var(--border-radius-4);color:hsla(var(--color-neutral),var(--alpha-secondary));margin-left:var(--px-6);padding:var(--px-4)}.CodeMirror-info .info-description{color:hsla(var(--color-neutral),var(--alpha-secondary));margin-top:var(--px-12);overflow:hidden}.CodeMirror-jump-token{text-decoration:underline dotted;cursor:pointer}.auto-inserted-leaf.cm-property{animation-duration:6s;animation-name:insertionFade;border-radius:var(--border-radius-4);padding:var(--px-2)}@keyframes insertionFade{0%,to{background-color:none}15%,85%{background-color:hsla(var(--color-warning),var(--alpha-background-light))}}button.graphiql-toolbar-button{display:flex;align-items:center;justify-content:center;height:var(--toolbar-width);width:var(--toolbar-width)}button.graphiql-toolbar-button.error{background:hsla(var(--color-error),var(--alpha-background-heavy))}.graphiql-execute-button-wrapper{position:relative}button.graphiql-execute-button{background-color:hsl(var(--color-primary));border:none;border-radius:var(--border-radius-8);cursor:pointer;height:var(--toolbar-width);padding:0;width:var(--toolbar-width)}button.graphiql-execute-button:hover{background-color:hsla(var(--color-primary),.9)}button.graphiql-execute-button:active{background-color:hsla(var(--color-primary),.8)}button.graphiql-execute-button:focus{outline:hsla(var(--color-primary),.8) auto 1px}button.graphiql-execute-button>svg{color:#fff;display:block;height:var(--px-16);margin:auto;width:var(--px-16)}button.graphiql-toolbar-menu{display:block;height:var(--toolbar-width);width:var(--toolbar-width)} +/* a very simple box-model reset, intentionally does not include pseudo elements */ +.graphiql-container * { + box-sizing: border-box; + font-variant-ligatures: none; +} + +.graphiql-container, +.CodeMirror-info, +.CodeMirror-lint-tooltip, +.graphiql-dialog, +.graphiql-dialog-overlay, +.graphiql-tooltip, +[data-radix-popper-content-wrapper] { + /* Colors */ + --color-primary: 320, 95%, 43%; + --color-secondary: 242, 51%, 61%; + --color-tertiary: 188, 100%, 36%; + --color-info: 208, 100%, 46%; + --color-success: 158, 60%, 42%; + --color-warning: 36, 100%, 41%; + --color-error: 13, 93%, 58%; + --color-neutral: 219, 28%, 32%; + --color-base: 219, 28%, 100%; + + /* Color alpha values */ + --alpha-secondary: 0.76; + --alpha-tertiary: 0.5; + --alpha-background-heavy: 0.15; + --alpha-background-medium: 0.1; + --alpha-background-light: 0.07; + + /* Font */ + --font-family: 'Roboto', sans-serif; + --font-family-mono: 'Fira Code', monospace; + --font-size-hint: calc(12rem / 16); + --font-size-inline-code: calc(13rem / 16); + --font-size-body: calc(15rem / 16); + --font-size-h4: calc(18rem / 16); + --font-size-h3: calc(22rem / 16); + --font-size-h2: calc(29rem / 16); + --font-weight-regular: 400; + --font-weight-medium: 500; + --line-height: 1.5; + + /* Spacing */ + --px-2: 2px; + --px-4: 4px; + --px-6: 6px; + --px-8: 8px; + --px-10: 10px; + --px-12: 12px; + --px-16: 16px; + --px-20: 20px; + --px-24: 24px; + + /* Border radius */ + --border-radius-2: 2px; + --border-radius-4: 4px; + --border-radius-8: 8px; + --border-radius-12: 12px; + + /* Popover styles (tooltip, dialog, etc) */ + --popover-box-shadow: 0px 6px 20px rgba(59, 76, 106, 0.13), + 0px 1.34018px 4.46726px rgba(59, 76, 106, 0.0774939), + 0px 0.399006px 1.33002px rgba(59, 76, 106, 0.0525061); + --popover-border: none; + + /* Layout */ + --sidebar-width: 60px; + --toolbar-width: 40px; + --session-header-height: 51px; +} + +@media (prefers-color-scheme: dark) { + body:not(.graphiql-light) .graphiql-container, + body:not(.graphiql-light) .CodeMirror-info, + body:not(.graphiql-light) .CodeMirror-lint-tooltip, + body:not(.graphiql-light) .graphiql-dialog, + body:not(.graphiql-light) .graphiql-dialog-overlay, + body:not(.graphiql-light) .graphiql-tooltip, + body:not(.graphiql-light) [data-radix-popper-content-wrapper] { + --color-primary: 338, 100%, 67%; + --color-secondary: 243, 100%, 77%; + --color-tertiary: 188, 100%, 44%; + --color-info: 208, 100%, 72%; + --color-success: 158, 100%, 42%; + --color-warning: 30, 100%, 80%; + --color-error: 13, 100%, 58%; + --color-neutral: 219, 29%, 78%; + --color-base: 219, 29%, 18%; + + --popover-box-shadow: none; + --popover-border: 1px solid hsl(var(--color-neutral)); + } +} + +body.graphiql-dark .graphiql-container, +body.graphiql-dark .CodeMirror-info, +body.graphiql-dark .CodeMirror-lint-tooltip, +body.graphiql-dark .graphiql-dialog, +body.graphiql-dark .graphiql-dialog-overlay, +body.graphiql-dark .graphiql-tooltip, +body.graphiql-dark [data-radix-popper-content-wrapper] { + --color-primary: 338, 100%, 67%; + --color-secondary: 243, 100%, 77%; + --color-tertiary: 188, 100%, 44%; + --color-info: 208, 100%, 72%; + --color-success: 158, 100%, 42%; + --color-warning: 30, 100%, 80%; + --color-error: 13, 100%, 58%; + --color-neutral: 219, 29%, 78%; + --color-base: 219, 29%, 18%; + + --popover-box-shadow: none; + --popover-border: 1px solid hsl(var(--color-neutral)); +} + +.graphiql-container, + .CodeMirror-info, + .CodeMirror-lint-tooltip, + .graphiql-dialog, + .graphiql-container:is(button), + .CodeMirror-info:is(button), + .CodeMirror-lint-tooltip:is(button), + .graphiql-dialog:is(button) { + color: hsl(var(--color-neutral)); + font-family: var(--font-family); + font-size: var(--font-size-body); + font-weight: var(--font-weight-regular); + line-height: var(--line-height); + } + +.graphiql-container input, .CodeMirror-info input, .CodeMirror-lint-tooltip input, .graphiql-dialog input { + color: hsl(var(--color-neutral)); + font-family: var(--font-family); + font-size: var(--font-size-caption) + } + +.graphiql-container input::placeholder, .CodeMirror-info input::placeholder, .CodeMirror-lint-tooltip input::placeholder, .graphiql-dialog input::placeholder { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + } + +.graphiql-container a, .CodeMirror-info a, .CodeMirror-lint-tooltip a, .graphiql-dialog a { + color: hsl(var(--color-primary)) + } + +.graphiql-container a:focus, .CodeMirror-info a:focus, .CodeMirror-lint-tooltip a:focus, .graphiql-dialog a:focus { + outline: hsl(var(--color-primary)) auto 1px; + } +.graphiql-un-styled, +button.graphiql-un-styled { + all: unset; + border-radius: var(--border-radius-4); + cursor: pointer +} + +:is(.graphiql-un-styled,button.graphiql-un-styled):hover { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + } + +:is(.graphiql-un-styled,button.graphiql-un-styled):active { + background-color: hsla( + var(--color-neutral), + var(--alpha-background-medium) + ); + } + +:is(.graphiql-un-styled,button.graphiql-un-styled):focus { + outline: hsla(var(--color-neutral), var(--alpha-background-heavy)) auto 1px; + } + +.graphiql-button, +button.graphiql-button { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + border: none; + border-radius: var(--border-radius-4); + color: hsl(var(--color-neutral)); + cursor: pointer; + font-size: var(--font-size-body); + padding: var(--px-8) var(--px-12) +} + +:is(.graphiql-button,button.graphiql-button):hover, + :is(.graphiql-button,button.graphiql-button):active { + background-color: hsla( + var(--color-neutral), + var(--alpha-background-medium) + ); + } + +:is(.graphiql-button,button.graphiql-button):focus { + outline: hsla(var(--color-neutral), var(--alpha-background-heavy)) auto 1px; + } + +.graphiql-button-success:is(.graphiql-button,button.graphiql-button) { + background-color: hsla(var(--color-success), var(--alpha-background-heavy)); + } + +.graphiql-button-error:is(.graphiql-button,button.graphiql-button) { + background-color: hsla(var(--color-error), var(--alpha-background-heavy)); + } +.graphiql-button-group { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + /* Border radius of button plus padding */ + border-radius: calc(var(--border-radius-4) + var(--px-4)); + display: flex; + padding: var(--px-4) +} +.graphiql-button-group > button.graphiql-button { + background-color: transparent + } +.graphiql-button-group > button.graphiql-button:hover { + background-color: hsla( + var(--color-neutral), + var(--alpha-background-light) + ); + } +.graphiql-button-group > button.graphiql-button.active { + background-color: hsl(var(--color-base)); + cursor: default; + } +.graphiql-button-group > * + * { + margin-left: var(--px-8); + } +.graphiql-dialog-overlay { + position: fixed; + inset: 0; + background-color: hsla(var(--color-neutral), var(--alpha-background-heavy)); + /** + * CodeMirror has a `z-index` set for the container of the scrollbar of the + * editor, so we have to add one here to make sure that the dialog is shown + * above the editor scrollbar (if they are visible). + */ + z-index: 10; +} + +.graphiql-dialog { + background-color: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-12); + box-shadow: var(--popover-box-shadow); + margin: 0; + max-height: 80vh; + max-width: 80vw; + overflow: auto; + padding: 0; + width: unset; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; + position: fixed; + z-index: 10; +} + +.graphiql-dialog-close > svg { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + display: block; + height: var(--px-12); + padding: var(--px-12); + width: var(--px-12); +} +.graphiql-dropdown-content { + background-color: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-8); + box-shadow: var(--popover-box-shadow); + font-size: inherit; + max-width: 250px; + padding: var(--px-4); + font-family: var(--font-family); + color: hsl(var(--color-neutral)); + max-height: min( + calc(var(--radix-dropdown-menu-content-available-height) - 10px), + 400px + ); + overflow-y: scroll; +} + +.graphiql-dropdown-item { + border-radius: var(--border-radius-4); + font-size: inherit; + margin: var(--px-4); + overflow: hidden; + padding: var(--px-6) var(--px-8); + text-overflow: ellipsis; + white-space: nowrap; + outline: none; + cursor: pointer; + line-height: var(--line-height) +} + +.graphiql-dropdown-item[data-selected], + .graphiql-dropdown-item[data-current-nav], + .graphiql-dropdown-item:hover { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + color: inherit; + } + +.graphiql-dropdown-item:not(:first-child) { + margin-top: 0; + } +/** + * We render markdown in the following places: + * - In the hint tooltip when typing in the query editor (field description + * and, optionally, deprecation reason). + * - In the info tooltip when hovering over a field in the query editor + * (field description and, optionally, deprecation reason). + */ + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) blockquote { + margin-left: 0; + margin-right: 0; + padding-left: var(--px-8); + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code, + :is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre { + border-radius: var(--border-radius-4); + font-family: var(--font-family-mono); + font-size: var(--font-size-inline-code); + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code { + padding: var(--px-2); + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre { + overflow: auto; + padding: var(--px-6) var(--px-8); + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre code { + background-color: initial; + border-radius: 0; + padding: 0; + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol, + :is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul { + padding-left: var(--px-16); + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol { + list-style-type: decimal; + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul { + list-style-type: disc; + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) img { + border-radius: var(--border-radius-4); + max-height: 120px; + max-width: 100%; + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) > :first-child { + margin-top: 0; + } + +:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) > :last-child { + margin-bottom: 0; + } + +:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a { + color: hsl(var(--color-primary)); + text-decoration: none + } + +:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a:hover { + text-decoration: underline; + } + +:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) blockquote { + border-left: 1.5px solid hsla(var(--color-neutral), var(--alpha-tertiary)); + } + +:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) code, + :is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) pre { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + color: hsl(var(--color-neutral)); + } + +:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) > * { + margin: var(--px-12) 0; + } + +:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) a { + color: hsl(var(--color-warning)); + text-decoration: underline; + } + +:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) blockquote { + border-left: 1.5px solid hsl(var(--color-warning)); + } + +:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) code, + :is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) pre { + background-color: hsla(var(--color-warning), var(--alpha-background-heavy)); + } + +:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) > * { + margin: var(--px-8) 0; + } + +.graphiql-markdown-preview > :not(:first-child) { + display: none; +} + +/** + * We show deprecations in the following places: + * - In the hint tooltip when typing in the query editor. + * - In the info tooltip when hovering over a field in the query editor. + */ + +.CodeMirror-hint-information-deprecation, +.CodeMirror-info .info-deprecation { + background-color: hsla(var(--color-warning), var(--alpha-background-light)); + border: 1px solid hsl(var(--color-warning)); + border-radius: var(--border-radius-4); + color: hsl(var(--color-warning)); + margin-top: var(--px-12); + padding: var(--px-6) var(--px-8); +} + +.CodeMirror-hint-information-deprecation-label, +.CodeMirror-info .info-deprecation-label { + font-size: var(--font-size-hint); + font-weight: var(--font-weight-medium); +} + +.CodeMirror-hint-information-deprecation-reason, +.CodeMirror-info .info-deprecation-reason { + margin-top: var(--px-6); +} +.graphiql-spinner { + height: 56px; + margin: auto; + margin-top: var(--px-16); + width: 56px +} + +.graphiql-spinner::after { + animation: rotation 0.8s linear 0s infinite; + border: 4px solid transparent; + border-radius: 100%; + border-top: 4px solid hsla(var(--color-neutral), var(--alpha-tertiary)); + content: ''; + display: inline-block; + height: 46px; + vertical-align: middle; + width: 46px; + } + +@keyframes rotation { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} +.graphiql-tooltip { + background: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-4); + box-shadow: var(--popover-box-shadow); + color: hsl(var(--color-neutral)); + font-size: inherit; + padding: var(--px-4) var(--px-6); + font-family: var(--font-family); +} +.graphiql-tabs { + display: flex; + align-items: center; + overflow-x: auto; + padding: var(--px-12) +} + +.graphiql-tabs > :not(:first-child) { + margin-left: var(--px-12); + } + +.graphiql-tab { + align-items: stretch; + border-radius: var(--border-radius-8); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + display: flex +} + +.graphiql-tab > button.graphiql-tab-close { + visibility: hidden; + } + +.graphiql-tab.graphiql-tab-active > button.graphiql-tab-close, + .graphiql-tab:hover > button.graphiql-tab-close, + .graphiql-tab:focus-within > button.graphiql-tab-close { + visibility: unset; + } + +.graphiql-tab.graphiql-tab-active { + background-color: hsla(var(--color-neutral), var(--alpha-background-heavy)); + color: hsla(var(--color-neutral), 1); + } + +button.graphiql-tab-button { + padding: var(--px-4) 0 var(--px-4) var(--px-8); +} + +button.graphiql-tab-close { + align-items: center; + display: flex; + padding: var(--px-4) var(--px-8) +} + +button.graphiql-tab-close > svg { + height: var(--px-8); + width: var(--px-8); + } +.graphiql-history-header { + font-size: var(--font-size-h2); + font-weight: var(--font-weight-medium); + display: flex; + justify-content: space-between; + align-items: center; +} + +.graphiql-history-header button { + font-size: var(--font-size-inline-code); + padding: var(--px-6) var(--px-10); +} + +.graphiql-history-items { + margin: var(--px-16) 0 0; + list-style: none; + padding: 0; +} + +.graphiql-history-item { + border-radius: var(--border-radius-4); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + display: flex; + font-size: var(--font-size-inline-code); + font-family: var(--font-family-mono); + height: 34px +} + +.graphiql-history-item:hover { + color: hsl(var(--color-neutral)); + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + } + +.graphiql-history-item:not(:first-child) { + margin-top: var(--px-4); + } + +.graphiql-history-item.editable { + background-color: hsla( + var(--color-primary), + var(--alpha-background-medium) + ) + } + +.graphiql-history-item.editable > input { + background: transparent; + border: none; + flex: 1; + margin: 0; + outline: none; + padding: 0 var(--px-10); + width: 100% + } + +.graphiql-history-item.editable > input::placeholder { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + } + +.graphiql-history-item.editable > button { + color: hsl(var(--color-primary)); + padding: 0 var(--px-10) + } + +.graphiql-history-item.editable > button:active { + background-color: hsla( + var(--color-primary), + var(--alpha-background-heavy) + ); + } + +.graphiql-history-item.editable > button:focus { + outline: hsl(var(--color-primary)) auto 1px; + } + +.graphiql-history-item.editable > button > svg { + display: block; + } + +button.graphiql-history-item-label { + flex: 1; + padding: var(--px-8) var(--px-10); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +button.graphiql-history-item-action { + align-items: center; + color: hsla(var(--color-neutral), var(--alpha-secondary)); + display: flex; + padding: var(--px-8) var(--px-6) +} + +button.graphiql-history-item-action:hover { + color: hsl(var(--color-neutral)); + } + +button.graphiql-history-item-action > svg { + height: 14px; + width: 14px; + } + +.graphiql-history-item-spacer { + height: var(--px-16); +} +.graphiql-doc-explorer-default-value { + color: hsl(var(--color-success)); +} +a.graphiql-doc-explorer-type-name { + color: hsl(var(--color-warning)); + text-decoration: none +} +a.graphiql-doc-explorer-type-name:hover { + text-decoration: underline; + } +a.graphiql-doc-explorer-type-name:focus { + outline: hsl(var(--color-warning)) auto 1px; + } + + .graphiql-doc-explorer-argument > * + * { + margin-top: var(--px-12); + } + +.graphiql-doc-explorer-argument-name { + color: hsl(var(--color-secondary)); +} + +.graphiql-doc-explorer-argument-deprecation { + background-color: hsla(var(--color-warning), var(--alpha-background-light)); + border: 1px solid hsl(var(--color-warning)); + border-radius: var(--border-radius-4); + color: hsl(var(--color-warning)); + padding: var(--px-8); +} + +.graphiql-doc-explorer-argument-deprecation-label { + font-size: var(--font-size-hint); + font-weight: var(--font-weight-medium); +} +.graphiql-doc-explorer-deprecation { + background-color: hsla(var(--color-warning), var(--alpha-background-light)); + border: 1px solid hsl(var(--color-warning)); + border-radius: var(--px-4); + color: hsl(var(--color-warning)); + padding: var(--px-8); +} + +.graphiql-doc-explorer-deprecation-label { + font-size: var(--font-size-hint); + font-weight: var(--font-weight-medium); +} +.graphiql-doc-explorer-directive { + color: hsl(var(--color-secondary)); +} +.graphiql-doc-explorer-section-title { + align-items: center; + display: flex; + font-size: var(--font-size-hint); + font-weight: var(--font-weight-medium); + line-height: 1 +} + +.graphiql-doc-explorer-section-title > svg { + height: var(--px-16); + margin-right: var(--px-8); + width: var(--px-16); + } + +.graphiql-doc-explorer-section-content { + margin-left: var(--px-8); + margin-top: var(--px-16) +} + +.graphiql-doc-explorer-section-content > * + * { + margin-top: var(--px-16); + } +.graphiql-doc-explorer-root-type { + color: hsl(var(--color-info)); +} +.graphiql-doc-explorer-search { + color: hsla(var(--color-neutral), var(--alpha-secondary)) +} + +.graphiql-doc-explorer-search:not([data-state='idle']) { + border: var(--popover-border); + border-radius: var(--border-radius-4); + box-shadow: var(--popover-box-shadow); + color: hsl(var(--color-neutral)) + } + +.graphiql-doc-explorer-search:not([data-state='idle']) .graphiql-doc-explorer-search-input { + background: hsl(var(--color-base)); + } + +.graphiql-doc-explorer-search-input { + align-items: center; + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + border-radius: var(--border-radius-4); + display: flex; + padding: var(--px-8) var(--px-12); +} + +.graphiql-doc-explorer-search [role='combobox'] { + border: none; + background-color: transparent; + margin-left: var(--px-4); + width: 100% +} + +.graphiql-doc-explorer-search [role='combobox']:focus { + outline: none; + } + +.graphiql-doc-explorer-search [role='listbox'] { + background-color: hsl(var(--color-base)); + border: none; + border-bottom-left-radius: var(--border-radius-4); + border-bottom-right-radius: var(--border-radius-4); + border-top: 1px solid + hsla(var(--color-neutral), var(--alpha-background-heavy)); + max-height: 400px; + overflow-y: auto; + margin: 0; + font-size: var(--font-size-body); + padding: var(--px-4); + /** + * This makes sure that the logic for auto-scrolling the search results when + * using keyboard navigation works properly (we use `offsetTop` there). + */ + position: relative; +} + +.graphiql-doc-explorer-search [role='option'] { + border-radius: var(--border-radius-4); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + overflow-x: hidden; + padding: var(--px-8) var(--px-12); + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer +} + +.graphiql-doc-explorer-search [role='option'][data-headlessui-state='active'] { + background-color: hsla(var(--color-neutral), var(--alpha-background-light)); + } + +.graphiql-doc-explorer-search [role='option']:hover { + background-color: hsla( + var(--color-neutral), + var(--alpha-background-medium) + ); + } + +.graphiql-doc-explorer-search [role='option'][data-headlessui-state='active']:hover { + background-color: hsla(var(--color-neutral), var(--alpha-background-heavy)); + } + +:is(.graphiql-doc-explorer-search [role='option']) + :is(.graphiql-doc-explorer-search [role='option']) { + margin-top: var(--px-4); + } + +.graphiql-doc-explorer-search-type { + color: hsl(var(--color-info)); +} + +.graphiql-doc-explorer-search-field { + color: hsl(var(--color-warning)); +} + +.graphiql-doc-explorer-search-argument { + color: hsl(var(--color-secondary)); +} + +.graphiql-doc-explorer-search-divider { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + font-size: var(--font-size-hint); + font-weight: var(--font-weight-medium); + margin-top: var(--px-8); + padding: var(--px-8) var(--px-12); +} + +.graphiql-doc-explorer-search-empty { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + padding: var(--px-8) var(--px-12); +} +a.graphiql-doc-explorer-field-name { + color: hsl(var(--color-info)); + text-decoration: none +} +a.graphiql-doc-explorer-field-name:hover { + text-decoration: underline; + } +a.graphiql-doc-explorer-field-name:focus { + outline: hsl(var(--color-info)) auto 1px; + } +.graphiql-doc-explorer-item > :not(:first-child) { + margin-top: var(--px-12); +} + +.graphiql-doc-explorer-argument-multiple { + margin-left: var(--px-8); +} + +.graphiql-doc-explorer-enum-value { + color: hsl(var(--color-info)); +} +/* The header of the doc explorer */ +.graphiql-doc-explorer-header { + display: flex; + justify-content: space-between; + position: relative +} +.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-title { + /* Hide the header when focussing the search input */ + visibility: hidden; + } +.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-back:not(:focus) { + /** + * Make the back link invisible when focussing the search input. Hiding + * it in any other way makes it impossible to focus the link by pressing + * Shift-Tab while the input is focussed. + */ + color: transparent; + } +.graphiql-doc-explorer-header-content { + display: flex; + flex-direction: column; + min-width: 0; +} + +/* The search input in the header of the doc explorer */ +.graphiql-doc-explorer-search { + position: absolute; + right: 0; + top: 0 +} +.graphiql-doc-explorer-search:focus-within { + left: 0; + } +.graphiql-doc-explorer-search:not(:focus-within) [role='combobox'] { + height: 24px; + width: 5ch; + } +.graphiql-doc-explorer-search [role='combobox']:focus { + width: 100%; + } + +/* The back-button in the doc explorer */ +a.graphiql-doc-explorer-back { + align-items: center; + color: hsla(var(--color-neutral), var(--alpha-secondary)); + display: flex; + text-decoration: none +} +a.graphiql-doc-explorer-back:hover { + text-decoration: underline; + } +a.graphiql-doc-explorer-back:focus { + outline: hsla(var(--color-neutral), var(--alpha-secondary)) auto 1px + } +a.graphiql-doc-explorer-back:focus + .graphiql-doc-explorer-title { + /* Don't hide the header when focussing the back link */ + visibility: unset; + } +a.graphiql-doc-explorer-back > svg { + height: var(--px-8); + margin-right: var(--px-8); + width: var(--px-8); + } + +/* The title of the currently active page in the doc explorer */ +.graphiql-doc-explorer-title { + font-weight: var(--font-weight-medium); + font-size: var(--font-size-h2); + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap +} +.graphiql-doc-explorer-title:not(:first-child) { + font-size: var(--font-size-h3); + margin-top: var(--px-8); + } + +/* The contents of the currently active page in the doc explorer */ +.graphiql-doc-explorer-content > * { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + margin-top: var(--px-20); +} + +/* Error message */ +.graphiql-doc-explorer-error { + background-color: hsla(var(--color-error), var(--alpha-background-heavy)); + border: 1px solid hsl(var(--color-error)); + border-radius: var(--border-radius-8); + color: hsl(var(--color-error)); + padding: var(--px-8) var(--px-12); +} +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; + direction: ltr; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} + +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} + +.CodeMirror-linenumbers {} + +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } + +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} + +/* Shown when moving in bi-directional text */ + +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} + +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0 !important; + background: #7e7; +} + +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-fat-cursor .CodeMirror-line::selection, +.cm-fat-cursor .CodeMirror-line > span::selection, +.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; } + +.cm-fat-cursor .CodeMirror-line::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; } + +.cm-fat-cursor { caret-color: transparent; } + +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ + +.CodeMirror-overwrite .CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: 0; + overflow: hidden; +} + +.CodeMirror-ruler { + border-left: 1px solid #ccc; + top: 0; bottom: 0; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} + +.cm-s-default .cm-quote {color: #090;} + +.cm-negative {color: #d44;} + +.cm-positive {color: #292;} + +.cm-header, .cm-strong {font-weight: bold;} + +.cm-em {font-style: italic;} + +.cm-link {text-decoration: underline;} + +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-keyword {color: #708;} + +.cm-s-default .cm-atom {color: #219;} + +.cm-s-default .cm-number {color: #164;} + +.cm-s-default .cm-def {color: #00f;} + +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} + +.cm-s-default .cm-variable-2 {color: #05a;} + +.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} + +.cm-s-default .cm-comment {color: #a50;} + +.cm-s-default .cm-string {color: #a11;} + +.cm-s-default .cm-string-2 {color: #f50;} + +.cm-s-default .cm-meta {color: #555;} + +.cm-s-default .cm-qualifier {color: #555;} + +.cm-s-default .cm-builtin {color: #30a;} + +.cm-s-default .cm-bracket {color: #997;} + +.cm-s-default .cm-tag {color: #170;} + +.cm-s-default .cm-attribute {color: #00c;} + +.cm-s-default .cm-hr {color: #999;} + +.cm-s-default .cm-link {color: #00c;} + +.cm-s-default .cm-error {color: #f00;} + +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} + +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} + +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } + +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 50px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -50px; margin-right: -50px; + padding-bottom: 50px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; + z-index: 0; +} + +.CodeMirror-sizer { + position: relative; + border-right: 50px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ + +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + outline: none; +} + +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} + +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} + +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} + +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; +} + +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -50px; +} + +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} + +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} + +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-gutter-wrapper ::selection { background-color: transparent } + +.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} + +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; +} + +.CodeMirror-wrap pre.CodeMirror-line, +.CodeMirror-wrap pre.CodeMirror-line-like { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-widget {} + +.CodeMirror-rtl pre { direction: rtl; } + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ + +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} + +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} + +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } + +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + +.CodeMirror-crosshair { cursor: crosshair; } + +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } + +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, .4); +} + +/* Used to force a border model for a node */ + +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ + +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ + +span.CodeMirror-selectedtext { background: none; } + +/* Make the editors fill up their container and make them scrollable */ + +.graphiql-container .CodeMirror { + height: 100%; + position: absolute; + width: 100%; +} + +/* Override font settings */ + +.graphiql-container .CodeMirror { + font-family: var(--font-family-mono); +} + +/* Set default background color */ + +.graphiql-container .CodeMirror, +.graphiql-container .CodeMirror-gutters { + background: none; + background-color: var(--editor-background, hsl(var(--color-base))); +} + +/* No padding around line numbers */ + +.graphiql-container .CodeMirror-linenumber { + padding: 0; +} + +/* No border between gutter and editor */ + +.graphiql-container .CodeMirror-gutters { + border: none; +} + +/** + * Editor theme + */ + +.cm-s-graphiql { + /* Default to punctuation */ + color: hsla(var(--color-neutral), var(--alpha-tertiary)) + + /* OperationType, `fragment`, `on` */ +} + +.cm-s-graphiql .cm-keyword { + color: hsl(var(--color-primary)); + } + +/* Name (OperationDefinition), FragmentName */ + +.cm-s-graphiql .cm-def { + color: hsl(var(--color-tertiary)); + } + +/* Punctuator (except `$` and `@`) */ + +.cm-s-graphiql .cm-punctuation { + color: hsla(var(--color-neutral), var(--alpha-tertiary)); + } + +/* Variable */ + +.cm-s-graphiql .cm-variable { + color: hsl(var(--color-secondary)); + } + +/* NamedType */ + +.cm-s-graphiql .cm-atom { + color: hsl(var(--color-tertiary)); + } + +/* IntValue, FloatValue */ + +.cm-s-graphiql .cm-number { + color: hsl(var(--color-success)); + } + +/* StringValue */ + +.cm-s-graphiql .cm-string { + color: hsl(var(--color-warning)); + } + +/* BooleanValue */ + +.cm-s-graphiql .cm-builtin { + color: hsl(var(--color-success)); + } + +/* EnumValue */ + +.cm-s-graphiql .cm-string-2 { + color: hsl(var(--color-secondary)); + } + +/* Name (ObjectField, Argument) */ + +.cm-s-graphiql .cm-attribute { + color: hsl(var(--color-tertiary)); + } + +/* Name (Directive) */ + +.cm-s-graphiql .cm-meta { + color: hsl(var(--color-tertiary)); + } + +/* Name (Alias, Field without Alias) */ + +.cm-s-graphiql .cm-property { + color: hsl(var(--color-info)); + } + +/* Name (Field with Alias) */ + +.cm-s-graphiql .cm-qualifier { + color: hsl(var(--color-secondary)); + } + +/* Comment */ + +.cm-s-graphiql .cm-comment { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + } + +/* Whitespace */ + +.cm-s-graphiql .cm-ws { + color: hsla(var(--color-neutral), var(--alpha-tertiary)); + } + +/* Invalid characters */ + +.cm-s-graphiql .cm-invalidchar { + color: hsl(var(--color-error)); + } + +/* Cursor */ + +.cm-s-graphiql .CodeMirror-cursor { + border-left: 2px solid hsla(var(--color-neutral), var(--alpha-secondary)); + } + +/* Color for line numbers and fold-gutters */ + +.cm-s-graphiql .CodeMirror-linenumber { + color: hsla(var(--color-neutral), var(--alpha-tertiary)); + } + +/* Matching bracket colors */ + +.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket, +.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: hsl(var(--color-warning)); +} + +/* Selected text blocks */ + +.graphiql-container .CodeMirror-selected, +.graphiql-container .CodeMirror-focused .CodeMirror-selected { + background: hsla(var(--color-neutral), var(--alpha-background-heavy)); +} + +/* Position the search dialog */ + +.graphiql-container .CodeMirror-dialog { + background: inherit; + color: inherit; + left: 0; + right: 0; + overflow: hidden; + padding: var(--px-2) var(--px-6); + position: absolute; + z-index: 6; +} + +.graphiql-container .CodeMirror-dialog-top { + border-bottom: 1px solid + hsla(var(--color-neutral), var(--alpha-background-heavy)); + padding-bottom: var(--px-12); + top: 0; +} + +.graphiql-container .CodeMirror-dialog-bottom { + border-top: 1px solid + hsla(var(--color-neutral), var(--alpha-background-heavy)); + bottom: 0; + padding-top: var(--px-12); +} + +/* Hide the search hint */ + +.graphiql-container .CodeMirror-search-hint { + display: none; +} + +/* Style the input field for searching */ + +.graphiql-container .CodeMirror-dialog input { + border: 1px solid hsla(var(--color-neutral), var(--alpha-background-heavy)); + border-radius: var(--border-radius-4); + padding: var(--px-4); +} + +.graphiql-container .CodeMirror-dialog input:focus { + outline: hsl(var(--color-primary)) solid 2px; +} + +/* Set the highlight color for search results */ + +.graphiql-container .cm-searching { + background-color: hsla(var(--color-warning), var(--alpha-background-light)); + /** + * When cycling through search results, CodeMirror overlays the current + * selection with another element that has the .CodeMirror-selected class + * applied. This adds another background color (see above), but this extra + * box does not quite match the height of this element. To match them up we + * add some extra padding here. (Note that this doesn't affect the line + * height of the CodeMirror editor as all line wrappers have a fixed height.) + */ + padding-bottom: 1.5px; + padding-top: 0.5px; +} +.CodeMirror-foldmarker { + color: blue; + text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; + font-family: arial; + line-height: .3; + cursor: pointer; +} +.CodeMirror-foldgutter { + width: .7em; +} +.CodeMirror-foldgutter-open, +.CodeMirror-foldgutter-folded { + cursor: pointer; +} +.CodeMirror-foldgutter-open:after { + content: "\25BE"; +} +.CodeMirror-foldgutter-folded:after { + content: "\25B8"; +} +.CodeMirror-foldgutter { + width: var(--px-12); +} +.CodeMirror-foldmarker { + background-color: hsl(var(--color-info)); + border-radius: var(--border-radius-4); + color: hsl(var(--color-base)); + font-family: inherit; + margin: 0 var(--px-4); + padding: 0 var(--px-8); + text-shadow: none; +} +.CodeMirror-foldgutter-open, +.CodeMirror-foldgutter-folded { + color: hsla(var(--color-neutral), var(--alpha-tertiary)) +} +.CodeMirror-foldgutter-open::after, .CodeMirror-foldgutter-folded::after { + margin: 0 var(--px-2); + } +.graphiql-editor { + height: 100%; + position: relative; + width: 100% +} +.graphiql-editor.hidden { + /* Just setting `display: none;` would break the editor gutters */ + left: -9999px; + position: absolute; + top: -9999px; + visibility: hidden; + } +/* The lint marker gutter */ +.CodeMirror-lint-markers { + width: 16px; +} +.CodeMirror-lint-tooltip { + background-color: #ffd; + border: 1px solid black; + border-radius: 4px 4px 4px 4px; + color: black; + font-family: monospace; + font-size: 10pt; + overflow: hidden; + padding: 2px 5px; + position: fixed; + white-space: pre; + white-space: pre-wrap; + z-index: 100; + max-width: 600px; + opacity: 0; + transition: opacity .4s; + -moz-transition: opacity .4s; + -webkit-transition: opacity .4s; + -o-transition: opacity .4s; + -ms-transition: opacity .4s; +} +.CodeMirror-lint-mark { + background-position: left bottom; + background-repeat: repeat-x; +} +.CodeMirror-lint-mark-warning { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=); +} +.CodeMirror-lint-mark-error { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==); +} +.CodeMirror-lint-marker { + background-position: center center; + background-repeat: no-repeat; + cursor: pointer; + display: inline-block; + height: 16px; + width: 16px; + vertical-align: middle; + position: relative; +} +.CodeMirror-lint-message { + padding-left: 18px; + background-position: top left; + background-repeat: no-repeat; +} +.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=); +} +.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=); +} +.CodeMirror-lint-marker-multiple { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC); + background-repeat: no-repeat; + background-position: right bottom; + width: 100%; height: 100%; +} +.CodeMirror-lint-line-error { + background-color: rgba(183, 76, 81, 0.08); +} +.CodeMirror-lint-line-warning { + background-color: rgba(255, 211, 0, 0.1); +} +/* Text styles */ +.CodeMirror-lint-mark-error, +.CodeMirror-lint-mark-warning { + background-repeat: repeat-x; + /** + * The following two are very specific to the font size, so we use + * "magic values" instead of variables. + */ + background-size: 10px 3px; + background-position: 0 95%; +} +.cm-s-graphiql .CodeMirror-lint-mark-error { + color: hsl(var(--color-error)); +} +.CodeMirror-lint-mark-error { + background-image: linear-gradient( + 45deg, + transparent 65%, + hsl(var(--color-error)) 80%, + transparent 90% + ), + linear-gradient( + 135deg, + transparent 5%, + hsl(var(--color-error)) 15%, + transparent 25% + ), + linear-gradient( + 135deg, + transparent 45%, + hsl(var(--color-error)) 55%, + transparent 65% + ), + linear-gradient( + 45deg, + transparent 25%, + hsl(var(--color-error)) 35%, + transparent 50% + ); +} +.cm-s-graphiql .CodeMirror-lint-mark-warning { + color: hsl(var(--color-warning)); +} +.CodeMirror-lint-mark-warning { + background-image: linear-gradient( + 45deg, + transparent 65%, + hsl(var(--color-warning)) 80%, + transparent 90% + ), + linear-gradient( + 135deg, + transparent 5%, + hsl(var(--color-warning)) 15%, + transparent 25% + ), + linear-gradient( + 135deg, + transparent 45%, + hsl(var(--color-warning)) 55%, + transparent 65% + ), + linear-gradient( + 45deg, + transparent 25%, + hsl(var(--color-warning)) 35%, + transparent 50% + ); +} +/* Popup styles */ +.CodeMirror-lint-tooltip { + background-color: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-8); + box-shadow: var(--popover-box-shadow); + font-size: var(--font-size-body); + font-family: var(--font-family); + max-width: 600px; + overflow: hidden; + padding: var(--px-12); +} +.CodeMirror-lint-message-error, +.CodeMirror-lint-message-warning { + background-image: none; + padding: 0; +} +.CodeMirror-lint-message-error { + color: hsl(var(--color-error)); +} +.CodeMirror-lint-message-warning { + color: hsl(var(--color-warning)); +} +.CodeMirror-hints { + position: absolute; + z-index: 10; + overflow: hidden; + list-style: none; + + margin: 0; + padding: 2px; + + -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + box-shadow: 2px 3px 5px rgba(0,0,0,.2); + border-radius: 3px; + border: 1px solid silver; + + background: white; + font-size: 90%; + font-family: monospace; + + max-height: 20em; + overflow-y: auto; +} + +.CodeMirror-hint { + margin: 0; + padding: 0 4px; + border-radius: 2px; + white-space: pre; + color: black; + cursor: pointer; +} + +li.CodeMirror-hint-active { + background: #08f; + color: white; +} + +/* Popup styles */ + +.CodeMirror-hints { + background: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-8); + box-shadow: var(--popover-box-shadow); + display: grid; + font-family: var(--font-family); + font-size: var(--font-size-body); + grid-template-columns: auto fit-content(300px); + /* By default this is equals exactly 8 items including margins */ + max-height: 264px; + padding: 0; +} + +/* Autocomplete items */ + +.CodeMirror-hint { + border-radius: var(--border-radius-4); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + grid-column: 1 / 2; + margin: var(--px-4); + /* Override element style added by codemirror */ + padding: var(--px-6) var(--px-8) !important +} + +.CodeMirror-hint:not(:first-child) { + margin-top: 0; + } + +li.CodeMirror-hint-active { + background: hsla(var(--color-primary), var(--alpha-background-medium)); + color: hsl(var(--color-primary)); +} + +/* Sidebar with additional information */ + +.CodeMirror-hint-information { + border-left: 1px solid + hsla(var(--color-neutral), var(--alpha-background-heavy)); + grid-column: 2 / 3; + grid-row: 1 / 99999; + /* Same as the popup */ + max-height: 264px; + overflow: auto; + padding: var(--px-12); +} + +.CodeMirror-hint-information-header { + display: flex; + align-items: baseline; +} + +.CodeMirror-hint-information-field-name { + font-size: var(--font-size-h4); + font-weight: var(--font-weight-medium); +} + +.CodeMirror-hint-information-type-name-pill { + border: 1px solid hsla(var(--color-neutral), var(--alpha-tertiary)); + border-radius: var(--border-radius-4); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + margin-left: var(--px-6); + padding: var(--px-4); +} + +.CodeMirror-hint-information-type-name { + color: inherit; + text-decoration: none +} + +.CodeMirror-hint-information-type-name:hover { + text-decoration: underline dotted; + } + +.CodeMirror-hint-information-description { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + margin-top: var(--px-12); +} +/* Popup styles */ +.CodeMirror-info { + background-color: hsl(var(--color-base)); + border: var(--popover-border); + border-radius: var(--border-radius-8); + box-shadow: var(--popover-box-shadow); + color: hsl(var(--color-neutral)); + max-height: 300px; + max-width: 400px; + opacity: 0; + overflow: auto; + padding: var(--px-12); + position: fixed; + transition: opacity 0.15s; + z-index: 10 + + /* Link styles */ +} +.CodeMirror-info a { + color: inherit; + text-decoration: none + } +.CodeMirror-info a:hover { + text-decoration: underline dotted; + } +/* Align elements in header */ +.CodeMirror-info .CodeMirror-info-header { + display: flex; + align-items: baseline; + } +/* Main elements */ +.CodeMirror-info .CodeMirror-info-header > .type-name, + .CodeMirror-info .CodeMirror-info-header > .field-name, + .CodeMirror-info .CodeMirror-info-header > .arg-name, + .CodeMirror-info .CodeMirror-info-header > .directive-name, + .CodeMirror-info .CodeMirror-info-header > .enum-value { + font-size: var(--font-size-h4); + font-weight: var(--font-weight-medium); + } +/* Type names */ +.CodeMirror-info .type-name-pill { + border: 1px solid hsla(var(--color-neutral), var(--alpha-tertiary)); + border-radius: var(--border-radius-4); + color: hsla(var(--color-neutral), var(--alpha-secondary)); + margin-left: var(--px-6); + padding: var(--px-4); + } +/* Descriptions */ +.CodeMirror-info .info-description { + color: hsla(var(--color-neutral), var(--alpha-secondary)); + margin-top: var(--px-12); + overflow: hidden; + } +/* Underline the clickable token */ +.CodeMirror-jump-token { + text-decoration: underline dotted; + cursor: pointer; +} +.auto-inserted-leaf.cm-property { + animation-duration: 6s; + animation-name: insertionFade; + border-radius: var(--border-radius-4); + padding: var(--px-2); +} + +@keyframes insertionFade { + from, + to { + background-color: none; + } + + 15%, + 85% { + background-color: hsla(var(--color-warning), var(--alpha-background-light)); + } +} +button.graphiql-toolbar-button { + display: flex; + align-items: center; + justify-content: center; + height: var(--toolbar-width); + width: var(--toolbar-width) +} +button.graphiql-toolbar-button.error { + background: hsla(var(--color-error), var(--alpha-background-heavy)); + } +.graphiql-execute-button-wrapper { + position: relative; +} + +button.graphiql-execute-button { + background-color: hsl(var(--color-primary)); + border: none; + border-radius: var(--border-radius-8); + cursor: pointer; + height: var(--toolbar-width); + padding: 0; + width: var(--toolbar-width) +} + +button.graphiql-execute-button:hover { + background-color: hsla(var(--color-primary), 0.9); + } + +button.graphiql-execute-button:active { + background-color: hsla(var(--color-primary), 0.8); + } + +button.graphiql-execute-button:focus { + outline: hsla(var(--color-primary), 0.8) auto 1px; + } + +button.graphiql-execute-button > svg { + color: white; + display: block; + height: var(--px-16); + margin: auto; + width: var(--px-16); + } +button.graphiql-toolbar-menu { + display: block; + height: var(--toolbar-width); + width: var(--toolbar-width); +} /*!*********************************************************************************************************************!*\ !*** css ../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js!./style.css ***! @@ -375,7 +2380,7 @@ width: calc(var(--sidebar-width) - (2 * var(--px-8))); } .graphiql-container .graphiql-sidebar button.active { - color: hsla(var(--color-neutral), 1); + color: hsl(var(--color-neutral)); } .graphiql-container .graphiql-sidebar button:not(:first-child) { margin-top: var(--px-4); @@ -491,7 +2496,7 @@ button.graphiql-tab-add > svg { color: hsla(var(--color-neutral), var(--alpha-secondary)); } .graphiql-container .graphiql-editor-tools button.active { - color: hsla(var(--color-neutral), 1); + color: hsl(var(--color-neutral)); } /* The tab buttons to switch between editor tools */ .graphiql-container diff --git a/src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js b/src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js index fe8c6c9c44f..229d3ebe67d 100644 --- a/src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js +++ b/src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js @@ -1,5 +1,4 @@ /******/ (function() { // webpackBootstrap -/******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js": @@ -8,6 +7,7 @@ \**************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -24,8 +24,7 @@ var index = (0, _memoize.default)(function (prop) { /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */); -var _default = index; -exports["default"] = _default; +var _default = exports["default"] = index; /***/ }), @@ -35,6 +34,7 @@ exports["default"] = _default; \**************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -48,8 +48,7 @@ function memoize(fn) { return cache[arg]; }; } -var _default = memoize; -exports["default"] = _default; +var _default = exports["default"] = memoize; /***/ }), @@ -59,6 +58,7 @@ exports["default"] = _default; \****************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -1196,6 +1196,7 @@ exports.size = size; \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -1773,7 +1774,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) { height: rect.height }; } -const platform = { +const platform = exports.platform = { getClippingRect, convertOffsetParentRelativeRectToViewportRelativeRect, isElement, @@ -1810,7 +1811,6 @@ const platform = { * removed from the DOM or hidden from the screen. * @see https://floating-ui.com/docs/autoUpdate */ -exports.platform = platform; function autoUpdate(reference, floating, update, options) { if (options === void 0) { options = {}; @@ -1904,6 +1904,7 @@ exports.computePosition = computePosition; \**************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -1990,10 +1991,11 @@ Object.defineProperty(exports, "size", ({ })); exports.useFloating = useFloating; var _dom = __webpack_require__(/*! @floating-ui/dom */ "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var React = _react; var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /** * Provides data to position an inner element of the floating element so that it * appears centered to the reference element. @@ -2031,7 +2033,7 @@ const arrow = options => { }; }; exports.arrow = arrow; -var index = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect; +var index = typeof document !== 'undefined' ? _react.useLayoutEffect : _react.useEffect; // Fork of `fast-deep-equal` that only does the comparisons we need and compares // functions @@ -2258,6 +2260,7 @@ function useFloating(options) { \***********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2267,17 +2270,15 @@ exports.Animation = void 0; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _easingEs = __webpack_require__(/*! ./utils/easing.es.js */ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js"); class Animation { - constructor(output) { - let keyframes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 1]; - let { - easing, - duration: initialDuration = _utils.defaults.duration, - delay = _utils.defaults.delay, - endDelay = _utils.defaults.endDelay, - repeat = _utils.defaults.repeat, - offset, - direction = "normal" - } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + constructor(output, keyframes = [0, 1], { + easing, + duration: initialDuration = _utils.defaults.duration, + delay = _utils.defaults.delay, + endDelay = _utils.defaults.endDelay, + repeat = _utils.defaults.repeat, + offset, + direction = "normal" + } = {}) { this.startTime = null; this.rate = 1; this.t = 0; @@ -2436,6 +2437,7 @@ exports.Animation = Animation; \*******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2464,6 +2466,7 @@ var _easingEs = __webpack_require__(/*! ./utils/easing.es.js */ "../../../node_m \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2505,6 +2508,7 @@ function getEasingFunction(definition) { \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2525,8 +2529,7 @@ var _stopAnimationEs = __webpack_require__(/*! ./utils/stop-animation.es.js */ " function getDevToolsRecord() { return window.__MOTION_DEV_TOOLS_RECORD; } -function animateStyle(element, key, keyframesDefinition) { - let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; +function animateStyle(element, key, keyframesDefinition, options = {}) { const record = getDevToolsRecord(); const isRecording = options.record !== false && record; let animation; @@ -2703,6 +2706,7 @@ function animateStyle(element, key, keyframesDefinition) { \********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2736,6 +2740,7 @@ function getMotionValue(motionValues, name) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2747,8 +2752,7 @@ var _optionsEs = __webpack_require__(/*! ./utils/options.es.js */ "../../../node var _resolveElementsEs = __webpack_require__(/*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js"); var _controlsEs = __webpack_require__(/*! ./utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js"); var _staggerEs = __webpack_require__(/*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js"); -function animate(elements, keyframes) { - let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +function animate(elements, keyframes, options = {}) { elements = (0, _resolveElementsEs.resolveElements)(elements); const numElements = elements.length; /** @@ -2785,6 +2789,7 @@ function animate(elements, keyframes) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2794,7 +2799,7 @@ exports.style = void 0; var _cssVarEs = __webpack_require__(/*! ./utils/css-var.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js"); var _getStyleNameEs = __webpack_require__(/*! ./utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js"); var _transformsEs = __webpack_require__(/*! ./utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js"); -const style = { +const style = exports.style = { get: (element, name) => { name = (0, _getStyleNameEs.getStyleName)(name); let value = (0, _cssVarEs.isCssVar)(name) ? element.style.getPropertyValue(name) : getComputedStyle(element)[name]; @@ -2813,7 +2818,6 @@ const style = { } } }; -exports.style = style; /***/ }), @@ -2823,6 +2827,7 @@ exports.style = style; \******************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2832,8 +2837,7 @@ exports.withControls = exports.controls = void 0; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _stopAnimationEs = __webpack_require__(/*! ./stop-animation.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js"); const createAnimation = factory => factory(); -const withControls = function (animationFactory, options) { - let duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _utils.defaults.duration; +const withControls = (animationFactory, options, duration = _utils.defaults.duration) => { return new Proxy({ animations: animationFactory.map(createAnimation).filter(Boolean), duration, @@ -2847,7 +2851,7 @@ const withControls = function (animationFactory, options) { */ exports.withControls = withControls; const getActiveAnimation = state => state.animations[0]; -const controls = { +const controls = exports.controls = { get: (target, key) => { const activeAnimation = getActiveAnimation(target); switch (key) { @@ -2893,7 +2897,6 @@ const controls = { return false; } }; -exports.controls = controls; const selectFinished = animation => animation.finished; /***/ }), @@ -2904,6 +2907,7 @@ const selectFinished = animation => animation.finished; \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2915,8 +2919,7 @@ exports.registeredProperties = void 0; var _transformsEs = __webpack_require__(/*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js"); const isCssVar = name => name.startsWith("--"); exports.isCssVar = isCssVar; -const registeredProperties = new Set(); -exports.registeredProperties = registeredProperties; +const registeredProperties = exports.registeredProperties = new Set(); function registerCssVariable(name) { if (registeredProperties.has(name)) return; registeredProperties.add(name); @@ -2942,6 +2945,7 @@ function registerCssVariable(name) { \****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2951,10 +2955,7 @@ exports.cubicBezierAsString = exports.convertEasing = void 0; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); const convertEasing = easing => (0, _utils.isCubicBezier)(easing) ? cubicBezierAsString(easing) : easing; exports.convertEasing = convertEasing; -const cubicBezierAsString = _ref => { - let [a, b, c, d] = _ref; - return `cubic-bezier(${a}, ${b}, ${c}, ${d})`; -}; +const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; exports.cubicBezierAsString = cubicBezierAsString; /***/ }), @@ -2965,6 +2966,7 @@ exports.cubicBezierAsString = cubicBezierAsString; \***************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -2992,8 +2994,7 @@ const featureTests = { }).finished) }; const results = {}; -const supports = {}; -exports.supports = supports; +const supports = exports.supports = {}; for (const key in featureTests) { supports[key] = () => { if (results[key] === undefined) results[key] = featureTests[key](); @@ -3009,6 +3010,7 @@ for (const key in featureTests) { \************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3029,6 +3031,7 @@ function getStyleName(key) { \*******************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3055,6 +3058,7 @@ exports.keyframesList = keyframesList; \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3078,14 +3082,14 @@ exports.getOptions = getOptions; \************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stopAnimation = stopAnimation; -function stopAnimation(animation) { - let needsCommit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; +function stopAnimation(animation, needsCommit = true) { if (!animation || animation.playState === "finished") return; // Suppress error thrown by WAAPI try { @@ -3106,6 +3110,7 @@ function stopAnimation(animation) { \**********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3149,6 +3154,7 @@ function createStyles(keyframes) { \**********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3158,8 +3164,7 @@ exports.createStyleString = createStyleString; var _styleObjectEs = __webpack_require__(/*! ./style-object.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js"); const camelLetterToPipeLetter = letter => `-${letter.toLowerCase()}`; const camelToPipeCase = str => str.replace(/[A-Z]/g, camelLetterToPipeLetter); -function createStyleString() { - let target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; +function createStyleString(target = {}) { const styles = (0, _styleObjectEs.createStyles)(target); let style = ""; for (const key in styles) { @@ -3177,6 +3182,7 @@ function createStyleString() { \********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3189,19 +3195,17 @@ var _dataEs = __webpack_require__(/*! ../data.es.js */ "../../../node_modules/@m * A list of all transformable axes. We'll use this list to generated a version * of each axes for each transform. */ -const axes = ["", "X", "Y", "Z"]; +const axes = exports.axes = ["", "X", "Y", "Z"]; /** * An ordered array of each transformable value. By default, transform values * will be sorted to this order. */ -exports.axes = axes; const order = ["translate", "scale", "rotate", "skew"]; -const transformAlias = { +const transformAlias = exports.transformAlias = { x: "translateX", y: "translateY", z: "translateZ" }; -exports.transformAlias = transformAlias; const rotation = { syntax: "", initialValue: "0deg", @@ -3221,8 +3225,7 @@ const baseTransformProperties = { }, skew: rotation }; -const transformDefinitions = new Map(); -exports.transformDefinitions = transformDefinitions; +const transformDefinitions = exports.transformDefinitions = new Map(); const asTransformCssVar = name => `--motion-${name}`; /** * Generate a list of every possible transform key @@ -3272,6 +3275,7 @@ const transformListToString = (template, name) => `${template} ${name}(var(${asT \**************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3281,14 +3285,9 @@ exports.createGeneratorEasing = createGeneratorEasing; var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js"); function createGeneratorEasing(createGenerator) { const keyframesCache = new WeakMap(); - return function () { - let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (options = {}) => { const generatorCache = new Map(); - const getGenerator = function () { - let from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - let to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - let velocity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - let isScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + const getGenerator = (from = 0, to = 100, velocity = 0, isScale = false) => { const key = `${from}-${to}-${velocity}-${isScale}`; if (!generatorCache.has(key)) { generatorCache.set(key, createGenerator(Object.assign({ @@ -3370,6 +3369,7 @@ const isNumberOrNull = value => typeof value !== "string"; \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3378,8 +3378,7 @@ Object.defineProperty(exports, "__esModule", ({ exports.glide = void 0; var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js"); var _createGeneratorEasingEs = __webpack_require__(/*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js"); -const glide = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.glide); -exports.glide = glide; +const glide = exports.glide = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.glide); /***/ }), @@ -3389,6 +3388,7 @@ exports.glide = glide; \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3397,8 +3397,7 @@ Object.defineProperty(exports, "__esModule", ({ exports.spring = void 0; var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js"); var _createGeneratorEasingEs = __webpack_require__(/*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js"); -const spring = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.spring); -exports.spring = spring; +const spring = exports.spring = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.spring); /***/ }), @@ -3408,6 +3407,7 @@ exports.spring = spring; \************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3419,12 +3419,11 @@ const thresholds = { any: 0, all: 1 }; -function inView(elementOrSelector, onStart) { - let { - root, - margin: rootMargin, - amount = "any" - } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +function inView(elementOrSelector, onStart, { + root, + margin: rootMargin, + amount = "any" +} = {}) { /** * If this browser doesn't support IntersectionObserver, return a dummy stop function. * Default triggering of onStart is tricky - it could be used for starting/stopping @@ -3474,6 +3473,7 @@ function inView(elementOrSelector, onStart) { \**************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3502,12 +3502,11 @@ function getElementSize(target, borderBoxSize) { }; } } -function notifyTarget(_ref) { - let { - target, - contentRect, - borderBoxSize - } = _ref; +function notifyTarget({ + target, + contentRect, + borderBoxSize +}) { var _a; (_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach(handler => { handler({ @@ -3557,6 +3556,7 @@ function resizeElement(target, handler) { \*************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3599,6 +3599,7 @@ function resizeWindow(callback) { \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3619,13 +3620,14 @@ function resize(a, b) { \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.scroll = scroll; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); var _indexEs = __webpack_require__(/*! ../resize/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js"); var _infoEs = __webpack_require__(/*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js"); var _onScrollHandlerEs = __webpack_require__(/*! ./on-scroll-handler.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js"); @@ -3633,8 +3635,7 @@ const scrollListeners = new WeakMap(); const resizeListeners = new WeakMap(); const onScrollHandlers = new WeakMap(); const getEventTarget = element => element === document.documentElement ? window : element; -function scroll(onScroll) { - let _a = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function scroll(onScroll, _a = {}) { var { container = document.documentElement } = _a, @@ -3711,6 +3712,7 @@ function scroll(onScroll) { \****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3780,6 +3782,7 @@ function updateScrollInfo(element, info, time) { \************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3788,14 +3791,12 @@ Object.defineProperty(exports, "__esModule", ({ exports.namedEdges = void 0; exports.resolveEdge = resolveEdge; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); -const namedEdges = { +const namedEdges = exports.namedEdges = { start: 0, center: 0.5, end: 1 }; -exports.namedEdges = namedEdges; -function resolveEdge(edge, length) { - let inset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; +function resolveEdge(edge, length, inset = 0) { let delta = 0; /** * If we have this edge defined as a preset, replace the definition @@ -3838,6 +3839,7 @@ function resolveEdge(edge, length) { \*************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3915,6 +3917,7 @@ function resolveOffsets(container, info, options) { \*************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -3958,6 +3961,7 @@ function calcInset(element, container) { \**************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4004,19 +4008,19 @@ function resolveOffset(offset, containerLength, targetLength, targetInset) { \***************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ScrollOffset = void 0; -const ScrollOffset = { +const ScrollOffset = exports.ScrollOffset = { Enter: [[0, 1], [1, 1]], Exit: [[0, 0], [1, 0]], Any: [[1, 0], [0, 1]], All: [[0, 0], [1, 1]] }; -exports.ScrollOffset = ScrollOffset; /***/ }), @@ -4026,6 +4030,7 @@ exports.ScrollOffset = ScrollOffset; \*****************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4035,9 +4040,7 @@ exports.createOnScrollHandler = createOnScrollHandler; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _infoEs = __webpack_require__(/*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js"); var _indexEs = __webpack_require__(/*! ./offsets/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js"); -function measure(container) { - let target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : container; - let info = arguments.length > 2 ? arguments[2] : undefined; +function measure(container, target = container, info) { /** * Find inset of target within scrollable container */ @@ -4056,8 +4059,7 @@ function measure(container) { info.x.containerLength = container.clientWidth; info.y.containerLength = container.clientHeight; } -function createOnScrollHandler(element, onScroll, info) { - let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; +function createOnScrollHandler(element, onScroll, info, options = {}) { const axis = options.axis || "y"; return { measure: () => measure(element, options.target, info), @@ -4072,10 +4074,9 @@ function createOnScrollHandler(element, onScroll, info) { } function scrubAnimation(controls, axisInfo) { controls.pause(); - controls.forEachNative((animation, _ref) => { - let { - easing - } = _ref; + controls.forEachNative((animation, { + easing + }) => { var _a, _b; if (animation.updateDuration) { if (!easing) animation.easing = _utils.noopReturn; @@ -4101,6 +4102,7 @@ function scrubAnimation(controls, axisInfo) { \*************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4240,6 +4242,7 @@ var _styleStringEs = __webpack_require__(/*! ./animate/utils/style-string.es.js \****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4252,13 +4255,12 @@ const mouseEvent = (element, name, action) => event => { action(); (0, _eventsEs.dispatchPointerEvent)(element, name, event); }; -const hover = { +const hover = exports.hover = { isActive: options => Boolean(options.hover), - subscribe: (element, _ref) => { - let { - enable, - disable - } = _ref; + subscribe: (element, { + enable, + disable + }) => { const onEnter = mouseEvent(element, "hoverstart", enable); const onLeave = mouseEvent(element, "hoverend", disable); element.addEventListener("pointerenter", onEnter); @@ -4269,7 +4271,6 @@ const hover = { }; } }; -exports.hover = hover; /***/ }), @@ -4279,25 +4280,24 @@ exports.hover = hover; \******************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.inView = void 0; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); var _eventsEs = __webpack_require__(/*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js"); var _inViewEs = __webpack_require__(/*! ../../gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js"); -const inView = { +const inView = exports.inView = { isActive: options => Boolean(options.inView), - subscribe: (element, _ref, _ref2) => { - let { - enable, - disable - } = _ref; - let { - inViewOptions = {} - } = _ref2; + subscribe: (element, { + enable, + disable + }, { + inViewOptions = {} + }) => { const { once } = inViewOptions, @@ -4314,7 +4314,6 @@ const inView = { }, viewOptions); } }; -exports.inView = inView; /***/ }), @@ -4324,6 +4323,7 @@ exports.inView = inView; \****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4331,13 +4331,12 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.press = void 0; var _eventsEs = __webpack_require__(/*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js"); -const press = { +const press = exports.press = { isActive: options => Boolean(options.press), - subscribe: (element, _ref) => { - let { - enable, - disable - } = _ref; + subscribe: (element, { + enable, + disable + }) => { const onPointerUp = event => { disable(); (0, _eventsEs.dispatchPointerEvent)(element, "pressend", event); @@ -4355,7 +4354,6 @@ const press = { }; } }; -exports.press = press; /***/ }), @@ -4365,6 +4363,7 @@ exports.press = press; \*******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4372,7 +4371,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.createMotionState = createMotionState; exports.mountedStates = void 0; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); var _heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js"); var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _animateStyleEs = __webpack_require__(/*! ../animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js"); @@ -4399,11 +4398,8 @@ const stateTypes = ["initial", "animate", ...Object.keys(gestures), "exit"]; * A global store of all generated motion states. This can be used to lookup * a motion state for a given Element. */ -const mountedStates = new WeakMap(); -exports.mountedStates = mountedStates; -function createMotionState() { - let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let parent = arguments.length > 1 ? arguments[1] : undefined; +const mountedStates = exports.mountedStates = new WeakMap(); +function createMotionState(options = {}, parent) { /** * The element represented by the motion state. This is an empty reference * when we create the state to support SSR and allow for later mounting @@ -4557,6 +4553,7 @@ function createMotionState() { \**************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4594,6 +4591,7 @@ function dispatchViewEvent(element, name, entry) { \*******************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4623,6 +4621,7 @@ function shallowCompare(next, prev) { \******************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4641,6 +4640,7 @@ function isVariant(definition) { \***********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4664,6 +4664,7 @@ function resolveVariant(definition, variants) { \****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4703,6 +4704,7 @@ const fireNext = iterator => iterator.next(); \**********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4710,7 +4712,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.createAnimationsFromTimeline = createAnimationsFromTimeline; exports.timeline = timeline; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); var _heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js"); var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _staggerEs = __webpack_require__(/*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js"); @@ -4723,8 +4725,7 @@ var _transformsEs = __webpack_require__(/*! ../animate/utils/transforms.es.js */ var _calcTimeEs = __webpack_require__(/*! ./utils/calc-time.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js"); var _editEs = __webpack_require__(/*! ./utils/edit.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js"); var _sortEs = __webpack_require__(/*! ./utils/sort.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js"); -function timeline(definition) { - let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function timeline(definition, options = {}) { var _a; const animationDefinitions = createAnimationsFromTimeline(definition, options); /** @@ -4735,8 +4736,7 @@ function timeline(definition) { // Get the duration from the first animation definition (_a = animationDefinitions[0]) === null || _a === void 0 ? void 0 : _a[3].duration); } -function createAnimationsFromTimeline(definition) { - let _a = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function createAnimationsFromTimeline(definition, _a = {}) { var { defaultOptions = {} } = _a, @@ -4917,6 +4917,7 @@ function getValueSequence(name, sequences) { \********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4945,6 +4946,7 @@ function calcNextTime(current, next, prev, labels) { \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -4987,6 +4989,7 @@ function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { \***************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5009,6 +5012,7 @@ function compareByTime(a, b) { \******************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5041,6 +5045,7 @@ function resolveElements(elements, selectorCache) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5051,13 +5056,11 @@ exports.resolveOption = resolveOption; exports.stagger = stagger; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _animation = __webpack_require__(/*! @motionone/animation */ "../../../node_modules/@motionone/animation/dist/index.es.js"); -function stagger() { - let duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.1; - let { - start = 0, - from = 0, - easing - } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function stagger(duration = 0.1, { + start = 0, + from = 0, + easing +} = {}) { return (i, total) => { const fromIndex = (0, _utils.isNumber)(from) ? from : getFromIndex(from, total); const distance = Math.abs(fromIndex - i); @@ -5090,6 +5093,7 @@ function resolveOption(option, i, total) { \***********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5152,6 +5156,7 @@ function cubicBezier(mX1, mY1, mX2, mY2) { \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5180,6 +5185,7 @@ var _stepsEs = __webpack_require__(/*! ./steps.es.js */ "../../../node_modules/@ \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5187,14 +5193,11 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.steps = void 0; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); -const steps = function (steps) { - let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "end"; - return progress => { - progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 0.001); - const expanded = progress * steps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return (0, _utils.clamp)(0, 1, rounded / steps); - }; +const steps = (steps, direction = "end") => progress => { + progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 0.001); + const expanded = progress * steps; + const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); + return (0, _utils.clamp)(0, 1, rounded / steps); }; exports.steps = steps; @@ -5206,6 +5209,7 @@ exports.steps = steps; \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5215,20 +5219,19 @@ exports.glide = void 0; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); var _velocityEs = __webpack_require__(/*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js"); var _indexEs = __webpack_require__(/*! ../spring/index.es.js */ "../../../node_modules/@motionone/generators/dist/spring/index.es.js"); -const glide = _ref => { - let { - from = 0, - velocity = 0.0, - power = 0.8, - decay = 0.325, - bounceDamping, - bounceStiffness, - changeTarget, - min, - max, - restDistance = 0.5, - restSpeed - } = _ref; +const glide = ({ + from = 0, + velocity = 0.0, + power = 0.8, + decay = 0.325, + bounceDamping, + bounceStiffness, + changeTarget, + min, + max, + restDistance = 0.5, + restSpeed +}) => { decay = _utils.time.ms(decay); const state = { hasReachedTarget: false, @@ -5318,6 +5321,7 @@ exports.glide = glide; \********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5360,18 +5364,18 @@ var _velocityEs = __webpack_require__(/*! ./utils/velocity.es.js */ "../../../no \******************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaults = void 0; -const defaults = { +const defaults = exports.defaults = { stiffness: 100.0, damping: 10.0, mass: 1.0 }; -exports.defaults = defaults; /***/ }), @@ -5381,6 +5385,7 @@ exports.defaults = defaults; \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5392,17 +5397,16 @@ var _defaultsEs = __webpack_require__(/*! ./defaults.es.js */ "../../../node_mod var _utilsEs = __webpack_require__(/*! ./utils.es.js */ "../../../node_modules/@motionone/generators/dist/spring/utils.es.js"); var _hasReachedTargetEs = __webpack_require__(/*! ../utils/has-reached-target.es.js */ "../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js"); var _velocityEs = __webpack_require__(/*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js"); -const spring = function () { - let { - stiffness = _defaultsEs.defaults.stiffness, - damping = _defaultsEs.defaults.damping, - mass = _defaultsEs.defaults.mass, - from = 0, - to = 1, - velocity = 0.0, - restSpeed = 2, - restDistance = 0.5 - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; +const spring = ({ + stiffness = _defaultsEs.defaults.stiffness, + damping = _defaultsEs.defaults.damping, + mass = _defaultsEs.defaults.mass, + from = 0, + to = 1, + velocity = 0.0, + restSpeed = 2, + restDistance = 0.5 +} = {}) => { velocity = velocity ? _utils.time.s(velocity) : 0.0; const state = { done: false, @@ -5444,6 +5448,7 @@ exports.spring = spring; \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5451,12 +5456,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.calcDampingRatio = void 0; var _defaultsEs = __webpack_require__(/*! ./defaults.es.js */ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js"); -const calcDampingRatio = function () { - let stiffness = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _defaultsEs.defaults.stiffness; - let damping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _defaultsEs.defaults.damping; - let mass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _defaultsEs.defaults.mass; - return damping / (2 * Math.sqrt(stiffness * mass)); -}; +const calcDampingRatio = (stiffness = _defaultsEs.defaults.stiffness, damping = _defaultsEs.defaults.damping, mass = _defaultsEs.defaults.mass) => damping / (2 * Math.sqrt(stiffness * mass)); exports.calcDampingRatio = calcDampingRatio; /***/ }), @@ -5467,6 +5467,7 @@ exports.calcDampingRatio = calcDampingRatio; \***************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5485,6 +5486,7 @@ function hasReachedTarget(origin, target, current) { \******************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5494,8 +5496,7 @@ exports.pregenerateKeyframes = pregenerateKeyframes; var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js"); const timeStep = 10; const maxDuration = 10000; -function pregenerateKeyframes(generator) { - let toUnit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _utils.noopReturn; +function pregenerateKeyframes(generator, toUnit = _utils.noopReturn) { let overshootDuration = undefined; let timestamp = timeStep; let state = generator(0); @@ -5529,6 +5530,7 @@ function pregenerateKeyframes(generator) { \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5550,6 +5552,7 @@ function calcGeneratorVelocity(resolveValue, t, current) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5581,6 +5584,7 @@ exports.MotionValue = MotionValue; \***************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5602,6 +5606,7 @@ var _MotionValueEs = __webpack_require__(/*! ./MotionValue.es.js */ "../../../no \***************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5625,6 +5630,7 @@ function removeItem(arr, item) { \***************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5642,20 +5648,20 @@ exports.clamp = clamp; \******************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaults = void 0; -const defaults = { +const defaults = exports.defaults = { duration: 0.3, delay: 0, endDelay: 0, repeat: 0, easing: "ease" }; -exports.defaults = defaults; /***/ }), @@ -5665,6 +5671,7 @@ exports.defaults = defaults; \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5685,6 +5692,7 @@ function getEasingForSegment(easing, i) { \***************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5843,6 +5851,7 @@ var _wrapEs = __webpack_require__(/*! ./wrap.es.js */ "../../../node_modules/@mo \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5855,9 +5864,7 @@ var _offsetEs = __webpack_require__(/*! ./offset.es.js */ "../../../node_modules var _progressEs = __webpack_require__(/*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js"); var _easingEs = __webpack_require__(/*! ./easing.es.js */ "../../../node_modules/@motionone/utils/dist/easing.es.js"); var _clampEs = __webpack_require__(/*! ./clamp.es.js */ "../../../node_modules/@motionone/utils/dist/clamp.es.js"); -function interpolate(output) { - let input = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _offsetEs.defaultOffset)(output.length); - let easing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _noopEs.noopReturn; +function interpolate(output, input = (0, _offsetEs.defaultOffset)(output.length), easing = _noopEs.noopReturn) { const length = output.length; /** * If the input length is lower than the output we @@ -5887,6 +5894,7 @@ function interpolate(output) { \*************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5905,6 +5913,7 @@ exports.isCubicBezier = isCubicBezier; \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5922,6 +5931,7 @@ exports.isEasingGenerator = isEasingGenerator; \************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5940,6 +5950,7 @@ exports.isEasingList = isEasingList; \*********************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5957,6 +5968,7 @@ exports.isFunction = isFunction; \*******************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5974,6 +5986,7 @@ exports.isNumber = isNumber; \*******************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -5991,6 +6004,7 @@ exports.isString = isString; \*************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6008,6 +6022,7 @@ exports.mix = mix; \**************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6027,6 +6042,7 @@ exports.noopReturn = noopReturn; \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6057,6 +6073,7 @@ function defaultOffset(length) { \******************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6074,17 +6091,17 @@ exports.progress = progress; \**************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.time = void 0; -const time = { +const time = exports.time = { ms: seconds => seconds * 1000, s: milliseconds => milliseconds / 1000 }; -exports.time = time; /***/ }), @@ -6094,6 +6111,7 @@ exports.time = time; \******************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6118,6 +6136,7 @@ function velocityPerSecond(velocity, frameDuration) { \**************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6138,6 +6157,7 @@ exports.wrap = wrap; \********************************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -6193,10 +6213,12 @@ function makePushPullAsyncIterableIterator() { // We monkey patch the original generator for clean-up // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const originalReturn = asyncIterableIterator.return.bind(asyncIterableIterator); - asyncIterableIterator.return = function () { + asyncIterableIterator.return = ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ...args) => { isRunning = false; finishedD.resolve(SYMBOL_FINISHED); - return originalReturn(...arguments); + return originalReturn(...args); }; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const originalThrow = asyncIterableIterator.throw.bind(asyncIterableIterator); @@ -6278,6 +6300,7 @@ exports.makePushPullAsyncIterableIterator = makePushPullAsyncIterableIterator; \***************************************************************/ /***/ (function(module) { +"use strict"; function $parcel$export(e, n, v, s) { @@ -6289,10 +6312,9 @@ function $parcel$export(e, n, v, s) { }); } $parcel$export(module.exports, "composeEventHandlers", () => $1a6a90a521dcd173$export$b9ecd428b558ff10); -function $1a6a90a521dcd173$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler) { - let { - checkForDefaultPrevented = true - } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +function $1a6a90a521dcd173$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { + checkForDefaultPrevented = true +} = {}) { return function handleEvent(event) { originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event); if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event); @@ -6307,6 +6329,7 @@ function $1a6a90a521dcd173$export$b9ecd428b558ff10(originalEventHandler, ourEven \*****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $eQpDd$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -6362,6 +6385,7 @@ const $09f4ad68a9251bc3$export$be92b6f5f03c0fe9 = $09f4ad68a9251bc3$export$21b07 \**********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $hnlpS$react = __webpack_require__(/*! react */ "react"); @@ -6493,6 +6517,7 @@ function $1a96635ec239608b$export$c74125a8e3af6bb2(name) { \************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $dJwbH$react = __webpack_require__(/*! react */ "react"); @@ -6518,20 +6543,14 @@ function $9c2aaba23466b352$var$setRef(ref, value) { * A utility to compose multiple refs together * Accepts callback refs and RefObject(s) */ -function $9c2aaba23466b352$export$43e446d32b3d21af() { - for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { - refs[_key] = arguments[_key]; - } +function $9c2aaba23466b352$export$43e446d32b3d21af(...refs) { return node => refs.forEach(ref => $9c2aaba23466b352$var$setRef(ref, node)); } /** * A custom hook that composes multiple refs * Accepts callback refs and RefObject(s) */ -function $9c2aaba23466b352$export$c7b2cbe3552a0d05() { - for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - refs[_key2] = arguments[_key2]; - } +function $9c2aaba23466b352$export$c7b2cbe3552a0d05(...refs) { // eslint-disable-next-line react-hooks/exhaustive-deps return $dJwbH$react.useCallback($9c2aaba23466b352$export$43e446d32b3d21af(...refs), refs); } @@ -6544,6 +6563,7 @@ function $9c2aaba23466b352$export$c7b2cbe3552a0d05() { \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $4O1Ne$react = __webpack_require__(/*! react */ "react"); @@ -6582,8 +6602,7 @@ function $dec3cc0142d4f286$export$fd42f52fd3ae1109(rootComponentName, defaultCon /* ------------------------------------------------------------------------------------------------- * createContextScope * -----------------------------------------------------------------------------------------------*/ -function $dec3cc0142d4f286$export$50c7b4e9d9f19c1(scopeName) { - let createContextScopeDeps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; +function $dec3cc0142d4f286$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) { let defaultContexts = []; /* ----------------------------------------------------------------------------------------------- * createContext @@ -6638,10 +6657,7 @@ function $dec3cc0142d4f286$export$50c7b4e9d9f19c1(scopeName) { /* ------------------------------------------------------------------------------------------------- * composeContextScopes * -----------------------------------------------------------------------------------------------*/ -function $dec3cc0142d4f286$var$composeContextScopes() { - for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) { - scopes[_key] = arguments[_key]; - } +function $dec3cc0142d4f286$var$composeContextScopes(...scopes) { const baseScope = scopes[0]; if (scopes.length === 1) return baseScope; const createScope1 = () => { @@ -6650,11 +6666,10 @@ function $dec3cc0142d4f286$var$composeContextScopes() { scopeName: createScope.scopeName })); return function useComposedScopes(overrideScopes) { - const nextScopes1 = scopeHooks.reduce((nextScopes, _ref) => { - let { - useScope: useScope, - scopeName: scopeName - } = _ref; + const nextScopes1 = scopeHooks.reduce((nextScopes, { + useScope: useScope, + scopeName: scopeName + }) => { // We are calling a hook inside a callback which React warns against to avoid inconsistent // renders, however, scoping doesn't have render side effects so we ignore the rule. // eslint-disable-next-line react-hooks/rules-of-hooks @@ -6682,6 +6697,7 @@ function $dec3cc0142d4f286$var$composeContextScopes() { \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $aJCrN$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -7066,10 +7082,9 @@ const [$f4833395aa1bca1a$export$69b62a49393917d6, $f4833395aa1bca1a$var$useWarni titleName: $f4833395aa1bca1a$var$TITLE_NAME, docsSlug: 'dialog' }); -const $f4833395aa1bca1a$var$TitleWarning = _ref => { - let { - titleId: titleId - } = _ref; +const $f4833395aa1bca1a$var$TitleWarning = ({ + titleId: titleId +}) => { const titleWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$TITLE_WARNING_NAME); const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users. @@ -7085,11 +7100,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl return null; }; const $f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning'; -const $f4833395aa1bca1a$var$DescriptionWarning = _ref2 => { - let { - contentRef: contentRef, - descriptionId: descriptionId - } = _ref2; +const $f4833395aa1bca1a$var$DescriptionWarning = ({ + contentRef: contentRef, + descriptionId: descriptionId +}) => { const descriptionWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME); const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`; $aJCrN$react.useEffect(() => { @@ -7119,6 +7133,7 @@ const $f4833395aa1bca1a$export$f39c2d165cd861fe = $f4833395aa1bca1a$export$fba2f \*********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $9g4ps$react = __webpack_require__(/*! react */ "react"); @@ -7161,6 +7176,7 @@ const $cc45c1b701a63adc$export$2881499e37b75b9a = $cc45c1b701a63adc$export$c760c \*****************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $g2vWm$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -7325,8 +7341,7 @@ Object.assign($d715e0554b679f1f$export$4d5eb2109db14228, { * to mimic layer dismissing behaviour present in OS. * Returns props to pass to the node we want to check for outside events. */ -function $d715e0554b679f1f$var$usePointerDownOutside(onPointerDownOutside) { - let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document; +function $d715e0554b679f1f$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const handlePointerDownOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onPointerDownOutside); const isPointerInsideReactTreeRef = $g2vWm$react.useRef(false); const handleClickRef = $g2vWm$react.useRef(() => {}); @@ -7394,8 +7409,7 @@ function $d715e0554b679f1f$var$usePointerDownOutside(onPointerDownOutside) { * Listens for when focus happens outside a react subtree. * Returns props to pass to the root (node) of the subtree we want to check. */ -function $d715e0554b679f1f$var$useFocusOutside(onFocusOutside) { - let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document; +function $d715e0554b679f1f$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const handleFocusOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onFocusOutside); const isFocusInsideReactTreeRef = $g2vWm$react.useRef(false); $g2vWm$react.useEffect(() => { @@ -7421,10 +7435,9 @@ function $d715e0554b679f1f$var$dispatchUpdate() { const event = new CustomEvent($d715e0554b679f1f$var$CONTEXT_UPDATE); document.dispatchEvent(event); } -function $d715e0554b679f1f$var$handleAndDispatchCustomEvent(name, handler, detail, _ref) { - let { - discrete: discrete - } = _ref; +function $d715e0554b679f1f$var$handleAndDispatchCustomEvent(name, handler, detail, { + discrete: discrete +}) { const target = detail.originalEvent.target; const event = new CustomEvent(name, { bubbles: false, @@ -7447,6 +7460,7 @@ const $d715e0554b679f1f$export$aecb2ddcb55c95be = $d715e0554b679f1f$export$4d5eb \*************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $7dQ7Q$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -7907,6 +7921,7 @@ const $d1bf075a6b218014$export$6d4de93b380beddf = $d1bf075a6b218014$export$f34ec \************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $cnctE$react = __webpack_require__(/*! react */ "react"); @@ -7962,6 +7977,7 @@ const $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9 = $71476a6ed7dbbaf3$export$ac5b5 \***********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $buum9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -8142,10 +8158,9 @@ Object.assign($2bc01e66e04aa9ed$export$20e40289641fbbb6, { * Attempts focusing the first element in a list of candidates. * Stops when focus has actually moved. */ -function $2bc01e66e04aa9ed$var$focusFirst(candidates) { - let { - select = false - } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function $2bc01e66e04aa9ed$var$focusFirst(candidates, { + select = false +} = {}) { const previouslyFocusedElement = document.activeElement; for (const candidate of candidates) { $2bc01e66e04aa9ed$var$focus(candidate, { @@ -8200,10 +8215,9 @@ function $2bc01e66e04aa9ed$var$findVisible(elements, container) { })) return element; } } -function $2bc01e66e04aa9ed$var$isHidden(node, _ref) { - let { - upTo: upTo - } = _ref; +function $2bc01e66e04aa9ed$var$isHidden(node, { + upTo: upTo +}) { if (getComputedStyle(node).visibility === 'hidden') return true; while (node) { // we stop at `upTo` (excluding it) @@ -8216,10 +8230,9 @@ function $2bc01e66e04aa9ed$var$isHidden(node, _ref) { function $2bc01e66e04aa9ed$var$isSelectableInput(element) { return element instanceof HTMLInputElement && 'select' in element; } -function $2bc01e66e04aa9ed$var$focus(element) { - let { - select = false - } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function $2bc01e66e04aa9ed$var$focus(element, { + select = false +} = {}) { // only focus if that element is focusable if (element && element.focus) { const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users @@ -8270,6 +8283,7 @@ const $2bc01e66e04aa9ed$export$be92b6f5f03c0fe9 = $2bc01e66e04aa9ed$export$20e40 \**************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $47woD$react = __webpack_require__(/*! react */ "react"); @@ -8301,6 +8315,7 @@ function $dc478e4659f630c5$export$f680877a34711e37(deterministicId) { \****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $cnSS2$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -9368,6 +9383,7 @@ const $213e4d2df823067d$export$6d4de93b380beddf = $213e4d2df823067d$export$e7142 \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $50Iv9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -9524,13 +9540,12 @@ const $34310caa050a8d63$export$bc4ae5855d3c4fc = /*#__PURE__*/$50Iv9$react.forwa ...detectOverflowOptions }), $50Iv9$floatinguireactdom.size({ ...detectOverflowOptions, - apply: _ref => { - let { - elements: elements, - rects: rects, - availableWidth: availableWidth, - availableHeight: availableHeight - } = _ref; + apply: ({ + elements: elements, + rects: rects, + availableWidth: availableWidth, + availableHeight: availableHeight + }) => { const { width: anchorWidth, height: anchorHeight @@ -9724,6 +9739,7 @@ const $34310caa050a8d63$export$21b07c8f274aebd5 = $34310caa050a8d63$export$79d62 \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $amzHf$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -9773,6 +9789,7 @@ const $913a70b877676c16$export$be92b6f5f03c0fe9 = $913a70b877676c16$export$602ea \********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $fnLeV$react = __webpack_require__(/*! react */ "react"); @@ -9914,6 +9931,7 @@ function $a2fa0214bb2735a1$var$getAnimationName(styles) { \*********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $iMixA$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -10012,6 +10030,7 @@ const $c3def6332c2749a6$export$be92b6f5f03c0fe9 = $c3def6332c2749a6$export$250ff \************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $9QJ9Y$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -10265,6 +10284,7 @@ const $0063afae63b3fa70$export$6d08773d2e66f8f2 = $0063afae63b3fa70$export$ab9df \****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $dAvBt$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -10333,10 +10353,9 @@ $82dc8d030dec7549$var$SlotClone.displayName = 'SlotClone'; /* ------------------------------------------------------------------------------------------------- * Slottable * -----------------------------------------------------------------------------------------------*/ -const $82dc8d030dec7549$export$d9f1ccf0bdb05d45 = _ref => { - let { - children: children - } = _ref; +const $82dc8d030dec7549$export$d9f1ccf0bdb05d45 = ({ + children: children +}) => { return /*#__PURE__*/$dAvBt$react.createElement($dAvBt$react.Fragment, null, children); }; /* ---------------------------------------------------------------------------------------------- */ @@ -10354,9 +10373,9 @@ function $82dc8d030dec7549$var$mergeProps(slotProps, childProps) { const isHandler = /^on[A-Z]/.test(propName); if (isHandler) { // if the handler exists on both, we compose them - if (slotPropValue && childPropValue) overrideProps[propName] = function () { - childPropValue(...arguments); - slotPropValue(...arguments); + if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => { + childPropValue(...args); + slotPropValue(...args); };else if (slotPropValue) overrideProps[propName] = slotPropValue; } else if (propName === 'style') overrideProps[propName] = { ...slotPropValue, @@ -10378,6 +10397,7 @@ const $82dc8d030dec7549$export$be92b6f5f03c0fe9 = $82dc8d030dec7549$export$8c6ed \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $iVrL9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -10830,8 +10850,7 @@ function $c34afbc43c90cc6f$var$getExitSideFromRect(point, rect) { throw new Error('unreachable'); } } -function $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide) { - let padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5; +function $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide, padding = 5) { const paddedExitPoints = []; switch (exitSide) { case 'top': @@ -10960,6 +10979,7 @@ const $c34afbc43c90cc6f$export$21b07c8f274aebd5 = $c34afbc43c90cc6f$export$c27ee \****************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $92muK$react = __webpack_require__(/*! react */ "react"); @@ -10982,11 +11002,8 @@ function $28e03942f763e819$export$25bec8c6f54ee79a(callback) { $92muK$react.useEffect(() => { callbackRef.current = callback; }); // https://github.com/facebook/react/issues/19240 - return $92muK$react.useMemo(() => function () { + return $92muK$react.useMemo(() => (...args) => { var _callbackRef$current; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args); }, []); } @@ -10999,6 +11016,7 @@ function $28e03942f763e819$export$25bec8c6f54ee79a(callback) { \**********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $ijazI$react = __webpack_require__(/*! react */ "react"); @@ -11012,12 +11030,11 @@ function $parcel$export(e, n, v, s) { }); } $parcel$export(module.exports, "useControllableState", () => $b84d42d44371bff7$export$6f32135080cb4c3); -function $b84d42d44371bff7$export$6f32135080cb4c3(_ref) { - let { - prop: prop, - defaultProp: defaultProp, - onChange = () => {} - } = _ref; +function $b84d42d44371bff7$export$6f32135080cb4c3({ + prop: prop, + defaultProp: defaultProp, + onChange = () => {} +}) { const [uncontrolledProp, setUncontrolledProp] = $b84d42d44371bff7$var$useUncontrolledState({ defaultProp: defaultProp, onChange: onChange @@ -11034,11 +11051,10 @@ function $b84d42d44371bff7$export$6f32135080cb4c3(_ref) { }, [isControlled, prop, setUncontrolledProp, handleChange]); return [value1, setValue]; } -function $b84d42d44371bff7$var$useUncontrolledState(_ref2) { - let { - defaultProp: defaultProp, - onChange: onChange - } = _ref2; +function $b84d42d44371bff7$var$useUncontrolledState({ + defaultProp: defaultProp, + onChange: onChange +}) { const uncontrolledState = $ijazI$react.useState(defaultProp); const [value] = uncontrolledState; const prevValueRef = $ijazI$react.useRef(value); @@ -11060,6 +11076,7 @@ function $b84d42d44371bff7$var$useUncontrolledState(_ref2) { \******************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $b0gz3$react = __webpack_require__(/*! react */ "react"); @@ -11077,8 +11094,7 @@ $parcel$export(module.exports, "useEscapeKeydown", () => $24c84e9f83c4454f$expor /** * Listens for when the escape key is down */ -function $24c84e9f83c4454f$export$3a72a57244d6e765(onEscapeKeyDownProp) { - let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document; +function $24c84e9f83c4454f$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const onEscapeKeyDown = $b0gz3$radixuireactusecallbackref.useCallbackRef(onEscapeKeyDownProp); $b0gz3$react.useEffect(() => { const handleKeyDown = event => { @@ -11097,6 +11113,7 @@ function $24c84e9f83c4454f$export$3a72a57244d6e765(onEscapeKeyDownProp) { \*****************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $caHyQ$react = __webpack_require__(/*! react */ "react"); @@ -11127,6 +11144,7 @@ const $ca21affb0542a8a4$export$e5c5a5f917a5871c = Boolean(globalThis === null || \********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $ksDzM$react = __webpack_require__(/*! react */ "react"); @@ -11193,6 +11211,7 @@ function $d2c1d285af17635b$export$1ab7ae714698c4b8(element) { \***************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var $awrN2$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js"); @@ -11250,6 +11269,7 @@ const $685371e9c20848e2$export$be92b6f5f03c0fe9 = $685371e9c20848e2$export$439d2 \**************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -11439,6 +11459,7 @@ exports.suppressOthers = suppressOthers; \*************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -11457,53396 +11478,58242 @@ function clsx() { for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t); return n; } -var _default = clsx; -exports["default"] = _default; +var _default = exports["default"] = clsx; /***/ }), -/***/ "../../../node_modules/copy-to-clipboard/index.js": -/*!********************************************************!*\ - !*** ../../../node_modules/copy-to-clipboard/index.js ***! - \********************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ "../../../node_modules/codemirror/addon/comment/comment.js": +/*!*****************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/comment/comment.js ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -var deselectCurrent = __webpack_require__(/*! toggle-selection */ "../../../node_modules/toggle-selection/index.js"); -var clipboardToIE11Formatting = { - "text/plain": "Text", - "text/html": "Url", - "default": "Text" -}; -var defaultMessage = "Copy to clipboard: #{key}, Enter"; -function format(message) { - var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; - return message.replace(/#{\s*key\s*}/g, copyKey); -} -function copy(text, options) { - var debug, - message, - reselectPrevious, - range, - selection, - mark, - success = false; - if (!options) { - options = {}; +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + + var noOptions = {}; + var nonWS = /[^\s\u00a0]/; + var Pos = CodeMirror.Pos, + cmp = CodeMirror.cmpPos; + function firstNonWS(str) { + var found = str.search(nonWS); + return found == -1 ? 0 : found; } - debug = options.debug || false; - try { - reselectPrevious = deselectCurrent(); - range = document.createRange(); - selection = document.getSelection(); - mark = document.createElement("span"); - mark.textContent = text; - // avoid screen readers from reading out loud the text - mark.ariaHidden = "true"; - // reset user styles for span element - mark.style.all = "unset"; - // prevents scrolling to the end of the page - mark.style.position = "fixed"; - mark.style.top = 0; - mark.style.clip = "rect(0, 0, 0, 0)"; - // used to preserve spaces and line breaks - mark.style.whiteSpace = "pre"; - // do not inherit user-select (it may be `none`) - mark.style.webkitUserSelect = "text"; - mark.style.MozUserSelect = "text"; - mark.style.msUserSelect = "text"; - mark.style.userSelect = "text"; - mark.addEventListener("copy", function (e) { - e.stopPropagation(); - if (options.format) { - e.preventDefault(); - if (typeof e.clipboardData === "undefined") { - // IE 11 - debug && console.warn("unable to use e.clipboardData"); - debug && console.warn("trying IE specific stuff"); - window.clipboardData.clearData(); - var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]; - window.clipboardData.setData(format, text); - } else { - // all other browsers - e.clipboardData.clearData(); - e.clipboardData.setData(options.format, text); - } - } - if (options.onCopy) { - e.preventDefault(); - options.onCopy(e.clipboardData); + CodeMirror.commands.toggleComment = function (cm) { + cm.toggleComment(); + }; + CodeMirror.defineExtension("toggleComment", function (options) { + if (!options) options = noOptions; + var cm = this; + var minLine = Infinity, + ranges = this.listSelections(), + mode = null; + for (var i = ranges.length - 1; i >= 0; i--) { + var from = ranges[i].from(), + to = ranges[i].to(); + if (from.line >= minLine) continue; + if (to.line >= minLine) to = Pos(minLine, 0); + minLine = from.line; + if (mode == null) { + if (cm.uncomment(from, to, options)) mode = "un";else { + cm.lineComment(from, to, options); + mode = "line"; + } + } else if (mode == "un") { + cm.uncomment(from, to, options); + } else { + cm.lineComment(from, to, options); } - }); - document.body.appendChild(mark); - range.selectNodeContents(mark); - selection.addRange(range); - var successful = document.execCommand("copy"); - if (!successful) { - throw new Error("copy command was unsuccessful"); } - success = true; - } catch (err) { - debug && console.error("unable to copy using execCommand: ", err); - debug && console.warn("trying IE specific stuff"); - try { - window.clipboardData.setData(options.format || "text", text); - options.onCopy && options.onCopy(window.clipboardData); - success = true; - } catch (err) { - debug && console.error("unable to copy using clipboardData: ", err); - debug && console.error("falling back to prompt"); - message = format("message" in options ? options.message : defaultMessage); - window.prompt(message, text); + }); + + // Rough heuristic to try and detect lines that are part of multi-line string + function probablyInsideString(cm, pos, line) { + return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"\`]/.test(line); + } + function getMode(cm, pos) { + var mode = cm.getMode(); + return mode.useInnerComments === false || !mode.innerMode ? mode : cm.getModeAt(pos); + } + CodeMirror.defineExtension("lineComment", function (from, to, options) { + if (!options) options = noOptions; + var self = this, + mode = getMode(self, from); + var firstLine = self.getLine(from.line); + if (firstLine == null || probablyInsideString(self, from, firstLine)) return; + var commentString = options.lineComment || mode.lineComment; + if (!commentString) { + if (options.blockCommentStart || mode.blockCommentStart) { + options.fullLines = true; + self.blockComment(from, to, options); + } + return; } - } finally { - if (selection) { - if (typeof selection.removeRange == "function") { - selection.removeRange(range); + var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1); + var pad = options.padding == null ? " " : options.padding; + var blankLines = options.commentBlankLines || from.line == to.line; + self.operation(function () { + if (options.indent) { + var baseString = null; + for (var i = from.line; i < end; ++i) { + var line = self.getLine(i); + var whitespace = line.slice(0, firstNonWS(line)); + if (baseString == null || baseString.length > whitespace.length) { + baseString = whitespace; + } + } + for (var i = from.line; i < end; ++i) { + var line = self.getLine(i), + cut = baseString.length; + if (!blankLines && !nonWS.test(line)) continue; + if (line.slice(0, cut) != baseString) cut = firstNonWS(line); + self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut)); + } } else { - selection.removeAllRanges(); + for (var i = from.line; i < end; ++i) { + if (blankLines || nonWS.test(self.getLine(i))) self.replaceRange(commentString + pad, Pos(i, 0)); + } } + }); + }); + CodeMirror.defineExtension("blockComment", function (from, to, options) { + if (!options) options = noOptions; + var self = this, + mode = getMode(self, from); + var startString = options.blockCommentStart || mode.blockCommentStart; + var endString = options.blockCommentEnd || mode.blockCommentEnd; + if (!startString || !endString) { + if ((options.lineComment || mode.lineComment) && options.fullLines != false) self.lineComment(from, to, options); + return; } - if (mark) { - document.body.removeChild(mark); - } - reselectPrevious(); - } - return success; -} -module.exports = copy; + if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return; + var end = Math.min(to.line, self.lastLine()); + if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end; + var pad = options.padding == null ? " " : options.padding; + if (from.line > end) return; + self.operation(function () { + if (options.fullLines != false) { + var lastLineHasText = nonWS.test(self.getLine(end)); + self.replaceRange(pad + endString, Pos(end)); + self.replaceRange(startString + pad, Pos(from.line, 0)); + var lead = options.blockCommentLead || mode.blockCommentLead; + if (lead != null) for (var i = from.line + 1; i <= end; ++i) if (i != end || lastLineHasText) self.replaceRange(lead + pad, Pos(i, 0)); + } else { + var atCursor = cmp(self.getCursor("to"), to) == 0, + empty = !self.somethingSelected(); + self.replaceRange(endString, to); + if (atCursor) self.setSelection(empty ? to : self.getCursor("from"), to); + self.replaceRange(startString, from); + } + }); + }); + CodeMirror.defineExtension("uncomment", function (from, to, options) { + if (!options) options = noOptions; + var self = this, + mode = getMode(self, from); + var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), + start = Math.min(from.line, end); + + // Try finding line comments + var lineString = options.lineComment || mode.lineComment, + lines = []; + var pad = options.padding == null ? " " : options.padding, + didSomething; + lineComment: { + if (!lineString) break lineComment; + for (var i = start; i <= end; ++i) { + var line = self.getLine(i); + var found = line.indexOf(lineString); + if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1; + if (found == -1 && nonWS.test(line)) break lineComment; + if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment; + lines.push(line); + } + self.operation(function () { + for (var i = start; i <= end; ++i) { + var line = lines[i - start]; + var pos = line.indexOf(lineString), + endPos = pos + lineString.length; + if (pos < 0) continue; + if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length; + didSomething = true; + self.replaceRange("", Pos(i, pos), Pos(i, endPos)); + } + }); + if (didSomething) return true; + } + + // Try block comments + var startString = options.blockCommentStart || mode.blockCommentStart; + var endString = options.blockCommentEnd || mode.blockCommentEnd; + if (!startString || !endString) return false; + var lead = options.blockCommentLead || mode.blockCommentLead; + var startLine = self.getLine(start), + open = startLine.indexOf(startString); + if (open == -1) return false; + var endLine = end == start ? startLine : self.getLine(end); + var close = endLine.indexOf(endString, end == start ? open + startString.length : 0); + var insideStart = Pos(start, open + 1), + insideEnd = Pos(end, close + 1); + if (close == -1 || !/comment/.test(self.getTokenTypeAt(insideStart)) || !/comment/.test(self.getTokenTypeAt(insideEnd)) || self.getRange(insideStart, insideEnd, "\n").indexOf(endString) > -1) return false; + + // Avoid killing block comments completely outside the selection. + // Positions of the last startString before the start of the selection, and the first endString after it. + var lastStart = startLine.lastIndexOf(startString, from.ch); + var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length); + if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false; + // Positions of the first endString after the end of the selection, and the last startString before it. + firstEnd = endLine.indexOf(endString, to.ch); + var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch); + lastStart = firstEnd == -1 || almostLastStart == -1 ? -1 : to.ch + almostLastStart; + if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false; + self.operation(function () { + self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)), Pos(end, close + endString.length)); + var openEnd = open + startString.length; + if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length; + self.replaceRange("", Pos(start, open), Pos(start, openEnd)); + if (lead) for (var i = start + 1; i <= end; ++i) { + var line = self.getLine(i), + found = line.indexOf(lead); + if (found == -1 || nonWS.test(line.slice(0, found))) continue; + var foundEnd = found + lead.length; + if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length; + self.replaceRange("", Pos(i, found), Pos(i, foundEnd)); + } + }); + return true; + }); +}); /***/ }), -/***/ "../../../node_modules/detect-node-es/esm/browser.js": -/*!***********************************************************!*\ - !*** ../../../node_modules/detect-node-es/esm/browser.js ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/codemirror/addon/dialog/dialog.js": +/*!***************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/dialog/dialog.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isNode = void 0; -const isNode = false; -exports.isNode = isNode; +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// Open simple dialogs on top of an editor. Relies on dialog.css. + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + function dialogDiv(cm, template, bottom) { + var wrap = cm.getWrapperElement(); + var dialog; + dialog = wrap.appendChild(document.createElement("div")); + if (bottom) dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";else dialog.className = "CodeMirror-dialog CodeMirror-dialog-top"; + if (typeof template == "string") { + dialog.innerHTML = template; + } else { + // Assuming it's a detached DOM element. + dialog.appendChild(template); + } + CodeMirror.addClass(wrap, 'dialog-opened'); + return dialog; + } + function closeNotification(cm, newVal) { + if (cm.state.currentNotificationClose) cm.state.currentNotificationClose(); + cm.state.currentNotificationClose = newVal; + } + CodeMirror.defineExtension("openDialog", function (template, callback, options) { + if (!options) options = {}; + closeNotification(this, null); + var dialog = dialogDiv(this, template, options.bottom); + var closed = false, + me = this; + function close(newVal) { + if (typeof newVal == 'string') { + inp.value = newVal; + } else { + if (closed) return; + closed = true; + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); + dialog.parentNode.removeChild(dialog); + me.focus(); + if (options.onClose) options.onClose(dialog); + } + } + var inp = dialog.getElementsByTagName("input")[0], + button; + if (inp) { + inp.focus(); + if (options.value) { + inp.value = options.value; + if (options.selectValueOnOpen !== false) { + inp.select(); + } + } + if (options.onInput) CodeMirror.on(inp, "input", function (e) { + options.onInput(e, inp.value, close); + }); + if (options.onKeyUp) CodeMirror.on(inp, "keyup", function (e) { + options.onKeyUp(e, inp.value, close); + }); + CodeMirror.on(inp, "keydown", function (e) { + if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { + return; + } + if (e.keyCode == 27 || options.closeOnEnter !== false && e.keyCode == 13) { + inp.blur(); + CodeMirror.e_stop(e); + close(); + } + if (e.keyCode == 13) callback(inp.value, e); + }); + if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function (evt) { + if (evt.relatedTarget !== null) close(); + }); + } else if (button = dialog.getElementsByTagName("button")[0]) { + CodeMirror.on(button, "click", function () { + close(); + me.focus(); + }); + if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close); + button.focus(); + } + return close; + }); + CodeMirror.defineExtension("openConfirm", function (template, callbacks, options) { + closeNotification(this, null); + var dialog = dialogDiv(this, template, options && options.bottom); + var buttons = dialog.getElementsByTagName("button"); + var closed = false, + me = this, + blurring = 1; + function close() { + if (closed) return; + closed = true; + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); + dialog.parentNode.removeChild(dialog); + me.focus(); + } + buttons[0].focus(); + for (var i = 0; i < buttons.length; ++i) { + var b = buttons[i]; + (function (callback) { + CodeMirror.on(b, "click", function (e) { + CodeMirror.e_preventDefault(e); + close(); + if (callback) callback(me); + }); + })(callbacks[i]); + CodeMirror.on(b, "blur", function () { + --blurring; + setTimeout(function () { + if (blurring <= 0) close(); + }, 200); + }); + CodeMirror.on(b, "focus", function () { + ++blurring; + }); + } + }); + + /* + * openNotification + * Opens a notification, that can be closed with an optional timer + * (default 5000ms timer) and always closes on click. + * + * If a notification is opened while another is opened, it will close the + * currently opened one and open the new one immediately. + */ + CodeMirror.defineExtension("openNotification", function (template, options) { + closeNotification(this, close); + var dialog = dialogDiv(this, template, options && options.bottom); + var closed = false, + doneTimer; + var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000; + function close() { + if (closed) return; + closed = true; + clearTimeout(doneTimer); + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); + dialog.parentNode.removeChild(dialog); + } + CodeMirror.on(dialog, 'click', function (e) { + CodeMirror.e_preventDefault(e); + close(); + }); + if (duration) doneTimer = setTimeout(close, duration); + return close; + }); +}); /***/ }), -/***/ "../../../node_modules/entities/lib/decode.js": -/*!****************************************************!*\ - !*** ../../../node_modules/entities/lib/decode.js ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/codemirror/addon/edit/closebrackets.js": +/*!********************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/edit/closebrackets.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k]; +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + var defaults = { + pairs: "()[]{}''\"\"", + closeBefore: ")]}'\":;>", + triples: "", + explode: "[]{}" + }; + var Pos = CodeMirror.Pos; + CodeMirror.defineOption("autoCloseBrackets", false, function (cm, val, old) { + if (old && old != CodeMirror.Init) { + cm.removeKeyMap(keyMap); + cm.state.closeBrackets = null; + } + if (val) { + ensureBound(getOption(val, "pairs")); + cm.state.closeBrackets = val; + cm.addKeyMap(keyMap); + } + }); + function getOption(conf, name) { + if (name == "pairs" && typeof conf == "string") return conf; + if (typeof conf == "object" && conf[name] != null) return conf[name]; + return defaults[name]; + } + var keyMap = { + Backspace: handleBackspace, + Enter: handleEnter + }; + function ensureBound(chars) { + for (var i = 0; i < chars.length; i++) { + var ch = chars.charAt(i), + key = "'" + ch + "'"; + if (!keyMap[key]) keyMap[key] = handler(ch); + } + } + ensureBound(defaults.pairs + "`"); + function handler(ch) { + return function (cm) { + return handleChar(cm, ch); + }; + } + function getConfig(cm) { + var deflt = cm.state.closeBrackets; + if (!deflt || deflt.override) return deflt; + var mode = cm.getModeAt(cm.getCursor()); + return mode.closeBrackets || deflt; + } + function handleBackspace(cm) { + var conf = getConfig(cm); + if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass; + var pairs = getOption(conf, "pairs"); + var ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) return CodeMirror.Pass; + var around = charsAround(cm, ranges[i].head); + if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass; + } + for (var i = ranges.length - 1; i >= 0; i--) { + var cur = ranges[i].head; + cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete"); + } + } + function handleEnter(cm) { + var conf = getConfig(cm); + var explode = conf && getOption(conf, "explode"); + if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass; + var ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) return CodeMirror.Pass; + var around = charsAround(cm, ranges[i].head); + if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass; + } + cm.operation(function () { + var linesep = cm.lineSeparator() || "\n"; + cm.replaceSelection(linesep + linesep, null); + moveSel(cm, -1); + ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + var line = ranges[i].head.line; + cm.indentLine(line, null, true); + cm.indentLine(line + 1, null, true); } + }); + } + function moveSel(cm, dir) { + var newRanges = [], + ranges = cm.listSelections(), + primary = 0; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range.head == cm.getCursor()) primary = i; + var pos = range.head.ch || dir > 0 ? { + line: range.head.line, + ch: range.head.ch + dir + } : { + line: range.head.line - 1 + }; + newRanges.push({ + anchor: pos, + head: pos + }); + } + cm.setSelections(newRanges, primary); + } + function contractSelection(sel) { + var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0; + return { + anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)), + head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1)) }; } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; + function handleChar(cm, ch) { + var conf = getConfig(cm); + if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass; + var pairs = getOption(conf, "pairs"); + var pos = pairs.indexOf(ch); + if (pos == -1) return CodeMirror.Pass; + var closeBefore = getOption(conf, "closeBefore"); + var triples = getOption(conf, "triples"); + var identical = pairs.charAt(pos + 1) == ch; + var ranges = cm.listSelections(); + var opening = pos % 2 == 0; + var type; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], + cur = range.head, + curType; + var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1)); + if (opening && !range.empty()) { + curType = "surround"; + } else if ((identical || !opening) && next == ch) { + if (identical && stringStartsAfter(cm, cur)) curType = "both";else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch) curType = "skipThree";else curType = "skip"; + } else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 && cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) { + if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass; + curType = "addFour"; + } else if (identical) { + var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur); + if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both";else return CodeMirror.Pass; + } else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) { + curType = "both"; + } else { + return CodeMirror.Pass; + } + if (!type) type = curType;else if (type != curType) return CodeMirror.Pass; + } + var left = pos % 2 ? pairs.charAt(pos - 1) : ch; + var right = pos % 2 ? ch : pairs.charAt(pos + 1); + cm.operation(function () { + if (type == "skip") { + moveSel(cm, 1); + } else if (type == "skipThree") { + moveSel(cm, 3); + } else if (type == "surround") { + var sels = cm.getSelections(); + for (var i = 0; i < sels.length; i++) sels[i] = left + sels[i] + right; + cm.replaceSelections(sels, "around"); + sels = cm.listSelections().slice(); + for (var i = 0; i < sels.length; i++) sels[i] = contractSelection(sels[i]); + cm.setSelections(sels); + } else if (type == "both") { + cm.replaceSelection(left + right, null); + cm.triggerElectric(left + right); + moveSel(cm, -1); + } else if (type == "addFour") { + cm.replaceSelection(left + left + left + left, "before"); + moveSel(cm, 1); + } + }); + } + function charsAround(cm, pos) { + var str = cm.getRange(Pos(pos.line, pos.ch - 1), Pos(pos.line, pos.ch + 1)); + return str.length == 2 ? str : null; + } + function stringStartsAfter(cm, pos) { + var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1)); + return /\bstring/.test(token.type) && token.start == pos.ch && (pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos))); + } }); -var __importStar = void 0 && (void 0).__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod + +/***/ }), + +/***/ "../../../node_modules/codemirror/addon/edit/matchbrackets.js": +/*!********************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/edit/matchbrackets.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8); + var Pos = CodeMirror.Pos; + var matching = { + "(": ")>", + ")": "(<", + "[": "]>", + "]": "[<", + "{": "}>", + "}": "{<", + "<": ">>", + ">": "<<" }; -}; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0; -var decode_data_html_js_1 = __importDefault(__webpack_require__(/*! ./generated/decode-data-html.js */ "../../../node_modules/entities/lib/generated/decode-data-html.js")); -exports.htmlDecodeTree = decode_data_html_js_1.default; -var decode_data_xml_js_1 = __importDefault(__webpack_require__(/*! ./generated/decode-data-xml.js */ "../../../node_modules/entities/lib/generated/decode-data-xml.js")); -exports.xmlDecodeTree = decode_data_xml_js_1.default; -var decode_codepoint_js_1 = __importStar(__webpack_require__(/*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js")); -exports.decodeCodePoint = decode_codepoint_js_1.default; -var decode_codepoint_js_2 = __webpack_require__(/*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js"); -Object.defineProperty(exports, "replaceCodePoint", ({ - enumerable: true, - get: function () { - return decode_codepoint_js_2.replaceCodePoint; + function bracketRegex(config) { + return config && config.bracketRegex || /[(){}[\]]/; + } + function findMatchingBracket(cm, where, config) { + var line = cm.getLineHandle(where.line), + pos = where.ch - 1; + var afterCursor = config && config.afterCursor; + if (afterCursor == null) afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className); + var re = bracketRegex(config); + + // A cursor is defined as between two characters, but in in vim command mode + // (i.e. not insert mode), the cursor is visually represented as a + // highlighted box on top of the 2nd character. Otherwise, we allow matches + // from before or after the cursor. + var match = !afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)] || re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)]; + if (!match) return null; + var dir = match.charAt(1) == ">" ? 1 : -1; + if (config && config.strict && dir > 0 != (pos == where.ch)) return null; + var style = cm.getTokenTypeAt(Pos(where.line, pos + 1)); + var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style, config); + if (found == null) return null; + return { + from: Pos(where.line, pos), + to: found && found.pos, + match: found && found.ch == match.charAt(0), + forward: dir > 0 + }; } -})); -Object.defineProperty(exports, "fromCodePoint", ({ - enumerable: true, - get: function () { - return decode_codepoint_js_2.fromCodePoint; + + // bracketRegex is used to specify which type of bracket to scan + // should be a regexp, e.g. /[[\]]/ + // + // Note: If "where" is on an open bracket, then this bracket is ignored. + // + // Returns false when no bracket was found, null when it reached + // maxScanLines and gave up + function scanForBracket(cm, where, dir, style, config) { + var maxScanLen = config && config.maxScanLineLength || 10000; + var maxScanLines = config && config.maxScanLines || 1000; + var stack = []; + var re = bracketRegex(config); + var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) : Math.max(cm.firstLine() - 1, where.line - maxScanLines); + for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) { + var line = cm.getLine(lineNo); + if (!line) continue; + var pos = dir > 0 ? 0 : line.length - 1, + end = dir > 0 ? line.length : -1; + if (line.length > maxScanLen) continue; + if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0); + for (; pos != end; pos += dir) { + var ch = line.charAt(pos); + if (re.test(ch) && (style === undefined || (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || "") == (style || ""))) { + var match = matching[ch]; + if (match && match.charAt(1) == ">" == dir > 0) stack.push(ch);else if (!stack.length) return { + pos: Pos(lineNo, pos), + ch: ch + };else stack.pop(); + } + } + } + return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null; + } + function matchBrackets(cm, autoclear, config) { + // Disable brace matching in long lines, since it'll cause hugely slow updates + var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000, + highlightNonMatching = config && config.highlightNonMatching; + var marks = [], + ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config); + if (match && (match.match || highlightNonMatching !== false) && cm.getLine(match.from.line).length <= maxHighlightLen) { + var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; + marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), { + className: style + })); + if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), { + className: style + })); + } + } + if (marks.length) { + // Kludge to work around the IE bug from issue #1193, where text + // input stops going to the textarea whenever this fires. + if (ie_lt8 && cm.state.focused) cm.focus(); + var clear = function () { + cm.operation(function () { + for (var i = 0; i < marks.length; i++) marks[i].clear(); + }); + }; + if (autoclear) setTimeout(clear, 800);else return clear; + } } -})); -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -var TO_LOWER_BIT = 32; -var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {})); -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F; -} -function isAsciiAlphaNumeric(code) { - return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -var EntityDecoder = /** @class */function () { - function EntityDecoder( /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; + function doMatchBrackets(cm) { + cm.operation(function () { + if (cm.state.matchBrackets.currentlyHighlighted) { + cm.state.matchBrackets.currentlyHighlighted(); + cm.state.matchBrackets.currentlyHighlighted = null; + } + cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets); + }); } - /** Resets the instance to make it reusable. */ - EntityDecoder.prototype.startEntity = function (decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - }; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.write = function (str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: - { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: - { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: - { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: - { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: - { - return this.stateNamedEntity(str, offset); - } + function clearHighlighted(cm) { + if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) { + cm.state.matchBrackets.currentlyHighlighted(); + cm.state.matchBrackets.currentlyHighlighted = null; } - }; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericStart = function (str, offset) { - if (offset >= str.length) { - return -1; + } + CodeMirror.defineOption("matchBrackets", false, function (cm, val, old) { + if (old && old != CodeMirror.Init) { + cm.off("cursorActivity", doMatchBrackets); + cm.off("focus", doMatchBrackets); + cm.off("blur", clearHighlighted); + clearHighlighted(cm); } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); + if (val) { + cm.state.matchBrackets = typeof val == "object" ? val : {}; + cm.on("cursorActivity", doMatchBrackets); + cm.on("focus", doMatchBrackets); + cm.on("blur", clearHighlighted); } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - }; - EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) { - if (start !== end) { - var digitCount = end - start; - this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - }; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericHex = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - offset += 1; + }); + CodeMirror.defineExtension("matchBrackets", function () { + matchBrackets(this, true); + }); + CodeMirror.defineExtension("findMatchingBracket", function (pos, config, oldConfig) { + // Backwards-compatibility kludge + if (oldConfig || typeof config == "boolean") { + if (!oldConfig) { + config = config ? { + strict: true + } : null; } else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); + oldConfig.strict = config; + config = oldConfig; } } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - }; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericDecimal = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char)) { - offset += 1; - } else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); + return findMatchingBracket(this, pos, config); + }); + CodeMirror.defineExtension("scanForBracket", function (pos, dir, style, config) { + return scanForBracket(this, pos, dir, style, config); + }); +}); + +/***/ }), + +/***/ "../../../node_modules/codemirror/addon/fold/brace-fold.js": +/*!*****************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/fold/brace-fold.js ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + + function bracketFolding(pairs) { + return function (cm, start) { + var line = start.line, + lineText = cm.getLine(line); + function findOpening(pair) { + var tokenType; + for (var at = start.ch, pass = 0;;) { + var found = at <= 0 ? -1 : lineText.lastIndexOf(pair[0], at - 1); + if (found == -1) { + if (pass == 1) break; + pass = 1; + at = lineText.length; + continue; + } + if (pass == 1 && found < start.ch) break; + tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)); + if (!/^(comment|string)/.test(tokenType)) return { + ch: found + 1, + tokenType: tokenType, + pair: pair + }; + at = found - 1; + } + } + function findRange(found) { + var count = 1, + lastLine = cm.lastLine(), + end, + startCh = found.ch, + endCh; + outer: for (var i = line; i <= lastLine; ++i) { + var text = cm.getLine(i), + pos = i == line ? startCh : 0; + for (;;) { + var nextOpen = text.indexOf(found.pair[0], pos), + nextClose = text.indexOf(found.pair[1], pos); + if (nextOpen < 0) nextOpen = text.length; + if (nextClose < 0) nextClose = text.length; + pos = Math.min(nextOpen, nextClose); + if (pos == text.length) break; + if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == found.tokenType) { + if (pos == nextOpen) ++count;else if (! --count) { + end = i; + endCh = pos; + break outer; + } + } + ++pos; + } + } + if (end == null || line == end) return null; + return { + from: CodeMirror.Pos(line, startCh), + to: CodeMirror.Pos(end, endCh) + }; } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - }; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); + var found = []; + for (var i = 0; i < pairs.length; i++) { + var open = findOpening(pairs[i]); + if (open) found.push(open); } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - }; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNamedEntity = function (str, offset) { - var decodeTree = this.decodeTree; - var current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - var char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - this.decodeMode === DecodingMode.Attribute && ( - // We shouldn't have consumed any characters after the entity, - valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); + found.sort(function (a, b) { + return a.ch - b.ch; + }); + for (var i = 0; i < found.length; i++) { + var range = findRange(found[i]); + if (range) return range; } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } + return null; + }; + } + CodeMirror.registerHelper("fold", "brace", bracketFolding([["{", "}"], ["[", "]"]])); + CodeMirror.registerHelper("fold", "brace-paren", bracketFolding([["{", "}"], ["[", "]"], ["(", ")"]])); + CodeMirror.registerHelper("fold", "import", function (cm, start) { + function hasImport(line) { + if (line < cm.firstLine() || line > cm.lastLine()) return null; + var start = cm.getTokenAt(CodeMirror.Pos(line, 1)); + if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1)); + if (start.type != "keyword" || start.string != "import") return null; + // Now find closing semicolon, return its position + for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) { + var text = cm.getLine(i), + semi = text.indexOf(";"); + if (semi != -1) return { + startCh: start.end, + end: CodeMirror.Pos(i, semi) + }; } } - return -1; - }; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () { - var _a; - var _b = this, - result = _b.result, - decodeTree = _b.decodeTree; - var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - }; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) { - var decodeTree = this.decodeTree; - this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); + var startLine = start.line, + has = hasImport(startLine), + prev; + if (!has || hasImport(startLine - 1) || (prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1) return null; + for (var end = has.end;;) { + var next = hasImport(end.line + 1); + if (next == null) break; + end = next.end; } - return consumed; - }; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.end = function () { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: - { - // Emit a named entity if we have one. - return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: - { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: - { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: - { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: - { - // Return 0 if we have no entity. - return 0; - } + return { + from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)), + to: end + }; + }); + CodeMirror.registerHelper("fold", "include", function (cm, start) { + function hasInclude(line) { + if (line < cm.firstLine() || line > cm.lastLine()) return null; + var start = cm.getTokenAt(CodeMirror.Pos(line, 1)); + if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1)); + if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8; + } + var startLine = start.line, + has = hasInclude(startLine); + if (has == null || hasInclude(startLine - 1) != null) return null; + for (var end = startLine;;) { + var next = hasInclude(end + 1); + if (next == null) break; + ++end; } + return { + from: CodeMirror.Pos(startLine, has + 1), + to: cm.clipPos(CodeMirror.Pos(end)) + }; + }); +}); + +/***/ }), + +/***/ "../../../node_modules/codemirror/addon/fold/foldcode.js": +/*!***************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/fold/foldcode.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + + function doFold(cm, pos, options, force) { + if (options && options.call) { + var finder = options; + options = null; + } else { + var finder = getOption(cm, options, "rangeFinder"); + } + if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0); + var minSize = getOption(cm, options, "minFoldSize"); + function getRange(allowFolded) { + var range = finder(cm, pos); + if (!range || range.to.line - range.from.line < minSize) return null; + if (force === "fold") return range; + var marks = cm.findMarksAt(range.from); + for (var i = 0; i < marks.length; ++i) { + if (marks[i].__isFold) { + if (!allowFolded) return null; + range.cleared = true; + marks[i].clear(); + } + } + return range; + } + var range = getRange(true); + if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) { + pos = CodeMirror.Pos(pos.line - 1, 0); + range = getRange(false); + } + if (!range || range.cleared || force === "unfold") return; + var myWidget = makeWidget(cm, options, range); + CodeMirror.on(myWidget, "mousedown", function (e) { + myRange.clear(); + CodeMirror.e_preventDefault(e); + }); + var myRange = cm.markText(range.from, range.to, { + replacedWith: myWidget, + clearOnEnter: getOption(cm, options, "clearOnEnter"), + __isFold: true + }); + myRange.on("clear", function (from, to) { + CodeMirror.signal(cm, "unfold", cm, from, to); + }); + CodeMirror.signal(cm, "fold", cm, range.from, range.to); + } + function makeWidget(cm, options, range) { + var widget = getOption(cm, options, "widget"); + if (typeof widget == "function") { + widget = widget(range.from, range.to); + } + if (typeof widget == "string") { + var text = document.createTextNode(widget); + widget = document.createElement("span"); + widget.appendChild(text); + widget.className = "CodeMirror-foldmarker"; + } else if (widget) { + widget = widget.cloneNode(true); + } + return widget; + } + + // Clumsy backwards-compatible interface + CodeMirror.newFoldFunction = function (rangeFinder, widget) { + return function (cm, pos) { + doFold(cm, pos, { + rangeFinder: rangeFinder, + widget: widget + }); + }; }; - return EntityDecoder; -}(); -exports.EntityDecoder = EntityDecoder; -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - var ret = ""; - var decoder = new EntityDecoder(decodeTree, function (str) { - return ret += (0, decode_codepoint_js_1.fromCodePoint)(str); + + // New-style interface + CodeMirror.defineExtension("foldCode", function (pos, options, force) { + doFold(this, pos, options, force); }); - return function decodeWithTrie(str, decodeMode) { - var lastIndex = 0; - var offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - var len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; + CodeMirror.defineExtension("isFolded", function (pos) { + var marks = this.findMarksAt(pos); + for (var i = 0; i < marks.length; ++i) if (marks[i].__isFold) return true; + }); + CodeMirror.commands.toggleFold = function (cm) { + cm.foldCode(cm.getCursor()); + }; + CodeMirror.commands.fold = function (cm) { + cm.foldCode(cm.getCursor(), null, "fold"); + }; + CodeMirror.commands.unfold = function (cm) { + cm.foldCode(cm.getCursor(), { + scanUp: false + }, "unfold"); + }; + CodeMirror.commands.foldAll = function (cm) { + cm.operation(function () { + for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) cm.foldCode(CodeMirror.Pos(i, 0), { + scanUp: false + }, "fold"); + }); + }; + CodeMirror.commands.unfoldAll = function (cm) { + cm.operation(function () { + for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) cm.foldCode(CodeMirror.Pos(i, 0), { + scanUp: false + }, "unfold"); + }); + }; + CodeMirror.registerHelper("fold", "combine", function () { + var funcs = Array.prototype.slice.call(arguments, 0); + return function (cm, start) { + for (var i = 0; i < funcs.length; ++i) { + var found = funcs[i](cm, start); + if (found) return found; } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; + }; + }); + CodeMirror.registerHelper("fold", "auto", function (cm, start) { + var helpers = cm.getHelpers(start, "fold"); + for (var i = 0; i < helpers.length; i++) { + var cur = helpers[i](cm, start); + if (cur) return cur; } - var result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; + }); + var defaultOptions = { + rangeFinder: CodeMirror.fold.auto, + widget: "\u2194", + minFoldSize: 0, + scanUp: false, + clearOnEnter: true }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -function determineBranch(decodeTree, current, nodeIdx, char) { - var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - var jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + CodeMirror.defineOption("foldOptions", null); + function getOption(cm, options, name) { + if (options && options[name] !== undefined) return options[name]; + var editorOptions = cm.options.foldOptions; + if (editorOptions && editorOptions[name] !== undefined) return editorOptions[name]; + return defaultOptions[name]; + } + CodeMirror.defineExtension("foldOption", function (options, name) { + return getOption(this, options, name); + }); +}); + +/***/ }), + +/***/ "../../../node_modules/codemirror/addon/fold/foldgutter.js": +/*!*****************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/fold/foldgutter.js ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./foldcode */ "../../../node_modules/codemirror/addon/fold/foldcode.js"));else {} +})(function (CodeMirror) { + "use strict"; + + CodeMirror.defineOption("foldGutter", false, function (cm, val, old) { + if (old && old != CodeMirror.Init) { + cm.clearGutter(cm.state.foldGutter.options.gutter); + cm.state.foldGutter = null; + cm.off("gutterClick", onGutterClick); + cm.off("changes", onChange); + cm.off("viewportChange", onViewportChange); + cm.off("fold", onFold); + cm.off("unfold", onFold); + cm.off("swapDoc", onChange); + } + if (val) { + cm.state.foldGutter = new State(parseOptions(val)); + updateInViewport(cm); + cm.on("gutterClick", onGutterClick); + cm.on("changes", onChange); + cm.on("viewportChange", onViewportChange); + cm.on("fold", onFold); + cm.on("unfold", onFold); + cm.on("swapDoc", onChange); + } + }); + var Pos = CodeMirror.Pos; + function State(options) { + this.options = options; + this.from = this.to = 0; + } + function parseOptions(opts) { + if (opts === true) opts = {}; + if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter"; + if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open"; + if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded"; + return opts; + } + function isFolded(cm, line) { + var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0)); + for (var i = 0; i < marks.length; ++i) { + if (marks[i].__isFold) { + var fromPos = marks[i].find(-1); + if (fromPos && fromPos.line === line) return marks[i]; + } + } + } + function marker(spec) { + if (typeof spec == "string") { + var elt = document.createElement("div"); + elt.className = spec + " CodeMirror-guttermarker-subtle"; + return elt; + } else { + return spec.cloneNode(true); + } + } + function updateFoldInfo(cm, from, to) { + var opts = cm.state.foldGutter.options, + cur = from - 1; + var minSize = cm.foldOption(opts, "minFoldSize"); + var func = cm.foldOption(opts, "rangeFinder"); + // we can reuse the built-in indicator element if its className matches the new state + var clsFolded = typeof opts.indicatorFolded == "string" && classTest(opts.indicatorFolded); + var clsOpen = typeof opts.indicatorOpen == "string" && classTest(opts.indicatorOpen); + cm.eachLine(from, to, function (line) { + ++cur; + var mark = null; + var old = line.gutterMarkers; + if (old) old = old[opts.gutter]; + if (isFolded(cm, cur)) { + if (clsFolded && old && clsFolded.test(old.className)) return; + mark = marker(opts.indicatorFolded); + } else { + var pos = Pos(cur, 0); + var range = func && func(cm, pos); + if (range && range.to.line - range.from.line >= minSize) { + if (clsOpen && old && clsOpen.test(old.className)) return; + mark = marker(opts.indicatorOpen); + } + } + if (!mark && !old) return; + cm.setGutterMarker(line, opts.gutter, mark); + }); } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - var value = char - jumpOffset; - return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1; + + // copied from CodeMirror/src/util/dom.js + function classTest(cls) { + return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - var lo = nodeIdx; - var hi = lo + branchCount - 1; - while (lo <= hi) { - var mid = lo + hi >>> 1; - var midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } else if (midVal > char) { - hi = mid - 1; - } else { - return decodeTree[mid + branchCount]; - } + function updateInViewport(cm) { + var vp = cm.getViewport(), + state = cm.state.foldGutter; + if (!state) return; + cm.operation(function () { + updateFoldInfo(cm, vp.from, vp.to); + }); + state.from = vp.from; + state.to = vp.to; + } + function onGutterClick(cm, line, gutter) { + var state = cm.state.foldGutter; + if (!state) return; + var opts = state.options; + if (gutter != opts.gutter) return; + var folded = isFolded(cm, line); + if (folded) folded.clear();else cm.foldCode(Pos(line, 0), opts); + } + function onChange(cm) { + var state = cm.state.foldGutter; + if (!state) return; + var opts = state.options; + state.from = state.to = 0; + clearTimeout(state.changeUpdate); + state.changeUpdate = setTimeout(function () { + updateInViewport(cm); + }, opts.foldOnChangeTimeSpan || 600); + } + function onViewportChange(cm) { + var state = cm.state.foldGutter; + if (!state) return; + var opts = state.options; + clearTimeout(state.changeUpdate); + state.changeUpdate = setTimeout(function () { + var vp = cm.getViewport(); + if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) { + updateInViewport(cm); + } else { + cm.operation(function () { + if (vp.from < state.from) { + updateFoldInfo(cm, vp.from, state.from); + state.from = vp.from; + } + if (vp.to > state.to) { + updateFoldInfo(cm, state.to, vp.to); + state.to = vp.to; + } + }); + } + }, opts.updateViewportTimeSpan || 400); } - return -1; -} -exports.determineBranch = determineBranch; -var htmlDecoder = getDecoder(decode_data_html_js_1.default); -var xmlDecoder = getDecoder(decode_data_xml_js_1.default); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -function decodeHTML(str, mode) { - if (mode === void 0) { - mode = DecodingMode.Legacy; + function onFold(cm, from) { + var state = cm.state.foldGutter; + if (!state) return; + var line = from.line; + if (line >= state.from && line < state.to) updateFoldInfo(cm, line, line + 1); } - return htmlDecoder(str, mode); -} -exports.decodeHTML = decodeHTML; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLAttribute(str) { - return htmlDecoder(str, DecodingMode.Attribute); -} -exports.decodeHTMLAttribute = decodeHTMLAttribute; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLStrict(str) { - return htmlDecoder(str, DecodingMode.Strict); -} -exports.decodeHTMLStrict = decodeHTMLStrict; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeXML(str) { - return xmlDecoder(str, DecodingMode.Strict); -} -exports.decodeXML = decodeXML; +}); /***/ }), -/***/ "../../../node_modules/entities/lib/decode_codepoint.js": -/*!**************************************************************!*\ - !*** ../../../node_modules/entities/lib/decode_codepoint.js ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - +/***/ "../../../node_modules/codemirror/addon/hint/show-hint.js": +/*!****************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/hint/show-hint.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.replaceCodePoint = exports.fromCodePoint = void 0; -var decodeMap = new Map([[0, 65533], -// C1 Unicode control character reference replacements -[128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376]]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -exports.fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { - var output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(codePoint >>> 10 & 0x3ff | 0xd800); - codePoint = 0xdc00 | codePoint & 0x3ff; - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -function replaceCodePoint(codePoint) { - var _a; - if (codePoint >= 0xd800 && codePoint <= 0xdfff || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} -exports.replaceCodePoint = replaceCodePoint; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -function decodeCodePoint(codePoint) { - return (0, exports.fromCodePoint)(replaceCodePoint(codePoint)); -} -exports["default"] = decodeCodePoint; -/***/ }), +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE -/***/ "../../../node_modules/entities/lib/encode.js": -/*!****************************************************!*\ - !*** ../../../node_modules/entities/lib/encode.js ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +// declare global: DOMRect +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + var HINT_ELEMENT_CLASS = "CodeMirror-hint"; + var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod + // This is the old interface, kept around for now to stay + // backwards-compatible. + CodeMirror.showHint = function (cm, getHints, options) { + if (!getHints) return cm.showHint(options); + if (options && options.async) getHints.async = true; + var newOpts = { + hint: getHints + }; + if (options) for (var prop in options) newOpts[prop] = options[prop]; + return cm.showHint(newOpts); }; -}; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.encodeNonAsciiHTML = exports.encodeHTML = void 0; -var encode_html_js_1 = __importDefault(__webpack_require__(/*! ./generated/encode-html.js */ "../../../node_modules/entities/lib/generated/encode-html.js")); -var escape_js_1 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js"); -var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeHTML(data) { - return encodeHTMLTrieRe(htmlReplacer, data); -} -exports.encodeHTML = encodeHTML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeNonAsciiHTML(data) { - return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data); -} -exports.encodeNonAsciiHTML = encodeNonAsciiHTML; -function encodeHTMLTrieRe(regExp, str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = regExp.exec(str)) !== null) { - var i = match.index; - ret += str.substring(lastIdx, i); - var char = str.charCodeAt(i); - var next = encode_html_js_1.default.get(char); - if (typeof next === "object") { - // We are in a branch. Try to match the next char. - if (i + 1 < str.length) { - var nextChar = str.charCodeAt(i + 1); - var value = typeof next.n === "number" ? next.n === nextChar ? next.o : undefined : next.n.get(nextChar); - if (value !== undefined) { - ret += value; - lastIdx = regExp.lastIndex += 1; - continue; - } + CodeMirror.defineExtension("showHint", function (options) { + options = parseOptions(this, this.getCursor("start"), options); + var selections = this.listSelections(); + if (selections.length > 1) return; + // By default, don't allow completion when something is selected. + // A hint function can have a `supportsSelection` property to + // indicate that it can handle selections. + if (this.somethingSelected()) { + if (!options.hint.supportsSelection) return; + // Don't try with cross-line selections + for (var i = 0; i < selections.length; i++) if (selections[i].head.line != selections[i].anchor.line) return; + } + if (this.state.completionActive) this.state.completionActive.close(); + var completion = this.state.completionActive = new Completion(this, options); + if (!completion.options.hint) return; + CodeMirror.signal(this, "startCompletion", this); + completion.update(true); + }); + CodeMirror.defineExtension("closeHint", function () { + if (this.state.completionActive) this.state.completionActive.close(); + }); + function Completion(cm, options) { + this.cm = cm; + this.options = options; + this.widget = null; + this.debounce = 0; + this.tick = 0; + this.startPos = this.cm.getCursor("start"); + this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length; + if (this.options.updateOnCursorActivity) { + var self = this; + cm.on("cursorActivity", this.activityFunc = function () { + self.cursorActivity(); + }); + } + } + var requestAnimationFrame = window.requestAnimationFrame || function (fn) { + return setTimeout(fn, 1000 / 60); + }; + var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; + Completion.prototype = { + close: function () { + if (!this.active()) return; + this.cm.state.completionActive = null; + this.tick = null; + if (this.options.updateOnCursorActivity) { + this.cm.off("cursorActivity", this.activityFunc); + } + if (this.widget && this.data) CodeMirror.signal(this.data, "close"); + if (this.widget) this.widget.close(); + CodeMirror.signal(this.cm, "endCompletion", this.cm); + }, + active: function () { + return this.cm.state.completionActive == this; + }, + pick: function (data, i) { + var completion = data.list[i], + self = this; + this.cm.operation(function () { + if (completion.hint) completion.hint(self.cm, data, completion);else self.cm.replaceRange(getText(completion), completion.from || data.from, completion.to || data.to, "complete"); + CodeMirror.signal(data, "pick", completion); + self.cm.scrollIntoView(); + }); + if (this.options.closeOnPick) { + this.close(); + } + }, + cursorActivity: function () { + if (this.debounce) { + cancelAnimationFrame(this.debounce); + this.debounce = 0; + } + var identStart = this.startPos; + if (this.data) { + identStart = this.data.from; + } + var pos = this.cm.getCursor(), + line = this.cm.getLine(pos.line); + if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || pos.ch < identStart.ch || this.cm.somethingSelected() || !pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1))) { + this.close(); + } else { + var self = this; + this.debounce = requestAnimationFrame(function () { + self.update(); + }); + if (this.widget) this.widget.disable(); + } + }, + update: function (first) { + if (this.tick == null) return; + var self = this, + myTick = ++this.tick; + fetchHints(this.options.hint, this.cm, this.options, function (data) { + if (self.tick == myTick) self.finishUpdate(data, first); + }); + }, + finishUpdate: function (data, first) { + if (this.data) CodeMirror.signal(this.data, "update"); + var picked = this.widget && this.widget.picked || first && this.options.completeSingle; + if (this.widget) this.widget.close(); + this.data = data; + if (data && data.list.length) { + if (picked && data.list.length == 1) { + this.pick(data, 0); + } else { + this.widget = new Widget(this, data); + CodeMirror.signal(data, "shown"); + } } - next = next.v; } - // We might have a tree node without a value; skip and use a numeric entity. - if (next !== undefined) { - ret += next; - lastIdx = i + 1; + }; + function parseOptions(cm, pos, options) { + var editor = cm.options.hintOptions; + var out = {}; + for (var prop in defaultOptions) out[prop] = defaultOptions[prop]; + if (editor) for (var prop in editor) if (editor[prop] !== undefined) out[prop] = editor[prop]; + if (options) for (var prop in options) if (options[prop] !== undefined) out[prop] = options[prop]; + if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos); + return out; + } + function getText(completion) { + if (typeof completion == "string") return completion;else return completion.text; + } + function buildKeyMap(completion, handle) { + var baseMap = { + Up: function () { + handle.moveFocus(-1); + }, + Down: function () { + handle.moveFocus(1); + }, + PageUp: function () { + handle.moveFocus(-handle.menuSize() + 1, true); + }, + PageDown: function () { + handle.moveFocus(handle.menuSize() - 1, true); + }, + Home: function () { + handle.setFocus(0); + }, + End: function () { + handle.setFocus(handle.length - 1); + }, + Enter: handle.pick, + Tab: handle.pick, + Esc: handle.close + }; + var mac = /Mac/.test(navigator.platform); + if (mac) { + baseMap["Ctrl-P"] = function () { + handle.moveFocus(-1); + }; + baseMap["Ctrl-N"] = function () { + handle.moveFocus(1); + }; + } + var custom = completion.options.customKeys; + var ourMap = custom ? {} : baseMap; + function addBinding(key, val) { + var bound; + if (typeof val != "string") bound = function (cm) { + return val(cm, handle); + }; + // This mechanism is deprecated + else if (baseMap.hasOwnProperty(val)) bound = baseMap[val];else bound = val; + ourMap[key] = bound; + } + if (custom) for (var key in custom) if (custom.hasOwnProperty(key)) addBinding(key, custom[key]); + var extra = completion.options.extraKeys; + if (extra) for (var key in extra) if (extra.hasOwnProperty(key)) addBinding(key, extra[key]); + return ourMap; + } + function getHintElement(hintsElement, el) { + while (el && el != hintsElement) { + if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el; + el = el.parentNode; + } + } + function Widget(completion, data) { + this.id = "cm-complete-" + Math.floor(Math.random(1e6)); + this.completion = completion; + this.data = data; + this.picked = false; + var widget = this, + cm = completion.cm; + var ownerDocument = cm.getInputField().ownerDocument; + var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow; + var hints = this.hints = ownerDocument.createElement("ul"); + hints.setAttribute("role", "listbox"); + hints.setAttribute("aria-expanded", "true"); + hints.id = this.id; + var theme = completion.cm.options.theme; + hints.className = "CodeMirror-hints " + theme; + this.selectedHint = data.selectedHint || 0; + var completions = data.list; + for (var i = 0; i < completions.length; ++i) { + var elt = hints.appendChild(ownerDocument.createElement("li")), + cur = completions[i]; + var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); + if (cur.className != null) className = cur.className + " " + className; + elt.className = className; + if (i == this.selectedHint) elt.setAttribute("aria-selected", "true"); + elt.id = this.id + "-" + i; + elt.setAttribute("role", "option"); + if (cur.render) cur.render(elt, data, cur);else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur))); + elt.hintId = i; + } + var container = completion.options.container || ownerDocument.body; + var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null); + var left = pos.left, + top = pos.bottom, + below = true; + var offsetLeft = 0, + offsetTop = 0; + if (container !== ownerDocument.body) { + // We offset the cursor position because left and top are relative to the offsetParent's top left corner. + var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1; + var offsetParent = isContainerPositioned ? container : container.offsetParent; + var offsetParentPosition = offsetParent.getBoundingClientRect(); + var bodyPosition = ownerDocument.body.getBoundingClientRect(); + offsetLeft = offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft; + offsetTop = offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop; + } + hints.style.left = left - offsetLeft + "px"; + hints.style.top = top - offsetTop + "px"; + + // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. + var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth); + var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight); + container.appendChild(hints); + cm.getInputField().setAttribute("aria-autocomplete", "list"); + cm.getInputField().setAttribute("aria-owns", this.id); + cm.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint); + var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect(); + var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false; + + // Compute in the timeout to avoid reflow on init + var startScroll; + setTimeout(function () { + startScroll = cm.getScrollInfo(); + }); + var overlapY = box.bottom - winH; + if (overlapY > 0) { + var height = box.bottom - box.top, + curTop = pos.top - (pos.bottom - box.top); + if (curTop - height > 0) { + // Fits above cursor + hints.style.top = (top = pos.top - height - offsetTop) + "px"; + below = false; + } else if (height > winH) { + hints.style.height = winH - 5 + "px"; + hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px"; + var cursor = cm.getCursor(); + if (data.from.ch != cursor.ch) { + pos = cm.cursorCoords(cursor); + hints.style.left = (left = pos.left - offsetLeft) + "px"; + box = hints.getBoundingClientRect(); + } + } + } + var overlapX = box.right - winW; + if (scrolls) overlapX += cm.display.nativeBarWidth; + if (overlapX > 0) { + if (box.right - box.left > winW) { + hints.style.width = winW - 5 + "px"; + overlapX -= box.right - box.left - winW; + } + hints.style.left = (left = pos.left - overlapX - offsetLeft) + "px"; + } + if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling) node.style.paddingRight = cm.display.nativeBarWidth + "px"; + cm.addKeyMap(this.keyMap = buildKeyMap(completion, { + moveFocus: function (n, avoidWrap) { + widget.changeActive(widget.selectedHint + n, avoidWrap); + }, + setFocus: function (n) { + widget.changeActive(n); + }, + menuSize: function () { + return widget.screenAmount(); + }, + length: completions.length, + close: function () { + completion.close(); + }, + pick: function () { + widget.pick(); + }, + data: data + })); + if (completion.options.closeOnUnfocus) { + var closingOnBlur; + cm.on("blur", this.onBlur = function () { + closingOnBlur = setTimeout(function () { + completion.close(); + }, 100); + }); + cm.on("focus", this.onFocus = function () { + clearTimeout(closingOnBlur); + }); + } + cm.on("scroll", this.onScroll = function () { + var curScroll = cm.getScrollInfo(), + editor = cm.getWrapperElement().getBoundingClientRect(); + if (!startScroll) startScroll = cm.getScrollInfo(); + var newTop = top + startScroll.top - curScroll.top; + var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop); + if (!below) point += hints.offsetHeight; + if (point <= editor.top || point >= editor.bottom) return completion.close(); + hints.style.top = newTop + "px"; + hints.style.left = left + startScroll.left - curScroll.left + "px"; + }); + CodeMirror.on(hints, "dblclick", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + widget.pick(); + } + }); + CodeMirror.on(hints, "click", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + if (completion.options.completeOnSingleClick) widget.pick(); + } + }); + CodeMirror.on(hints, "mousedown", function () { + setTimeout(function () { + cm.focus(); + }, 20); + }); + + // The first hint doesn't need to be scrolled to on init + var selectedHintRange = this.getSelectedHintRange(); + if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) { + this.scrollToActive(); + } + CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]); + return true; + } + Widget.prototype = { + close: function () { + if (this.completion.widget != this) return; + this.completion.widget = null; + if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints); + this.completion.cm.removeKeyMap(this.keyMap); + var input = this.completion.cm.getInputField(); + input.removeAttribute("aria-activedescendant"); + input.removeAttribute("aria-owns"); + var cm = this.completion.cm; + if (this.completion.options.closeOnUnfocus) { + cm.off("blur", this.onBlur); + cm.off("focus", this.onFocus); + } + cm.off("scroll", this.onScroll); + }, + disable: function () { + this.completion.cm.removeKeyMap(this.keyMap); + var widget = this; + this.keyMap = { + Enter: function () { + widget.picked = true; + } + }; + this.completion.cm.addKeyMap(this.keyMap); + }, + pick: function () { + this.completion.pick(this.data, this.selectedHint); + }, + changeActive: function (i, avoidWrap) { + if (i >= this.data.list.length) i = avoidWrap ? this.data.list.length - 1 : 0;else if (i < 0) i = avoidWrap ? 0 : this.data.list.length - 1; + if (this.selectedHint == i) return; + var node = this.hints.childNodes[this.selectedHint]; + if (node) { + node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); + node.removeAttribute("aria-selected"); + } + node = this.hints.childNodes[this.selectedHint = i]; + node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; + node.setAttribute("aria-selected", "true"); + this.completion.cm.getInputField().setAttribute("aria-activedescendant", node.id); + this.scrollToActive(); + CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); + }, + scrollToActive: function () { + var selectedHintRange = this.getSelectedHintRange(); + var node1 = this.hints.childNodes[selectedHintRange.from]; + var node2 = this.hints.childNodes[selectedHintRange.to]; + var firstNode = this.hints.firstChild; + if (node1.offsetTop < this.hints.scrollTop) this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop; + }, + screenAmount: function () { + return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; + }, + getSelectedHintRange: function () { + var margin = this.completion.options.scrollMargin || 0; + return { + from: Math.max(0, this.selectedHint - margin), + to: Math.min(this.data.list.length - 1, this.selectedHint + margin) + }; + } + }; + function applicableHelpers(cm, helpers) { + if (!cm.somethingSelected()) return helpers; + var result = []; + for (var i = 0; i < helpers.length; i++) if (helpers[i].supportsSelection) result.push(helpers[i]); + return result; + } + function fetchHints(hint, cm, options, callback) { + if (hint.async) { + hint(cm, callback, options); } else { - var cp = (0, escape_js_1.getCodePoint)(str, i); - ret += "&#x".concat(cp.toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = regExp.lastIndex += Number(cp !== char); + var result = hint(cm, options); + if (result && result.then) result.then(callback);else callback(result); + } + } + function resolveAutoHints(cm, pos) { + var helpers = cm.getHelpers(pos, "hint"), + words; + if (helpers.length) { + var resolved = function (cm, callback, options) { + var app = applicableHelpers(cm, helpers); + function run(i) { + if (i == app.length) return callback(null); + fetchHints(app[i], cm, options, function (result) { + if (result && result.list.length > 0) callback(result);else run(i + 1); + }); + } + run(0); + }; + resolved.async = true; + resolved.supportsSelection = true; + return resolved; + } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { + return function (cm) { + return CodeMirror.hint.fromList(cm, { + words: words + }); + }; + } else if (CodeMirror.hint.anyword) { + return function (cm, options) { + return CodeMirror.hint.anyword(cm, options); + }; + } else { + return function () {}; } } - return ret + str.substr(lastIdx); -} + CodeMirror.registerHelper("hint", "auto", { + resolve: resolveAutoHints + }); + CodeMirror.registerHelper("hint", "fromList", function (cm, options) { + var cur = cm.getCursor(), + token = cm.getTokenAt(cur); + var term, + from = CodeMirror.Pos(cur.line, token.start), + to = cur; + if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) { + term = token.string.substr(0, cur.ch - token.start); + } else { + term = ""; + from = cur; + } + var found = []; + for (var i = 0; i < options.words.length; i++) { + var word = options.words[i]; + if (word.slice(0, term.length) == term) found.push(word); + } + if (found.length) return { + list: found, + from: from, + to: to + }; + }); + CodeMirror.commands.autocomplete = CodeMirror.showHint; + var defaultOptions = { + hint: CodeMirror.hint.auto, + completeSingle: true, + alignWithWord: true, + closeCharacters: /[\s()\[\]{};:>,]/, + closeOnPick: true, + closeOnUnfocus: true, + updateOnCursorActivity: true, + completeOnSingleClick: true, + container: null, + customKeys: null, + extraKeys: null, + paddingForScrollbar: true, + moveOnOverlap: true + }; + CodeMirror.defineOption("hintOptions", null); +}); /***/ }), -/***/ "../../../node_modules/entities/lib/escape.js": -/*!****************************************************!*\ - !*** ../../../node_modules/entities/lib/escape.js ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - +/***/ "../../../node_modules/codemirror/addon/lint/lint.js": +/*!***********************************************************!*\ + !*** ../../../node_modules/codemirror/addon/lint/lint.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0; -exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; -var xmlCodeMap = new Map([[34, """], [38, "&"], [39, "'"], [60, "<"], [62, ">"]]); -// For compatibility with node < 4, we wrap `codePointAt` -exports.getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null ? function (str, index) { - return str.codePointAt(index); -} : -// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae -function (c, index) { - return (c.charCodeAt(index) & 0xfc00) === 0xd800 ? (c.charCodeAt(index) - 0xd800) * 0x400 + c.charCodeAt(index + 1) - 0xdc00 + 0x10000 : c.charCodeAt(index); -}; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -function encodeXML(str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = exports.xmlReplacer.exec(str)) !== null) { - var i = match.index; - var char = str.charCodeAt(i); - var next = xmlCodeMap.get(char); - if (next !== undefined) { - ret += str.substring(lastIdx, i) + next; - lastIdx = i + 1; +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + + var GUTTER_ID = "CodeMirror-lint-markers"; + var LINT_LINE_ID = "CodeMirror-lint-line-"; + function showTooltip(cm, e, content) { + var tt = document.createElement("div"); + tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme; + tt.appendChild(content.cloneNode(true)); + if (cm.state.lint.options.selfContain) cm.getWrapperElement().appendChild(tt);else document.body.appendChild(tt); + function position(e) { + if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position); + tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px"; + tt.style.left = e.clientX + 5 + "px"; + } + CodeMirror.on(document, "mousemove", position); + position(e); + if (tt.style.opacity != null) tt.style.opacity = 1; + return tt; + } + function rm(elt) { + if (elt.parentNode) elt.parentNode.removeChild(elt); + } + function hideTooltip(tt) { + if (!tt.parentNode) return; + if (tt.style.opacity == null) rm(tt); + tt.style.opacity = 0; + setTimeout(function () { + rm(tt); + }, 600); + } + function showTooltipFor(cm, e, content, node) { + var tooltip = showTooltip(cm, e, content); + function hide() { + CodeMirror.off(node, "mouseout", hide); + if (tooltip) { + hideTooltip(tooltip); + tooltip = null; + } + } + var poll = setInterval(function () { + if (tooltip) for (var n = node;; n = n.parentNode) { + if (n && n.nodeType == 11) n = n.host; + if (n == document.body) return; + if (!n) { + hide(); + break; + } + } + if (!tooltip) return clearInterval(poll); + }, 400); + CodeMirror.on(node, "mouseout", hide); + } + function LintState(cm, conf, hasGutter) { + this.marked = []; + if (conf instanceof Function) conf = { + getAnnotations: conf + }; + if (!conf || conf === true) conf = {}; + this.options = {}; + this.linterOptions = conf.options || {}; + for (var prop in defaults) this.options[prop] = defaults[prop]; + for (var prop in conf) { + if (defaults.hasOwnProperty(prop)) { + if (conf[prop] != null) this.options[prop] = conf[prop]; + } else if (!conf.options) { + this.linterOptions[prop] = conf[prop]; + } + } + this.timeout = null; + this.hasGutter = hasGutter; + this.onMouseOver = function (e) { + onMouseOver(cm, e); + }; + this.waitingFor = 0; + } + var defaults = { + highlightLines: false, + tooltips: true, + delay: 500, + lintOnChange: true, + getAnnotations: null, + async: false, + selfContain: null, + formatAnnotation: null, + onUpdateLinting: null + }; + function clearMarks(cm) { + var state = cm.state.lint; + if (state.hasGutter) cm.clearGutter(GUTTER_ID); + if (state.options.highlightLines) clearErrorLines(cm); + for (var i = 0; i < state.marked.length; ++i) state.marked[i].clear(); + state.marked.length = 0; + } + function clearErrorLines(cm) { + cm.eachLine(function (line) { + var has = line.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(line.wrapClass); + if (has) cm.removeLineClass(line, "wrap", has[0]); + }); + } + function makeMarker(cm, labels, severity, multiple, tooltips) { + var marker = document.createElement("div"), + inner = marker; + marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity; + if (multiple) { + inner = marker.appendChild(document.createElement("div")); + inner.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple"; + } + if (tooltips != false) CodeMirror.on(inner, "mouseover", function (e) { + showTooltipFor(cm, e, labels, inner); + }); + return marker; + } + function getMaxSeverity(a, b) { + if (a == "error") return a;else return b; + } + function groupByLine(annotations) { + var lines = []; + for (var i = 0; i < annotations.length; ++i) { + var ann = annotations[i], + line = ann.from.line; + (lines[line] || (lines[line] = [])).push(ann); + } + return lines; + } + function annotationTooltip(ann) { + var severity = ann.severity; + if (!severity) severity = "error"; + var tip = document.createElement("div"); + tip.className = "CodeMirror-lint-message CodeMirror-lint-message-" + severity; + if (typeof ann.messageHTML != 'undefined') { + tip.innerHTML = ann.messageHTML; } else { - ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); + tip.appendChild(document.createTextNode(ann.message)); + } + return tip; + } + function lintAsync(cm, getAnnotations) { + var state = cm.state.lint; + var id = ++state.waitingFor; + function abort() { + id = -1; + cm.off("change", abort); + } + cm.on("change", abort); + getAnnotations(cm.getValue(), function (annotations, arg2) { + cm.off("change", abort); + if (state.waitingFor != id) return; + if (arg2 && annotations instanceof CodeMirror) annotations = arg2; + cm.operation(function () { + updateLinting(cm, annotations); + }); + }, state.linterOptions, cm); + } + function startLinting(cm) { + var state = cm.state.lint; + if (!state) return; + var options = state.options; + /* + * Passing rules in `options` property prevents JSHint (and other linters) from complaining + * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc. + */ + var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint"); + if (!getAnnotations) return; + if (options.async || getAnnotations.async) { + lintAsync(cm, getAnnotations); + } else { + var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm); + if (!annotations) return; + if (annotations.then) annotations.then(function (issues) { + cm.operation(function () { + updateLinting(cm, issues); + }); + });else cm.operation(function () { + updateLinting(cm, annotations); + }); } } - return ret + str.substr(lastIdx); -} -exports.encodeXML = encodeXML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -exports.escape = encodeXML; -/** - * Creates a function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - * - * @param regex Regular expression to match characters to escape. - * @param map Map of characters to escape to their entities. - * - * @returns Function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - */ -function getEscaper(regex, map) { - return function escape(data) { - var match; - var lastIdx = 0; - var result = ""; - while (match = regex.exec(data)) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); + function updateLinting(cm, annotationsNotSorted) { + var state = cm.state.lint; + if (!state) return; + var options = state.options; + clearMarks(cm); + var annotations = groupByLine(annotationsNotSorted); + for (var line = 0; line < annotations.length; ++line) { + var anns = annotations[line]; + if (!anns) continue; + + // filter out duplicate messages + var message = []; + anns = anns.filter(function (item) { + return message.indexOf(item.message) > -1 ? false : message.push(item.message); + }); + var maxSeverity = null; + var tipLabel = state.hasGutter && document.createDocumentFragment(); + for (var i = 0; i < anns.length; ++i) { + var ann = anns[i]; + var severity = ann.severity; + if (!severity) severity = "error"; + maxSeverity = getMaxSeverity(maxSeverity, severity); + if (options.formatAnnotation) ann = options.formatAnnotation(ann); + if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann)); + if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, { + className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity, + __annotation: ann + })); } - // We know that this character will be in the map. - result += map.get(match[0].charCodeAt(0)); - // Every match will be of length 1 - lastIdx = match.index + 1; + // use original annotations[line] to show multiple messages + if (state.hasGutter) cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1, options.tooltips)); + if (options.highlightLines) cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity); + } + if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm); + } + function onChange(cm) { + var state = cm.state.lint; + if (!state) return; + clearTimeout(state.timeout); + state.timeout = setTimeout(function () { + startLinting(cm); + }, state.options.delay); + } + function popupTooltips(cm, annotations, e) { + var target = e.target || e.srcElement; + var tooltip = document.createDocumentFragment(); + for (var i = 0; i < annotations.length; i++) { + var ann = annotations[i]; + tooltip.appendChild(annotationTooltip(ann)); + } + showTooltipFor(cm, e, tooltip, target); + } + function onMouseOver(cm, e) { + var target = e.target || e.srcElement; + if (!/\bCodeMirror-lint-mark-/.test(target.className)) return; + var box = target.getBoundingClientRect(), + x = (box.left + box.right) / 2, + y = (box.top + box.bottom) / 2; + var spans = cm.findMarksAt(cm.coordsChar({ + left: x, + top: y + }, "client")); + var annotations = []; + for (var i = 0; i < spans.length; ++i) { + var ann = spans[i].__annotation; + if (ann) annotations.push(ann); + } + if (annotations.length) popupTooltips(cm, annotations, e); + } + CodeMirror.defineOption("lint", false, function (cm, val, old) { + if (old && old != CodeMirror.Init) { + clearMarks(cm); + if (cm.state.lint.options.lintOnChange !== false) cm.off("change", onChange); + CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver); + clearTimeout(cm.state.lint.timeout); + delete cm.state.lint; + } + if (val) { + var gutters = cm.getOption("gutters"), + hasLintGutter = false; + for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true; + var state = cm.state.lint = new LintState(cm, val, hasLintGutter); + if (state.options.lintOnChange) cm.on("change", onChange); + if (state.options.tooltips != false && state.options.tooltips != "gutter") CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver); + startLinting(cm); } - return result + data.substring(lastIdx); - }; -} -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([[34, """], [38, "&"], [160, " "]])); -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([[38, "&"], [60, "<"], [62, ">"], [160, " "]])); + }); + CodeMirror.defineExtension("performLint", function () { + startLinting(this); + }); +}); /***/ }), -/***/ "../../../node_modules/entities/lib/generated/decode-data-html.js": -/*!************************************************************************!*\ - !*** ../../../node_modules/entities/lib/generated/decode-data-html.js ***! - \************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/codemirror/addon/search/jump-to-line.js": +/*!*********************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/search/jump-to-line.js ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c".split("").map(function (c) { - return c.charCodeAt(0); -})); +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// Defines jumpToLine command. Uses dialog.js if present. + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../dialog/dialog */ "../../../node_modules/codemirror/addon/dialog/dialog.js"));else {} +})(function (CodeMirror) { + "use strict"; + + // default search panel location + CodeMirror.defineOption("search", { + bottom: false + }); + function dialog(cm, text, shortText, deflt, f) { + if (cm.openDialog) cm.openDialog(text, f, { + value: deflt, + selectValueOnOpen: true, + bottom: cm.options.search.bottom + });else f(prompt(shortText, deflt)); + } + function getJumpDialog(cm) { + return cm.phrase("Jump to line:") + ' ' + cm.phrase("(Use line:column or scroll% syntax)") + ''; + } + function interpretLine(cm, string) { + var num = Number(string); + if (/^[-+]/.test(string)) return cm.getCursor().line + num;else return num - 1; + } + CodeMirror.commands.jumpToLine = function (cm) { + var cur = cm.getCursor(); + dialog(cm, getJumpDialog(cm), cm.phrase("Jump to line:"), cur.line + 1 + ":" + cur.ch, function (posStr) { + if (!posStr) return; + var match; + if (match = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)) { + cm.setCursor(interpretLine(cm, match[1]), Number(match[2])); + } else if (match = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)) { + var line = Math.round(cm.lineCount() * Number(match[1]) / 100); + if (/^[-+]/.test(match[1])) line = cur.line + line + 1; + cm.setCursor(line - 1, cur.ch); + } else if (match = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)) { + cm.setCursor(interpretLine(cm, match[1]), cur.ch); + } + }); + }; + CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine"; +}); /***/ }), -/***/ "../../../node_modules/entities/lib/generated/decode-data-xml.js": -/*!***********************************************************************!*\ - !*** ../../../node_modules/entities/lib/generated/decode-data-xml.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/codemirror/addon/search/search.js": +/*!***************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/search/search.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map(function (c) { - return c.charCodeAt(0); -})); +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// Define search commands. Depends on dialog.js or another +// implementation of the openDialog method. + +// Replace works a little oddly -- it will do the replace on the next +// Ctrl-G (or whatever is bound to findNext) press. You prevent a +// replace by making sure the match is no longer selected when hitting +// Ctrl-G. + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./searchcursor */ "../../../node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__(/*! ../dialog/dialog */ "../../../node_modules/codemirror/addon/dialog/dialog.js"));else {} +})(function (CodeMirror) { + "use strict"; + + // default search panel location + CodeMirror.defineOption("search", { + bottom: false + }); + function searchOverlay(query, caseInsensitive) { + if (typeof query == "string") query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");else if (!query.global) query = new RegExp(query.source, query.ignoreCase ? "gi" : "g"); + return { + token: function (stream) { + query.lastIndex = stream.pos; + var match = query.exec(stream.string); + if (match && match.index == stream.pos) { + stream.pos += match[0].length || 1; + return "searching"; + } else if (match) { + stream.pos = match.index; + } else { + stream.skipToEnd(); + } + } + }; + } + function SearchState() { + this.posFrom = this.posTo = this.lastQuery = this.query = null; + this.overlay = null; + } + function getSearchState(cm) { + return cm.state.search || (cm.state.search = new SearchState()); + } + function queryCaseInsensitive(query) { + return typeof query == "string" && query == query.toLowerCase(); + } + function getSearchCursor(cm, query, pos) { + // Heuristic: if the query string is all lowercase, do a case insensitive search. + return cm.getSearchCursor(query, pos, { + caseFold: queryCaseInsensitive(query), + multiline: true + }); + } + function persistentDialog(cm, text, deflt, onEnter, onKeyDown) { + cm.openDialog(text, onEnter, { + value: deflt, + selectValueOnOpen: true, + closeOnEnter: false, + onClose: function () { + clearSearch(cm); + }, + onKeyDown: onKeyDown, + bottom: cm.options.search.bottom + }); + } + function dialog(cm, text, shortText, deflt, f) { + if (cm.openDialog) cm.openDialog(text, f, { + value: deflt, + selectValueOnOpen: true, + bottom: cm.options.search.bottom + });else f(prompt(shortText, deflt)); + } + function confirmDialog(cm, text, shortText, fs) { + if (cm.openConfirm) cm.openConfirm(text, fs);else if (confirm(shortText)) fs[0](); + } + function parseString(string) { + return string.replace(/\\([nrt\\])/g, function (match, ch) { + if (ch == "n") return "\n"; + if (ch == "r") return "\r"; + if (ch == "t") return "\t"; + if (ch == "\\") return "\\"; + return match; + }); + } + function parseQuery(query) { + var isRE = query.match(/^\/(.*)\/([a-z]*)$/); + if (isRE) { + try { + query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); + } catch (e) {} // Not a regular expression after all, do a string search + } else { + query = parseString(query); + } + if (typeof query == "string" ? query == "" : query.test("")) query = /x^/; + return query; + } + function startSearch(cm, state, query) { + state.queryText = query; + state.query = parseQuery(query); + cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query)); + state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query)); + cm.addOverlay(state.overlay); + if (cm.showMatchesOnScrollbar) { + if (state.annotate) { + state.annotate.clear(); + state.annotate = null; + } + state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query)); + } + } + function doSearch(cm, rev, persistent, immediate) { + var state = getSearchState(cm); + if (state.query) return findNext(cm, rev); + var q = cm.getSelection() || state.lastQuery; + if (q instanceof RegExp && q.source == "x^") q = null; + if (persistent && cm.openDialog) { + var hiding = null; + var searchNext = function (query, event) { + CodeMirror.e_stop(event); + if (!query) return; + if (query != state.queryText) { + startSearch(cm, state, query); + state.posFrom = state.posTo = cm.getCursor(); + } + if (hiding) hiding.style.opacity = 1; + findNext(cm, event.shiftKey, function (_, to) { + var dialog; + if (to.line < 3 && document.querySelector && (dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) && dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top) (hiding = dialog).style.opacity = .4; + }); + }; + persistentDialog(cm, getQueryDialog(cm), q, searchNext, function (event, query) { + var keyName = CodeMirror.keyName(event); + var extra = cm.getOption('extraKeys'), + cmd = extra && extra[keyName] || CodeMirror.keyMap[cm.getOption("keyMap")][keyName]; + if (cmd == "findNext" || cmd == "findPrev" || cmd == "findPersistentNext" || cmd == "findPersistentPrev") { + CodeMirror.e_stop(event); + startSearch(cm, getSearchState(cm), query); + cm.execCommand(cmd); + } else if (cmd == "find" || cmd == "findPersistent") { + CodeMirror.e_stop(event); + searchNext(query, event); + } + }); + if (immediate && q) { + startSearch(cm, state, q); + findNext(cm, rev); + } + } else { + dialog(cm, getQueryDialog(cm), "Search for:", q, function (query) { + if (query && !state.query) cm.operation(function () { + startSearch(cm, state, query); + state.posFrom = state.posTo = cm.getCursor(); + findNext(cm, rev); + }); + }); + } + } + function findNext(cm, rev, callback) { + cm.operation(function () { + var state = getSearchState(cm); + var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo); + if (!cursor.find(rev)) { + cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0)); + if (!cursor.find(rev)) return; + } + cm.setSelection(cursor.from(), cursor.to()); + cm.scrollIntoView({ + from: cursor.from(), + to: cursor.to() + }, 20); + state.posFrom = cursor.from(); + state.posTo = cursor.to(); + if (callback) callback(cursor.from(), cursor.to()); + }); + } + function clearSearch(cm) { + cm.operation(function () { + var state = getSearchState(cm); + state.lastQuery = state.query; + if (!state.query) return; + state.query = state.queryText = null; + cm.removeOverlay(state.overlay); + if (state.annotate) { + state.annotate.clear(); + state.annotate = null; + } + }); + } + function el(tag, attrs) { + var element = tag ? document.createElement(tag) : document.createDocumentFragment(); + for (var key in attrs) { + element[key] = attrs[key]; + } + for (var i = 2; i < arguments.length; i++) { + var child = arguments[i]; + element.appendChild(typeof child == "string" ? document.createTextNode(child) : child); + } + return element; + } + function getQueryDialog(cm) { + return el("", null, el("span", { + className: "CodeMirror-search-label" + }, cm.phrase("Search:")), " ", el("input", { + type: "text", + "style": "width: 10em", + className: "CodeMirror-search-field" + }), " ", el("span", { + style: "color: #888", + className: "CodeMirror-search-hint" + }, cm.phrase("(Use /re/ syntax for regexp search)"))); + } + function getReplaceQueryDialog(cm) { + return el("", null, " ", el("input", { + type: "text", + "style": "width: 10em", + className: "CodeMirror-search-field" + }), " ", el("span", { + style: "color: #888", + className: "CodeMirror-search-hint" + }, cm.phrase("(Use /re/ syntax for regexp search)"))); + } + function getReplacementQueryDialog(cm) { + return el("", null, el("span", { + className: "CodeMirror-search-label" + }, cm.phrase("With:")), " ", el("input", { + type: "text", + "style": "width: 10em", + className: "CodeMirror-search-field" + })); + } + function getDoReplaceConfirm(cm) { + return el("", null, el("span", { + className: "CodeMirror-search-label" + }, cm.phrase("Replace?")), " ", el("button", {}, cm.phrase("Yes")), " ", el("button", {}, cm.phrase("No")), " ", el("button", {}, cm.phrase("All")), " ", el("button", {}, cm.phrase("Stop"))); + } + function replaceAll(cm, query, text) { + cm.operation(function () { + for (var cursor = getSearchCursor(cm, query); cursor.findNext();) { + if (typeof query != "string") { + var match = cm.getRange(cursor.from(), cursor.to()).match(query); + cursor.replace(text.replace(/\$(\d)/g, function (_, i) { + return match[i]; + })); + } else cursor.replace(text); + } + }); + } + function replace(cm, all) { + if (cm.getOption("readOnly")) return; + var query = cm.getSelection() || getSearchState(cm).lastQuery; + var dialogText = all ? cm.phrase("Replace all:") : cm.phrase("Replace:"); + var fragment = el("", null, el("span", { + className: "CodeMirror-search-label" + }, dialogText), getReplaceQueryDialog(cm)); + dialog(cm, fragment, dialogText, query, function (query) { + if (!query) return; + query = parseQuery(query); + dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function (text) { + text = parseString(text); + if (all) { + replaceAll(cm, query, text); + } else { + clearSearch(cm); + var cursor = getSearchCursor(cm, query, cm.getCursor("from")); + var advance = function () { + var start = cursor.from(), + match; + if (!(match = cursor.findNext())) { + cursor = getSearchCursor(cm, query); + if (!(match = cursor.findNext()) || start && cursor.from().line == start.line && cursor.from().ch == start.ch) return; + } + cm.setSelection(cursor.from(), cursor.to()); + cm.scrollIntoView({ + from: cursor.from(), + to: cursor.to() + }); + confirmDialog(cm, getDoReplaceConfirm(cm), cm.phrase("Replace?"), [function () { + doReplace(match); + }, advance, function () { + replaceAll(cm, query, text); + }]); + }; + var doReplace = function (match) { + cursor.replace(typeof query == "string" ? text : text.replace(/\$(\d)/g, function (_, i) { + return match[i]; + })); + advance(); + }; + advance(); + } + }); + }); + } + CodeMirror.commands.find = function (cm) { + clearSearch(cm); + doSearch(cm); + }; + CodeMirror.commands.findPersistent = function (cm) { + clearSearch(cm); + doSearch(cm, false, true); + }; + CodeMirror.commands.findPersistentNext = function (cm) { + doSearch(cm, false, true, true); + }; + CodeMirror.commands.findPersistentPrev = function (cm) { + doSearch(cm, true, true, true); + }; + CodeMirror.commands.findNext = doSearch; + CodeMirror.commands.findPrev = function (cm) { + doSearch(cm, true); + }; + CodeMirror.commands.clearSearch = clearSearch; + CodeMirror.commands.replace = replace; + CodeMirror.commands.replaceAll = function (cm) { + replace(cm, true); + }; +}); /***/ }), -/***/ "../../../node_modules/entities/lib/generated/encode-html.js": -/*!*******************************************************************!*\ - !*** ../../../node_modules/entities/lib/generated/encode-html.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/codemirror/addon/search/searchcursor.js": +/*!*********************************************************************!*\ + !*** ../../../node_modules/codemirror/addon/search/searchcursor.js ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));else {} +})(function (CodeMirror) { + "use strict"; + + var Pos = CodeMirror.Pos; + function regexpFlags(regexp) { + var flags = regexp.flags; + return flags != null ? flags : (regexp.ignoreCase ? "i" : "") + (regexp.global ? "g" : "") + (regexp.multiline ? "m" : ""); + } + function ensureFlags(regexp, flags) { + var current = regexpFlags(regexp), + target = current; + for (var i = 0; i < flags.length; i++) if (target.indexOf(flags.charAt(i)) == -1) target += flags.charAt(i); + return current == target ? regexp : new RegExp(regexp.source, target); + } + function maybeMultiline(regexp) { + return /\\s|\\n|\n|\\W|\\D|\[\^/.test(regexp.source); + } + function searchRegexpForward(doc, regexp, start) { + regexp = ensureFlags(regexp, "g"); + for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) { + regexp.lastIndex = ch; + var string = doc.getLine(line), + match = regexp.exec(string); + if (match) return { + from: Pos(line, match.index), + to: Pos(line, match.index + match[0].length), + match: match + }; + } + } + function searchRegexpForwardMultiline(doc, regexp, start) { + if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start); + regexp = ensureFlags(regexp, "gm"); + var string, + chunk = 1; + for (var line = start.line, last = doc.lastLine(); line <= last;) { + // This grows the search buffer in exponentially-sized chunks + // between matches, so that nearby matches are fast and don't + // require concatenating the whole document (in case we're + // searching for something that has tons of matches), but at the + // same time, the amount of retries is limited. + for (var i = 0; i < chunk; i++) { + if (line > last) break; + var curLine = doc.getLine(line++); + string = string == null ? curLine : string + "\n" + curLine; + } + chunk = chunk * 2; + regexp.lastIndex = start.ch; + var match = regexp.exec(string); + if (match) { + var before = string.slice(0, match.index).split("\n"), + inside = match[0].split("\n"); + var startLine = start.line + before.length - 1, + startCh = before[before.length - 1].length; + return { + from: Pos(startLine, startCh), + to: Pos(startLine + inside.length - 1, inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length), + match: match + }; + } + } + } + function lastMatchIn(string, regexp, endMargin) { + var match, + from = 0; + while (from <= string.length) { + regexp.lastIndex = from; + var newMatch = regexp.exec(string); + if (!newMatch) break; + var end = newMatch.index + newMatch[0].length; + if (end > string.length - endMargin) break; + if (!match || end > match.index + match[0].length) match = newMatch; + from = newMatch.index + 1; + } + return match; + } + function searchRegexpBackward(doc, regexp, start) { + regexp = ensureFlags(regexp, "g"); + for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) { + var string = doc.getLine(line); + var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch); + if (match) return { + from: Pos(line, match.index), + to: Pos(line, match.index + match[0].length), + match: match + }; + } + } + function searchRegexpBackwardMultiline(doc, regexp, start) { + if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start); + regexp = ensureFlags(regexp, "gm"); + var string, + chunkSize = 1, + endMargin = doc.getLine(start.line).length - start.ch; + for (var line = start.line, first = doc.firstLine(); line >= first;) { + for (var i = 0; i < chunkSize && line >= first; i++) { + var curLine = doc.getLine(line--); + string = string == null ? curLine : curLine + "\n" + string; + } + chunkSize *= 2; + var match = lastMatchIn(string, regexp, endMargin); + if (match) { + var before = string.slice(0, match.index).split("\n"), + inside = match[0].split("\n"); + var startLine = line + before.length, + startCh = before[before.length - 1].length; + return { + from: Pos(startLine, startCh), + to: Pos(startLine + inside.length - 1, inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length), + match: match + }; + } + } + } + var doFold, noFold; + if (String.prototype.normalize) { + doFold = function (str) { + return str.normalize("NFD").toLowerCase(); + }; + noFold = function (str) { + return str.normalize("NFD"); + }; + } else { + doFold = function (str) { + return str.toLowerCase(); + }; + noFold = function (str) { + return str; + }; + } + + // Maps a position in a case-folded line back to a position in the original line + // (compensating for codepoints increasing in number during folding) + function adjustPos(orig, folded, pos, foldFunc) { + if (orig.length == folded.length) return pos; + for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) { + if (min == max) return min; + var mid = min + max >> 1; + var len = foldFunc(orig.slice(0, mid)).length; + if (len == pos) return mid;else if (len > pos) max = mid;else min = mid + 1; + } + } + function searchStringForward(doc, query, start, caseFold) { + // Empty string would match anything and never progress, so we + // define it to match nothing instead. + if (!query.length) return null; + var fold = caseFold ? doFold : noFold; + var lines = fold(query).split(/\r|\n\r?/); + search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) { + var orig = doc.getLine(line).slice(ch), + string = fold(orig); + if (lines.length == 1) { + var found = string.indexOf(lines[0]); + if (found == -1) continue search; + var start = adjustPos(orig, string, found, fold) + ch; + return { + from: Pos(line, adjustPos(orig, string, found, fold) + ch), + to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch) + }; + } else { + var cutFrom = string.length - lines[0].length; + if (string.slice(cutFrom) != lines[0]) continue search; + for (var i = 1; i < lines.length - 1; i++) if (fold(doc.getLine(line + i)) != lines[i]) continue search; + var end = doc.getLine(line + lines.length - 1), + endString = fold(end), + lastLine = lines[lines.length - 1]; + if (endString.slice(0, lastLine.length) != lastLine) continue search; + return { + from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch), + to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold)) + }; + } + } + } + function searchStringBackward(doc, query, start, caseFold) { + if (!query.length) return null; + var fold = caseFold ? doFold : noFold; + var lines = fold(query).split(/\r|\n\r?/); + search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) { + var orig = doc.getLine(line); + if (ch > -1) orig = orig.slice(0, ch); + var string = fold(orig); + if (lines.length == 1) { + var found = string.lastIndexOf(lines[0]); + if (found == -1) continue search; + return { + from: Pos(line, adjustPos(orig, string, found, fold)), + to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold)) + }; + } else { + var lastLine = lines[lines.length - 1]; + if (string.slice(0, lastLine.length) != lastLine) continue search; + for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++) if (fold(doc.getLine(start + i)) != lines[i]) continue search; + var top = doc.getLine(line + 1 - lines.length), + topString = fold(top); + if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search; + return { + from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)), + to: Pos(line, adjustPos(orig, string, lastLine.length, fold)) + }; + } + } + } + function SearchCursor(doc, query, pos, options) { + this.atOccurrence = false; + this.afterEmptyMatch = false; + this.doc = doc; + pos = pos ? doc.clipPos(pos) : Pos(0, 0); + this.pos = { + from: pos, + to: pos + }; + var caseFold; + if (typeof options == "object") { + caseFold = options.caseFold; + } else { + // Backwards compat for when caseFold was the 4th argument + caseFold = options; + options = null; + } + if (typeof query == "string") { + if (caseFold == null) caseFold = false; + this.matches = function (reverse, pos) { + return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold); + }; + } else { + query = ensureFlags(query, "gm"); + if (!options || options.multiline !== false) this.matches = function (reverse, pos) { + return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos); + };else this.matches = function (reverse, pos) { + return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos); + }; + } + } + SearchCursor.prototype = { + findNext: function () { + return this.find(false); + }, + findPrevious: function () { + return this.find(true); + }, + find: function (reverse) { + var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to); + if (this.afterEmptyMatch && this.atOccurrence) { + // do not return the same 0 width match twice + head = Pos(head.line, head.ch); + if (reverse) { + head.ch--; + if (head.ch < 0) { + head.line--; + head.ch = (this.doc.getLine(head.line) || "").length; + } + } else { + head.ch++; + if (head.ch > (this.doc.getLine(head.line) || "").length) { + head.ch = 0; + head.line++; + } + } + if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) { + return this.atOccurrence = false; + } + } + var result = this.matches(reverse, head); + this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0; + if (result) { + this.pos = result; + this.atOccurrence = true; + return this.pos.match || true; + } else { + var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0); + this.pos = { + from: end, + to: end + }; + return this.atOccurrence = false; + } + }, + from: function () { + if (this.atOccurrence) return this.pos.from; + }, + to: function () { + if (this.atOccurrence) return this.pos.to; + }, + replace: function (newText, origin) { + if (!this.atOccurrence) return; + var lines = CodeMirror.splitLines(newText); + this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin); + this.pos.to = Pos(this.pos.from.line + lines.length - 1, lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0)); + } + }; + CodeMirror.defineExtension("getSearchCursor", function (query, pos, caseFold) { + return new SearchCursor(this.doc, query, pos, caseFold); + }); + CodeMirror.defineDocExtension("getSearchCursor", function (query, pos, caseFold) { + return new SearchCursor(this, query, pos, caseFold); + }); + CodeMirror.defineExtension("selectMatches", function (query, caseFold) { + var ranges = []; + var cur = this.getSearchCursor(query, this.getCursor("from"), caseFold); + while (cur.findNext()) { + if (CodeMirror.cmpPos(cur.to(), this.getCursor("to")) > 0) break; + ranges.push({ + anchor: cur.from(), + head: cur.to() + }); + } + if (ranges.length) this.setSelections(ranges, 0); + }); +}); +/***/ }), +/***/ "../../../node_modules/codemirror/keymap/sublime.js": +/*!**********************************************************!*\ + !*** ../../../node_modules/codemirror/keymap/sublime.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -// Generated using scripts/write-encode-map.ts -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -function restoreDiff(arr) { - for (var i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; +"use strict"; + + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// A rough approximation of Sublime Text's keybindings +// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js + +(function (mod) { + if (true) + // CommonJS + mod(__webpack_require__(/*! ../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../addon/search/searchcursor */ "../../../node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__(/*! ../addon/edit/matchbrackets */ "../../../node_modules/codemirror/addon/edit/matchbrackets.js"));else {} +})(function (CodeMirror) { + "use strict"; + + var cmds = CodeMirror.commands; + var Pos = CodeMirror.Pos; + + // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that. + function findPosSubword(doc, start, dir) { + if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1)); + var line = doc.getLine(start.line); + if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0)); + var state = "start", + type, + startPos = start.ch; + for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) { + var next = line.charAt(dir < 0 ? pos - 1 : pos); + var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o"; + if (cat == "w" && next.toUpperCase() == next) cat = "W"; + if (state == "start") { + if (cat != "o") { + state = "in"; + type = cat; + } else startPos = pos + dir; + } else if (state == "in") { + if (type != cat) { + if (type == "w" && cat == "W" && dir < 0) pos--; + if (type == "W" && cat == "w" && dir > 0) { + // From uppercase to lowercase + if (pos == startPos + 1) { + type = "w"; + continue; + } else pos--; + } + break; + } + } + } + return Pos(start.line, pos); } - return arr; -} -// prettier-ignore -exports["default"] = new Map( /* #__PURE__ */restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { - v: "<", - n: 8402, - o: "<⃒" -}], [0, { - v: "=", - n: 8421, - o: "=⃥" -}], [0, { - v: ">", - n: 8402, - o: ">⃒" -}], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { - n: 106, - o: "fj" -}], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { - v: " ", - n: 8202, - o: "  " -}], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { - v: "↝", - n: 824, - o: "↝̸" -}], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { - v: "∂", - n: 824, - o: "∂̸" -}], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { - v: "∠", - n: 8402, - o: "∠⃒" -}], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { - v: "∩", - n: 65024, - o: "∩︀" -}], [0, { - v: "∪", - n: 65024, - o: "∪︀" -}], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { - v: "∼", - n: 8402, - o: "∼⃒" -}], [0, { - v: "∽", - n: 817, - o: "∽̱" -}], [0, { - v: "∾", - n: 819, - o: "∾̳" -}], [0, "∿"], [0, "≀"], [0, "≁"], [0, { - v: "≂", - n: 824, - o: "≂̸" -}], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { - v: "≋", - n: 824, - o: "≋̸" -}], [0, "≌"], [0, { - v: "≍", - n: 8402, - o: "≍⃒" -}], [0, { - v: "≎", - n: 824, - o: "≎̸" -}], [0, { - v: "≏", - n: 824, - o: "≏̸" -}], [0, { - v: "≐", - n: 824, - o: "≐̸" -}], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { - v: "≡", - n: 8421, - o: "≡⃥" -}], [0, "≢"], [1, { - v: "≤", - n: 8402, - o: "≤⃒" -}], [0, { - v: "≥", - n: 8402, - o: "≥⃒" -}], [0, { - v: "≦", - n: 824, - o: "≦̸" -}], [0, { - v: "≧", - n: 824, - o: "≧̸" -}], [0, { - v: "≨", - n: 65024, - o: "≨︀" -}], [0, { - v: "≩", - n: 65024, - o: "≩︀" -}], [0, { - v: "≪", - n: new Map( /* #__PURE__ */restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) -}], [0, { - v: "≫", - n: new Map( /* #__PURE__ */restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) -}], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { - v: "≿", - n: 824, - o: "≿̸" -}], [0, "⊀"], [0, "⊁"], [0, { - v: "⊂", - n: 8402, - o: "⊂⃒" -}], [0, { - v: "⊃", - n: 8402, - o: "⊃⃒" -}], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { - v: "⊊", - n: 65024, - o: "⊊︀" -}], [0, { - v: "⊋", - n: 65024, - o: "⊋︀" -}], [1, "⊍"], [0, "⊎"], [0, { - v: "⊏", - n: 824, - o: "⊏̸" -}], [0, { - v: "⊐", - n: 824, - o: "⊐̸" -}], [0, "⊑"], [0, "⊒"], [0, { - v: "⊓", - n: 65024, - o: "⊓︀" -}], [0, { - v: "⊔", - n: 65024, - o: "⊔︀" -}], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { - v: "⊴", - n: 8402, - o: "⊴⃒" -}], [0, { - v: "⊵", - n: 8402, - o: "⊵⃒" -}], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { - v: "⋘", - n: 824, - o: "⋘̸" -}], [0, { - v: "⋙", - n: 824, - o: "⋙̸" -}], [0, { - v: "⋚", - n: 65024, - o: "⋚︀" -}], [0, { - v: "⋛", - n: 65024, - o: "⋛︀" -}], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { - v: "⋵", - n: 824, - o: "⋵̸" -}], [0, "⋶"], [0, "⋷"], [1, { - v: "⋹", - n: 824, - o: "⋹̸" -}], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { - v: "⤳", - n: 824, - o: "⤳̸" -}], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { - v: "⧏", - n: 824, - o: "⧏̸" -}], [0, { - v: "⧐", - n: 824, - o: "⧐̸" -}], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { - v: "⩭", - n: 824, - o: "⩭̸" -}], [0, "⩮"], [0, "⩯"], [0, { - v: "⩰", - n: 824, - o: "⩰̸" -}], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { - v: "⩽", - n: 824, - o: "⩽̸" -}], [0, { - v: "⩾", - n: 824, - o: "⩾̸" -}], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { - v: "⪡", - n: 824, - o: "⪡̸" -}], [0, { - v: "⪢", - n: 824, - o: "⪢̸" -}], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { - v: "⪬", - n: 65024, - o: "⪬︀" -}], [0, { - v: "⪭", - n: 65024, - o: "⪭︀" -}], [0, "⪮"], [0, { - v: "⪯", - n: 824, - o: "⪯̸" -}], [0, { - v: "⪰", - n: 824, - o: "⪰̸" -}], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { - v: "⫅", - n: 824, - o: "⫅̸" -}], [0, { - v: "⫆", - n: 824, - o: "⫆̸" -}], [0, "⫇"], [0, "⫈"], [2, { - v: "⫋", - n: 65024, - o: "⫋︀" -}], [0, { - v: "⫌", - n: 65024, - o: "⫌︀" -}], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { - v: "⫽", - n: 8421, - o: "⫽⃥" -}], [44343, { - n: new Map( /* #__PURE__ */restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) -}], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); + function moveSubword(cm, dir) { + cm.extendSelectionsBy(function (range) { + if (cm.display.shift || cm.doc.extend || range.empty()) return findPosSubword(cm.doc, range.head, dir);else return dir < 0 ? range.from() : range.to(); + }); + } + cmds.goSubwordLeft = function (cm) { + moveSubword(cm, -1); + }; + cmds.goSubwordRight = function (cm) { + moveSubword(cm, 1); + }; + cmds.scrollLineUp = function (cm) { + var info = cm.getScrollInfo(); + if (!cm.somethingSelected()) { + var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local"); + if (cm.getCursor().line >= visibleBottomLine) cm.execCommand("goLineUp"); + } + cm.scrollTo(null, info.top - cm.defaultTextHeight()); + }; + cmds.scrollLineDown = function (cm) { + var info = cm.getScrollInfo(); + if (!cm.somethingSelected()) { + var visibleTopLine = cm.lineAtHeight(info.top, "local") + 1; + if (cm.getCursor().line <= visibleTopLine) cm.execCommand("goLineDown"); + } + cm.scrollTo(null, info.top + cm.defaultTextHeight()); + }; + cmds.splitSelectionByLine = function (cm) { + var ranges = cm.listSelections(), + lineRanges = []; + for (var i = 0; i < ranges.length; i++) { + var from = ranges[i].from(), + to = ranges[i].to(); + for (var line = from.line; line <= to.line; ++line) if (!(to.line > from.line && line == to.line && to.ch == 0)) lineRanges.push({ + anchor: line == from.line ? from : Pos(line, 0), + head: line == to.line ? to : Pos(line) + }); + } + cm.setSelections(lineRanges, 0); + }; + cmds.singleSelectionTop = function (cm) { + var range = cm.listSelections()[0]; + cm.setSelection(range.anchor, range.head, { + scroll: false + }); + }; + cmds.selectLine = function (cm) { + var ranges = cm.listSelections(), + extended = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + extended.push({ + anchor: Pos(range.from().line, 0), + head: Pos(range.to().line + 1, 0) + }); + } + cm.setSelections(extended); + }; + function insertLine(cm, above) { + if (cm.isReadOnly()) return CodeMirror.Pass; + cm.operation(function () { + var len = cm.listSelections().length, + newSelection = [], + last = -1; + for (var i = 0; i < len; i++) { + var head = cm.listSelections()[i].head; + if (head.line <= last) continue; + var at = Pos(head.line + (above ? 0 : 1), 0); + cm.replaceRange("\n", at, null, "+insertLine"); + cm.indentLine(at.line, null, true); + newSelection.push({ + head: at, + anchor: at + }); + last = head.line + 1; + } + cm.setSelections(newSelection); + }); + cm.execCommand("indentAuto"); + } + cmds.insertLineAfter = function (cm) { + return insertLine(cm, false); + }; + cmds.insertLineBefore = function (cm) { + return insertLine(cm, true); + }; + function wordAt(cm, pos) { + var start = pos.ch, + end = start, + line = cm.getLine(pos.line); + while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start; + while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end; + return { + from: Pos(pos.line, start), + to: Pos(pos.line, end), + word: line.slice(start, end) + }; + } + cmds.selectNextOccurrence = function (cm) { + var from = cm.getCursor("from"), + to = cm.getCursor("to"); + var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel; + if (CodeMirror.cmpPos(from, to) == 0) { + var word = wordAt(cm, from); + if (!word.word) return; + cm.setSelection(word.from, word.to); + fullWord = true; + } else { + var text = cm.getRange(from, to); + var query = fullWord ? new RegExp("\\b" + text + "\\b") : text; + var cur = cm.getSearchCursor(query, to); + var found = cur.findNext(); + if (!found) { + cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0)); + found = cur.findNext(); + } + if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return; + cm.addSelection(cur.from(), cur.to()); + } + if (fullWord) cm.state.sublimeFindFullWord = cm.doc.sel; + }; + cmds.skipAndSelectNextOccurrence = function (cm) { + var prevAnchor = cm.getCursor("anchor"), + prevHead = cm.getCursor("head"); + cmds.selectNextOccurrence(cm); + if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) { + cm.doc.setSelections(cm.doc.listSelections().filter(function (sel) { + return sel.anchor != prevAnchor || sel.head != prevHead; + })); + } + }; + function addCursorToSelection(cm, dir) { + var ranges = cm.listSelections(), + newRanges = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + var newAnchor = cm.findPosV(range.anchor, dir, "line", range.anchor.goalColumn); + var newHead = cm.findPosV(range.head, dir, "line", range.head.goalColumn); + newAnchor.goalColumn = range.anchor.goalColumn != null ? range.anchor.goalColumn : cm.cursorCoords(range.anchor, "div").left; + newHead.goalColumn = range.head.goalColumn != null ? range.head.goalColumn : cm.cursorCoords(range.head, "div").left; + var newRange = { + anchor: newAnchor, + head: newHead + }; + newRanges.push(range); + newRanges.push(newRange); + } + cm.setSelections(newRanges); + } + cmds.addCursorToPrevLine = function (cm) { + addCursorToSelection(cm, -1); + }; + cmds.addCursorToNextLine = function (cm) { + addCursorToSelection(cm, 1); + }; + function isSelectedRange(ranges, from, to) { + for (var i = 0; i < ranges.length; i++) if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 && CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true; + return false; + } + var mirror = "(){}[]"; + function selectBetweenBrackets(cm) { + var ranges = cm.listSelections(), + newRanges = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], + pos = range.head, + opening = cm.scanForBracket(pos, -1); + if (!opening) return false; + for (;;) { + var closing = cm.scanForBracket(pos, 1); + if (!closing) return false; + if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) { + var startPos = Pos(opening.pos.line, opening.pos.ch + 1); + if (CodeMirror.cmpPos(startPos, range.from()) == 0 && CodeMirror.cmpPos(closing.pos, range.to()) == 0) { + opening = cm.scanForBracket(opening.pos, -1); + if (!opening) return false; + } else { + newRanges.push({ + anchor: startPos, + head: closing.pos + }); + break; + } + } + pos = Pos(closing.pos.line, closing.pos.ch + 1); + } + } + cm.setSelections(newRanges); + return true; + } + cmds.selectScope = function (cm) { + selectBetweenBrackets(cm) || cm.execCommand("selectAll"); + }; + cmds.selectBetweenBrackets = function (cm) { + if (!selectBetweenBrackets(cm)) return CodeMirror.Pass; + }; + function puncType(type) { + return !type ? null : /\bpunctuation\b/.test(type) ? type : undefined; + } + cmds.goToBracket = function (cm) { + cm.extendSelectionsBy(function (range) { + var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head))); + if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos; + var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1)))); + return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head; + }); + }; + cmds.swapLineUp = function (cm) { + if (cm.isReadOnly()) return CodeMirror.Pass; + var ranges = cm.listSelections(), + linesToMove = [], + at = cm.firstLine() - 1, + newSels = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], + from = range.from().line - 1, + to = range.to().line; + newSels.push({ + anchor: Pos(range.anchor.line - 1, range.anchor.ch), + head: Pos(range.head.line - 1, range.head.ch) + }); + if (range.to().ch == 0 && !range.empty()) --to; + if (from > at) linesToMove.push(from, to);else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to; + at = to; + } + cm.operation(function () { + for (var i = 0; i < linesToMove.length; i += 2) { + var from = linesToMove[i], + to = linesToMove[i + 1]; + var line = cm.getLine(from); + cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine"); + if (to > cm.lastLine()) cm.replaceRange("\n" + line, Pos(cm.lastLine()), null, "+swapLine");else cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine"); + } + cm.setSelections(newSels); + cm.scrollIntoView(); + }); + }; + cmds.swapLineDown = function (cm) { + if (cm.isReadOnly()) return CodeMirror.Pass; + var ranges = cm.listSelections(), + linesToMove = [], + at = cm.lastLine() + 1; + for (var i = ranges.length - 1; i >= 0; i--) { + var range = ranges[i], + from = range.to().line + 1, + to = range.from().line; + if (range.to().ch == 0 && !range.empty()) from--; + if (from < at) linesToMove.push(from, to);else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to; + at = to; + } + cm.operation(function () { + for (var i = linesToMove.length - 2; i >= 0; i -= 2) { + var from = linesToMove[i], + to = linesToMove[i + 1]; + var line = cm.getLine(from); + if (from == cm.lastLine()) cm.replaceRange("", Pos(from - 1), Pos(from), "+swapLine");else cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine"); + cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine"); + } + cm.scrollIntoView(); + }); + }; + cmds.toggleCommentIndented = function (cm) { + cm.toggleComment({ + indent: true + }); + }; + cmds.joinLines = function (cm) { + var ranges = cm.listSelections(), + joined = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], + from = range.from(); + var start = from.line, + end = range.to().line; + while (i < ranges.length - 1 && ranges[i + 1].from().line == end) end = ranges[++i].to().line; + joined.push({ + start: start, + end: end, + anchor: !range.empty() && from + }); + } + cm.operation(function () { + var offset = 0, + ranges = []; + for (var i = 0; i < joined.length; i++) { + var obj = joined[i]; + var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), + head; + for (var line = obj.start; line <= obj.end; line++) { + var actual = line - offset; + if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1); + if (actual < cm.lastLine()) { + cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length)); + ++offset; + } + } + ranges.push({ + anchor: anchor || head, + head: head + }); + } + cm.setSelections(ranges, 0); + }); + }; + cmds.duplicateLine = function (cm) { + cm.operation(function () { + var rangeCount = cm.listSelections().length; + for (var i = 0; i < rangeCount; i++) { + var range = cm.listSelections()[i]; + if (range.empty()) cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0));else cm.replaceRange(cm.getRange(range.from(), range.to()), range.from()); + } + cm.scrollIntoView(); + }); + }; + function sortLines(cm, caseSensitive, direction) { + if (cm.isReadOnly()) return CodeMirror.Pass; + var ranges = cm.listSelections(), + toSort = [], + selected; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range.empty()) continue; + var from = range.from().line, + to = range.to().line; + while (i < ranges.length - 1 && ranges[i + 1].from().line == to) to = ranges[++i].to().line; + if (!ranges[i].to().ch) to--; + toSort.push(from, to); + } + if (toSort.length) selected = true;else toSort.push(cm.firstLine(), cm.lastLine()); + cm.operation(function () { + var ranges = []; + for (var i = 0; i < toSort.length; i += 2) { + var from = toSort[i], + to = toSort[i + 1]; + var start = Pos(from, 0), + end = Pos(to); + var lines = cm.getRange(start, end, false); + if (caseSensitive) lines.sort(function (a, b) { + return a < b ? -direction : a == b ? 0 : direction; + });else lines.sort(function (a, b) { + var au = a.toUpperCase(), + bu = b.toUpperCase(); + if (au != bu) { + a = au; + b = bu; + } + return a < b ? -direction : a == b ? 0 : direction; + }); + cm.replaceRange(lines, start, end); + if (selected) ranges.push({ + anchor: start, + head: Pos(to + 1, 0) + }); + } + if (selected) cm.setSelections(ranges, 0); + }); + } + cmds.sortLines = function (cm) { + sortLines(cm, true, 1); + }; + cmds.reverseSortLines = function (cm) { + sortLines(cm, true, -1); + }; + cmds.sortLinesInsensitive = function (cm) { + sortLines(cm, false, 1); + }; + cmds.reverseSortLinesInsensitive = function (cm) { + sortLines(cm, false, -1); + }; + cmds.nextBookmark = function (cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) while (marks.length) { + var current = marks.shift(); + var found = current.find(); + if (found) { + marks.push(current); + return cm.setSelection(found.from, found.to); + } + } + }; + cmds.prevBookmark = function (cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) while (marks.length) { + marks.unshift(marks.pop()); + var found = marks[marks.length - 1].find(); + if (!found) marks.pop();else return cm.setSelection(found.from, found.to); + } + }; + cmds.toggleBookmark = function (cm) { + var ranges = cm.listSelections(); + var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []); + for (var i = 0; i < ranges.length; i++) { + var from = ranges[i].from(), + to = ranges[i].to(); + var found = ranges[i].empty() ? cm.findMarksAt(from) : cm.findMarks(from, to); + for (var j = 0; j < found.length; j++) { + if (found[j].sublimeBookmark) { + found[j].clear(); + for (var k = 0; k < marks.length; k++) if (marks[k] == found[j]) marks.splice(k--, 1); + break; + } + } + if (j == found.length) marks.push(cm.markText(from, to, { + sublimeBookmark: true, + clearWhenEmpty: false + })); + } + }; + cmds.clearBookmarks = function (cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear(); + marks.length = 0; + }; + cmds.selectBookmarks = function (cm) { + var marks = cm.state.sublimeBookmarks, + ranges = []; + if (marks) for (var i = 0; i < marks.length; i++) { + var found = marks[i].find(); + if (!found) marks.splice(i--, 0);else ranges.push({ + anchor: found.from, + head: found.to + }); + } + if (ranges.length) cm.setSelections(ranges, 0); + }; + function modifyWordOrSelection(cm, mod) { + cm.operation(function () { + var ranges = cm.listSelections(), + indices = [], + replacements = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range.empty()) { + indices.push(i); + replacements.push(""); + } else replacements.push(mod(cm.getRange(range.from(), range.to()))); + } + cm.replaceSelections(replacements, "around", "case"); + for (var i = indices.length - 1, at; i >= 0; i--) { + var range = ranges[indices[i]]; + if (at && CodeMirror.cmpPos(range.head, at) > 0) continue; + var word = wordAt(cm, range.head); + at = word.from; + cm.replaceRange(mod(word.word), word.from, word.to); + } + }); + } + cmds.smartBackspace = function (cm) { + if (cm.somethingSelected()) return CodeMirror.Pass; + cm.operation(function () { + var cursors = cm.listSelections(); + var indentUnit = cm.getOption("indentUnit"); + for (var i = cursors.length - 1; i >= 0; i--) { + var cursor = cursors[i].head; + var toStartOfLine = cm.getRange({ + line: cursor.line, + ch: 0 + }, cursor); + var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize")); + + // Delete by one character by default + var deletePos = cm.findPosH(cursor, -1, "char", false); + if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) { + var prevIndent = new Pos(cursor.line, CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit)); + + // Smart delete only if we found a valid prevIndent location + if (prevIndent.ch != cursor.ch) deletePos = prevIndent; + } + cm.replaceRange("", deletePos, cursor, "+delete"); + } + }); + }; + cmds.delLineRight = function (cm) { + cm.operation(function () { + var ranges = cm.listSelections(); + for (var i = ranges.length - 1; i >= 0; i--) cm.replaceRange("", ranges[i].anchor, Pos(ranges[i].to().line), "+delete"); + cm.scrollIntoView(); + }); + }; + cmds.upcaseAtCursor = function (cm) { + modifyWordOrSelection(cm, function (str) { + return str.toUpperCase(); + }); + }; + cmds.downcaseAtCursor = function (cm) { + modifyWordOrSelection(cm, function (str) { + return str.toLowerCase(); + }); + }; + cmds.setSublimeMark = function (cm) { + if (cm.state.sublimeMark) cm.state.sublimeMark.clear(); + cm.state.sublimeMark = cm.setBookmark(cm.getCursor()); + }; + cmds.selectToSublimeMark = function (cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) cm.setSelection(cm.getCursor(), found); + }; + cmds.deleteToSublimeMark = function (cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) { + var from = cm.getCursor(), + to = found; + if (CodeMirror.cmpPos(from, to) > 0) { + var tmp = to; + to = from; + from = tmp; + } + cm.state.sublimeKilled = cm.getRange(from, to); + cm.replaceRange("", from, to); + } + }; + cmds.swapWithSublimeMark = function (cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) { + cm.state.sublimeMark.clear(); + cm.state.sublimeMark = cm.setBookmark(cm.getCursor()); + cm.setCursor(found); + } + }; + cmds.sublimeYank = function (cm) { + if (cm.state.sublimeKilled != null) cm.replaceSelection(cm.state.sublimeKilled, null, "paste"); + }; + cmds.showInCenter = function (cm) { + var pos = cm.cursorCoords(null, "local"); + cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2); + }; + function getTarget(cm) { + var from = cm.getCursor("from"), + to = cm.getCursor("to"); + if (CodeMirror.cmpPos(from, to) == 0) { + var word = wordAt(cm, from); + if (!word.word) return; + from = word.from; + to = word.to; + } + return { + from: from, + to: to, + query: cm.getRange(from, to), + word: word + }; + } + function findAndGoTo(cm, forward) { + var target = getTarget(cm); + if (!target) return; + var query = target.query; + var cur = cm.getSearchCursor(query, forward ? target.to : target.from); + if (forward ? cur.findNext() : cur.findPrevious()) { + cm.setSelection(cur.from(), cur.to()); + } else { + cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0) : cm.clipPos(Pos(cm.lastLine()))); + if (forward ? cur.findNext() : cur.findPrevious()) cm.setSelection(cur.from(), cur.to());else if (target.word) cm.setSelection(target.from, target.to); + } + } + ; + cmds.findUnder = function (cm) { + findAndGoTo(cm, true); + }; + cmds.findUnderPrevious = function (cm) { + findAndGoTo(cm, false); + }; + cmds.findAllUnder = function (cm) { + var target = getTarget(cm); + if (!target) return; + var cur = cm.getSearchCursor(target.query); + var matches = []; + var primaryIndex = -1; + while (cur.findNext()) { + matches.push({ + anchor: cur.from(), + head: cur.to() + }); + if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch) primaryIndex++; + } + cm.setSelections(matches, primaryIndex); + }; + var keyMap = CodeMirror.keyMap; + keyMap.macSublime = { + "Cmd-Left": "goLineStartSmart", + "Shift-Tab": "indentLess", + "Shift-Ctrl-K": "deleteLine", + "Alt-Q": "wrapLines", + "Ctrl-Left": "goSubwordLeft", + "Ctrl-Right": "goSubwordRight", + "Ctrl-Alt-Up": "scrollLineUp", + "Ctrl-Alt-Down": "scrollLineDown", + "Cmd-L": "selectLine", + "Shift-Cmd-L": "splitSelectionByLine", + "Esc": "singleSelectionTop", + "Cmd-Enter": "insertLineAfter", + "Shift-Cmd-Enter": "insertLineBefore", + "Cmd-D": "selectNextOccurrence", + "Shift-Cmd-Space": "selectScope", + "Shift-Cmd-M": "selectBetweenBrackets", + "Cmd-M": "goToBracket", + "Cmd-Ctrl-Up": "swapLineUp", + "Cmd-Ctrl-Down": "swapLineDown", + "Cmd-/": "toggleCommentIndented", + "Cmd-J": "joinLines", + "Shift-Cmd-D": "duplicateLine", + "F5": "sortLines", + "Shift-F5": "reverseSortLines", + "Cmd-F5": "sortLinesInsensitive", + "Shift-Cmd-F5": "reverseSortLinesInsensitive", + "F2": "nextBookmark", + "Shift-F2": "prevBookmark", + "Cmd-F2": "toggleBookmark", + "Shift-Cmd-F2": "clearBookmarks", + "Alt-F2": "selectBookmarks", + "Backspace": "smartBackspace", + "Cmd-K Cmd-D": "skipAndSelectNextOccurrence", + "Cmd-K Cmd-K": "delLineRight", + "Cmd-K Cmd-U": "upcaseAtCursor", + "Cmd-K Cmd-L": "downcaseAtCursor", + "Cmd-K Cmd-Space": "setSublimeMark", + "Cmd-K Cmd-A": "selectToSublimeMark", + "Cmd-K Cmd-W": "deleteToSublimeMark", + "Cmd-K Cmd-X": "swapWithSublimeMark", + "Cmd-K Cmd-Y": "sublimeYank", + "Cmd-K Cmd-C": "showInCenter", + "Cmd-K Cmd-G": "clearBookmarks", + "Cmd-K Cmd-Backspace": "delLineLeft", + "Cmd-K Cmd-1": "foldAll", + "Cmd-K Cmd-0": "unfoldAll", + "Cmd-K Cmd-J": "unfoldAll", + "Ctrl-Shift-Up": "addCursorToPrevLine", + "Ctrl-Shift-Down": "addCursorToNextLine", + "Cmd-F3": "findUnder", + "Shift-Cmd-F3": "findUnderPrevious", + "Alt-F3": "findAllUnder", + "Shift-Cmd-[": "fold", + "Shift-Cmd-]": "unfold", + "Cmd-I": "findIncremental", + "Shift-Cmd-I": "findIncrementalReverse", + "Cmd-H": "replace", + "F3": "findNext", + "Shift-F3": "findPrev", + "fallthrough": "macDefault" + }; + CodeMirror.normalizeKeyMap(keyMap.macSublime); + keyMap.pcSublime = { + "Shift-Tab": "indentLess", + "Shift-Ctrl-K": "deleteLine", + "Alt-Q": "wrapLines", + "Ctrl-T": "transposeChars", + "Alt-Left": "goSubwordLeft", + "Alt-Right": "goSubwordRight", + "Ctrl-Up": "scrollLineUp", + "Ctrl-Down": "scrollLineDown", + "Ctrl-L": "selectLine", + "Shift-Ctrl-L": "splitSelectionByLine", + "Esc": "singleSelectionTop", + "Ctrl-Enter": "insertLineAfter", + "Shift-Ctrl-Enter": "insertLineBefore", + "Ctrl-D": "selectNextOccurrence", + "Shift-Ctrl-Space": "selectScope", + "Shift-Ctrl-M": "selectBetweenBrackets", + "Ctrl-M": "goToBracket", + "Shift-Ctrl-Up": "swapLineUp", + "Shift-Ctrl-Down": "swapLineDown", + "Ctrl-/": "toggleCommentIndented", + "Ctrl-J": "joinLines", + "Shift-Ctrl-D": "duplicateLine", + "F9": "sortLines", + "Shift-F9": "reverseSortLines", + "Ctrl-F9": "sortLinesInsensitive", + "Shift-Ctrl-F9": "reverseSortLinesInsensitive", + "F2": "nextBookmark", + "Shift-F2": "prevBookmark", + "Ctrl-F2": "toggleBookmark", + "Shift-Ctrl-F2": "clearBookmarks", + "Alt-F2": "selectBookmarks", + "Backspace": "smartBackspace", + "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence", + "Ctrl-K Ctrl-K": "delLineRight", + "Ctrl-K Ctrl-U": "upcaseAtCursor", + "Ctrl-K Ctrl-L": "downcaseAtCursor", + "Ctrl-K Ctrl-Space": "setSublimeMark", + "Ctrl-K Ctrl-A": "selectToSublimeMark", + "Ctrl-K Ctrl-W": "deleteToSublimeMark", + "Ctrl-K Ctrl-X": "swapWithSublimeMark", + "Ctrl-K Ctrl-Y": "sublimeYank", + "Ctrl-K Ctrl-C": "showInCenter", + "Ctrl-K Ctrl-G": "clearBookmarks", + "Ctrl-K Ctrl-Backspace": "delLineLeft", + "Ctrl-K Ctrl-1": "foldAll", + "Ctrl-K Ctrl-0": "unfoldAll", + "Ctrl-K Ctrl-J": "unfoldAll", + "Ctrl-Alt-Up": "addCursorToPrevLine", + "Ctrl-Alt-Down": "addCursorToNextLine", + "Ctrl-F3": "findUnder", + "Shift-Ctrl-F3": "findUnderPrevious", + "Alt-F3": "findAllUnder", + "Shift-Ctrl-[": "fold", + "Shift-Ctrl-]": "unfold", + "Ctrl-I": "findIncremental", + "Shift-Ctrl-I": "findIncrementalReverse", + "Ctrl-H": "replace", + "F3": "findNext", + "Shift-F3": "findPrev", + "fallthrough": "pcDefault" + }; + CodeMirror.normalizeKeyMap(keyMap.pcSublime); + var mac = keyMap.default == keyMap.macDefault; + keyMap.sublime = mac ? keyMap.macSublime : keyMap.pcSublime; +}); /***/ }), -/***/ "../../../node_modules/entities/lib/index.js": -/*!***************************************************!*\ - !*** ../../../node_modules/entities/lib/index.js ***! - \***************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/codemirror/lib/codemirror.js": +/*!**********************************************************!*\ + !*** ../../../node_modules/codemirror/lib/codemirror.js ***! + \**********************************************************/ +/***/ (function(module) { +"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0; -var decode_js_1 = __webpack_require__(/*! ./decode.js */ "../../../node_modules/entities/lib/decode.js"); -var encode_js_1 = __webpack_require__(/*! ./encode.js */ "../../../node_modules/entities/lib/encode.js"); -var escape_js_1 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js"); -/** The level of entities to support. */ -var EntityLevel; -(function (EntityLevel) { - /** Support only XML entities. */ - EntityLevel[EntityLevel["XML"] = 0] = "XML"; - /** Support HTML entities, which are a superset of XML entities. */ - EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; -})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {})); -var EncodingMode; -(function (EncodingMode) { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Text"] = 4] = "Text"; -})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {})); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -function decode(data, options) { - if (options === void 0) { - options = EntityLevel.XML; - } - var level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - var mode = typeof options === "object" ? options.mode : undefined; - return (0, decode_js_1.decodeHTML)(data, mode); - } - return (0, decode_js_1.decodeXML)(data); -} -exports.decode = decode; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -function decodeStrict(data, options) { - var _a; - if (options === void 0) { - options = EntityLevel.XML; +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// This is CodeMirror (https://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function (global, factory) { + true ? module.exports = factory() : 0; +})(void 0, function () { + 'use strict'; + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + var userAgent = navigator.userAgent; + var platform = navigator.platform; + var gecko = /gecko\/\d/i.test(userAgent); + var ie_upto10 = /MSIE \d/.test(userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); + var edge = /Edge\/(\d+)/.exec(userAgent); + var ie = ie_upto10 || ie_11up || edge; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]); + var webkit = !edge && /WebKit\//.test(userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); + var chrome = !edge && /Chrome\//.test(userAgent); + var presto = /Opera\//.test(userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); + var phantom = /PhantomJS/.test(userAgent); + var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2); + var android = /Android/.test(userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); + var mac = ios || /Mac/.test(platform); + var chromeOS = /\bCrOS\b/.test(userAgent); + var windows = /win/i.test(platform); + var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) { + presto_version = Number(presto_version[1]); + } + if (presto_version && presto_version >= 15) { + presto = false; + webkit = true; + } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || ie && ie_version >= 9; + function classTest(cls) { + return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); + } + var rmClass = function (node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) { + e.removeChild(e.firstChild); + } + return e; } - var opts = typeof options === "number" ? { - level: options - } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : opts.mode = decode_js_1.DecodingMode.Strict; - return decode(data, opts); -} -exports.decodeStrict = decodeStrict; -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -function encode(data, options) { - if (options === void 0) { - options = EntityLevel.XML; + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); } - var opts = typeof options === "number" ? { - level: options - } : options; - // Mode `UTF8` just escapes XML entities - if (opts.mode === EncodingMode.UTF8) return (0, escape_js_1.escapeUTF8)(data); - if (opts.mode === EncodingMode.Attribute) return (0, escape_js_1.escapeAttribute)(data); - if (opts.mode === EncodingMode.Text) return (0, escape_js_1.escapeText)(data); - if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return (0, encode_js_1.encodeNonAsciiHTML)(data); + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) { + e.className = className; } - return (0, encode_js_1.encodeHTML)(data); + if (style) { + e.style.cssText = style; + } + if (typeof content == "string") { + e.appendChild(document.createTextNode(content)); + } else if (content) { + for (var i = 0; i < content.length; ++i) { + e.appendChild(content[i]); + } + } + return e; } - // ASCII and Extensive are equivalent - return (0, escape_js_1.encodeXML)(data); -} -exports.encode = encode; -var escape_js_2 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js"); -Object.defineProperty(exports, "encodeXML", ({ - enumerable: true, - get: function () { - return escape_js_2.encodeXML; + // wrapper for elt, which removes the elt from the accessibility tree + function eltP(tag, content, className, style) { + var e = elt(tag, content, className, style); + e.setAttribute("role", "presentation"); + return e; } -})); -Object.defineProperty(exports, "escape", ({ - enumerable: true, - get: function () { - return escape_js_2.escape; + var range; + if (document.createRange) { + range = function (node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r; + }; + } else { + range = function (node, start, end) { + var r = document.body.createTextRange(); + try { + r.moveToElementText(node.parentNode); + } catch (e) { + return r; + } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r; + }; } -})); -Object.defineProperty(exports, "escapeUTF8", ({ - enumerable: true, - get: function () { - return escape_js_2.escapeUTF8; + function contains(parent, child) { + if (child.nodeType == 3) + // Android browser always returns false when child is a textnode + { + child = child.parentNode; + } + if (parent.contains) { + return parent.contains(child); + } + do { + if (child.nodeType == 11) { + child = child.host; + } + if (child == parent) { + return true; + } + } while (child = child.parentNode); } -})); -Object.defineProperty(exports, "escapeAttribute", ({ - enumerable: true, - get: function () { - return escape_js_2.escapeAttribute; + function activeElt() { + // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. + // IE < 10 will throw when accessed while the page is loading or in an iframe. + // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. + var activeElement; + try { + activeElement = document.activeElement; + } catch (e) { + activeElement = document.body || null; + } + while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) { + activeElement = activeElement.shadowRoot.activeElement; + } + return activeElement; } -})); -Object.defineProperty(exports, "escapeText", ({ - enumerable: true, - get: function () { - return escape_js_2.escapeText; + function addClass(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) { + node.className += (current ? " " : "") + cls; + } } -})); -var encode_js_2 = __webpack_require__(/*! ./encode.js */ "../../../node_modules/entities/lib/encode.js"); -Object.defineProperty(exports, "encodeHTML", ({ - enumerable: true, - get: function () { - return encode_js_2.encodeHTML; + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) { + if (as[i] && !classTest(as[i]).test(b)) { + b += " " + as[i]; + } + } + return b; } -})); -Object.defineProperty(exports, "encodeNonAsciiHTML", ({ - enumerable: true, - get: function () { - return encode_js_2.encodeNonAsciiHTML; + var selectInput = function (node) { + node.select(); + }; + if (ios) + // Mobile Safari apparently has a bug where select() is broken. + { + selectInput = function (node) { + node.selectionStart = 0; + node.selectionEnd = node.value.length; + }; + } else if (ie) + // Suppress mysterious IE10 errors + { + selectInput = function (node) { + try { + node.select(); + } catch (_e) {} + }; + } + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return f.apply(null, args); + }; } -})); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "encodeHTML4", ({ - enumerable: true, - get: function () { - return encode_js_2.encodeHTML; + function copyObj(obj, target, overwrite) { + if (!target) { + target = {}; + } + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) { + target[prop] = obj[prop]; + } + } + return target; } -})); -Object.defineProperty(exports, "encodeHTML5", ({ - enumerable: true, - get: function () { - return encode_js_2.encodeHTML; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) { + end = string.length; + } + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) { + return n + (end - i); + } + n += nextTab - i; + n += tabSize - n % tabSize; + i = nextTab + 1; + } } -})); -var decode_js_2 = __webpack_require__(/*! ./decode.js */ "../../../node_modules/entities/lib/decode.js"); -Object.defineProperty(exports, "EntityDecoder", ({ - enumerable: true, - get: function () { - return decode_js_2.EntityDecoder; + var Delayed = function () { + this.id = null; + this.f = null; + this.time = 0; + this.handler = bind(this.onTimeout, this); + }; + Delayed.prototype.onTimeout = function (self) { + self.id = 0; + if (self.time <= +new Date()) { + self.f(); + } else { + setTimeout(self.handler, self.time - +new Date()); + } + }; + Delayed.prototype.set = function (ms, f) { + this.f = f; + var time = +new Date() + ms; + if (!this.id || time < this.time) { + clearTimeout(this.id); + this.id = setTimeout(this.handler, ms); + this.time = time; + } + }; + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) { + if (array[i] == elt) { + return i; + } + } + return -1; } -})); -Object.defineProperty(exports, "DecodingMode", ({ - enumerable: true, - get: function () { - return decode_js_2.DecodingMode; + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 50; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = { + toString: function () { + return "CodeMirror.Pass"; + } + }; + + // Reused option objects for setSelection & friends + var sel_dontScroll = { + scroll: false + }, + sel_mouse = { + origin: "*mouse" + }, + sel_move = { + origin: "+move" + }; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) { + nextTab = string.length; + } + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) { + return pos + Math.min(skipped, goal - col); + } + col += nextTab - pos; + col += tabSize - col % tabSize; + pos = nextTab + 1; + if (col >= goal) { + return pos; + } + } } -})); -Object.defineProperty(exports, "decodeXML", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeXML; + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) { + spaceStrs.push(lst(spaceStrs) + " "); + } + return spaceStrs[n]; } -})); -Object.defineProperty(exports, "decodeHTML", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTML; + function lst(arr) { + return arr[arr.length - 1]; } -})); -Object.defineProperty(exports, "decodeHTMLStrict", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTMLStrict; + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) { + out[i] = f(array[i], i); + } + return out; } -})); -Object.defineProperty(exports, "decodeHTMLAttribute", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTMLAttribute; + function insertSorted(array, value, score) { + var pos = 0, + priority = score(value); + while (pos < array.length && score(array[pos]) <= priority) { + pos++; + } + array.splice(pos, 0, value); } -})); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "decodeHTML4", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTML; + function nothing() {} + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) { + copyObj(props, inst); + } + return inst; } -})); -Object.defineProperty(exports, "decodeHTML5", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTML; + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + function isWordCharBasic(ch) { + return /\w/.test(ch) || ch > "\x80" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); } -})); -Object.defineProperty(exports, "decodeHTML4Strict", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTMLStrict; + function isWordChar(ch, helper) { + if (!helper) { + return isWordCharBasic(ch); + } + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { + return true; + } + return helper.test(ch); } -})); -Object.defineProperty(exports, "decodeHTML5Strict", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeHTMLStrict; + function isEmpty(obj) { + for (var n in obj) { + if (obj.hasOwnProperty(n) && obj[n]) { + return false; + } + } + return true; } -})); -Object.defineProperty(exports, "decodeXMLStrict", ({ - enumerable: true, - get: function () { - return decode_js_2.decodeXML; + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/fonts/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function isExtendingChar(ch) { + return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } -})); -/***/ }), + // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. + function skipExtendingChars(str, pos, dir) { + while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { + pos += dir; + } + return pos; + } -/***/ "../../../node_modules/framer-motion/dist/cjs/index.js": -/*!*************************************************************!*\ - !*** ../../../node_modules/framer-motion/dist/cjs/index.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + // Returns the value from the range [`from`; `to`] that satisfies + // `pred` and is closest to `from`. Assumes that at least `to` + // satisfies `pred`. Supports `from` being greater than `to`. + function findFirst(pred, from, to) { + // At any point we are certain `to` satisfies `pred`, don't know + // whether `from` does. + var dir = from > to ? -1 : 1; + for (;;) { + if (from == to) { + return from; + } + var midF = (from + to) / 2, + mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF); + if (mid == from) { + return pred(mid) ? from : to; + } + if (pred(mid)) { + to = mid; + } else { + from = mid + dir; + } + } + } + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) { + return f(from, to, "ltr", 0); + } + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i); + found = true; + } + } + if (!found) { + f(from, to, "ltr"); + } + } + var bidiOther = null; + function getBidiPartAt(order, ch, sticky) { + var found; + bidiOther = null; + for (var i = 0; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < ch && cur.to > ch) { + return i; + } + if (cur.to == ch) { + if (cur.from != cur.to && sticky == "before") { + found = i; + } else { + bidiOther = i; + } + } + if (cur.from == ch) { + if (cur.from != cur.to && sticky != "before") { + found = i; + } else { + bidiOther = i; + } + } + } + return found != null ? found : bidiOther; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = function () { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6f9 + var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; + function charType(code) { + if (code <= 0xf7) { + return lowTypes.charAt(code); + } else if (0x590 <= code && code <= 0x5f4) { + return "R"; + } else if (0x600 <= code && code <= 0x6f9) { + return arabicTypes.charAt(code - 0x600); + } else if (0x6ee <= code && code <= 0x8ac) { + return "r"; + } else if (0x2000 <= code && code <= 0x200b) { + return "w"; + } else if (code == 0x200c) { + return "b"; + } else { + return "L"; + } + } + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, + isStrong = /[LRr]/, + countsAsLeft = /[Lb1n]/, + countsAsNum = /[1n]/; + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; + this.to = to; + } + return function (str, direction) { + var outerType = direction == "ltr" ? "L" : "R"; + if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { + return false; + } + var len = str.length, + types = []; + for (var i = 0; i < len; ++i) { + types.push(charType(str.charCodeAt(i))); + } + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) { + var type = types[i$1]; + if (type == "m") { + types[i$1] = prev; + } else { + prev = type; + } + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) { + var type$1 = types[i$2]; + if (type$1 == "1" && cur == "r") { + types[i$2] = "n"; + } else if (isStrong.test(type$1)) { + cur = type$1; + if (type$1 == "r") { + types[i$2] = "R"; + } + } + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__(/*! react */ "react"); -var heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js"); -var styleValueTypes = __webpack_require__(/*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js"); -var popmotion = __webpack_require__(/*! popmotion */ "../../../node_modules/popmotion/dist/popmotion.cjs.js"); -var sync = __webpack_require__(/*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js"); -var dom = __webpack_require__(/*! @motionone/dom */ "../../../node_modules/@motionone/dom/dist/index.es.js"); -function _interopDefaultLegacy(e) { - return e && typeof e === 'object' && 'default' in e ? e : { - 'default': e - }; -} -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { - return e[k]; + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) { + var type$2 = types[i$3]; + if (type$2 == "+" && prev$1 == "1" && types[i$3 + 1] == "1") { + types[i$3] = "1"; + } else if (type$2 == "," && prev$1 == types[i$3 + 1] && (prev$1 == "1" || prev$1 == "n")) { + types[i$3] = prev$1; + } + prev$1 = type$2; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i$4 = 0; i$4 < len; ++i$4) { + var type$3 = types[i$4]; + if (type$3 == ",") { + types[i$4] = "N"; + } else if (type$3 == "%") { + var end = void 0; + for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {} + var replace = i$4 && types[i$4 - 1] == "!" || end < len && types[end] == "1" ? "1" : "N"; + for (var j = i$4; j < end; ++j) { + types[j] = replace; } - }); + i$4 = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) { + var type$4 = types[i$5]; + if (cur$1 == "L" && type$4 == "1") { + types[i$5] = "L"; + } else if (isStrong.test(type$4)) { + cur$1 = type$4; + } + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i$6 = 0; i$6 < len; ++i$6) { + if (isNeutral.test(types[i$6])) { + var end$1 = void 0; + for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {} + var before = (i$6 ? types[i$6 - 1] : outerType) == "L"; + var after = (end$1 < len ? types[end$1] : outerType) == "L"; + var replace$1 = before == after ? before ? "L" : "R" : outerType; + for (var j$1 = i$6; j$1 < end$1; ++j$1) { + types[j$1] = replace$1; + } + i$6 = end$1 - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], + m; + for (var i$7 = 0; i$7 < len;) { + if (countsAsLeft.test(types[i$7])) { + var start = i$7; + for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {} + order.push(new BidiSpan(0, start, i$7)); + } else { + var pos = i$7, + at = order.length, + isRTL = direction == "rtl" ? 1 : 0; + for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {} + for (var j$2 = pos; j$2 < i$7;) { + if (countsAsNum.test(types[j$2])) { + if (pos < j$2) { + order.splice(at, 0, new BidiSpan(1, pos, j$2)); + at += isRTL; + } + var nstart = j$2; + for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {} + order.splice(at, 0, new BidiSpan(2, nstart, j$2)); + at += isRTL; + pos = j$2; + } else { + ++j$2; + } + } + if (pos < i$7) { + order.splice(at, 0, new BidiSpan(1, pos, i$7)); + } + } } - }); + if (direction == "ltr") { + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + } + return direction == "rtl" ? order.reverse() : order; + }; + }(); + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line, direction) { + var order = line.order; + if (order == null) { + order = line.order = bidiOrdering(line.text, direction); + } + return order; } - n["default"] = e; - return Object.freeze(n); -} -var React__namespace = /*#__PURE__*/_interopNamespace(React); -var React__default = /*#__PURE__*/_interopDefaultLegacy(React); -var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync); -/** - * Browser-safe usage of process - */ -var defaultEnvironment = "production"; -var env = typeof process === "undefined" || process.env === undefined ? defaultEnvironment : "development" || 0; -var createDefinition = function (propNames) { - return { - isEnabled: function (props) { - return propNames.some(function (name) { - return !!props[name]; - }); + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var noHandlers = []; + var on = function (emitter, type, f) { + if (emitter.addEventListener) { + emitter.addEventListener(type, f, false); + } else if (emitter.attachEvent) { + emitter.attachEvent("on" + type, f); + } else { + var map = emitter._handlers || (emitter._handlers = {}); + map[type] = (map[type] || noHandlers).concat(f); } }; -}; -var featureDefinitions = { - measureLayout: createDefinition(["layout", "layoutId", "drag"]), - animation: createDefinition(["animate", "exit", "variants", "whileHover", "whileTap", "whileFocus", "whileDrag", "whileInView"]), - exit: createDefinition(["exit"]), - drag: createDefinition(["drag", "dragControls"]), - focus: createDefinition(["whileFocus"]), - hover: createDefinition(["whileHover", "onHoverStart", "onHoverEnd"]), - tap: createDefinition(["whileTap", "onTap", "onTapStart", "onTapCancel"]), - pan: createDefinition(["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"]), - inView: createDefinition(["whileInView", "onViewportEnter", "onViewportLeave"]) -}; -function loadFeatures(features) { - for (var key in features) { - if (features[key] === null) continue; - if (key === "projectionNodeConstructor") { - featureDefinitions.projectionNodeConstructor = features[key]; + function getHandlers(emitter, type) { + return emitter._handlers && emitter._handlers[type] || noHandlers; + } + function off(emitter, type, f) { + if (emitter.removeEventListener) { + emitter.removeEventListener(type, f, false); + } else if (emitter.detachEvent) { + emitter.detachEvent("on" + type, f); } else { - featureDefinitions[key].Component = features[key]; + var map = emitter._handlers, + arr = map && map[type]; + if (arr) { + var index = indexOf(arr, f); + if (index > -1) { + map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); + } + } } } -} -var LazyContext = React.createContext({ - strict: false -}); -var featureNames = Object.keys(featureDefinitions); -var numFeatures = featureNames.length; -/** - * Load features via renderless components based on the provided MotionProps. - */ -function useFeatures(props, visualElement, preloadedFeatures) { - var features = []; - var lazyContext = React.useContext(LazyContext); - if (!visualElement) return null; - /** - * If we're in development mode, check to make sure we're not rendering a motion component - * as a child of LazyMotion, as this will break the file-size benefits of using it. - */ - if (env !== "production" && preloadedFeatures && lazyContext.strict) { - heyListen.invariant(false, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."); + function signal(emitter, type /*, values...*/) { + var handlers = getHandlers(emitter, type); + if (!handlers.length) { + return; + } + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < handlers.length; ++i) { + handlers[i].apply(null, args); + } } - for (var i = 0; i < numFeatures; i++) { - var name_1 = featureNames[i]; - var _a = featureDefinitions[name_1], - isEnabled = _a.isEnabled, - Component = _a.Component; - /** - * It might be possible in the future to use this moment to - * dynamically request functionality. In initial tests this - * was producing a lot of duplication amongst bundles. - */ - if (isEnabled(props) && Component) { - features.push(React__namespace.createElement(Component, tslib.__assign({ - key: name_1 - }, props, { - visualElement: visualElement - }))); + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") { + e = { + type: e, + preventDefault: function () { + this.defaultPrevented = true; + } + }; } + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore; + } + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) { + return; + } + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) { + if (indexOf(set, arr[i]) == -1) { + set.push(arr[i]); + } + } + } + function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0; } - return features; -} -/** - * @public - */ -var MotionConfigContext = React.createContext({ - transformPagePoint: function (p) { - return p; - }, - isStatic: false, - reducedMotion: "never" -}); -var MotionContext = React.createContext({}); -function useVisualElementContext() { - return React.useContext(MotionContext).visualElement; -} + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function (type, f) { + on(this, type, f); + }; + ctor.prototype.off = function (type, f) { + off(this, type, f); + }; + } -/** - * @public - */ -var PresenceContext = React.createContext(null); -var isBrowser = typeof document !== "undefined"; -var useIsomorphicLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect; + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. -// Does this device prefer reduced motion? Returns `null` server-side. -var prefersReducedMotion = { - current: null -}; -var hasDetected = false; -function initPrefersReducedMotion() { - hasDetected = true; - if (!isBrowser) return; - if (window.matchMedia) { - var motionMediaQuery_1 = window.matchMedia("(prefers-reduced-motion)"); - var setReducedMotionPreferences = function () { - return prefersReducedMotion.current = motionMediaQuery_1.matches; - }; - motionMediaQuery_1.addListener(setReducedMotionPreferences); - setReducedMotionPreferences(); - } else { - prefersReducedMotion.current = false; + function e_preventDefault(e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } } -} -/** - * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. - * - * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing - * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. - * - * It will actively respond to changes and re-render your components with the latest setting. - * - * ```jsx - * export function Sidebar({ isOpen }) { - * const shouldReduceMotion = useReducedMotion() - * const closedX = shouldReduceMotion ? 0 : "-100%" - * - * return ( - * - * ) - * } - * ``` - * - * @return boolean - * - * @public - */ -function useReducedMotion() { - /** - * Lazy initialisation of prefersReducedMotion - */ - !hasDetected && initPrefersReducedMotion(); - var _a = tslib.__read(React.useState(prefersReducedMotion.current), 1), - shouldReduceMotion = _a[0]; - /** - * TODO See if people miss automatically updating shouldReduceMotion setting - */ - return shouldReduceMotion; -} -function useReducedMotionConfig() { - var reducedMotionPreference = useReducedMotion(); - var reducedMotion = React.useContext(MotionConfigContext).reducedMotion; - if (reducedMotion === "never") { - return false; - } else if (reducedMotion === "always") { - return true; - } else { - return reducedMotionPreference; + function e_stopPropagation(e) { + if (e.stopPropagation) { + e.stopPropagation(); + } else { + e.cancelBubble = true; + } } -} -function useVisualElement(Component, visualState, props, createVisualElement) { - var lazyContext = React.useContext(LazyContext); - var parent = useVisualElementContext(); - var presenceContext = React.useContext(PresenceContext); - var shouldReduceMotion = useReducedMotionConfig(); - var visualElementRef = React.useRef(undefined); - /** - * If we haven't preloaded a renderer, check to see if we have one lazy-loaded - */ - if (!createVisualElement) createVisualElement = lazyContext.renderer; - if (!visualElementRef.current && createVisualElement) { - visualElementRef.current = createVisualElement(Component, { - visualState: visualState, - parent: parent, - props: props, - presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id, - blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false, - shouldReduceMotion: shouldReduceMotion - }); + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; + } + function e_stop(e) { + e_preventDefault(e); + e_stopPropagation(e); + } + function e_target(e) { + return e.target || e.srcElement; + } + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) { + b = 1; + } else if (e.button & 2) { + b = 3; + } else if (e.button & 4) { + b = 2; + } + } + if (mac && e.ctrlKey && b == 1) { + b = 3; + } + return b; } - var visualElement = visualElementRef.current; - useIsomorphicLayoutEffect(function () { - visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender(); - }); - React.useEffect(function () { - var _a; - (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges(); - }); - useIsomorphicLayoutEffect(function () { - return function () { - return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); - }; - }, []); - return visualElement; -} -function isRefObject(ref) { - return typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current"); -} -/** - * Creates a ref function that, when called, hydrates the provided - * external ref and VisualElement. - */ -function useMotionRef(visualState, visualElement, externalRef) { - return React.useCallback(function (instance) { - var _a; - instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance)); - if (visualElement) { - instance ? visualElement.mount(instance) : visualElement.unmount(); + // Detect drag-and-drop + var dragAndDrop = function () { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) { + return false; } - if (externalRef) { - if (typeof externalRef === "function") { - externalRef(instance); - } else if (isRefObject(externalRef)) { - externalRef.current = instance; + var div = elt('div'); + return "draggable" in div || "dragDrop" in div; + }(); + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) { + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); } } - }, - /** - * Only pass a new ref callback to React if we've received a visual element - * factory. Otherwise we'll be mounting/remounting every time externalRef - * or other dependencies change. - */ - [visualElement]); -} + var node = zwspSupported ? elt("span", "\u200b") : elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node; + } -/** - * Decides if the supplied variable is an array of variant labels - */ -function isVariantLabels(v) { - return Array.isArray(v); -} -/** - * Decides if the supplied variable is variant label - */ -function isVariantLabel(v) { - return typeof v === "string" || isVariantLabels(v); -} -/** - * Creates an object containing the latest state of every MotionValue on a VisualElement - */ -function getCurrent(visualElement) { - var current = {}; - visualElement.forEachValue(function (value, key) { - return current[key] = value.get(); - }); - return current; -} -/** - * Creates an object containing the latest velocity of every MotionValue on a VisualElement - */ -function getVelocity$1(visualElement) { - var velocity = {}; - visualElement.forEachValue(function (value, key) { - return velocity[key] = value.getVelocity(); - }); - return velocity; -} -function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) { - var _a; - if (currentValues === void 0) { - currentValues = {}; + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) { + return badBidiRects; + } + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + var r1 = range(txt, 1, 2).getBoundingClientRect(); + removeChildren(measure); + if (!r0 || r0.left == r0.right) { + return false; + } // Safari returns null in some cases (#2780) + return badBidiRects = r1.right - r0.right < 3; + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) { + var pos = 0, + result = [], + l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) { + nl = string.length; + } + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function (string) { + return string.split(/\r\n?|\n/); + }; + var hasSelection = window.getSelection ? function (te) { + try { + return te.selectionStart != te.selectionEnd; + } catch (e) { + return false; + } + } : function (te) { + var range; + try { + range = te.ownerDocument.selection.createRange(); + } catch (e) {} + if (!range || range.parentElement() != te) { + return false; + } + return range.compareEndPoints("StartToEnd", range) != 0; + }; + var hasCopyEvent = function () { + var e = elt("div"); + if ("oncopy" in e) { + return true; + } + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function"; + }(); + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) { + return badZoomedRects; + } + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; + } + + // Known modes, by name and by MIME + var modes = {}, + mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + function defineMode(name, mode) { + if (arguments.length > 2) { + mode.dependencies = Array.prototype.slice.call(arguments, 2); + } + modes[name] = mode; + } + function defineMIME(mime, spec) { + mimeModes[mime] = spec; + } + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + function resolveMode(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") { + found = { + name: found + }; + } + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return resolveMode("application/xml"); + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return resolveMode("application/json"); + } + if (typeof spec == "string") { + return { + name: spec + }; + } else { + return spec || { + name: "null" + }; + } } - if (currentVelocity === void 0) { - currentVelocity = {}; + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + function getMode(options, spec) { + spec = resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) { + return getMode(options, "text/plain"); + } + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) { + continue; + } + if (modeObj.hasOwnProperty(prop)) { + modeObj["_" + prop] = modeObj[prop]; + } + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) { + modeObj.helperType = spec.helperType; + } + if (spec.modeProps) { + for (var prop$1 in spec.modeProps) { + modeObj[prop$1] = spec.modeProps[prop$1]; + } + } + return modeObj; } - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity); + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = {}; + function extendMode(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : modeExtensions[mode] = {}; + copyObj(properties, exts); } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity); + function copyState(mode, state) { + if (state === true) { + return state; + } + if (mode.copyState) { + return mode.copyState(state); + } + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) { + val = val.concat([]); + } + nstate[n] = val; + } + return nstate; } - return definition; -} -function resolveVariant(visualElement, definition, custom) { - var props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity$1(visualElement)); -} -function checkIfControllingVariants(props) { - var _a; - return typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" || isVariantLabel(props.initial) || isVariantLabel(props.animate) || isVariantLabel(props.whileHover) || isVariantLabel(props.whileDrag) || isVariantLabel(props.whileTap) || isVariantLabel(props.whileFocus) || isVariantLabel(props.exit); -} -function checkIfVariantNode(props) { - return Boolean(checkIfControllingVariants(props) || props.variants); -} -function getCurrentTreeVariants(props, context) { - if (checkIfControllingVariants(props)) { - var initial = props.initial, - animate = props.animate; - return { - initial: initial === false || isVariantLabel(initial) ? initial : undefined, - animate: isVariantLabel(animate) ? animate : undefined + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + function innerMode(mode, state) { + var info; + while (mode.innerMode) { + info = mode.innerMode(state); + if (!info || info.mode == mode) { + break; + } + state = info.state; + mode = info.mode; + } + return info || { + mode: mode, + state: state }; } - return props.inherit !== false ? context : {}; -} -function useCreateMotionContext(props) { - var _a = getCurrentTreeVariants(props, React.useContext(MotionContext)), - initial = _a.initial, - animate = _a.animate; - return React.useMemo(function () { - return { - initial: initial, - animate: animate - }; - }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]); -} -function variantLabelsAsDependency(prop) { - return Array.isArray(prop) ? prop.join(" ") : prop; -} - -/** - * Creates a constant value over the lifecycle of a component. - * - * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer - * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` - * you can ensure that initialisers don't execute twice or more. - */ -function useConstant(init) { - var ref = React.useRef(null); - if (ref.current === null) { - ref.current = init(); + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; } - return ref.current; -} -/** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ -var globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false -}; -var id$1 = 1; -function useProjectionId() { - return useConstant(function () { - if (globalProjectionState.hasEverUpdated) { - return id$1++; - } - }); -} -var LayoutGroupContext = React.createContext({}); + // STRING STREAM -/** - * Internal, exported only for usage in Framer - */ -var SwitchLayoutGroupContext = React.createContext({}); -function useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) { - var _b; - var layoutId = _a.layoutId, - layout = _a.layout, - drag = _a.drag, - dragConstraints = _a.dragConstraints, - layoutScroll = _a.layoutScroll; - var initialPromotionConfig = React.useContext(SwitchLayoutGroupContext); - if (!ProjectionNodeConstructor || !visualElement || (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) { - return; - } - visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection); - visualElement.projection.setOptions({ - layoutId: layoutId, - layout: layout, - alwaysMeasureLayout: Boolean(drag) || dragConstraints && isRefObject(dragConstraints), - visualElement: visualElement, - scheduleRender: function () { - return visualElement.scheduleRender(); - }, - /** - * TODO: Update options in an effect. This could be tricky as it'll be too late - * to update by the time layout animations run. - * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, - * ensuring it gets called if there's no potential layout animations. - * - */ - animationType: typeof layout === "string" ? layout : "both", - initialPromotionConfig: initialPromotionConfig, - layoutScroll: layoutScroll - }); -} -var VisualElementHandler = /** @class */function (_super) { - tslib.__extends(VisualElementHandler, _super); - function VisualElementHandler() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * Update visual element props as soon as we know this update is going to be commited. - */ - VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () { - this.updateProps(); - return null; + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = function (string, tabSize, lineOracle) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + this.lineOracle = lineOracle; }; - VisualElementHandler.prototype.componentDidUpdate = function () {}; - VisualElementHandler.prototype.updateProps = function () { - var _a = this.props, - visualElement = _a.visualElement, - props = _a.props; - if (visualElement) visualElement.setProps(props); + StringStream.prototype.eol = function () { + return this.pos >= this.string.length; }; - VisualElementHandler.prototype.render = function () { - return this.props.children; + StringStream.prototype.sol = function () { + return this.pos == this.lineStart; + }; + StringStream.prototype.peek = function () { + return this.string.charAt(this.pos) || undefined; + }; + StringStream.prototype.next = function () { + if (this.pos < this.string.length) { + return this.string.charAt(this.pos++); + } + }; + StringStream.prototype.eat = function (match) { + var ch = this.string.charAt(this.pos); + var ok; + if (typeof match == "string") { + ok = ch == match; + } else { + ok = ch && (match.test ? match.test(ch) : match(ch)); + } + if (ok) { + ++this.pos; + return ch; + } + }; + StringStream.prototype.eatWhile = function (match) { + var start = this.pos; + while (this.eat(match)) {} + return this.pos > start; + }; + StringStream.prototype.eatSpace = function () { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { + ++this.pos; + } + return this.pos > start; + }; + StringStream.prototype.skipToEnd = function () { + this.pos = this.string.length; + }; + StringStream.prototype.skipTo = function (ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) { + this.pos = found; + return true; + } + }; + StringStream.prototype.backUp = function (n) { + this.pos -= n; + }; + StringStream.prototype.column = function () { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }; + StringStream.prototype.indentation = function () { + return countColumn(this.string, null, this.tabSize) - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }; + StringStream.prototype.match = function (pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function (str) { + return caseInsensitive ? str.toLowerCase() : str; + }; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) { + this.pos += pattern.length; + } + return true; + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) { + return null; + } + if (match && consume !== false) { + this.pos += match[0].length; + } + return match; + } + }; + StringStream.prototype.current = function () { + return this.string.slice(this.start, this.pos); + }; + StringStream.prototype.hideFirstChars = function (n, inner) { + this.lineStart += n; + try { + return inner(); + } finally { + this.lineStart -= n; + } + }; + StringStream.prototype.lookAhead = function (n) { + var oracle = this.lineOracle; + return oracle && oracle.lookAhead(n); + }; + StringStream.prototype.baseToken = function () { + var oracle = this.lineOracle; + return oracle && oracle.baseToken(this.pos); }; - return VisualElementHandler; -}(React__default["default"].Component); -/** - * Create a `motion` component. - * - * This function accepts a Component argument, which can be either a string (ie "div" - * for `motion.div`), or an actual React component. - * - * Alongside this is a config option which provides a way of rendering the provided - * component "offline", or outside the React render cycle. - */ -function createMotionComponent(_a) { - var preloadedFeatures = _a.preloadedFeatures, - createVisualElement = _a.createVisualElement, - projectionNodeConstructor = _a.projectionNodeConstructor, - useRender = _a.useRender, - useVisualState = _a.useVisualState, - Component = _a.Component; - preloadedFeatures && loadFeatures(preloadedFeatures); - function MotionComponent(props, externalRef) { - var layoutId = useLayoutId(props); - props = tslib.__assign(tslib.__assign({}, props), { - layoutId: layoutId - }); - /** - * If we're rendering in a static environment, we only visually update the component - * as a result of a React-rerender rather than interactions or animations. This - * means we don't need to load additional memory structures like VisualElement, - * or any gesture/animation features. - */ - var config = React.useContext(MotionConfigContext); - var features = null; - var context = useCreateMotionContext(props); - /** - * Create a unique projection ID for this component. If a new component is added - * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing - * us to measure it as soon as any layout effect flushes pending layout animations. - * - * Performance note: It'd be better not to have to search the DOM for these elements. - * For newly-entering components it could be enough to only correct treeScale, in which - * case we could mount in a scale-correction mode. This wouldn't be enough for - * shared element transitions however. Perhaps for those we could revert to a root node - * that gets forceRendered and layout animations are triggered on its layout effect. - */ - var projectionId = config.isStatic ? undefined : useProjectionId(); - /** - * - */ - var visualState = useVisualState(props, config.isStatic); - if (!config.isStatic && isBrowser) { - /** - * Create a VisualElement for this component. A VisualElement provides a common - * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as - * providing a way of rendering to these APIs outside of the React render loop - * for more performant animations and interactions - */ - context.visualElement = useVisualElement(Component, visualState, tslib.__assign(tslib.__assign({}, config), props), createVisualElement); - useProjection(projectionId, props, context.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor); - /** - * Load Motion gesture and animation features. These are rendered as renderless - * components so each feature can optionally make use of React lifecycle methods. - */ - features = useFeatures(props, context.visualElement, preloadedFeatures); + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) { + throw new Error("There is no line " + (n + doc.first) + " in the document."); + } + var chunk = doc; + while (!chunk.lines) { + for (var i = 0;; ++i) { + var child = chunk.children[i], + sz = child.chunkSize(); + if (n < sz) { + chunk = child; + break; + } + n -= sz; + } } - /** - * The mount order and hierarchy is specific to ensure our element ref - * is hydrated by the time features fire their effects. - */ - return React__namespace.createElement(VisualElementHandler, { - visualElement: context.visualElement, - props: tslib.__assign(tslib.__assign({}, config), props) - }, features, React__namespace.createElement(MotionContext.Provider, { - value: context - }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))); + return chunk.lines[n]; } - return React.forwardRef(MotionComponent); -} -function useLayoutId(_a) { - var _b; - var layoutId = _a.layoutId; - var layoutGroupId = (_b = React.useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id; - return layoutGroupId && layoutId !== undefined ? layoutGroupId + "-" + layoutId : layoutId; -} -/** - * Convert any React component into a `motion` component. The provided component - * **must** use `React.forwardRef` to the underlying DOM component you want to animate. - * - * ```jsx - * const Component = React.forwardRef((props, ref) => { - * return
- * }) - * - * const MotionComponent = motion(Component) - * ``` - * - * @public - */ -function createMotionProxy(createConfig) { - function custom(Component, customMotionComponentConfig) { - if (customMotionComponentConfig === void 0) { - customMotionComponentConfig = {}; + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], + n = start.line; + doc.iter(start.line, end.line + 1, function (line) { + var text = line.text; + if (n == end.line) { + text = text.slice(0, end.ch); + } + if (n == start.line) { + text = text.slice(start.ch); + } + out.push(text); + ++n; + }); + return out; + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to) { + var out = []; + doc.iter(from, to, function (line) { + out.push(line.text); + }); // iter aborts when callback returns truthy value + return out; + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) { + for (var n = line; n; n = n.parent) { + n.height += diff; + } } - return createMotionComponent(createConfig(Component, customMotionComponentConfig)); } - if (typeof Proxy === "undefined") { - return custom; + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) { + return null; + } + var cur = line.parent, + no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) { + break; + } + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first; } - /** - * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. - * Rather than generating them anew every render. - */ - var componentCache = new Map(); - return new Proxy(custom, { - /** - * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. - * The prop name is passed through as `key` and we can use that to generate a `motion` - * DOM component with that name. - */ - get: function (_target, key) { - /** - * If this element doesn't exist in the component cache, create it and cache. - */ - if (!componentCache.has(key)) { - componentCache.set(key, custom(key)); + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { + var child = chunk.children[i$1], + ch = child.height; + if (h < ch) { + chunk = child; + continue outer; + } + h -= ch; + n += child.chunkSize(); } - return componentCache.get(key); + return n; + } while (!chunk.lines); + var i = 0; + for (; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], + lh = line.height; + if (h < lh) { + break; + } + h -= lh; } - }); -} + return n + i; + } + function isLine(doc, l) { + return l >= doc.first && l < doc.first + doc.size; + } + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } -/** - * We keep these listed seperately as we use the lowercase tag names as part - * of the runtime bundle to detect SVG components - */ -var lowercaseSVGElements = ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view"]; -function isSVGComponent(Component) { - if ( - /** - * If it's not a string, it's a custom React component. Currently we only support - * HTML custom React components. - */ - typeof Component !== "string" || - /** - * If it contains a dash, the element is a custom HTML webcomponent. - */ - Component.includes("-")) { - return false; - } else if ( - /** - * If it's in our list of lowercase SVG tags, it's an SVG component - */ - lowercaseSVGElements.indexOf(Component) > -1 || - /** - * If it contains a capital letter, it's an SVG component - */ - /[A-Z]/.test(Component)) { - return true; + // A Pos instance represents a position within the text. + function Pos(line, ch, sticky) { + if (sticky === void 0) sticky = null; + if (!(this instanceof Pos)) { + return new Pos(line, ch, sticky); + } + this.line = line; + this.ch = ch; + this.sticky = sticky; } - return false; -} -var scaleCorrectors = {}; -function addScaleCorrector(correctors) { - Object.assign(scaleCorrectors, correctors); -} -/** - * A list of all transformable axes. We'll use this list to generated a version - * of each axes for each transform. - */ -var transformAxes = ["", "X", "Y", "Z"]; -/** - * An ordered array of each transformable value. By default, transform values - * will be sorted to this order. - */ -var order = ["translate", "scale", "rotate", "skew"]; -/** - * Generate a list of every possible transform key. - */ -var transformProps = ["transformPerspective", "x", "y", "z"]; -order.forEach(function (operationKey) { - return transformAxes.forEach(function (axesKey) { - return transformProps.push(operationKey + axesKey); - }); -}); -/** - * A function to use with Array.sort to sort transform keys by their default order. - */ -function sortTransformProps(a, b) { - return transformProps.indexOf(a) - transformProps.indexOf(b); -} -/** - * A quick lookup for transform props. - */ -var transformPropSet = new Set(transformProps); -function isTransformProp(key) { - return transformPropSet.has(key); -} -/** - * A quick lookup for transform origin props - */ -var transformOriginProps = new Set(["originX", "originY", "originZ"]); -function isTransformOriginProp(key) { - return transformOriginProps.has(key); -} -function isForcedMotionValue(key, _a) { - var layout = _a.layout, - layoutId = _a.layoutId; - return isTransformProp(key) || isTransformOriginProp(key) || (layout || layoutId !== undefined) && (!!scaleCorrectors[key] || key === "opacity"); -} -var isMotionValue = function (value) { - return Boolean(value !== null && typeof value === "object" && value.getVelocity); -}; -var translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective" -}; -/** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ -function buildTransform(_a, _b, transformIsDefault, transformTemplate) { - var transform = _a.transform, - transformKeys = _a.transformKeys; - var _c = _b.enableHardwareAcceleration, - enableHardwareAcceleration = _c === void 0 ? true : _c, - _d = _b.allowTransformNone, - allowTransformNone = _d === void 0 ? true : _d; - // The transform string we're going to build into. - var transformString = ""; - // Transform keys into their default order - this will determine the output order. - transformKeys.sort(sortTransformProps); - // Track whether the defined transform has a defined z so we don't add a - // second to enable hardware acceleration - var transformHasZ = false; - // Loop over each transform and build them into transformString - var numTransformKeys = transformKeys.length; - for (var i = 0; i < numTransformKeys; i++) { - var key = transformKeys[i]; - transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") "); - if (key === "z") transformHasZ = true; + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + function cmp(a, b) { + return a.line - b.line || a.ch - b.ch; } - if (!transformHasZ && enableHardwareAcceleration) { - transformString += "translateZ(0)"; - } else { - transformString = transformString.trim(); + function equalCursorPos(a, b) { + return a.sticky == b.sticky && cmp(a, b) == 0; } - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } else if (allowTransformNone && transformIsDefault) { - transformString = "none"; + function copyPos(x) { + return Pos(x.line, x.ch); + } + function maxPos(a, b) { + return cmp(a, b) < 0 ? b : a; + } + function minPos(a, b) { + return cmp(a, b) < 0 ? a : b; } - return transformString; -} -/** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ -function buildTransformOrigin(_a) { - var _b = _a.originX, - originX = _b === void 0 ? "50%" : _b, - _c = _a.originY, - originY = _c === void 0 ? "50%" : _c, - _d = _a.originZ, - originZ = _d === void 0 ? 0 : _d; - return "".concat(originX, " ").concat(originY, " ").concat(originZ); -} -/** - * Returns true if the provided key is a CSS variable - */ -function isCSSVariable$1(key) { - return key.startsWith("--"); -} + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) { + return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1)); + } + function clipPos(doc, pos) { + if (pos.line < doc.first) { + return Pos(doc.first, 0); + } + var last = doc.first + doc.size - 1; + if (pos.line > last) { + return Pos(last, getLine(doc, last).text.length); + } + return clipToLen(pos, getLine(doc, pos.line).text.length); + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) { + return Pos(pos.line, linelen); + } else if (ch < 0) { + return Pos(pos.line, 0); + } else { + return pos; + } + } + function clipPosArray(doc, array) { + var out = []; + for (var i = 0; i < array.length; i++) { + out[i] = clipPos(doc, array[i]); + } + return out; + } + var SavedContext = function (state, lookAhead) { + this.state = state; + this.lookAhead = lookAhead; + }; + var Context = function (doc, state, line, lookAhead) { + this.state = state; + this.doc = doc; + this.line = line; + this.maxLookAhead = lookAhead || 0; + this.baseTokens = null; + this.baseTokenPos = 1; + }; + Context.prototype.lookAhead = function (n) { + var line = this.doc.getLine(this.line + n); + if (line != null && n > this.maxLookAhead) { + this.maxLookAhead = n; + } + return line; + }; + Context.prototype.baseToken = function (n) { + if (!this.baseTokens) { + return null; + } + while (this.baseTokens[this.baseTokenPos] <= n) { + this.baseTokenPos += 2; + } + var type = this.baseTokens[this.baseTokenPos + 1]; + return { + type: type && type.replace(/( |^)overlay .*/, ""), + size: this.baseTokens[this.baseTokenPos] - n + }; + }; + Context.prototype.nextLine = function () { + this.line++; + if (this.maxLookAhead > 0) { + this.maxLookAhead--; + } + }; + Context.fromSaved = function (doc, saved, line) { + if (saved instanceof SavedContext) { + return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead); + } else { + return new Context(doc, copyState(doc.mode, saved), line); + } + }; + Context.prototype.save = function (copy) { + var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state; + return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state; + }; -/** - * Provided a value and a ValueType, returns the value as that value type. - */ -var getValueAsType = function (value, type) { - return type && typeof value === "number" ? type.transform(value) : value; -}; -var int = tslib.__assign(tslib.__assign({}, styleValueTypes.number), { - transform: Math.round -}); -var numberValueTypes = { - // Border props - borderWidth: styleValueTypes.px, - borderTopWidth: styleValueTypes.px, - borderRightWidth: styleValueTypes.px, - borderBottomWidth: styleValueTypes.px, - borderLeftWidth: styleValueTypes.px, - borderRadius: styleValueTypes.px, - radius: styleValueTypes.px, - borderTopLeftRadius: styleValueTypes.px, - borderTopRightRadius: styleValueTypes.px, - borderBottomRightRadius: styleValueTypes.px, - borderBottomLeftRadius: styleValueTypes.px, - // Positioning props - width: styleValueTypes.px, - maxWidth: styleValueTypes.px, - height: styleValueTypes.px, - maxHeight: styleValueTypes.px, - size: styleValueTypes.px, - top: styleValueTypes.px, - right: styleValueTypes.px, - bottom: styleValueTypes.px, - left: styleValueTypes.px, - // Spacing props - padding: styleValueTypes.px, - paddingTop: styleValueTypes.px, - paddingRight: styleValueTypes.px, - paddingBottom: styleValueTypes.px, - paddingLeft: styleValueTypes.px, - margin: styleValueTypes.px, - marginTop: styleValueTypes.px, - marginRight: styleValueTypes.px, - marginBottom: styleValueTypes.px, - marginLeft: styleValueTypes.px, - // Transform props - rotate: styleValueTypes.degrees, - rotateX: styleValueTypes.degrees, - rotateY: styleValueTypes.degrees, - rotateZ: styleValueTypes.degrees, - scale: styleValueTypes.scale, - scaleX: styleValueTypes.scale, - scaleY: styleValueTypes.scale, - scaleZ: styleValueTypes.scale, - skew: styleValueTypes.degrees, - skewX: styleValueTypes.degrees, - skewY: styleValueTypes.degrees, - distance: styleValueTypes.px, - translateX: styleValueTypes.px, - translateY: styleValueTypes.px, - translateZ: styleValueTypes.px, - x: styleValueTypes.px, - y: styleValueTypes.px, - z: styleValueTypes.px, - perspective: styleValueTypes.px, - transformPerspective: styleValueTypes.px, - opacity: styleValueTypes.alpha, - originX: styleValueTypes.progressPercentage, - originY: styleValueTypes.progressPercentage, - originZ: styleValueTypes.px, - // Misc - zIndex: int, - // SVG - fillOpacity: styleValueTypes.alpha, - strokeOpacity: styleValueTypes.alpha, - numOctaves: int -}; -function buildHTMLStyles(state, latestValues, options, transformTemplate) { - var _a; - var style = state.style, - vars = state.vars, - transform = state.transform, - transformKeys = state.transformKeys, - transformOrigin = state.transformOrigin; - // Empty the transformKeys array. As we're throwing out refs to its items - // this might not be as cheap as suspected. Maybe using the array as a buffer - // with a manual incrementation would be better. - transformKeys.length = 0; - // Track whether we encounter any transform or transformOrigin values. - var hasTransform = false; - var hasTransformOrigin = false; - // Does the calculated transform essentially equal "none"? - var transformIsNone = true; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept seperately for further processing. - */ - for (var key in latestValues) { - var value = latestValues[key]; - /** - * If this is a CSS variable we don't do any further processing. - */ - if (isCSSVariable$1(key)) { - vars[key] = value; - continue; + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, context, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], + lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, context, function (end, style) { + return st.push(end, style); + }, lineClasses, forceToEnd); + var state = context.state; + + // Run overlays, adjust style array. + var loop = function (o) { + context.baseTokens = st; + var overlay = cm.state.overlays[o], + i = 1, + at = 0; + context.state = true; + runMode(cm, line.text, overlay.mode, context, function (end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) { + st.splice(i, 1, end, st[i + 1], i_end); + } + i += 2; + at = Math.min(end, i_end); + } + if (!style) { + return; + } + if (overlay.opaque) { + st.splice(start, i - start, end, "overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start + 1]; + st[start + 1] = (cur ? cur + " " : "") + "overlay " + style; + } + } + }, lineClasses); + context.state = state; + context.baseTokens = null; + context.baseTokenPos = 1; + }; + for (var o = 0; o < cm.state.overlays.length; ++o) loop(o); + return { + styles: st, + classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null + }; + } + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var context = getContextBefore(cm, lineNo(line)); + var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state); + var result = highlightLine(cm, line, context); + if (resetState) { + context.state = resetState; + } + line.stateAfter = context.save(!resetState); + line.styles = result.styles; + if (result.classes) { + line.styleClasses = result.classes; + } else if (line.styleClasses) { + line.styleClasses = null; + } + if (updateFrontier === cm.doc.highlightFrontier) { + cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); + } + } + return line.styles; + } + function getContextBefore(cm, n, precise) { + var doc = cm.doc, + display = cm.display; + if (!doc.mode.startState) { + return new Context(doc, true, n); + } + var start = findStartLine(cm, n, precise); + var saved = start > doc.first && getLine(doc, start - 1).stateAfter; + var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start); + doc.iter(start, n, function (line) { + processLine(cm, line.text, context); + var pos = context.line; + line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null; + context.nextLine(); + }); + if (precise) { + doc.modeFrontier = context.line; } - // Convert the value to its default value type, ie 0 -> "0px" - var valueType = numberValueTypes[key]; - var valueAsType = getValueAsType(value, valueType); - if (isTransformProp(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - transform[key] = valueAsType; - transformKeys.push(key); - // If we already know we have a non-default transform, early return - if (!transformIsNone) continue; - // Otherwise check to see if this is a default transform - if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) transformIsNone = false; - } else if (isTransformOriginProp(key)) { - transformOrigin[key] = valueAsType; - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - } else { - style[key] = valueAsType; + return context; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, context, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize, context); + stream.start = stream.pos = startAt || 0; + if (text == "") { + callBlankLine(mode, context.state); + } + while (!stream.eol()) { + readToken(mode, stream, context.state); + stream.start = stream.pos; } } - if (hasTransform) { - style.transform = buildTransform(state, options, transformIsNone, transformTemplate); - } else if (transformTemplate) { - style.transform = transformTemplate({}, ""); - } else if (!latestValues.transform && style.transform) { - style.transform = "none"; + function callBlankLine(mode, state) { + if (mode.blankLine) { + return mode.blankLine(state); + } + if (!mode.innerMode) { + return; + } + var inner = innerMode(mode, state); + if (inner.mode.blankLine) { + return inner.mode.blankLine(inner.state); + } } - if (hasTransformOrigin) { - style.transformOrigin = buildTransformOrigin(transformOrigin); + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) { + inner[0] = innerMode(mode, state).mode; + } + var style = mode.token(stream, state); + if (stream.pos > stream.start) { + return style; + } + } + throw new Error("Mode " + mode.name + " failed to advance stream."); } -} -var createHtmlRenderState = function () { - return { - style: {}, - transform: {}, - transformKeys: [], - transformOrigin: {}, - vars: {} + var Token = function (stream, type, state) { + this.start = stream.start; + this.end = stream.pos; + this.string = stream.current(); + this.type = type || null; + this.state = state; }; -}; -function copyRawValuesOnly(target, source, props) { - for (var key in source) { - if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) { - target[key] = source[key]; + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + var doc = cm.doc, + mode = doc.mode, + style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), + context = getContextBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize, context), + tokens; + if (asArray) { + tokens = []; + } + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, context.state); + if (asArray) { + tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); + } + } + return asArray ? tokens : new Token(stream, style, context.state); + } + function extractLineClasses(type, output) { + if (type) { + for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) { + break; + } + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) { + output[prop] = lineClass[2]; + } else if (!new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)").test(output[prop])) { + output[prop] += " " + lineClass[2]; + } + } } + return type; } -} -function useInitialMotionValues(_a, visualState, isStatic) { - var transformTemplate = _a.transformTemplate; - return React.useMemo(function () { - var state = createHtmlRenderState(); - buildHTMLStyles(state, visualState, { - enableHardwareAcceleration: !isStatic - }, transformTemplate); - var vars = state.vars, - style = state.style; - return tslib.__assign(tslib.__assign({}, vars), style); - }, [visualState]); -} -function useStyle(props, visualState, isStatic) { - var styleProp = props.style || {}; - var style = {}; - /** - * Copy non-Motion Values straight into style - */ - copyRawValuesOnly(style, styleProp, props); - Object.assign(style, useInitialMotionValues(props, visualState, isStatic)); - if (props.transformValues) { - style = props.transformValues(style); - } - return style; -} -function useHTMLProps(props, visualState, isStatic) { - // The `any` isn't ideal but it is the type of createElement props argument - var htmlProps = {}; - var style = useStyle(props, visualState, isStatic); - if (Boolean(props.drag) && props.dragListener !== false) { - // Disable the ghost element when a user drags - htmlProps.draggable = false; - // Disable text selection - style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = "none"; - // Disable scrolling on the draggable direction - style.touchAction = props.drag === true ? "none" : "pan-".concat(props.drag === "x" ? "y" : "x"); + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) { + flattenSpans = cm.options.flattenSpans; + } + var curStart = 0, + curStyle = null; + var stream = new StringStream(text, cm.options.tabSize, context), + style; + var inner = cm.options.addModeClass && [null]; + if (text == "") { + extractLineClasses(callBlankLine(mode, context.state), lineClasses); + } + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) { + processLine(cm, text, context, stream.pos); + } + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) { + style = "m-" + (style ? mName + " " + style : mName); + } + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 5000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 + // characters, and returns inaccurate measurements in nodes + // starting around 5000 chars. + var pos = Math.min(stream.pos, curStart + 5000); + f(pos, curStyle); + curStart = pos; + } } - htmlProps.style = style; - return htmlProps; -} -/** - * A list of all valid MotionProps. - * - * @privateRemarks - * This doesn't throw if a `MotionProp` name is missing - it should. - */ -var validMotionProps = new Set(["initial", "animate", "exit", "style", "variants", "transition", "transformTemplate", "transformValues", "custom", "inherit", "layout", "layoutId", "layoutDependency", "onLayoutAnimationStart", "onLayoutAnimationComplete", "onLayoutMeasure", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "drag", "dragControls", "dragListener", "dragConstraints", "dragDirectionLock", "dragSnapToOrigin", "_dragX", "_dragY", "dragElastic", "dragMomentum", "dragPropagation", "dragTransition", "whileDrag", "onPan", "onPanStart", "onPanEnd", "onPanSessionStart", "onTap", "onTapStart", "onTapCancel", "onHoverStart", "onHoverEnd", "whileFocus", "whileTap", "whileHover", "whileInView", "onViewportEnter", "onViewportLeave", "viewport", "layoutScroll"]); -/** - * Check whether a prop name is a valid `MotionProp` key. - * - * @param key - Name of the property to check - * @returns `true` is key is a valid `MotionProp`. - * - * @public - */ -function isValidMotionProp(key) { - return validMotionProps.has(key); -} -var shouldForward = function (key) { - return !isValidMotionProp(key); -}; -function loadExternalIsValidProp(isValidProp) { - if (!isValidProp) return; - // Explicitly filter our events - shouldForward = function (key) { - return key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key); - }; -} -/** - * Emotion and Styled Components both allow users to pass through arbitrary props to their components - * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which - * of these should be passed to the underlying DOM node. - * - * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props - * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props - * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of - * `@emotion/is-prop-valid`, however to fix this problem we need to use it. - * - * By making it an optionalDependency we can offer this functionality only in the situations where it's - * actually required. - */ -try { - /** - * We attempt to import this package but require won't be defined in esm environments, in that case - * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed - * in favour of explicit injection. - */ - loadExternalIsValidProp((__webpack_require__(/*! @emotion/is-prop-valid */ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js")["default"])); -} catch (_a) { - // We don't need to actually do anything here - the fallback is the existing `isPropValid`. -} -function filterProps(props, isDom, forwardMotionProps) { - var filteredProps = {}; - for (var key in props) { - if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key) || - // If trying to use native HTML drag events, forward drag listeners - props["draggable"] && key.startsWith("onDrag")) { - filteredProps[key] = props[key]; + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, + minline, + doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) { + return doc.first; + } + var line = getLine(doc, search - 1), + after = line.stateAfter; + if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) { + return search; + } + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } } + return minline; } - return filteredProps; -} -function calcOrigin$1(origin, offset, size) { - return typeof origin === "string" ? origin : styleValueTypes.px.transform(offset + size * origin); -} -/** - * The SVG transform origin defaults are different to CSS and is less intuitive, - * so we use the measured dimensions of the SVG to reconcile these. - */ -function calcSVGTransformOrigin(dimensions, originX, originY) { - var pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width); - var pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height); - return "".concat(pxOriginX, " ").concat(pxOriginY); -} -var dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray" -}; -var camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray" -}; -/** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - */ -function buildSVGPath(attrs, length, spacing, offset, useDashCase) { - if (spacing === void 0) { - spacing = 1; + function retreatFrontier(doc, n) { + doc.modeFrontier = Math.min(doc.modeFrontier, n); + if (doc.highlightFrontier < n - 10) { + return; + } + var start = doc.first; + for (var line = n - 1; line > start; line--) { + var saved = getLine(doc, line).stateAfter; + // change is on 3 + // state on line 1 looked ahead 2 -- so saw 3 + // test 1 + 2 < 3 should cover this + if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { + start = line + 1; + break; + } + } + doc.highlightFrontier = Math.min(doc.highlightFrontier, start); } - if (offset === void 0) { - offset = 0; + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, + sawCollapsedSpans = false; + function seeReadOnlySpans() { + sawReadOnlySpans = true; } - if (useDashCase === void 0) { - useDashCase = true; + function seeCollapsedSpans() { + sawCollapsedSpans = true; } - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - var keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset - attrs[keys.offset] = styleValueTypes.px.transform(-offset); - // Build the dash array - var pathLength = styleValueTypes.px.transform(length); - var pathSpacing = styleValueTypes.px.transform(spacing); - attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing); -} -/** - * Build SVG visual attrbutes, like cx and style.transform - */ -function buildSVGAttrs(state, _a, options, transformTemplate) { - var attrX = _a.attrX, - attrY = _a.attrY, - originX = _a.originX, - originY = _a.originY, - pathLength = _a.pathLength, - _b = _a.pathSpacing, - pathSpacing = _b === void 0 ? 1 : _b, - _c = _a.pathOffset, - pathOffset = _c === void 0 ? 0 : _c, - // This is object creation, which we try to avoid per-frame. - latest = tslib.__rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]); - buildHTMLStyles(state, latest, options, transformTemplate); - state.attrs = state.style; - state.style = {}; - var attrs = state.attrs, - style = state.style, - dimensions = state.dimensions; - /** - * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs - * and copy it into style. - */ - if (attrs.transform) { - if (dimensions) style.transform = attrs.transform; - delete attrs.transform; + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; + this.to = to; } - // Parse transformOrigin - if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) { - style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5); + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) { + return span; + } + } + } } - // Treat x/y not as shortcuts but as actual attributes - if (attrX !== undefined) attrs.x = attrX; - if (attrY !== undefined) attrs.y = attrY; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); + + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + var r; + for (var i = 0; i < spans.length; ++i) { + if (spans[i] != span) { + (r || (r = [])).push(spans[i]); + } + } + return r; } -} -var createSvgRenderState = function () { - return tslib.__assign(tslib.__assign({}, createHtmlRenderState()), { - attrs: {} - }); -}; -function useSVGProps(props, visualState) { - var visualProps = React.useMemo(function () { - var state = createSvgRenderState(); - buildSVGAttrs(state, visualState, { - enableHardwareAcceleration: false - }, props.transformTemplate); - return tslib.__assign(tslib.__assign({}, state.attrs), { - style: tslib.__assign({}, state.style) - }); - }, [visualState]); - if (props.style) { - var rawStyles = {}; - copyRawValuesOnly(rawStyles, props.style, props); - visualProps.style = tslib.__assign(tslib.__assign({}, rawStyles), visualProps.style); + + // Add a span to a line. + function addMarkedSpan(line, span, op) { + var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet())); + if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) { + line.markedSpans.push(span); + } else { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + if (inThisOp) { + inThisOp.add(line.markedSpans); + } + } + span.marker.attachLine(line); } - return visualProps; -} -function createUseRender(forwardMotionProps) { - if (forwardMotionProps === void 0) { - forwardMotionProps = false; + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + var nw; + if (old) { + for (var i = 0; i < old.length; ++i) { + var span = old[i], + marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } + } + return nw; } - var useRender = function (Component, props, projectionId, ref, _a, isStatic) { - var latestValues = _a.latestValues; - var useVisualProps = isSVGComponent(Component) ? useSVGProps : useHTMLProps; - var visualProps = useVisualProps(props, latestValues, isStatic); - var filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); - var elementProps = tslib.__assign(tslib.__assign(tslib.__assign({}, filteredProps), visualProps), { - ref: ref - }); - if (projectionId) { - elementProps["data-projection-id"] = projectionId; + function markedSpansAfter(old, endCh, isInsert) { + var nw; + if (old) { + for (var i = 0; i < old.length; ++i) { + var span = old[i], + marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, span.to == null ? null : span.to - endCh)); + } + } } - return React.createElement(Component, elementProps); - }; - return useRender; -} -var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g; -var REPLACE_TEMPLATE = "$1-$2"; -/** - * Convert camelCase to dash-case properties. - */ -var camelToDash = function (str) { - return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase(); -}; -function renderHTML(element, _a, styleProp, projection) { - var style = _a.style, - vars = _a.vars; - Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp)); - // Loop over any CSS variables and assign those. - for (var key in vars) { - element.style.setProperty(key, vars[key]); + return nw; } -} -/** - * A set of attribute names that are always read/written as camel case. - */ -var camelCaseAttributes = new Set(["baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength"]); -function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (var key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } -} -function scrapeMotionValuesFromProps$1(props) { - var style = props.style; - var newValues = {}; - for (var key in style) { - if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) { - newValues[key] = style[key]; + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) { + return null; + } + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) { + return null; + } + var startCh = change.from.ch, + endCh = change.to.ch, + isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, + offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) { + span.to = startCh; + } else if (sameLine) { + span.to = found.to == null ? null : found.to + offset; + } + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i$1 = 0; i$1 < last.length; ++i$1) { + var span$1 = last[i$1]; + if (span$1.to != null) { + span$1.to += offset; + } + if (span$1.from == null) { + var found$1 = getMarkedSpanFor(first, span$1.marker); + if (!found$1) { + span$1.from = offset; + if (sameLine) { + (first || (first = [])).push(span$1); + } + } + } else { + span$1.from += offset; + if (sameLine) { + (first || (first = [])).push(span$1); + } + } + } + } + // Make sure we didn't create any zero-length spans + if (first) { + first = clearEmptySpans(first); + } + if (last && last != first) { + last = clearEmptySpans(last); + } + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, + gapMarkers; + if (gap > 0 && first) { + for (var i$2 = 0; i$2 < first.length; ++i$2) { + if (first[i$2].to == null) { + (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); + } + } + } + for (var i$3 = 0; i$3 < gap; ++i$3) { + newMarkers.push(gapMarkers); + } + newMarkers.push(last); } + return newMarkers; } - return newValues; -} -function scrapeMotionValuesFromProps(props) { - var newValues = scrapeMotionValuesFromProps$1(props); - for (var key in props) { - if (isMotionValue(props[key])) { - var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key; - newValues[targetKey] = props[key]; + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) { + spans.splice(i--, 1); + } + } + if (!spans.length) { + return null; } + return spans; } - return newValues; -} -function isAnimationControls(v) { - return typeof v === "object" && typeof v.start === "function"; -} -var isKeyframesTarget = function (v) { - return Array.isArray(v); -}; -var isCustomValue = function (v) { - return Boolean(v && typeof v === "object" && v.mix && v.toValue); -}; -var resolveFinalValueInKeyframes = function (v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; -}; -/** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - * - * TODO: Remove and move to library - */ -function resolveMotionValue(value) { - var unwrappedValue = isMotionValue(value) ? value.get() : value; - return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue; -} -function makeState(_a, props, context, presenceContext) { - var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, - createRenderState = _a.createRenderState, - onMount = _a.onMount; - var state = { - latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), - renderState: createRenderState() - }; - if (onMount) { - state.mount = function (instance) { - return onMount(props, instance, state); - }; - } - return state; -} -var makeUseVisualState = function (config) { - return function (props, isStatic) { - var context = React.useContext(MotionContext); - var presenceContext = React.useContext(PresenceContext); - return isStatic ? makeState(config, props, context, presenceContext) : useConstant(function () { - return makeState(config, props, context, presenceContext); + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function (line) { + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) { + (markers || (markers = [])).push(mark); + } + } + } }); - }; -}; -function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { - var values = {}; - var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false; - var motionValues = scrapeMotionValues(props); - for (var key in motionValues) { - values[key] = resolveMotionValue(motionValues[key]); + if (!markers) { + return null; + } + var parts = [{ + from: from, + to: to + }]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], + m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { + continue; + } + var newParts = [j, 1], + dfrom = cmp(p.from, m.from), + dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) { + newParts.push({ + from: p.from, + to: m.from + }); + } + if (dto > 0 || !mk.inclusiveRight && !dto) { + newParts.push({ + from: m.to, + to: p.to + }); + } + parts.splice.apply(parts, newParts); + j += newParts.length - 3; + } + } + return parts; } - var initial = props.initial, - animate = props.animate; - var isControllingVariants = checkIfControllingVariants(props); - var isVariantNode = checkIfVariantNode(props); - if (context && isVariantNode && !isControllingVariants && props.inherit !== false) { - initial !== null && initial !== void 0 ? initial : initial = context.initial; - animate !== null && animate !== void 0 ? animate : animate = context.animate; + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) { + return; + } + for (var i = 0; i < spans.length; ++i) { + spans[i].marker.detachLine(line); + } + line.markedSpans = null; } - var initialAnimationIsBlocked = blockInitialAnimation || initial === false; - var variantToSet = initialAnimationIsBlocked ? animate : initial; - if (variantToSet && typeof variantToSet !== "boolean" && !isAnimationControls(variantToSet)) { - var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; - list.forEach(function (definition) { - var resolved = resolveVariantFromProps(props, definition); - if (!resolved) return; - var transitionEnd = resolved.transitionEnd; - resolved.transition; - var target = tslib.__rest(resolved, ["transitionEnd", "transition"]); - for (var key in target) { - var valueTarget = target[key]; - if (Array.isArray(valueTarget)) { - /** - * Take final keyframe if the initial animation is blocked because - * we want to initialise at the end of that blocked animation. - */ - var index = initialAnimationIsBlocked ? valueTarget.length - 1 : 0; - valueTarget = valueTarget[index]; + function attachMarkedSpans(line, spans) { + if (!spans) { + return; + } + for (var i = 0; i < spans.length; ++i) { + spans[i].marker.attachLine(line); + } + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { + return marker.inclusiveLeft ? -1 : 0; + } + function extraRight(marker) { + return marker.inclusiveRight ? 1 : 0; + } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) { + return lenDiff; + } + var aPos = a.find(), + bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) { + return -fromCmp; + } + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) { + return toCmp; + } + return b.id - a.id; + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, + found; + if (sps) { + for (var sp = void 0, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { + found = sp.marker; } - if (valueTarget !== null) { - values[key] = valueTarget; + } + } + return found; + } + function collapsedSpanAtStart(line) { + return collapsedSpanAtSide(line, true); + } + function collapsedSpanAtEnd(line) { + return collapsedSpanAtSide(line, false); + } + function collapsedSpanAround(line, ch) { + var sps = sawCollapsedSpans && line.markedSpans, + found; + if (sps) { + for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { + found = sp.marker; } } - for (var key in transitionEnd) values[key] = transitionEnd[key]; - }); + } + return found; } - return values; -} -var svgMotionConfig = { - useVisualState: makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, - createRenderState: createSvgRenderState, - onMount: function (props, instance, _a) { - var renderState = _a.renderState, - latestValues = _a.latestValues; - try { - renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect(); - } catch (e) { - // Most likely trying to measure an unrendered element under Firefox - renderState.dimensions = { - x: 0, - y: 0, - width: 0, - height: 0 - }; + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { + for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) { + continue; + } + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { + continue; + } + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) { + return true; + } } - buildSVGAttrs(renderState, latestValues, { - enableHardwareAcceleration: false - }, props.transformTemplate); - renderSVG(instance, renderState); } - }) -}; -var htmlMotionConfig = { - useVisualState: makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1, - createRenderState: createHtmlRenderState - }) -}; -function createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) { - var _b = _a.forwardMotionProps, - forwardMotionProps = _b === void 0 ? false : _b; - var baseConfig = isSVGComponent(Component) ? svgMotionConfig : htmlMotionConfig; - return tslib.__assign(tslib.__assign({}, baseConfig), { - preloadedFeatures: preloadedFeatures, - useRender: createUseRender(forwardMotionProps), - createVisualElement: createVisualElement, - projectionNodeConstructor: projectionNodeConstructor, - Component: Component - }); -} -exports.AnimationType = void 0; -(function (AnimationType) { - AnimationType["Animate"] = "animate"; - AnimationType["Hover"] = "whileHover"; - AnimationType["Tap"] = "whileTap"; - AnimationType["Drag"] = "whileDrag"; - AnimationType["Focus"] = "whileFocus"; - AnimationType["InView"] = "whileInView"; - AnimationType["Exit"] = "exit"; -})(exports.AnimationType || (exports.AnimationType = {})); -function addDomEvent(target, eventName, handler, options) { - if (options === void 0) { - options = { - passive: true - }; } - target.addEventListener(eventName, handler, options); - return function () { - return target.removeEventListener(eventName, handler); - }; -} -/** - * Attaches an event listener directly to the provided DOM element. - * - * Bypassing React's event system can be desirable, for instance when attaching non-passive - * event handlers. - * - * ```jsx - * const ref = useRef(null) - * - * useDomEvent(ref, 'wheel', onWheel, { passive: false }) - * - * return
- * ``` - * - * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. - * @param eventName - Name of the event you want listen for. - * @param handler - Function to fire when receiving the event. - * @param options - Options to pass to `Event.addEventListener`. - * - * @public - */ -function useDomEvent(ref, eventName, handler, options) { - React.useEffect(function () { - var element = ref.current; - if (handler && element) { - return addDomEvent(element, eventName, handler, options); + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) { + line = merged.find(-1, true).line; } - }, [ref, eventName, handler, options]); -} + return line; + } + function visualLineEnd(line) { + var merged; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + } + return line; + } -/** - * - * @param props - * @param ref - * @internal - */ -function useFocusGesture(_a) { - var whileFocus = _a.whileFocus, - visualElement = _a.visualElement; - var onFocus = function () { - var _a; - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, true); - }; - var onBlur = function () { - var _a; - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, false); - }; - useDomEvent(visualElement, "focus", whileFocus ? onFocus : undefined); - useDomEvent(visualElement, "blur", whileFocus ? onBlur : undefined); -} -function isMouseEvent(event) { - // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check. - if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) { - return !!(event.pointerType === "mouse"); + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + (lines || (lines = [])).push(line); + } + return lines; } - return event instanceof MouseEvent; -} -function isTouchEvent(event) { - var hasTouches = !!event.touches; - return hasTouches; -} -/** - * Filters out events not attached to the primary pointer (currently left mouse button) - * @param eventHandler - */ -function filterPrimaryPointer(eventHandler) { - return function (event) { - var isMouseEvent = event instanceof MouseEvent; - var isPrimaryPointer = !isMouseEvent || isMouseEvent && event.button === 0; - if (isPrimaryPointer) { - eventHandler(event); + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), + vis = visualLine(line); + if (line == vis) { + return lineN; } - }; -} -var defaultPagePoint = { - pageX: 0, - pageY: 0 -}; -function pointFromTouch(e, pointType) { - if (pointType === void 0) { - pointType = "page"; + return lineNo(vis); } - var primaryTouch = e.touches[0] || e.changedTouches[0]; - var point = primaryTouch || defaultPagePoint; - return { - x: point[pointType + "X"], - y: point[pointType + "Y"] - }; -} -function pointFromMouse(point, pointType) { - if (pointType === void 0) { - pointType = "page"; + + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) { + return lineN; + } + var line = getLine(doc, lineN), + merged; + if (!lineIsHidden(doc, line)) { + return lineN; + } + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + } + return lineNo(line) + 1; } - return { - x: point[pointType + "X"], - y: point[pointType + "Y"] - }; -} -function extractEventInfo(event, pointType) { - if (pointType === void 0) { - pointType = "page"; + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { + for (var sp = void 0, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) { + continue; + } + if (sp.from == null) { + return true; + } + if (sp.marker.widgetNode) { + continue; + } + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) { + return true; + } + } + } } - return { - point: isTouchEvent(event) ? pointFromTouch(event, pointType) : pointFromMouse(event, pointType) - }; -} -var wrapHandler = function (handler, shouldFilterPrimaryPointer) { - if (shouldFilterPrimaryPointer === void 0) { - shouldFilterPrimaryPointer = false; + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); + } + if (span.marker.inclusiveRight && span.to == line.text.length) { + return true; + } + for (var sp = void 0, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && (sp.to == null || sp.to != span.from) && (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && lineIsHiddenInner(doc, line, sp)) { + return true; + } + } } - var listener = function (event) { - return handler(event, extractEventInfo(event)); - }; - return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener; -}; -// We check for event support via functions in case they've been mocked by a testing suite. -var supportsPointerEvents = function () { - return isBrowser && window.onpointerdown === null; -}; -var supportsTouchEvents = function () { - return isBrowser && window.ontouchstart === null; -}; -var supportsMouseEvents = function () { - return isBrowser && window.onmousedown === null; -}; -var mouseEventNames = { - pointerdown: "mousedown", - pointermove: "mousemove", - pointerup: "mouseup", - pointercancel: "mousecancel", - pointerover: "mouseover", - pointerout: "mouseout", - pointerenter: "mouseenter", - pointerleave: "mouseleave" -}; -var touchEventNames = { - pointerdown: "touchstart", - pointermove: "touchmove", - pointerup: "touchend", - pointercancel: "touchcancel" -}; -function getPointerEventName(name) { - if (supportsPointerEvents()) { - return name; - } else if (supportsTouchEvents()) { - return touchEventNames[name]; - } else if (supportsMouseEvents()) { - return mouseEventNames[name]; + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + var h = 0, + chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) { + break; + } else { + h += line.height; + } + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i$1 = 0; i$1 < p.children.length; ++i$1) { + var cur = p.children[i$1]; + if (cur == chunk) { + break; + } else { + h += cur.height; + } + } + } + return h; } - return name; -} -function addPointerEvent(target, eventName, handler, options) { - return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === "pointerdown"), options); -} -function usePointerEvent(ref, eventName, handler, options) { - return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === "pointerdown"), options); -} -function createLock(name) { - var lock = null; - return function () { - var openLock = function () { - lock = null; - }; - if (lock === null) { - lock = name; - return openLock; + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) { + return 0; } - return false; + var len = line.text.length, + merged, + cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found$1 = merged.find(0, true); + len -= cur.text.length - found$1.from.ch; + cur = found$1.to.line; + len += cur.text.length - found$1.to.ch; + } + return len; + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, + doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function (line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = function (text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; }; -} -var globalHorizontalLock = createLock("dragHorizontal"); -var globalVerticalLock = createLock("dragVertical"); -function getGlobalLock(drag) { - var lock = false; - if (drag === "y") { - lock = globalVerticalLock(); - } else if (drag === "x") { - lock = globalHorizontalLock(); - } else { - var openHorizontal_1 = globalHorizontalLock(); - var openVertical_1 = globalVerticalLock(); - if (openHorizontal_1 && openVertical_1) { - lock = function () { - openHorizontal_1(); - openVertical_1(); - }; - } else { - // Release the locks because we don't use them - if (openHorizontal_1) openHorizontal_1(); - if (openVertical_1) openVertical_1(); + Line.prototype.lineNo = function () { + return lineNo(this); + }; + eventMixin(Line); + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) { + line.stateAfter = null; + } + if (line.styles) { + line.styles = null; + } + if (line.order != null) { + line.order = null; + } + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) { + updateLineHeight(line, estHeight); } } - return lock; -} -function isDragActive() { - // Check the gesture lock - if we get it, it means no drag gesture is active - // and we can safely fire the tap gesture. - var openGestureLock = getGlobalLock(true); - if (!openGestureLock) return true; - openGestureLock(); - return false; -} -function createHoverEvent(visualElement, isActive, callback) { - return function (event, info) { - var _a; - if (!isMouseEvent(event) || isDragActive()) return; - /** - * Ensure we trigger animations before firing event callback - */ - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Hover, isActive); - callback === null || callback === void 0 ? void 0 : callback(event, info); - }; -} -function useHoverGesture(_a) { - var onHoverStart = _a.onHoverStart, - onHoverEnd = _a.onHoverEnd, - whileHover = _a.whileHover, - visualElement = _a.visualElement; - usePointerEvent(visualElement, "pointerenter", onHoverStart || whileHover ? createHoverEvent(visualElement, true, onHoverStart) : undefined, { - passive: !onHoverStart - }); - usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined, { - passive: !onHoverEnd - }); -} -/** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ -var isNodeOrChild = function (parent, child) { - if (!child) { - return false; - } else if (parent === child) { - return true; - } else { - return isNodeOrChild(parent, child.parentElement); + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); } -}; -function useUnmountEffect(callback) { - return React.useEffect(function () { - return function () { - return callback(); + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, + styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) { + return null; + } + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || (cache[style] = style.replace(/\S+/g, "cm-$&")); + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = { + pre: eltP("pre", [content], "CodeMirror-line"), + content: content, + col: 0, + pos: 0, + cm: cm, + trailingSpace: false, + splitSpaces: cm.getOption("lineWrapping") }; - }, []); -} + lineView.measure = {}; -/** - * @param handlers - - * @internal - */ -function useTapGesture(_a) { - var onTap = _a.onTap, - onTapStart = _a.onTapStart, - onTapCancel = _a.onTapCancel, - whileTap = _a.whileTap, - visualElement = _a.visualElement; - var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap; - var isPressing = React.useRef(false); - var cancelPointerEndListeners = React.useRef(null); - /** - * Only set listener to passive if there are no external listeners. - */ - var eventOptions = { - passive: !(onTapStart || onTap || onTapCancel || onPointerDown) - }; - function removePointerEndListener() { - var _a; - (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners); - cancelPointerEndListeners.current = null; + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, + order = void 0; + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) { + builder.addToken = buildTokenBadBidi(builder.addToken, order); + } + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) { + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); + } + if (line.styleClasses.textClass) { + builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); + } + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) { + builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); + } + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); + (lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit) { + var last = builder.content.lastChild; + if (/\bcm-tab\b/.test(last.className) || last.querySelector && last.querySelector(".cm-tab")) { + builder.content.className = "cm-tab-wrap-hack"; + } + } + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) { + builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); + } + return builder; } - function checkPointerEnd() { - var _a; - removePointerEndListener(); - isPressing.current = false; - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, false); - return !isDragActive(); + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token; } - function onPointerUp(event, info) { - if (!checkPointerEnd()) return; - /** - * We only count this as a tap gesture if the event.target is the same - * as, or a child of, this component's element - */ - !isNodeOrChild(visualElement.getInstance(), event.target) ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info); + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { + if (!text) { + return; + } + var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text; + var special = builder.cm.state.specialChars, + mustWrap = false; + var content; + if (!special.test(text)) { + builder.col += text.length; + content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) { + mustWrap = true; + } + builder.pos += text.length; + } else { + content = document.createDocumentFragment(); + var pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) { + content.appendChild(elt("span", [txt])); + } else { + content.appendChild(txt); + } + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) { + break; + } + pos += skipped + 1; + var txt$1 = void 0; + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, + tabWidth = tabSize - builder.col % tabSize; + txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt$1.setAttribute("role", "presentation"); + txt$1.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else if (m[0] == "\r" || m[0] == "\n") { + txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")); + txt$1.setAttribute("cm-text", m[0]); + builder.col += 1; + } else { + txt$1 = builder.cm.options.specialCharPlaceholder(m[0]); + txt$1.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) { + content.appendChild(elt("span", [txt$1])); + } else { + content.appendChild(txt$1); + } + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt$1); + builder.pos++; + } + } + builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32; + if (style || startStyle || endStyle || mustWrap || css || attributes) { + var fullStyle = style || ""; + if (startStyle) { + fullStyle += startStyle; + } + if (endStyle) { + fullStyle += endStyle; + } + var token = elt("span", [content], fullStyle, css); + if (attributes) { + for (var attr in attributes) { + if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") { + token.setAttribute(attr, attributes[attr]); + } + } + } + return builder.content.appendChild(token); + } + builder.content.appendChild(content); } - function onPointerCancel(event, info) { - if (!checkPointerEnd()) return; - onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info); + + // Change some spaces to NBSP to prevent the browser from collapsing + // trailing spaces at the end of a line when rendering text (issue #1362). + function splitSpaces(text, trailingBefore) { + if (text.length > 1 && !/ /.test(text)) { + return text; + } + var spaceBefore = trailingBefore, + result = ""; + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i); + if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) { + ch = "\u00a0"; + } + result += ch; + spaceBefore = ch == " "; + } + return result; } - function onPointerDown(event, info) { - var _a; - removePointerEndListener(); - if (isPressing.current) return; - isPressing.current = true; - cancelPointerEndListeners.current = popmotion.pipe(addPointerEvent(window, "pointerup", onPointerUp, eventOptions), addPointerEvent(window, "pointercancel", onPointerCancel, eventOptions)); - /** - * Ensure we trigger animations before firing event callback - */ - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, true); - onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info); + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function (builder, text, style, startStyle, endStyle, css, attributes) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, + end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + var part = void 0; + for (var i = 0; i < order.length; i++) { + part = order[i]; + if (part.to > start && part.from <= start) { + break; + } + } + if (part.to >= end) { + return inner(builder, text, style, startStyle, endStyle, css, attributes); + } + inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + }; + } + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) { + builder.map.push(builder.pos, builder.pos + size, widget); + } + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) { + widget = builder.content.appendChild(document.createElement("span")); + } + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + builder.trailingSpace = false; } - usePointerEvent(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined, eventOptions); - useUnmountEffect(removePointerEndListener); -} -var warned = new Set(); -function warnOnce(condition, message, element) { - if (condition || warned.has(message)) return; - console.warn(message); - if (element) console.warn(element); - warned.add(message); -} -/** - * Map an IntersectionHandler callback to an element. We only ever make one handler for one - * element, so even though these handlers might all be triggered by different - * observers, we can keep them in the same map. - */ -var observerCallbacks = new WeakMap(); -/** - * Multiple observers can be created for multiple element/document roots. Each with - * different settings. So here we store dictionaries of observers to each root, - * using serialised settings (threshold/margin) as lookup keys. - */ -var observers = new WeakMap(); -var fireObserverCallback = function (entry) { - var _a; - (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry); -}; -var fireAllObserverCallbacks = function (entries) { - entries.forEach(fireObserverCallback); -}; -function initIntersectionObserver(_a) { - var root = _a.root, - options = tslib.__rest(_a, ["root"]); - var lookupRoot = root || document; - /** - * If we don't have an observer lookup map for this root, create one. - */ - if (!observers.has(lookupRoot)) { - observers.set(lookupRoot, {}); + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, + allText = line.text, + at = 0; + if (!spans) { + for (var i$1 = 1; i$1 < styles.length; i$1 += 2) { + builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1 + 1], builder.cm.options)); + } + return; + } + var len = allText.length, + pos = 0, + i = 1, + text = "", + style, + css; + var nextChange = 0, + spanStyle, + spanEndStyle, + spanStartStyle, + collapsed, + attributes; + for (;;) { + if (nextChange == pos) { + // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = css = ""; + attributes = null; + collapsed = null; + nextChange = Infinity; + var foundBookmarks = [], + endStyles = void 0; + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], + m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) { + spanStyle += " " + m.className; + } + if (m.css) { + css = (css ? css + ";" : "") + m.css; + } + if (m.startStyle && sp.from == pos) { + spanStartStyle += " " + m.startStyle; + } + if (m.endStyle && sp.to == nextChange) { + (endStyles || (endStyles = [])).push(m.endStyle, sp.to); + } + // support for the old title property + // https://github.com/codemirror/CodeMirror/pull/5673 + if (m.title) { + (attributes || (attributes = {})).title = m.title; + } + if (m.attributes) { + for (var attr in m.attributes) { + (attributes || (attributes = {}))[attr] = m.attributes[attr]; + } + } + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) { + collapsed = sp; + } + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (endStyles) { + for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) { + if (endStyles[j$1 + 1] == nextChange) { + spanEndStyle += " " + endStyles[j$1]; + } + } + } + if (!collapsed || collapsed.from == pos) { + for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) { + buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); + } + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, collapsed.marker, collapsed.from == null); + if (collapsed.to == null) { + return; + } + if (collapsed.to == pos) { + collapsed = false; + } + } + } + if (pos >= len) { + break; + } + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes); + } + if (end >= upto) { + text = text.slice(upto - pos); + pos = upto; + break; + } + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } } - var rootObservers = observers.get(lookupRoot); - var key = JSON.stringify(options); - /** - * If we don't have an observer for this combination of root and settings, - * create one. - */ - if (!rootObservers[key]) { - rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, tslib.__assign({ - root: root - }, options)); + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], + nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array; + } + var operationGroup = null; + function pushOperation(op) { + if (operationGroup) { + operationGroup.ops.push(op); + } else { + op.ownsGroup = operationGroup = { + ops: [op], + delayedCallbacks: [] + }; + } } - return rootObservers[key]; -} -function observeIntersection(element, options, callback) { - var rootInteresectionObserver = initIntersectionObserver(options); - observerCallbacks.set(element, callback); - rootInteresectionObserver.observe(element); - return function () { - observerCallbacks.delete(element); - rootInteresectionObserver.unobserve(element); - }; -} -function useViewport(_a) { - var visualElement = _a.visualElement, - whileInView = _a.whileInView, - onViewportEnter = _a.onViewportEnter, - onViewportLeave = _a.onViewportLeave, - _b = _a.viewport, - viewport = _b === void 0 ? {} : _b; - var state = React.useRef({ - hasEnteredView: false, - isInView: false - }); - var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave); - if (viewport.once && state.current.hasEnteredView) shouldObserve = false; - var useObserver = typeof IntersectionObserver === "undefined" ? useMissingIntersectionObserver : useIntersectionObserver; - useObserver(shouldObserve, state.current, visualElement, viewport); -} -var thresholdNames = { - some: 0, - all: 1 -}; -function useIntersectionObserver(shouldObserve, state, visualElement, _a) { - var root = _a.root, - rootMargin = _a.margin, - _b = _a.amount, - amount = _b === void 0 ? "some" : _b, - once = _a.once; - React.useEffect(function () { - if (!shouldObserve) return; - var options = { - root: root === null || root === void 0 ? void 0 : root.current, - rootMargin: rootMargin, - threshold: typeof amount === "number" ? amount : thresholdNames[amount] - }; - var intersectionCallback = function (entry) { - var _a; - var isIntersecting = entry.isIntersecting; - /** - * If there's been no change in the viewport state, early return. - */ - if (state.isInView === isIntersecting) return; - state.isInView = isIntersecting; - /** - * Handle hasEnteredView. If this is only meant to run once, and - * element isn't visible, early return. Otherwise set hasEnteredView to true. - */ - if (once && !isIntersecting && state.hasEnteredView) { - return; - } else if (isIntersecting) { - state.hasEnteredView = true; + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, + i = 0; + do { + for (; i < callbacks.length; i++) { + callbacks[i].call(null); + } + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) { + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) { + op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); + } + } } - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, isIntersecting); - /** - * Use the latest committed props rather than the ones in scope - * when this observer is created - */ - var props = visualElement.getProps(); - var callback = isIntersecting ? props.onViewportEnter : props.onViewportLeave; - callback === null || callback === void 0 ? void 0 : callback(entry); + } while (i < callbacks.length); + } + function finishOperation(op, endCb) { + var group = op.ownsGroup; + if (!group) { + return; + } + try { + fireCallbacksForOps(group); + } finally { + operationGroup = null; + endCb(group); + } + } + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = getHandlers(emitter, type); + if (!arr.length) { + return; + } + var args = Array.prototype.slice.call(arguments, 2), + list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + var loop = function (i) { + list.push(function () { + return arr[i].apply(null, args); + }); }; - return observeIntersection(visualElement.getInstance(), options, intersectionCallback); - }, [shouldObserve, root, rootMargin, amount]); -} -/** - * If IntersectionObserver is missing, we activate inView and fire onViewportEnter - * on mount. This way, the page will be in the state the author expects users - * to see it in for everyone. - */ -function useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) { - var _b = _a.fallback, - fallback = _b === void 0 ? true : _b; - React.useEffect(function () { - if (!shouldObserve || !fallback) return; - if (env !== "production") { - warnOnce(false, "IntersectionObserver not available on this device. whileInView animations will trigger on mount."); + for (var i = 0; i < arr.length; ++i) loop(i); + } + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) { + delayed[i](); } - /** - * Fire this in an rAF because, at this point, the animation state - * won't have flushed for the first time and there's certain logic in - * there that behaves differently on the initial animation. - * - * This hook should be quite rarely called so setting this in an rAF - * is preferred to changing the behaviour of the animation state. - */ - requestAnimationFrame(function () { - var _a; - state.hasEnteredView = true; - var onViewportEnter = visualElement.getProps().onViewportEnter; - onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null); - (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, true); - }); - }, [shouldObserve]); -} -var makeRenderlessComponent = function (hook) { - return function (props) { - hook(props); - return null; - }; -}; -var gestureAnimations = { - inView: makeRenderlessComponent(useViewport), - tap: makeRenderlessComponent(useTapGesture), - focus: makeRenderlessComponent(useFocusGesture), - hover: makeRenderlessComponent(useHoverGesture) -}; -var counter = 0; -var incrementId = function () { - return counter++; -}; -var useId = function () { - return useConstant(incrementId); -}; -/** - * Ideally we'd use the following code to support React 18 optionally. - * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all). - * Need to come up with a different way of figuring this out. - */ -// export const useId = (React as any).useId -// ? (React as any).useId -// : () => useConstant(incrementId) - -/** - * When a component is the child of `AnimatePresence`, it can use `usePresence` - * to access information about whether it's still present in the React tree. - * - * ```jsx - * import { usePresence } from "framer-motion" - * - * export const Component = () => { - * const [isPresent, safeToRemove] = usePresence() - * - * useEffect(() => { - * !isPresent && setTimeout(safeToRemove, 1000) - * }, [isPresent]) - * - * return
- * } - * ``` - * - * If `isPresent` is `false`, it means that a component has been removed the tree, but - * `AnimatePresence` won't really remove it until `safeToRemove` has been called. - * - * @public - */ -function usePresence() { - var context = React.useContext(PresenceContext); - if (context === null) return [true, null]; - var isPresent = context.isPresent, - onExitComplete = context.onExitComplete, - register = context.register; - // It's safe to call the following hooks conditionally (after an early return) because the context will always - // either be null or non-null for the lifespan of the component. - // Replace with useId when released in React - var id = useId(); - React.useEffect(function () { - return register(id); - }, []); - var safeToRemove = function () { - return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); - }; - return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; -} -/** - * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. - * There is no `safeToRemove` function. - * - * ```jsx - * import { useIsPresent } from "framer-motion" - * - * export const Component = () => { - * const isPresent = useIsPresent() - * - * useEffect(() => { - * !isPresent && console.log("I've been removed!") - * }, [isPresent]) - * - * return
- * } - * ``` - * - * @public - */ -function useIsPresent() { - return isPresent(React.useContext(PresenceContext)); -} -function isPresent(context) { - return context === null ? true : context.isPresent; -} -function shallowCompare(next, prev) { - if (!Array.isArray(prev)) return false; - var prevLength = prev.length; - if (prevLength !== next.length) return false; - for (var i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) return false; } - return true; -} -/** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ -var secondsToMilliseconds = function (seconds) { - return seconds * 1000; -}; -var easingLookup = { - linear: popmotion.linear, - easeIn: popmotion.easeIn, - easeInOut: popmotion.easeInOut, - easeOut: popmotion.easeOut, - circIn: popmotion.circIn, - circInOut: popmotion.circInOut, - circOut: popmotion.circOut, - backIn: popmotion.backIn, - backInOut: popmotion.backInOut, - backOut: popmotion.backOut, - anticipate: popmotion.anticipate, - bounceIn: popmotion.bounceIn, - bounceInOut: popmotion.bounceInOut, - bounceOut: popmotion.bounceOut -}; -var easingDefinitionToFunction = function (definition) { - if (Array.isArray(definition)) { - // If cubic bezier definition, create bezier curve - heyListen.invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values."); - var _a = tslib.__read(definition, 4), - x1 = _a[0], - y1 = _a[1], - x2 = _a[2], - y2 = _a[3]; - return popmotion.cubicBezier(x1, y1, x2, y2); - } else if (typeof definition === "string") { - // Else lookup from table - heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'")); - return easingLookup[definition]; + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") { + updateLineText(cm, lineView); + } else if (type == "gutter") { + updateLineGutter(cm, lineView, lineN, dims); + } else if (type == "class") { + updateLineClasses(cm, lineView); + } else if (type == "widget") { + updateLineWidgets(cm, lineView, dims); + } + } + lineView.changes = null; } - return definition; -}; -var isEasingArray = function (ease) { - return Array.isArray(ease) && typeof ease[0] !== "number"; -}; -/** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ -var isAnimatable = function (key, value) { - // If the list of keys tat might be non-animatable grows, replace with Set - if (key === "zIndex") return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) return true; - if (typeof value === "string" && - // It's animatable if we have a string - styleValueTypes.complex.test(value) && - // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) { + lineView.text.parentNode.replaceChild(lineView.node, lineView.text); + } + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) { + lineView.node.style.zIndex = 2; + } + } + return lineView.node; } - return false; -}; -var underDampedSpring = function () { - return { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10 - }; -}; -var criticallyDampedSpring = function (to) { - return { - type: "spring", - stiffness: 550, - damping: to === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10 - }; -}; -var linearTween = function () { - return { - type: "keyframes", - ease: "linear", - duration: 0.3 - }; -}; -var keyframes = function (values) { - return { - type: "keyframes", - duration: 0.8, - values: values - }; -}; -var defaultTransitions = { - x: underDampedSpring, - y: underDampedSpring, - z: underDampedSpring, - rotate: underDampedSpring, - rotateX: underDampedSpring, - rotateY: underDampedSpring, - rotateZ: underDampedSpring, - scaleX: criticallyDampedSpring, - scaleY: criticallyDampedSpring, - scale: criticallyDampedSpring, - opacity: linearTween, - backgroundColor: linearTween, - color: linearTween, - default: criticallyDampedSpring -}; -var getDefaultTransition = function (valueKey, to) { - var transitionFactory; - if (isKeyframesTarget(to)) { - transitionFactory = keyframes; - } else { - transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default; + function updateLineBackground(cm, lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) { + cls += " CodeMirror-linebackground"; + } + if (lineView.background) { + if (cls) { + lineView.background.className = cls; + } else { + lineView.background.parentNode.removeChild(lineView.background); + lineView.background = null; + } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + cm.display.input.setUneditable(lineView.background); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built; + } + return buildLineContent(cm, lineView); + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) { + lineView.node = built.pre; + } + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(cm, lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + function updateLineClasses(cm, lineView) { + updateLineBackground(cm, lineView); + if (lineView.line.wrapClass) { + ensureLineWrapped(lineView).className = lineView.line.wrapClass; + } else if (lineView.node != lineView.text) { + lineView.node.className = ""; + } + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground); + lineView.gutterBackground = null; + } + if (lineView.line.gutterClass) { + var wrap = ensureLineWrapped(lineView); + lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + dims.gutterTotalWidth + "px"); + cm.display.input.setUneditable(lineView.gutterBackground); + wrap.insertBefore(lineView.gutterBackground, lineView.text); + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap$1 = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"); + gutterWrap.setAttribute("aria-hidden", "true"); + cm.display.input.setUneditable(gutterWrap); + wrap$1.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) { + gutterWrap.className += " " + lineView.line.gutterClass; + } + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) { + lineView.lineNumber = gutterWrap.appendChild(elt("div", lineNumberFor(cm.options, lineN), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + cm.display.lineNumInnerWidth + "px")); + } + if (markers) { + for (var k = 0; k < cm.display.gutterSpecs.length; ++k) { + var id = cm.display.gutterSpecs[k].className, + found = markers.hasOwnProperty(id) && markers[id]; + if (found) { + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); + } + } + } + } + } + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) { + lineView.alignable = null; + } + var isWidget = classTest("CodeMirror-linewidget"); + for (var node = lineView.node.firstChild, next = void 0; node; node = next) { + next = node.nextSibling; + if (isWidget.test(node.className)) { + lineView.node.removeChild(node); + } + } + insertLineWidgets(cm, lineView, dims); } - return tslib.__assign({ - to: to - }, transitionFactory(to)); -}; -/** - * A map of default value types for common values - */ -var defaultValueTypes = tslib.__assign(tslib.__assign({}, numberValueTypes), { - // Color props - color: styleValueTypes.color, - backgroundColor: styleValueTypes.color, - outlineColor: styleValueTypes.color, - fill: styleValueTypes.color, - stroke: styleValueTypes.color, - // Border props - borderColor: styleValueTypes.color, - borderTopColor: styleValueTypes.color, - borderRightColor: styleValueTypes.color, - borderBottomColor: styleValueTypes.color, - borderLeftColor: styleValueTypes.color, - filter: styleValueTypes.filter, - WebkitFilter: styleValueTypes.filter -}); -/** - * Gets the default ValueType for the provided value key - */ -var getDefaultValueType = function (key) { - return defaultValueTypes[key]; -}; -function getAnimatableNone(key, value) { - var _a; - var defaultValueType = getDefaultValueType(key); - if (defaultValueType !== styleValueTypes.filter) defaultValueType = styleValueTypes.complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value); -} -var instantAnimationState = { - current: false -}; + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) { + lineView.bgClass = built.bgClass; + } + if (built.textClass) { + lineView.textClass = built.textClass; + } + updateLineClasses(cm, lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node; + } -/** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ -function isTransitionDefined(_a) { - _a.when; - _a.delay; - _a.delayChildren; - _a.staggerChildren; - _a.staggerDirection; - _a.repeat; - _a.repeatType; - _a.repeatDelay; - _a.from; - var transition = tslib.__rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]); - return !!Object.keys(transition).length; -} -var legacyRepeatWarning = false; -/** - * Convert Framer Motion's Transition type into Popmotion-compatible options. - */ -function convertTransitionToAnimationOptions(_a) { - var ease = _a.ease, - times = _a.times, - yoyo = _a.yoyo, - flip = _a.flip, - loop = _a.loop, - transition = tslib.__rest(_a, ["ease", "times", "yoyo", "flip", "loop"]); - var options = tslib.__assign({}, transition); - if (times) options["offset"] = times; - /** - * Convert any existing durations from seconds to milliseconds - */ - if (transition.duration) options["duration"] = secondsToMilliseconds(transition.duration); - if (transition.repeatDelay) options.repeatDelay = secondsToMilliseconds(transition.repeatDelay); - /** - * Map easing names to Popmotion's easing functions - */ - if (ease) { - options["ease"] = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease); + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) { + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); + } + } } - /** - * Support legacy transition API - */ - if (transition.type === "tween") options.type = "keyframes"; - /** - * TODO: These options are officially removed from the API. - */ - if (yoyo || loop || flip) { - heyListen.warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."); - legacyRepeatWarning = true; - if (yoyo) { - options.repeatType = "reverse"; - } else if (loop) { - options.repeatType = "loop"; - } else if (flip) { - options.repeatType = "mirror"; + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) { + return; + } + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], + node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : "")); + if (!widget.handleMouseEvents) { + node.setAttribute("cm-ignore-events", "true"); + } + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) { + wrap.insertBefore(node, lineView.gutter || lineView.text); + } else { + wrap.appendChild(node); + } + signalLater(widget, "redraw"); } - options.repeat = loop || yoyo || flip || transition.repeat; } - /** - * TODO: Popmotion 9 has the ability to automatically detect whether to use - * a keyframes or spring animation, but does so by detecting velocity and other spring options. - * It'd be good to introduce a similar thing here. - */ - if (transition.type !== "spring") options.type = "keyframes"; - return options; -} -/** - * Get the delay for a value by checking Transition with decreasing specificity. - */ -function getDelayFromTransition(transition, key) { - var _a, _b; - var valueTransition = getValueTransition(transition, key) || {}; - return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0; -} -function hydrateKeyframes(options) { - if (Array.isArray(options.to) && options.to[0] === null) { - options.to = tslib.__spreadArray([], tslib.__read(options.to), false); - options.to[0] = options.from; + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) { + node.style.marginLeft = -dims.gutterTotalWidth + "px"; + } + } } - return options; -} -function getPopmotionAnimationOptions(transition, options, key) { - var _a; - if (Array.isArray(options.to)) { - (_a = transition.duration) !== null && _a !== void 0 ? _a : transition.duration = 0.8; + function widgetHeight(widget) { + if (widget.height != null) { + return widget.height; + } + var cm = widget.doc.cm; + if (!cm) { + return 0; + } + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) { + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; + } + if (widget.noHScroll) { + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; + } + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.parentNode.offsetHeight; } - hydrateKeyframes(options); - /** - * Get a default transition if none is determined to be defined. - */ - if (!isTransitionDefined(transition)) { - transition = tslib.__assign(tslib.__assign({}, transition), getDefaultTransition(key, options.to)); + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true" || n.parentNode == display.sizer && n != display.mover) { + return true; + } + } } - return tslib.__assign(tslib.__assign({}, options), convertTransitionToAnimationOptions(transition)); -} -/** - * - */ -function getAnimation(key, value, target, transition, onComplete) { - var _a; - var valueTransition = getValueTransition(transition, key); - var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get(); - var isTargetAnimatable = isAnimatable(key, target); - if (origin === "none" && isTargetAnimatable && typeof target === "string") { - /** - * If we're trying to animate from "none", try and get an animatable version - * of the target. This could be improved to work both ways. - */ - origin = getAnimatableNone(key, target); - } else if (isZero(origin) && typeof target === "string") { - origin = getZeroUnit(target); - } else if (!Array.isArray(target) && isZero(target) && typeof origin === "string") { - target = getZeroUnit(origin); + + // POSITION MEASUREMENT + + function paddingTop(display) { + return display.lineSpace.offsetTop; } - var isOriginAnimatable = isAnimatable(key, origin); - heyListen.warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property.")); - function start() { - var options = { - from: origin, - to: target, - velocity: value.getVelocity(), - onComplete: onComplete, - onUpdate: function (v) { - return value.set(v); - } + function paddingVert(display) { + return display.mover.offsetHeight - display.lineSpace.offsetHeight; + } + function paddingH(display) { + if (display.cachedPaddingH) { + return display.cachedPaddingH; + } + var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = { + left: parseInt(style.paddingLeft), + right: parseInt(style.paddingRight) }; - return valueTransition.type === "inertia" || valueTransition.type === "decay" ? popmotion.inertia(tslib.__assign(tslib.__assign({}, options), valueTransition)) : popmotion.animate(tslib.__assign(tslib.__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { - onUpdate: function (v) { - var _a; - options.onUpdate(v); - (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v); - }, - onComplete: function () { - var _a; - options.onComplete(); - (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition); + if (!isNaN(data.left) && !isNaN(data.right)) { + display.cachedPaddingH = data; + } + return data; + } + function scrollGap(cm) { + return scrollerGap - cm.display.nativeBarWidth; + } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], + next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) { + heights.push((cur.bottom + next.top) / 2 - rect.top); + } + } } - })); + heights.push(rect.bottom - rect.top); + } } - function set() { - var _a, _b; - var finalTarget = resolveFinalValueInKeyframes(target); - value.set(finalTarget); - onComplete(); - (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget); - (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition); - return { - stop: function () {} - }; + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) { + return { + map: lineView.measure.map, + cache: lineView.measure.cache + }; + } + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) { + if (lineView.rest[i] == line) { + return { + map: lineView.measure.maps[i], + cache: lineView.measure.caches[i] + }; + } + } + for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) { + if (lineNo(lineView.rest[i$1]) > lineN) { + return { + map: lineView.measure.maps[i$1], + cache: lineView.measure.caches[i$1], + before: true + }; + } + } + } } - return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start; -} -function isZero(value) { - return value === 0 || typeof value === "string" && parseFloat(value) === 0 && value.indexOf(" ") === -1; -} -function getZeroUnit(potentialUnitType) { - return typeof potentialUnitType === "number" ? 0 : getAnimatableNone("", potentialUnitType); -} -function getValueTransition(transition, key) { - return transition[key] || transition["default"] || transition; -} -/** - * Start animation on a MotionValue. This function is an interface between - * Framer Motion and Popmotion - */ -function startAnimation(key, value, target, transition) { - if (transition === void 0) { - transition = {}; + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view; } - if (instantAnimationState.current) { - transition = { - type: false - }; + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); } - return value.start(function (onComplete) { - var delayTimer; - var controls; - var animation = getAnimation(key, value, target, transition, onComplete); - var delay = getDelayFromTransition(transition, key); - var start = function () { - return controls = animation(); + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) { + return cm.display.view[findViewIndex(cm, lineN)]; + } + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) { + return ext; + } + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) { + view = null; + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + cm.curOp.forceUpdate = true; + } + if (!view) { + view = updateExternalMeasurement(cm, line); + } + var info = mapFromLineView(view, line, lineN); + return { + line: line, + view: view, + rect: null, + map: info.map, + cache: info.cache, + before: info.before, + hasHeights: false }; - if (delay) { - delayTimer = window.setTimeout(start, secondsToMilliseconds(delay)); + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) { + ch = -1; + } + var key = ch + (bias || ""), + found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; } else { - start(); + if (!prepared.rect) { + prepared.rect = prepared.view.text.getBoundingClientRect(); + } + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) { + prepared.cache[key] = found; + } } - return function () { - clearTimeout(delayTimer); - controls === null || controls === void 0 ? void 0 : controls.stop(); + return { + left: found.left, + right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom }; - }); -} - -/** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ -var isNumericalString = function (v) { - return /^\-?\d*\.?\d+$/.test(v); -}; - -/** - * Check if the value is a zero value string like "0px" or "0%" - */ -var isZeroValueString = function (v) { - return /^0[^.\s]+$/.test(v); -}; -function addUniqueItem(arr, item) { - arr.indexOf(item) === -1 && arr.push(item); -} -function removeItem(arr, item) { - var index = arr.indexOf(item); - index > -1 && arr.splice(index, 1); -} -// Adapted from array-move -function moveItem(_a, fromIndex, toIndex) { - var _b = tslib.__read(_a), - arr = _b.slice(0); - var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - var _c = tslib.__read(arr.splice(fromIndex, 1), 1), - item = _c[0]; - arr.splice(endIndex, 0, item); - } - return arr; -} -var SubscriptionManager = /** @class */function () { - function SubscriptionManager() { - this.subscriptions = []; } - SubscriptionManager.prototype.add = function (handler) { - var _this = this; - addUniqueItem(this.subscriptions, handler); - return function () { - return removeItem(_this.subscriptions, handler); - }; + var nullRect = { + left: 0, + right: 0, + top: 0, + bottom: 0 }; - SubscriptionManager.prototype.notify = function (a, b, c) { - var numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse, mStart, mEnd; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + mStart = map[i]; + mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; + end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) { + collapse = "right"; + } + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) { + collapse = bias; + } + if (bias == "left" && start == 0) { + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } + } + if (bias == "right" && start == mEnd - mStart) { + while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } + } + break; + } + } + return { + node: node, + start: start, + end: end, + collapse: collapse, + coverStart: mStart, + coverEnd: mEnd + }; + } + function getUsefulRect(rects, bias) { + var rect = nullRect; + if (bias == "left") { + for (var i = 0; i < rects.length; i++) { + if ((rect = rects[i]).left != rect.right) { + break; + } + } } else { - for (var i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - var handler = this.subscriptions[i]; - handler && handler(a, b, c); + for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) { + if ((rect = rects[i$1]).left != rect.right) { + break; + } } } - }; - SubscriptionManager.prototype.getSize = function () { - return this.subscriptions.length; - }; - SubscriptionManager.prototype.clear = function () { - this.subscriptions.length = 0; - }; - return SubscriptionManager; -}(); -var isFloat = function (value) { - return !isNaN(parseFloat(value)); -}; -/** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ -var MotionValue = /** @class */function () { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - * - * @internal - */ - function MotionValue(init) { - var _this = this; - /** - * This will be replaced by the build step with the latest version number. - * When MotionValues are provided to motion components, warn if versions are mixed. - */ - this.version = "6.5.1"; - /** - * Duration, in milliseconds, since last updating frame. - * - * @internal - */ - this.timeDelta = 0; - /** - * Timestamp of the last time this `MotionValue` was updated. - * - * @internal - */ - this.lastUpdated = 0; - /** - * Functions to notify when the `MotionValue` updates. - * - * @internal - */ - this.updateSubscribers = new SubscriptionManager(); - /** - * Functions to notify when the velocity updates. - * - * @internal - */ - this.velocityUpdateSubscribers = new SubscriptionManager(); - /** - * Functions to notify when the `MotionValue` updates and `render` is set to `true`. - * - * @internal - */ - this.renderSubscribers = new SubscriptionManager(); - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = false; - this.updateAndNotify = function (v, render) { - if (render === void 0) { - render = true; + return rect; + } + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, + start = place.start, + end = place.end, + collapse = place.collapse; + var rect; + if (node.nodeType == 3) { + // If it is a text node, use a range to retrieve the coordinates. + for (var i$1 = 0; i$1 < 4; i$1++) { + // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { + --start; + } + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { + ++end; + } + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { + rect = node.parentNode.getBoundingClientRect(); + } else { + rect = getUsefulRect(range(node, start, end).getClientRects(), bias); + } + if (rect.left || rect.right || start == 0) { + break; + } + end = start; + start = start - 1; + collapse = "right"; } - _this.prev = _this.current; - _this.current = v; - // Update timestamp - var _a = sync.getFrameData(), - delta = _a.delta, - timestamp = _a.timestamp; - if (_this.lastUpdated !== timestamp) { - _this.timeDelta = delta; - _this.lastUpdated = timestamp; - sync__default["default"].postRender(_this.scheduleVelocityCheck); + if (ie && ie_version < 11) { + rect = maybeUpdateRectForZooming(cm.display.measure, rect); } - // Update update subscribers - if (_this.prev !== _this.current) { - _this.updateSubscribers.notify(_this.current); + } else { + // If it is a widget, simply get the box for the whole widget. + if (start > 0) { + collapse = bias = "right"; } - // Update velocity subscribers - if (_this.velocityUpdateSubscribers.getSize()) { - _this.velocityUpdateSubscribers.notify(_this.getVelocity()); + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) { + rect = rects[bias == "right" ? rects.length - 1 : 0]; + } else { + rect = node.getBoundingClientRect(); } - // Update render subscribers - if (render) { - _this.renderSubscribers.notify(_this.current); + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) { + rect = { + left: rSpan.left, + right: rSpan.left + charWidth(cm.display), + top: rSpan.top, + bottom: rSpan.bottom + }; + } else { + rect = nullRect; + } + } + var rtop = rect.top - prepared.rect.top, + rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + var i = 0; + for (; i < heights.length - 1; i++) { + if (mid < heights[i]) { + break; } + } + var top = i ? heights[i - 1] : 0, + bot = heights[i]; + var result = { + left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, + bottom: bot }; - /** - * Schedule a velocity check for the next frame. - * - * This is an instanced and bound function to prevent generating a new - * function once per frame. - * - * @internal - */ - this.scheduleVelocityCheck = function () { - return sync__default["default"].postRender(_this.velocityCheck); + if (!rect.left && !rect.right) { + result.bogus = true; + } + if (!cm.options.singleCursorHeightPerLine) { + result.rtop = rtop; + result.rbottom = rbot; + } + return result; + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) { + return rect; + } + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return { + left: rect.left * scaleX, + right: rect.right * scaleX, + top: rect.top * scaleY, + bottom: rect.bottom * scaleY }; - /** - * Updates `prev` with `current` if the value hasn't been updated this frame. - * This ensures velocity calculations return `0`. - * - * This is an instanced and bound function to prevent generating a new - * function once per frame. - * - * @internal - */ - this.velocityCheck = function (_a) { - var timestamp = _a.timestamp; - if (timestamp !== _this.lastUpdated) { - _this.prev = _this.current; - _this.velocityUpdateSubscribers.notify(_this.getVelocity()); + } + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) { + lineView.measure.caches[i] = {}; + } + } + } + } + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) { + clearLineMeasurementCacheFor(cm.display.view[i]); + } + } + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) { + cm.display.maxLineChanged = true; + } + cm.display.lineNumChars = null; + } + function pageScrollX() { + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 + // which causes page_Offset and bounding client rects to use + // different reference viewports and invalidate our calculations. + if (chrome && android) { + return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)); + } + return window.pageXOffset || (document.documentElement || document.body).scrollLeft; + } + function pageScrollY() { + if (chrome && android) { + return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)); + } + return window.pageYOffset || (document.documentElement || document.body).scrollTop; + } + function widgetTopHeight(lineObj) { + var ref = visualLine(lineObj); + var widgets = ref.widgets; + var height = 0; + if (widgets) { + for (var i = 0; i < widgets.length; ++i) { + if (widgets[i].above) { + height += widgetHeight(widgets[i]); + } } + } + return height; + } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"./null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { + if (!includeWidgets) { + var height = widgetTopHeight(lineObj); + rect.top += height; + rect.bottom += height; + } + if (context == "line") { + return rect; + } + if (!context) { + context = "local"; + } + var yOff = heightAtLine(lineObj); + if (context == "local") { + yOff += paddingTop(cm.display); + } else { + yOff -= cm.display.viewOffset; + } + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; + rect.right += xOff; + } + rect.top += yOff; + rect.bottom += yOff; + return rect; + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"./null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") { + return coords; + } + var left = coords.left, + top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return { + left: left - lineSpaceBox.left, + top: top - lineSpaceBox.top }; - this.hasAnimated = false; - this.prev = this.current = init; - this.canTrackVelocity = isFloat(this.current); } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.onChange(updateOpacity) - * const unsubscribeY = y.onChange(updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @privateRemarks - * - * We could look into a `useOnChange` hook if the above lifecycle management proves confusing. - * - * ```jsx - * useOnChange(x, () => {}) - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @public - */ - MotionValue.prototype.onChange = function (subscription) { - return this.updateSubscribers.add(subscription); - }; - MotionValue.prototype.clearListeners = function () { - this.updateSubscribers.clear(); - }; - /** - * Adds a function that will be notified when the `MotionValue` requests a render. - * - * @param subscriber - A function that's provided the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @internal - */ - MotionValue.prototype.onRenderRequest = function (subscription) { - // Render immediately - subscription(this.get()); - return this.renderSubscribers.add(subscription); - }; - /** - * Attaches a passive effect to the `MotionValue`. - * - * @internal - */ - MotionValue.prototype.attach = function (passiveEffect) { - this.passiveEffect = passiveEffect; - }; - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - MotionValue.prototype.set = function (v, render) { - if (render === void 0) { - render = true; + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) { + lineObj = getLine(cm.doc, pos.line); + } + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + // A cursor Pos(line, char, "before") is on the same visual line as `char - 1` + // and after `char - 1` in writing order of `char - 1` + // A cursor Pos(line, char, "after") is on the same visual line as `char` + // and before `char` in writing order of `char` + // Examples (upper-case letters are RTL, lower-case are LTR): + // Pos(0, 1, ...) + // before after + // ab a|b a|b + // aB a|B aB| + // Ab |Ab A|b + // AB B|A B|A + // Every position after the last character on a line is considered to stick + // to the last character on the line. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) { + preparedMeasure = prepareMeasureForLine(cm, lineObj); + } + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) { + m.left = m.right; + } else { + m.right = m.left; + } + return intoCoordSystem(cm, lineObj, m, context); + } + var order = getOrder(lineObj, cm.doc.direction), + ch = pos.ch, + sticky = pos.sticky; + if (ch >= lineObj.text.length) { + ch = lineObj.text.length; + sticky = "before"; + } else if (ch <= 0) { + ch = 0; + sticky = "after"; + } + if (!order) { + return get(sticky == "before" ? ch - 1 : ch, sticky == "before"); + } + function getBidi(ch, partPos, invert) { + var part = order[partPos], + right = part.level == 1; + return get(invert ? ch - 1 : ch, right != invert); + } + var partPos = getBidiPartAt(order, ch, sticky); + var other = bidiOther; + var val = getBidi(ch, partPos, sticky == "before"); + if (other != null) { + val.other = getBidi(ch, other, sticky != "before"); + } + return val; + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0; + pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) { + left = charWidth(cm.display) * pos.ch; + } + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return { + left: left, + right: left, + top: top, + bottom: top + lineObj.height + }; + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, sticky, outside, xRel) { + var pos = Pos(line, ch, sticky); + pos.xRel = xRel; + if (outside) { + pos.outside = outside; } - if (!render || !this.passiveEffect) { - this.updateAndNotify(v, render); + return pos; + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) { + return PosWithInfo(doc.first, 0, null, -1, -1); + } + var lineN = lineAtHeight(doc, y), + last = doc.first + doc.size - 1; + if (lineN > last) { + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1); + } + if (x < 0) { + x = 0; + } + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0)); + if (!collapsed) { + return found; + } + var rangeEnd = collapsed.find(1); + if (rangeEnd.line == lineN) { + return rangeEnd; + } + lineObj = getLine(doc, lineN = rangeEnd.line); + } + } + function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { + y -= widgetTopHeight(lineObj); + var end = lineObj.text.length; + var begin = findFirst(function (ch) { + return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; + }, end, 0); + end = findFirst(function (ch) { + return measureCharPrepared(cm, preparedMeasure, ch).top > y; + }, begin, end); + return { + begin: begin, + end: end + }; + } + function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { + if (!preparedMeasure) { + preparedMeasure = prepareMeasureForLine(cm, lineObj); + } + var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top; + return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop); + } + + // Returns true if the given side of a box is after the given + // coordinates, in top-to-bottom, left-to-right order. + function boxIsAfter(box, x, y, left) { + return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x; + } + function coordsCharInner(cm, lineObj, lineNo, x, y) { + // Move y into line-local coordinate space + y -= heightAtLine(lineObj); + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + // When directly calling `measureCharPrepared`, we have to adjust + // for the widgets at this line. + var widgetHeight = widgetTopHeight(lineObj); + var begin = 0, + end = lineObj.text.length, + ltr = true; + var order = getOrder(lineObj, cm.doc.direction); + // If the line isn't plain left-to-right text, first figure out + // which bidi section the coordinates fall into. + if (order) { + var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)(cm, lineObj, lineNo, preparedMeasure, order, x, y); + ltr = part.level != 1; + // The awkward -1 offsets are needed because findFirst (called + // on these below) will treat its first bound as inclusive, + // second as exclusive, but we want to actually address the + // characters in the part's range + begin = ltr ? part.from : part.to - 1; + end = ltr ? part.to : part.from - 1; + } + + // A binary search to find the first character whose bounding box + // starts after the coordinates. If we run across any whose box wrap + // the coordinates, store that. + var chAround = null, + boxAround = null; + var ch = findFirst(function (ch) { + var box = measureCharPrepared(cm, preparedMeasure, ch); + box.top += widgetHeight; + box.bottom += widgetHeight; + if (!boxIsAfter(box, x, y, false)) { + return false; + } + if (box.top <= y && box.left <= x) { + chAround = ch; + boxAround = box; + } + return true; + }, begin, end); + var baseX, + sticky, + outside = false; + // If a box around the coordinates was found, use that + if (boxAround) { + // Distinguish coordinates nearer to the left or right side of the box + var atLeft = x - boxAround.left < boxAround.right - x, + atStart = atLeft == ltr; + ch = chAround + (atStart ? 0 : 1); + sticky = atStart ? "after" : "before"; + baseX = atLeft ? boxAround.left : boxAround.right; } else { - this.passiveEffect(v, this.updateAndNotify); + // (Adjust for extended bound, if necessary.) + if (!ltr && (ch == end || ch == begin)) { + ch++; + } + // To determine which side to associate with, get the box to the + // left of the character and compare it's vertical position to the + // coordinates + sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y == ltr ? "after" : "before"; + // Now get accurate coordinates for this place, in order to get a + // base X position + var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure); + baseX = coords.left; + outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0; + } + ch = skipExtendingChars(lineObj.text, ch, 1); + return PosWithInfo(lineNo, ch, sticky, outside, x - baseX); + } + function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) { + // Bidi parts are sorted left-to-right, and in a non-line-wrapping + // situation, we can take this ordering to correspond to the visual + // ordering. This finds the first part whose end is after the given + // coordinates. + var index = findFirst(function (i) { + var part = order[i], + ltr = part.level != 1; + return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), "line", lineObj, preparedMeasure), x, y, true); + }, 0, order.length - 1); + var part = order[index]; + // If this isn't the first part, the part's start is also after + // the coordinates, and the coordinates aren't on the same line as + // that start, move one part back. + if (index > 0) { + var ltr = part.level != 1; + var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), "line", lineObj, preparedMeasure); + if (boxIsAfter(start, x, y, true) && start.top > y) { + part = order[index - 1]; + } + } + return part; + } + function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { + // In a wrapped line, rtl text on wrapping boundaries can do things + // that don't correspond to the ordering in our `order` array at + // all, so a binary search doesn't work, and we want to return a + // part that only spans one line so that the binary search in + // coordsCharInner is safe. As such, we first find the extent of the + // wrapped line, and then do a flat search in which we discard any + // spans that aren't on the line. + var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y); + var begin = ref.begin; + var end = ref.end; + if (/\s/.test(lineObj.text.charAt(end - 1))) { + end--; + } + var part = null, + closestDist = null; + for (var i = 0; i < order.length; i++) { + var p = order[i]; + if (p.from >= end || p.to <= begin) { + continue; + } + var ltr = p.level != 1; + var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right; + // Weigh against spans ending before this, so that they are only + // picked if nothing ends after + var dist = endX < x ? x - endX + 1e9 : endX - x; + if (!part || closestDist > dist) { + part = p; + closestDist = dist; + } + } + if (!part) { + part = order[order.length - 1]; + } + // Clip the part to the wrapped line. + if (part.from < begin) { + part = { + from: begin, + to: part.to, + level: part.level + }; } - }; - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - MotionValue.prototype.get = function () { - return this.current; - }; - /** - * @public - */ - MotionValue.prototype.getPrevious = function () { - return this.prev; - }; - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - MotionValue.prototype.getVelocity = function () { - // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful - return this.canTrackVelocity ? - // These casts could be avoided if parseFloat would be typed better - popmotion.velocityPerSecond(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0; - }; - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - * - * @internal - */ - MotionValue.prototype.start = function (animation) { - var _this = this; - this.stop(); - return new Promise(function (resolve) { - _this.hasAnimated = true; - _this.stopAnimation = animation(resolve); - }).then(function () { - return _this.clearAnimation(); - }); - }; - /** - * Stop the currently active animation. - * - * @public - */ - MotionValue.prototype.stop = function () { - if (this.stopAnimation) this.stopAnimation(); - this.clearAnimation(); - }; - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - MotionValue.prototype.isAnimating = function () { - return !!this.stopAnimation; - }; - MotionValue.prototype.clearAnimation = function () { - this.stopAnimation = null; - }; - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - MotionValue.prototype.destroy = function () { - this.updateSubscribers.clear(); - this.renderSubscribers.clear(); - this.stop(); - }; - return MotionValue; -}(); -function motionValue(init) { - return new MotionValue(init); -} + if (part.to > end) { + part = { + from: part.from, + to: end, + level: part.level + }; + } + return part; + } + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) { + return display.cachedTextHeight; + } + if (measureText == null) { + measureText = elt("pre", null, "CodeMirror-line-like"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) { + display.cachedTextHeight = height; + } + removeChildren(display.measure); + return height || 1; + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) { + return display.cachedCharWidth; + } + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor], "CodeMirror-line-like"); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), + width = (rect.right - rect.left) / 10; + if (width > 2) { + display.cachedCharWidth = width; + } + return width || 10; + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, + left = {}, + width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + var id = cm.display.gutterSpecs[i].className; + left[id] = n.offsetLeft + n.clientLeft + gutterLeft; + width[id] = n.clientWidth; + } + return { + fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth + }; + } -/** - * Tests a provided value against a ValueType - */ -var testValueType = function (v) { - return function (type) { - return type.test(v); - }; -}; + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; + } -/** - * ValueType for "auto" - */ -var auto = { - test: function (v) { - return v === "auto"; - }, - parse: function (v) { - return v; + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), + wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function (line) { + if (lineIsHidden(cm.doc, line)) { + return 0; + } + var widgetsHeight = 0; + if (line.widgets) { + for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) { + widgetsHeight += line.widgets[i].height; + } + } + } + if (wrapping) { + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; + } else { + return widgetsHeight + th; + } + }; + } + function estimateLineHeights(cm) { + var doc = cm.doc, + est = estimateHeight(cm); + doc.iter(function (line) { + var estHeight = est(line); + if (estHeight != line.height) { + updateLineHeight(line, estHeight); + } + }); } -}; -/** - * A list of value types commonly used for dimensions - */ -var dimensionValueTypes = [styleValueTypes.number, styleValueTypes.px, styleValueTypes.percent, styleValueTypes.degrees, styleValueTypes.vw, styleValueTypes.vh, auto]; -/** - * Tests a dimensional value against the list of dimension ValueTypes - */ -var findDimensionValueType = function (v) { - return dimensionValueTypes.find(testValueType(v)); -}; + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { + return null; + } + var x, + y, + space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { + x = e.clientX - space.left; + y = e.clientY - space.top; + } catch (e$1) { + return null; + } + var coords = coordsChar(cm, x, y), + line; + if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords; + } -/** - * A list of all ValueTypes - */ -var valueTypes = tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(dimensionValueTypes), false), [styleValueTypes.color, styleValueTypes.complex], false); -/** - * Tests a value against the list of ValueTypes - */ -var findValueType = function (v) { - return valueTypes.find(testValueType(v)); -}; + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) { + return null; + } + n -= cm.display.viewFrom; + if (n < 0) { + return null; + } + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) { + return i; + } + } + } -/** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ -function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } else { - visualElement.addValue(key, motionValue(value)); + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) { + from = cm.doc.first; + } + if (to == null) { + to = cm.doc.first + cm.doc.size; + } + if (!lendiff) { + lendiff = 0; + } + var display = cm.display; + if (lendiff && to < display.viewTo && (display.updateLineNumbers == null || display.updateLineNumbers > from)) { + display.updateLineNumbers = from; + } + cm.curOp.viewChanged = true; + if (from >= display.viewTo) { + // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) { + resetView(cm); + } + } else if (to <= display.viewFrom) { + // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { + // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { + // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { + // Bottom overlap + var cut$1 = viewCuttingPoint(cm, from, from, -1); + if (cut$1) { + display.view = display.view.slice(0, cut$1.index); + display.viewTo = cut$1.lineN; + } else { + resetView(cm); + } + } else { + // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index).concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)).concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) { + ext.lineN += lendiff; + } else if (from < ext.lineN + ext.size) { + display.externalMeasured = null; + } + } } -} -function setTarget(visualElement, definition) { - var resolved = resolveVariant(visualElement, definition); - var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, - _b = _a.transitionEnd, - transitionEnd = _b === void 0 ? {} : _b; - _a.transition; - var target = tslib.__rest(_a, ["transitionEnd", "transition"]); - target = tslib.__assign(tslib.__assign({}, target), transitionEnd); - for (var key in target) { - var value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, + ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) { + display.externalMeasured = null; + } + if (line < display.viewFrom || line >= display.viewTo) { + return; + } + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) { + return; + } + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) { + arr.push(type); + } } -} -function setVariants(visualElement, variantLabels) { - var reversedLabels = tslib.__spreadArray([], tslib.__read(variantLabels), false).reverse(); - reversedLabels.forEach(function (key) { - var _a; - var variant = visualElement.getVariant(key); - variant && setTarget(visualElement, variant); - (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { - setVariants(child, variantLabels); - }); - }); -} -function setValues(visualElement, definition) { - if (Array.isArray(definition)) { - return setVariants(visualElement, definition); - } else if (typeof definition === "string") { - return setVariants(visualElement, [definition]); - } else { - setTarget(visualElement, definition); + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; } -} -function checkTargetForNewValues(visualElement, target, origin) { - var _a, _b, _c; - var _d; - var newValueKeys = Object.keys(target).filter(function (key) { - return !visualElement.hasValue(key); - }); - var numNewValues = newValueKeys.length; - if (!numNewValues) return; - for (var i = 0; i < numNewValues; i++) { - var key = newValueKeys[i]; - var targetValue = target[key]; - var value = null; - /** - * If the target is a series of keyframes, we can use the first value - * in the array. If this first value is null, we'll still need to read from the DOM. - */ - if (Array.isArray(targetValue)) { - value = targetValue[0]; + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), + diff, + view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) { + return { + index: index, + lineN: newN + }; } - /** - * If the target isn't keyframes, or the first keyframe was null, we need to - * first check if an origin value was explicitly defined in the transition as "from", - * if not read the value from the DOM. As an absolute fallback, take the defined target value. - */ - if (value === null) { - value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key]; + var n = cm.display.viewFrom; + for (var i = 0; i < index; i++) { + n += view[i].size; } - /** - * If value is still undefined or null, ignore it. Preferably this would throw, - * but this was causing issues in Framer. - */ - if (value === undefined || value === null) continue; - if (typeof value === "string" && (isNumericalString(value) || isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } else if (!findValueType(value) && styleValueTypes.complex.test(targetValue)) { - value = getAnimatableNone(key, targetValue); + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) { + return null; + } + diff = n + view[index].size - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; + newN += diff; } - visualElement.addValue(key, motionValue(value)); - (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : _d[key] = value; - visualElement.setBaseTarget(key, value); + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) { + return null; + } + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return { + index: index, + lineN: newN + }; } -} -function getOriginFromTransition(key, transition) { - if (!transition) return; - var valueTransition = transition[key] || transition["default"] || transition; - return valueTransition.from; -} -function getOrigin(target, transition, visualElement) { - var _a, _b; - var origin = {}; - for (var key in target) { - origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get(); + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, + view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) { + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); + } else if (display.viewFrom < from) { + display.view = display.view.slice(findViewIndex(cm, from)); + } + display.viewFrom = from; + if (display.viewTo < to) { + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); + } else if (display.viewTo > to) { + display.view = display.view.slice(0, findViewIndex(cm, to)); + } + } + display.viewTo = to; } - return origin; -} -function animateVisualElement(visualElement, definition, options) { - if (options === void 0) { - options = {}; + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, + dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) { + ++dirty; + } + } + return dirty; } - visualElement.notifyAnimationStart(definition); - var animation; - if (Array.isArray(definition)) { - var animations = definition.map(function (variant) { - return animateVariant(visualElement, variant, options); - }); - animation = Promise.all(animations); - } else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } else { - var resolvedDefinition = typeof definition === "function" ? resolveVariant(visualElement, definition, options.custom) : definition; - animation = animateTarget(visualElement, resolvedDefinition, options); + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); } - return animation.then(function () { - return visualElement.notifyAnimationComplete(definition); - }); -} -function animateVariant(visualElement, variant, options) { - var _a; - if (options === void 0) { - options = {}; + function prepareSelection(cm, primary) { + if (primary === void 0) primary = true; + var doc = cm.doc, + result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + var customCursor = cm.options.$customCursor; + if (customCursor) { + primary = true; + } + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (!primary && i == doc.sel.primIndex) { + continue; + } + var range = doc.sel.ranges[i]; + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { + continue; + } + var collapsed = range.empty(); + if (customCursor) { + var head = customCursor(cm, range); + if (head) { + drawSelectionCursor(cm, head, curFragment); + } + } else if (collapsed || cm.options.showCursorWhenSelecting) { + drawSelectionCursor(cm, range.head, curFragment); + } + if (!collapsed) { + drawSelectionRange(cm, range, selFragment); + } + } + return result; } - var resolved = resolveVariant(visualElement, variant, options.custom); - var _b = (resolved || {}).transition, - transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b; - if (options.transitionOverride) { - transition = options.transitionOverride; + + // Draws a cursor for the given range + function drawSelectionCursor(cm, head, output) { + var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine); + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) { + var charPos = charCoords(cm, head, "div", null, null); + var width = charPos.right - charPos.left; + cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px"; + } + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + function cmpCoords(a, b) { + return a.top - b.top || a.left - b.left; + } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, + doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), + leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + var docLTR = doc.direction == "ltr"; + function add(left, top, width, bottom) { + if (top < 0) { + top = 0; + } + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")); + } + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias); + } + function wrapX(pos, dir, side) { + var extent = wrappedLineExtentChar(cm, lineObj, null, pos); + var prop = dir == "ltr" == (side == "after") ? "left" : "right"; + var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1); + return coords(ch, prop)[prop]; + } + var order = getOrder(lineObj, doc.direction); + iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) { + var ltr = dir == "ltr"; + var fromPos = coords(from, ltr ? "left" : "right"); + var toPos = coords(to - 1, ltr ? "right" : "left"); + var openStart = fromArg == null && from == 0, + openEnd = toArg == null && to == lineLen; + var first = i == 0, + last = !order || i == order.length - 1; + if (toPos.top - fromPos.top <= 3) { + // Single line + var openLeft = (docLTR ? openStart : openEnd) && first; + var openRight = (docLTR ? openEnd : openStart) && last; + var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left; + var right = openRight ? rightSide : (ltr ? toPos : fromPos).right; + add(left, fromPos.top, right - left, fromPos.bottom); + } else { + // Multiple lines + var topLeft, topRight, botLeft, botRight; + if (ltr) { + topLeft = docLTR && openStart && first ? leftSide : fromPos.left; + topRight = docLTR ? rightSide : wrapX(from, dir, "before"); + botLeft = docLTR ? leftSide : wrapX(to, dir, "after"); + botRight = docLTR && openEnd && last ? rightSide : toPos.right; + } else { + topLeft = !docLTR ? leftSide : wrapX(from, dir, "before"); + topRight = !docLTR && openStart && first ? rightSide : fromPos.right; + botLeft = !docLTR && openEnd && last ? leftSide : toPos.left; + botRight = !docLTR ? rightSide : wrapX(to, dir, "after"); + } + add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom); + if (fromPos.bottom < toPos.top) { + add(leftSide, fromPos.bottom, null, toPos.top); + } + add(botLeft, toPos.top, botRight - botLeft, toPos.bottom); + } + if (!start || cmpCoords(fromPos, start) < 0) { + start = fromPos; + } + if (cmpCoords(toPos, start) < 0) { + start = toPos; + } + if (!end || cmpCoords(fromPos, end) < 0) { + end = fromPos; + } + if (cmpCoords(toPos, end) < 0) { + end = toPos; + } + }); + return { + start: start, + end: end + }; + } + var sFrom = range.from(), + sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), + toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) { + add(leftSide, leftEnd.bottom, null, rightStart.top); + } + } + output.appendChild(fragment); } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - var getAnimation = resolved ? function () { - return animateTarget(visualElement, resolved, options); - } : function () { - return Promise.resolve(); - }; - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function (forwardDelay) { - if (forwardDelay === void 0) { - forwardDelay = 0; + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) { + return; + } + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) { + display.blinker = setInterval(function () { + if (!cm.hasFocus()) { + onBlur(cm); + } + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); + } else if (cm.options.cursorBlinkRate < 0) { + display.cursorDiv.style.visibility = "hidden"; } - var _a = transition.delayChildren, - delayChildren = _a === void 0 ? 0 : _a, - staggerChildren = transition.staggerChildren, - staggerDirection = transition.staggerDirection; - return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options); - } : function () { - return Promise.resolve(); - }; - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - var when = transition.when; - if (when) { - var _c = tslib.__read(when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation], 2), - first = _c[0], - last = _c[1]; - return first().then(last); - } else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); } -} -/** - * @internal - */ -function animateTarget(visualElement, definition, _a) { - var _b; - var _c = _a === void 0 ? {} : _a, - _d = _c.delay, - delay = _d === void 0 ? 0 : _d, - transitionOverride = _c.transitionOverride, - type = _c.type; - var _e = visualElement.makeTargetAnimatable(definition), - _f = _e.transition, - transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, - transitionEnd = _e.transitionEnd, - target = tslib.__rest(_e, ["transition", "transitionEnd"]); - if (transitionOverride) transition = transitionOverride; - var animations = []; - var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]); - for (var key in target) { - var value = visualElement.getValue(key); - var valueTarget = target[key]; - if (!value || valueTarget === undefined || animationTypeState && shouldBlockAnimation(animationTypeState, key)) { - continue; - } - var valueTransition = tslib.__assign({ - delay: delay - }, transition); - /** - * Make animation instant if this is a transform prop and we should reduce motion. - */ - if (visualElement.shouldReduceMotion && isTransformProp(key)) { - valueTransition = tslib.__assign(tslib.__assign({}, valueTransition), { - type: false, - delay: 0 - }); + function ensureFocus(cm) { + if (!cm.hasFocus()) { + cm.display.input.focus(); + if (!cm.state.focused) { + onFocus(cm); + } } - var animation = startAnimation(key, value, valueTarget, valueTransition); - animations.push(animation); - } - return Promise.all(animations).then(function () { - transitionEnd && setTarget(visualElement, transitionEnd); - }); -} -function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) { - if (delayChildren === void 0) { - delayChildren = 0; - } - if (staggerChildren === void 0) { - staggerChildren = 0; } - if (staggerDirection === void 0) { - staggerDirection = 1; + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function () { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + if (cm.state.focused) { + onBlur(cm); + } + } + }, 100); } - var animations = []; - var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren; - var generateStaggerDuration = staggerDirection === 1 ? function (i) { - if (i === void 0) { - i = 0; + function onFocus(cm, e) { + if (cm.state.delayingBlurEvent && !cm.state.draggingText) { + cm.state.delayingBlurEvent = false; } - return i * staggerChildren; - } : function (i) { - if (i === void 0) { - i = 0; + if (cm.options.readOnly == "nocursor") { + return; } - return maxStaggerDuration - i * staggerChildren; - }; - Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach(function (child, i) { - animations.push(animateVariant(child, variant, tslib.__assign(tslib.__assign({}, options), { - delay: delayChildren + generateStaggerDuration(i) - })).then(function () { - return child.notifyAnimationComplete(variant); - })); - }); - return Promise.all(animations); -} -function stopAnimation(visualElement) { - visualElement.forEachValue(function (value) { - return value.stop(); - }); -} -function sortByTreeOrder(a, b) { - return a.sortNodePosition(b); -} -/** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ -function shouldBlockAnimation(_a, key) { - var protectedKeys = _a.protectedKeys, - needsAnimating = _a.needsAnimating; - var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; -} -var variantPriorityOrder = [exports.AnimationType.Animate, exports.AnimationType.InView, exports.AnimationType.Focus, exports.AnimationType.Hover, exports.AnimationType.Tap, exports.AnimationType.Drag, exports.AnimationType.Exit]; -var reversePriorityOrder = tslib.__spreadArray([], tslib.__read(variantPriorityOrder), false).reverse(); -var numAnimationTypes = variantPriorityOrder.length; -function animateList(visualElement) { - return function (animations) { - return Promise.all(animations.map(function (_a) { - var animation = _a.animation, - options = _a.options; - return animateVisualElement(visualElement, animation, options); - })); - }; -} -function createAnimationState(visualElement) { - var animate = animateList(visualElement); - var state = createState(); - var allAnimatedKeys = {}; - var isInitialRender = true; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - var buildResolvedTypeValues = function (acc, definition) { - var resolved = resolveVariant(visualElement, definition); - if (resolved) { - resolved.transition; - var transitionEnd = resolved.transitionEnd, - target = tslib.__rest(resolved, ["transition", "transitionEnd"]); - acc = tslib.__assign(tslib.__assign(tslib.__assign({}, acc), target), transitionEnd); + if (!cm.state.focused) { + signal(cm, "focus", cm, e); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) { + setTimeout(function () { + return cm.display.input.reset(true); + }, 20); + } // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm, e) { + if (cm.state.delayingBlurEvent) { + return; } - return acc; - }; - function isAnimated(key) { - return allAnimatedKeys[key] !== undefined; - } - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(options, changedActiveType) { - var _a; - var props = visualElement.getProps(); - var context = visualElement.getVariantContext(true) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - var animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - var removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - var encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - var removedVariantIndex = Infinity; - var _loop_1 = function (i) { - var type = reversePriorityOrder[i]; - var typeState = state[type]; - var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type]; - var propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - var activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - var isInherited = prop === context[type] && prop !== props[type] && propIsVariant; - /** - * - */ - if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = tslib.__assign({}, encounteredKeys); - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - !typeState.isActive && activeDelta === null || - // If we didn't and don't have any defined prop for this animation type - !prop && !typeState.prevProp || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || typeof prop === "boolean") { - return "continue"; + if (cm.state.focused) { + signal(cm, "blur", cm, e); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function () { + if (!cm.state.focused) { + cm.display.shift = false; + } + }, 150); + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top); + var oldHeight = display.lineDiv.getBoundingClientRect().top; + var mustScroll = 0; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], + wrapping = cm.options.lineWrapping; + var height = void 0, + width = 0; + if (cur.hidden) { + continue; } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - var shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - type === changedActiveType && typeState.isActive && !isInherited && propIsVariant || - // If we removed a higher-priority variant (i is in reverse order) - i > removedVariantIndex && propIsVariant; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - var definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {}); - if (activeDelta === false) resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - var _b = typeState.prevResolvedValues, - prevResolvedValues = _b === void 0 ? {} : _b; - var allKeys = tslib.__assign(tslib.__assign({}, prevResolvedValues), resolvedValues); - var markToAnimate = function (key) { - shouldAnimateType = true; - removedKeys.delete(key); - typeState.needsAnimating[key] = true; - }; - for (var key in allKeys) { - var next = resolvedValues[key]; - var prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) continue; - /** - * If the value has changed, we probably want to animate it. - */ - if (next !== prev) { - /** - * If both values are keyframes, we need to shallow compare them to - * detect whether any value has changed. If it has, we animate it. - */ - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - if (!shallowCompare(next, prev) || variantDidChange) { - markToAnimate(key); - } else { - /** - * If it hasn't changed, we want to ensure it doesn't animate by - * adding it to the list of protected keys. - */ - typeState.protectedKeys[key] = true; - } - } else if (next !== undefined) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } else { - // If it's undefined, it's been removed. - removedKeys.add(key); + oldHeight += cur.line.height; + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + // Check that lines don't extend past the right of the current + // editor width + if (!wrapping && cur.text.firstChild) { + width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; + } + } + var diff = cur.line.height - height; + if (diff > .005 || diff < -.005) { + if (oldHeight < viewTop) { + mustScroll -= diff; + } + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) { + for (var j = 0; j < cur.rest.length; j++) { + updateWidgetHeight(cur.rest[j]); } - } else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; } } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - /** - * - */ - if (typeState.isActive) { - encounteredKeys = tslib.__assign(tslib.__assign({}, encounteredKeys), resolvedValues); + if (width > cm.display.sizerWidth) { + var chWidth = Math.ceil(width / charWidth(cm.display)); + if (chWidth > cm.display.maxLineLength) { + cm.display.maxLineLength = chWidth; + cm.display.maxLine = cur.line; + cm.display.maxLineChanged = true; + } } - if (isInitialRender && visualElement.blockInitialAnimation) { - shouldAnimateType = false; + } + if (Math.abs(mustScroll) > 2) { + display.scroller.scrollTop += mustScroll; + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) { + for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i], + parent = w.node.parentNode; + if (parent) { + w.height = parent.offsetHeight; + } } - /** - * If this is an inherited prop we want to hard-block animations - * TODO: Test as this should probably still handle animations triggered - * by removed values? - */ - if (shouldAnimateType && !isInherited) { - animations.push.apply(animations, tslib.__spreadArray([], tslib.__read(definitionList.map(function (animation) { - return { - animation: animation, - options: tslib.__assign({ - type: type - }, options) - }; - })), false)); + } + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + var from = lineAtHeight(doc, top), + to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, + ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; } + } + return { + from: from, + to: Math.max(to, from + 1) }; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (var i = 0; i < numAnimationTypes; i++) { - _loop_1(i); + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) { + return; } - allAnimatedKeys = tslib.__assign({}, encounteredKeys); - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - var fallbackAnimation_1 = {}; - removedKeys.forEach(function (key) { - var fallbackTarget = visualElement.getBaseTarget(key); - if (fallbackTarget !== undefined) { - fallbackAnimation_1[key] = fallbackTarget; + var display = cm.display, + box = display.sizer.getBoundingClientRect(), + doScroll = null; + if (rect.top + box.top < 0) { + doScroll = true; + } else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { + doScroll = false; + } + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, "position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + rect.left + "px; width: " + Math.max(2, rect.right - rect.left) + "px;"); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) { + margin = 0; + } + var rect; + if (!cm.options.lineWrapping && pos == end) { + // Set pos and end to the cursor positions around the character pos sticks to + // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch + // If pos == Pos(_, 0, "before"), pos and end are unchanged + end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos; + pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos; + } + for (var limit = 0; limit < 5; limit++) { + var changed = false; + var coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + rect = { + left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin + }; + var scrollPos = calculateScrollPos(cm, rect); + var startTop = cm.doc.scrollTop, + startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) { + changed = true; } - }); - animations.push({ - animation: fallbackAnimation_1 - }); + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { + changed = true; + } + } + if (!changed) { + break; + } } - var shouldAnimate = Boolean(animations.length); - if (isInitialRender && props.initial === false && !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; + return rect; + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, rect) { + var scrollPos = calculateScrollPos(cm, rect); + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop); + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + } + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, rect) { + var display = cm.display, + snapMargin = textHeight(cm.display); + if (rect.top < 0) { + rect.top = 0; + } + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), + result = {}; + if (rect.bottom - rect.top > screen) { + rect.bottom = rect.top + screen; + } + var docBottom = cm.doc.height + paddingVert(display); + var atTop = rect.top < snapMargin, + atBottom = rect.bottom > docBottom - snapMargin; + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top; + } else if (rect.bottom > screentop + screen) { + var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); + if (newTop != screentop) { + result.scrollTop = newTop; + } + } + var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth; + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace; + var screenw = displayWidth(cm) - display.gutters.offsetWidth; + var tooWide = rect.right - rect.left > screenw; + if (tooWide) { + rect.right = rect.left + screenw; + } + if (rect.left < 10) { + result.scrollLeft = 0; + } else if (rect.left < screenleft) { + result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); + } else if (rect.right > screenw + screenleft - 3) { + result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } - isInitialRender = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); + return result; } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive, options) { - var _a; - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) return Promise.resolve(); - // Propagate active change to children - (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { - var _a; - return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollTop(cm, top) { + if (top == null) { + return; + } + resolveScrollToPos(cm); + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(); + cm.curOp.scrollToPos = { + from: cur, + to: cur, + margin: cm.options.cursorScrollMargin + }; + } + function scrollToCoords(cm, x, y) { + if (x != null || y != null) { + resolveScrollToPos(cm); + } + if (x != null) { + cm.curOp.scrollLeft = x; + } + if (y != null) { + cm.curOp.scrollTop = y; + } + } + function scrollToRange(cm, range) { + resolveScrollToPos(cm); + cm.curOp.scrollToPos = range; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), + to = estimateCoords(cm, range.to); + scrollToCoordsRange(cm, from, to, range.margin); + } + } + function scrollToCoordsRange(cm, from, to, margin) { + var sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin }); - state[type].isActive = isActive; - var animations = animateChanges(options, type); - for (var key in state) { - state[key].protectedKeys = {}; + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop); + } + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) { + return; } - return animations; + if (!gecko) { + updateDisplaySimple(cm, { + top: val + }); + } + setScrollTop(cm, val, true); + if (gecko) { + updateDisplaySimple(cm); + } + startWorker(cm, 100); } - return { - isAnimated: isAnimated, - animateChanges: animateChanges, - setActive: setActive, - setAnimateFunction: setAnimateFunction, - getState: function () { - return state; + function setScrollTop(cm, val, forceScroll) { + val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val)); + if (cm.display.scroller.scrollTop == val && !forceScroll) { + return; + } + cm.doc.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (cm.display.scroller.scrollTop != val) { + cm.display.scroller.scrollTop = val; } - }; -} -function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } else if (isVariantLabels(next)) { - return !shallowCompare(next, prev); } - return false; -} -function createTypeState(isActive) { - if (isActive === void 0) { - isActive = false; + + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth)); + if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { + return; + } + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) { + cm.display.scroller.scrollLeft = val; + } + cm.display.scrollbars.setScrollLeft(val); } - return { - isActive: isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {} + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, + gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, + clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + }; + } + var NativeScrollbars = function (place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + vert.tabIndex = horiz.tabIndex = -1; + place(vert); + place(horiz); + on(vert, "scroll", function () { + if (vert.clientHeight) { + scroll(vert.scrollTop, "vertical"); + } + }); + on(horiz, "scroll", function () { + if (horiz.clientWidth) { + scroll(horiz.scrollLeft, "horizontal"); + } + }); + this.checkedZeroWidth = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) { + this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; + } }; -} -function createState() { - var _a; - return _a = {}, _a[exports.AnimationType.Animate] = createTypeState(true), _a[exports.AnimationType.InView] = createTypeState(), _a[exports.AnimationType.Hover] = createTypeState(), _a[exports.AnimationType.Tap] = createTypeState(), _a[exports.AnimationType.Drag] = createTypeState(), _a[exports.AnimationType.Focus] = createTypeState(), _a[exports.AnimationType.Exit] = createTypeState(), _a; -} -var animations = { - animation: makeRenderlessComponent(function (_a) { - var visualElement = _a.visualElement, - animate = _a.animate; - /** - * We dynamically generate the AnimationState manager as it contains a reference - * to the underlying animation library. We only want to load that if we load this, - * so people can optionally code split it out using the `m` component. - */ - visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement)); - /** - * Subscribe any provided AnimationControls to the component's VisualElement - */ - if (isAnimationControls(animate)) { - React.useEffect(function () { - return animate.subscribe(visualElement); - }, [animate]); + NativeScrollbars.prototype.update = function (measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.scrollTop = 0; + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; } - }), - exit: makeRenderlessComponent(function (props) { - var custom = props.custom, - visualElement = props.visualElement; - var _a = tslib.__read(usePresence(), 2), - isPresent = _a[0], - safeToRemove = _a[1]; - var presenceContext = React.useContext(PresenceContext); - React.useEffect(function () { - var _a, _b; - visualElement.isPresent = isPresent; - var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Exit, !isPresent, { - custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) { + this.zeroWidthHack(); + } + this.checkedZeroWidth = true; + } + return { + right: needsV ? sWidth : 0, + bottom: needsH ? sWidth : 0 + }; + }; + NativeScrollbars.prototype.setScrollLeft = function (pos) { + if (this.horiz.scrollLeft != pos) { + this.horiz.scrollLeft = pos; + } + if (this.disableHoriz) { + this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); + } + }; + NativeScrollbars.prototype.setScrollTop = function (pos) { + if (this.vert.scrollTop != pos) { + this.vert.scrollTop = pos; + } + if (this.disableVert) { + this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); + } + }; + NativeScrollbars.prototype.zeroWidthHack = function () { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.height = this.vert.style.width = w; + this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none"; + this.disableHoriz = new Delayed(); + this.disableVert = new Delayed(); + }; + NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) { + bar.style.pointerEvents = "auto"; + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // right corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + var box = bar.getBoundingClientRect(); + var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1); + if (elt != bar) { + bar.style.pointerEvents = "none"; + } else { + delay.set(1000, maybeDisable); + } + } + delay.set(1000, maybeDisable); + }; + NativeScrollbars.prototype.clear = function () { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + }; + var NullScrollbars = function () {}; + NullScrollbars.prototype.update = function () { + return { + bottom: 0, + right: 0 + }; + }; + NullScrollbars.prototype.setScrollLeft = function () {}; + NullScrollbars.prototype.setScrollTop = function () {}; + NullScrollbars.prototype.clear = function () {}; + function updateScrollbars(cm, measure) { + if (!measure) { + measure = measureForScrollbars(cm); + } + var startWidth = cm.display.barWidth, + startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) { + updateHeightsInViewport(cm); + } + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; + startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"; + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else { + d.scrollbarFiller.style.display = ""; + } + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else { + d.gutterFiller.style.display = ""; + } + } + var scrollbarModel = { + "native": NativeScrollbars, + "null": NullScrollbars + }; + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) { + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + } + cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function () { + if (cm.state.focused) { + setTimeout(function () { + return cm.display.input.focus(); + }, 0); + } }); - !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove)); - }, [isPresent]); - }) -}; + node.setAttribute("cm-not-content", "true"); + }, function (pos, axis) { + if (axis == "horizontal") { + setScrollLeft(cm, pos); + } else { + updateScrollTop(cm, pos); + } + }, cm); + if (cm.display.scrollbars.addClass) { + addClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + } + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, + // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, + // Used to detect need to update scrollbar + forceUpdate: false, + // Used to force a redraw + updateInput: 0, + // Whether to reset the input textarea + typing: false, + // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, + // Accumulated changes, for firing change events + cursorActivityHandlers: null, + // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, + // Tracks which cursorActivity handlers have been called already + selectionChanged: false, + // Whether the selection needs to be redrawn + updateMaxLine: false, + // Set when the widest line needs to be determined anew + scrollLeft: null, + scrollTop: null, + // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, + // Used to scroll to a specific position + focus: false, + id: ++nextOpId, + // Unique ID + markArrays: null // Used by addMarkedSpan + }; + pushOperation(cm.curOp); + } -/** - * @internal - */ -var PanSession = /** @class */function () { - function PanSession(event, handlers, _a) { - var _this = this; - var _b = _a === void 0 ? {} : _a, - transformPagePoint = _b.transformPagePoint; - /** - * @internal - */ - this.startEvent = null; - /** - * @internal - */ - this.lastMoveEvent = null; - /** - * @internal - */ - this.lastMoveEventInfo = null; - /** - * @internal - */ - this.handlers = {}; - this.updatePoint = function () { - if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) return; - var info = getPanInfo(_this.lastMoveEventInfo, _this.history); - var isPanStarted = _this.startEvent !== null; - // Only start panning if the offset is larger than 3 pixels. If we make it - // any larger than this we'll want to reset the pointer history - // on the first update to avoid visual snapping to the cursoe. - var isDistancePastThreshold = popmotion.distance(info.offset, { - x: 0, - y: 0 - }) >= 3; - if (!isPanStarted && !isDistancePastThreshold) return; - var point = info.point; - var timestamp = sync.getFrameData().timestamp; - _this.history.push(tslib.__assign(tslib.__assign({}, point), { - timestamp: timestamp - })); - var _a = _this.handlers, - onStart = _a.onStart, - onMove = _a.onMove; - if (!isPanStarted) { - onStart && onStart(_this.lastMoveEvent, info); - _this.startEvent = _this.lastMoveEvent; + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp; + if (op) { + finishOperation(op, function (group) { + for (var i = 0; i < group.ops.length; i++) { + group.ops[i].cm.curOp = null; + } + endOperations(group); + }); + } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) + // Read DOM + { + endOperation_R1(ops[i]); + } + for (var i$1 = 0; i$1 < ops.length; i$1++) + // Write DOM (maybe) + { + endOperation_W1(ops[i$1]); + } + for (var i$2 = 0; i$2 < ops.length; i$2++) + // Read DOM + { + endOperation_R2(ops[i$2]); + } + for (var i$3 = 0; i$3 < ops.length; i$3++) + // Write DOM (maybe) + { + endOperation_W2(ops[i$3]); + } + for (var i$4 = 0; i$4 < ops.length; i$4++) + // Read DOM + { + endOperation_finish(ops[i$4]); + } + } + function endOperation_R1(op) { + var cm = op.cm, + display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) { + findMaxLine(cm); + } + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || op.scrollToPos.to.line >= display.viewTo) || display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && new DisplayUpdate(cm, op.mustUpdate && { + top: op.scrollTop, + ensure: op.scrollToPos + }, op.forceUpdate); + } + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + function endOperation_R2(op) { + var cm = op.cm, + display = cm.display; + if (op.updatedDisplay) { + updateHeightsInViewport(cm); + } + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + if (op.updatedDisplay || op.selectionChanged) { + op.preparedSelection = display.input.prepareSelection(); + } + } + function endOperation_W2(op) { + var cm = op.cm; + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) { + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); + } + cm.display.maxLineChanged = false; + } + var takeFocus = op.focus && op.focus == activeElt(); + if (op.preparedSelection) { + cm.display.input.showSelection(op.preparedSelection, takeFocus); + } + if (op.updatedDisplay || op.startHeight != cm.doc.height) { + updateScrollbars(cm, op.barMeasure); + } + if (op.updatedDisplay) { + setDocumentHeight(cm, op.barMeasure); + } + if (op.selectionChanged) { + restartBlink(cm); + } + if (cm.state.focused && op.updateInput) { + cm.display.input.reset(op.typing); + } + if (takeFocus) { + ensureFocus(op.cm); + } + } + function endOperation_finish(op) { + var cm = op.cm, + display = cm.display, + doc = cm.doc; + if (op.updatedDisplay) { + postUpdateDisplay(cm, op.update); + } + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) { + display.wheelStartX = display.wheelStartY = null; + } + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null) { + setScrollTop(cm, op.scrollTop, op.forceScroll); + } + if (op.scrollLeft != null) { + setScrollLeft(cm, op.scrollLeft, true, true); + } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + maybeScrollWindow(cm, rect); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, + unhidden = op.maybeUnhiddenMarkers; + if (hidden) { + for (var i = 0; i < hidden.length; ++i) { + if (!hidden[i].lines.length) { + signal(hidden[i], "hide"); + } + } + } + if (unhidden) { + for (var i$1 = 0; i$1 < unhidden.length; ++i$1) { + if (unhidden[i$1].lines.length) { + signal(unhidden[i$1], "unhide"); + } + } + } + if (display.wrapper.offsetHeight) { + doc.scrollTop = cm.display.scroller.scrollTop; + } + + // Fire change events, and delayed event handlers + if (op.changeObjs) { + signal(cm, "changes", cm, op.changeObjs); + } + if (op.update) { + op.update.finish(); + } + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) { + return f(); + } + startOperation(cm); + try { + return f(); + } finally { + endOperation(cm); + } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function () { + if (cm.curOp) { + return f.apply(cm, arguments); + } + startOperation(cm); + try { + return f.apply(cm, arguments); + } finally { + endOperation(cm); } - onMove && onMove(_this.lastMoveEvent, info); }; - this.handlePointerMove = function (event, info) { - _this.lastMoveEvent = event; - _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint); - // Because Safari doesn't trigger mouseup events when it's above a `` + if (isMouseEvent(event) && event.buttons === 0) { + _this.handlePointerUp(event, info); + return; + } + // Throttle mouse move event to once per frame + sync__default["default"].update(_this.updatePoint, true); + }; + this.handlePointerUp = function (event, info) { + _this.end(); + var _a = _this.handlers, + onEnd = _a.onEnd, + onSessionEnd = _a.onSessionEnd; + var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history); + if (_this.startEvent && onEnd) { + onEnd(event, panInfo); + } + onSessionEnd && onSessionEnd(event, panInfo); + }; + // If we have more than one touch, don't start detecting this gesture + if (isTouchEvent(event) && event.touches.length > 1) return; + this.handlers = handlers; + this.transformPagePoint = transformPagePoint; + var info = extractEventInfo(event); + var initialInfo = transformPoint(info, this.transformPagePoint); + var point = initialInfo.point; + var timestamp = sync.getFrameData().timestamp; + this.history = [tslib.__assign(tslib.__assign({}, point), { + timestamp: timestamp + })]; + var onSessionStart = handlers.onSessionStart; + onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history)); + this.removeListeners = popmotion.pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp)); } -})); -Object.defineProperty(exports, "isEqualType", ({ - enumerable: true, - get: function () { - return _index6.isEqualType; + PanSession.prototype.updateHandlers = function (handlers) { + this.handlers = handlers; + }; + PanSession.prototype.end = function () { + this.removeListeners && this.removeListeners(); + sync.cancelSync.update(this.updatePoint); + }; + return PanSession; +}(); +function transformPoint(info, transformPagePoint) { + return transformPagePoint ? { + point: transformPagePoint(info.point) + } : info; +} +function subtractPoint(a, b) { + return { + x: a.x - b.x, + y: a.y - b.y + }; +} +function getPanInfo(_a, history) { + var point = _a.point; + return { + point: point, + delta: subtractPoint(point, lastDevicePoint(history)), + offset: subtractPoint(point, startDevicePoint(history)), + velocity: getVelocity(history, 0.1) + }; +} +function startDevicePoint(history) { + return history[0]; +} +function lastDevicePoint(history) { + return history[history.length - 1]; +} +function getVelocity(history, timeDelta) { + if (history.length < 2) { + return { + x: 0, + y: 0 + }; } -})); -Object.defineProperty(exports, "isExecutableDefinitionNode", ({ - enumerable: true, - get: function () { - return _index2.isExecutableDefinitionNode; + var i = history.length - 1; + var timestampedPoint = null; + var lastPoint = lastDevicePoint(history); + while (i >= 0) { + timestampedPoint = history[i]; + if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) { + break; + } + i--; } -})); -Object.defineProperty(exports, "isInputObjectType", ({ - enumerable: true, - get: function () { - return _index.isInputObjectType; + if (!timestampedPoint) { + return { + x: 0, + y: 0 + }; } -})); -Object.defineProperty(exports, "isInputType", ({ - enumerable: true, - get: function () { - return _index.isInputType; + var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000; + if (time === 0) { + return { + x: 0, + y: 0 + }; } -})); -Object.defineProperty(exports, "isInterfaceType", ({ - enumerable: true, - get: function () { - return _index.isInterfaceType; + var currentVelocity = { + x: (lastPoint.x - timestampedPoint.x) / time, + y: (lastPoint.y - timestampedPoint.y) / time + }; + if (currentVelocity.x === Infinity) { + currentVelocity.x = 0; } -})); -Object.defineProperty(exports, "isIntrospectionType", ({ - enumerable: true, - get: function () { - return _index.isIntrospectionType; + if (currentVelocity.y === Infinity) { + currentVelocity.y = 0; } -})); -Object.defineProperty(exports, "isLeafType", ({ - enumerable: true, - get: function () { - return _index.isLeafType; + return currentVelocity; +} +function calcLength(axis) { + return axis.max - axis.min; +} +function isNear(value, target, maxDistance) { + if (target === void 0) { + target = 0; } -})); -Object.defineProperty(exports, "isListType", ({ - enumerable: true, - get: function () { - return _index.isListType; + if (maxDistance === void 0) { + maxDistance = 0.01; } -})); -Object.defineProperty(exports, "isNamedType", ({ - enumerable: true, - get: function () { - return _index.isNamedType; + return popmotion.distance(value, target) < maxDistance; +} +function calcAxisDelta(delta, source, target, origin) { + if (origin === void 0) { + origin = 0.5; } -})); -Object.defineProperty(exports, "isNonNullType", ({ - enumerable: true, - get: function () { - return _index.isNonNullType; + delta.origin = origin; + delta.originPoint = popmotion.mix(source.min, source.max, delta.origin); + delta.scale = calcLength(target) / calcLength(source); + if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale)) delta.scale = 1; + delta.translate = popmotion.mix(target.min, target.max, delta.origin) - delta.originPoint; + if (isNear(delta.translate) || isNaN(delta.translate)) delta.translate = 0; +} +function calcBoxDelta(delta, source, target, origin) { + calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX); + calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY); +} +function calcRelativeAxis(target, relative, parent) { + target.min = parent.min + relative.min; + target.max = target.min + calcLength(relative); +} +function calcRelativeBox(target, relative, parent) { + calcRelativeAxis(target.x, relative.x, parent.x); + calcRelativeAxis(target.y, relative.y, parent.y); +} +function calcRelativeAxisPosition(target, layout, parent) { + target.min = layout.min - parent.min; + target.max = target.min + calcLength(layout); +} +function calcRelativePosition(target, layout, parent) { + calcRelativeAxisPosition(target.x, layout.x, parent.x); + calcRelativeAxisPosition(target.y, layout.y, parent.y); +} + +/** + * Apply constraints to a point. These constraints are both physical along an + * axis, and an elastic factor that determines how much to constrain the point + * by if it does lie outside the defined parameters. + */ +function applyConstraints(point, _a, elastic) { + var min = _a.min, + max = _a.max; + if (min !== undefined && point < min) { + // If we have a min point defined, and this is outside of that, constrain + point = elastic ? popmotion.mix(min, point, elastic.min) : Math.max(point, min); + } else if (max !== undefined && point > max) { + // If we have a max point defined, and this is outside of that, constrain + point = elastic ? popmotion.mix(max, point, elastic.max) : Math.min(point, max); } -})); -Object.defineProperty(exports, "isNullableType", ({ - enumerable: true, - get: function () { - return _index.isNullableType; + return point; +} +/** + * Calculate constraints in terms of the viewport when defined relatively to the + * measured axis. This is measured from the nearest edge, so a max constraint of 200 + * on an axis with a max value of 300 would return a constraint of 500 - axis length + */ +function calcRelativeAxisConstraints(axis, min, max) { + return { + min: min !== undefined ? axis.min + min : undefined, + max: max !== undefined ? axis.max + max - (axis.max - axis.min) : undefined + }; +} +/** + * Calculate constraints in terms of the viewport when + * defined relatively to the measured bounding box. + */ +function calcRelativeConstraints(layoutBox, _a) { + var top = _a.top, + left = _a.left, + bottom = _a.bottom, + right = _a.right; + return { + x: calcRelativeAxisConstraints(layoutBox.x, left, right), + y: calcRelativeAxisConstraints(layoutBox.y, top, bottom) + }; +} +/** + * Calculate viewport constraints when defined as another viewport-relative axis + */ +function calcViewportAxisConstraints(layoutAxis, constraintsAxis) { + var _a; + var min = constraintsAxis.min - layoutAxis.min; + var max = constraintsAxis.max - layoutAxis.max; + // If the constraints axis is actually smaller than the layout axis then we can + // flip the constraints + if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) { + _a = tslib.__read([max, min], 2), min = _a[0], max = _a[1]; } -})); -Object.defineProperty(exports, "isObjectType", ({ - enumerable: true, - get: function () { - return _index.isObjectType; + return { + min: min, + max: max + }; +} +/** + * Calculate viewport constraints when defined as another viewport-relative box + */ +function calcViewportConstraints(layoutBox, constraintsBox) { + return { + x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x), + y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y) + }; +} +/** + * Calculate a transform origin relative to the source axis, between 0-1, that results + * in an asthetically pleasing scale/transform needed to project from source to target. + */ +function calcOrigin(source, target) { + var origin = 0.5; + var sourceLength = calcLength(source); + var targetLength = calcLength(target); + if (targetLength > sourceLength) { + origin = popmotion.progress(target.min, target.max - sourceLength, source.min); + } else if (sourceLength > targetLength) { + origin = popmotion.progress(source.min, source.max - targetLength, target.min); } -})); -Object.defineProperty(exports, "isOutputType", ({ - enumerable: true, - get: function () { - return _index.isOutputType; + return popmotion.clamp(0, 1, origin); +} +/** + * Rebase the calculated viewport constraints relative to the layout.min point. + */ +function rebaseAxisConstraints(layout, constraints) { + var relativeConstraints = {}; + if (constraints.min !== undefined) { + relativeConstraints.min = constraints.min - layout.min; } -})); -Object.defineProperty(exports, "isRequiredArgument", ({ - enumerable: true, - get: function () { - return _index.isRequiredArgument; + if (constraints.max !== undefined) { + relativeConstraints.max = constraints.max - layout.min; } -})); -Object.defineProperty(exports, "isRequiredInputField", ({ - enumerable: true, - get: function () { - return _index.isRequiredInputField; + return relativeConstraints; +} +var defaultElastic = 0.35; +/** + * Accepts a dragElastic prop and returns resolved elastic values for each axis. + */ +function resolveDragElastic(dragElastic) { + if (dragElastic === void 0) { + dragElastic = defaultElastic; } -})); -Object.defineProperty(exports, "isScalarType", ({ - enumerable: true, - get: function () { - return _index.isScalarType; + if (dragElastic === false) { + dragElastic = 0; + } else if (dragElastic === true) { + dragElastic = defaultElastic; } -})); -Object.defineProperty(exports, "isSchema", ({ - enumerable: true, - get: function () { - return _index.isSchema; - } -})); -Object.defineProperty(exports, "isSelectionNode", ({ - enumerable: true, - get: function () { - return _index2.isSelectionNode; - } -})); -Object.defineProperty(exports, "isSpecifiedDirective", ({ - enumerable: true, - get: function () { - return _index.isSpecifiedDirective; - } -})); -Object.defineProperty(exports, "isSpecifiedScalarType", ({ - enumerable: true, - get: function () { - return _index.isSpecifiedScalarType; - } -})); -Object.defineProperty(exports, "isType", ({ - enumerable: true, - get: function () { - return _index.isType; - } -})); -Object.defineProperty(exports, "isTypeDefinitionNode", ({ - enumerable: true, - get: function () { - return _index2.isTypeDefinitionNode; - } -})); -Object.defineProperty(exports, "isTypeExtensionNode", ({ - enumerable: true, - get: function () { - return _index2.isTypeExtensionNode; - } -})); -Object.defineProperty(exports, "isTypeNode", ({ - enumerable: true, - get: function () { - return _index2.isTypeNode; - } -})); -Object.defineProperty(exports, "isTypeSubTypeOf", ({ - enumerable: true, - get: function () { - return _index6.isTypeSubTypeOf; - } -})); -Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ - enumerable: true, - get: function () { - return _index2.isTypeSystemDefinitionNode; - } -})); -Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ - enumerable: true, - get: function () { - return _index2.isTypeSystemExtensionNode; - } -})); -Object.defineProperty(exports, "isUnionType", ({ - enumerable: true, - get: function () { - return _index.isUnionType; - } -})); -Object.defineProperty(exports, "isValidNameError", ({ - enumerable: true, - get: function () { - return _index6.isValidNameError; - } -})); -Object.defineProperty(exports, "isValueNode", ({ - enumerable: true, - get: function () { - return _index2.isValueNode; - } -})); -Object.defineProperty(exports, "isWrappingType", ({ - enumerable: true, - get: function () { - return _index.isWrappingType; - } -})); -Object.defineProperty(exports, "lexicographicSortSchema", ({ - enumerable: true, - get: function () { - return _index6.lexicographicSortSchema; - } -})); -Object.defineProperty(exports, "locatedError", ({ - enumerable: true, - get: function () { - return _index5.locatedError; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _index2.parse; - } -})); -Object.defineProperty(exports, "parseConstValue", ({ - enumerable: true, - get: function () { - return _index2.parseConstValue; - } -})); -Object.defineProperty(exports, "parseType", ({ - enumerable: true, - get: function () { - return _index2.parseType; - } -})); -Object.defineProperty(exports, "parseValue", ({ - enumerable: true, - get: function () { - return _index2.parseValue; - } -})); -Object.defineProperty(exports, "print", ({ - enumerable: true, - get: function () { - return _index2.print; - } -})); -Object.defineProperty(exports, "printError", ({ - enumerable: true, - get: function () { - return _index5.printError; - } -})); -Object.defineProperty(exports, "printIntrospectionSchema", ({ - enumerable: true, - get: function () { - return _index6.printIntrospectionSchema; - } -})); -Object.defineProperty(exports, "printLocation", ({ - enumerable: true, - get: function () { - return _index2.printLocation; - } -})); -Object.defineProperty(exports, "printSchema", ({ - enumerable: true, - get: function () { - return _index6.printSchema; - } -})); -Object.defineProperty(exports, "printSourceLocation", ({ - enumerable: true, - get: function () { - return _index2.printSourceLocation; - } -})); -Object.defineProperty(exports, "printType", ({ - enumerable: true, - get: function () { - return _index6.printType; - } -})); -Object.defineProperty(exports, "resolveObjMapThunk", ({ - enumerable: true, - get: function () { - return _index.resolveObjMapThunk; - } -})); -Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({ - enumerable: true, - get: function () { - return _index.resolveReadonlyArrayThunk; - } -})); -Object.defineProperty(exports, "responsePathAsArray", ({ - enumerable: true, - get: function () { - return _index3.responsePathAsArray; - } -})); -Object.defineProperty(exports, "separateOperations", ({ - enumerable: true, - get: function () { - return _index6.separateOperations; - } -})); -Object.defineProperty(exports, "specifiedDirectives", ({ - enumerable: true, - get: function () { - return _index.specifiedDirectives; - } -})); -Object.defineProperty(exports, "specifiedRules", ({ - enumerable: true, - get: function () { - return _index4.specifiedRules; - } -})); -Object.defineProperty(exports, "specifiedScalarTypes", ({ - enumerable: true, - get: function () { - return _index.specifiedScalarTypes; - } -})); -Object.defineProperty(exports, "stripIgnoredCharacters", ({ - enumerable: true, - get: function () { - return _index6.stripIgnoredCharacters; - } -})); -Object.defineProperty(exports, "subscribe", ({ - enumerable: true, - get: function () { - return _index3.subscribe; - } -})); -Object.defineProperty(exports, "syntaxError", ({ - enumerable: true, - get: function () { - return _index5.syntaxError; - } -})); -Object.defineProperty(exports, "typeFromAST", ({ - enumerable: true, - get: function () { - return _index6.typeFromAST; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _index4.validate; - } -})); -Object.defineProperty(exports, "validateSchema", ({ - enumerable: true, - get: function () { - return _index.validateSchema; - } -})); -Object.defineProperty(exports, "valueFromAST", ({ - enumerable: true, - get: function () { - return _index6.valueFromAST; - } -})); -Object.defineProperty(exports, "valueFromASTUntyped", ({ - enumerable: true, - get: function () { - return _index6.valueFromASTUntyped; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.version; - } -})); -Object.defineProperty(exports, "versionInfo", ({ - enumerable: true, - get: function () { - return _version.versionInfo; - } -})); -Object.defineProperty(exports, "visit", ({ - enumerable: true, - get: function () { - return _index2.visit; - } -})); -Object.defineProperty(exports, "visitInParallel", ({ - enumerable: true, - get: function () { - return _index2.visitInParallel; - } -})); -Object.defineProperty(exports, "visitWithTypeInfo", ({ - enumerable: true, - get: function () { - return _index6.visitWithTypeInfo; - } -})); -var _version = __webpack_require__(/*! ./version.mjs */ "../../../node_modules/graphql/version.mjs"); -var _graphql = __webpack_require__(/*! ./graphql.mjs */ "../../../node_modules/graphql/graphql.mjs"); -var _index = __webpack_require__(/*! ./type/index.mjs */ "../../../node_modules/graphql/type/index.mjs"); -var _index2 = __webpack_require__(/*! ./language/index.mjs */ "../../../node_modules/graphql/language/index.mjs"); -var _index3 = __webpack_require__(/*! ./execution/index.mjs */ "../../../node_modules/graphql/execution/index.mjs"); -var _index4 = __webpack_require__(/*! ./validation/index.mjs */ "../../../node_modules/graphql/validation/index.mjs"); -var _index5 = __webpack_require__(/*! ./error/index.mjs */ "../../../node_modules/graphql/error/index.mjs"); -var _index6 = __webpack_require__(/*! ./utilities/index.mjs */ "../../../node_modules/graphql/utilities/index.mjs"); - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/Path.mjs": -/*!******************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/Path.mjs ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - + return { + x: resolveAxisElastic(dragElastic, "left", "right"), + y: resolveAxisElastic(dragElastic, "top", "bottom") + }; +} +function resolveAxisElastic(dragElastic, minLabel, maxLabel) { + return { + min: resolvePointElastic(dragElastic, minLabel), + max: resolvePointElastic(dragElastic, maxLabel) + }; +} +function resolvePointElastic(dragElastic, label) { + var _a; + return typeof dragElastic === "number" ? dragElastic : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0; +} +var createAxisDelta = function () { + return { + translate: 0, + scale: 1, + origin: 0, + originPoint: 0 + }; +}; +var createDelta = function () { + return { + x: createAxisDelta(), + y: createAxisDelta() + }; +}; +var createAxis = function () { + return { + min: 0, + max: 0 + }; +}; +var createBox = function () { + return { + x: createAxis(), + y: createAxis() + }; +}; +function eachAxis(callback) { + return [callback("x"), callback("y")]; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.addPath = addPath; -exports.pathToArray = pathToArray; /** - * Given a Path and a key, return a new Path containing the new key. + * Bounding boxes tend to be defined as top, left, right, bottom. For various operations + * it's easier to consider each axis individually. This function returns a bounding box + * as a map of single-axis min/max values. */ -function addPath(prev, key, typename) { +function convertBoundingBoxToBox(_a) { + var top = _a.top, + left = _a.left, + right = _a.right, + bottom = _a.bottom; return { - prev, - key, - typename + x: { + min: left, + max: right + }, + y: { + min: top, + max: bottom + } + }; +} +function convertBoxToBoundingBox(_a) { + var x = _a.x, + y = _a.y; + return { + top: y.min, + right: x.max, + bottom: y.max, + left: x.min }; } /** - * Given a Path, return an Array of the path keys. + * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function + * provided by Framer to allow measured points to be corrected for device scaling. This is used + * when measuring DOM elements and DOM event points. */ - -function pathToArray(path) { - const flattened = []; - let curr = path; - while (curr) { - flattened.push(curr.key); - curr = curr.prev; - } - return flattened.reverse(); +function transformBoxPoints(point, transformPoint) { + if (!transformPoint) return point; + var topLeft = transformPoint({ + x: point.left, + y: point.top + }); + var bottomRight = transformPoint({ + x: point.right, + y: point.bottom + }); + return { + top: topLeft.y, + left: topLeft.x, + bottom: bottomRight.y, + right: bottomRight.x + }; } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/devAssert.mjs": -/*!***********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/devAssert.mjs ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.devAssert = devAssert; -function devAssert(condition, message) { - const booleanCondition = Boolean(condition); - if (!booleanCondition) { - throw new Error(message); - } +function isIdentityScale(scale) { + return scale === undefined || scale === 1; +} +function hasScale(_a) { + var scale = _a.scale, + scaleX = _a.scaleX, + scaleY = _a.scaleY; + return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY); +} +function hasTransform(values) { + return hasScale(values) || hasTranslate(values.x) || hasTranslate(values.y) || values.z || values.rotate || values.rotateX || values.rotateY; +} +function hasTranslate(value) { + return value && value !== "0%"; } -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/didYouMean.mjs": -/*!************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/didYouMean.mjs ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.didYouMean = didYouMean; -const MAX_SUGGESTIONS = 5; /** - * Given [ A, B, C ] return ' Did you mean A, B, or C?'. + * Scales a point based on a factor and an originPoint */ - -function didYouMean(firstArg, secondArg) { - const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [undefined, firstArg]; - let message = ' Did you mean '; - if (subMessage) { - message += subMessage + ' '; - } - const suggestions = suggestionsArg.map(x => `"${x}"`); - switch (suggestions.length) { - case 0: - return ''; - case 1: - return message + suggestions[0] + '?'; - case 2: - return message + suggestions[0] + ' or ' + suggestions[1] + '?'; +function scalePoint(point, scale, originPoint) { + var distanceFromOrigin = point - originPoint; + var scaled = scale * distanceFromOrigin; + return originPoint + scaled; +} +/** + * Applies a translate/scale delta to a point + */ +function applyPointDelta(point, translate, scale, originPoint, boxScale) { + if (boxScale !== undefined) { + point = scalePoint(point, boxScale, originPoint); } - const selected = suggestions.slice(0, MAX_SUGGESTIONS); - const lastItem = selected.pop(); - return message + selected.join(', ') + ', or ' + lastItem + '?'; + return scalePoint(point, scale, originPoint) + translate; } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/groupBy.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/groupBy.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.groupBy = groupBy; /** - * Groups array items into a Map, given a function to produce grouping key. + * Applies a translate/scale delta to an axis */ -function groupBy(list, keyFn) { - const result = new Map(); - for (const item of list) { - const key = keyFn(item); - const group = result.get(key); - if (group === undefined) { - result.set(key, [item]); - } else { - group.push(item); - } +function applyAxisDelta(axis, translate, scale, originPoint, boxScale) { + if (translate === void 0) { + translate = 0; } - return result; + if (scale === void 0) { + scale = 1; + } + axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); + axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/identityFunc.mjs": -/*!**************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/identityFunc.mjs ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.identityFunc = identityFunc; /** - * Returns the first argument it receives. + * Applies a translate/scale delta to a box */ -function identityFunc(x) { - return x; +function applyBoxDelta(box, _a) { + var x = _a.x, + y = _a.y; + applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); + applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/inspect.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/inspect.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.inspect = inspect; -const MAX_ARRAY_LENGTH = 10; -const MAX_RECURSIVE_DEPTH = 2; /** - * Used to print values in error messages. + * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms + * in a tree upon our box before then calculating how to project it into our desired viewport-relative box + * + * This is the final nested loop within updateLayoutDelta for future refactoring */ - -function inspect(value) { - return formatValue(value, []); -} -function formatValue(value, seenValues) { - switch (typeof value) { - case 'string': - return JSON.stringify(value); - case 'function': - return value.name ? `[function ${value.name}]` : '[function]'; - case 'object': - return formatObjectValue(value, seenValues); - default: - return String(value); - } -} -function formatObjectValue(value, previouslySeenValues) { - if (value === null) { - return 'null'; - } - if (previouslySeenValues.includes(value)) { - return '[Circular]'; +function applyTreeDeltas(box, treeScale, treePath, isSharedTransition) { + var _a, _b; + if (isSharedTransition === void 0) { + isSharedTransition = false; } - const seenValues = [...previouslySeenValues, value]; - if (isJSONable(value)) { - const jsonValue = value.toJSON(); // check for infinite recursion - - if (jsonValue !== value) { - return typeof jsonValue === 'string' ? jsonValue : formatValue(jsonValue, seenValues); + var treeLength = treePath.length; + if (!treeLength) return; + // Reset the treeScale + treeScale.x = treeScale.y = 1; + var node; + var delta; + for (var i = 0; i < treeLength; i++) { + node = treePath[i]; + delta = node.projectionDelta; + if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === "contents") continue; + if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) { + transformBox(box, { + x: -node.scroll.x, + y: -node.scroll.y + }); } - } else if (Array.isArray(value)) { - return formatArray(value, seenValues); - } - return formatObject(value, seenValues); -} -function isJSONable(value) { - return typeof value.toJSON === 'function'; -} -function formatObject(object, seenValues) { - const entries = Object.entries(object); - if (entries.length === 0) { - return '{}'; - } - if (seenValues.length > MAX_RECURSIVE_DEPTH) { - return '[' + getObjectTag(object) + ']'; - } - const properties = entries.map(_ref => { - let [key, value] = _ref; - return key + ': ' + formatValue(value, seenValues); - }); - return '{ ' + properties.join(', ') + ' }'; -} -function formatArray(array, seenValues) { - if (array.length === 0) { - return '[]'; - } - if (seenValues.length > MAX_RECURSIVE_DEPTH) { - return '[Array]'; - } - const len = Math.min(MAX_ARRAY_LENGTH, array.length); - const remaining = array.length - len; - const items = []; - for (let i = 0; i < len; ++i) { - items.push(formatValue(array[i], seenValues)); - } - if (remaining === 1) { - items.push('... 1 more item'); - } else if (remaining > 1) { - items.push(`... ${remaining} more items`); - } - return '[' + items.join(', ') + ']'; -} -function getObjectTag(object) { - const tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, ''); - if (tag === 'Object' && typeof object.constructor === 'function') { - const name = object.constructor.name; - if (typeof name === 'string' && name !== '') { - return name; + if (delta) { + // Incoporate each ancestor's scale into a culmulative treeScale for this component + treeScale.x *= delta.x.scale; + treeScale.y *= delta.y.scale; + // Apply each ancestor's calculated delta into this component's recorded layout box + applyBoxDelta(box, delta); } - } - return tag; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/instanceOf.mjs": -/*!************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/instanceOf.mjs ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.instanceOf = void 0; -var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -/** - * A replacement for instanceof which includes an error warning when multi-realm - * constructors are detected. - * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production - * See: https://webpack.js.org/guides/production/ - */ - -const instanceOf = /* c8 ignore next 6 */ -// FIXME: https://github.com/graphql/graphql-js/issues/2317 -globalThis.process && globalThis.process.env.NODE_ENV === 'production' ? function instanceOf(value, constructor) { - return value instanceof constructor; -} : function instanceOf(value, constructor) { - if (value instanceof constructor) { - return true; - } - if (typeof value === 'object' && value !== null) { - var _value$constructor; - - // Prefer Symbol.toStringTag since it is immune to minification. - const className = constructor.prototype[Symbol.toStringTag]; - const valueClassName = - // We still need to support constructor's name to detect conflicts with older versions of this library. - Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009 - ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name; - if (className === valueClassName) { - const stringifiedValue = (0, _inspect.inspect)(value); - throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. - -Ensure that there is only one instance of "graphql" in the node_modules -directory. If different versions of "graphql" are the dependencies of other -relied on modules, use "resolutions" to ensure only one version is installed. - -https://yarnpkg.com/en/docs/selective-version-resolutions - -Duplicate "graphql" modules cannot be used at the same time since different -versions may have different capabilities and behavior. The data from one -version used in the function from another could produce confusing and -spurious results.`); + if (isSharedTransition && hasTransform(node.latestValues)) { + transformBox(box, node.latestValues); } } - return false; -}; -exports.instanceOf = instanceOf; - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/invariant.mjs": -/*!***********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/invariant.mjs ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.invariant = invariant; -function invariant(condition, message) { - const booleanCondition = Boolean(condition); - if (!booleanCondition) { - throw new Error(message != null ? message : 'Unexpected invariant triggered.'); - } } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs": -/*!*****************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/isAsyncIterable.mjs ***! - \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isAsyncIterable = isAsyncIterable; -/** - * Returns true if the provided object implements the AsyncIterator protocol via - * implementing a `Symbol.asyncIterator` method. - */ -function isAsyncIterable(maybeAsyncIterable) { - return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function'; +function translateAxis(axis, distance) { + axis.min = axis.min + distance; + axis.max = axis.max + distance; } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/isIterableObject.mjs": -/*!******************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/isIterableObject.mjs ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isIterableObject = isIterableObject; /** - * Returns true if the provided object is an Object (i.e. not a string literal) - * and implements the Iterator protocol. - * - * This may be used in place of [Array.isArray()][isArray] to determine if - * an object should be iterated-over e.g. Array, Map, Set, Int8Array, - * TypedArray, etc. but excludes string literals. - * - * @example - * ```ts - * isIterableObject([ 1, 2, 3 ]) // true - * isIterableObject(new Map()) // true - * isIterableObject('ABC') // false - * isIterableObject({ key: 'value' }) // false - * isIterableObject({ length: 1, 0: 'Alpha' }) // false - * ``` + * Apply a transform to an axis from the latest resolved motion values. + * This function basically acts as a bridge between a flat motion value map + * and applyAxisDelta */ -function isIterableObject(maybeIterable) { - return typeof maybeIterable === 'object' && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === 'function'; +function transformAxis(axis, transforms, _a) { + var _b = tslib.__read(_a, 3), + key = _b[0], + scaleKey = _b[1], + originKey = _b[2]; + var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5; + var originPoint = popmotion.mix(axis.min, axis.max, axisOrigin); + // Apply the axis delta to the final axis + applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/isObjectLike.mjs": -/*!**************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/isObjectLike.mjs ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isObjectLike = isObjectLike; /** - * Return true if `value` is object-like. A value is object-like if it's not - * `null` and has a `typeof` result of "object". + * The names of the motion values we want to apply as translation, scale and origin. */ -function isObjectLike(value) { - return typeof value == 'object' && value !== null; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/isPromise.mjs": -/*!***********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/isPromise.mjs ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isPromise = isPromise; +var xKeys$1 = ["x", "scaleX", "originX"]; +var yKeys$1 = ["y", "scaleY", "originY"]; /** - * Returns true if the value acts like a Promise, i.e. has a "then" function, - * otherwise returns false. + * Apply a transform to a box from the latest resolved motion values. */ -function isPromise(value) { - return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function'; +function transformBox(box, transform) { + transformAxis(box.x, transform, xKeys$1); + transformAxis(box.y, transform, yKeys$1); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/keyMap.mjs": -/*!********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/keyMap.mjs ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.keyMap = keyMap; -/** - * Creates a keyed JS object from an array, given a function to produce the keys - * for each value in the array. - * - * This provides a convenient lookup for the array items if the key function - * produces unique results. - * ```ts - * const phoneBook = [ - * { name: 'Jon', num: '555-1234' }, - * { name: 'Jenny', num: '867-5309' } - * ] - * - * const entriesByName = keyMap( - * phoneBook, - * entry => entry.name - * ) - * - * // { - * // Jon: { name: 'Jon', num: '555-1234' }, - * // Jenny: { name: 'Jenny', num: '867-5309' } - * // } - * - * const jennyEntry = entriesByName['Jenny'] - * - * // { name: 'Jenny', num: '857-6309' } - * ``` - */ -function keyMap(list, keyFn) { - const result = Object.create(null); - for (const item of list) { - result[keyFn(item)] = item; - } - return result; +function measureViewportBox(instance, transformPoint) { + return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/keyValMap.mjs": -/*!***********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/keyValMap.mjs ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.keyValMap = keyValMap; -/** - * Creates a keyed JS object from an array, given a function to produce the keys - * and a function to produce the values from each item in the array. - * ```ts - * const phoneBook = [ - * { name: 'Jon', num: '555-1234' }, - * { name: 'Jenny', num: '867-5309' } - * ] - * - * // { Jon: '555-1234', Jenny: '867-5309' } - * const phonesByName = keyValMap( - * phoneBook, - * entry => entry.name, - * entry => entry.num - * ) - * ``` - */ -function keyValMap(list, keyFn, valFn) { - const result = Object.create(null); - for (const item of list) { - result[keyFn(item)] = valFn(item); +function measurePageBox(element, rootProjectionNode, transformPagePoint) { + var viewportBox = measureViewportBox(element, transformPagePoint); + var scroll = rootProjectionNode.scroll; + if (scroll) { + translateAxis(viewportBox.x, scroll.x); + translateAxis(viewportBox.y, scroll.y); } - return result; + return viewportBox; } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/mapValue.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/mapValue.mjs ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.mapValue = mapValue; +var elementDragControls = new WeakMap(); /** - * Creates an object map with the same keys as `map` and values generated by - * running each value of `map` thru `fn`. + * */ -function mapValue(map, fn) { - const result = Object.create(null); - for (const key of Object.keys(map)) { - result[key] = fn(map[key], key); +// let latestPointerEvent: AnyPointerEvent +var VisualElementDragControls = /** @class */function () { + function VisualElementDragControls(visualElement) { + // This is a reference to the global drag gesture lock, ensuring only one component + // can "capture" the drag of one or both axes. + // TODO: Look into moving this into pansession? + this.openGlobalLock = null; + this.isDragging = false; + this.currentDirection = null; + this.originPoint = { + x: 0, + y: 0 + }; + /** + * The permitted boundaries of travel, in pixels. + */ + this.constraints = false; + this.hasMutatedConstraints = false; + /** + * The per-axis resolved elastic values. + */ + this.elastic = createBox(); + this.visualElement = visualElement; } - return result; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/memoize3.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/memoize3.mjs ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.memoize3 = memoize3; -/** - * Memoizes the provided three-argument function. - */ -function memoize3(fn) { - let cache0; - return function memoized(a1, a2, a3) { - if (cache0 === undefined) { - cache0 = new WeakMap(); + VisualElementDragControls.prototype.start = function (originEvent, _a) { + var _this = this; + var _b = _a === void 0 ? {} : _a, + _c = _b.snapToCursor, + snapToCursor = _c === void 0 ? false : _c; + /** + * Don't start dragging if this component is exiting + */ + if (this.visualElement.isPresent === false) return; + var onSessionStart = function (event) { + // Stop any animations on both axis values immediately. This allows the user to throw and catch + // the component. + _this.stopAnimation(); + if (snapToCursor) { + _this.snapToCursor(extractEventInfo(event, "page").point); + } + }; + var onStart = function (event, info) { + var _a; + // Attempt to grab the global drag gesture lock - maybe make this part of PanSession + var _b = _this.getProps(), + drag = _b.drag, + dragPropagation = _b.dragPropagation, + onDragStart = _b.onDragStart; + if (drag && !dragPropagation) { + if (_this.openGlobalLock) _this.openGlobalLock(); + _this.openGlobalLock = getGlobalLock(drag); + // If we don 't have the lock, don't start dragging + if (!_this.openGlobalLock) return; + } + _this.isDragging = true; + _this.currentDirection = null; + _this.resolveConstraints(); + if (_this.visualElement.projection) { + _this.visualElement.projection.isAnimationBlocked = true; + _this.visualElement.projection.target = undefined; + } + /** + * Record gesture origin + */ + eachAxis(function (axis) { + var _a, _b; + var current = _this.getAxisMotionValue(axis).get() || 0; + /** + * If the MotionValue is a percentage value convert to px + */ + if (styleValueTypes.percent.test(current)) { + var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis]; + if (measuredAxis) { + var length_1 = calcLength(measuredAxis); + current = length_1 * (parseFloat(current) / 100); + } + } + _this.originPoint[axis] = current; + }); + // Fire onDragStart event + onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info); + (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Drag, true); + }; + var onMove = function (event, info) { + // latestPointerEvent = event + var _a = _this.getProps(), + dragPropagation = _a.dragPropagation, + dragDirectionLock = _a.dragDirectionLock, + onDirectionLock = _a.onDirectionLock, + onDrag = _a.onDrag; + // If we didn't successfully receive the gesture lock, early return. + if (!dragPropagation && !_this.openGlobalLock) return; + var offset = info.offset; + // Attempt to detect drag direction if directionLock is true + if (dragDirectionLock && _this.currentDirection === null) { + _this.currentDirection = getCurrentDirection(offset); + // If we've successfully set a direction, notify listener + if (_this.currentDirection !== null) { + onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection); + } + return; + } + // Update each point with the latest position + _this.updateAxis("x", info.point, offset); + _this.updateAxis("y", info.point, offset); + /** + * Ideally we would leave the renderer to fire naturally at the end of + * this frame but if the element is about to change layout as the result + * of a re-render we want to ensure the browser can read the latest + * bounding box to ensure the pointer and element don't fall out of sync. + */ + _this.visualElement.syncRender(); + /** + * This must fire after the syncRender call as it might trigger a state + * change which itself might trigger a layout update. + */ + onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info); + }; + var onSessionEnd = function (event, info) { + return _this.stop(event, info); + }; + this.panSession = new PanSession(originEvent, { + onSessionStart: onSessionStart, + onStart: onStart, + onMove: onMove, + onSessionEnd: onSessionEnd + }, { + transformPagePoint: this.visualElement.getTransformPagePoint() + }); + }; + VisualElementDragControls.prototype.stop = function (event, info) { + var isDragging = this.isDragging; + this.cancel(); + if (!isDragging) return; + var velocity = info.velocity; + this.startAnimation(velocity); + var onDragEnd = this.getProps().onDragEnd; + onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info); + }; + VisualElementDragControls.prototype.cancel = function () { + var _a, _b; + this.isDragging = false; + if (this.visualElement.projection) { + this.visualElement.projection.isAnimationBlocked = false; } - let cache1 = cache0.get(a1); - if (cache1 === undefined) { - cache1 = new WeakMap(); - cache0.set(a1, cache1); + (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end(); + this.panSession = undefined; + var dragPropagation = this.getProps().dragPropagation; + if (!dragPropagation && this.openGlobalLock) { + this.openGlobalLock(); + this.openGlobalLock = null; } - let cache2 = cache1.get(a2); - if (cache2 === undefined) { - cache2 = new WeakMap(); - cache1.set(a2, cache2); + (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(exports.AnimationType.Drag, false); + }; + VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) { + var drag = this.getProps().drag; + // If we're not dragging this axis, do an early return. + if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return; + var axisValue = this.getAxisMotionValue(axis); + var next = this.originPoint[axis] + offset[axis]; + // Apply constraints + if (this.constraints && this.constraints[axis]) { + next = applyConstraints(next, this.constraints[axis], this.elastic[axis]); } - let fnResult = cache2.get(a3); - if (fnResult === undefined) { - fnResult = fn(a1, a2, a3); - cache2.set(a3, fnResult); + axisValue.set(next); + }; + VisualElementDragControls.prototype.resolveConstraints = function () { + var _this = this; + var _a = this.getProps(), + dragConstraints = _a.dragConstraints, + dragElastic = _a.dragElastic; + var layout = (this.visualElement.projection || {}).layout; + var prevConstraints = this.constraints; + if (dragConstraints && isRefObject(dragConstraints)) { + if (!this.constraints) { + this.constraints = this.resolveRefConstraints(); + } + } else { + if (dragConstraints && layout) { + this.constraints = calcRelativeConstraints(layout.actual, dragConstraints); + } else { + this.constraints = false; + } + } + this.elastic = resolveDragElastic(dragElastic); + /** + * If we're outputting to external MotionValues, we want to rebase the measured constraints + * from viewport-relative to component-relative. + */ + if (prevConstraints !== this.constraints && layout && this.constraints && !this.hasMutatedConstraints) { + eachAxis(function (axis) { + if (_this.getAxisMotionValue(axis)) { + _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]); + } + }); } - return fnResult; }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/naturalCompare.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/naturalCompare.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.naturalCompare = naturalCompare; -/** - * Returns a number indicating whether a reference string comes before, or after, - * or is the same as the given string in natural sort order. - * - * See: https://en.wikipedia.org/wiki/Natural_sort_order - * - */ -function naturalCompare(aStr, bStr) { - let aIndex = 0; - let bIndex = 0; - while (aIndex < aStr.length && bIndex < bStr.length) { - let aChar = aStr.charCodeAt(aIndex); - let bChar = bStr.charCodeAt(bIndex); - if (isDigit(aChar) && isDigit(bChar)) { - let aNum = 0; - do { - ++aIndex; - aNum = aNum * 10 + aChar - DIGIT_0; - aChar = aStr.charCodeAt(aIndex); - } while (isDigit(aChar) && aNum > 0); - let bNum = 0; - do { - ++bIndex; - bNum = bNum * 10 + bChar - DIGIT_0; - bChar = bStr.charCodeAt(bIndex); - } while (isDigit(bChar) && bNum > 0); - if (aNum < bNum) { - return -1; + VisualElementDragControls.prototype.resolveRefConstraints = function () { + var _a = this.getProps(), + constraints = _a.dragConstraints, + onMeasureDragConstraints = _a.onMeasureDragConstraints; + if (!constraints || !isRefObject(constraints)) return false; + var constraintsElement = constraints.current; + heyListen.invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."); + var projection = this.visualElement.projection; + // TODO + if (!projection || !projection.layout) return false; + var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint()); + var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox); + /** + * If there's an onMeasureDragConstraints listener we call it and + * if different constraints are returned, set constraints to that + */ + if (onMeasureDragConstraints) { + var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints)); + this.hasMutatedConstraints = !!userConstraints; + if (userConstraints) { + measuredConstraints = convertBoundingBoxToBox(userConstraints); } - if (aNum > bNum) { - return 1; + } + return measuredConstraints; + }; + VisualElementDragControls.prototype.startAnimation = function (velocity) { + var _this = this; + var _a = this.getProps(), + drag = _a.drag, + dragMomentum = _a.dragMomentum, + dragElastic = _a.dragElastic, + dragTransition = _a.dragTransition, + dragSnapToOrigin = _a.dragSnapToOrigin, + onDragTransitionEnd = _a.onDragTransitionEnd; + var constraints = this.constraints || {}; + var momentumAnimations = eachAxis(function (axis) { + var _a; + if (!shouldDrag(axis, drag, _this.currentDirection)) { + return; } - } else { - if (aChar < bChar) { - return -1; + var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {}; + if (dragSnapToOrigin) transition = { + min: 0, + max: 0 + }; + /** + * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame + * of spring animations so we should look into adding a disable spring option to `inertia`. + * We could do something here where we affect the `bounceStiffness` and `bounceDamping` + * using the value of `dragElastic`. + */ + var bounceStiffness = dragElastic ? 200 : 1000000; + var bounceDamping = dragElastic ? 40 : 10000000; + var inertia = tslib.__assign(tslib.__assign({ + type: "inertia", + velocity: dragMomentum ? velocity[axis] : 0, + bounceStiffness: bounceStiffness, + bounceDamping: bounceDamping, + timeConstant: 750, + restDelta: 1, + restSpeed: 10 + }, dragTransition), transition); + // If we're not animating on an externally-provided `MotionValue` we can use the + // component's animation controls which will handle interactions with whileHover (etc), + // otherwise we just have to animate the `MotionValue` itself. + return _this.startAxisValueAnimation(axis, inertia); + }); + // Run all animations and then resolve the new drag constraints. + return Promise.all(momentumAnimations).then(onDragTransitionEnd); + }; + VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) { + var axisValue = this.getAxisMotionValue(axis); + return startAnimation(axis, axisValue, 0, transition); + }; + VisualElementDragControls.prototype.stopAnimation = function () { + var _this = this; + eachAxis(function (axis) { + return _this.getAxisMotionValue(axis).stop(); + }); + }; + /** + * Drag works differently depending on which props are provided. + * + * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values. + * - Otherwise, we apply the delta to the x/y motion values. + */ + VisualElementDragControls.prototype.getAxisMotionValue = function (axis) { + var _a, _b; + var dragKey = "_drag" + axis.toUpperCase(); + var externalMotionValue = this.visualElement.getProps()[dragKey]; + return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0); + }; + VisualElementDragControls.prototype.snapToCursor = function (point) { + var _this = this; + eachAxis(function (axis) { + var drag = _this.getProps().drag; + // If we're not dragging this axis, do an early return. + if (!shouldDrag(axis, drag, _this.currentDirection)) return; + var projection = _this.visualElement.projection; + var axisValue = _this.getAxisMotionValue(axis); + if (projection && projection.layout) { + var _a = projection.layout.actual[axis], + min = _a.min, + max = _a.max; + axisValue.set(point[axis] - popmotion.mix(min, max, 0.5)); } - if (aChar > bChar) { - return 1; + }); + }; + /** + * When the viewport resizes we want to check if the measured constraints + * have changed and, if so, reposition the element within those new constraints + * relative to where it was before the resize. + */ + VisualElementDragControls.prototype.scalePositionWithinConstraints = function () { + var _this = this; + var _a; + var _b = this.getProps(), + drag = _b.drag, + dragConstraints = _b.dragConstraints; + var projection = this.visualElement.projection; + if (!isRefObject(dragConstraints) || !projection || !this.constraints) return; + /** + * Stop current animations as there can be visual glitching if we try to do + * this mid-animation + */ + this.stopAnimation(); + /** + * Record the relative position of the dragged element relative to the + * constraints box and save as a progress value. + */ + var boxProgress = { + x: 0, + y: 0 + }; + eachAxis(function (axis) { + var axisValue = _this.getAxisMotionValue(axis); + if (axisValue) { + var latest = axisValue.get(); + boxProgress[axis] = calcOrigin({ + min: latest, + max: latest + }, _this.constraints[axis]); } - ++aIndex; - ++bIndex; + }); + /** + * Update the layout of this element and resolve the latest drag constraints + */ + var transformTemplate = this.visualElement.getProps().transformTemplate; + this.visualElement.getInstance().style.transform = transformTemplate ? transformTemplate({}, "") : "none"; + (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll(); + projection.updateLayout(); + this.resolveConstraints(); + /** + * For each axis, calculate the current progress of the layout axis + * within the new constraints. + */ + eachAxis(function (axis) { + if (!shouldDrag(axis, drag, null)) return; + /** + * Calculate a new transform based on the previous box progress + */ + var axisValue = _this.getAxisMotionValue(axis); + var _a = _this.constraints[axis], + min = _a.min, + max = _a.max; + axisValue.set(popmotion.mix(min, max, boxProgress[axis])); + }); + }; + VisualElementDragControls.prototype.addListeners = function () { + var _this = this; + var _a; + elementDragControls.set(this.visualElement, this); + var element = this.visualElement.getInstance(); + /** + * Attach a pointerdown event listener on this DOM element to initiate drag tracking. + */ + var stopPointerListener = addPointerEvent(element, "pointerdown", function (event) { + var _a = _this.getProps(), + drag = _a.drag, + _b = _a.dragListener, + dragListener = _b === void 0 ? true : _b; + drag && dragListener && _this.start(event); + }); + var measureDragConstraints = function () { + var dragConstraints = _this.getProps().dragConstraints; + if (isRefObject(dragConstraints)) { + _this.constraints = _this.resolveRefConstraints(); + } + }; + var projection = this.visualElement.projection; + var stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints); + if (projection && !projection.layout) { + (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll(); + projection.updateLayout(); } - } - return aStr.length - bStr.length; -} -const DIGIT_0 = 48; -const DIGIT_9 = 57; -function isDigit(code) { - return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9; + measureDragConstraints(); + /** + * Attach a window resize listener to scale the draggable target within its defined + * constraints as the window resizes. + */ + var stopResizeListener = addDomEvent(window, "resize", function () { + return _this.scalePositionWithinConstraints(); + }); + /** + * If the element's layout changes, calculate the delta and apply that to + * the drag gesture's origin point. + */ + projection.addEventListener("didUpdate", function (_a) { + var delta = _a.delta, + hasLayoutChanged = _a.hasLayoutChanged; + if (_this.isDragging && hasLayoutChanged) { + eachAxis(function (axis) { + var motionValue = _this.getAxisMotionValue(axis); + if (!motionValue) return; + _this.originPoint[axis] += delta[axis].translate; + motionValue.set(motionValue.get() + delta[axis].translate); + }); + _this.visualElement.syncRender(); + } + }); + return function () { + stopResizeListener(); + stopPointerListener(); + stopMeasureLayoutListener(); + }; + }; + VisualElementDragControls.prototype.getProps = function () { + var props = this.visualElement.getProps(); + var _a = props.drag, + drag = _a === void 0 ? false : _a, + _b = props.dragDirectionLock, + dragDirectionLock = _b === void 0 ? false : _b, + _c = props.dragPropagation, + dragPropagation = _c === void 0 ? false : _c, + _d = props.dragConstraints, + dragConstraints = _d === void 0 ? false : _d, + _e = props.dragElastic, + dragElastic = _e === void 0 ? defaultElastic : _e, + _f = props.dragMomentum, + dragMomentum = _f === void 0 ? true : _f; + return tslib.__assign(tslib.__assign({}, props), { + drag: drag, + dragDirectionLock: dragDirectionLock, + dragPropagation: dragPropagation, + dragConstraints: dragConstraints, + dragElastic: dragElastic, + dragMomentum: dragMomentum + }); + }; + return VisualElementDragControls; +}(); +function shouldDrag(direction, drag, currentDirection) { + return (drag === true || drag === direction) && (currentDirection === null || currentDirection === direction); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/printPathArray.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/printPathArray.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.printPathArray = printPathArray; /** - * Build a string describing the path. + * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower + * than the provided threshold, return `null`. + * + * @param offset - The x/y offset from origin. + * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction. */ -function printPathArray(path) { - return path.map(key => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key).join(''); +function getCurrentDirection(offset, lockThreshold) { + if (lockThreshold === void 0) { + lockThreshold = 10; + } + var direction = null; + if (Math.abs(offset.y) > lockThreshold) { + direction = "y"; + } else if (Math.abs(offset.x) > lockThreshold) { + direction = "x"; + } + return direction; } -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/promiseForObject.mjs": -/*!******************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/promiseForObject.mjs ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.promiseForObject = promiseForObject; /** - * This function transforms a JS object `ObjMap>` into - * a `Promise>` + * A hook that allows an element to be dragged. * - * This is akin to bluebird's `Promise.props`, but implemented only using - * `Promise.all` so it will work with any implementation of ES6 promises. + * @internal */ -function promiseForObject(object) { - return Promise.all(Object.values(object)).then(resolvedValues => { - const resolvedObject = Object.create(null); - for (const [i, key] of Object.keys(object).entries()) { - resolvedObject[key] = resolvedValues[i]; - } - return resolvedObject; +function useDrag(props) { + var groupDragControls = props.dragControls, + visualElement = props.visualElement; + var dragControls = useConstant(function () { + return new VisualElementDragControls(visualElement); }); + // If we've been provided a DragControls for manual control over the drag gesture, + // subscribe this component to it on mount. + React.useEffect(function () { + return groupDragControls && groupDragControls.subscribe(dragControls); + }, [dragControls, groupDragControls]); + // Apply the event listeners to the element + React.useEffect(function () { + return dragControls.addListeners(); + }, [dragControls]); } -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/promiseReduce.mjs": -/*!***************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/promiseReduce.mjs ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.promiseReduce = promiseReduce; -var _isPromise = __webpack_require__(/*! ./isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs"); /** - * Similar to Array.prototype.reduce(), however the reducing callback may return - * a Promise, in which case reduction will continue after each promise resolves. * - * If the callback does not return a Promise, then this function will also not - * return a Promise. + * @param handlers - + * @param ref - + * + * @privateRemarks + * Currently this sets new pan gesture functions every render. The memo route has been explored + * in the past but ultimately we're still creating new functions every render. An optimisation + * to explore is creating the pan gestures and loading them into a `ref`. + * + * @internal */ -function promiseReduce(values, callbackFn, initialValue) { - let accumulator = initialValue; - for (const value of values) { - accumulator = (0, _isPromise.isPromise)(accumulator) ? accumulator.then(resolved => callbackFn(resolved, value)) : callbackFn(accumulator, value); +function usePanGesture(_a) { + var onPan = _a.onPan, + onPanStart = _a.onPanStart, + onPanEnd = _a.onPanEnd, + onPanSessionStart = _a.onPanSessionStart, + visualElement = _a.visualElement; + var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart; + var panSession = React.useRef(null); + var transformPagePoint = React.useContext(MotionConfigContext).transformPagePoint; + var handlers = { + onSessionStart: onPanSessionStart, + onStart: onPanStart, + onMove: onPan, + onEnd: function (event, info) { + panSession.current = null; + onPanEnd && onPanEnd(event, info); + } + }; + React.useEffect(function () { + if (panSession.current !== null) { + panSession.current.updateHandlers(handlers); + } + }); + function onPointerDown(event) { + panSession.current = new PanSession(event, handlers, { + transformPagePoint: transformPagePoint + }); } - return accumulator; + usePointerEvent(visualElement, "pointerdown", hasPanEvents && onPointerDown); + useUnmountEffect(function () { + return panSession.current && panSession.current.end(); + }); } - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/suggestionList.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/suggestionList.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.suggestionList = suggestionList; -var _naturalCompare = __webpack_require__(/*! ./naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); -/** - * Given an invalid input string and a list of valid options, returns a filtered - * list of valid options sorted based on their similarity with the input. - */ - -function suggestionList(input, options) { - const optionsByDistance = Object.create(null); - const lexicalDistance = new LexicalDistance(input); - const threshold = Math.floor(input.length * 0.4) + 1; - for (const option of options) { - const distance = lexicalDistance.measure(option, threshold); - if (distance !== undefined) { - optionsByDistance[option] = distance; +var drag = { + pan: makeRenderlessComponent(usePanGesture), + drag: makeRenderlessComponent(useDrag) +}; +var names = ["LayoutMeasure", "BeforeLayoutMeasure", "LayoutUpdate", "ViewportBoxUpdate", "Update", "Render", "AnimationComplete", "LayoutAnimationComplete", "AnimationStart", "LayoutAnimationStart", "SetAxisTarget", "Unmount"]; +function createLifecycles() { + var managers = names.map(function () { + return new SubscriptionManager(); + }); + var propSubscriptions = {}; + var lifecycles = { + clearAllListeners: function () { + return managers.forEach(function (manager) { + return manager.clear(); + }); + }, + updatePropListeners: function (props) { + names.forEach(function (name) { + var _a; + var on = "on" + name; + var propListener = props[on]; + // Unsubscribe existing subscription + (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions); + // Add new subscription + if (propListener) { + propSubscriptions[name] = lifecycles[on](propListener); + } + }); } - } - return Object.keys(optionsByDistance).sort((a, b) => { - const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; - return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b); + }; + managers.forEach(function (manager, i) { + lifecycles["on" + names[i]] = function (handler) { + return manager.add(handler); + }; + lifecycles["notify" + names[i]] = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return manager.notify.apply(manager, tslib.__spreadArray([], tslib.__read(args), false)); + }; }); + return lifecycles; } -/** - * Computes the lexical distance between strings A and B. - * - * The "distance" between two strings is given by counting the minimum number - * of edits needed to transform string A into string B. An edit can be an - * insertion, deletion, or substitution of a single character, or a swap of two - * adjacent characters. - * - * Includes a custom alteration from Damerau-Levenshtein to treat case changes - * as a single edit which helps identify mis-cased values with an edit distance - * of 1. - * - * This distance can be useful for detecting typos in input or sorting - */ - -class LexicalDistance { - constructor(input) { - this._input = input; - this._inputLowerCase = input.toLowerCase(); - this._inputArray = stringToArray(this._inputLowerCase); - this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)]; +function updateMotionValuesFromProps(element, next, prev) { + var _a; + for (var key in next) { + var nextValue = next[key]; + var prevValue = prev[key]; + if (isMotionValue(nextValue)) { + /** + * If this is a motion value found in props or style, we want to add it + * to our visual element's motion value map. + */ + element.addValue(key, nextValue); + /** + * Check the version of the incoming motion value with this version + * and warn against mismatches. + */ + if (true) { + warnOnce(nextValue.version === "6.5.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.5.1 may not work as expected.")); + } + } else if (isMotionValue(prevValue)) { + /** + * If we're swapping to a new motion value, create a new motion value + * from that + */ + element.addValue(key, motionValue(nextValue)); + } else if (prevValue !== nextValue) { + /** + * If this is a flat value that has changed, update the motion value + * or create one if it doesn't exist. We only want to do this if we're + * not handling the value with our animation state. + */ + if (element.hasValue(key)) { + var existingValue = element.getValue(key); + // TODO: Only update values that aren't being animated or even looked at + !existingValue.hasAnimated && existingValue.set(nextValue); + } else { + element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue)); + } + } } - measure(option, threshold) { - if (this._input === option) { - return 0; + // Handle removed values + for (var key in prev) { + if (next[key] === undefined) element.removeValue(key); + } + return next; +} +var visualElement = function (_a) { + var _b = _a.treeType, + treeType = _b === void 0 ? "" : _b, + build = _a.build, + getBaseTarget = _a.getBaseTarget, + makeTargetAnimatable = _a.makeTargetAnimatable, + measureViewportBox = _a.measureViewportBox, + renderInstance = _a.render, + readValueFromInstance = _a.readValueFromInstance, + removeValueFromRenderState = _a.removeValueFromRenderState, + sortNodePosition = _a.sortNodePosition, + scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps; + return function (_a, options) { + var parent = _a.parent, + props = _a.props, + presenceId = _a.presenceId, + blockInitialAnimation = _a.blockInitialAnimation, + visualState = _a.visualState, + shouldReduceMotion = _a.shouldReduceMotion; + if (options === void 0) { + options = {}; } - const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit - - if (this._inputLowerCase === optionLowerCase) { - return 1; + var isMounted = false; + var latestValues = visualState.latestValues, + renderState = visualState.renderState; + /** + * The instance of the render-specific node that will be hydrated by the + * exposed React ref. So for example, this visual element can host a + * HTMLElement, plain object, or Three.js object. The functions provided + * in VisualElementConfig allow us to interface with this instance. + */ + var instance; + /** + * Manages the subscriptions for a visual element's lifecycle, for instance + * onRender + */ + var lifecycles = createLifecycles(); + /** + * A map of all motion values attached to this visual element. Motion + * values are source of truth for any given animated value. A motion + * value might be provided externally by the component via props. + */ + var values = new Map(); + /** + * A map of every subscription that binds the provided or generated + * motion values onChange listeners to this visual element. + */ + var valueSubscriptions = new Map(); + /** + * A reference to the previously-provided motion values as returned + * from scrapeMotionValuesFromProps. We use the keys in here to determine + * if any motion values need to be removed after props are updated. + */ + var prevMotionValues = {}; + /** + * When values are removed from all animation props we need to search + * for a fallback value to animate to. These values are tracked in baseTarget. + */ + var baseTarget = tslib.__assign({}, latestValues); + // Internal methods ======================== + /** + * On mount, this will be hydrated with a callback to disconnect + * this visual element from its parent on unmount. + */ + var removeFromVariantTree; + /** + * Render the element with the latest styles outside of the React + * render lifecycle + */ + function render() { + if (!instance || !isMounted) return; + triggerBuild(); + renderInstance(instance, renderState, props.style, element.projection); } - let a = stringToArray(optionLowerCase); - let b = this._inputArray; - if (a.length < b.length) { - const tmp = a; - a = b; - b = tmp; + function triggerBuild() { + build(element, renderState, latestValues, options, props); } - const aLength = a.length; - const bLength = b.length; - if (aLength - bLength > threshold) { - return undefined; + function update() { + lifecycles.notifyUpdate(latestValues); } - const rows = this._rows; - for (let j = 0; j <= bLength; j++) { - rows[0][j] = j; + /** + * + */ + function bindToMotionValue(key, value) { + var removeOnChange = value.onChange(function (latestValue) { + latestValues[key] = latestValue; + props.onUpdate && sync__default["default"].update(update, false, true); + }); + var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender); + valueSubscriptions.set(key, function () { + removeOnChange(); + removeOnRenderRequest(); + }); } - for (let i = 1; i <= aLength; i++) { - const upRow = rows[(i - 1) % 3]; - const currentRow = rows[i % 3]; - let smallestCell = currentRow[0] = i; - for (let j = 1; j <= bLength; j++) { - const cost = a[i - 1] === b[j - 1] ? 0 : 1; - let currentCell = Math.min(upRow[j] + 1, - // delete - currentRow[j - 1] + 1, - // insert - upRow[j - 1] + cost // substitute - ); - - if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { - // transposition - const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; - currentCell = Math.min(currentCell, doubleDiagonalCell + 1); - } - if (currentCell < smallestCell) { - smallestCell = currentCell; - } - currentRow[j] = currentCell; - } // Early exit, since distance can't go smaller than smallest element of the previous row. - - if (smallestCell > threshold) { - return undefined; + /** + * Any motion values that are provided to the element when created + * aren't yet bound to the element, as this would technically be impure. + * However, we iterate through the motion values and set them to the + * initial values for this component. + * + * TODO: This is impure and we should look at changing this to run on mount. + * Doing so will break some tests but this isn't neccessarily a breaking change, + * more a reflection of the test. + */ + var initialMotionValues = scrapeMotionValuesFromProps(props); + for (var key in initialMotionValues) { + var value = initialMotionValues[key]; + if (latestValues[key] !== undefined && isMotionValue(value)) { + value.set(latestValues[key], false); } } - const distance = rows[aLength % 3][bLength]; - return distance <= threshold ? distance : undefined; - } -} -function stringToArray(str) { - const strLength = str.length; - const array = new Array(strLength); - for (let i = 0; i < strLength; ++i) { - array[i] = str.charCodeAt(i); - } - return array; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/toError.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/toError.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.toError = toError; -var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -/** - * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. - */ - -function toError(thrownValue) { - return thrownValue instanceof Error ? thrownValue : new NonErrorThrown(thrownValue); -} -class NonErrorThrown extends Error { - constructor(thrownValue) { - super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue)); - this.name = 'NonErrorThrown'; - this.thrownValue = thrownValue; - } -} - -/***/ }), - -/***/ "../../../node_modules/graphql/jsutils/toObjMap.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/jsutils/toObjMap.mjs ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.toObjMap = toObjMap; -function toObjMap(obj) { - if (obj == null) { - return Object.create(null); - } - if (Object.getPrototypeOf(obj) === null) { - return obj; - } - const map = Object.create(null); - for (const [key, value] of Object.entries(obj)) { - map[key] = value; - } - return map; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/language/ast.mjs": -/*!******************************************************!*\ - !*** ../../../node_modules/graphql/language/ast.mjs ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0; -exports.isNode = isNode; -/** - * Contains a range of UTF-8 character offsets and token references that - * identify the region of the source from which the AST derived. - */ -class Location { - /** - * The character offset at which this Node begins. - */ - - /** - * The character offset at which this Node ends. - */ - - /** - * The Token at which this Node begins. - */ - - /** - * The Token at which this Node ends. - */ - - /** - * The Source document the AST represents. - */ - constructor(startToken, endToken, source) { - this.start = startToken.start; - this.end = endToken.end; - this.startToken = startToken; - this.endToken = endToken; - this.source = source; - } - get [Symbol.toStringTag]() { - return 'Location'; - } - toJSON() { - return { - start: this.start, - end: this.end - }; - } + /** + * Determine what role this visual element should take in the variant tree. + */ + var isControllingVariants = checkIfControllingVariants(props); + var isVariantNode = checkIfVariantNode(props); + var element = tslib.__assign(tslib.__assign({ + treeType: treeType, + /** + * This is a mirror of the internal instance prop, which keeps + * VisualElement type-compatible with React's RefObject. + */ + current: null, + /** + * The depth of this visual element within the visual element tree. + */ + depth: parent ? parent.depth + 1 : 0, + parent: parent, + children: new Set(), + /** + * + */ + presenceId: presenceId, + shouldReduceMotion: shouldReduceMotion, + /** + * If this component is part of the variant tree, it should track + * any children that are also part of the tree. This is essentially + * a shadow tree to simplify logic around how to stagger over children. + */ + variantChildren: isVariantNode ? new Set() : undefined, + /** + * Whether this instance is visible. This can be changed imperatively + * by the projection tree, is analogous to CSS's visibility in that + * hidden elements should take up layout, and needs enacting by the configured + * render function. + */ + isVisible: undefined, + /** + * Normally, if a component is controlled by a parent's variants, it can + * rely on that ancestor to trigger animations further down the tree. + * However, if a component is created after its parent is mounted, the parent + * won't trigger that mount animation so the child needs to. + * + * TODO: This might be better replaced with a method isParentMounted + */ + manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()), + /** + * This can be set by AnimatePresence to force components that mount + * at the same time as it to mount as if they have initial={false} set. + */ + blockInitialAnimation: blockInitialAnimation, + /** + * Determine whether this component has mounted yet. This is mostly used + * by variant children to determine whether they need to trigger their + * own animations on mount. + */ + isMounted: function () { + return Boolean(instance); + }, + mount: function (newInstance) { + isMounted = true; + instance = element.current = newInstance; + if (element.projection) { + element.projection.mount(newInstance); + } + if (isVariantNode && parent && !isControllingVariants) { + removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element); + } + values.forEach(function (value, key) { + return bindToMotionValue(key, value); + }); + parent === null || parent === void 0 ? void 0 : parent.children.add(element); + element.setProps(props); + }, + /** + * + */ + unmount: function () { + var _a; + (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount(); + sync.cancelSync.update(update); + sync.cancelSync.render(render); + valueSubscriptions.forEach(function (remove) { + return remove(); + }); + removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree(); + parent === null || parent === void 0 ? void 0 : parent.children.delete(element); + lifecycles.clearAllListeners(); + instance = undefined; + isMounted = false; + }, + /** + * Add a child visual element to our set of children. + */ + addVariantChild: function (child) { + var _a; + var closestVariantNode = element.getClosestVariantNode(); + if (closestVariantNode) { + (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child); + return function () { + return closestVariantNode.variantChildren.delete(child); + }; + } + }, + sortNodePosition: function (other) { + /** + * If these nodes aren't even of the same type we can't compare their depth. + */ + if (!sortNodePosition || treeType !== other.treeType) return 0; + return sortNodePosition(element.getInstance(), other.getInstance()); + }, + /** + * Returns the closest variant node in the tree starting from + * this visual element. + */ + getClosestVariantNode: function () { + return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode(); + }, + /** + * Expose the latest layoutId prop. + */ + getLayoutId: function () { + return props.layoutId; + }, + /** + * Returns the current instance. + */ + getInstance: function () { + return instance; + }, + /** + * Get/set the latest static values. + */ + getStaticValue: function (key) { + return latestValues[key]; + }, + setStaticValue: function (key, value) { + return latestValues[key] = value; + }, + /** + * Returns the latest motion value state. Currently only used to take + * a snapshot of the visual element - perhaps this can return the whole + * visual state + */ + getLatestValues: function () { + return latestValues; + }, + /** + * Set the visiblity of the visual element. If it's changed, schedule + * a render to reflect these changes. + */ + setVisibility: function (visibility) { + if (element.isVisible === visibility) return; + element.isVisible = visibility; + element.scheduleRender(); + }, + /** + * Make a target animatable by Popmotion. For instance, if we're + * trying to animate width from 100px to 100vw we need to measure 100vw + * in pixels to determine what we really need to animate to. This is also + * pluggable to support Framer's custom value types like Color, + * and CSS variables. + */ + makeTargetAnimatable: function (target, canMutate) { + if (canMutate === void 0) { + canMutate = true; + } + return makeTargetAnimatable(element, target, props, canMutate); + }, + /** + * Measure the current viewport box with or without transforms. + * Only measures axis-aligned boxes, rotate and skew must be manually + * removed with a re-render to work. + */ + measureViewportBox: function () { + return measureViewportBox(instance, props); + }, + // Motion values ======================== + /** + * Add a motion value and bind it to this visual element. + */ + addValue: function (key, value) { + // Remove existing value if it exists + if (element.hasValue(key)) element.removeValue(key); + values.set(key, value); + latestValues[key] = value.get(); + bindToMotionValue(key, value); + }, + /** + * Remove a motion value and unbind any active subscriptions. + */ + removeValue: function (key) { + var _a; + values.delete(key); + (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a(); + valueSubscriptions.delete(key); + delete latestValues[key]; + removeValueFromRenderState(key, renderState); + }, + /** + * Check whether we have a motion value for this key + */ + hasValue: function (key) { + return values.has(key); + }, + /** + * Get a motion value for this key. If called with a default + * value, we'll create one if none exists. + */ + getValue: function (key, defaultValue) { + var value = values.get(key); + if (value === undefined && defaultValue !== undefined) { + value = motionValue(defaultValue); + element.addValue(key, value); + } + return value; + }, + /** + * Iterate over our motion values. + */ + forEachValue: function (callback) { + return values.forEach(callback); + }, + /** + * If we're trying to animate to a previously unencountered value, + * we need to check for it in our state and as a last resort read it + * directly from the instance (which might have performance implications). + */ + readValue: function (key) { + var _a; + return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options); + }, + /** + * Set the base target to later animate back to. This is currently + * only hydrated on creation and when we first read a value. + */ + setBaseTarget: function (key, value) { + baseTarget[key] = value; + }, + /** + * Find the base target for a value thats been removed from all animation + * props. + */ + getBaseTarget: function (key) { + if (getBaseTarget) { + var target = getBaseTarget(props, key); + if (target !== undefined && !isMotionValue(target)) return target; + } + return baseTarget[key]; + } + }, lifecycles), { + /** + * Build the renderer state based on the latest visual state. + */ + build: function () { + triggerBuild(); + return renderState; + }, + /** + * Schedule a render on the next animation frame. + */ + scheduleRender: function () { + sync__default["default"].render(render, false, true); + }, + /** + * Synchronously fire render. It's prefered that we batch renders but + * in many circumstances, like layout measurement, we need to run this + * synchronously. However in those instances other measures should be taken + * to batch reads/writes. + */ + syncRender: render, + /** + * Update the provided props. Ensure any newly-added motion values are + * added to our map, old ones removed, and listeners updated. + */ + setProps: function (newProps) { + if (newProps.transformTemplate || props.transformTemplate) { + element.scheduleRender(); + } + props = newProps; + lifecycles.updatePropListeners(newProps); + prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues); + }, + getProps: function () { + return props; + }, + // Variants ============================== + /** + * Returns the variant definition with a given name. + */ + getVariant: function (name) { + var _a; + return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; + }, + /** + * Returns the defined default transition on this component. + */ + getDefaultTransition: function () { + return props.transition; + }, + getTransformPagePoint: function () { + return props.transformPagePoint; + }, + /** + * Used by child variant nodes to get the closest ancestor variant props. + */ + getVariantContext: function (startAtParent) { + if (startAtParent === void 0) { + startAtParent = false; + } + if (startAtParent) return parent === null || parent === void 0 ? void 0 : parent.getVariantContext(); + if (!isControllingVariants) { + var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {}; + if (props.initial !== undefined) { + context_1.initial = props.initial; + } + return context_1; + } + var context = {}; + for (var i = 0; i < numVariantProps; i++) { + var name_1 = variantProps[i]; + var prop = props[name_1]; + if (isVariantLabel(prop) || prop === false) { + context[name_1] = prop; + } + } + return context; + } + }); + return element; + }; +}; +var variantProps = tslib.__spreadArray(["initial"], tslib.__read(variantPriorityOrder), false); +var numVariantProps = variantProps.length; +function isCSSVariable(value) { + return typeof value === "string" && value.startsWith("var(--"); } /** - * Represents a range of characters represented by a lexical token - * within a Source. + * Parse Framer's special CSS variable format into a CSS token and a fallback. + * + * ``` + * `var(--foo, #fff)` => [`--foo`, '#fff'] + * ``` + * + * @param current */ -exports.Location = Location; -class Token { - /** - * The kind of Token. - */ - - /** - * The character offset at which this Node begins. - */ - - /** - * The character offset at which this Node ends. - */ - - /** - * The 1-indexed line number on which this Token appears. - */ - - /** - * The 1-indexed column number at which this Token begins. - */ - - /** - * For non-punctuation tokens, represents the interpreted value of the token. - * - * Note: is undefined for punctuation tokens, but typed as string for - * convenience in the parser. - */ - - /** - * Tokens exist as nodes in a double-linked-list amongst all tokens - * including ignored tokens. is always the first node and - * the last. - */ - constructor(kind, start, end, line, column, value) { - this.kind = kind; - this.start = start; - this.end = end; - this.line = line; - this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - - this.value = value; - this.prev = null; - this.next = null; - } - get [Symbol.toStringTag]() { - return 'Token'; +var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; +function parseCSSVariable(current) { + var match = cssVariableRegex.exec(current); + if (!match) return [,]; + var _a = tslib.__read(match, 3), + token = _a[1], + fallback = _a[2]; + return [token, fallback]; +} +var maxDepth = 4; +function getVariableValue(current, element, depth) { + if (depth === void 0) { + depth = 1; } - toJSON() { - return { - kind: this.kind, - value: this.value, - line: this.line, - column: this.column - }; + heyListen.invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency.")); + var _a = tslib.__read(parseCSSVariable(current), 2), + token = _a[0], + fallback = _a[1]; + // No CSS variable detected + if (!token) return; + // Attempt to read this CSS variable off the element + var resolved = window.getComputedStyle(element).getPropertyValue(token); + if (resolved) { + return resolved.trim(); + } else if (isCSSVariable(fallback)) { + // The fallback might itself be a CSS variable, in which case we attempt to resolve it too. + return getVariableValue(fallback, element, depth + 1); + } else { + return fallback; } } /** - * The list of all possible AST node types. - */ - -/** - * @internal - */ -exports.Token = Token; -const QueryDocumentKeys = { - Name: [], - Document: ['definitions'], - OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'], - VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], - Variable: ['name'], - SelectionSet: ['selections'], - Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], - Argument: ['name', 'value'], - FragmentSpread: ['name', 'directives'], - InlineFragment: ['typeCondition', 'directives', 'selectionSet'], - FragmentDefinition: ['name', - // Note: fragment variable definitions are deprecated and will removed in v17.0.0 - 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'], - IntValue: [], - FloatValue: [], - StringValue: [], - BooleanValue: [], - NullValue: [], - EnumValue: [], - ListValue: ['values'], - ObjectValue: ['fields'], - ObjectField: ['name', 'value'], - Directive: ['name', 'arguments'], - NamedType: ['name'], - ListType: ['type'], - NonNullType: ['type'], - SchemaDefinition: ['description', 'directives', 'operationTypes'], - OperationTypeDefinition: ['type'], - ScalarTypeDefinition: ['description', 'name', 'directives'], - ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], - InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'], - InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - UnionTypeDefinition: ['description', 'name', 'directives', 'types'], - EnumTypeDefinition: ['description', 'name', 'directives', 'values'], - EnumValueDefinition: ['description', 'name', 'directives'], - InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], - DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], - SchemaExtension: ['directives', 'operationTypes'], - ScalarTypeExtension: ['name', 'directives'], - ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - UnionTypeExtension: ['name', 'directives', 'types'], - EnumTypeExtension: ['name', 'directives', 'values'], - InputObjectTypeExtension: ['name', 'directives', 'fields'] -}; -exports.QueryDocumentKeys = QueryDocumentKeys; -const kindValues = new Set(Object.keys(QueryDocumentKeys)); -/** + * Resolve CSS variables from + * * @internal */ - -function isNode(maybeNode) { - const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; - return typeof maybeKind === 'string' && kindValues.has(maybeKind); +function resolveCSSVariables(visualElement, _a, transitionEnd) { + var _b; + var target = tslib.__rest(_a, []); + var element = visualElement.getInstance(); + if (!(element instanceof Element)) return { + target: target, + transitionEnd: transitionEnd + }; + // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd` + // only if they change but I think this reads clearer and this isn't a performance-critical path. + if (transitionEnd) { + transitionEnd = tslib.__assign({}, transitionEnd); + } + // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved + visualElement.forEachValue(function (value) { + var current = value.get(); + if (!isCSSVariable(current)) return; + var resolved = getVariableValue(current, element); + if (resolved) value.set(resolved); + }); + // Cycle through every target property and resolve CSS variables. Currently + // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)` + for (var key in target) { + var current = target[key]; + if (!isCSSVariable(current)) continue; + var resolved = getVariableValue(current, element); + if (!resolved) continue; + // Clone target if it hasn't already been + target[key] = resolved; + // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved + // CSS variable. This will ensure that after the animation the component will reflect + // changes in the value of the CSS variable. + if (transitionEnd) (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : transitionEnd[key] = current; + } + return { + target: target, + transitionEnd: transitionEnd + }; } -/** Name */ - -var OperationTypeNode; -exports.OperationTypeNode = OperationTypeNode; -(function (OperationTypeNode) { - OperationTypeNode['QUERY'] = 'query'; - OperationTypeNode['MUTATION'] = 'mutation'; - OperationTypeNode['SUBSCRIPTION'] = 'subscription'; -})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {})); - -/***/ }), - -/***/ "../../../node_modules/graphql/language/blockString.mjs": -/*!**************************************************************!*\ - !*** ../../../node_modules/graphql/language/blockString.mjs ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.dedentBlockStringLines = dedentBlockStringLines; -exports.isPrintableAsBlockString = isPrintableAsBlockString; -exports.printBlockString = printBlockString; -var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); -/** - * Produces the value of a block string from its parsed raw value, similar to - * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. - * - * This implements the GraphQL spec's BlockStringValue() static algorithm. - * - * @internal - */ - -function dedentBlockStringLines(lines) { - var _firstNonEmptyLine2; - let commonIndent = Number.MAX_SAFE_INTEGER; - let firstNonEmptyLine = null; - let lastNonEmptyLine = -1; - for (let i = 0; i < lines.length; ++i) { - var _firstNonEmptyLine; - const line = lines[i]; - const indent = leadingWhitespace(line); - if (indent === line.length) { - continue; // skip empty lines +var positionalKeys = new Set(["width", "height", "top", "left", "right", "bottom", "x", "y"]); +var isPositionalKey = function (key) { + return positionalKeys.has(key); +}; +var hasPositionalKey = function (target) { + return Object.keys(target).some(isPositionalKey); +}; +var setAndResetVelocity = function (value, to) { + // Looks odd but setting it twice doesn't render, it'll just + // set both prev and current to the latest value + value.set(to, false); + value.set(to); +}; +var isNumOrPxType = function (v) { + return v === styleValueTypes.number || v === styleValueTypes.px; +}; +var BoundingBoxDimension; +(function (BoundingBoxDimension) { + BoundingBoxDimension["width"] = "width"; + BoundingBoxDimension["height"] = "height"; + BoundingBoxDimension["left"] = "left"; + BoundingBoxDimension["right"] = "right"; + BoundingBoxDimension["top"] = "top"; + BoundingBoxDimension["bottom"] = "bottom"; +})(BoundingBoxDimension || (BoundingBoxDimension = {})); +var getPosFromMatrix = function (matrix, pos) { + return parseFloat(matrix.split(", ")[pos]); +}; +var getTranslateFromMatrix = function (pos2, pos3) { + return function (_bbox, _a) { + var transform = _a.transform; + if (transform === "none" || !transform) return 0; + var matrix3d = transform.match(/^matrix3d\((.+)\)$/); + if (matrix3d) { + return getPosFromMatrix(matrix3d[1], pos3); + } else { + var matrix = transform.match(/^matrix\((.+)\)$/); + if (matrix) { + return getPosFromMatrix(matrix[1], pos2); + } else { + return 0; + } } - - firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; - lastNonEmptyLine = i; - if (i !== 0 && indent < commonIndent) { - commonIndent = indent; + }; +}; +var transformKeys = new Set(["x", "y", "z"]); +var nonTranslationalTransformKeys = transformProps.filter(function (key) { + return !transformKeys.has(key); +}); +function removeNonTranslationalTransform(visualElement) { + var removedTransforms = []; + nonTranslationalTransformKeys.forEach(function (key) { + var value = visualElement.getValue(key); + if (value !== undefined) { + removedTransforms.push([key, value.get()]); + value.set(key.startsWith("scale") ? 1 : 0); } - } - return lines // Remove common indentation from all lines but first. - .map((line, i) => i === 0 ? line : line.slice(commonIndent)) // Remove leading and trailing blank lines. - .slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1); + }); + // Apply changes to element before measurement + if (removedTransforms.length) visualElement.syncRender(); + return removedTransforms; } -function leadingWhitespace(str) { - let i = 0; - while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) { - ++i; +var positionalValues = { + // Dimensions + width: function (_a, _b) { + var x = _a.x; + var _c = _b.paddingLeft, + paddingLeft = _c === void 0 ? "0" : _c, + _d = _b.paddingRight, + paddingRight = _d === void 0 ? "0" : _d; + return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight); + }, + height: function (_a, _b) { + var y = _a.y; + var _c = _b.paddingTop, + paddingTop = _c === void 0 ? "0" : _c, + _d = _b.paddingBottom, + paddingBottom = _d === void 0 ? "0" : _d; + return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom); + }, + top: function (_bbox, _a) { + var top = _a.top; + return parseFloat(top); + }, + left: function (_bbox, _a) { + var left = _a.left; + return parseFloat(left); + }, + bottom: function (_a, _b) { + var y = _a.y; + var top = _b.top; + return parseFloat(top) + (y.max - y.min); + }, + right: function (_a, _b) { + var x = _a.x; + var left = _b.left; + return parseFloat(left) + (x.max - x.min); + }, + // Transform + x: getTranslateFromMatrix(4, 13), + y: getTranslateFromMatrix(5, 14) +}; +var convertChangedValueTypes = function (target, visualElement, changedKeys) { + var originBbox = visualElement.measureViewportBox(); + var element = visualElement.getInstance(); + var elementComputedStyle = getComputedStyle(element); + var display = elementComputedStyle.display; + var origin = {}; + // If the element is currently set to display: "none", make it visible before + // measuring the target bounding box + if (display === "none") { + visualElement.setStaticValue("display", target.display || "block"); } - return i; -} -/** - * @internal - */ - -function isPrintableAsBlockString(value) { - if (value === '') { - return true; // empty string is printable + /** + * Record origins before we render and update styles + */ + changedKeys.forEach(function (key) { + origin[key] = positionalValues[key](originBbox, elementComputedStyle); + }); + // Apply the latest values (as set in checkAndConvertChangedValueTypes) + visualElement.syncRender(); + var targetBbox = visualElement.measureViewportBox(); + changedKeys.forEach(function (key) { + // Restore styles to their **calculated computed style**, not their actual + // originally set style. This allows us to animate between equivalent pixel units. + var value = visualElement.getValue(key); + setAndResetVelocity(value, origin[key]); + target[key] = positionalValues[key](targetBbox, elementComputedStyle); + }); + return target; +}; +var checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) { + if (origin === void 0) { + origin = {}; } - - let isEmptyLine = true; - let hasIndent = false; - let hasCommonIndent = true; - let seenNonEmptyLine = false; - for (let i = 0; i < value.length; ++i) { - switch (value.codePointAt(i)) { - case 0x0000: - case 0x0001: - case 0x0002: - case 0x0003: - case 0x0004: - case 0x0005: - case 0x0006: - case 0x0007: - case 0x0008: - case 0x000b: - case 0x000c: - case 0x000e: - case 0x000f: - return false; - // Has non-printable characters - - case 0x000d: - // \r - return false; - // Has \r or \r\n which will be replaced as \n - - case 10: - // \n - if (isEmptyLine && !seenNonEmptyLine) { - return false; // Has leading new line + if (transitionEnd === void 0) { + transitionEnd = {}; + } + target = tslib.__assign({}, target); + transitionEnd = tslib.__assign({}, transitionEnd); + var targetPositionalKeys = Object.keys(target).filter(isPositionalKey); + // We want to remove any transform values that could affect the element's bounding box before + // it's measured. We'll reapply these later. + var removedTransformValues = []; + var hasAttemptedToRemoveTransformValues = false; + var changedValueTypeKeys = []; + targetPositionalKeys.forEach(function (key) { + var value = visualElement.getValue(key); + if (!visualElement.hasValue(key)) return; + var from = origin[key]; + var fromType = findDimensionValueType(from); + var to = target[key]; + var toType; + // TODO: The current implementation of this basically throws an error + // if you try and do value conversion via keyframes. There's probably + // a way of doing this but the performance implications would need greater scrutiny, + // as it'd be doing multiple resize-remeasure operations. + if (isKeyframesTarget(to)) { + var numKeyframes = to.length; + var fromIndex = to[0] === null ? 1 : 0; + from = to[fromIndex]; + fromType = findDimensionValueType(from); + for (var i = fromIndex; i < numKeyframes; i++) { + if (!toType) { + toType = findDimensionValueType(to[i]); + heyListen.invariant(toType === fromType || isNumOrPxType(fromType) && isNumOrPxType(toType), "Keyframes must be of the same dimension as the current value"); + } else { + heyListen.invariant(findDimensionValueType(to[i]) === toType, "All keyframes must be of the same type"); } - - seenNonEmptyLine = true; - isEmptyLine = true; - hasIndent = false; - break; - case 9: // \t - - case 32: - // - hasIndent || (hasIndent = isEmptyLine); - break; - default: - hasCommonIndent && (hasCommonIndent = hasIndent); - isEmptyLine = false; + } + } else { + toType = findDimensionValueType(to); } + if (fromType !== toType) { + // If they're both just number or px, convert them both to numbers rather than + // relying on resize/remeasure to convert (which is wasteful in this situation) + if (isNumOrPxType(fromType) && isNumOrPxType(toType)) { + var current = value.get(); + if (typeof current === "string") { + value.set(parseFloat(current)); + } + if (typeof to === "string") { + target[key] = parseFloat(to); + } else if (Array.isArray(to) && toType === styleValueTypes.px) { + target[key] = to.map(parseFloat); + } + } else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) && (from === 0 || to === 0)) { + // If one or the other value is 0, it's safe to coerce it to the + // type of the other without measurement + if (from === 0) { + value.set(toType.transform(from)); + } else { + target[key] = fromType.transform(to); + } + } else { + // If we're going to do value conversion via DOM measurements, we first + // need to remove non-positional transform values that could affect the bbox measurements. + if (!hasAttemptedToRemoveTransformValues) { + removedTransformValues = removeNonTranslationalTransform(visualElement); + hasAttemptedToRemoveTransformValues = true; + } + changedValueTypeKeys.push(key); + transitionEnd[key] = transitionEnd[key] !== undefined ? transitionEnd[key] : target[key]; + setAndResetVelocity(value, to); + } + } + }); + if (changedValueTypeKeys.length) { + var scrollY_1 = changedValueTypeKeys.indexOf("height") >= 0 ? window.pageYOffset : null; + var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys); + // If we removed transform values, reapply them before the next render + if (removedTransformValues.length) { + removedTransformValues.forEach(function (_a) { + var _b = tslib.__read(_a, 2), + key = _b[0], + value = _b[1]; + visualElement.getValue(key).set(value); + }); + } + // Reapply original values + visualElement.syncRender(); + // Restore scroll position + if (scrollY_1 !== null) window.scrollTo({ + top: scrollY_1 + }); + return { + target: convertedTarget, + transitionEnd: transitionEnd + }; + } else { + return { + target: target, + transitionEnd: transitionEnd + }; } - if (isEmptyLine) { - return false; // Has trailing empty lines - } - - if (hasCommonIndent && seenNonEmptyLine) { - return false; // Has internal indent - } - - return true; -} +}; /** - * Print a block string in the indented block form by adding a leading and - * trailing blank line. However, if a block string starts with whitespace and is - * a single-line, adding a leading blank line would strip that whitespace. + * Convert value types for x/y/width/height/top/left/bottom/right + * + * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'` * * @internal */ - -function printBlockString(value, options) { - const escapedValue = value.replace(/"""/g, '\\"""'); // Expand a block string's raw value into independent lines. - - const lines = escapedValue.split(/\r\n|[\n\r]/g); - const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line - - const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every(line => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line - - const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); // Trailing quote (single or double) or slash forces trailing new line - - const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; - const hasTrailingSlash = value.endsWith('\\'); - const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; - const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && ( - // add leading and trailing new lines only if it improves readability - !isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); - let result = ''; // Format a multi-line block quote to account for leading space. - - const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0)); - if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { - result += '\n'; - } - result += escapedValue; - if (printAsMultipleLines || forceTrailingNewline) { - result += '\n'; - } - return '"""' + result + '"""'; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/language/characterClasses.mjs": -/*!*******************************************************************!*\ - !*** ../../../node_modules/graphql/language/characterClasses.mjs ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isDigit = isDigit; -exports.isLetter = isLetter; -exports.isNameContinue = isNameContinue; -exports.isNameStart = isNameStart; -exports.isWhiteSpace = isWhiteSpace; -/** - * ``` - * WhiteSpace :: - * - "Horizontal Tab (U+0009)" - * - "Space (U+0020)" - * ``` - * @internal - */ -function isWhiteSpace(code) { - return code === 0x0009 || code === 0x0020; -} -/** - * ``` - * Digit :: one of - * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` - * ``` - * @internal - */ - -function isDigit(code) { - return code >= 0x0030 && code <= 0x0039; +function unitConversion(visualElement, target, origin, transitionEnd) { + return hasPositionalKey(target) ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) : { + target: target, + transitionEnd: transitionEnd + }; } -/** - * ``` - * Letter :: one of - * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` - * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z` - * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` - * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z` - * ``` - * @internal - */ -function isLetter(code) { - return code >= 0x0061 && code <= 0x007a || - // A-Z - code >= 0x0041 && code <= 0x005a // a-z - ; -} /** - * ``` - * NameStart :: - * - Letter - * - `_` - * ``` - * @internal + * Parse a DOM variant to make it animatable. This involves resolving CSS variables + * and ensuring animations like "20%" => "calc(50vw)" are performed in pixels. */ - -function isNameStart(code) { - return isLetter(code) || code === 0x005f; +var parseDomVariant = function (visualElement, target, origin, transitionEnd) { + var resolved = resolveCSSVariables(visualElement, target, transitionEnd); + target = resolved.target; + transitionEnd = resolved.transitionEnd; + return unitConversion(visualElement, target, origin, transitionEnd); +}; +function getComputedStyle$1(element) { + return window.getComputedStyle(element); } -/** - * ``` - * NameContinue :: - * - Letter - * - Digit - * - `_` - * ``` - * @internal - */ - -function isNameContinue(code) { - return isLetter(code) || isDigit(code) || code === 0x005f; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/language/directiveLocation.mjs": -/*!********************************************************************!*\ - !*** ../../../node_modules/graphql/language/directiveLocation.mjs ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +var htmlConfig = { + treeType: "dom", + readValueFromInstance: function (domElement, key) { + if (isTransformProp(key)) { + var defaultType = getDefaultValueType(key); + return defaultType ? defaultType.default || 0 : 0; + } else { + var computedStyle = getComputedStyle$1(domElement); + return (isCSSVariable$1(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0; + } + }, + sortNodePosition: function (a, b) { + /** + * compareDocumentPosition returns a bitmask, by using the bitwise & + * we're returning true if 2 in that bitmask is set to true. 2 is set + * to true if b preceeds a. + */ + return a.compareDocumentPosition(b) & 2 ? 1 : -1; + }, + getBaseTarget: function (props, key) { + var _a; + return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key]; + }, + measureViewportBox: function (element, _a) { + var transformPagePoint = _a.transformPagePoint; + return measureViewportBox(element, transformPagePoint); + }, + /** + * Reset the transform on the current Element. This is called as part + * of a batched process across the entire layout tree. To remove this write + * cycle it'd be interesting to see if it's possible to "undo" all the current + * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms + * works + */ + resetTransform: function (element, domElement, props) { + var transformTemplate = props.transformTemplate; + domElement.style.transform = transformTemplate ? transformTemplate({}, "") : "none"; + // Ensure that whatever happens next, we restore our transform on the next frame + element.scheduleRender(); + }, + restoreTransform: function (instance, mutableState) { + instance.style.transform = mutableState.style.transform; + }, + removeValueFromRenderState: function (key, _a) { + var vars = _a.vars, + style = _a.style; + delete vars[key]; + delete style[key]; + }, + /** + * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color` + * can be animated by Motion. + */ + makeTargetAnimatable: function (element, _a, _b, isMounted) { + var transformValues = _b.transformValues; + if (isMounted === void 0) { + isMounted = true; + } + var transition = _a.transition, + transitionEnd = _a.transitionEnd, + target = tslib.__rest(_a, ["transition", "transitionEnd"]); + var origin = getOrigin(target, transition || {}, element); + /** + * If Framer has provided a function to convert `Color` etc value types, convert them + */ + if (transformValues) { + if (transitionEnd) transitionEnd = transformValues(transitionEnd); + if (target) target = transformValues(target); + if (origin) origin = transformValues(origin); + } + if (isMounted) { + checkTargetForNewValues(element, target, origin); + var parsed = parseDomVariant(element, target, origin, transitionEnd); + transitionEnd = parsed.transitionEnd; + target = parsed.target; + } + return tslib.__assign({ + transition: transition, + transitionEnd: transitionEnd + }, target); + }, + scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1, + build: function (element, renderState, latestValues, options, props) { + if (element.isVisible !== undefined) { + renderState.style.visibility = element.isVisible ? "visible" : "hidden"; + } + buildHTMLStyles(renderState, latestValues, options, props.transformTemplate); + }, + render: renderHTML +}; +var htmlVisualElement = visualElement(htmlConfig); +var svgVisualElement = visualElement(tslib.__assign(tslib.__assign({}, htmlConfig), { + getBaseTarget: function (props, key) { + return props[key]; + }, + readValueFromInstance: function (domElement, key) { + var _a; + if (isTransformProp(key)) { + return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0; + } + key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; + return domElement.getAttribute(key); + }, + scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, + build: function (_element, renderState, latestValues, options, props) { + buildSVGAttrs(renderState, latestValues, options, props.transformTemplate); + }, + render: renderSVG })); -exports.DirectiveLocation = void 0; +var createDomVisualElement = function (Component, options) { + return isSVGComponent(Component) ? svgVisualElement(options, { + enableHardwareAcceleration: false + }) : htmlVisualElement(options, { + enableHardwareAcceleration: true + }); +}; +function pixelsToPercent(pixels, axis) { + if (axis.max === axis.min) return 0; + return pixels / (axis.max - axis.min) * 100; +} /** - * The set of allowed directive location values. + * We always correct borderRadius as a percentage rather than pixels to reduce paints. + * For example, if you are projecting a box that is 100px wide with a 10px borderRadius + * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% + * borderRadius in both states. If we animate between the two in pixels that will trigger + * a paint each time. If we animate between the two in percentage we'll avoid a paint. */ -var DirectiveLocation; -exports.DirectiveLocation = DirectiveLocation; -(function (DirectiveLocation) { - DirectiveLocation['QUERY'] = 'QUERY'; - DirectiveLocation['MUTATION'] = 'MUTATION'; - DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION'; - DirectiveLocation['FIELD'] = 'FIELD'; - DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION'; - DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD'; - DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT'; - DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION'; - DirectiveLocation['SCHEMA'] = 'SCHEMA'; - DirectiveLocation['SCALAR'] = 'SCALAR'; - DirectiveLocation['OBJECT'] = 'OBJECT'; - DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION'; - DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION'; - DirectiveLocation['INTERFACE'] = 'INTERFACE'; - DirectiveLocation['UNION'] = 'UNION'; - DirectiveLocation['ENUM'] = 'ENUM'; - DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE'; - DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT'; - DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION'; -})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {})); +var correctBorderRadius = { + correct: function (latest, node) { + if (!node.target) return latest; + /** + * If latest is a string, if it's a percentage we can return immediately as it's + * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. + */ + if (typeof latest === "string") { + if (styleValueTypes.px.test(latest)) { + latest = parseFloat(latest); + } else { + return latest; + } + } + /** + * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that + * pixel value as a percentage of each axis + */ + var x = pixelsToPercent(latest, node.target.x); + var y = pixelsToPercent(latest, node.target.y); + return "".concat(x, "% ").concat(y, "%"); + } +}; +var varToken = "_$css"; +var correctBoxShadow = { + correct: function (latest, _a) { + var treeScale = _a.treeScale, + projectionDelta = _a.projectionDelta; + var original = latest; + /** + * We need to first strip and store CSS variables from the string. + */ + var containsCSSVariables = latest.includes("var("); + var cssVariables = []; + if (containsCSSVariables) { + latest = latest.replace(cssVariableRegex, function (match) { + cssVariables.push(match); + return varToken; + }); + } + var shadow = styleValueTypes.complex.parse(latest); + // TODO: Doesn't support multiple shadows + if (shadow.length > 5) return original; + var template = styleValueTypes.complex.createTransformer(latest); + var offset = typeof shadow[0] !== "number" ? 1 : 0; + // Calculate the overall context scale + var xScale = projectionDelta.x.scale * treeScale.x; + var yScale = projectionDelta.y.scale * treeScale.y; + shadow[0 + offset] /= xScale; + shadow[1 + offset] /= yScale; + /** + * Ideally we'd correct x and y scales individually, but because blur and + * spread apply to both we have to take a scale average and apply that instead. + * We could potentially improve the outcome of this by incorporating the ratio between + * the two scales. + */ + var averageScale = popmotion.mix(xScale, yScale, 0.5); + // Blur + if (typeof shadow[2 + offset] === "number") shadow[2 + offset] /= averageScale; + // Spread + if (typeof shadow[3 + offset] === "number") shadow[3 + offset] /= averageScale; + var output = template(shadow); + if (containsCSSVariables) { + var i_1 = 0; + output = output.replace(varToken, function () { + var cssVariable = cssVariables[i_1]; + i_1++; + return cssVariable; + }); + } + return output; + } +}; +var MeasureLayoutWithContext = /** @class */function (_super) { + tslib.__extends(MeasureLayoutWithContext, _super); + function MeasureLayoutWithContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * This only mounts projection nodes for components that + * need measuring, we might want to do it for all components + * in order to incorporate transforms + */ + MeasureLayoutWithContext.prototype.componentDidMount = function () { + var _this = this; + var _a = this.props, + visualElement = _a.visualElement, + layoutGroup = _a.layoutGroup, + switchLayoutGroup = _a.switchLayoutGroup, + layoutId = _a.layoutId; + var projection = visualElement.projection; + addScaleCorrector(defaultScaleCorrectors); + if (projection) { + if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.add(projection); + if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) { + switchLayoutGroup.register(projection); + } + projection.root.didUpdate(); + projection.addEventListener("animationComplete", function () { + _this.safeToRemove(); + }); + projection.setOptions(tslib.__assign(tslib.__assign({}, projection.options), { + onExitComplete: function () { + return _this.safeToRemove(); + } + })); + } + globalProjectionState.hasEverUpdated = true; + }; + MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) { + var _this = this; + var _a = this.props, + layoutDependency = _a.layoutDependency, + visualElement = _a.visualElement, + drag = _a.drag, + isPresent = _a.isPresent; + var projection = visualElement.projection; + if (!projection) return null; + /** + * TODO: We use this data in relegate to determine whether to + * promote a previous element. There's no guarantee its presence data + * will have updated by this point - if a bug like this arises it will + * have to be that we markForRelegation and then find a new lead some other way, + * perhaps in didUpdate + */ + projection.isPresent = isPresent; + if (drag || prevProps.layoutDependency !== layoutDependency || layoutDependency === undefined) { + projection.willUpdate(); + } else { + this.safeToRemove(); + } + if (prevProps.isPresent !== isPresent) { + if (isPresent) { + projection.promote(); + } else if (!projection.relegate()) { + /** + * If there's another stack member taking over from this one, + * it's in charge of the exit animation and therefore should + * be in charge of the safe to remove. Otherwise we call it here. + */ + sync__default["default"].postRender(function () { + var _a; + if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) { + _this.safeToRemove(); + } + }); + } + } + return null; + }; + MeasureLayoutWithContext.prototype.componentDidUpdate = function () { + var projection = this.props.visualElement.projection; + if (projection) { + projection.root.didUpdate(); + if (!projection.currentAnimation && projection.isLead()) { + this.safeToRemove(); + } + } + }; + MeasureLayoutWithContext.prototype.componentWillUnmount = function () { + var _a = this.props, + visualElement = _a.visualElement, + layoutGroup = _a.layoutGroup, + promoteContext = _a.switchLayoutGroup; + var projection = visualElement.projection; + if (projection) { + projection.scheduleCheckAfterUnmount(); + if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.remove(projection); + if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister) promoteContext.deregister(projection); + } + }; + MeasureLayoutWithContext.prototype.safeToRemove = function () { + var safeToRemove = this.props.safeToRemove; + safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove(); + }; + MeasureLayoutWithContext.prototype.render = function () { + return null; + }; + return MeasureLayoutWithContext; +}(React__default["default"].Component); +function MeasureLayout(props) { + var _a = tslib.__read(usePresence(), 2), + isPresent = _a[0], + safeToRemove = _a[1]; + var layoutGroup = React.useContext(LayoutGroupContext); + return React__default["default"].createElement(MeasureLayoutWithContext, tslib.__assign({}, props, { + layoutGroup: layoutGroup, + switchLayoutGroup: React.useContext(SwitchLayoutGroupContext), + isPresent: isPresent, + safeToRemove: safeToRemove + })); +} +var defaultScaleCorrectors = { + borderRadius: tslib.__assign(tslib.__assign({}, correctBorderRadius), { + applyTo: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"] + }), + borderTopLeftRadius: correctBorderRadius, + borderTopRightRadius: correctBorderRadius, + borderBottomLeftRadius: correctBorderRadius, + borderBottomRightRadius: correctBorderRadius, + boxShadow: correctBoxShadow +}; +var layoutFeatures = { + measureLayout: MeasureLayout +}; /** - * The enum type representing the directive location values. + * Animate a single value or a `MotionValue`. * - * @deprecated Please use `DirectiveLocation`. Will be remove in v17. + * The first argument is either a `MotionValue` to animate, or an initial animation value. + * + * The second is either a value to animate to, or an array of keyframes to animate through. + * + * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`. + * + * Returns `AnimationPlaybackControls`, currently just a `stop` method. + * + * ```javascript + * const x = useMotionValue(0) + * + * useEffect(() => { + * const controls = animate(x, 100, { + * type: "spring", + * stiffness: 2000, + * onComplete: v => {} + * }) + * + * return controls.stop + * }) + * ``` + * + * @public */ - -/***/ }), - -/***/ "../../../node_modules/graphql/language/index.mjs": -/*!********************************************************!*\ - !*** ../../../node_modules/graphql/language/index.mjs ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "BREAK", ({ - enumerable: true, - get: function () { - return _visitor.BREAK; - } -})); -Object.defineProperty(exports, "DirectiveLocation", ({ - enumerable: true, - get: function () { - return _directiveLocation.DirectiveLocation; - } -})); -Object.defineProperty(exports, "Kind", ({ - enumerable: true, - get: function () { - return _kinds.Kind; - } -})); -Object.defineProperty(exports, "Lexer", ({ - enumerable: true, - get: function () { - return _lexer.Lexer; - } -})); -Object.defineProperty(exports, "Location", ({ - enumerable: true, - get: function () { - return _ast.Location; +function animate(from, to, transition) { + if (transition === void 0) { + transition = {}; } -})); -Object.defineProperty(exports, "OperationTypeNode", ({ - enumerable: true, - get: function () { - return _ast.OperationTypeNode; + var value = isMotionValue(from) ? from : motionValue(from); + startAnimation("", value, to, transition); + return { + stop: function () { + return value.stop(); + }, + isAnimating: function () { + return value.isAnimating(); + } + }; +} +var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"]; +var numBorders = borders.length; +var asNumber = function (value) { + return typeof value === "string" ? parseFloat(value) : value; +}; +var isPx = function (value) { + return typeof value === "number" || styleValueTypes.px.test(value); +}; +function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { + var _a, _b, _c, _d; + if (shouldCrossfadeOpacity) { + target.opacity = popmotion.mix(0, + // (follow?.opacity as number) ?? 0, + // TODO Reinstate this if only child + (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress)); + target.opacityExit = popmotion.mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress)); + } else if (isOnlyMember) { + target.opacity = popmotion.mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress); } -})); -Object.defineProperty(exports, "Source", ({ - enumerable: true, - get: function () { - return _source.Source; + /** + * Mix border radius + */ + for (var i = 0; i < numBorders; i++) { + var borderLabel = "border".concat(borders[i], "Radius"); + var followRadius = getRadius(follow, borderLabel); + var leadRadius = getRadius(lead, borderLabel); + if (followRadius === undefined && leadRadius === undefined) continue; + followRadius || (followRadius = 0); + leadRadius || (leadRadius = 0); + var canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius); + if (canMix) { + target[borderLabel] = Math.max(popmotion.mix(asNumber(followRadius), asNumber(leadRadius), progress), 0); + if (styleValueTypes.percent.test(leadRadius) || styleValueTypes.percent.test(followRadius)) { + target[borderLabel] += "%"; + } + } else { + target[borderLabel] = leadRadius; + } } -})); -Object.defineProperty(exports, "Token", ({ - enumerable: true, - get: function () { - return _ast.Token; + /** + * Mix rotation + */ + if (follow.rotate || lead.rotate) { + target.rotate = popmotion.mix(follow.rotate || 0, lead.rotate || 0, progress); } -})); -Object.defineProperty(exports, "TokenKind", ({ - enumerable: true, - get: function () { - return _tokenKind.TokenKind; - } -})); -Object.defineProperty(exports, "getEnterLeaveForKind", ({ - enumerable: true, - get: function () { - return _visitor.getEnterLeaveForKind; - } -})); -Object.defineProperty(exports, "getLocation", ({ - enumerable: true, - get: function () { - return _location.getLocation; - } -})); -Object.defineProperty(exports, "getVisitFn", ({ - enumerable: true, - get: function () { - return _visitor.getVisitFn; - } -})); -Object.defineProperty(exports, "isConstValueNode", ({ - enumerable: true, - get: function () { - return _predicates.isConstValueNode; - } -})); -Object.defineProperty(exports, "isDefinitionNode", ({ - enumerable: true, - get: function () { - return _predicates.isDefinitionNode; - } -})); -Object.defineProperty(exports, "isExecutableDefinitionNode", ({ - enumerable: true, - get: function () { - return _predicates.isExecutableDefinitionNode; - } -})); -Object.defineProperty(exports, "isSelectionNode", ({ - enumerable: true, - get: function () { - return _predicates.isSelectionNode; - } -})); -Object.defineProperty(exports, "isTypeDefinitionNode", ({ - enumerable: true, - get: function () { - return _predicates.isTypeDefinitionNode; - } -})); -Object.defineProperty(exports, "isTypeExtensionNode", ({ - enumerable: true, - get: function () { - return _predicates.isTypeExtensionNode; - } -})); -Object.defineProperty(exports, "isTypeNode", ({ - enumerable: true, - get: function () { - return _predicates.isTypeNode; - } -})); -Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ - enumerable: true, - get: function () { - return _predicates.isTypeSystemDefinitionNode; - } -})); -Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ - enumerable: true, - get: function () { - return _predicates.isTypeSystemExtensionNode; - } -})); -Object.defineProperty(exports, "isValueNode", ({ - enumerable: true, - get: function () { - return _predicates.isValueNode; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parser.parse; - } -})); -Object.defineProperty(exports, "parseConstValue", ({ - enumerable: true, - get: function () { - return _parser.parseConstValue; - } -})); -Object.defineProperty(exports, "parseType", ({ - enumerable: true, - get: function () { - return _parser.parseType; - } -})); -Object.defineProperty(exports, "parseValue", ({ - enumerable: true, - get: function () { - return _parser.parseValue; - } -})); -Object.defineProperty(exports, "print", ({ - enumerable: true, - get: function () { - return _printer.print; - } -})); -Object.defineProperty(exports, "printLocation", ({ - enumerable: true, - get: function () { - return _printLocation.printLocation; - } -})); -Object.defineProperty(exports, "printSourceLocation", ({ - enumerable: true, - get: function () { - return _printLocation.printSourceLocation; - } -})); -Object.defineProperty(exports, "visit", ({ - enumerable: true, - get: function () { - return _visitor.visit; - } -})); -Object.defineProperty(exports, "visitInParallel", ({ - enumerable: true, - get: function () { - return _visitor.visitInParallel; - } -})); -var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs"); -var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs"); -var _printLocation = __webpack_require__(/*! ./printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs"); -var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); -var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); -var _parser = __webpack_require__(/*! ./parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); -var _printer = __webpack_require__(/*! ./printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); -var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _predicates = __webpack_require__(/*! ./predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); -var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); - -/***/ }), - -/***/ "../../../node_modules/graphql/language/kinds.mjs": -/*!********************************************************!*\ - !*** ../../../node_modules/graphql/language/kinds.mjs ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - +} +function getRadius(values, radiusName) { + var _a; + return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius; +} +// /** +// * We only want to mix the background color if there's a follow element +// * that we're not crossfading opacity between. For instance with switch +// * AnimateSharedLayout animations, this helps the illusion of a continuous +// * element being animated but also cuts down on the number of paints triggered +// * for elements where opacity is doing that work for us. +// */ +// if ( +// !hasFollowElement && +// latestLeadValues.backgroundColor && +// latestFollowValues.backgroundColor +// ) { +// /** +// * This isn't ideal performance-wise as mixColor is creating a new function every frame. +// * We could probably create a mixer that runs at the start of the animation but +// * the idea behind the crossfader is that it runs dynamically between two potentially +// * changing targets (ie opacity or borderRadius may be animating independently via variants) +// */ +// leadState.backgroundColor = followState.backgroundColor = mixColor( +// latestFollowValues.backgroundColor as string, +// latestLeadValues.backgroundColor as string +// )(p) +// } +var easeCrossfadeIn = compress(0, 0.5, popmotion.circOut); +var easeCrossfadeOut = compress(0.5, 0.95, popmotion.linear); +function compress(min, max, easing) { + return function (p) { + // Could replace ifs with clamp + if (p < min) return 0; + if (p > max) return 1; + return easing(popmotion.progress(min, max, p)); + }; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.Kind = void 0; /** - * The set of allowed kind values for AST nodes. + * Reset an axis to the provided origin box. + * + * This is a mutative operation. */ -var Kind; -exports.Kind = Kind; -(function (Kind) { - Kind['NAME'] = 'Name'; - Kind['DOCUMENT'] = 'Document'; - Kind['OPERATION_DEFINITION'] = 'OperationDefinition'; - Kind['VARIABLE_DEFINITION'] = 'VariableDefinition'; - Kind['SELECTION_SET'] = 'SelectionSet'; - Kind['FIELD'] = 'Field'; - Kind['ARGUMENT'] = 'Argument'; - Kind['FRAGMENT_SPREAD'] = 'FragmentSpread'; - Kind['INLINE_FRAGMENT'] = 'InlineFragment'; - Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition'; - Kind['VARIABLE'] = 'Variable'; - Kind['INT'] = 'IntValue'; - Kind['FLOAT'] = 'FloatValue'; - Kind['STRING'] = 'StringValue'; - Kind['BOOLEAN'] = 'BooleanValue'; - Kind['NULL'] = 'NullValue'; - Kind['ENUM'] = 'EnumValue'; - Kind['LIST'] = 'ListValue'; - Kind['OBJECT'] = 'ObjectValue'; - Kind['OBJECT_FIELD'] = 'ObjectField'; - Kind['DIRECTIVE'] = 'Directive'; - Kind['NAMED_TYPE'] = 'NamedType'; - Kind['LIST_TYPE'] = 'ListType'; - Kind['NON_NULL_TYPE'] = 'NonNullType'; - Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition'; - Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition'; - Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition'; - Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition'; - Kind['FIELD_DEFINITION'] = 'FieldDefinition'; - Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition'; - Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition'; - Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition'; - Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition'; - Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition'; - Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition'; - Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition'; - Kind['SCHEMA_EXTENSION'] = 'SchemaExtension'; - Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension'; - Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension'; - Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension'; - Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension'; - Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension'; - Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension'; -})(Kind || (exports.Kind = Kind = {})); - +function copyAxisInto(axis, originAxis) { + axis.min = originAxis.min; + axis.max = originAxis.max; +} /** - * The enum type representing the possible kind values of AST nodes. + * Reset a box to the provided origin box. * - * @deprecated Please use `Kind`. Will be remove in v17. + * This is a mutative operation. */ +function copyBoxInto(box, originBox) { + copyAxisInto(box.x, originBox.x); + copyAxisInto(box.y, originBox.y); +} -/***/ }), - -/***/ "../../../node_modules/graphql/language/lexer.mjs": -/*!********************************************************!*\ - !*** ../../../node_modules/graphql/language/lexer.mjs ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.Lexer = void 0; -exports.isPunctuatorTokenKind = isPunctuatorTokenKind; -var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs"); -var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); -var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); -var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); /** - * Given a Source object, creates a Lexer for that source. - * A Lexer is a stateful stream generator in that every time - * it is advanced, it returns the next token in the Source. Assuming the - * source lexes, the final Token emitted by the lexer will be of kind - * EOF, after which the lexer will repeatedly return the same EOF token - * whenever called. + * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse */ - -class Lexer { - /** - * The previously focused non-ignored token. - */ - - /** - * The currently focused non-ignored token. - */ - - /** - * The (1-indexed) line containing the current token. - */ - - /** - * The character offset at which the current line begins. - */ - constructor(source) { - const startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0); - this.source = source; - this.lastToken = startOfFileToken; - this.token = startOfFileToken; - this.line = 1; - this.lineStart = 0; +function removePointDelta(point, translate, scale, originPoint, boxScale) { + point -= translate; + point = scalePoint(point, 1 / scale, originPoint); + if (boxScale !== undefined) { + point = scalePoint(point, 1 / boxScale, originPoint); } - get [Symbol.toStringTag]() { - return 'Lexer'; + return point; +} +/** + * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse + */ +function removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) { + if (translate === void 0) { + translate = 0; } - /** - * Advances the token stream to the next non-ignored token. - */ - - advance() { - this.lastToken = this.token; - const token = this.token = this.lookahead(); - return token; + if (scale === void 0) { + scale = 1; } - /** - * Looks ahead and returns the next non-ignored token, but does not change - * the state of Lexer. - */ - - lookahead() { - let token = this.token; - if (token.kind !== _tokenKind.TokenKind.EOF) { - do { - if (token.next) { - token = token.next; - } else { - // Read the next token and form a link in the token linked-list. - const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing. - - token.next = nextToken; // @ts-expect-error prev is only mutable during parsing. - - nextToken.prev = token; - token = nextToken; - } - } while (token.kind === _tokenKind.TokenKind.COMMENT); - } - return token; + if (origin === void 0) { + origin = 0.5; + } + if (originAxis === void 0) { + originAxis = axis; + } + if (sourceAxis === void 0) { + sourceAxis = axis; + } + if (styleValueTypes.percent.test(translate)) { + translate = parseFloat(translate); + var relativeProgress = popmotion.mix(sourceAxis.min, sourceAxis.max, translate / 100); + translate = relativeProgress - sourceAxis.min; } + if (typeof translate !== "number") return; + var originPoint = popmotion.mix(originAxis.min, originAxis.max, origin); + if (axis === originAxis) originPoint -= translate; + axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); + axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); } /** - * @internal + * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse + * and acts as a bridge between motion values and removeAxisDelta */ -exports.Lexer = Lexer; -function isPunctuatorTokenKind(kind) { - return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tokenKind.TokenKind.COLON || kind === _tokenKind.TokenKind.EQUALS || kind === _tokenKind.TokenKind.AT || kind === _tokenKind.TokenKind.BRACKET_L || kind === _tokenKind.TokenKind.BRACKET_R || kind === _tokenKind.TokenKind.BRACE_L || kind === _tokenKind.TokenKind.PIPE || kind === _tokenKind.TokenKind.BRACE_R; +function removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) { + var _b = tslib.__read(_a, 3), + key = _b[0], + scaleKey = _b[1], + originKey = _b[2]; + removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); } /** - * A Unicode scalar value is any Unicode code point except surrogate code - * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and - * 0xE000 to 0x10FFFF. - * - * SourceCharacter :: - * - "Any Unicode scalar value" + * The names of the motion values we want to apply as translation, scale and origin. */ - -function isUnicodeScalarValue(code) { - return code >= 0x0000 && code <= 0xd7ff || code >= 0xe000 && code <= 0x10ffff; -} +var xKeys = ["x", "scaleX", "originX"]; +var yKeys = ["y", "scaleY", "originY"]; /** - * The GraphQL specification defines source text as a sequence of unicode scalar - * values (which Unicode defines to exclude surrogate code points). However - * JavaScript defines strings as a sequence of UTF-16 code units which may - * include surrogates. A surrogate pair is a valid source character as it - * encodes a supplementary code point (above U+FFFF), but unpaired surrogate - * code points are not valid source characters. + * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse + * and acts as a bridge between motion values and removeAxisDelta */ - -function isSupplementaryCodePoint(body, location) { - return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1)); -} -function isLeadingSurrogate(code) { - return code >= 0xd800 && code <= 0xdbff; +function removeBoxTransforms(box, transforms, originBox, sourceBox) { + removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x); + removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y); } -function isTrailingSurrogate(code) { - return code >= 0xdc00 && code <= 0xdfff; +function isAxisDeltaZero(delta) { + return delta.translate === 0 && delta.scale === 1; } -/** - * Prints the code point (or end of file reference) at a given location in a - * source for use in error messages. - * - * Printable ASCII is printed quoted, while other points are printed in Unicode - * code point form (ie. U+1234). - */ - -function printCodePointAt(lexer, location) { - const code = lexer.source.body.codePointAt(location); - if (code === undefined) { - return _tokenKind.TokenKind.EOF; - } else if (code >= 0x0020 && code <= 0x007e) { - // Printable ASCII - const char = String.fromCodePoint(code); - return char === '"' ? "'\"'" : `"${char}"`; - } // Unicode code point - - return 'U+' + code.toString(16).toUpperCase().padStart(4, '0'); +function isDeltaZero(delta) { + return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); } -/** - * Create a token with line and column location information. - */ - -function createToken(lexer, kind, start, end, value) { - const line = lexer.line; - const col = 1 + start - lexer.lineStart; - return new _ast.Token(kind, start, end, line, col, value); +function boxEquals(a, b) { + return a.x.min === b.x.min && a.x.max === b.x.max && a.y.min === b.y.min && a.y.max === b.y.max; } -/** - * Gets the next token from the source starting at the given position. - * - * This skips over whitespace until it finds the next lexable token, then lexes - * punctuators immediately or calls the appropriate helper function for more - * complicated tokens. - */ - -function readNextToken(lexer, start) { - const body = lexer.source.body; - const bodyLength = body.length; - let position = start; - while (position < bodyLength) { - const code = body.charCodeAt(position); // SourceCharacter - - switch (code) { - // Ignored :: - // - UnicodeBOM - // - WhiteSpace - // - LineTerminator - // - Comment - // - Comma - // - // UnicodeBOM :: "Byte Order Mark (U+FEFF)" - // - // WhiteSpace :: - // - "Horizontal Tab (U+0009)" - // - "Space (U+0020)" - // - // Comma :: , - case 0xfeff: // - - case 0x0009: // \t - - case 0x0020: // - - case 0x002c: - // , - ++position; - continue; - // LineTerminator :: - // - "New Line (U+000A)" - // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"] - // - "Carriage Return (U+000D)" "New Line (U+000A)" - - case 0x000a: - // \n - ++position; - ++lexer.line; - lexer.lineStart = position; - continue; - case 0x000d: - // \r - if (body.charCodeAt(position + 1) === 0x000a) { - position += 2; - } else { - ++position; - } - ++lexer.line; - lexer.lineStart = position; - continue; - // Comment - - case 0x0023: - // # - return readComment(lexer, position); - // Token :: - // - Punctuator - // - Name - // - IntValue - // - FloatValue - // - StringValue - // - // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | } - - case 0x0021: - // ! - return createToken(lexer, _tokenKind.TokenKind.BANG, position, position + 1); - case 0x0024: - // $ - return createToken(lexer, _tokenKind.TokenKind.DOLLAR, position, position + 1); - case 0x0026: - // & - return createToken(lexer, _tokenKind.TokenKind.AMP, position, position + 1); - case 0x0028: - // ( - return createToken(lexer, _tokenKind.TokenKind.PAREN_L, position, position + 1); - case 0x0029: - // ) - return createToken(lexer, _tokenKind.TokenKind.PAREN_R, position, position + 1); - case 0x002e: - // . - if (body.charCodeAt(position + 1) === 0x002e && body.charCodeAt(position + 2) === 0x002e) { - return createToken(lexer, _tokenKind.TokenKind.SPREAD, position, position + 3); - } +var NodeStack = /** @class */function () { + function NodeStack() { + this.members = []; + } + NodeStack.prototype.add = function (node) { + addUniqueItem(this.members, node); + node.scheduleRender(); + }; + NodeStack.prototype.remove = function (node) { + removeItem(this.members, node); + if (node === this.prevLead) { + this.prevLead = undefined; + } + if (node === this.lead) { + var prevLead = this.members[this.members.length - 1]; + if (prevLead) { + this.promote(prevLead); + } + } + }; + NodeStack.prototype.relegate = function (node) { + var indexOfNode = this.members.findIndex(function (member) { + return node === member; + }); + if (indexOfNode === 0) return false; + /** + * Find the next projection node that is present + */ + var prevLead; + for (var i = indexOfNode; i >= 0; i--) { + var member = this.members[i]; + if (member.isPresent !== false) { + prevLead = member; break; - case 0x003a: - // : - return createToken(lexer, _tokenKind.TokenKind.COLON, position, position + 1); - case 0x003d: - // = - return createToken(lexer, _tokenKind.TokenKind.EQUALS, position, position + 1); - case 0x0040: - // @ - return createToken(lexer, _tokenKind.TokenKind.AT, position, position + 1); - case 0x005b: - // [ - return createToken(lexer, _tokenKind.TokenKind.BRACKET_L, position, position + 1); - case 0x005d: - // ] - return createToken(lexer, _tokenKind.TokenKind.BRACKET_R, position, position + 1); - case 0x007b: - // { - return createToken(lexer, _tokenKind.TokenKind.BRACE_L, position, position + 1); - case 0x007c: - // | - return createToken(lexer, _tokenKind.TokenKind.PIPE, position, position + 1); - case 0x007d: - // } - return createToken(lexer, _tokenKind.TokenKind.BRACE_R, position, position + 1); - // StringValue - - case 0x0022: - // " - if (body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) { - return readBlockString(lexer, position); - } - return readString(lexer, position); - } // IntValue | FloatValue (Digit | -) - - if ((0, _characterClasses.isDigit)(code) || code === 0x002d) { - return readNumber(lexer, position, code); - } // Name - - if ((0, _characterClasses.isNameStart)(code)) { - return readName(lexer, position); + } } - throw (0, _syntaxError.syntaxError)(lexer.source, position, code === 0x0027 ? 'Unexpected single quote character (\'), did you mean to use a double quote (")?' : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`); - } - return createToken(lexer, _tokenKind.TokenKind.EOF, bodyLength, bodyLength); -} -/** - * Reads a comment token from the source file. - * - * ``` - * Comment :: # CommentChar* [lookahead != CommentChar] - * - * CommentChar :: SourceCharacter but not LineTerminator - * ``` - */ - -function readComment(lexer, start) { - const body = lexer.source.body; - const bodyLength = body.length; - let position = start + 1; - while (position < bodyLength) { - const code = body.charCodeAt(position); // LineTerminator (\n | \r) - - if (code === 0x000a || code === 0x000d) { - break; - } // SourceCharacter - - if (isUnicodeScalarValue(code)) { - ++position; - } else if (isSupplementaryCodePoint(body, position)) { - position += 2; + if (prevLead) { + this.promote(prevLead); + return true; } else { - break; + return false; } - } - return createToken(lexer, _tokenKind.TokenKind.COMMENT, start, position, body.slice(start + 1, position)); -} -/** - * Reads a number token from the source file, either a FloatValue or an IntValue - * depending on whether a FractionalPart or ExponentPart is encountered. - * - * ``` - * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}] - * - * IntegerPart :: - * - NegativeSign? 0 - * - NegativeSign? NonZeroDigit Digit* - * - * NegativeSign :: - - * - * NonZeroDigit :: Digit but not `0` - * - * FloatValue :: - * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}] - * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}] - * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}] - * - * FractionalPart :: . Digit+ - * - * ExponentPart :: ExponentIndicator Sign? Digit+ - * - * ExponentIndicator :: one of `e` `E` - * - * Sign :: one of + - - * ``` - */ - -function readNumber(lexer, start, firstCode) { - const body = lexer.source.body; - let position = start; - let code = firstCode; - let isFloat = false; // NegativeSign (-) - - if (code === 0x002d) { - code = body.charCodeAt(++position); - } // Zero (0) - - if (code === 0x0030) { - code = body.charCodeAt(++position); - if ((0, _characterClasses.isDigit)(code)) { - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, unexpected digit after 0: ${printCodePointAt(lexer, position)}.`); + }; + NodeStack.prototype.promote = function (node, preserveFollowOpacity) { + var _a; + var prevLead = this.lead; + if (node === prevLead) return; + this.prevLead = prevLead; + this.lead = node; + node.show(); + if (prevLead) { + prevLead.instance && prevLead.scheduleRender(); + node.scheduleRender(); + node.resumeFrom = prevLead; + if (preserveFollowOpacity) { + node.resumeFrom.preserveOpacity = true; + } + if (prevLead.snapshot) { + node.snapshot = prevLead.snapshot; + node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues; + node.snapshot.isShared = true; + } + if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) { + node.isLayoutDirty = true; + } + var crossfade = node.options.crossfade; + if (crossfade === false) { + prevLead.hide(); + } + /** + * TODO: + * - Test border radius when previous node was deleted + * - boxShadow mixing + * - Shared between element A in scrolled container and element B (scroll stays the same or changes) + * - Shared between element A in transformed container and element B (transform stays the same or changes) + * - Shared between element A in scrolled page and element B (scroll stays the same or changes) + * --- + * - Crossfade opacity of root nodes + * - layoutId changes after animation + * - layoutId changes mid animation + */ } - } else { - position = readDigits(lexer, position, code); - code = body.charCodeAt(position); - } // Full stop (.) - - if (code === 0x002e) { - isFloat = true; - code = body.charCodeAt(++position); - position = readDigits(lexer, position, code); - code = body.charCodeAt(position); - } // E e - - if (code === 0x0045 || code === 0x0065) { - isFloat = true; - code = body.charCodeAt(++position); // + - - - if (code === 0x002b || code === 0x002d) { - code = body.charCodeAt(++position); + }; + NodeStack.prototype.exitAnimationComplete = function () { + this.members.forEach(function (node) { + var _a, _b, _c, _d, _e; + (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a); + (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d); + }); + }; + NodeStack.prototype.scheduleRender = function () { + this.members.forEach(function (node) { + node.instance && node.scheduleRender(false); + }); + }; + /** + * Clear any leads that have been removed this render to prevent them from being + * used in future animations and to prevent memory leaks + */ + NodeStack.prototype.removeLeadSnapshot = function () { + if (this.lead && this.lead.snapshot) { + this.lead.snapshot = undefined; } - position = readDigits(lexer, position, code); - code = body.charCodeAt(position); - } // Numbers cannot be followed by . or NameStart - - if (code === 0x002e || (0, _characterClasses.isNameStart)(code)) { - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, expected digit but got: ${printCodePointAt(lexer, position)}.`); + }; + return NodeStack; +}(); +var identityProjection = "translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"; +function buildProjectionTransform(delta, treeScale, latestTransform) { + /** + * The translations we use to calculate are always relative to the viewport coordinate space. + * But when we apply scales, we also scale the coordinate space of an element and its children. + * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need + * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. + */ + var xTranslate = delta.x.translate / treeScale.x; + var yTranslate = delta.y.translate / treeScale.y; + var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) "); + /** + * Apply scale correction for the tree transform. + * This will apply scale to the screen-orientated axes. + */ + transform += "scale(".concat(1 / treeScale.x, ", ").concat(1 / treeScale.y, ") "); + if (latestTransform) { + var rotate = latestTransform.rotate, + rotateX = latestTransform.rotateX, + rotateY = latestTransform.rotateY; + if (rotate) transform += "rotate(".concat(rotate, "deg) "); + if (rotateX) transform += "rotateX(".concat(rotateX, "deg) "); + if (rotateY) transform += "rotateY(".concat(rotateY, "deg) "); } - return createToken(lexer, isFloat ? _tokenKind.TokenKind.FLOAT : _tokenKind.TokenKind.INT, start, position, body.slice(start, position)); + /** + * Apply scale to match the size of the element to the size we want it. + * This will apply scale to the element-orientated axes. + */ + var elementScaleX = delta.x.scale * treeScale.x; + var elementScaleY = delta.y.scale * treeScale.y; + transform += "scale(".concat(elementScaleX, ", ").concat(elementScaleY, ")"); + return transform === identityProjection ? "none" : transform; } -/** - * Returns the new position in the source after reading one or more digits. - */ - -function readDigits(lexer, start, firstCode) { - if (!(0, _characterClasses.isDigit)(firstCode)) { - throw (0, _syntaxError.syntaxError)(lexer.source, start, `Invalid number, expected digit but got: ${printCodePointAt(lexer, start)}.`); +var compareByDepth = function (a, b) { + return a.depth - b.depth; +}; +var FlatTree = /** @class */function () { + function FlatTree() { + this.children = []; + this.isDirty = false; } - const body = lexer.source.body; - let position = start + 1; // +1 to skip first firstCode + FlatTree.prototype.add = function (child) { + addUniqueItem(this.children, child); + this.isDirty = true; + }; + FlatTree.prototype.remove = function (child) { + removeItem(this.children, child); + this.isDirty = true; + }; + FlatTree.prototype.forEach = function (callback) { + this.isDirty && this.children.sort(compareByDepth); + this.isDirty = false; + this.children.forEach(callback); + }; + return FlatTree; +}(); - while ((0, _characterClasses.isDigit)(body.charCodeAt(position))) { - ++position; - } - return position; -} /** - * Reads a single-quote string token from the source file. - * - * ``` - * StringValue :: - * - `""` [lookahead != `"`] - * - `"` StringCharacter+ `"` - * - * StringCharacter :: - * - SourceCharacter but not `"` or `\` or LineTerminator - * - `\u` EscapedUnicode - * - `\` EscapedCharacter - * - * EscapedUnicode :: - * - `{` HexDigit+ `}` - * - HexDigit HexDigit HexDigit HexDigit - * - * EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t` - * ``` + * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 + * which has a noticeable difference in spring animations */ - -function readString(lexer, start) { - const body = lexer.source.body; - const bodyLength = body.length; - let position = start + 1; - let chunkStart = position; - let value = ''; - while (position < bodyLength) { - const code = body.charCodeAt(position); // Closing Quote (") - - if (code === 0x0022) { - value += body.slice(chunkStart, position); - return createToken(lexer, _tokenKind.TokenKind.STRING, start, position + 1, value); - } // Escape Sequence (\) - - if (code === 0x005c) { - value += body.slice(chunkStart, position); - const escape = body.charCodeAt(position + 1) === 0x0075 // u - ? body.charCodeAt(position + 2) === 0x007b // { - ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position); - value += escape.value; - position += escape.size; - chunkStart = position; - continue; - } // LineTerminator (\n | \r) - - if (code === 0x000a || code === 0x000d) { - break; - } // SourceCharacter - - if (isUnicodeScalarValue(code)) { - ++position; - } else if (isSupplementaryCodePoint(body, position)) { - position += 2; - } else { - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`); - } - } - throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.'); -} // The string value and lexed size of an escape sequence. - -function readEscapedUnicodeVariableWidth(lexer, position) { - const body = lexer.source.body; - let point = 0; - let size = 3; // Cannot be larger than 12 chars (\u{00000000}). - - while (size < 12) { - const code = body.charCodeAt(position + size++); // Closing Brace (}) - - if (code === 0x007d) { - // Must be at least 5 chars (\u{0}) and encode a Unicode scalar value. - if (size < 5 || !isUnicodeScalarValue(point)) { - break; +var animationTarget = 1000; +function createProjectionNode(_a) { + var attachResizeListener = _a.attachResizeListener, + defaultParent = _a.defaultParent, + measureScroll = _a.measureScroll, + checkIsScrollRoot = _a.checkIsScrollRoot, + resetTransform = _a.resetTransform; + return /** @class */function () { + function ProjectionNode(id, latestValues, parent) { + var _this = this; + if (latestValues === void 0) { + latestValues = {}; } - return { - value: String.fromCodePoint(point), - size + if (parent === void 0) { + parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); + } + /** + * A Set containing all this component's children. This is used to iterate + * through the children. + * + * TODO: This could be faster to iterate as a flat array stored on the root node. + */ + this.children = new Set(); + /** + * Options for the node. We use this to configure what kind of layout animations + * we should perform (if any). + */ + this.options = {}; + /** + * We use this to detect when its safe to shut down part of a projection tree. + * We have to keep projecting children for scale correction and relative projection + * until all their parents stop performing layout animations. + */ + this.isTreeAnimating = false; + this.isAnimationBlocked = false; + /** + * Flag to true if we think this layout has been changed. We can't always know this, + * currently we set it to true every time a component renders, or if it has a layoutDependency + * if that has changed between renders. Additionally, components can be grouped by LayoutGroup + * and if one node is dirtied, they all are. + */ + this.isLayoutDirty = false; + /** + * Block layout updates for instant layout transitions throughout the tree. + */ + this.updateManuallyBlocked = false; + this.updateBlockedByResize = false; + /** + * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` + * call. + */ + this.isUpdating = false; + /** + * If this is an SVG element we currently disable projection transforms + */ + this.isSVG = false; + /** + * Flag to true (during promotion) if a node doing an instant layout transition needs to reset + * its projection styles. + */ + this.needsReset = false; + /** + * Flags whether this node should have its transform reset prior to measuring. + */ + this.shouldResetTransform = false; + /** + * An object representing the calculated contextual/accumulated/tree scale. + * This will be used to scale calculcated projection transforms, as these are + * calculated in screen-space but need to be scaled for elements to actually + * make it to their calculated destinations. + * + * TODO: Lazy-init + */ + this.treeScale = { + x: 1, + y: 1 }; - } // Append this hex digit to the code point. - - point = point << 4 | readHexDigit(code); - if (point < 0) { - break; - } - } - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + size)}".`); -} -function readEscapedUnicodeFixedWidth(lexer, position) { - const body = lexer.source.body; - const code = read16BitHexCode(body, position + 2); - if (isUnicodeScalarValue(code)) { - return { - value: String.fromCodePoint(code), - size: 6 + /** + * + */ + this.eventHandlers = new Map(); + // Note: Currently only running on root node + this.potentialNodes = new Map(); + this.checkUpdateFailed = function () { + if (_this.isUpdating) { + _this.isUpdating = false; + _this.clearAllSnapshots(); + } + }; + this.updateProjection = function () { + _this.nodes.forEach(resolveTargetDelta); + _this.nodes.forEach(calcProjection); + }; + this.hasProjected = false; + this.isVisible = true; + this.animationProgress = 0; + /** + * Shared layout + */ + // TODO Only running on root node + this.sharedNodes = new Map(); + this.id = id; + this.latestValues = latestValues; + this.root = parent ? parent.root || parent : this; + this.path = parent ? tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(parent.path), false), [parent], false) : []; + this.parent = parent; + this.depth = parent ? parent.depth + 1 : 0; + id && this.root.registerPotentialNode(id, this); + for (var i = 0; i < this.path.length; i++) { + this.path[i].shouldResetTransform = true; + } + if (this.root === this) this.nodes = new FlatTree(); + } + ProjectionNode.prototype.addEventListener = function (name, handler) { + if (!this.eventHandlers.has(name)) { + this.eventHandlers.set(name, new SubscriptionManager()); + } + return this.eventHandlers.get(name).add(handler); }; - } // GraphQL allows JSON-style surrogate pair escape sequences, but only when - // a valid pair is formed. - - if (isLeadingSurrogate(code)) { - // \u - if (body.charCodeAt(position + 6) === 0x005c && body.charCodeAt(position + 7) === 0x0075) { - const trailingCode = read16BitHexCode(body, position + 8); - if (isTrailingSurrogate(trailingCode)) { - // JavaScript defines strings as a sequence of UTF-16 code units and - // encodes Unicode code points above U+FFFF using a surrogate pair of - // code units. Since this is a surrogate pair escape sequence, just - // include both codes into the JavaScript string value. Had JavaScript - // not been internally based on UTF-16, then this surrogate pair would - // be decoded to retrieve the supplementary code point. - return { - value: String.fromCodePoint(code, trailingCode), - size: 12 + ProjectionNode.prototype.notifyListeners = function (name) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var subscriptionManager = this.eventHandlers.get(name); + subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, tslib.__spreadArray([], tslib.__read(args), false)); + }; + ProjectionNode.prototype.hasListeners = function (name) { + return this.eventHandlers.has(name); + }; + ProjectionNode.prototype.registerPotentialNode = function (id, node) { + this.potentialNodes.set(id, node); + }; + /** + * Lifecycles + */ + ProjectionNode.prototype.mount = function (instance, isLayoutDirty) { + var _this = this; + var _a; + if (isLayoutDirty === void 0) { + isLayoutDirty = false; + } + if (this.instance) return; + this.isSVG = instance instanceof SVGElement && instance.tagName !== "svg"; + this.instance = instance; + var _b = this.options, + layoutId = _b.layoutId, + layout = _b.layout, + visualElement = _b.visualElement; + if (visualElement && !visualElement.getInstance()) { + visualElement.mount(instance); + } + this.root.nodes.add(this); + (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this); + this.id && this.root.potentialNodes.delete(this.id); + if (isLayoutDirty && (layout || layoutId)) { + this.isLayoutDirty = true; + } + if (attachResizeListener) { + var unblockTimeout_1; + var resizeUnblockUpdate_1 = function () { + return _this.root.updateBlockedByResize = false; }; + attachResizeListener(instance, function () { + _this.root.updateBlockedByResize = true; + clearTimeout(unblockTimeout_1); + unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250); + if (globalProjectionState.hasAnimatedSinceResize) { + globalProjectionState.hasAnimatedSinceResize = false; + _this.nodes.forEach(finishAnimation); + } + }); + } + if (layoutId) { + this.root.registerSharedNode(layoutId, this); + } + // Only register the handler if it requires layout animation + if (this.options.animate !== false && visualElement && (layoutId || layout)) { + this.addEventListener("didUpdate", function (_a) { + var _b, _c, _d, _e, _f; + var delta = _a.delta, + hasLayoutChanged = _a.hasLayoutChanged, + hasRelativeTargetChanged = _a.hasRelativeTargetChanged, + newLayout = _a.layout; + if (_this.isTreeAnimationBlocked()) { + _this.target = undefined; + _this.relativeTarget = undefined; + return; + } + // TODO: Check here if an animation exists + var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition; + var _g = visualElement.getProps(), + onLayoutAnimationStart = _g.onLayoutAnimationStart, + onLayoutAnimationComplete = _g.onLayoutAnimationComplete; + /** + * The target layout of the element might stay the same, + * but its position relative to its parent has changed. + */ + var targetChanged = !_this.targetLayout || !boxEquals(_this.targetLayout, newLayout) || hasRelativeTargetChanged; + /** + * If the layout hasn't seemed to have changed, it might be that the + * element is visually in the same place in the document but its position + * relative to its parent has indeed changed. So here we check for that. + */ + var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged; + if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !_this.currentAnimation)) { + if (_this.resumeFrom) { + _this.resumingFrom = _this.resumeFrom; + _this.resumingFrom.resumingFrom = undefined; + } + _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged); + var animationOptions = tslib.__assign(tslib.__assign({}, getValueTransition(layoutTransition, "layout")), { + onPlay: onLayoutAnimationStart, + onComplete: onLayoutAnimationComplete + }); + if (visualElement.shouldReduceMotion) { + animationOptions.delay = 0; + animationOptions.type = false; + } + _this.startAnimation(animationOptions); + } else { + /** + * If the layout hasn't changed and we have an animation that hasn't started yet, + * finish it immediately. Otherwise it will be animating from a location + * that was probably never commited to screen and look like a jumpy box. + */ + if (!hasLayoutChanged && _this.animationProgress === 0) { + _this.finishAnimation(); + } + _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e)); + } + _this.targetLayout = newLayout; + }); + } + }; + ProjectionNode.prototype.unmount = function () { + var _a, _b; + this.options.layoutId && this.willUpdate(); + this.root.nodes.remove(this); + (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this); + (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this); + this.instance = undefined; + sync.cancelSync.preRender(this.updateProjection); + }; + // only on the root + ProjectionNode.prototype.blockUpdate = function () { + this.updateManuallyBlocked = true; + }; + ProjectionNode.prototype.unblockUpdate = function () { + this.updateManuallyBlocked = false; + }; + ProjectionNode.prototype.isUpdateBlocked = function () { + return this.updateManuallyBlocked || this.updateBlockedByResize; + }; + ProjectionNode.prototype.isTreeAnimationBlocked = function () { + var _a; + return this.isAnimationBlocked || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) || false; + }; + // Note: currently only running on root node + ProjectionNode.prototype.startUpdate = function () { + var _a; + if (this.isUpdateBlocked()) return; + this.isUpdating = true; + (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation); + }; + ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) { + var _a, _b, _c; + if (shouldNotifyListeners === void 0) { + shouldNotifyListeners = true; + } + if (this.root.isUpdateBlocked()) { + (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a); + return; + } + !this.root.isUpdating && this.root.startUpdate(); + if (this.isLayoutDirty) return; + this.isLayoutDirty = true; + for (var i = 0; i < this.path.length; i++) { + var node = this.path[i]; + node.shouldResetTransform = true; + /** + * TODO: Check we haven't updated the scroll + * since the last didUpdate + */ + node.updateScroll(); + } + var _d = this.options, + layoutId = _d.layoutId, + layout = _d.layout; + if (layoutId === undefined && !layout) return; + var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate; + this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, ""); + this.updateSnapshot(); + shouldNotifyListeners && this.notifyListeners("willUpdate"); + }; + // Note: Currently only running on root node + ProjectionNode.prototype.didUpdate = function () { + var updateWasBlocked = this.isUpdateBlocked(); + // When doing an instant transition, we skip the layout update, + // but should still clean up the measurements so that the next + // snapshot could be taken correctly. + if (updateWasBlocked) { + this.unblockUpdate(); + this.clearAllSnapshots(); + this.nodes.forEach(clearMeasurements); + return; + } + if (!this.isUpdating) return; + this.isUpdating = false; + /** + * Search for and mount newly-added projection elements. + * + * TODO: Every time a new component is rendered we could search up the tree for + * the closest mounted node and query from there rather than document. + */ + if (this.potentialNodes.size) { + this.potentialNodes.forEach(mountNodeEarly); + this.potentialNodes.clear(); + } + /** + * Write + */ + this.nodes.forEach(resetTransformStyle); + /** + * Read ================== + */ + // Update layout measurements of updated children + this.nodes.forEach(updateLayout); + /** + * Write + */ + // Notify listeners that the layout is updated + this.nodes.forEach(notifyLayoutUpdate); + this.clearAllSnapshots(); + // Flush any scheduled updates + sync.flushSync.update(); + sync.flushSync.preRender(); + sync.flushSync.render(); + }; + ProjectionNode.prototype.clearAllSnapshots = function () { + this.nodes.forEach(clearSnapshot); + this.sharedNodes.forEach(removeLeadSnapshots); + }; + ProjectionNode.prototype.scheduleUpdateProjection = function () { + sync__default["default"].preRender(this.updateProjection, false, true); + }; + ProjectionNode.prototype.scheduleCheckAfterUnmount = function () { + var _this = this; + /** + * If the unmounting node is in a layoutGroup and did trigger a willUpdate, + * we manually call didUpdate to give a chance to the siblings to animate. + * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. + */ + sync__default["default"].postRender(function () { + if (_this.isLayoutDirty) { + _this.root.didUpdate(); + } else { + _this.root.checkUpdateFailed(); + } + }); + }; + /** + * Update measurements + */ + ProjectionNode.prototype.updateSnapshot = function () { + if (this.snapshot || !this.instance) return; + var measured = this.measure(); + var layout = this.removeTransform(this.removeElementScroll(measured)); + roundBox(layout); + this.snapshot = { + measured: measured, + layout: layout, + latestValues: {} + }; + }; + ProjectionNode.prototype.updateLayout = function () { + var _a; + if (!this.instance) return; + // TODO: Incorporate into a forwarded scroll offset + this.updateScroll(); + if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) { + return; + } + /** + * When a node is mounted, it simply resumes from the prevLead's + * snapshot instead of taking a new one, but the ancestors scroll + * might have updated while the prevLead is unmounted. We need to + * update the scroll again to make sure the layout we measure is + * up to date. + */ + if (this.resumeFrom && !this.resumeFrom.instance) { + for (var i = 0; i < this.path.length; i++) { + var node = this.path[i]; + node.updateScroll(); + } + } + var measured = this.measure(); + roundBox(measured); + var prevLayout = this.layout; + this.layout = { + measured: measured, + actual: this.removeElementScroll(measured) + }; + this.layoutCorrected = createBox(); + this.isLayoutDirty = false; + this.projectionDelta = undefined; + this.notifyListeners("measure", this.layout.actual); + (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual); + }; + ProjectionNode.prototype.updateScroll = function () { + if (this.options.layoutScroll && this.instance) { + this.isScrollRoot = checkIsScrollRoot(this.instance); + this.scroll = measureScroll(this.instance); + } + }; + ProjectionNode.prototype.resetTransform = function () { + var _a; + if (!resetTransform) return; + var isResetRequested = this.isLayoutDirty || this.shouldResetTransform; + var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); + var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate; + var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, ""); + var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; + if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) { + resetTransform(this.instance, transformTemplateValue); + this.shouldResetTransform = false; + this.scheduleRender(); + } + }; + ProjectionNode.prototype.measure = function () { + var visualElement = this.options.visualElement; + if (!visualElement) return createBox(); + var box = visualElement.measureViewportBox(); + // Remove viewport scroll to give page-relative coordinates + var scroll = this.root.scroll; + if (scroll) { + translateAxis(box.x, scroll.x); + translateAxis(box.y, scroll.y); + } + return box; + }; + ProjectionNode.prototype.removeElementScroll = function (box) { + var boxWithoutScroll = createBox(); + copyBoxInto(boxWithoutScroll, box); + /** + * Performance TODO: Keep a cumulative scroll offset down the tree + * rather than loop back up the path. + */ + for (var i = 0; i < this.path.length; i++) { + var node = this.path[i]; + var scroll_1 = node.scroll, + options = node.options, + isScrollRoot = node.isScrollRoot; + if (node !== this.root && scroll_1 && options.layoutScroll) { + /** + * If this is a new scroll root, we want to remove all previous scrolls + * from the viewport box. + */ + if (isScrollRoot) { + copyBoxInto(boxWithoutScroll, box); + var rootScroll = this.root.scroll; + /** + * Undo the application of page scroll that was originally added + * to the measured bounding box. + */ + if (rootScroll) { + translateAxis(boxWithoutScroll.x, -rootScroll.x); + translateAxis(boxWithoutScroll.y, -rootScroll.y); + } + } + translateAxis(boxWithoutScroll.x, scroll_1.x); + translateAxis(boxWithoutScroll.y, scroll_1.y); + } + } + return boxWithoutScroll; + }; + ProjectionNode.prototype.applyTransform = function (box, transformOnly) { + if (transformOnly === void 0) { + transformOnly = false; + } + var withTransforms = createBox(); + copyBoxInto(withTransforms, box); + for (var i = 0; i < this.path.length; i++) { + var node = this.path[i]; + if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) { + transformBox(withTransforms, { + x: -node.scroll.x, + y: -node.scroll.y + }); + } + if (!hasTransform(node.latestValues)) continue; + transformBox(withTransforms, node.latestValues); + } + if (hasTransform(this.latestValues)) { + transformBox(withTransforms, this.latestValues); + } + return withTransforms; + }; + ProjectionNode.prototype.removeTransform = function (box) { + var _a; + var boxWithoutTransform = createBox(); + copyBoxInto(boxWithoutTransform, box); + for (var i = 0; i < this.path.length; i++) { + var node = this.path[i]; + if (!node.instance) continue; + if (!hasTransform(node.latestValues)) continue; + hasScale(node.latestValues) && node.updateSnapshot(); + var sourceBox = createBox(); + var nodeBox = node.measure(); + copyBoxInto(sourceBox, nodeBox); + removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox); + } + if (hasTransform(this.latestValues)) { + removeBoxTransforms(boxWithoutTransform, this.latestValues); + } + return boxWithoutTransform; + }; + /** + * + */ + ProjectionNode.prototype.setTargetDelta = function (delta) { + this.targetDelta = delta; + this.root.scheduleUpdateProjection(); + }; + ProjectionNode.prototype.setOptions = function (options) { + var _a; + this.options = tslib.__assign(tslib.__assign(tslib.__assign({}, this.options), options), { + crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true + }); + }; + ProjectionNode.prototype.clearMeasurements = function () { + this.scroll = undefined; + this.layout = undefined; + this.snapshot = undefined; + this.prevTransformTemplateValue = undefined; + this.targetDelta = undefined; + this.target = undefined; + this.isLayoutDirty = false; + }; + /** + * Frame calculations + */ + ProjectionNode.prototype.resolveTargetDelta = function () { + var _a; + var _b = this.options, + layout = _b.layout, + layoutId = _b.layoutId; + /** + * If we have no layout, we can't perform projection, so early return + */ + if (!this.layout || !(layout || layoutId)) return; + /** + * If we don't have a targetDelta but do have a layout, we can attempt to resolve + * a relativeParent. This will allow a component to perform scale correction + * even if no animation has started. + */ + // TODO If this is unsuccessful this currently happens every frame + if (!this.targetDelta && !this.relativeTarget) { + // TODO: This is a semi-repetition of further down this function, make DRY + this.relativeParent = this.getClosestProjectingParent(); + if (this.relativeParent && this.relativeParent.layout) { + this.relativeTarget = createBox(); + this.relativeTargetOrigin = createBox(); + calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual); + copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); + } + } + /** + * If we have no relative target or no target delta our target isn't valid + * for this frame. + */ + if (!this.relativeTarget && !this.targetDelta) return; + /** + * Lazy-init target data structure + */ + if (!this.target) { + this.target = createBox(); + this.targetWithTransforms = createBox(); + } + /** + * If we've got a relative box for this component, resolve it into a target relative to the parent. + */ + if (this.relativeTarget && this.relativeTargetOrigin && ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) { + calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target); + /** + * If we've only got a targetDelta, resolve it into a target + */ + } else if (this.targetDelta) { + if (Boolean(this.resumingFrom)) { + // TODO: This is creating a new object every frame + this.target = this.applyTransform(this.layout.actual); + } else { + copyBoxInto(this.target, this.layout.actual); + } + applyBoxDelta(this.target, this.targetDelta); + } else { + /** + * If no target, use own layout as target + */ + copyBoxInto(this.target, this.layout.actual); + } + /** + * If we've been told to attempt to resolve a relative target, do so. + */ + if (this.attemptToResolveRelativeTarget) { + this.attemptToResolveRelativeTarget = false; + this.relativeParent = this.getClosestProjectingParent(); + if (this.relativeParent && Boolean(this.relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !this.relativeParent.options.layoutScroll && this.relativeParent.target) { + this.relativeTarget = createBox(); + this.relativeTargetOrigin = createBox(); + calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target); + copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); + } + } + }; + ProjectionNode.prototype.getClosestProjectingParent = function () { + if (!this.parent || hasTransform(this.parent.latestValues)) return undefined; + if ((this.parent.relativeTarget || this.parent.targetDelta) && this.parent.layout) { + return this.parent; + } else { + return this.parent.getClosestProjectingParent(); + } + }; + ProjectionNode.prototype.calcProjection = function () { + var _a; + var _b = this.options, + layout = _b.layout, + layoutId = _b.layoutId; + /** + * If this section of the tree isn't animating we can + * delete our target sources for the following frame. + */ + this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) || this.currentAnimation || this.pendingAnimation); + if (!this.isTreeAnimating) { + this.targetDelta = this.relativeTarget = undefined; + } + if (!this.layout || !(layout || layoutId)) return; + var lead = this.getLead(); + /** + * Reset the corrected box with the latest values from box, as we're then going + * to perform mutative operations on it. + */ + copyBoxInto(this.layoutCorrected, this.layout.actual); + /** + * Apply all the parent deltas to this box to produce the corrected box. This + * is the layout box, as it will appear on screen as a result of the transforms of its parents. + */ + applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead); + var target = lead.target; + if (!target) return; + if (!this.projectionDelta) { + this.projectionDelta = createDelta(); + this.projectionDeltaWithTransform = createDelta(); + } + var prevTreeScaleX = this.treeScale.x; + var prevTreeScaleY = this.treeScale.y; + var prevProjectionTransform = this.projectionTransform; + /** + * Update the delta between the corrected box and the target box before user-set transforms were applied. + * This will allow us to calculate the corrected borderRadius and boxShadow to compensate + * for our layout reprojection, but still allow them to be scaled correctly by the user. + * It might be that to simplify this we may want to accept that user-set scale is also corrected + * and we wouldn't have to keep and calc both deltas, OR we could support a user setting + * to allow people to choose whether these styles are corrected based on just the + * layout reprojection or the final bounding box. + */ + calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); + this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale); + if (this.projectionTransform !== prevProjectionTransform || this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY) { + this.hasProjected = true; + this.scheduleRender(); + this.notifyListeners("projectionUpdate", target); + } + }; + ProjectionNode.prototype.hide = function () { + this.isVisible = false; + // TODO: Schedule render + }; + ProjectionNode.prototype.show = function () { + this.isVisible = true; + // TODO: Schedule render + }; + ProjectionNode.prototype.scheduleRender = function (notifyAll) { + var _a, _b, _c; + if (notifyAll === void 0) { + notifyAll = true; + } + (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a); + notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender()); + if (this.resumingFrom && !this.resumingFrom.instance) { + this.resumingFrom = undefined; + } + }; + ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) { + var _this = this; + var _a; + if (hasOnlyRelativeTargetChanged === void 0) { + hasOnlyRelativeTargetChanged = false; + } + var snapshot = this.snapshot; + var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {}; + var mixedValues = tslib.__assign({}, this.latestValues); + var targetDelta = createDelta(); + this.relativeTarget = this.relativeTargetOrigin = undefined; + this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; + var relativeLayout = createBox(); + var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared; + var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1; + var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade)); + this.animationProgress = 0; + this.mixTargetDelta = function (latest) { + var _a; + var progress = latest / 1000; + mixAxisDelta(targetDelta.x, delta.x, progress); + mixAxisDelta(targetDelta.y, delta.y, progress); + _this.setTargetDelta(targetDelta); + if (_this.relativeTarget && _this.relativeTargetOrigin && _this.layout && ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) { + calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual); + mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress); + } + if (isSharedLayoutAnimation) { + _this.animationValues = mixedValues; + mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); + } + _this.root.scheduleUpdateProjection(); + _this.scheduleRender(); + _this.animationProgress = progress; + }; + this.mixTargetDelta(0); + }; + ProjectionNode.prototype.startAnimation = function (options) { + var _this = this; + var _a, _b; + this.notifyListeners("animationStart"); + (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); + if (this.resumingFrom) { + (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop(); + } + if (this.pendingAnimation) { + sync.cancelSync.update(this.pendingAnimation); + this.pendingAnimation = undefined; + } + /** + * Start the animation in the next frame to have a frame with progress 0, + * where the target is the same as when the animation started, so we can + * calculate the relative positions correctly for instant transitions. + */ + this.pendingAnimation = sync__default["default"].update(function () { + globalProjectionState.hasAnimatedSinceResize = true; + _this.currentAnimation = animate(0, animationTarget, tslib.__assign(tslib.__assign({}, options), { + onUpdate: function (latest) { + var _a; + _this.mixTargetDelta(latest); + (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest); + }, + onComplete: function () { + var _a; + (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options); + _this.completeAnimation(); + } + })); + if (_this.resumingFrom) { + _this.resumingFrom.currentAnimation = _this.currentAnimation; + } + _this.pendingAnimation = undefined; + }); + }; + ProjectionNode.prototype.completeAnimation = function () { + var _a; + if (this.resumingFrom) { + this.resumingFrom.currentAnimation = undefined; + this.resumingFrom.preserveOpacity = undefined; + } + (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete(); + this.resumingFrom = this.currentAnimation = this.animationValues = undefined; + this.notifyListeners("animationComplete"); + }; + ProjectionNode.prototype.finishAnimation = function () { + var _a; + if (this.currentAnimation) { + (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget); + this.currentAnimation.stop(); + } + this.completeAnimation(); + }; + ProjectionNode.prototype.applyTransformsToTarget = function () { + var _a = this.getLead(), + targetWithTransforms = _a.targetWithTransforms, + target = _a.target, + layout = _a.layout, + latestValues = _a.latestValues; + if (!targetWithTransforms || !target || !layout) return; + copyBoxInto(targetWithTransforms, target); + /** + * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. + * This is the final box that we will then project into by calculating a transform delta and + * applying it to the corrected box. + */ + transformBox(targetWithTransforms, latestValues); + /** + * Update the delta between the corrected box and the final target box, after + * user-set transforms are applied to it. This will be used by the renderer to + * create a transform style that will reproject the element from its actual layout + * into the desired bounding box. + */ + calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); + }; + ProjectionNode.prototype.registerSharedNode = function (layoutId, node) { + var _a, _b, _c; + if (!this.sharedNodes.has(layoutId)) { + this.sharedNodes.set(layoutId, new NodeStack()); + } + var stack = this.sharedNodes.get(layoutId); + stack.add(node); + node.promote({ + transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition, + preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node) + }); + }; + ProjectionNode.prototype.isLead = function () { + var stack = this.getStack(); + return stack ? stack.lead === this : true; + }; + ProjectionNode.prototype.getLead = function () { + var _a; + var layoutId = this.options.layoutId; + return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this; + }; + ProjectionNode.prototype.getPrevLead = function () { + var _a; + var layoutId = this.options.layoutId; + return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined; + }; + ProjectionNode.prototype.getStack = function () { + var layoutId = this.options.layoutId; + if (layoutId) return this.root.sharedNodes.get(layoutId); + }; + ProjectionNode.prototype.promote = function (_a) { + var _b = _a === void 0 ? {} : _a, + needsReset = _b.needsReset, + transition = _b.transition, + preserveFollowOpacity = _b.preserveFollowOpacity; + var stack = this.getStack(); + if (stack) stack.promote(this, preserveFollowOpacity); + if (needsReset) { + this.projectionDelta = undefined; + this.needsReset = true; + } + if (transition) this.setOptions({ + transition: transition + }); + }; + ProjectionNode.prototype.relegate = function () { + var stack = this.getStack(); + if (stack) { + return stack.relegate(this); + } else { + return false; + } + }; + ProjectionNode.prototype.resetRotation = function () { + var visualElement = this.options.visualElement; + if (!visualElement) return; + // If there's no detected rotation values, we can early return without a forced render. + var hasRotate = false; + // Keep a record of all the values we've reset + var resetValues = {}; + // Check the rotate value of all axes and reset to 0 + for (var i = 0; i < transformAxes.length; i++) { + var axis = transformAxes[i]; + var key = "rotate" + axis; + // If this rotation doesn't exist as a motion value, then we don't + // need to reset it + if (!visualElement.getStaticValue(key)) { + continue; + } + hasRotate = true; + // Record the rotation and then temporarily set it to 0 + resetValues[key] = visualElement.getStaticValue(key); + visualElement.setStaticValue(key, 0); + } + // If there's no rotation values, we don't need to do any more. + if (!hasRotate) return; + // Force a render of this element to apply the transform with all rotations + // set to 0. + visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender(); + // Put back all the values we reset + for (var key in resetValues) { + visualElement.setStaticValue(key, resetValues[key]); + } + // Schedule a render for the next frame. This ensures we won't visually + // see the element with the reset rotate value applied. + visualElement.scheduleRender(); + }; + ProjectionNode.prototype.getProjectionStyles = function (styleProp) { + var _a, _b, _c, _d, _e, _f; + if (styleProp === void 0) { + styleProp = {}; + } + // TODO: Return lifecycle-persistent object + var styles = {}; + if (!this.instance || this.isSVG) return styles; + if (!this.isVisible) { + return { + visibility: "hidden" + }; + } else { + styles.visibility = ""; + } + var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate; + if (this.needsReset) { + this.needsReset = false; + styles.opacity = ""; + styles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || ""; + styles.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none"; + return styles; + } + var lead = this.getLead(); + if (!this.projectionDelta || !this.layout || !lead.target) { + var emptyStyles = {}; + if (this.options.layoutId) { + emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1; + emptyStyles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || ""; + } + if (this.hasProjected && !hasTransform(this.latestValues)) { + emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none"; + this.hasProjected = false; + } + return emptyStyles; + } + var valuesToRender = lead.animationValues || lead.latestValues; + this.applyTransformsToTarget(); + styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); + if (transformTemplate) { + styles.transform = transformTemplate(valuesToRender, styles.transform); + } + var _g = this.projectionDelta, + x = _g.x, + y = _g.y; + styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0"); + if (lead.animationValues) { + /** + * If the lead component is animating, assign this either the entering/leaving + * opacity + */ + styles.opacity = lead === this ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit; + } else { + /** + * Or we're not animating at all, set the lead component to its actual + * opacity and other components to hidden. + */ + styles.opacity = lead === this ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : "" : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0; + } + /** + * Apply scale correction + */ + for (var key in scaleCorrectors) { + if (valuesToRender[key] === undefined) continue; + var _h = scaleCorrectors[key], + correct = _h.correct, + applyTo = _h.applyTo; + var corrected = correct(valuesToRender[key], lead); + if (applyTo) { + var num = applyTo.length; + for (var i = 0; i < num; i++) { + styles[applyTo[i]] = corrected; + } + } else { + styles[key] = corrected; + } + } + /** + * Disable pointer events on follow components. This is to ensure + * that if a follow component covers a lead component it doesn't block + * pointer events on the lead. + */ + if (this.options.layoutId) { + styles.pointerEvents = lead === this ? resolveMotionValue(styleProp.pointerEvents) || "" : "none"; + } + return styles; + }; + ProjectionNode.prototype.clearSnapshot = function () { + this.resumeFrom = this.snapshot = undefined; + }; + // Only run on root + ProjectionNode.prototype.resetTree = function () { + this.root.nodes.forEach(function (node) { + var _a; + return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); + }); + this.root.nodes.forEach(clearMeasurements); + this.root.sharedNodes.clear(); + }; + return ProjectionNode; + }(); +} +function updateLayout(node) { + node.updateLayout(); +} +function notifyLayoutUpdate(node) { + var _a, _b, _c, _d; + var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot; + if (node.isLead() && node.layout && snapshot && node.hasListeners("didUpdate")) { + var _e = node.layout, + layout_1 = _e.actual, + measuredLayout = _e.measured; + // TODO Maybe we want to also resize the layout snapshot so we don't trigger + // animations for instance if layout="size" and an element has only changed position + if (node.options.animationType === "size") { + eachAxis(function (axis) { + var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis]; + var length = calcLength(axisSnapshot); + axisSnapshot.min = layout_1[axis].min; + axisSnapshot.max = axisSnapshot.min + length; + }); + } else if (node.options.animationType === "position") { + eachAxis(function (axis) { + var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis]; + var length = calcLength(layout_1[axis]); + axisSnapshot.max = axisSnapshot.min + length; + }); + } + var layoutDelta = createDelta(); + calcBoxDelta(layoutDelta, layout_1, snapshot.layout); + var visualDelta = createDelta(); + if (snapshot.isShared) { + calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured); + } else { + calcBoxDelta(visualDelta, layout_1, snapshot.layout); + } + var hasLayoutChanged = !isDeltaZero(layoutDelta); + var hasRelativeTargetChanged = false; + if (!node.resumeFrom) { + node.relativeParent = node.getClosestProjectingParent(); + /** + * If the relativeParent is itself resuming from a different element then + * the relative snapshot is not relavent + */ + if (node.relativeParent && !node.relativeParent.resumeFrom) { + var _f = node.relativeParent, + parentSnapshot = _f.snapshot, + parentLayout = _f.layout; + if (parentSnapshot && parentLayout) { + var relativeSnapshot = createBox(); + calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout); + var relativeLayout = createBox(); + calcRelativePosition(relativeLayout, layout_1, parentLayout.actual); + if (!boxEquals(relativeSnapshot, relativeLayout)) { + hasRelativeTargetChanged = true; + } + } } } + node.notifyListeners("didUpdate", { + layout: layout_1, + snapshot: snapshot, + delta: visualDelta, + layoutDelta: layoutDelta, + hasLayoutChanged: hasLayoutChanged, + hasRelativeTargetChanged: hasRelativeTargetChanged + }); + } else if (node.isLead()) { + (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c); } - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".`); + /** + * Clearing transition + * TODO: Investigate why this transition is being passed in as {type: false } from Framer + * and why we need it at all + */ + node.options.transition = undefined; +} +function clearSnapshot(node) { + node.clearSnapshot(); +} +function clearMeasurements(node) { + node.clearMeasurements(); +} +function resetTransformStyle(node) { + var visualElement = node.options.visualElement; + if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) { + visualElement.notifyBeforeLayoutMeasure(); + } + node.resetTransform(); +} +function finishAnimation(node) { + node.finishAnimation(); + node.targetDelta = node.relativeTarget = node.target = undefined; +} +function resolveTargetDelta(node) { + node.resolveTargetDelta(); +} +function calcProjection(node) { + node.calcProjection(); +} +function resetRotation(node) { + node.resetRotation(); +} +function removeLeadSnapshots(stack) { + stack.removeLeadSnapshot(); +} +function mixAxisDelta(output, delta, p) { + output.translate = popmotion.mix(delta.translate, 0, p); + output.scale = popmotion.mix(delta.scale, 1, p); + output.origin = delta.origin; + output.originPoint = delta.originPoint; +} +function mixAxis(output, from, to, p) { + output.min = popmotion.mix(from.min, to.min, p); + output.max = popmotion.mix(from.max, to.max, p); +} +function mixBox(output, from, to, p) { + mixAxis(output.x, from.x, to.x, p); + mixAxis(output.y, from.y, to.y, p); +} +function hasOpacityCrossfade(node) { + return node.animationValues && node.animationValues.opacityExit !== undefined; +} +var defaultLayoutTransition = { + duration: 0.45, + ease: [0.4, 0, 0.1, 1] +}; +function mountNodeEarly(node, id) { + /** + * Rather than searching the DOM from document we can search the + * path for the deepest mounted ancestor and search from there + */ + var searchNode = node.root; + for (var i = node.path.length - 1; i >= 0; i--) { + if (Boolean(node.path[i].instance)) { + searchNode = node.path[i]; + break; + } + } + var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document; + var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]")); + if (element) node.mount(element, true); } +function roundAxis(axis) { + axis.min = Math.round(axis.min); + axis.max = Math.round(axis.max); +} +function roundBox(box) { + roundAxis(box.x); + roundAxis(box.y); +} +var DocumentProjectionNode = createProjectionNode({ + attachResizeListener: function (ref, notify) { + return addDomEvent(ref, "resize", notify); + }, + measureScroll: function () { + return { + x: document.documentElement.scrollLeft || document.body.scrollLeft, + y: document.documentElement.scrollTop || document.body.scrollTop + }; + }, + checkIsScrollRoot: function () { + return true; + } +}); +var rootProjectionNode = { + current: undefined +}; +var HTMLProjectionNode = createProjectionNode({ + measureScroll: function (instance) { + return { + x: instance.scrollLeft, + y: instance.scrollTop + }; + }, + defaultParent: function () { + if (!rootProjectionNode.current) { + var documentNode = new DocumentProjectionNode(0, {}); + documentNode.mount(window); + documentNode.setOptions({ + layoutScroll: true + }); + rootProjectionNode.current = documentNode; + } + return rootProjectionNode.current; + }, + resetTransform: function (instance, value) { + instance.style.transform = value !== null && value !== void 0 ? value : "none"; + }, + checkIsScrollRoot: function (instance) { + return Boolean(window.getComputedStyle(instance).position === "fixed"); + } +}); +var featureBundle = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, animations), gestureAnimations), drag), layoutFeatures); /** - * Reads four hexadecimal characters and returns the positive integer that 16bit - * hexadecimal string represents. For example, "000f" will return 15, and "dead" - * will return 57005. + * HTML & SVG components, optimised for use with gestures and animation. These can be used as + * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported. * - * Returns a negative number if any char was not a valid hexadecimal digit. + * @public */ - -function read16BitHexCode(body, position) { - // readHexDigit() returns -1 on error. ORing a negative value with any other - // value always produces a negative value. - return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3)); -} +var motion = /*@__PURE__*/createMotionProxy(function (Component, config) { + return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode); +}); /** - * Reads a hexadecimal character and returns its positive integer value (0-15). + * Create a DOM `motion` component with the provided string. This is primarily intended + * as a full alternative to `motion` for consumers who have to support environments that don't + * support `Proxy`. * - * '0' becomes 0, '9' becomes 9 - * 'A' becomes 10, 'F' becomes 15 - * 'a' becomes 10, 'f' becomes 15 + * ```javascript + * import { createDomMotionComponent } from "framer-motion" * - * Returns -1 if the provided character code was not a valid hexadecimal digit. + * const motion = { + * div: createDomMotionComponent('div') + * } + * ``` * - * HexDigit :: one of - * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` - * - `A` `B` `C` `D` `E` `F` - * - `a` `b` `c` `d` `e` `f` + * @public */ - -function readHexDigit(code) { - return code >= 0x0030 && code <= 0x0039 // 0-9 - ? code - 0x0030 : code >= 0x0041 && code <= 0x0046 // A-F - ? code - 0x0037 : code >= 0x0061 && code <= 0x0066 // a-f - ? code - 0x0057 : -1; +function createDomMotionComponent(key) { + return createMotionComponent(createDomMotionConfig(key, { + forwardMotionProps: false + }, featureBundle, createDomVisualElement, HTMLProjectionNode)); } + /** - * | Escaped Character | Code Point | Character Name | - * | ----------------- | ---------- | ---------------------------- | - * | `"` | U+0022 | double quote | - * | `\` | U+005C | reverse solidus (back slash) | - * | `/` | U+002F | solidus (forward slash) | - * | `b` | U+0008 | backspace | - * | `f` | U+000C | form feed | - * | `n` | U+000A | line feed (new line) | - * | `r` | U+000D | carriage return | - * | `t` | U+0009 | horizontal tab | + * @public */ - -function readEscapedCharacter(lexer, position) { - const body = lexer.source.body; - const code = body.charCodeAt(position + 1); - switch (code) { - case 0x0022: - // " - return { - value: '\u0022', - size: 2 - }; - case 0x005c: - // \ - return { - value: '\u005c', - size: 2 - }; - case 0x002f: - // / - return { - value: '\u002f', - size: 2 - }; - case 0x0062: - // b - return { - value: '\u0008', - size: 2 - }; - case 0x0066: - // f - return { - value: '\u000c', - size: 2 - }; - case 0x006e: - // n - return { - value: '\u000a', - size: 2 - }; - case 0x0072: - // r - return { - value: '\u000d', - size: 2 - }; - case 0x0074: - // t - return { - value: '\u0009', - size: 2 - }; - } - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character escape sequence: "${body.slice(position, position + 2)}".`); +var m = createMotionProxy(createDomMotionConfig); +function useIsMounted() { + var isMounted = React.useRef(false); + useIsomorphicLayoutEffect(function () { + isMounted.current = true; + return function () { + isMounted.current = false; + }; + }, []); + return isMounted; } -/** - * Reads a block string token from the source file. - * - * ``` - * StringValue :: - * - `"""` BlockStringCharacter* `"""` - * - * BlockStringCharacter :: - * - SourceCharacter but not `"""` or `\"""` - * - `\"""` - * ``` - */ - -function readBlockString(lexer, start) { - const body = lexer.source.body; - const bodyLength = body.length; - let lineStart = lexer.lineStart; - let position = start + 3; - let chunkStart = position; - let currentLine = ''; - const blockLines = []; - while (position < bodyLength) { - const code = body.charCodeAt(position); // Closing Triple-Quote (""") - - if (code === 0x0022 && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) { - currentLine += body.slice(chunkStart, position); - blockLines.push(currentLine); - const token = createToken(lexer, _tokenKind.TokenKind.BLOCK_STRING, start, position + 3, - // Return a string of the lines joined with U+000A. - (0, _blockString.dedentBlockStringLines)(blockLines).join('\n')); - lexer.line += blockLines.length - 1; - lexer.lineStart = lineStart; - return token; - } // Escaped Triple-Quote (\""") - - if (code === 0x005c && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 && body.charCodeAt(position + 3) === 0x0022) { - currentLine += body.slice(chunkStart, position); - chunkStart = position + 1; // skip only slash - - position += 4; - continue; - } // LineTerminator - - if (code === 0x000a || code === 0x000d) { - currentLine += body.slice(chunkStart, position); - blockLines.push(currentLine); - if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) { - position += 2; - } else { - ++position; +function useForceUpdate() { + var isMounted = useIsMounted(); + var _a = tslib.__read(React.useState(0), 2), + forcedRenderCount = _a[0], + setForcedRenderCount = _a[1]; + var forceRender = React.useCallback(function () { + isMounted.current && setForcedRenderCount(forcedRenderCount + 1); + }, [forcedRenderCount]); + /** + * Defer this to the end of the next animation frame in case there are multiple + * synchronous calls. + */ + var deferredForceRender = React.useCallback(function () { + return sync__default["default"].postRender(forceRender); + }, [forceRender]); + return [deferredForceRender, forcedRenderCount]; +} +var PresenceChild = function (_a) { + var children = _a.children, + initial = _a.initial, + isPresent = _a.isPresent, + onExitComplete = _a.onExitComplete, + custom = _a.custom, + presenceAffectsLayout = _a.presenceAffectsLayout; + var presenceChildren = useConstant(newChildrenMap); + var id = useId(); + var context = React.useMemo(function () { + return { + id: id, + initial: initial, + isPresent: isPresent, + custom: custom, + onExitComplete: function (childId) { + var e_1, _a; + presenceChildren.set(childId, true); + try { + for (var _b = tslib.__values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) { + var isComplete = _c.value; + if (!isComplete) return; // can stop searching when any is incomplete + } + } catch (e_1_1) { + e_1 = { + error: e_1_1 + }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(); + }, + register: function (childId) { + presenceChildren.set(childId, false); + return function () { + return presenceChildren.delete(childId); + }; } - currentLine = ''; - chunkStart = position; - lineStart = position; - continue; - } // SourceCharacter - - if (isUnicodeScalarValue(code)) { - ++position; - } else if (isSupplementaryCodePoint(body, position)) { - position += 2; - } else { - throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`); - } - } - throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.'); + }; + }, + /** + * If the presence of a child affects the layout of the components around it, + * we want to make a new context value to ensure they get re-rendered + * so they can detect that layout change. + */ + presenceAffectsLayout ? undefined : [isPresent]); + React.useMemo(function () { + presenceChildren.forEach(function (_, key) { + return presenceChildren.set(key, false); + }); + }, [isPresent]); + /** + * If there's no `motion` components to fire exit animations, we want to remove this + * component immediately. + */ + React__namespace.useEffect(function () { + !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete()); + }, [isPresent]); + return React__namespace.createElement(PresenceContext.Provider, { + value: context + }, children); +}; +function newChildrenMap() { + return new Map(); +} +var getChildKey = function (child) { + return child.key || ""; +}; +function updateChildLookup(children, allChildren) { + children.forEach(function (child) { + var key = getChildKey(child); + allChildren.set(key, child); + }); +} +function onlyElements(children) { + var filtered = []; + // We use forEach here instead of map as map mutates the component key by preprending `.$` + React.Children.forEach(children, function (child) { + if (React.isValidElement(child)) filtered.push(child); + }); + return filtered; } /** - * Reads an alphanumeric + underscore name from the source. + * `AnimatePresence` enables the animation of components that have been removed from the tree. * + * When adding/removing more than a single child, every child **must** be given a unique `key` prop. + * + * Any `motion` components that have an `exit` property defined will animate out when removed from + * the tree. + * + * ```jsx + * import { motion, AnimatePresence } from 'framer-motion' + * + * export const Items = ({ items }) => ( + * + * {items.map(item => ( + * + * ))} + * + * ) * ``` - * Name :: - * - NameStart NameContinue* [lookahead != NameContinue] - * ``` + * + * You can sequence exit animations throughout a tree using variants. + * + * If a child contains multiple `motion` components with `exit` props, it will only unmount the child + * once all `motion` components have finished animating out. Likewise, any components using + * `usePresence` all need to call `safeToRemove`. + * + * @public */ - -function readName(lexer, start) { - const body = lexer.source.body; - const bodyLength = body.length; - let position = start + 1; - while (position < bodyLength) { - const code = body.charCodeAt(position); - if ((0, _characterClasses.isNameContinue)(code)) { - ++position; - } else { - break; +var AnimatePresence = function (_a) { + var children = _a.children, + custom = _a.custom, + _b = _a.initial, + initial = _b === void 0 ? true : _b, + onExitComplete = _a.onExitComplete, + exitBeforeEnter = _a.exitBeforeEnter, + _c = _a.presenceAffectsLayout, + presenceAffectsLayout = _c === void 0 ? true : _c; + // We want to force a re-render once all exiting animations have finished. We + // either use a local forceRender function, or one from a parent context if it exists. + var _d = tslib.__read(useForceUpdate(), 1), + forceRender = _d[0]; + var forceRenderLayoutGroup = React.useContext(LayoutGroupContext).forceRender; + if (forceRenderLayoutGroup) forceRender = forceRenderLayoutGroup; + var isMounted = useIsMounted(); + // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key + var filteredChildren = onlyElements(children); + var childrenToRender = filteredChildren; + var exiting = new Set(); + // Keep a living record of the children we're actually rendering so we + // can diff to figure out which are entering and exiting + var presentChildren = React.useRef(childrenToRender); + // A lookup table to quickly reference components by key + var allChildren = React.useRef(new Map()).current; + // If this is the initial component render, just deal with logic surrounding whether + // we play onMount animations or not. + var isInitialRender = React.useRef(true); + useIsomorphicLayoutEffect(function () { + isInitialRender.current = false; + updateChildLookup(filteredChildren, allChildren); + presentChildren.current = childrenToRender; + }); + useUnmountEffect(function () { + isInitialRender.current = true; + allChildren.clear(); + exiting.clear(); + }); + if (isInitialRender.current) { + return React__namespace.createElement(React__namespace.Fragment, null, childrenToRender.map(function (child) { + return React__namespace.createElement(PresenceChild, { + key: getChildKey(child), + isPresent: true, + initial: initial ? undefined : false, + presenceAffectsLayout: presenceAffectsLayout + }, child); + })); + } + // If this is a subsequent render, deal with entering and exiting children + childrenToRender = tslib.__spreadArray([], tslib.__read(childrenToRender), false); + // Diff the keys of the currently-present and target children to update our + // exiting list. + var presentKeys = presentChildren.current.map(getChildKey); + var targetKeys = filteredChildren.map(getChildKey); + // Diff the present children with our target children and mark those that are exiting + var numPresent = presentKeys.length; + for (var i = 0; i < numPresent; i++) { + var key = presentKeys[i]; + if (targetKeys.indexOf(key) === -1) { + exiting.add(key); } } - return createToken(lexer, _tokenKind.TokenKind.NAME, start, position, body.slice(start, position)); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/language/location.mjs": -/*!***********************************************************!*\ - !*** ../../../node_modules/graphql/language/location.mjs ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.getLocation = getLocation; -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -const LineRegExp = /\r\n|[\n\r]/g; -/** - * Represents a location in a Source. - */ + // If we currently have exiting children, and we're deferring rendering incoming children + // until after all current children have exiting, empty the childrenToRender array + if (exitBeforeEnter && exiting.size) { + childrenToRender = []; + } + // Loop through all currently exiting components and clone them to overwrite `animate` + // with any `exit` prop they might have defined. + exiting.forEach(function (key) { + // If this component is actually entering again, early return + if (targetKeys.indexOf(key) !== -1) return; + var child = allChildren.get(key); + if (!child) return; + var insertionIndex = presentKeys.indexOf(key); + var onExit = function () { + allChildren.delete(key); + exiting.delete(key); + // Remove this child from the present children + var removeIndex = presentChildren.current.findIndex(function (presentChild) { + return presentChild.key === key; + }); + presentChildren.current.splice(removeIndex, 1); + // Defer re-rendering until all exiting children have indeed left + if (!exiting.size) { + presentChildren.current = filteredChildren; + if (isMounted.current === false) return; + forceRender(); + onExitComplete && onExitComplete(); + } + }; + childrenToRender.splice(insertionIndex, 0, React__namespace.createElement(PresenceChild, { + key: getChildKey(child), + isPresent: false, + onExitComplete: onExit, + custom: custom, + presenceAffectsLayout: presenceAffectsLayout + }, child)); + }); + // Add `MotionContext` even to children that don't need it to ensure we're rendering + // the same tree between renders + childrenToRender = childrenToRender.map(function (child) { + var key = child.key; + return exiting.has(key) ? child : React__namespace.createElement(PresenceChild, { + key: getChildKey(child), + isPresent: true, + presenceAffectsLayout: presenceAffectsLayout + }, child); + }); + if (env !== "production" && exitBeforeEnter && childrenToRender.length > 1) { + console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."); + } + return React__namespace.createElement(React__namespace.Fragment, null, exiting.size ? childrenToRender : childrenToRender.map(function (child) { + return React.cloneElement(child); + })); +}; /** - * Takes a Source and a UTF-8 character offset, and returns the corresponding - * line and column as a SourceLocation. + * @deprecated */ -function getLocation(source, position) { - let lastLineStart = 0; - let line = 1; - for (const match of source.body.matchAll(LineRegExp)) { - typeof match.index === 'number' || (0, _invariant.invariant)(false); - if (match.index >= position) { - break; - } - lastLineStart = match.index + match[0].length; - line += 1; - } +var DeprecatedLayoutGroupContext = React.createContext(null); +var notify = function (node) { + return !node.isLayoutDirty && node.willUpdate(false); +}; +function nodeGroup() { + var nodes = new Set(); + var subscriptions = new WeakMap(); + var dirtyAll = function () { + return nodes.forEach(notify); + }; return { - line, - column: position + 1 - lastLineStart + add: function (node) { + nodes.add(node); + subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); + }, + remove: function (node) { + var _a; + nodes.delete(node); + (_a = subscriptions.get(node)) === null || _a === void 0 ? void 0 : _a(); + subscriptions.delete(node); + dirtyAll(); + }, + dirty: dirtyAll }; } +var shouldInheritGroup = function (inherit) { + return inherit === true; +}; +var shouldInheritId = function (inherit) { + return shouldInheritGroup(inherit === true) || inherit === "id"; +}; +var LayoutGroup = function (_a) { + var _b, _c; + var children = _a.children, + id = _a.id, + inheritId = _a.inheritId, + _d = _a.inherit, + inherit = _d === void 0 ? true : _d; + // Maintain backwards-compatibility with inheritId until 7.0 + if (inheritId !== undefined) inherit = inheritId; + var layoutGroupContext = React.useContext(LayoutGroupContext); + var deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext); + var _e = tslib.__read(useForceUpdate(), 2), + forceRender = _e[0], + key = _e[1]; + var context = React.useRef(null); + var upstreamId = (_b = layoutGroupContext.id) !== null && _b !== void 0 ? _b : deprecatedLayoutGroupContext; + if (context.current === null) { + if (shouldInheritId(inherit) && upstreamId) { + id = id ? upstreamId + "-" + id : upstreamId; + } + context.current = { + id: id, + group: shouldInheritGroup(inherit) ? (_c = layoutGroupContext === null || layoutGroupContext === void 0 ? void 0 : layoutGroupContext.group) !== null && _c !== void 0 ? _c : nodeGroup() : nodeGroup() + }; + } + var memoizedContext = React.useMemo(function () { + return tslib.__assign(tslib.__assign({}, context.current), { + forceRender: forceRender + }); + }, [key]); + return React__namespace.createElement(LayoutGroupContext.Provider, { + value: memoizedContext + }, children); +}; +var id = 0; +var AnimateSharedLayout = function (_a) { + var children = _a.children; + React__namespace.useEffect(function () { + heyListen.warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations"); + }, []); + return React__namespace.createElement(LayoutGroup, { + id: useConstant(function () { + return "asl-".concat(id++); + }) + }, children); +}; -/***/ }), - -/***/ "../../../node_modules/graphql/language/parser.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/language/parser.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.Parser = void 0; -exports.parse = parse; -exports.parseConstValue = parseConstValue; -exports.parseType = parseType; -exports.parseValue = parseValue; -var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs"); -var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); -var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); -var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs"); -var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); -/** - * Configuration options to control parser behavior - */ - -/** - * Given a GraphQL source, parses it into a Document. - * Throws GraphQLError if a syntax error is encountered. - */ -function parse(source, options) { - const parser = new Parser(source, options); - return parser.parseDocument(); -} /** - * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for - * that value. - * Throws GraphQLError if a syntax error is encountered. + * `MotionConfig` is used to set configuration options for all children `motion` components. * - * This is useful within tools that operate upon GraphQL Values directly and - * in isolation of complete GraphQL documents. + * ```jsx + * import { motion, MotionConfig } from "framer-motion" * - * Consider providing the results to the utility function: valueFromAST(). - */ - -function parseValue(source, options) { - const parser = new Parser(source, options); - parser.expectToken(_tokenKind.TokenKind.SOF); - const value = parser.parseValueLiteral(false); - parser.expectToken(_tokenKind.TokenKind.EOF); - return value; -} -/** - * Similar to parseValue(), but raises a parse error if it encounters a - * variable. The return type will be a constant value. - */ - -function parseConstValue(source, options) { - const parser = new Parser(source, options); - parser.expectToken(_tokenKind.TokenKind.SOF); - const value = parser.parseConstValueLiteral(); - parser.expectToken(_tokenKind.TokenKind.EOF); - return value; -} -/** - * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for - * that type. - * Throws GraphQLError if a syntax error is encountered. - * - * This is useful within tools that operate upon GraphQL Types directly and - * in isolation of complete GraphQL documents. - * - * Consider providing the results to the utility function: typeFromAST(). - */ - -function parseType(source, options) { - const parser = new Parser(source, options); - parser.expectToken(_tokenKind.TokenKind.SOF); - const type = parser.parseTypeReference(); - parser.expectToken(_tokenKind.TokenKind.EOF); - return type; -} -/** - * This class is exported only to assist people in implementing their own parsers - * without duplicating too much code and should be used only as last resort for cases - * such as experimental syntax or if certain features could not be contributed upstream. - * - * It is still part of the internal API and is versioned, so any changes to it are never - * considered breaking changes. If you still need to support multiple versions of the - * library, please use the `versionInfo` variable for version detection. + * export function App() { + * return ( + * + * + * + * ) + * } + * ``` * - * @internal + * @public */ - -class Parser { - constructor(source) { - let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); - this._lexer = new _lexer.Lexer(sourceObj); - this._options = options; - this._tokenCounter = 0; - } +function MotionConfig(_a) { + var children = _a.children, + isValidProp = _a.isValidProp, + config = tslib.__rest(_a, ["children", "isValidProp"]); + isValidProp && loadExternalIsValidProp(isValidProp); /** - * Converts a name lex token into a name parse node. + * Inherit props from any parent MotionConfig components */ - - parseName() { - const token = this.expectToken(_tokenKind.TokenKind.NAME); - return this.node(token, { - kind: _kinds.Kind.NAME, - value: token.value - }); - } // Implements the parsing rules in the Document section. - + config = tslib.__assign(tslib.__assign({}, React.useContext(MotionConfigContext)), config); /** - * Document : Definition+ + * Don't allow isStatic to change between renders as it affects how many hooks + * motion components fire. */ - - parseDocument() { - return this.node(this._lexer.token, { - kind: _kinds.Kind.DOCUMENT, - definitions: this.many(_tokenKind.TokenKind.SOF, this.parseDefinition, _tokenKind.TokenKind.EOF) - }); - } + config.isStatic = useConstant(function () { + return config.isStatic; + }); /** - * Definition : - * - ExecutableDefinition - * - TypeSystemDefinition - * - TypeSystemExtension - * - * ExecutableDefinition : - * - OperationDefinition - * - FragmentDefinition - * - * TypeSystemDefinition : - * - SchemaDefinition - * - TypeDefinition - * - DirectiveDefinition - * - * TypeDefinition : - * - ScalarTypeDefinition - * - ObjectTypeDefinition - * - InterfaceTypeDefinition - * - UnionTypeDefinition - * - EnumTypeDefinition - * - InputObjectTypeDefinition + * Creating a new config context object will re-render every `motion` component + * every time it renders. So we only want to create a new one sparingly. */ + var context = React.useMemo(function () { + return config; + }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]); + return React__namespace.createElement(MotionConfigContext.Provider, { + value: context + }, children); +} - parseDefinition() { - if (this.peek(_tokenKind.TokenKind.BRACE_L)) { - return this.parseOperationDefinition(); - } // Many definitions begin with a description and require a lookahead. - - const hasDescription = this.peekDescription(); - const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token; - if (keywordToken.kind === _tokenKind.TokenKind.NAME) { - switch (keywordToken.value) { - case 'schema': - return this.parseSchemaDefinition(); - case 'scalar': - return this.parseScalarTypeDefinition(); - case 'type': - return this.parseObjectTypeDefinition(); - case 'interface': - return this.parseInterfaceTypeDefinition(); - case 'union': - return this.parseUnionTypeDefinition(); - case 'enum': - return this.parseEnumTypeDefinition(); - case 'input': - return this.parseInputObjectTypeDefinition(); - case 'directive': - return this.parseDirectiveDefinition(); - } - if (hasDescription) { - throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, 'Unexpected description, descriptions are supported only on type definitions.'); - } - switch (keywordToken.value) { - case 'query': - case 'mutation': - case 'subscription': - return this.parseOperationDefinition(); - case 'fragment': - return this.parseFragmentDefinition(); - case 'extend': - return this.parseTypeSystemExtension(); - } - } - throw this.unexpected(keywordToken); - } // Implements the parsing rules in the Operations section. - +/** + * Used in conjunction with the `m` component to reduce bundle size. + * + * `m` is a version of the `motion` component that only loads functionality + * critical for the initial render. + * + * `LazyMotion` can then be used to either synchronously or asynchronously + * load animation and gesture support. + * + * ```jsx + * // Synchronous loading + * import { LazyMotion, m, domAnimations } from "framer-motion" + * + * function App() { + * return ( + * + * + * + * ) + * } + * + * // Asynchronous loading + * import { LazyMotion, m } from "framer-motion" + * + * function App() { + * return ( + * import('./path/to/domAnimations')}> + * + * + * ) + * } + * ``` + * + * @public + */ +function LazyMotion(_a) { + var children = _a.children, + features = _a.features, + _b = _a.strict, + strict = _b === void 0 ? false : _b; + var _c = tslib.__read(React.useState(!isLazyBundle(features)), 2), + setIsLoaded = _c[1]; + var loadedRenderer = React.useRef(undefined); /** - * OperationDefinition : - * - SelectionSet - * - OperationType Name? VariableDefinitions? Directives? SelectionSet + * If this is a synchronous load, load features immediately */ - - parseOperationDefinition() { - const start = this._lexer.token; - if (this.peek(_tokenKind.TokenKind.BRACE_L)) { - return this.node(start, { - kind: _kinds.Kind.OPERATION_DEFINITION, - operation: _ast.OperationTypeNode.QUERY, - name: undefined, - variableDefinitions: [], - directives: [], - selectionSet: this.parseSelectionSet() + if (!isLazyBundle(features)) { + var renderer = features.renderer, + loadedFeatures = tslib.__rest(features, ["renderer"]); + loadedRenderer.current = renderer; + loadFeatures(loadedFeatures); + } + React.useEffect(function () { + if (isLazyBundle(features)) { + features().then(function (_a) { + var renderer = _a.renderer, + loadedFeatures = tslib.__rest(_a, ["renderer"]); + loadFeatures(loadedFeatures); + loadedRenderer.current = renderer; + setIsLoaded(true); }); } - const operation = this.parseOperationType(); - let name; - if (this.peek(_tokenKind.TokenKind.NAME)) { - name = this.parseName(); + }, []); + return React__namespace.createElement(LazyContext.Provider, { + value: { + renderer: loadedRenderer.current, + strict: strict } - return this.node(start, { - kind: _kinds.Kind.OPERATION_DEFINITION, - operation, - name, - variableDefinitions: this.parseVariableDefinitions(), - directives: this.parseDirectives(false), - selectionSet: this.parseSelectionSet() - }); + }, children); +} +function isLazyBundle(features) { + return typeof features === "function"; +} +var ReorderContext = React.createContext(null); +function checkReorder(order, value, offset, velocity) { + if (!velocity) return order; + var index = order.findIndex(function (item) { + return item.value === value; + }); + if (index === -1) return order; + var nextOffset = velocity > 0 ? 1 : -1; + var nextItem = order[index + nextOffset]; + if (!nextItem) return order; + var item = order[index]; + var nextLayout = nextItem.layout; + var nextItemCenter = popmotion.mix(nextLayout.min, nextLayout.max, 0.5); + if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) { + return moveItem(order, index, index + nextOffset); } - /** - * OperationType : one of query mutation subscription - */ - - parseOperationType() { - const operationToken = this.expectToken(_tokenKind.TokenKind.NAME); - switch (operationToken.value) { - case 'query': - return _ast.OperationTypeNode.QUERY; - case 'mutation': - return _ast.OperationTypeNode.MUTATION; - case 'subscription': - return _ast.OperationTypeNode.SUBSCRIPTION; + return order; +} +function ReorderGroup(_a, externalRef) { + var children = _a.children, + _b = _a.as, + as = _b === void 0 ? "ul" : _b, + _c = _a.axis, + axis = _c === void 0 ? "y" : _c, + onReorder = _a.onReorder, + values = _a.values, + props = tslib.__rest(_a, ["children", "as", "axis", "onReorder", "values"]); + var Component = useConstant(function () { + return motion(as); + }); + var order = []; + var isReordering = React.useRef(false); + heyListen.invariant(Boolean(values), "Reorder.Group must be provided a values prop"); + var context = { + axis: axis, + registerItem: function (value, layout) { + /** + * Ensure entries can't add themselves more than once + */ + if (layout && order.findIndex(function (entry) { + return value === entry.value; + }) === -1) { + order.push({ + value: value, + layout: layout[axis] + }); + order.sort(compareMin); + } + }, + updateOrder: function (id, offset, velocity) { + if (isReordering.current) return; + var newOrder = checkReorder(order, id, offset, velocity); + if (order !== newOrder) { + isReordering.current = true; + onReorder(newOrder.map(getValue).filter(function (value) { + return values.indexOf(value) !== -1; + })); + } } - throw this.unexpected(operationToken); - } - /** - * VariableDefinitions : ( VariableDefinition+ ) - */ + }; + React.useEffect(function () { + isReordering.current = false; + }); + return React__namespace.createElement(Component, tslib.__assign({}, props, { + ref: externalRef + }), React__namespace.createElement(ReorderContext.Provider, { + value: context + }, children)); +} +var Group = React.forwardRef(ReorderGroup); +function getValue(item) { + return item.value; +} +function compareMin(a, b) { + return a.layout.min - b.layout.min; +} - parseVariableDefinitions() { - return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseVariableDefinition, _tokenKind.TokenKind.PAREN_R); - } +/** + * Creates a `MotionValue` to track the state and velocity of a value. + * + * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop. + * + * ```jsx + * export const MyComponent = () => { + * const scale = useMotionValue(1) + * + * return + * } + * ``` + * + * @param initial - The initial state. + * + * @public + */ +function useMotionValue(initial) { + var value = useConstant(function () { + return motionValue(initial); + }); /** - * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? + * If this motion value is being used in static mode, like on + * the Framer canvas, force components to rerender when the motion + * value is updated. */ - - parseVariableDefinition() { - return this.node(this._lexer.token, { - kind: _kinds.Kind.VARIABLE_DEFINITION, - variable: this.parseVariable(), - type: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseTypeReference()), - defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.parseConstValueLiteral() : undefined, - directives: this.parseConstDirectives() - }); + var isStatic = React.useContext(MotionConfigContext).isStatic; + if (isStatic) { + var _a = tslib.__read(React.useState(initial), 2), + setLatest_1 = _a[1]; + React.useEffect(function () { + return value.onChange(setLatest_1); + }, []); } - /** - * Variable : $ Name - */ - - parseVariable() { - const start = this._lexer.token; - this.expectToken(_tokenKind.TokenKind.DOLLAR); - return this.node(start, { - kind: _kinds.Kind.VARIABLE, - name: this.parseName() - }); + return value; +} +var isCustomValueType = function (v) { + return typeof v === "object" && v.mix; +}; +var getMixer = function (v) { + return isCustomValueType(v) ? v.mix : undefined; +}; +function transform() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; } - /** - * ``` - * SelectionSet : { Selection+ } - * ``` - */ - - parseSelectionSet() { - return this.node(this._lexer.token, { - kind: _kinds.Kind.SELECTION_SET, - selections: this.many(_tokenKind.TokenKind.BRACE_L, this.parseSelection, _tokenKind.TokenKind.BRACE_R) + var useImmediate = !Array.isArray(args[0]); + var argOffset = useImmediate ? 0 : -1; + var inputValue = args[0 + argOffset]; + var inputRange = args[1 + argOffset]; + var outputRange = args[2 + argOffset]; + var options = args[3 + argOffset]; + var interpolator = popmotion.interpolate(inputRange, outputRange, tslib.__assign({ + mixer: getMixer(outputRange[0]) + }, options)); + return useImmediate ? interpolator(inputValue) : interpolator; +} +function useOnChange(value, callback) { + useIsomorphicLayoutEffect(function () { + if (isMotionValue(value)) return value.onChange(callback); + }, [callback]); +} +function useMultiOnChange(values, handler) { + useIsomorphicLayoutEffect(function () { + var subscriptions = values.map(function (value) { + return value.onChange(handler); }); - } + return function () { + return subscriptions.forEach(function (unsubscribe) { + return unsubscribe(); + }); + }; + }); +} +function useCombineMotionValues(values, combineValues) { /** - * Selection : - * - Field - * - FragmentSpread - * - InlineFragment + * Initialise the returned motion value. This remains the same between renders. */ - - parseSelection() { - return this.peek(_tokenKind.TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); - } + var value = useMotionValue(combineValues()); /** - * Field : Alias? Name Arguments? Directives? SelectionSet? - * - * Alias : Name : + * Create a function that will update the template motion value with the latest values. + * This is pre-bound so whenever a motion value updates it can schedule its + * execution in Framesync. If it's already been scheduled it won't be fired twice + * in a single frame. */ - - parseField() { - const start = this._lexer.token; - const nameOrAlias = this.parseName(); - let alias; - let name; - if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) { - alias = nameOrAlias; - name = this.parseName(); - } else { - name = nameOrAlias; - } - return this.node(start, { - kind: _kinds.Kind.FIELD, - alias, - name, - arguments: this.parseArguments(false), - directives: this.parseDirectives(false), - selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined - }); - } + var updateValue = function () { + return value.set(combineValues()); + }; /** - * Arguments[Const] : ( Argument[?Const]+ ) + * Synchronously update the motion value with the latest values during the render. + * This ensures that within a React render, the styles applied to the DOM are up-to-date. */ - - parseArguments(isConst) { - const item = isConst ? this.parseConstArgument : this.parseArgument; - return this.optionalMany(_tokenKind.TokenKind.PAREN_L, item, _tokenKind.TokenKind.PAREN_R); - } + updateValue(); /** - * Argument[Const] : Name : Value[?Const] + * Subscribe to all motion values found within the template. Whenever any of them change, + * schedule an update. */ - - parseArgument() { - let isConst = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - const start = this._lexer.token; - const name = this.parseName(); - this.expectToken(_tokenKind.TokenKind.COLON); - return this.node(start, { - kind: _kinds.Kind.ARGUMENT, - name, - value: this.parseValueLiteral(isConst) - }); - } - parseConstArgument() { - return this.parseArgument(true); - } // Implements the parsing rules in the Fragments section. - - /** - * Corresponds to both FragmentSpread and InlineFragment in the spec. - * - * FragmentSpread : ... FragmentName Directives? - * - * InlineFragment : ... TypeCondition? Directives? SelectionSet - */ - - parseFragment() { - const start = this._lexer.token; - this.expectToken(_tokenKind.TokenKind.SPREAD); - const hasTypeCondition = this.expectOptionalKeyword('on'); - if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) { - return this.node(start, { - kind: _kinds.Kind.FRAGMENT_SPREAD, - name: this.parseFragmentName(), - directives: this.parseDirectives(false) - }); + useMultiOnChange(values, function () { + return sync__default["default"].update(updateValue, false, true); + }); + return value; +} +function useTransform(input, inputRangeOrTransformer, outputRange, options) { + var transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRange, options); + return Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], function (_a) { + var _b = tslib.__read(_a, 1), + latest = _b[0]; + return transformer(latest); + }); +} +function useListTransform(values, transformer) { + var latest = useConstant(function () { + return []; + }); + return useCombineMotionValues(values, function () { + latest.length = 0; + var numValues = values.length; + for (var i = 0; i < numValues; i++) { + latest[i] = values[i].get(); } - return this.node(start, { - kind: _kinds.Kind.INLINE_FRAGMENT, - typeCondition: hasTypeCondition ? this.parseNamedType() : undefined, - directives: this.parseDirectives(false), - selectionSet: this.parseSelectionSet() - }); + return transformer(latest); + }); +} +function useDefaultMotionValue(value, defaultValue) { + if (defaultValue === void 0) { + defaultValue = 0; } - /** - * FragmentDefinition : - * - fragment FragmentName on TypeCondition Directives? SelectionSet - * - * TypeCondition : NamedType - */ - - parseFragmentDefinition() { - const start = this._lexer.token; - this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes - // the grammar of FragmentDefinition: - // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet + return isMotionValue(value) ? value : useMotionValue(defaultValue); +} +function ReorderItem(_a, externalRef) { + var children = _a.children, + style = _a.style, + value = _a.value, + _b = _a.as, + as = _b === void 0 ? "li" : _b, + onDrag = _a.onDrag, + _c = _a.layout, + layout = _c === void 0 ? true : _c, + props = tslib.__rest(_a, ["children", "style", "value", "as", "onDrag", "layout"]); + var Component = useConstant(function () { + return motion(as); + }); + var context = React.useContext(ReorderContext); + var point = { + x: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.x), + y: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.y) + }; + var zIndex = useTransform([point.x, point.y], function (_a) { + var _b = tslib.__read(_a, 2), + latestX = _b[0], + latestY = _b[1]; + return latestX || latestY ? 1 : "unset"; + }); + var measuredLayout = React.useRef(null); + heyListen.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group"); + var _d = context, + axis = _d.axis, + registerItem = _d.registerItem, + updateOrder = _d.updateOrder; + React.useEffect(function () { + registerItem(value, measuredLayout.current); + }, [context]); + return React__namespace.createElement(Component, tslib.__assign({ + drag: axis + }, props, { + dragSnapToOrigin: true, + style: tslib.__assign(tslib.__assign({}, style), { + x: point.x, + y: point.y, + zIndex: zIndex + }), + layout: layout, + onDrag: function (event, gesturePoint) { + var velocity = gesturePoint.velocity; + velocity[axis] && updateOrder(value, point[axis].get(), velocity[axis]); + onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, gesturePoint); + }, + onLayoutMeasure: function (measured) { + measuredLayout.current = measured; + }, + ref: externalRef + }), children); +} +var Item = React.forwardRef(ReorderItem); +var Reorder = { + Group: Group, + Item: Item +}; - if (this._options.allowLegacyFragmentVariables === true) { - return this.node(start, { - kind: _kinds.Kind.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - variableDefinitions: this.parseVariableDefinitions(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(false), - selectionSet: this.parseSelectionSet() - }); - } - return this.node(start, { - kind: _kinds.Kind.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(false), - selectionSet: this.parseSelectionSet() - }); - } - /** - * FragmentName : Name but not `on` - */ +/** + * @public + */ +var domAnimation = tslib.__assign(tslib.__assign({ + renderer: createDomVisualElement +}, animations), gestureAnimations); - parseFragmentName() { - if (this._lexer.token.value === 'on') { - throw this.unexpected(); - } - return this.parseName(); - } // Implements the parsing rules in the Values section. +/** + * @public + */ +var domMax = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, domAnimation), drag), layoutFeatures), { + projectionNodeConstructor: HTMLProjectionNode +}); +/** + * Combine multiple motion values into a new one using a string template literal. + * + * ```jsx + * import { + * motion, + * useSpring, + * useMotionValue, + * useMotionTemplate + * } from "framer-motion" + * + * function Component() { + * const shadowX = useSpring(0) + * const shadowY = useMotionValue(0) + * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))` + * + * return + * } + * ``` + * + * @public + */ +function useMotionTemplate(fragments) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } /** - * Value[Const] : - * - [~Const] Variable - * - IntValue - * - FloatValue - * - StringValue - * - BooleanValue - * - NullValue - * - EnumValue - * - ListValue[?Const] - * - ObjectValue[?Const] - * - * BooleanValue : one of `true` `false` - * - * NullValue : `null` - * - * EnumValue : Name but not `true`, `false` or `null` + * Create a function that will build a string from the latest motion values. */ - - parseValueLiteral(isConst) { - const token = this._lexer.token; - switch (token.kind) { - case _tokenKind.TokenKind.BRACKET_L: - return this.parseList(isConst); - case _tokenKind.TokenKind.BRACE_L: - return this.parseObject(isConst); - case _tokenKind.TokenKind.INT: - this.advanceLexer(); - return this.node(token, { - kind: _kinds.Kind.INT, - value: token.value - }); - case _tokenKind.TokenKind.FLOAT: - this.advanceLexer(); - return this.node(token, { - kind: _kinds.Kind.FLOAT, - value: token.value - }); - case _tokenKind.TokenKind.STRING: - case _tokenKind.TokenKind.BLOCK_STRING: - return this.parseStringLiteral(); - case _tokenKind.TokenKind.NAME: - this.advanceLexer(); - switch (token.value) { - case 'true': - return this.node(token, { - kind: _kinds.Kind.BOOLEAN, - value: true - }); - case 'false': - return this.node(token, { - kind: _kinds.Kind.BOOLEAN, - value: false - }); - case 'null': - return this.node(token, { - kind: _kinds.Kind.NULL - }); - default: - return this.node(token, { - kind: _kinds.Kind.ENUM, - value: token.value - }); - } - case _tokenKind.TokenKind.DOLLAR: - if (isConst) { - this.expectToken(_tokenKind.TokenKind.DOLLAR); - if (this._lexer.token.kind === _tokenKind.TokenKind.NAME) { - const varName = this._lexer.token.value; - throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected variable "$${varName}" in constant value.`); - } else { - throw this.unexpected(token); - } - } - return this.parseVariable(); - default: - throw this.unexpected(); + var numFragments = fragments.length; + function buildValue() { + var output = ""; + for (var i = 0; i < numFragments; i++) { + output += fragments[i]; + var value = values[i]; + if (value) output += values[i].get(); } + return output; } - parseConstValueLiteral() { - return this.parseValueLiteral(true); + return useCombineMotionValues(values, buildValue); +} + +/** + * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state. + * + * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber + * to another `MotionValue`. + * + * @remarks + * + * ```jsx + * const x = useSpring(0, { stiffness: 300 }) + * const y = useSpring(x, { damping: 10 }) + * ``` + * + * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value. + * @param springConfig - Configuration options for the spring. + * @returns `MotionValue` + * + * @public + */ +function useSpring(source, config) { + if (config === void 0) { + config = {}; } - parseStringLiteral() { - const token = this._lexer.token; - this.advanceLexer(); - return this.node(token, { - kind: _kinds.Kind.STRING, - value: token.value, - block: token.kind === _tokenKind.TokenKind.BLOCK_STRING + var isStatic = React.useContext(MotionConfigContext).isStatic; + var activeSpringAnimation = React.useRef(null); + var value = useMotionValue(isMotionValue(source) ? source.get() : source); + React.useMemo(function () { + return value.attach(function (v, set) { + /** + * A more hollistic approach to this might be to use isStatic to fix VisualElement animations + * at that level, but this will work for now + */ + if (isStatic) return set(v); + if (activeSpringAnimation.current) { + activeSpringAnimation.current.stop(); + } + activeSpringAnimation.current = popmotion.animate(tslib.__assign(tslib.__assign({ + from: value.get(), + to: v, + velocity: value.getVelocity() + }, config), { + onUpdate: set + })); + return value.get(); }); - } - /** - * ListValue[Const] : - * - [ ] - * - [ Value[?Const]+ ] - */ + }, [JSON.stringify(config)]); + useOnChange(source, function (v) { + return value.set(parseFloat(v)); + }); + return value; +} - parseList(isConst) { - const item = () => this.parseValueLiteral(isConst); - return this.node(this._lexer.token, { - kind: _kinds.Kind.LIST, - values: this.any(_tokenKind.TokenKind.BRACKET_L, item, _tokenKind.TokenKind.BRACKET_R) +/** + * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes. + * + * ```javascript + * const x = useMotionValue(0) + * const xVelocity = useVelocity(x) + * const xAcceleration = useVelocity(xVelocity) + * ``` + * + * @public + */ +function useVelocity(value) { + var velocity = useMotionValue(value.getVelocity()); + React.useEffect(function () { + return value.velocityUpdateSubscribers.add(function (newVelocity) { + velocity.set(newVelocity); }); + }, [value]); + return velocity; +} +var createScrollMotionValues = function () { + return { + scrollX: motionValue(0), + scrollY: motionValue(0), + scrollXProgress: motionValue(0), + scrollYProgress: motionValue(0) + }; +}; +function useScroll(_a) { + if (_a === void 0) { + _a = {}; } - /** - * ``` - * ObjectValue[Const] : - * - { } - * - { ObjectField[?Const]+ } - * ``` - */ + var container = _a.container, + target = _a.target, + options = tslib.__rest(_a, ["container", "target"]); + var values = useConstant(createScrollMotionValues); + useIsomorphicLayoutEffect(function () { + return dom.scroll(function (_a) { + var x = _a.x, + y = _a.y; + values.scrollX.set(x.current); + values.scrollXProgress.set(x.progress); + values.scrollY.set(y.current); + values.scrollYProgress.set(y.progress); + }, tslib.__assign(tslib.__assign({}, options), { + container: (container === null || container === void 0 ? void 0 : container.current) || undefined, + target: (target === null || target === void 0 ? void 0 : target.current) || undefined + })); + }, []); + return values; +} +function useElementScroll(ref) { + warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref })."); + return useScroll({ + container: ref + }); +} +function useViewportScroll() { + warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll()."); + return useScroll(); +} +var getCurrentTime = typeof performance !== "undefined" ? function () { + return performance.now(); +} : function () { + return Date.now(); +}; +function useAnimationFrame(callback) { + var initialTimestamp = useConstant(getCurrentTime); + var isStatic = React.useContext(MotionConfigContext).isStatic; + React.useEffect(function () { + if (isStatic) return; + var provideTimeSinceStart = function (_a) { + var timestamp = _a.timestamp; + callback(timestamp - initialTimestamp); + }; + sync__default["default"].update(provideTimeSinceStart, true); + return function () { + return sync.cancelSync.update(provideTimeSinceStart); + }; + }, [callback]); +} +function useTime() { + var time = useMotionValue(0); + useAnimationFrame(function (t) { + return time.set(t); + }); + return time; +} - parseObject(isConst) { - const item = () => this.parseObjectField(isConst); - return this.node(this._lexer.token, { - kind: _kinds.Kind.OBJECT, - fields: this.any(_tokenKind.TokenKind.BRACE_L, item, _tokenKind.TokenKind.BRACE_R) - }); - } +/** + * @public + */ +function animationControls() { /** - * ObjectField[Const] : Name : Value[?Const] + * Track whether the host component has mounted. */ - - parseObjectField(isConst) { - const start = this._lexer.token; - const name = this.parseName(); - this.expectToken(_tokenKind.TokenKind.COLON); - return this.node(start, { - kind: _kinds.Kind.OBJECT_FIELD, - name, - value: this.parseValueLiteral(isConst) - }); - } // Implements the parsing rules in the Directives section. - + var hasMounted = false; /** - * Directives[Const] : Directive[?Const]+ + * Pending animations that are started before a component is mounted. + * TODO: Remove this as animations should only run in effects */ - - parseDirectives(isConst) { - const directives = []; - while (this.peek(_tokenKind.TokenKind.AT)) { - directives.push(this.parseDirective(isConst)); - } - return directives; - } - parseConstDirectives() { - return this.parseDirectives(true); - } + var pendingAnimations = []; /** - * ``` - * Directive[Const] : @ Name Arguments[?Const]? - * ``` + * A collection of linked component animation controls. */ - - parseDirective(isConst) { - const start = this._lexer.token; - this.expectToken(_tokenKind.TokenKind.AT); - return this.node(start, { - kind: _kinds.Kind.DIRECTIVE, - name: this.parseName(), - arguments: this.parseArguments(isConst) - }); - } // Implements the parsing rules in the Types section. - - /** - * Type : - * - NamedType - * - ListType - * - NonNullType - */ - - parseTypeReference() { - const start = this._lexer.token; - let type; - if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) { - const innerType = this.parseTypeReference(); - this.expectToken(_tokenKind.TokenKind.BRACKET_R); - type = this.node(start, { - kind: _kinds.Kind.LIST_TYPE, - type: innerType + var subscribers = new Set(); + var controls = { + subscribe: function (visualElement) { + subscribers.add(visualElement); + return function () { + return void subscribers.delete(visualElement); + }; + }, + start: function (definition, transitionOverride) { + /** + * TODO: We only perform this hasMounted check because in Framer we used to + * encourage the ability to start an animation within the render phase. This + * isn't behaviour concurrent-safe so when we make Framer concurrent-safe + * we can ditch this. + */ + if (hasMounted) { + var animations_1 = []; + subscribers.forEach(function (visualElement) { + animations_1.push(animateVisualElement(visualElement, definition, { + transitionOverride: transitionOverride + })); + }); + return Promise.all(animations_1); + } else { + return new Promise(function (resolve) { + pendingAnimations.push({ + animation: [definition, transitionOverride], + resolve: resolve + }); + }); + } + }, + set: function (definition) { + heyListen.invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."); + return subscribers.forEach(function (visualElement) { + setValues(visualElement, definition); }); - } else { - type = this.parseNamedType(); - } - if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) { - return this.node(start, { - kind: _kinds.Kind.NON_NULL_TYPE, - type + }, + stop: function () { + subscribers.forEach(function (visualElement) { + stopAnimation(visualElement); + }); + }, + mount: function () { + hasMounted = true; + pendingAnimations.forEach(function (_a) { + var animation = _a.animation, + resolve = _a.resolve; + controls.start.apply(controls, tslib.__spreadArray([], tslib.__read(animation), false)).then(resolve); }); + return function () { + hasMounted = false; + controls.stop(); + }; } - return type; - } - /** - * NamedType : Name - */ + }; + return controls; +} - parseNamedType() { - return this.node(this._lexer.token, { - kind: _kinds.Kind.NAMED_TYPE, - name: this.parseName() - }); - } // Implements the parsing rules in the Type Definition section. +/** + * Creates `AnimationControls`, which can be used to manually start, stop + * and sequence animations on one or more components. + * + * The returned `AnimationControls` should be passed to the `animate` property + * of the components you want to animate. + * + * These components can then be animated with the `start` method. + * + * ```jsx + * import * as React from 'react' + * import { motion, useAnimation } from 'framer-motion' + * + * export function MyComponent(props) { + * const controls = useAnimation() + * + * controls.start({ + * x: 100, + * transition: { duration: 0.5 }, + * }) + * + * return + * } + * ``` + * + * @returns Animation controller with `start` and `stop` methods + * + * @public + */ +function useAnimationControls() { + var controls = useConstant(animationControls); + React.useEffect(controls.mount, []); + return controls; +} +var useAnimation = useAnimationControls; - peekDescription() { - return this.peek(_tokenKind.TokenKind.STRING) || this.peek(_tokenKind.TokenKind.BLOCK_STRING); +/** + * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments. + * + * An index value can be passed to the returned `cycle` function to cycle to a specific index. + * + * ```jsx + * import * as React from "react" + * import { motion, useCycle } from "framer-motion" + * + * export const MyComponent = () => { + * const [x, cycleX] = useCycle(0, 50, 100) + * + * return ( + * cycleX()} + * /> + * ) + * } + * ``` + * + * @param items - items to cycle through + * @returns [currentState, cycleState] + * + * @public + */ +function useCycle() { + var items = []; + for (var _i = 0; _i < arguments.length; _i++) { + items[_i] = arguments[_i]; } - /** - * Description : StringValue - */ + var index = React.useRef(0); + var _a = tslib.__read(React.useState(items[index.current]), 2), + item = _a[0], + setItem = _a[1]; + var runCycle = React.useCallback(function (next) { + index.current = typeof next !== "number" ? popmotion.wrap(0, items.length, index.current + 1) : next; + setItem(items[index.current]); + }, tslib.__spreadArray([items.length], tslib.__read(items), false)); + return [item, runCycle]; +} +function useInView(ref, _a) { + var _b = _a === void 0 ? {} : _a, + root = _b.root, + margin = _b.margin, + amount = _b.amount, + _c = _b.once, + once = _c === void 0 ? false : _c; + var _d = tslib.__read(React.useState(false), 2), + isInView = _d[0], + setInView = _d[1]; + React.useEffect(function () { + var _a; + if (!ref.current || once && isInView) return; + var onEnter = function () { + setInView(true); + return once ? undefined : function () { + return setInView(false); + }; + }; + var options = { + root: (_a = root === null || root === void 0 ? void 0 : root.current) !== null && _a !== void 0 ? _a : undefined, + margin: margin, + amount: amount === "some" ? "any" : amount + }; + return dom.inView(ref.current, onEnter, options); + }, [root, ref, margin, once]); + return isInView; +} - parseDescription() { - if (this.peekDescription()) { - return this.parseStringLiteral(); - } +/** + * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components. + * + * ```jsx + * const dragControls = useDragControls() + * + * function startDrag(event) { + * dragControls.start(event, { snapToCursor: true }) + * } + * + * return ( + * <> + *
+ * + * + * ) + * ``` + * + * @public + */ +var DragControls = /** @class */function () { + function DragControls() { + this.componentControls = new Set(); } /** - * ``` - * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } - * ``` + * Subscribe a component's internal `VisualElementDragControls` to the user-facing API. + * + * @internal */ - - parseSchemaDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('schema'); - const directives = this.parseConstDirectives(); - const operationTypes = this.many(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); - return this.node(start, { - kind: _kinds.Kind.SCHEMA_DEFINITION, - description, - directives, - operationTypes - }); - } + DragControls.prototype.subscribe = function (controls) { + var _this = this; + this.componentControls.add(controls); + return function () { + return _this.componentControls.delete(controls); + }; + }; /** - * OperationTypeDefinition : OperationType : NamedType + * Start a drag gesture on every `motion` component that has this set of drag controls + * passed into it via the `dragControls` prop. + * + * ```jsx + * dragControls.start(e, { + * snapToCursor: true + * }) + * ``` + * + * @param event - PointerEvent + * @param options - Options + * + * @public */ - - parseOperationTypeDefinition() { - const start = this._lexer.token; - const operation = this.parseOperationType(); - this.expectToken(_tokenKind.TokenKind.COLON); - const type = this.parseNamedType(); - return this.node(start, { - kind: _kinds.Kind.OPERATION_TYPE_DEFINITION, - operation, - type + DragControls.prototype.start = function (event, options) { + this.componentControls.forEach(function (controls) { + controls.start(event.nativeEvent || event, options); }); - } - /** - * ScalarTypeDefinition : Description? scalar Name Directives[Const]? - */ - - parseScalarTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('scalar'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - return this.node(start, { - kind: _kinds.Kind.SCALAR_TYPE_DEFINITION, - description, - name, - directives + }; + return DragControls; +}(); +var createDragControls = function () { + return new DragControls(); +}; +/** + * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop + * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we + * might want to initiate that dragging from a different component than the draggable one. + * + * By creating a `dragControls` using the `useDragControls` hook, we can pass this into + * the draggable component's `dragControls` prop. It exposes a `start` method + * that can start dragging from pointer events on other components. + * + * ```jsx + * const dragControls = useDragControls() + * + * function startDrag(event) { + * dragControls.start(event, { snapToCursor: true }) + * } + * + * return ( + * <> + *
+ * + * + * ) + * ``` + * + * @public + */ +function useDragControls() { + return useConstant(createDragControls); +} +function useInstantLayoutTransition() { + return startTransition; +} +function startTransition(cb) { + if (!rootProjectionNode.current) return; + rootProjectionNode.current.isUpdating = false; + rootProjectionNode.current.blockUpdate(); + cb === null || cb === void 0 ? void 0 : cb(); +} +function useInstantTransition() { + var _a = tslib.__read(useForceUpdate(), 2), + forceUpdate = _a[0], + forcedRenderCount = _a[1]; + var startInstantLayoutTransition = useInstantLayoutTransition(); + React.useEffect(function () { + /** + * Unblock after two animation frames, otherwise this will unblock too soon. + */ + sync__default["default"].postRender(function () { + return sync__default["default"].postRender(function () { + return instantAnimationState.current = false; + }); }); - } - /** - * ObjectTypeDefinition : - * Description? - * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? - */ - - parseObjectTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('type'); - const name = this.parseName(); - const interfaces = this.parseImplementsInterfaces(); - const directives = this.parseConstDirectives(); - const fields = this.parseFieldsDefinition(); - return this.node(start, { - kind: _kinds.Kind.OBJECT_TYPE_DEFINITION, - description, - name, - interfaces, - directives, - fields + }, [forcedRenderCount]); + return function (callback) { + startInstantLayoutTransition(function () { + instantAnimationState.current = true; + forceUpdate(); + callback(); }); + }; +} +function useResetProjection() { + var reset = React__namespace.useCallback(function () { + var root = rootProjectionNode.current; + if (!root) return; + root.resetTree(); + }, []); + return reset; +} +var createObject = function () { + return {}; +}; +var stateVisualElement = visualElement({ + build: function () {}, + measureViewportBox: createBox, + resetTransform: function () {}, + restoreTransform: function () {}, + removeValueFromRenderState: function () {}, + render: function () {}, + scrapeMotionValuesFromProps: createObject, + readValueFromInstance: function (_state, key, options) { + return options.initialState[key] || 0; + }, + makeTargetAnimatable: function (element, _a) { + var transition = _a.transition, + transitionEnd = _a.transitionEnd, + target = tslib.__rest(_a, ["transition", "transitionEnd"]); + var origin = getOrigin(target, transition || {}, element); + checkTargetForNewValues(element, target, origin); + return tslib.__assign({ + transition: transition, + transitionEnd: transitionEnd + }, target); } - /** - * ImplementsInterfaces : - * - implements `&`? NamedType - * - ImplementsInterfaces & NamedType - */ - - parseImplementsInterfaces() { - return this.expectOptionalKeyword('implements') ? this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType) : []; - } - /** - * ``` - * FieldsDefinition : { FieldDefinition+ } - * ``` - */ - - parseFieldsDefinition() { - return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseFieldDefinition, _tokenKind.TokenKind.BRACE_R); - } - /** - * FieldDefinition : - * - Description? Name ArgumentsDefinition? : Type Directives[Const]? - */ - - parseFieldDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - const name = this.parseName(); - const args = this.parseArgumentDefs(); - this.expectToken(_tokenKind.TokenKind.COLON); - const type = this.parseTypeReference(); - const directives = this.parseConstDirectives(); - return this.node(start, { - kind: _kinds.Kind.FIELD_DEFINITION, - description, - name, - arguments: args, - type, - directives +}); +var useVisualState = makeUseVisualState({ + scrapeMotionValuesFromProps: createObject, + createRenderState: createObject +}); +/** + * This is not an officially supported API and may be removed + * on any version. + */ +function useAnimatedState(initialState) { + var _a = tslib.__read(React.useState(initialState), 2), + animationState = _a[0], + setAnimationState = _a[1]; + var visualState = useVisualState({}, false); + var element = useConstant(function () { + return stateVisualElement({ + props: {}, + visualState: visualState + }, { + initialState: initialState }); - } - /** - * ArgumentsDefinition : ( InputValueDefinition+ ) - */ - - parseArgumentDefs() { - return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseInputValueDef, _tokenKind.TokenKind.PAREN_R); - } - /** - * InputValueDefinition : - * - Description? Name : Type DefaultValue? Directives[Const]? - */ - - parseInputValueDef() { - const start = this._lexer.token; - const description = this.parseDescription(); - const name = this.parseName(); - this.expectToken(_tokenKind.TokenKind.COLON); - const type = this.parseTypeReference(); - let defaultValue; - if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) { - defaultValue = this.parseConstValueLiteral(); - } - const directives = this.parseConstDirectives(); - return this.node(start, { - kind: _kinds.Kind.INPUT_VALUE_DEFINITION, - description, - name, - type, - defaultValue, - directives + }); + React.useEffect(function () { + element.mount({}); + return element.unmount; + }, [element]); + React.useEffect(function () { + element.setProps({ + onUpdate: function (v) { + setAnimationState(tslib.__assign({}, v)); + } }); - } - /** - * InterfaceTypeDefinition : - * - Description? interface Name Directives[Const]? FieldsDefinition? - */ - - parseInterfaceTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('interface'); - const name = this.parseName(); - const interfaces = this.parseImplementsInterfaces(); - const directives = this.parseConstDirectives(); - const fields = this.parseFieldsDefinition(); - return this.node(start, { - kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION, - description, - name, - interfaces, - directives, - fields - }); - } - /** - * UnionTypeDefinition : - * - Description? union Name Directives[Const]? UnionMemberTypes? - */ + }, [setAnimationState, element]); + var startAnimation = useConstant(function () { + return function (animationDefinition) { + return animateVisualElement(element, animationDefinition); + }; + }); + return [animationState, startAnimation]; +} - parseUnionTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('union'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const types = this.parseUnionMemberTypes(); - return this.node(start, { - kind: _kinds.Kind.UNION_TYPE_DEFINITION, - description, - name, - directives, - types - }); +// Keep things reasonable and avoid scale: Infinity. In practise we might need +// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1] +// to simply hide content at unreasonable scales. +var maxScale = 100000; +var invertScale = function (scale) { + return scale > 0.001 ? 1 / scale : maxScale; +}; +var hasWarned = false; +/** + * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse + * of their respective parent scales. + * + * This is useful for undoing the distortion of content when scaling a parent component. + * + * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent. + * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output + * of those instead. + * + * ```jsx + * const MyComponent = () => { + * const { scaleX, scaleY } = useInvertedScale() + * return + * } + * ``` + * + * @deprecated + */ +function useInvertedScale(scale) { + var parentScaleX = useMotionValue(1); + var parentScaleY = useMotionValue(1); + var visualElement = useVisualElementContext(); + heyListen.invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component."); + heyListen.warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."); + hasWarned = true; + if (scale) { + parentScaleX = scale.scaleX || parentScaleX; + parentScaleY = scale.scaleY || parentScaleY; + } else if (visualElement) { + parentScaleX = visualElement.getValue("scaleX", 1); + parentScaleY = visualElement.getValue("scaleY", 1); } - /** - * UnionMemberTypes : - * - = `|`? NamedType - * - UnionMemberTypes | NamedType - */ + var scaleX = useTransform(parentScaleX, invertScale); + var scaleY = useTransform(parentScaleY, invertScale); + return { + scaleX: scaleX, + scaleY: scaleY + }; +} +exports.AnimatePresence = AnimatePresence; +exports.AnimateSharedLayout = AnimateSharedLayout; +exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext; +exports.DragControls = DragControls; +exports.FlatTree = FlatTree; +exports.LayoutGroup = LayoutGroup; +exports.LayoutGroupContext = LayoutGroupContext; +exports.LazyMotion = LazyMotion; +exports.MotionConfig = MotionConfig; +exports.MotionConfigContext = MotionConfigContext; +exports.MotionContext = MotionContext; +exports.MotionValue = MotionValue; +exports.PresenceContext = PresenceContext; +exports.Reorder = Reorder; +exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext; +exports.addPointerEvent = addPointerEvent; +exports.addScaleCorrector = addScaleCorrector; +exports.animate = animate; +exports.animateVisualElement = animateVisualElement; +exports.animationControls = animationControls; +exports.animations = animations; +exports.calcLength = calcLength; +exports.checkTargetForNewValues = checkTargetForNewValues; +exports.createBox = createBox; +exports.createDomMotionComponent = createDomMotionComponent; +exports.createMotionComponent = createMotionComponent; +exports.domAnimation = domAnimation; +exports.domMax = domMax; +exports.filterProps = filterProps; +exports.isBrowser = isBrowser; +exports.isDragActive = isDragActive; +exports.isMotionValue = isMotionValue; +exports.isValidMotionProp = isValidMotionProp; +exports.m = m; +exports.makeUseVisualState = makeUseVisualState; +exports.motion = motion; +exports.motionValue = motionValue; +exports.resolveMotionValue = resolveMotionValue; +exports.transform = transform; +exports.useAnimation = useAnimation; +exports.useAnimationControls = useAnimationControls; +exports.useAnimationFrame = useAnimationFrame; +exports.useCycle = useCycle; +exports.useDeprecatedAnimatedState = useAnimatedState; +exports.useDeprecatedInvertedScale = useInvertedScale; +exports.useDomEvent = useDomEvent; +exports.useDragControls = useDragControls; +exports.useElementScroll = useElementScroll; +exports.useForceUpdate = useForceUpdate; +exports.useInView = useInView; +exports.useInstantLayoutTransition = useInstantLayoutTransition; +exports.useInstantTransition = useInstantTransition; +exports.useIsPresent = useIsPresent; +exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect; +exports.useMotionTemplate = useMotionTemplate; +exports.useMotionValue = useMotionValue; +exports.usePresence = usePresence; +exports.useReducedMotion = useReducedMotion; +exports.useReducedMotionConfig = useReducedMotionConfig; +exports.useResetProjection = useResetProjection; +exports.useScroll = useScroll; +exports.useSpring = useSpring; +exports.useTime = useTime; +exports.useTransform = useTransform; +exports.useUnmountEffect = useUnmountEffect; +exports.useVelocity = useVelocity; +exports.useViewportScroll = useViewportScroll; +exports.useVisualElementContext = useVisualElementContext; +exports.visualElement = visualElement; +exports.wrapHandler = wrapHandler; - parseUnionMemberTypes() { - return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType) : []; - } - /** - * EnumTypeDefinition : - * - Description? enum Name Directives[Const]? EnumValuesDefinition? - */ +/***/ }), - parseEnumTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('enum'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const values = this.parseEnumValuesDefinition(); - return this.node(start, { - kind: _kinds.Kind.ENUM_TYPE_DEFINITION, - description, - name, - directives, - values - }); - } - /** - * ``` - * EnumValuesDefinition : { EnumValueDefinition+ } - * ``` - */ +/***/ "../../../node_modules/framesync/dist/framesync.cjs.js": +/*!*************************************************************!*\ + !*** ../../../node_modules/framesync/dist/framesync.cjs.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports) { - parseEnumValuesDefinition() { - return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseEnumValueDefinition, _tokenKind.TokenKind.BRACE_R); - } - /** - * EnumValueDefinition : Description? EnumValue Directives[Const]? - */ +"use strict"; - parseEnumValueDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - const name = this.parseEnumValueName(); - const directives = this.parseConstDirectives(); - return this.node(start, { - kind: _kinds.Kind.ENUM_VALUE_DEFINITION, - description, - name, - directives - }); - } - /** - * EnumValue : Name but not `true`, `false` or `null` - */ - parseEnumValueName() { - if (this._lexer.token.value === 'true' || this._lexer.token.value === 'false' || this._lexer.token.value === 'null') { - throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, `${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +const defaultTimestep = 1 / 60 * 1000; +const getCurrentTime = typeof performance !== "undefined" ? () => performance.now() : () => Date.now(); +const onNextFrame = typeof window !== "undefined" ? callback => window.requestAnimationFrame(callback) : callback => setTimeout(() => callback(getCurrentTime()), defaultTimestep); +function createRenderStep(runNextFrame) { + let toRun = []; + let toRunNextFrame = []; + let numToRun = 0; + let isProcessing = false; + let flushNextFrame = false; + const toKeepAlive = new WeakSet(); + const step = { + schedule: (callback, keepAlive = false, immediate = false) => { + const addToCurrentFrame = immediate && isProcessing; + const buffer = addToCurrentFrame ? toRun : toRunNextFrame; + if (keepAlive) toKeepAlive.add(callback); + if (buffer.indexOf(callback) === -1) { + buffer.push(callback); + if (addToCurrentFrame && isProcessing) numToRun = toRun.length; + } + return callback; + }, + cancel: callback => { + const index = toRunNextFrame.indexOf(callback); + if (index !== -1) toRunNextFrame.splice(index, 1); + toKeepAlive.delete(callback); + }, + process: frameData => { + if (isProcessing) { + flushNextFrame = true; + return; + } + isProcessing = true; + [toRun, toRunNextFrame] = [toRunNextFrame, toRun]; + toRunNextFrame.length = 0; + numToRun = toRun.length; + if (numToRun) { + for (let i = 0; i < numToRun; i++) { + const callback = toRun[i]; + callback(frameData); + if (toKeepAlive.has(callback)) { + step.schedule(callback); + runNextFrame(); + } + } + } + isProcessing = false; + if (flushNextFrame) { + flushNextFrame = false; + step.process(frameData); + } } - return this.parseName(); + }; + return step; +} +const maxElapsed = 40; +let useDefaultElapsed = true; +let runNextFrame = false; +let isProcessing = false; +const frame = { + delta: 0, + timestamp: 0 +}; +const stepsOrder = ["read", "update", "preRender", "render", "postRender"]; +const steps = stepsOrder.reduce((acc, key) => { + acc[key] = createRenderStep(() => runNextFrame = true); + return acc; +}, {}); +const sync = stepsOrder.reduce((acc, key) => { + const step = steps[key]; + acc[key] = (process, keepAlive = false, immediate = false) => { + if (!runNextFrame) startLoop(); + return step.schedule(process, keepAlive, immediate); + }; + return acc; +}, {}); +const cancelSync = stepsOrder.reduce((acc, key) => { + acc[key] = steps[key].cancel; + return acc; +}, {}); +const flushSync = stepsOrder.reduce((acc, key) => { + acc[key] = () => steps[key].process(frame); + return acc; +}, {}); +const processStep = stepId => steps[stepId].process(frame); +const processFrame = timestamp => { + runNextFrame = false; + frame.delta = useDefaultElapsed ? defaultTimestep : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1); + frame.timestamp = timestamp; + isProcessing = true; + stepsOrder.forEach(processStep); + isProcessing = false; + if (runNextFrame) { + useDefaultElapsed = false; + onNextFrame(processFrame); } - /** - * InputObjectTypeDefinition : - * - Description? input Name Directives[Const]? InputFieldsDefinition? - */ +}; +const startLoop = () => { + runNextFrame = true; + useDefaultElapsed = true; + if (!isProcessing) onNextFrame(processFrame); +}; +const getFrameData = () => frame; +exports.cancelSync = cancelSync; +exports["default"] = sync; +exports.flushSync = flushSync; +exports.getFrameData = getFrameData; - parseInputObjectTypeDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('input'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const fields = this.parseInputFieldsDefinition(); - return this.node(start, { - kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION, - description, - name, - directives, - fields - }); - } - /** - * ``` - * InputFieldsDefinition : { InputValueDefinition+ } - * ``` - */ +/***/ }), - parseInputFieldsDefinition() { - return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseInputValueDef, _tokenKind.TokenKind.BRACE_R); +/***/ "../../../node_modules/get-nonce/dist/es2015/index.js": +/*!************************************************************!*\ + !*** ../../../node_modules/get-nonce/dist/es2015/index.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.setNonce = exports.getNonce = void 0; +var currentNonce; +var setNonce = function (nonce) { + currentNonce = nonce; +}; +exports.setNonce = setNonce; +var getNonce = function () { + if (currentNonce) { + return currentNonce; } - /** - * TypeSystemExtension : - * - SchemaExtension - * - TypeExtension - * - * TypeExtension : - * - ScalarTypeExtension - * - ObjectTypeExtension - * - InterfaceTypeExtension - * - UnionTypeExtension - * - EnumTypeExtension - * - InputObjectTypeDefinition - */ + if (true) { + return __webpack_require__.nc; + } + return undefined; +}; +exports.getNonce = getNonce; - parseTypeSystemExtension() { - const keywordToken = this._lexer.lookahead(); - if (keywordToken.kind === _tokenKind.TokenKind.NAME) { - switch (keywordToken.value) { - case 'schema': - return this.parseSchemaExtension(); - case 'scalar': - return this.parseScalarTypeExtension(); - case 'type': - return this.parseObjectTypeExtension(); - case 'interface': - return this.parseInterfaceTypeExtension(); - case 'union': - return this.parseUnionTypeExtension(); - case 'enum': - return this.parseEnumTypeExtension(); - case 'input': - return this.parseInputObjectTypeExtension(); +/***/ }), + +/***/ "../../../node_modules/get-value/index.js": +/*!************************************************!*\ + !*** ../../../node_modules/get-value/index.js ***! + \************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/*! + * get-value + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +const isObject = __webpack_require__(/*! isobject */ "../../../node_modules/isobject/index.js"); +module.exports = function (target, path, options) { + if (!isObject(options)) { + options = { + default: options + }; + } + if (!isValidObject(target)) { + return typeof options.default !== 'undefined' ? options.default : target; + } + if (typeof path === 'number') { + path = String(path); + } + const isArray = Array.isArray(path); + const isString = typeof path === 'string'; + const splitChar = options.separator || '.'; + const joinChar = options.joinChar || (typeof splitChar === 'string' ? splitChar : '.'); + if (!isString && !isArray) { + return target; + } + if (isString && path in target) { + return isValid(path, target, options) ? target[path] : options.default; + } + let segs = isArray ? path : split(path, splitChar, options); + let len = segs.length; + let idx = 0; + do { + let prop = segs[idx]; + if (typeof prop === 'number') { + prop = String(prop); + } + while (prop && prop.slice(-1) === '\\') { + prop = join([prop.slice(0, -1), segs[++idx] || ''], joinChar, options); + } + if (prop in target) { + if (!isValid(prop, target, options)) { + return options.default; + } + target = target[prop]; + } else { + let hasProp = false; + let n = idx + 1; + while (n < len) { + prop = join([prop, segs[n++]], joinChar, options); + if (hasProp = prop in target) { + if (!isValid(prop, target, options)) { + return options.default; + } + target = target[prop]; + idx = n - 1; + break; + } + } + if (!hasProp) { + return options.default; } } - throw this.unexpected(keywordToken); + } while (++idx < len && isValidObject(target)); + if (idx === len) { + return target; } - /** - * ``` - * SchemaExtension : - * - extend schema Directives[Const]? { OperationTypeDefinition+ } - * - extend schema Directives[Const] - * ``` - */ - - parseSchemaExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('schema'); - const directives = this.parseConstDirectives(); - const operationTypes = this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); - if (directives.length === 0 && operationTypes.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.SCHEMA_EXTENSION, - directives, - operationTypes - }); + return options.default; +}; +function join(segs, joinChar, options) { + if (typeof options.join === 'function') { + return options.join(segs); } - /** - * ScalarTypeExtension : - * - extend scalar Name Directives[Const] - */ - - parseScalarTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('scalar'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - if (directives.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.SCALAR_TYPE_EXTENSION, - name, - directives - }); + return segs[0] + joinChar + segs[1]; +} +function split(path, splitChar, options) { + if (typeof options.split === 'function') { + return options.split(path); } - /** - * ObjectTypeExtension : - * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition - * - extend type Name ImplementsInterfaces? Directives[Const] - * - extend type Name ImplementsInterfaces - */ + return path.split(splitChar); +} +function isValid(key, target, options) { + if (typeof options.isValid === 'function') { + return options.isValid(key, target); + } + return true; +} +function isValidObject(val) { + return isObject(val) || Array.isArray(val) || typeof val === 'function'; +} - parseObjectTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('type'); - const name = this.parseName(); - const interfaces = this.parseImplementsInterfaces(); - const directives = this.parseConstDirectives(); - const fields = this.parseFieldsDefinition(); - if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.OBJECT_TYPE_EXTENSION, - name, - interfaces, - directives, - fields - }); - } - /** - * InterfaceTypeExtension : - * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition - * - extend interface Name ImplementsInterfaces? Directives[Const] - * - extend interface Name ImplementsInterfaces - */ - - parseInterfaceTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('interface'); - const name = this.parseName(); - const interfaces = this.parseImplementsInterfaces(); - const directives = this.parseConstDirectives(); - const fields = this.parseFieldsDefinition(); - if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION, - name, - interfaces, - directives, - fields - }); - } - /** - * UnionTypeExtension : - * - extend union Name Directives[Const]? UnionMemberTypes - * - extend union Name Directives[Const] - */ - - parseUnionTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('union'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const types = this.parseUnionMemberTypes(); - if (directives.length === 0 && types.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.UNION_TYPE_EXTENSION, - name, - directives, - types - }); - } - /** - * EnumTypeExtension : - * - extend enum Name Directives[Const]? EnumValuesDefinition - * - extend enum Name Directives[Const] - */ - - parseEnumTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('enum'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const values = this.parseEnumValuesDefinition(); - if (directives.length === 0 && values.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.ENUM_TYPE_EXTENSION, - name, - directives, - values - }); - } - /** - * InputObjectTypeExtension : - * - extend input Name Directives[Const]? InputFieldsDefinition - * - extend input Name Directives[Const] - */ - - parseInputObjectTypeExtension() { - const start = this._lexer.token; - this.expectKeyword('extend'); - this.expectKeyword('input'); - const name = this.parseName(); - const directives = this.parseConstDirectives(); - const fields = this.parseInputFieldsDefinition(); - if (directives.length === 0 && fields.length === 0) { - throw this.unexpected(); - } - return this.node(start, { - kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION, - name, - directives, - fields - }); - } - /** - * ``` - * DirectiveDefinition : - * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations - * ``` - */ - - parseDirectiveDefinition() { - const start = this._lexer.token; - const description = this.parseDescription(); - this.expectKeyword('directive'); - this.expectToken(_tokenKind.TokenKind.AT); - const name = this.parseName(); - const args = this.parseArgumentDefs(); - const repeatable = this.expectOptionalKeyword('repeatable'); - this.expectKeyword('on'); - const locations = this.parseDirectiveLocations(); - return this.node(start, { - kind: _kinds.Kind.DIRECTIVE_DEFINITION, - description, - name, - arguments: args, - repeatable, - locations - }); - } - /** - * DirectiveLocations : - * - `|`? DirectiveLocation - * - DirectiveLocations | DirectiveLocation - */ +/***/ }), - parseDirectiveLocations() { - return this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseDirectiveLocation); - } - /* - * DirectiveLocation : - * - ExecutableDirectiveLocation - * - TypeSystemDirectiveLocation - * - * ExecutableDirectiveLocation : one of - * `QUERY` - * `MUTATION` - * `SUBSCRIPTION` - * `FIELD` - * `FRAGMENT_DEFINITION` - * `FRAGMENT_SPREAD` - * `INLINE_FRAGMENT` - * - * TypeSystemDirectiveLocation : one of - * `SCHEMA` - * `SCALAR` - * `OBJECT` - * `FIELD_DEFINITION` - * `ARGUMENT_DEFINITION` - * `INTERFACE` - * `UNION` - * `ENUM` - * `ENUM_VALUE` - * `INPUT_OBJECT` - * `INPUT_FIELD_DEFINITION` - */ +/***/ "../../../node_modules/graphql-ws/lib/client.mjs": +/*!*******************************************************!*\ + !*** ../../../node_modules/graphql-ws/lib/client.mjs ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - parseDirectiveLocation() { - const start = this._lexer.token; - const name = this.parseName(); - if (Object.prototype.hasOwnProperty.call(_directiveLocation.DirectiveLocation, name.value)) { - return name; - } - throw this.unexpected(start); - } // Core parsing utility functions +"use strict"; - /** - * Returns a node that, if configured to do so, sets a "loc" field as a - * location object, used to identify the place in the source that created a - * given parsed object. - */ - node(startToken, node) { - if (this._options.noLocation !== true) { - node.loc = new _ast.Location(startToken, this._lexer.lastToken, this._lexer.source); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _exportNames = { + createClient: true +}; +exports.createClient = createClient; +var _common = __webpack_require__(/*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs"); +Object.keys(_common).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _common[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _common[key]; } - return node; - } - /** - * Determines if the next token is of a given kind - */ - - peek(kind) { - return this._lexer.token.kind === kind; + }); +}); +var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs"); +/** + * + * client + * + */ +var __await = void 0 && (void 0).__await || function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +}; +var __asyncGenerator = void 0 && (void 0).__asyncGenerator || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), + i, + q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function (v) { + return new Promise(function (a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; } - /** - * If the next token is of the given kind, return that token after advancing the lexer. - * Otherwise, do not change the parser state and throw an error. - */ - - expectToken(kind) { - const token = this._lexer.token; - if (token.kind === kind) { - this.advanceLexer(); - return token; + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); } - throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`); } - /** - * If the next token is of the given kind, return "true" after advancing the lexer. - * Otherwise, do not change the parser state and return "false". - */ - - expectOptionalToken(kind) { - const token = this._lexer.token; - if (token.kind === kind) { - this.advanceLexer(); - return true; - } - return false; + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - /** - * If the next token is a given keyword, advance the lexer. - * Otherwise, do not change the parser state and throw an error. - */ - - expectKeyword(value) { - const token = this._lexer.token; - if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { - this.advanceLexer(); - } else { - throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected "${value}", found ${getTokenDesc(token)}.`); - } + function fulfill(value) { + resume("next", value); } - /** - * If the next token is a given keyword, return "true" after advancing the lexer. - * Otherwise, do not change the parser state and return "false". - */ - - expectOptionalKeyword(value) { - const token = this._lexer.token; - if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { - this.advanceLexer(); - return true; - } - return false; + function reject(value) { + resume("throw", value); } - /** - * Helper function for creating an error when an unexpected lexed token is encountered. - */ - - unexpected(atToken) { - const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; - return (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`); + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - /** - * Returns a possibly empty list of parse nodes, determined by the parseFn. - * This list begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ +}; - any(openKind, parseFn, closeKind) { - this.expectToken(openKind); - const nodes = []; - while (!this.expectOptionalToken(closeKind)) { - nodes.push(parseFn.call(this)); - } - return nodes; - } - /** - * Returns a list of parse nodes, determined by the parseFn. - * It can be empty only if open token is missing otherwise it will always return non-empty list - * that begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ +/** This file is the entry point for browsers, re-export common elements. */ - optionalMany(openKind, parseFn, closeKind) { - if (this.expectOptionalToken(openKind)) { - const nodes = []; - do { - nodes.push(parseFn.call(this)); - } while (!this.expectOptionalToken(closeKind)); - return nodes; +/** + * Creates a disposable GraphQL over WebSocket client. + * + * @category Client + */ +function createClient(options) { + const { + url, + connectionParams, + lazy = true, + onNonLazyError = console.error, + lazyCloseTimeout: lazyCloseTimeoutMs = 0, + keepAlive = 0, + disablePong, + connectionAckWaitTimeout = 0, + retryAttempts = 5, + retryWait = async function randomisedExponentialBackoff(retries) { + let retryDelay = 1000; // start with 1s delay + for (let i = 0; i < retries; i++) { + retryDelay *= 2; + } + await new Promise(resolve => setTimeout(resolve, retryDelay + + // add random timeout from 300ms to 3s + Math.floor(Math.random() * (3000 - 300) + 300))); + }, + shouldRetry = isLikeCloseEvent, + isFatalConnectionProblem, + on, + webSocketImpl, + /** + * Generates a v4 UUID to be used as the ID using `Math` + * as the random number generator. Supply your own generator + * in case you need more uniqueness. + * + * Reference: https://gist.github.com/jed/982883 + */ + generateID = function generateUUID() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { + const r = Math.random() * 16 | 0, + v = c == 'x' ? r : r & 0x3 | 0x8; + return v.toString(16); + }); + }, + jsonMessageReplacer: replacer, + jsonMessageReviver: reviver + } = options; + let ws; + if (webSocketImpl) { + if (!isWebSocket(webSocketImpl)) { + throw new Error('Invalid WebSocket implementation provided'); } - return []; - } - /** - * Returns a non-empty list of parse nodes, determined by the parseFn. - * This list begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ - - many(openKind, parseFn, closeKind) { - this.expectToken(openKind); - const nodes = []; - do { - nodes.push(parseFn.call(this)); - } while (!this.expectOptionalToken(closeKind)); - return nodes; - } - /** - * Returns a non-empty list of parse nodes, determined by the parseFn. - * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. - * Advances the parser to the next lex token after last item in the list. - */ - - delimitedMany(delimiterKind, parseFn) { - this.expectOptionalToken(delimiterKind); - const nodes = []; - do { - nodes.push(parseFn.call(this)); - } while (this.expectOptionalToken(delimiterKind)); - return nodes; + ws = webSocketImpl; + } else if (typeof WebSocket !== 'undefined') { + ws = WebSocket; + } else if (typeof __webpack_require__.g !== 'undefined') { + ws = __webpack_require__.g.WebSocket || + // @ts-expect-error: Support more browsers + __webpack_require__.g.MozWebSocket; + } else if (typeof window !== 'undefined') { + ws = window.WebSocket || + // @ts-expect-error: Support more browsers + window.MozWebSocket; } - advanceLexer() { - const { - maxTokens - } = this._options; - const token = this._lexer.advance(); - if (maxTokens !== undefined && token.kind !== _tokenKind.TokenKind.EOF) { - ++this._tokenCounter; - if (this._tokenCounter > maxTokens) { - throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`); + if (!ws) throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`"); + const WebSocketImpl = ws; + // websocket status emitter, subscriptions are handled differently + const emitter = (() => { + const message = (() => { + const listeners = {}; + return { + on(id, listener) { + listeners[id] = listener; + return () => { + delete listeners[id]; + }; + }, + emit(message) { + var _a; + if ('id' in message) (_a = listeners[message.id]) === null || _a === void 0 ? void 0 : _a.call(listeners, message); + } + }; + })(); + const listeners = { + connecting: (on === null || on === void 0 ? void 0 : on.connecting) ? [on.connecting] : [], + opened: (on === null || on === void 0 ? void 0 : on.opened) ? [on.opened] : [], + connected: (on === null || on === void 0 ? void 0 : on.connected) ? [on.connected] : [], + ping: (on === null || on === void 0 ? void 0 : on.ping) ? [on.ping] : [], + pong: (on === null || on === void 0 ? void 0 : on.pong) ? [on.pong] : [], + message: (on === null || on === void 0 ? void 0 : on.message) ? [message.emit, on.message] : [message.emit], + closed: (on === null || on === void 0 ? void 0 : on.closed) ? [on.closed] : [], + error: (on === null || on === void 0 ? void 0 : on.error) ? [on.error] : [] + }; + return { + onMessage: message.on, + on(event, listener) { + const l = listeners[event]; + l.push(listener); + return () => { + l.splice(l.indexOf(listener), 1); + }; + }, + emit(event, ...args) { + // we copy the listeners so that unlistens dont "pull the rug under our feet" + for (const listener of [...listeners[event]]) { + // @ts-expect-error: The args should fit + listener(...args); + } } - } + }; + })(); + // invokes the callback either when an error or closed event is emitted, + // first one that gets called prevails, other emissions are ignored + function errorOrClosed(cb) { + const listening = [ + // errors are fatal and more critical than close events, throw them first + emitter.on('error', err => { + listening.forEach(unlisten => unlisten()); + cb(err); + }), + // closes can be graceful and not fatal, throw them second (if error didnt throw) + emitter.on('closed', event => { + listening.forEach(unlisten => unlisten()); + cb(event); + })]; } + let connecting, + locks = 0, + lazyCloseTimeout, + retrying = false, + retries = 0, + disposed = false; + async function connect() { + // clear the lazy close timeout immediatelly so that close gets debounced + // see: https://github.com/enisdenjo/graphql-ws/issues/388 + clearTimeout(lazyCloseTimeout); + const [socket, throwOnClose] = await (connecting !== null && connecting !== void 0 ? connecting : connecting = new Promise((connected, denied) => (async () => { + if (retrying) { + await retryWait(retries); + // subscriptions might complete while waiting for retry + if (!locks) { + connecting = undefined; + return denied({ + code: 1000, + reason: 'All Subscriptions Gone' + }); + } + retries++; + } + emitter.emit('connecting'); + const socket = new WebSocketImpl(typeof url === 'function' ? await url() : url, _common.GRAPHQL_TRANSPORT_WS_PROTOCOL); + let connectionAckTimeout, queuedPing; + function enqueuePing() { + if (isFinite(keepAlive) && keepAlive > 0) { + clearTimeout(queuedPing); // in case where a pong was received before a ping (this is valid behaviour) + queuedPing = setTimeout(() => { + if (socket.readyState === WebSocketImpl.OPEN) { + socket.send((0, _common.stringifyMessage)({ + type: _common.MessageType.Ping + })); + emitter.emit('ping', false, undefined); + } + }, keepAlive); + } + } + errorOrClosed(errOrEvent => { + connecting = undefined; + clearTimeout(connectionAckTimeout); + clearTimeout(queuedPing); + denied(errOrEvent); + if (isLikeCloseEvent(errOrEvent) && errOrEvent.code === 4499) { + socket.close(4499, 'Terminated'); // close event is artificial and emitted manually, see `Client.terminate()` below + socket.onerror = null; + socket.onclose = null; + } + }); + socket.onerror = err => emitter.emit('error', err); + socket.onclose = event => emitter.emit('closed', event); + socket.onopen = async () => { + try { + emitter.emit('opened', socket); + const payload = typeof connectionParams === 'function' ? await connectionParams() : connectionParams; + // connectionParams might take too long causing the server to kick off the client + // the necessary error/close event is already reported - simply stop execution + if (socket.readyState !== WebSocketImpl.OPEN) return; + socket.send((0, _common.stringifyMessage)(payload ? { + type: _common.MessageType.ConnectionInit, + payload + } : { + type: _common.MessageType.ConnectionInit + // payload is completely absent if not provided + }, replacer)); + if (isFinite(connectionAckWaitTimeout) && connectionAckWaitTimeout > 0) { + connectionAckTimeout = setTimeout(() => { + socket.close(_common.CloseCode.ConnectionAcknowledgementTimeout, 'Connection acknowledgement timeout'); + }, connectionAckWaitTimeout); + } + enqueuePing(); // enqueue ping (noop if disabled) + } catch (err) { + emitter.emit('error', err); + socket.close(_common.CloseCode.InternalClientError, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Internal client error')); + } + }; + let acknowledged = false; + socket.onmessage = ({ + data + }) => { + try { + const message = (0, _common.parseMessage)(data, reviver); + emitter.emit('message', message); + if (message.type === 'ping' || message.type === 'pong') { + emitter.emit(message.type, true, message.payload); // received + if (message.type === 'pong') { + enqueuePing(); // enqueue next ping (noop if disabled) + } else if (!disablePong) { + // respond with pong on ping + socket.send((0, _common.stringifyMessage)(message.payload ? { + type: _common.MessageType.Pong, + payload: message.payload + } : { + type: _common.MessageType.Pong + // payload is completely absent if not provided + })); + emitter.emit('pong', false, message.payload); + } + return; // ping and pongs can be received whenever + } + if (acknowledged) return; // already connected and acknowledged + if (message.type !== _common.MessageType.ConnectionAck) throw new Error(`First message cannot be of type ${message.type}`); + clearTimeout(connectionAckTimeout); + acknowledged = true; + emitter.emit('connected', socket, message.payload); // connected = socket opened + acknowledged + retrying = false; // future lazy connects are not retries + retries = 0; // reset the retries on connect + connected([socket, new Promise((_, reject) => errorOrClosed(reject))]); + } catch (err) { + socket.onmessage = null; // stop reading messages as soon as reading breaks once + emitter.emit('error', err); + socket.close(_common.CloseCode.BadResponse, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Bad response')); + } + }; + })())); + // if the provided socket is in a closing state, wait for the throw on close + if (socket.readyState === WebSocketImpl.CLOSING) await throwOnClose; + let release = () => { + // releases this connection + }; + const released = new Promise(resolve => release = resolve); + return [socket, release, Promise.race([ + // wait for + released.then(() => { + if (!locks) { + // and if no more locks are present, complete the connection + const complete = () => socket.close(1000, 'Normal Closure'); + if (isFinite(lazyCloseTimeoutMs) && lazyCloseTimeoutMs > 0) { + // if the keepalive is set, allow for the specified calmdown time and + // then complete if the socket is still open. + lazyCloseTimeout = setTimeout(() => { + if (socket.readyState === WebSocketImpl.OPEN) complete(); + }, lazyCloseTimeoutMs); + } else { + // otherwise complete immediately + complete(); + } + } + }), + // or + throwOnClose])]; + } + /** + * Checks the `connect` problem and evaluates if the client should retry. + */ + function shouldRetryConnectOrThrow(errOrCloseEvent) { + // some close codes are worth reporting immediately + if (isLikeCloseEvent(errOrCloseEvent) && (isFatalInternalCloseCode(errOrCloseEvent.code) || [_common.CloseCode.InternalServerError, _common.CloseCode.InternalClientError, _common.CloseCode.BadRequest, _common.CloseCode.BadResponse, _common.CloseCode.Unauthorized, + // CloseCode.Forbidden, might grant access out after retry + _common.CloseCode.SubprotocolNotAcceptable, + // CloseCode.ConnectionInitialisationTimeout, might not time out after retry + // CloseCode.ConnectionAcknowledgementTimeout, might not time out after retry + _common.CloseCode.SubscriberAlreadyExists, _common.CloseCode.TooManyInitialisationRequests + // 4499, // Terminated, probably because the socket froze, we want to retry + ].includes(errOrCloseEvent.code))) throw errOrCloseEvent; + // client was disposed, no retries should proceed regardless + if (disposed) return false; + // normal closure (possibly all subscriptions have completed) + // if no locks were acquired in the meantime, shouldnt try again + if (isLikeCloseEvent(errOrCloseEvent) && errOrCloseEvent.code === 1000) return locks > 0; + // retries are not allowed or we tried to many times, report error + if (!retryAttempts || retries >= retryAttempts) throw errOrCloseEvent; + // throw non-retryable connection problems + if (!shouldRetry(errOrCloseEvent)) throw errOrCloseEvent; + // @deprecated throw fatal connection problems immediately + if (isFatalConnectionProblem === null || isFatalConnectionProblem === void 0 ? void 0 : isFatalConnectionProblem(errOrCloseEvent)) throw errOrCloseEvent; + // looks good, start retrying + return retrying = true; + } + // in non-lazy (hot?) mode always hold one connection lock to persist the socket + if (!lazy) { + (async () => { + locks++; + for (;;) { + try { + const [,, throwOnClose] = await connect(); + await throwOnClose; // will always throw because releaser is not used + } catch (errOrCloseEvent) { + try { + if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return; + } catch (errOrCloseEvent) { + // report thrown error, no further retries + return onNonLazyError === null || onNonLazyError === void 0 ? void 0 : onNonLazyError(errOrCloseEvent); + } + } + } + })(); + } + return { + on: emitter.on, + subscribe(payload, sink) { + const id = generateID(payload); + let done = false, + errored = false, + releaser = () => { + // for handling completions before connect + locks--; + done = true; + }; + (async () => { + locks++; + for (;;) { + try { + const [socket, release, waitForReleaseOrThrowOnClose] = await connect(); + // if done while waiting for connect, release the connection lock right away + if (done) return release(); + const unlisten = emitter.onMessage(id, message => { + switch (message.type) { + case _common.MessageType.Next: + { + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- payload will fit type + sink.next(message.payload); + return; + } + case _common.MessageType.Error: + { + errored = true, done = true; + sink.error(message.payload); + releaser(); + return; + } + case _common.MessageType.Complete: + { + done = true; + releaser(); // release completes the sink + return; + } + } + }); + socket.send((0, _common.stringifyMessage)({ + id, + type: _common.MessageType.Subscribe, + payload + }, replacer)); + releaser = () => { + if (!done && socket.readyState === WebSocketImpl.OPEN) + // if not completed already and socket is open, send complete message to server on release + socket.send((0, _common.stringifyMessage)({ + id, + type: _common.MessageType.Complete + }, replacer)); + locks--; + done = true; + release(); + }; + // either the releaser will be called, connection completed and + // the promise resolved or the socket closed and the promise rejected. + // whatever happens though, we want to stop listening for messages + await waitForReleaseOrThrowOnClose.finally(unlisten); + return; // completed, shouldnt try again + } catch (errOrCloseEvent) { + if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return; + } + } + })().then(() => { + // delivering either an error or a complete terminates the sequence + if (!errored) sink.complete(); + }) // resolves on release or normal closure + .catch(err => { + sink.error(err); + }); // rejects on close events and errors + return () => { + // dispose only of active subscriptions + if (!done) releaser(); + }; + }, + iterate(request) { + const pending = []; + const deferred = { + done: false, + error: null, + resolve: () => { + // noop + } + }; + const dispose = this.subscribe(request, { + next(val) { + pending.push(val); + deferred.resolve(); + }, + error(err) { + deferred.done = true; + deferred.error = err; + deferred.resolve(); + }, + complete() { + deferred.done = true; + deferred.resolve(); + } + }); + const iterator = function iterator() { + return __asyncGenerator(this, arguments, function* iterator_1() { + for (;;) { + if (!pending.length) { + // only wait if there are no pending messages available + yield __await(new Promise(resolve => deferred.resolve = resolve)); + } + // first flush + while (pending.length) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + yield yield __await(pending.shift()); + } + // then error + if (deferred.error) { + throw deferred.error; + } + // or complete + if (deferred.done) { + return yield __await(void 0); + } + } + }); + }(); + iterator.throw = async err => { + if (!deferred.done) { + deferred.done = true; + deferred.error = err; + deferred.resolve(); + } + return { + done: true, + value: undefined + }; + }; + iterator.return = async () => { + dispose(); + return { + done: true, + value: undefined + }; + }; + return iterator; + }, + async dispose() { + disposed = true; + if (connecting) { + // if there is a connection, close it + const [socket] = await connecting; + socket.close(1000, 'Normal Closure'); + } + }, + terminate() { + if (connecting) { + // only if there is a connection + emitter.emit('closed', { + code: 4499, + reason: 'Terminated', + wasClean: false + }); + } + } + }; } -/** - * A helper function to describe a token as a string for debugging. - */ -exports.Parser = Parser; -function getTokenDesc(token) { - const value = token.value; - return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : ''); -} -/** - * A helper function to describe a token kind as a string for debugging. - */ - -function getTokenKindDesc(kind) { - return (0, _lexer.isPunctuatorTokenKind)(kind) ? `"${kind}"` : kind; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/language/predicates.mjs": -/*!*************************************************************!*\ - !*** ../../../node_modules/graphql/language/predicates.mjs ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isConstValueNode = isConstValueNode; -exports.isDefinitionNode = isDefinitionNode; -exports.isExecutableDefinitionNode = isExecutableDefinitionNode; -exports.isSelectionNode = isSelectionNode; -exports.isTypeDefinitionNode = isTypeDefinitionNode; -exports.isTypeExtensionNode = isTypeExtensionNode; -exports.isTypeNode = isTypeNode; -exports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode; -exports.isTypeSystemExtensionNode = isTypeSystemExtensionNode; -exports.isValueNode = isValueNode; -var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -function isDefinitionNode(node) { - return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node); -} -function isExecutableDefinitionNode(node) { - return node.kind === _kinds.Kind.OPERATION_DEFINITION || node.kind === _kinds.Kind.FRAGMENT_DEFINITION; -} -function isSelectionNode(node) { - return node.kind === _kinds.Kind.FIELD || node.kind === _kinds.Kind.FRAGMENT_SPREAD || node.kind === _kinds.Kind.INLINE_FRAGMENT; -} -function isValueNode(node) { - return node.kind === _kinds.Kind.VARIABLE || node.kind === _kinds.Kind.INT || node.kind === _kinds.Kind.FLOAT || node.kind === _kinds.Kind.STRING || node.kind === _kinds.Kind.BOOLEAN || node.kind === _kinds.Kind.NULL || node.kind === _kinds.Kind.ENUM || node.kind === _kinds.Kind.LIST || node.kind === _kinds.Kind.OBJECT; -} -function isConstValueNode(node) { - return isValueNode(node) && (node.kind === _kinds.Kind.LIST ? node.values.some(isConstValueNode) : node.kind === _kinds.Kind.OBJECT ? node.fields.some(field => isConstValueNode(field.value)) : node.kind !== _kinds.Kind.VARIABLE); -} -function isTypeNode(node) { - return node.kind === _kinds.Kind.NAMED_TYPE || node.kind === _kinds.Kind.LIST_TYPE || node.kind === _kinds.Kind.NON_NULL_TYPE; -} -function isTypeSystemDefinitionNode(node) { - return node.kind === _kinds.Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds.Kind.DIRECTIVE_DEFINITION; -} -function isTypeDefinitionNode(node) { - return node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION || node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION || node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION || node.kind === _kinds.Kind.UNION_TYPE_DEFINITION || node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION; +function isLikeCloseEvent(val) { + return (0, _utils.isObject)(val) && 'code' in val && 'reason' in val; } -function isTypeSystemExtensionNode(node) { - return node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); +function isFatalInternalCloseCode(code) { + if ([1000, 1001, 1006, 1005, 1012, 1013, 1013 // Bad Gateway + ].includes(code)) return false; + // all other internal errors are fatal + return code >= 1000 && code <= 1999; } -function isTypeExtensionNode(node) { - return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; +function isWebSocket(val) { + return typeof val === 'function' && 'constructor' in val && 'CLOSED' in val && 'CLOSING' in val && 'CONNECTING' in val && 'OPEN' in val; } /***/ }), -/***/ "../../../node_modules/graphql/language/printLocation.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/language/printLocation.mjs ***! - \****************************************************************/ +/***/ "../../../node_modules/graphql-ws/lib/common.mjs": +/*!*******************************************************!*\ + !*** ../../../node_modules/graphql-ws/lib/common.mjs ***! + \*******************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.printLocation = printLocation; -exports.printSourceLocation = printSourceLocation; -var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs"); +exports.MessageType = exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = exports.DEPRECATED_GRAPHQL_WS_PROTOCOL = exports.CloseCode = void 0; +exports.isMessage = isMessage; +exports.parseMessage = parseMessage; +exports.stringifyMessage = stringifyMessage; +exports.validateMessage = validateMessage; +var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs"); /** - * Render a helpful description of the location in the GraphQL Source document. + * + * common + * */ -function printLocation(location) { - return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start)); + +/** + * The WebSocket sub-protocol used for the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md). + * + * @category Common + */ +const GRAPHQL_TRANSPORT_WS_PROTOCOL = exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = 'graphql-transport-ws'; +/** + * The deprecated subprotocol used by [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws). + * + * @private + */ +const DEPRECATED_GRAPHQL_WS_PROTOCOL = exports.DEPRECATED_GRAPHQL_WS_PROTOCOL = 'graphql-ws'; +/** + * `graphql-ws` expected and standard close codes of the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md). + * + * @category Common + */ +var CloseCode; +(function (CloseCode) { + CloseCode[CloseCode["InternalServerError"] = 4500] = "InternalServerError"; + CloseCode[CloseCode["InternalClientError"] = 4005] = "InternalClientError"; + CloseCode[CloseCode["BadRequest"] = 4400] = "BadRequest"; + CloseCode[CloseCode["BadResponse"] = 4004] = "BadResponse"; + /** Tried subscribing before connect ack */ + CloseCode[CloseCode["Unauthorized"] = 4401] = "Unauthorized"; + CloseCode[CloseCode["Forbidden"] = 4403] = "Forbidden"; + CloseCode[CloseCode["SubprotocolNotAcceptable"] = 4406] = "SubprotocolNotAcceptable"; + CloseCode[CloseCode["ConnectionInitialisationTimeout"] = 4408] = "ConnectionInitialisationTimeout"; + CloseCode[CloseCode["ConnectionAcknowledgementTimeout"] = 4504] = "ConnectionAcknowledgementTimeout"; + /** Subscriber distinction is very important */ + CloseCode[CloseCode["SubscriberAlreadyExists"] = 4409] = "SubscriberAlreadyExists"; + CloseCode[CloseCode["TooManyInitialisationRequests"] = 4429] = "TooManyInitialisationRequests"; +})(CloseCode || (exports.CloseCode = CloseCode = {})); +/** + * Types of messages allowed to be sent by the client/server over the WS protocol. + * + * @category Common + */ +var MessageType; +(function (MessageType) { + MessageType["ConnectionInit"] = "connection_init"; + MessageType["ConnectionAck"] = "connection_ack"; + MessageType["Ping"] = "ping"; + MessageType["Pong"] = "pong"; + MessageType["Subscribe"] = "subscribe"; + MessageType["Next"] = "next"; + MessageType["Error"] = "error"; + MessageType["Complete"] = "complete"; +})(MessageType || (exports.MessageType = MessageType = {})); +/** + * Validates the message against the GraphQL over WebSocket Protocol. + * + * Invalid messages will throw descriptive errors. + * + * @category Common + */ +function validateMessage(val) { + if (!(0, _utils.isObject)(val)) { + throw new Error(`Message is expected to be an object, but got ${(0, _utils.extendedTypeof)(val)}`); + } + if (!val.type) { + throw new Error(`Message is missing the 'type' property`); + } + if (typeof val.type !== 'string') { + throw new Error(`Message is expects the 'type' property to be a string, but got ${(0, _utils.extendedTypeof)(val.type)}`); + } + switch (val.type) { + case MessageType.ConnectionInit: + case MessageType.ConnectionAck: + case MessageType.Ping: + case MessageType.Pong: + { + if (val.payload != null && !(0, _utils.isObject)(val.payload)) { + throw new Error(`"${val.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${val.payload}"`); + } + break; + } + case MessageType.Subscribe: + { + if (typeof val.id !== 'string') { + throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`); + } + if (!val.id) { + throw new Error(`"${val.type}" message requires a non-empty 'id' property`); + } + if (!(0, _utils.isObject)(val.payload)) { + throw new Error(`"${val.type}" message expects the 'payload' property to be an object, but got ${(0, _utils.extendedTypeof)(val.payload)}`); + } + if (typeof val.payload.query !== 'string') { + throw new Error(`"${val.type}" message payload expects the 'query' property to be a string, but got ${(0, _utils.extendedTypeof)(val.payload.query)}`); + } + if (val.payload.variables != null && !(0, _utils.isObject)(val.payload.variables)) { + throw new Error(`"${val.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.variables)}`); + } + if (val.payload.operationName != null && (0, _utils.extendedTypeof)(val.payload.operationName) !== 'string') { + throw new Error(`"${val.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.operationName)}`); + } + if (val.payload.extensions != null && !(0, _utils.isObject)(val.payload.extensions)) { + throw new Error(`"${val.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.extensions)}`); + } + break; + } + case MessageType.Next: + { + if (typeof val.id !== 'string') { + throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`); + } + if (!val.id) { + throw new Error(`"${val.type}" message requires a non-empty 'id' property`); + } + if (!(0, _utils.isObject)(val.payload)) { + throw new Error(`"${val.type}" message expects the 'payload' property to be an object, but got ${(0, _utils.extendedTypeof)(val.payload)}`); + } + break; + } + case MessageType.Error: + { + if (typeof val.id !== 'string') { + throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`); + } + if (!val.id) { + throw new Error(`"${val.type}" message requires a non-empty 'id' property`); + } + if (!(0, _utils.areGraphQLErrors)(val.payload)) { + throw new Error(`"${val.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(val.payload)}`); + } + break; + } + case MessageType.Complete: + { + if (typeof val.id !== 'string') { + throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`); + } + if (!val.id) { + throw new Error(`"${val.type}" message requires a non-empty 'id' property`); + } + break; + } + default: + throw new Error(`Invalid message 'type' property "${val.type}"`); + } + return val; } /** - * Render a helpful description of the location in the GraphQL Source document. + * Checks if the provided value is a valid GraphQL over WebSocket message. + * + * @deprecated Use `validateMessage` instead. + * + * @category Common */ - -function printSourceLocation(source, sourceLocation) { - const firstLineColumnOffset = source.locationOffset.column - 1; - const body = ''.padStart(firstLineColumnOffset) + source.body; - const lineIndex = sourceLocation.line - 1; - const lineOffset = source.locationOffset.line - 1; - const lineNum = sourceLocation.line + lineOffset; - const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; - const columnNum = sourceLocation.column + columnOffset; - const locationStr = `${source.name}:${lineNum}:${columnNum}\n`; - const lines = body.split(/\r\n|[\n\r]/g); - const locationLine = lines[lineIndex]; // Special case for minified documents - - if (locationLine.length > 120) { - const subLineIndex = Math.floor(columnNum / 80); - const subLineColumnNum = columnNum % 80; - const subLines = []; - for (let i = 0; i < locationLine.length; i += 80) { - subLines.push(locationLine.slice(i, i + 80)); - } - return locationStr + printPrefixedLines([[`${lineNum} |`, subLines[0]], ...subLines.slice(1, subLineIndex + 1).map(subLine => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)], ['|', subLines[subLineIndex + 1]]]); +function isMessage(val) { + try { + validateMessage(val); + return true; + } catch (_a) { + return false; } - return locationStr + printPrefixedLines([ - // Lines specified like this: ["prefix", "string"], - [`${lineNum - 1} |`, lines[lineIndex - 1]], [`${lineNum} |`, locationLine], ['|', '^'.padStart(columnNum)], [`${lineNum + 1} |`, lines[lineIndex + 1]]]); } -function printPrefixedLines(lines) { - const existingLines = lines.filter(_ref => { - let [_, line] = _ref; - return line !== undefined; - }); - const padLen = Math.max(...existingLines.map(_ref2 => { - let [prefix] = _ref2; - return prefix.length; - })); - return existingLines.map(_ref3 => { - let [prefix, line] = _ref3; - return prefix.padStart(padLen) + (line ? ' ' + line : ''); - }).join('\n'); +/** + * Parses the raw websocket message data to a valid message. + * + * @category Common + */ +function parseMessage(data, reviver) { + return validateMessage(typeof data === 'string' ? JSON.parse(data, reviver) : data); +} +/** + * Stringifies a valid message ready to be sent through the socket. + * + * @category Common + */ +function stringifyMessage(msg, replacer) { + validateMessage(msg); + return JSON.stringify(msg, replacer); } /***/ }), -/***/ "../../../node_modules/graphql/language/printString.mjs": -/*!**************************************************************!*\ - !*** ../../../node_modules/graphql/language/printString.mjs ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/graphql-ws/lib/index.js": +/*!*****************************************************!*\ + !*** ../../../node_modules/graphql-ws/lib/index.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; +var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k]; + } + }; + } + Object.defineProperty(o, k2, desc); +} : function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); +var __exportStar = void 0 && (void 0).__exportStar || function (m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.printString = printString; -/** - * Prints a string as a GraphQL StringValue literal. Replaces control characters - * and excluded characters (" U+0022 and \\ U+005C) with escape sequences. - */ -function printString(str) { - return `"${str.replace(escapedRegExp, escapedReplacer)}"`; -} // eslint-disable-next-line no-control-regex - -const escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; -function escapedReplacer(str) { - return escapeSequences[str.charCodeAt(0)]; -} // prettier-ignore - -const escapeSequences = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F', '', '', '\\"', '', '', '', '', '', '', '', '', '', '', '', '', '', -// 2F -'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', -// 3F -'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', -// 4F -'', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '', -// 5F -'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', -// 6F -'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\u007F', '\\u0080', '\\u0081', '\\u0082', '\\u0083', '\\u0084', '\\u0085', '\\u0086', '\\u0087', '\\u0088', '\\u0089', '\\u008A', '\\u008B', '\\u008C', '\\u008D', '\\u008E', '\\u008F', '\\u0090', '\\u0091', '\\u0092', '\\u0093', '\\u0094', '\\u0095', '\\u0096', '\\u0097', '\\u0098', '\\u0099', '\\u009A', '\\u009B', '\\u009C', '\\u009D', '\\u009E', '\\u009F']; +__exportStar(__webpack_require__(/*! ./client */ "../../../node_modules/graphql-ws/lib/client.mjs"), exports); +__exportStar(__webpack_require__(/*! ./server */ "../../../node_modules/graphql-ws/lib/server.mjs"), exports); +__exportStar(__webpack_require__(/*! ./common */ "../../../node_modules/graphql-ws/lib/common.mjs"), exports); /***/ }), -/***/ "../../../node_modules/graphql/language/printer.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/language/printer.mjs ***! - \**********************************************************/ +/***/ "../../../node_modules/graphql-ws/lib/server.mjs": +/*!*******************************************************!*\ + !*** ../../../node_modules/graphql-ws/lib/server.mjs ***! + \*******************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.print = print; -var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); -var _printString = __webpack_require__(/*! ./printString.mjs */ "../../../node_modules/graphql/language/printString.mjs"); -var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +exports.handleProtocols = handleProtocols; +exports.makeServer = makeServer; +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _common = __webpack_require__(/*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs"); +var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs"); /** - * Converts an AST into a string, using one set of reasonable - * formatting rules. + * + * server + * */ - -function print(ast) { - return (0, _visitor.visit)(ast, printDocASTReducer); -} -const MAX_LINE_LENGTH = 80; -const printDocASTReducer = { - Name: { - leave: node => node.value - }, - Variable: { - leave: node => '$' + node.name - }, - // Document - Document: { - leave: node => join(node.definitions, '\n\n') - }, - OperationDefinition: { - leave(node) { - const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')'); - const prefix = join([node.operation, join([node.name, varDefs]), join(node.directives, ' ')], ' '); // Anonymous queries with no directives or variable definitions can use - // the query short form. - - return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet; - } - }, - VariableDefinition: { - leave: _ref => { - let { - variable, - type, - defaultValue, - directives - } = _ref; - return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' ')); - } - }, - SelectionSet: { - leave: _ref2 => { - let { - selections - } = _ref2; - return block(selections); - } - }, - Field: { - leave(_ref3) { - let { - alias, - name, - arguments: args, - directives, - selectionSet - } = _ref3; - const prefix = wrap('', alias, ': ') + name; - let argsLine = prefix + wrap('(', join(args, ', '), ')'); - if (argsLine.length > MAX_LINE_LENGTH) { - argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)'); - } - return join([argsLine, join(directives, ' '), selectionSet], ' '); - } - }, - Argument: { - leave: _ref4 => { - let { - name, - value - } = _ref4; - return name + ': ' + value; - } - }, - // Fragments - FragmentSpread: { - leave: _ref5 => { - let { - name, - directives - } = _ref5; - return '...' + name + wrap(' ', join(directives, ' ')); - } - }, - InlineFragment: { - leave: _ref6 => { - let { - typeCondition, - directives, - selectionSet - } = _ref6; - return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' '); - } - }, - FragmentDefinition: { - leave: (_ref7 // Note: fragment variable definitions are experimental and may be changed - ) => { - let { - name, - typeCondition, - variableDefinitions, - directives, - selectionSet - } = _ref7; - return ( - // or removed in the future. - `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` + `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` + selectionSet - ); - } - }, - // Value - IntValue: { - leave: _ref8 => { - let { - value - } = _ref8; - return value; - } - }, - FloatValue: { - leave: _ref9 => { - let { - value - } = _ref9; - return value; - } - }, - StringValue: { - leave: _ref10 => { - let { - value, - block: isBlockString - } = _ref10; - return isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value); - } - }, - BooleanValue: { - leave: _ref11 => { - let { - value - } = _ref11; - return value ? 'true' : 'false'; - } - }, - NullValue: { - leave: () => 'null' - }, - EnumValue: { - leave: _ref12 => { - let { - value - } = _ref12; - return value; - } - }, - ListValue: { - leave: _ref13 => { - let { - values - } = _ref13; - return '[' + join(values, ', ') + ']'; - } - }, - ObjectValue: { - leave: _ref14 => { - let { - fields - } = _ref14; - return '{' + join(fields, ', ') + '}'; - } - }, - ObjectField: { - leave: _ref15 => { - let { - name, - value - } = _ref15; - return name + ': ' + value; - } - }, - // Directive - Directive: { - leave: _ref16 => { - let { - name, - arguments: args - } = _ref16; - return '@' + name + wrap('(', join(args, ', '), ')'); - } - }, - // Type - NamedType: { - leave: _ref17 => { - let { - name - } = _ref17; - return name; - } - }, - ListType: { - leave: _ref18 => { - let { - type - } = _ref18; - return '[' + type + ']'; - } - }, - NonNullType: { - leave: _ref19 => { - let { - type - } = _ref19; - return type + '!'; - } - }, - // Type System Definitions - SchemaDefinition: { - leave: _ref20 => { - let { - description, - directives, - operationTypes - } = _ref20; - return wrap('', description, '\n') + join(['schema', join(directives, ' '), block(operationTypes)], ' '); - } - }, - OperationTypeDefinition: { - leave: _ref21 => { - let { - operation, - type - } = _ref21; - return operation + ': ' + type; - } - }, - ScalarTypeDefinition: { - leave: _ref22 => { - let { - description, - name, - directives - } = _ref22; - return wrap('', description, '\n') + join(['scalar', name, join(directives, ' ')], ' '); - } - }, - ObjectTypeDefinition: { - leave: _ref23 => { - let { - description, - name, - interfaces, - directives, - fields - } = _ref23; - return wrap('', description, '\n') + join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); - } - }, - FieldDefinition: { - leave: _ref24 => { - let { - description, - name, - arguments: args, - type, - directives - } = _ref24; - return wrap('', description, '\n') + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' ')); - } - }, - InputValueDefinition: { - leave: _ref25 => { - let { - description, - name, - type, - defaultValue, - directives - } = _ref25; - return wrap('', description, '\n') + join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' '); - } - }, - InterfaceTypeDefinition: { - leave: _ref26 => { - let { - description, - name, - interfaces, - directives, - fields - } = _ref26; - return wrap('', description, '\n') + join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); - } - }, - UnionTypeDefinition: { - leave: _ref27 => { - let { - description, - name, - directives, - types - } = _ref27; - return wrap('', description, '\n') + join(['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' '); - } - }, - EnumTypeDefinition: { - leave: _ref28 => { - let { - description, - name, - directives, - values - } = _ref28; - return wrap('', description, '\n') + join(['enum', name, join(directives, ' '), block(values)], ' '); - } - }, - EnumValueDefinition: { - leave: _ref29 => { - let { - description, - name, - directives - } = _ref29; - return wrap('', description, '\n') + join([name, join(directives, ' ')], ' '); - } - }, - InputObjectTypeDefinition: { - leave: _ref30 => { - let { - description, - name, - directives, - fields - } = _ref30; - return wrap('', description, '\n') + join(['input', name, join(directives, ' '), block(fields)], ' '); - } - }, - DirectiveDefinition: { - leave: _ref31 => { - let { - description, - name, - arguments: args, - repeatable, - locations - } = _ref31; - return wrap('', description, '\n') + 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | '); - } - }, - SchemaExtension: { - leave: _ref32 => { - let { - directives, - operationTypes - } = _ref32; - return join(['extend schema', join(directives, ' '), block(operationTypes)], ' '); - } - }, - ScalarTypeExtension: { - leave: _ref33 => { - let { - name, - directives - } = _ref33; - return join(['extend scalar', name, join(directives, ' ')], ' '); - } - }, - ObjectTypeExtension: { - leave: _ref34 => { - let { - name, - interfaces, - directives, - fields - } = _ref34; - return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); - } - }, - InterfaceTypeExtension: { - leave: _ref35 => { - let { - name, - interfaces, - directives, - fields - } = _ref35; - return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); - } - }, - UnionTypeExtension: { - leave: _ref36 => { - let { - name, - directives, - types - } = _ref36; - return join(['extend union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' '); - } - }, - EnumTypeExtension: { - leave: _ref37 => { - let { - name, - directives, - values - } = _ref37; - return join(['extend enum', name, join(directives, ' '), block(values)], ' '); - } - }, - InputObjectTypeExtension: { - leave: _ref38 => { - let { - name, - directives, - fields - } = _ref38; - return join(['extend input', name, join(directives, ' '), block(fields)], ' '); - } +var __asyncValues = void 0 && (void 0).__asyncValues || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], + i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function (v) { + return new Promise(function (resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ + value: v, + done: d + }); + }, reject); } }; /** - * Given maybeArray, print an empty string if it is null or empty, otherwise - * print all items together separated by separator if provided + * Makes a Protocol complient WebSocket GraphQL server. The server + * is actually an API which is to be used with your favourite WebSocket + * server library! + * + * Read more about the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md). + * + * @category Server */ - -function join(maybeArray) { - let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - var _maybeArray$filter$jo; - return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(x => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ''; +function makeServer(options) { + const { + schema, + context, + roots, + validate, + execute, + subscribe, + connectionInitWaitTimeout = 3000, + // 3 seconds + onConnect, + onDisconnect, + onClose, + onSubscribe, + onOperation, + onNext, + onError, + onComplete, + jsonMessageReviver: reviver, + jsonMessageReplacer: replacer + } = options; + return { + opened(socket, extra) { + const ctx = { + connectionInitReceived: false, + acknowledged: false, + subscriptions: {}, + extra + }; + if (socket.protocol !== _common.GRAPHQL_TRANSPORT_WS_PROTOCOL) { + socket.close(_common.CloseCode.SubprotocolNotAcceptable, 'Subprotocol not acceptable'); + return async (code, reason) => { + /* nothing was set up, just notify the closure */ + await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason)); + }; + } + // kick the client off (close socket) if the connection has + // not been initialised after the specified wait timeout + const connectionInitWait = connectionInitWaitTimeout > 0 && isFinite(connectionInitWaitTimeout) ? setTimeout(() => { + if (!ctx.connectionInitReceived) socket.close(_common.CloseCode.ConnectionInitialisationTimeout, 'Connection initialisation timeout'); + }, connectionInitWaitTimeout) : null; + socket.onMessage(async function onMessage(data) { + var _a, e_1, _b, _c; + var _d; + let message; + try { + message = (0, _common.parseMessage)(data, reviver); + } catch (err) { + return socket.close(_common.CloseCode.BadRequest, 'Invalid message received'); + } + switch (message.type) { + case _common.MessageType.ConnectionInit: + { + if (ctx.connectionInitReceived) return socket.close(_common.CloseCode.TooManyInitialisationRequests, 'Too many initialisation requests'); + // @ts-expect-error: I can write + ctx.connectionInitReceived = true; + if ((0, _utils.isObject)(message.payload)) + // @ts-expect-error: I can write + ctx.connectionParams = message.payload; + const permittedOrPayload = await (onConnect === null || onConnect === void 0 ? void 0 : onConnect(ctx)); + if (permittedOrPayload === false) return socket.close(_common.CloseCode.Forbidden, 'Forbidden'); + await socket.send((0, _common.stringifyMessage)((0, _utils.isObject)(permittedOrPayload) ? { + type: _common.MessageType.ConnectionAck, + payload: permittedOrPayload + } : { + type: _common.MessageType.ConnectionAck + // payload is completely absent if not provided + }, replacer)); + // @ts-expect-error: I can write + ctx.acknowledged = true; + return; + } + case _common.MessageType.Ping: + { + if (socket.onPing) + // if the onPing listener is registered, automatic pong is disabled + return await socket.onPing(message.payload); + await socket.send((0, _common.stringifyMessage)(message.payload ? { + type: _common.MessageType.Pong, + payload: message.payload + } : { + type: _common.MessageType.Pong + // payload is completely absent if not provided + })); + return; + } + case _common.MessageType.Pong: + return await ((_d = socket.onPong) === null || _d === void 0 ? void 0 : _d.call(socket, message.payload)); + case _common.MessageType.Subscribe: + { + if (!ctx.acknowledged) return socket.close(_common.CloseCode.Unauthorized, 'Unauthorized'); + const { + id, + payload + } = message; + if (id in ctx.subscriptions) return socket.close(_common.CloseCode.SubscriberAlreadyExists, `Subscriber for ${id} already exists`); + // if this turns out to be a streaming operation, the subscription value + // will change to an `AsyncIterable`, otherwise it will stay as is + ctx.subscriptions[id] = null; + const emit = { + next: async (result, args) => { + let nextMessage = { + id, + type: _common.MessageType.Next, + payload: result + }; + const maybeResult = await (onNext === null || onNext === void 0 ? void 0 : onNext(ctx, nextMessage, args, result)); + if (maybeResult) nextMessage = Object.assign(Object.assign({}, nextMessage), { + payload: maybeResult + }); + await socket.send((0, _common.stringifyMessage)(nextMessage, replacer)); + }, + error: async errors => { + let errorMessage = { + id, + type: _common.MessageType.Error, + payload: errors + }; + const maybeErrors = await (onError === null || onError === void 0 ? void 0 : onError(ctx, errorMessage, errors)); + if (maybeErrors) errorMessage = Object.assign(Object.assign({}, errorMessage), { + payload: maybeErrors + }); + await socket.send((0, _common.stringifyMessage)(errorMessage, replacer)); + }, + complete: async notifyClient => { + const completeMessage = { + id, + type: _common.MessageType.Complete + }; + await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(ctx, completeMessage)); + if (notifyClient) await socket.send((0, _common.stringifyMessage)(completeMessage, replacer)); + } + }; + try { + let execArgs; + const maybeExecArgsOrErrors = await (onSubscribe === null || onSubscribe === void 0 ? void 0 : onSubscribe(ctx, message)); + if (maybeExecArgsOrErrors) { + if ((0, _utils.areGraphQLErrors)(maybeExecArgsOrErrors)) return await emit.error(maybeExecArgsOrErrors);else if (Array.isArray(maybeExecArgsOrErrors)) throw new Error('Invalid return value from onSubscribe hook, expected an array of GraphQLError objects'); + // not errors, is exec args + execArgs = maybeExecArgsOrErrors; + } else { + // you either provide a schema dynamically through + // `onSubscribe` or you set one up during the server setup + if (!schema) throw new Error('The GraphQL schema is not provided'); + const args = { + operationName: payload.operationName, + document: (0, _graphql.parse)(payload.query), + variableValues: payload.variables + }; + execArgs = Object.assign(Object.assign({}, args), { + schema: typeof schema === 'function' ? await schema(ctx, message, args) : schema + }); + const validationErrors = (validate !== null && validate !== void 0 ? validate : _graphql.validate)(execArgs.schema, execArgs.document); + if (validationErrors.length > 0) return await emit.error(validationErrors); + } + const operationAST = (0, _graphql.getOperationAST)(execArgs.document, execArgs.operationName); + if (!operationAST) return await emit.error([new _graphql.GraphQLError('Unable to identify operation')]); + // if `onSubscribe` didnt specify a rootValue, inject one + if (!('rootValue' in execArgs)) execArgs.rootValue = roots === null || roots === void 0 ? void 0 : roots[operationAST.operation]; + // if `onSubscribe` didn't specify a context, inject one + if (!('contextValue' in execArgs)) execArgs.contextValue = typeof context === 'function' ? await context(ctx, message, execArgs) : context; + // the execution arguments have been prepared + // perform the operation and act accordingly + let operationResult; + if (operationAST.operation === 'subscription') operationResult = await (subscribe !== null && subscribe !== void 0 ? subscribe : _graphql.subscribe)(execArgs); + // operation === 'query' || 'mutation' + else operationResult = await (execute !== null && execute !== void 0 ? execute : _graphql.execute)(execArgs); + const maybeResult = await (onOperation === null || onOperation === void 0 ? void 0 : onOperation(ctx, message, execArgs, operationResult)); + if (maybeResult) operationResult = maybeResult; + if ((0, _utils.isAsyncIterable)(operationResult)) { + /** multiple emitted results */ + if (!(id in ctx.subscriptions)) { + // subscription was completed/canceled before the operation settled + if ((0, _utils.isAsyncGenerator)(operationResult)) operationResult.return(undefined); + } else { + ctx.subscriptions[id] = operationResult; + try { + for (var _e = true, operationResult_1 = __asyncValues(operationResult), operationResult_1_1; operationResult_1_1 = await operationResult_1.next(), _a = operationResult_1_1.done, !_a; _e = true) { + _c = operationResult_1_1.value; + _e = false; + const result = _c; + await emit.next(result, execArgs); + } + } catch (e_1_1) { + e_1 = { + error: e_1_1 + }; + } finally { + try { + if (!_e && !_a && (_b = operationResult_1.return)) await _b.call(operationResult_1); + } finally { + if (e_1) throw e_1.error; + } + } + } + } else { + /** single emitted result */ + // if the client completed the subscription before the single result + // became available, he effectively canceled it and no data should be sent + if (id in ctx.subscriptions) await emit.next(operationResult, execArgs); + } + // lack of subscription at this point indicates that the client + // completed the subscription, he doesnt need to be reminded + await emit.complete(id in ctx.subscriptions); + } finally { + // whatever happens to the subscription, we finally want to get rid of the reservation + delete ctx.subscriptions[id]; + } + return; + } + case _common.MessageType.Complete: + { + const subscription = ctx.subscriptions[message.id]; + delete ctx.subscriptions[message.id]; // deleting the subscription means no further activity should take place + if ((0, _utils.isAsyncGenerator)(subscription)) await subscription.return(undefined); + return; + } + default: + throw new Error(`Unexpected message of type ${message.type} received`); + } + }); + // wait for close, cleanup and the disconnect callback + return async (code, reason) => { + if (connectionInitWait) clearTimeout(connectionInitWait); + for (const sub of Object.values(ctx.subscriptions)) { + if ((0, _utils.isAsyncGenerator)(sub)) await sub.return(undefined); + } + if (ctx.acknowledged) await (onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect(ctx, code, reason)); + await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason)); + }; + } + }; } /** - * Given array, print each item on its own line, wrapped in an indented `{ }` block. + * Helper utility for choosing the "graphql-transport-ws" subprotocol from + * a set of WebSocket subprotocols. + * + * Accepts a set of already extracted WebSocket subprotocols or the raw + * Sec-WebSocket-Protocol header value. In either case, if the right + * protocol appears, it will be returned. + * + * By specification, the server should not provide a value with Sec-WebSocket-Protocol + * if it does not agree with client's subprotocols. The client has a responsibility + * to handle the connection afterwards. + * + * @category Server */ - -function block(array) { - return wrap('{\n', indent(join(array, '\n')), '\n}'); +function handleProtocols(protocols) { + switch (true) { + case protocols instanceof Set && protocols.has(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL): + case Array.isArray(protocols) && protocols.includes(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL): + case typeof protocols === 'string' && protocols.split(',').map(p => p.trim()).includes(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL): + return _common.GRAPHQL_TRANSPORT_WS_PROTOCOL; + default: + return false; + } } -/** - * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string. - */ -function wrap(start, maybeString) { - let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - return maybeString != null && maybeString !== '' ? start + maybeString + end : ''; -} -function indent(str) { - return wrap(' ', str.replace(/\n/g, '\n ')); -} -function hasMultilineItems(maybeArray) { - var _maybeArray$some; +/***/ }), - // FIXME: https://github.com/graphql/graphql-js/issues/2203 +/***/ "../../../node_modules/graphql-ws/lib/utils.mjs": +/*!******************************************************!*\ + !*** ../../../node_modules/graphql-ws/lib/utils.mjs ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports) { - /* c8 ignore next */ - return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some(str => str.includes('\n'))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; -} +"use strict"; -/***/ }), -/***/ "../../../node_modules/graphql/language/source.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/language/source.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.areGraphQLErrors = areGraphQLErrors; +exports.extendedTypeof = extendedTypeof; +exports.isAsyncGenerator = isAsyncGenerator; +exports.isAsyncIterable = isAsyncIterable; +exports.isObject = isObject; +exports.limitCloseReason = limitCloseReason; +/** @private */ +function extendedTypeof(val) { + if (val === null) { + return 'null'; + } + if (Array.isArray(val)) { + return 'array'; + } + return typeof val; +} +/** @private */ +function isObject(val) { + return extendedTypeof(val) === 'object'; +} +/** @private */ +function isAsyncIterable(val) { + return typeof Object(val)[Symbol.asyncIterator] === 'function'; +} +/** @private */ +function isAsyncGenerator(val) { + return isObject(val) && typeof Object(val)[Symbol.asyncIterator] === 'function' && typeof val.return === 'function' + // for lazy ones, we only need the return anyway + // typeof val.throw === 'function' && + // typeof val.next === 'function' + ; +} +/** @private */ +function areGraphQLErrors(obj) { + return Array.isArray(obj) && + // must be at least one error + obj.length > 0 && + // error has at least a message + obj.every(ob => 'message' in ob); +} +/** + * Limits the WebSocket close event reason to not exceed a length of one frame. + * Reference: https://datatracker.ietf.org/doc/html/rfc6455#section-5.2. + * + * @private + */ +function limitCloseReason(reason, whenTooLong) { + return reason.length < 124 ? reason : whenTooLong; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/error/GraphQLError.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/error/GraphQLError.mjs ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Source = void 0; -exports.isSource = isSource; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); +exports.GraphQLError = void 0; +exports.formatError = formatError; +exports.printError = printError; +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _location = __webpack_require__(/*! ../language/location.mjs */ "../../../node_modules/graphql/language/location.mjs"); +var _printLocation = __webpack_require__(/*! ../language/printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs"); +function toNormalizedOptions(args) { + const firstArg = args[0]; + if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) { + return { + nodes: firstArg, + source: args[1], + positions: args[2], + path: args[3], + originalError: args[4], + extensions: args[5] + }; + } + return firstArg; +} /** - * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are - * optional, but they are useful for clients who store GraphQL documents in source files. - * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might - * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`. - * The `line` and `column` properties in `locationOffset` are 1-indexed. + * A GraphQLError describes an Error found during the parse, validate, or + * execute phases of performing a GraphQL operation. In addition to a message + * and stack trace, it also includes information about the locations in a + * GraphQL document and/or execution result that correspond to the Error. */ -class Source { - constructor(body) { - let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request'; - let locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { - line: 1, - column: 1 - }; - typeof body === 'string' || (0, _devAssert.devAssert)(false, `Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`); - this.body = body; - this.name = name; - this.locationOffset = locationOffset; - this.locationOffset.line > 0 || (0, _devAssert.devAssert)(false, 'line in locationOffset is 1-indexed and must be positive.'); - this.locationOffset.column > 0 || (0, _devAssert.devAssert)(false, 'column in locationOffset is 1-indexed and must be positive.'); + +class GraphQLError extends Error { + /** + * An array of `{ line, column }` locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + + /** + * The original error thrown from a field resolver during execution. + */ + + /** + * Extension fields to add to the formatted error. + */ + + /** + * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. + */ + constructor(message, ...rawArgs) { + var _this$nodes, _nodeLocations$, _ref; + const { + nodes, + source, + positions, + path, + originalError, + extensions + } = toNormalizedOptions(rawArgs); + super(message); + this.name = 'GraphQLError'; + this.path = path !== null && path !== void 0 ? path : undefined; + this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes. + + this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined); + const nodeLocations = undefinedIfEmpty((_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map(node => node.loc).filter(loc => loc != null)); // Compute locations in the source for the given nodes/positions. + + this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; + this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => loc.start); + this.locations = positions && source ? positions.map(pos => (0, _location.getLocation)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => (0, _location.getLocation)(loc.source, loc.start)); + const originalExtensions = (0, _isObjectLike.isObjectLike)(originalError === null || originalError === void 0 ? void 0 : originalError.extensions) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : undefined; + this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : Object.create(null); // Only properties prescribed by the spec should be enumerable. + // Keep the rest as non-enumerable. + + Object.defineProperties(this, { + message: { + writable: true, + enumerable: true + }, + name: { + enumerable: false + }, + nodes: { + enumerable: false + }, + source: { + enumerable: false + }, + positions: { + enumerable: false + }, + originalError: { + enumerable: false + } + }); // Include (non-enumerable) stack trace. + + /* c8 ignore start */ + // FIXME: https://github.com/graphql/graphql-js/issues/2317 + + if (originalError !== null && originalError !== void 0 && originalError.stack) { + Object.defineProperty(this, 'stack', { + value: originalError.stack, + writable: true, + configurable: true + }); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, GraphQLError); + } else { + Object.defineProperty(this, 'stack', { + value: Error().stack, + writable: true, + configurable: true + }); + } + /* c8 ignore stop */ } get [Symbol.toStringTag]() { - return 'Source'; + return 'GraphQLError'; + } + toString() { + let output = this.message; + if (this.nodes) { + for (const node of this.nodes) { + if (node.loc) { + output += '\n\n' + (0, _printLocation.printLocation)(node.loc); + } + } + } else if (this.source && this.locations) { + for (const location of this.locations) { + output += '\n\n' + (0, _printLocation.printSourceLocation)(this.source, location); + } + } + return output; } + toJSON() { + const formattedError = { + message: this.message + }; + if (this.locations != null) { + formattedError.locations = this.locations; + } + if (this.path != null) { + formattedError.path = this.path; + } + if (this.extensions != null && Object.keys(this.extensions).length > 0) { + formattedError.extensions = this.extensions; + } + return formattedError; + } +} +exports.GraphQLError = GraphQLError; +function undefinedIfEmpty(array) { + return array === undefined || array.length === 0 ? undefined : array; } /** - * Test if the given value is a Source object. + * See: https://spec.graphql.org/draft/#sec-Errors + */ + +/** + * Prints a GraphQLError to a string, representing useful location information + * about the error's position in the source. * - * @internal + * @deprecated Please use `error.toString` instead. Will be removed in v17 */ -exports.Source = Source; -function isSource(source) { - return (0, _instanceOf.instanceOf)(source, Source); +function printError(error) { + return error.toString(); +} +/** + * Given a GraphQLError, format it according to the rules described by the + * Response Format, Errors section of the GraphQL Specification. + * + * @deprecated Please use `error.toJSON` instead. Will be removed in v17 + */ + +function formatError(error) { + return error.toJSON(); } /***/ }), -/***/ "../../../node_modules/graphql/language/tokenKind.mjs": +/***/ "../../../node_modules/graphql/error/index.mjs": +/*!*****************************************************!*\ + !*** ../../../node_modules/graphql/error/index.mjs ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "GraphQLError", ({ + enumerable: true, + get: function () { + return _GraphQLError.GraphQLError; + } +})); +Object.defineProperty(exports, "formatError", ({ + enumerable: true, + get: function () { + return _GraphQLError.formatError; + } +})); +Object.defineProperty(exports, "locatedError", ({ + enumerable: true, + get: function () { + return _locatedError.locatedError; + } +})); +Object.defineProperty(exports, "printError", ({ + enumerable: true, + get: function () { + return _GraphQLError.printError; + } +})); +Object.defineProperty(exports, "syntaxError", ({ + enumerable: true, + get: function () { + return _syntaxError.syntaxError; + } +})); +var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _syntaxError = __webpack_require__(/*! ./syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs"); +var _locatedError = __webpack_require__(/*! ./locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs"); + +/***/ }), + +/***/ "../../../node_modules/graphql/error/locatedError.mjs": /*!************************************************************!*\ - !*** ../../../node_modules/graphql/language/tokenKind.mjs ***! + !*** ../../../node_modules/graphql/error/locatedError.mjs ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TokenKind = void 0; +exports.locatedError = locatedError; +var _toError = __webpack_require__(/*! ../jsutils/toError.mjs */ "../../../node_modules/graphql/jsutils/toError.mjs"); +var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * An exported enum describing the different kinds of tokens that the - * lexer emits. + * Given an arbitrary value, presumably thrown while attempting to execute a + * GraphQL operation, produce a new GraphQLError aware of the location in the + * document responsible for the original Error. */ -var TokenKind; -exports.TokenKind = TokenKind; -(function (TokenKind) { - TokenKind['SOF'] = ''; - TokenKind['EOF'] = ''; - TokenKind['BANG'] = '!'; - TokenKind['DOLLAR'] = '$'; - TokenKind['AMP'] = '&'; - TokenKind['PAREN_L'] = '('; - TokenKind['PAREN_R'] = ')'; - TokenKind['SPREAD'] = '...'; - TokenKind['COLON'] = ':'; - TokenKind['EQUALS'] = '='; - TokenKind['AT'] = '@'; - TokenKind['BRACKET_L'] = '['; - TokenKind['BRACKET_R'] = ']'; - TokenKind['BRACE_L'] = '{'; - TokenKind['PIPE'] = '|'; - TokenKind['BRACE_R'] = '}'; - TokenKind['NAME'] = 'Name'; - TokenKind['INT'] = 'Int'; - TokenKind['FLOAT'] = 'Float'; - TokenKind['STRING'] = 'String'; - TokenKind['BLOCK_STRING'] = 'BlockString'; - TokenKind['COMMENT'] = 'Comment'; -})(TokenKind || (exports.TokenKind = TokenKind = {})); -/** - * The enum type representing the token kinds values. - * - * @deprecated Please use `TokenKind`. Will be remove in v17. - */ +function locatedError(rawOriginalError, nodes, path) { + var _nodes; + const originalError = (0, _toError.toError)(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts. + + if (isLocatedGraphQLError(originalError)) { + return originalError; + } + return new _GraphQLError.GraphQLError(originalError.message, { + nodes: (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, + source: originalError.source, + positions: originalError.positions, + path, + originalError + }); +} +function isLocatedGraphQLError(error) { + return Array.isArray(error.path); +} /***/ }), -/***/ "../../../node_modules/graphql/language/visitor.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/language/visitor.mjs ***! - \**********************************************************/ +/***/ "../../../node_modules/graphql/error/syntaxError.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/error/syntaxError.mjs ***! + \***********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BREAK = void 0; -exports.getEnterLeaveForKind = getEnterLeaveForKind; -exports.getVisitFn = getVisitFn; -exports.visit = visit; -exports.visitInParallel = visitInParallel; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +exports.syntaxError = syntaxError; +var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * A visitor is provided to visit, it contains the collection of - * relevant functions to be called during the visitor's traversal. + * Produces a GraphQLError representing a syntax error, containing useful + * descriptive information about the syntax error's position in the source. */ -const BREAK = Object.freeze({}); +function syntaxError(source, position, description) { + return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, { + source, + positions: [position] + }); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/execution/collectFields.mjs": +/*!*****************************************************************!*\ + !*** ../../../node_modules/graphql/execution/collectFields.mjs ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.collectFields = collectFields; +exports.collectSubfields = collectSubfields; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _typeFromAST = __webpack_require__(/*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); /** - * visit() will walk through an AST using a depth-first traversal, calling - * the visitor's enter function at each node in the traversal, and calling the - * leave function after visiting that node and all of its child nodes. - * - * By returning different values from the enter and leave functions, the - * behavior of the visitor can be altered, including skipping over a sub-tree of - * the AST (by returning false), editing the AST by returning a value or null - * to remove the value, or to stop the whole traversal by returning BREAK. - * - * When using visit() to edit an AST, the original AST will not be modified, and - * a new version of the AST with the changes applied will be returned from the - * visit function. - * - * ```ts - * const editedAST = visit(ast, { - * enter(node, key, parent, path, ancestors) { - * // @return - * // undefined: no action - * // false: skip visiting this node - * // visitor.BREAK: stop visiting altogether - * // null: delete this node - * // any value: replace this node with the returned value - * }, - * leave(node, key, parent, path, ancestors) { - * // @return - * // undefined: no action - * // false: no action - * // visitor.BREAK: stop visiting altogether - * // null: delete this node - * // any value: replace this node with the returned value - * } - * }); - * ``` - * - * Alternatively to providing enter() and leave() functions, a visitor can - * instead provide functions named the same as the kinds of AST nodes, or - * enter/leave visitors at a named key, leading to three permutations of the - * visitor API: - * - * 1) Named visitors triggered when entering a node of a specific kind. - * - * ```ts - * visit(ast, { - * Kind(node) { - * // enter the "Kind" node - * } - * }) - * ``` - * - * 2) Named visitors that trigger upon entering and leaving a node of a specific kind. - * - * ```ts - * visit(ast, { - * Kind: { - * enter(node) { - * // enter the "Kind" node - * } - * leave(node) { - * // leave the "Kind" node - * } - * } - * }) - * ``` + * Given a selectionSet, collects all of the fields and returns them. * - * 3) Generic visitors that trigger upon entering and leaving any node. + * CollectFields requires the "runtime type" of an object. For a field that + * returns an Interface or Union type, the "runtime type" will be the actual + * object type returned by that field. * - * ```ts - * visit(ast, { - * enter(node) { - * // enter any node - * }, - * leave(node) { - * // leave any node - * } - * }) - * ``` + * @internal */ -exports.BREAK = BREAK; -function visit(root, visitor) { - let visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ast.QueryDocumentKeys; - const enterLeaveMap = new Map(); - for (const kind of Object.values(_kinds.Kind)) { - enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind)); - } - /* eslint-disable no-undef-init */ - let stack = undefined; - let inArray = Array.isArray(root); - let keys = [root]; - let index = -1; - let edits = []; - let node = root; - let key = undefined; - let parent = undefined; - const path = []; - const ancestors = []; - /* eslint-enable no-undef-init */ +function collectFields(schema, fragments, variableValues, runtimeType, selectionSet) { + const fields = new Map(); + collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, new Set()); + return fields; +} +/** + * Given an array of field nodes, collects all of the subfields of the passed + * in fields, and returns them at the end. + * + * CollectSubFields requires the "return type" of an object. For a field that + * returns an Interface or Union type, the "return type" will be the actual + * object type returned by that field. + * + * @internal + */ - do { - index++; - const isLeaving = index === keys.length; - const isEdited = isLeaving && edits.length !== 0; - if (isLeaving) { - key = ancestors.length === 0 ? undefined : path[path.length - 1]; - node = parent; - parent = ancestors.pop(); - if (isEdited) { - if (inArray) { - node = node.slice(); - let editOffset = 0; - for (const [editKey, editValue] of edits) { - const arrayKey = editKey - editOffset; - if (editValue === null) { - node.splice(arrayKey, 1); - editOffset++; - } else { - node[arrayKey] = editValue; - } +function collectSubfields(schema, fragments, variableValues, returnType, fieldNodes) { + const subFieldNodes = new Map(); + const visitedFragmentNames = new Set(); + for (const node of fieldNodes) { + if (node.selectionSet) { + collectFieldsImpl(schema, fragments, variableValues, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames); + } + } + return subFieldNodes; +} +function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case _kinds.Kind.FIELD: + { + if (!shouldIncludeNode(variableValues, selection)) { + continue; } - } else { - node = Object.defineProperties({}, Object.getOwnPropertyDescriptors(node)); - for (const [editKey, editValue] of edits) { - node[editKey] = editValue; + const name = getFieldEntryKey(selection); + const fieldList = fields.get(name); + if (fieldList !== undefined) { + fieldList.push(selection); + } else { + fields.set(name, [selection]); } + break; } - } - index = stack.index; - keys = stack.keys; - edits = stack.edits; - inArray = stack.inArray; - stack = stack.prev; - } else if (parent) { - key = inArray ? index : keys[index]; - node = parent[key]; - if (node === null || node === undefined) { - continue; - } - path.push(key); - } - let result; - if (!Array.isArray(node)) { - var _enterLeaveMap$get, _enterLeaveMap$get2; - (0, _ast.isNode)(node) || (0, _devAssert.devAssert)(false, `Invalid AST Node: ${(0, _inspect.inspect)(node)}.`); - const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; - result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); - if (result === BREAK) { - break; - } - if (result === false) { - if (!isLeaving) { - path.pop(); - continue; + case _kinds.Kind.INLINE_FRAGMENT: + { + if (!shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType)) { + continue; + } + collectFieldsImpl(schema, fragments, variableValues, runtimeType, selection.selectionSet, fields, visitedFragmentNames); + break; } - } else if (result !== undefined) { - edits.push([key, result]); - if (!isLeaving) { - if ((0, _ast.isNode)(result)) { - node = result; - } else { - path.pop(); + case _kinds.Kind.FRAGMENT_SPREAD: + { + const fragName = selection.name.value; + if (visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection)) { + continue; + } + visitedFragmentNames.add(fragName); + const fragment = fragments[fragName]; + if (!fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType)) { continue; } + collectFieldsImpl(schema, fragments, variableValues, runtimeType, fragment.selectionSet, fields, visitedFragmentNames); + break; } - } - } - if (result === undefined && isEdited) { - edits.push([key, node]); - } - if (isLeaving) { - path.pop(); - } else { - var _node$kind; - stack = { - inArray, - index, - keys, - edits, - prev: stack - }; - inArray = Array.isArray(node); - keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; - index = -1; - edits = []; - if (parent) { - ancestors.push(parent); - } - parent = node; } - } while (stack !== undefined); - if (edits.length !== 0) { - // New root - return edits[edits.length - 1][1]; } - return root; } /** - * Creates a new visitor instance which delegates to many visitors to run in - * parallel. Each visitor will be visited for each node before moving on. - * - * If a prior visitor edits a node, no following visitors will see that node. + * Determines if a field should be included based on the `@include` and `@skip` + * directives, where `@skip` has higher precedence than `@include`. */ -function visitInParallel(visitors) { - const skipping = new Array(visitors.length).fill(null); - const mergedVisitor = Object.create(null); - for (const kind of Object.values(_kinds.Kind)) { - let hasVisitor = false; - const enterList = new Array(visitors.length).fill(undefined); - const leaveList = new Array(visitors.length).fill(undefined); - for (let i = 0; i < visitors.length; ++i) { - const { - enter, - leave - } = getEnterLeaveForKind(visitors[i], kind); - hasVisitor || (hasVisitor = enter != null || leave != null); - enterList[i] = enter; - leaveList[i] = leave; - } - if (!hasVisitor) { - continue; - } - const mergedEnterLeave = { - enter() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - const node = args[0]; - for (let i = 0; i < visitors.length; i++) { - if (skipping[i] === null) { - var _enterList$i; - const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); - if (result === false) { - skipping[i] = node; - } else if (result === BREAK) { - skipping[i] = BREAK; - } else if (result !== undefined) { - return result; - } - } - } - }, - leave() { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - const node = args[0]; - for (let i = 0; i < visitors.length; i++) { - if (skipping[i] === null) { - var _leaveList$i; - const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); - if (result === BREAK) { - skipping[i] = BREAK; - } else if (result !== undefined && result !== false) { - return result; - } - } else if (skipping[i] === node) { - skipping[i] = null; - } - } - } - }; - mergedVisitor[kind] = mergedEnterLeave; +function shouldIncludeNode(variableValues, node) { + const skip = (0, _values.getDirectiveValues)(_directives.GraphQLSkipDirective, node, variableValues); + if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) { + return false; } - return mergedVisitor; + const include = (0, _values.getDirectiveValues)(_directives.GraphQLIncludeDirective, node, variableValues); + if ((include === null || include === void 0 ? void 0 : include.if) === false) { + return false; + } + return true; } /** - * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind. + * Determines if a fragment is applicable to the given type. */ -function getEnterLeaveForKind(visitor, kind) { - const kindVisitor = visitor[kind]; - if (typeof kindVisitor === 'object') { - // { Kind: { enter() {}, leave() {} } } - return kindVisitor; - } else if (typeof kindVisitor === 'function') { - // { Kind() {} } - return { - enter: kindVisitor, - leave: undefined - }; - } // { enter() {}, leave() {} } - - return { - enter: visitor.enter, - leave: visitor.leave - }; +function doesFragmentConditionMatch(schema, fragment, type) { + const typeConditionNode = fragment.typeCondition; + if (!typeConditionNode) { + return true; + } + const conditionalType = (0, _typeFromAST.typeFromAST)(schema, typeConditionNode); + if (conditionalType === type) { + return true; + } + if ((0, _definition.isAbstractType)(conditionalType)) { + return schema.isSubType(conditionalType, type); + } + return false; } /** - * Given a visitor instance, if it is leaving or not, and a node kind, return - * the function the visitor runtime should call. - * - * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17 + * Implements the logic to compute the key of a given field's entry */ -/* c8 ignore next 8 */ - -function getVisitFn(visitor, kind, isLeaving) { - const { - enter, - leave - } = getEnterLeaveForKind(visitor, kind); - return isLeaving ? leave : enter; +function getFieldEntryKey(node) { + return node.alias ? node.alias.value : node.name.value; } /***/ }), -/***/ "../../../node_modules/graphql/type/assertName.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/type/assertName.mjs ***! - \*********************************************************/ +/***/ "../../../node_modules/graphql/execution/execute.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/execution/execute.mjs ***! + \***********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.assertEnumValueName = assertEnumValueName; -exports.assertName = assertName; +exports.assertValidExecutionArguments = assertValidExecutionArguments; +exports.buildExecutionContext = buildExecutionContext; +exports.buildResolveInfo = buildResolveInfo; +exports.defaultTypeResolver = exports.defaultFieldResolver = void 0; +exports.execute = execute; +exports.executeSync = executeSync; +exports.getFieldDef = getFieldDef; var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _isPromise = __webpack_require__(/*! ../jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs"); +var _memoize = __webpack_require__(/*! ../jsutils/memoize3.mjs */ "../../../node_modules/graphql/jsutils/memoize3.mjs"); +var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs"); +var _promiseForObject = __webpack_require__(/*! ../jsutils/promiseForObject.mjs */ "../../../node_modules/graphql/jsutils/promiseForObject.mjs"); +var _promiseReduce = __webpack_require__(/*! ../jsutils/promiseReduce.mjs */ "../../../node_modules/graphql/jsutils/promiseReduce.mjs"); var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _characterClasses = __webpack_require__(/*! ../language/characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); +var _locatedError = __webpack_require__(/*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs"); +var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _validate = __webpack_require__(/*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); +var _collectFields = __webpack_require__(/*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs"); +var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); /** - * Upholds the spec rules about naming. + * A memoized collection of relevant subfields with regard to the return + * type. Memoizing ensures the subfields are not repeatedly calculated, which + * saves overhead when resolving lists of values. */ -function assertName(name) { - name != null || (0, _devAssert.devAssert)(false, 'Must provide name.'); - typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.'); - if (name.length === 0) { - throw new _GraphQLError.GraphQLError('Expected name to be a non-empty string.'); - } - for (let i = 1; i < name.length; ++i) { - if (!(0, _characterClasses.isNameContinue)(name.charCodeAt(i))) { - throw new _GraphQLError.GraphQLError(`Names must only contain [_a-zA-Z0-9] but "${name}" does not.`); - } - } - if (!(0, _characterClasses.isNameStart)(name.charCodeAt(0))) { - throw new _GraphQLError.GraphQLError(`Names must start with [_a-zA-Z] but "${name}" does not.`); - } - return name; -} +const collectSubfields = (0, _memoize.memoize3)((exeContext, returnType, fieldNodes) => (0, _collectFields.collectSubfields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, returnType, fieldNodes)); /** - * Upholds the spec rules about naming enum values. + * Terminology * - * @internal + * "Definitions" are the generic name for top-level statements in the document. + * Examples of this include: + * 1) Operations (such as a query) + * 2) Fragments + * + * "Operations" are a generic name for requests in the document. + * Examples of this include: + * 1) query, + * 2) mutation + * + * "Selections" are the definitions that can appear legally and at + * single level of the query. These include: + * 1) field references e.g `a` + * 2) fragment "spreads" e.g. `...c` + * 3) inline fragment "spreads" e.g. `...on Type { a }` */ -function assertEnumValueName(name) { - if (name === 'true' || name === 'false' || name === 'null') { - throw new _GraphQLError.GraphQLError(`Enum values cannot be named: ${name}`); - } - return assertName(name); -} +/** + * Data that must be available at all points during query execution. + * + * Namely, schema of the type system that is currently executing, + * and the fragments defined in the query document + */ -/***/ }), +/** + * Implements the "Executing requests" section of the GraphQL specification. + * + * Returns either a synchronous ExecutionResult (if all encountered resolvers + * are synchronous), or a Promise of an ExecutionResult that will eventually be + * resolved and never rejected. + * + * If the arguments to this function do not result in a legal execution context, + * a GraphQLError will be thrown immediately explaining the invalid input. + */ +function execute(args) { + // Temporary for v15 to v16 migration. Remove in v17 + arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.'); + const { + schema, + document, + variableValues, + rootValue + } = args; // If arguments are missing or incorrect, throw an error. -/***/ "../../../node_modules/graphql/type/definition.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/type/definition.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments, + // a "Response" with only errors is returned. + const exeContext = buildExecutionContext(args); // Return early errors if execution context failed. + if (!('schema' in exeContext)) { + return { + errors: exeContext + }; + } // Return a Promise that will eventually resolve to the data described by + // The "Response" section of the GraphQL specification. + // + // If errors are encountered while executing a GraphQL field, only that + // field and its descendants will be omitted, and sibling fields will still + // be executed. An execution which encounters errors will still result in a + // resolved Promise. + // + // Errors from sub-fields of a NonNull type may propagate to the top level, + // at which point we still log the error and null the parent field, which + // in this case is the entire response. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0; -exports.argsToArgsConfig = argsToArgsConfig; -exports.assertAbstractType = assertAbstractType; -exports.assertCompositeType = assertCompositeType; -exports.assertEnumType = assertEnumType; -exports.assertInputObjectType = assertInputObjectType; -exports.assertInputType = assertInputType; -exports.assertInterfaceType = assertInterfaceType; -exports.assertLeafType = assertLeafType; -exports.assertListType = assertListType; -exports.assertNamedType = assertNamedType; -exports.assertNonNullType = assertNonNullType; -exports.assertNullableType = assertNullableType; -exports.assertObjectType = assertObjectType; -exports.assertOutputType = assertOutputType; -exports.assertScalarType = assertScalarType; -exports.assertType = assertType; -exports.assertUnionType = assertUnionType; -exports.assertWrappingType = assertWrappingType; -exports.defineArguments = defineArguments; -exports.getNamedType = getNamedType; -exports.getNullableType = getNullableType; -exports.isAbstractType = isAbstractType; -exports.isCompositeType = isCompositeType; -exports.isEnumType = isEnumType; -exports.isInputObjectType = isInputObjectType; -exports.isInputType = isInputType; -exports.isInterfaceType = isInterfaceType; -exports.isLeafType = isLeafType; -exports.isListType = isListType; -exports.isNamedType = isNamedType; -exports.isNonNullType = isNonNullType; -exports.isNullableType = isNullableType; -exports.isObjectType = isObjectType; -exports.isOutputType = isOutputType; -exports.isRequiredArgument = isRequiredArgument; -exports.isRequiredInputField = isRequiredInputField; -exports.isScalarType = isScalarType; -exports.isType = isType; -exports.isUnionType = isUnionType; -exports.isWrappingType = isWrappingType; -exports.resolveObjMapThunk = resolveObjMapThunk; -exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _identityFunc = __webpack_require__(/*! ../jsutils/identityFunc.mjs */ "../../../node_modules/graphql/jsutils/identityFunc.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); -var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs"); -var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _valueFromASTUntyped = __webpack_require__(/*! ../utilities/valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs"); -var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); -function isType(type) { - return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type); -} -function assertType(type) { - if (!isType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL type.`); + try { + const { + operation + } = exeContext; + const result = executeOperation(exeContext, operation, rootValue); + if ((0, _isPromise.isPromise)(result)) { + return result.then(data => buildResponse(data, exeContext.errors), error => { + exeContext.errors.push(error); + return buildResponse(null, exeContext.errors); + }); + } + return buildResponse(result, exeContext.errors); + } catch (error) { + exeContext.errors.push(error); + return buildResponse(null, exeContext.errors); } - return type; } /** - * There are predicates for each kind of GraphQL type. + * Also implements the "Executing requests" section of the GraphQL specification. + * However, it guarantees to complete synchronously (or throw an error) assuming + * that all field resolvers are also synchronous. */ -function isScalarType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLScalarType); -} -function assertScalarType(type) { - if (!isScalarType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Scalar type.`); - } - return type; -} -function isObjectType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLObjectType); -} -function assertObjectType(type) { - if (!isObjectType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Object type.`); +function executeSync(args) { + const result = execute(args); // Assert that the execution was synchronous. + + if ((0, _isPromise.isPromise)(result)) { + throw new Error('GraphQL execution failed to complete synchronously.'); } - return type; -} -function isInterfaceType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLInterfaceType); -} -function assertInterfaceType(type) { - if (!isInterfaceType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Interface type.`); - } - return type; -} -function isUnionType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLUnionType); -} -function assertUnionType(type) { - if (!isUnionType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Union type.`); - } - return type; -} -function isEnumType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLEnumType); -} -function assertEnumType(type) { - if (!isEnumType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Enum type.`); - } - return type; -} -function isInputObjectType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLInputObjectType); -} -function assertInputObjectType(type) { - if (!isInputObjectType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Input Object type.`); - } - return type; -} -function isListType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLList); -} -function assertListType(type) { - if (!isListType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL List type.`); - } - return type; -} -function isNonNullType(type) { - return (0, _instanceOf.instanceOf)(type, GraphQLNonNull); -} -function assertNonNullType(type) { - if (!isNonNullType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Non-Null type.`); - } - return type; -} -/** - * These types may be used as input types for arguments and directives. - */ - -function isInputType(type) { - return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType); -} -function assertInputType(type) { - if (!isInputType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL input type.`); - } - return type; + return result; } /** - * These types may be used as output types as the result of fields. + * Given a completed execution context and data, build the `{ errors, data }` + * response defined by the "Response" section of the GraphQL specification. */ -function isOutputType(type) { - return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType); -} -function assertOutputType(type) { - if (!isOutputType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL output type.`); - } - return type; +function buildResponse(data, errors) { + return errors.length === 0 ? { + data + } : { + errors, + data + }; } /** - * These types may describe types which may be leaf values. + * Essential assertions before executing to provide developer feedback for + * improper use of the GraphQL library. + * + * @internal */ -function isLeafType(type) { - return isScalarType(type) || isEnumType(type); -} -function assertLeafType(type) { - if (!isLeafType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL leaf type.`); - } - return type; -} -/** - * These types may describe the parent context of a selection set. - */ +function assertValidExecutionArguments(schema, document, rawVariableValues) { + document || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error. -function isCompositeType(type) { - return isObjectType(type) || isInterfaceType(type) || isUnionType(type); -} -function assertCompositeType(type) { - if (!isCompositeType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL composite type.`); - } - return type; -} -/** - * These types may describe the parent context of a selection set. - */ + (0, _validate.assertValidSchema)(schema); // Variables, if provided, must be an object. -function isAbstractType(type) { - return isInterfaceType(type) || isUnionType(type); -} -function assertAbstractType(type) { - if (!isAbstractType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL abstract type.`); - } - return type; + rawVariableValues == null || (0, _isObjectLike.isObjectLike)(rawVariableValues) || (0, _devAssert.devAssert)(false, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.'); } /** - * List Type Wrapper - * - * A list is a wrapping type which points to another type. - * Lists are often created within the context of defining the fields of - * an object type. + * Constructs a ExecutionContext object from the arguments passed to + * execute, which we will pass throughout the other execution methods. * - * Example: + * Throws a GraphQLError if a valid execution context cannot be created. * - * ```ts - * const PersonType = new GraphQLObjectType({ - * name: 'Person', - * fields: () => ({ - * parents: { type: new GraphQLList(PersonType) }, - * children: { type: new GraphQLList(PersonType) }, - * }) - * }) - * ``` + * @internal */ -class GraphQLList { - constructor(ofType) { - isType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.`); - this.ofType = ofType; - } - get [Symbol.toStringTag]() { - return 'GraphQLList'; - } - toString() { - return '[' + String(this.ofType) + ']'; +function buildExecutionContext(args) { + var _definition$name, _operation$variableDe; + const { + schema, + document, + rootValue, + contextValue, + variableValues: rawVariableValues, + operationName, + fieldResolver, + typeResolver, + subscribeFieldResolver + } = args; + let operation; + const fragments = Object.create(null); + for (const definition of document.definitions) { + switch (definition.kind) { + case _kinds.Kind.OPERATION_DEFINITION: + if (operationName == null) { + if (operation !== undefined) { + return [new _GraphQLError.GraphQLError('Must provide operation name if query contains multiple operations.')]; + } + operation = definition; + } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { + operation = definition; + } + break; + case _kinds.Kind.FRAGMENT_DEFINITION: + fragments[definition.name.value] = definition; + break; + default: // ignore non-executable definitions + } } - toJSON() { - return this.toString(); + if (!operation) { + if (operationName != null) { + return [new _GraphQLError.GraphQLError(`Unknown operation named "${operationName}".`)]; + } + return [new _GraphQLError.GraphQLError('Must provide an operation.')]; + } // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : []; + const coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, { + maxErrors: 50 + }); + if (coercedVariableValues.errors) { + return coercedVariableValues.errors; } + return { + schema, + fragments, + rootValue, + contextValue, + operation, + variableValues: coercedVariableValues.coerced, + fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver, + typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver, + subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !== void 0 ? subscribeFieldResolver : defaultFieldResolver, + errors: [] + }; } /** - * Non-Null Type Wrapper - * - * A non-null is a wrapping type which points to another type. - * Non-null types enforce that their values are never null and can ensure - * an error is raised if this ever occurs during a request. It is useful for - * fields which you can make a strong guarantee on non-nullability, for example - * usually the id field of a database row will never be null. - * - * Example: - * - * ```ts - * const RowType = new GraphQLObjectType({ - * name: 'Row', - * fields: () => ({ - * id: { type: new GraphQLNonNull(GraphQLString) }, - * }) - * }) - * ``` - * Note: the enforcement of non-nullability occurs within the executor. + * Implements the "Executing operations" section of the spec. */ -exports.GraphQLList = GraphQLList; -class GraphQLNonNull { - constructor(ofType) { - isNullableType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL nullable type.`); - this.ofType = ofType; - } - get [Symbol.toStringTag]() { - return 'GraphQLNonNull'; - } - toString() { - return String(this.ofType) + '!'; + +function executeOperation(exeContext, operation, rootValue) { + const rootType = exeContext.schema.getRootType(operation.operation); + if (rootType == null) { + throw new _GraphQLError.GraphQLError(`Schema is not configured to execute ${operation.operation} operation.`, { + nodes: operation + }); } - toJSON() { - return this.toString(); + const rootFields = (0, _collectFields.collectFields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, rootType, operation.selectionSet); + const path = undefined; + switch (operation.operation) { + case _ast.OperationTypeNode.QUERY: + return executeFields(exeContext, rootType, rootValue, path, rootFields); + case _ast.OperationTypeNode.MUTATION: + return executeFieldsSerially(exeContext, rootType, rootValue, path, rootFields); + case _ast.OperationTypeNode.SUBSCRIPTION: + // TODO: deprecate `subscribe` and move all logic here + // Temporary solution until we finish merging execute and subscribe together + return executeFields(exeContext, rootType, rootValue, path, rootFields); } } /** - * These types wrap and modify other types + * Implements the "Executing selection sets" section of the spec + * for fields that must be executed serially. */ -exports.GraphQLNonNull = GraphQLNonNull; -function isWrappingType(type) { - return isListType(type) || isNonNullType(type); -} -function assertWrappingType(type) { - if (!isWrappingType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL wrapping type.`); - } - return type; + +function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) { + return (0, _promiseReduce.promiseReduce)(fields.entries(), (results, [responseName, fieldNodes]) => { + const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name); + const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath); + if (result === undefined) { + return results; + } + if ((0, _isPromise.isPromise)(result)) { + return result.then(resolvedResult => { + results[responseName] = resolvedResult; + return results; + }); + } + results[responseName] = result; + return results; + }, Object.create(null)); } /** - * These types can all accept null as a value. + * Implements the "Executing selection sets" section of the spec + * for fields that may be executed in parallel. */ -function isNullableType(type) { - return isType(type) && !isNonNullType(type); -} -function assertNullableType(type) { - if (!isNullableType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL nullable type.`); - } - return type; -} -function getNullableType(type) { - if (type) { - return isNonNullType(type) ? type.ofType : type; - } +function executeFields(exeContext, parentType, sourceValue, path, fields) { + const results = Object.create(null); + let containsPromise = false; + try { + for (const [responseName, fieldNodes] of fields.entries()) { + const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name); + const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath); + if (result !== undefined) { + results[responseName] = result; + if ((0, _isPromise.isPromise)(result)) { + containsPromise = true; + } + } + } + } catch (error) { + if (containsPromise) { + // Ensure that any promises returned by other fields are handled, as they may also reject. + return (0, _promiseForObject.promiseForObject)(results).finally(() => { + throw error; + }); + } + throw error; + } // If there are no promises, we can just return the object + + if (!containsPromise) { + return results; + } // Otherwise, results is a map from field name to the result of resolving that + // field, which is possibly a promise. Return a promise that will return this + // same map, but with any promises replaced with the values they resolved to. + + return (0, _promiseForObject.promiseForObject)(results); } /** - * These named types do not include modifiers like List or NonNull. + * Implements the "Executing fields" section of the spec + * In particular, this function figures out the value that the field returns by + * calling its resolve function, then calls completeValue to complete promises, + * serialize scalars, or execute the sub-selection-set for objects. */ -function isNamedType(type) { - return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type); -} -function assertNamedType(type) { - if (!isNamedType(type)) { - throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL named type.`); +function executeField(exeContext, parentType, source, fieldNodes, path) { + var _fieldDef$resolve; + const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]); + if (!fieldDef) { + return; } - return type; -} -function getNamedType(type) { - if (type) { - let unwrappedType = type; - while (isWrappingType(unwrappedType)) { - unwrappedType = unwrappedType.ofType; + const returnType = fieldDef.type; + const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver; + const info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error). + + try { + // Build a JS object of arguments from the field.arguments AST, using the + // variables scope to fulfill any variable references. + // TODO: find a way to memoize, in case this field is within a List type. + const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that + // is provided to every resolve function within an execution. It is commonly + // used to represent an authenticated user, or request-specific caches. + + const contextValue = exeContext.contextValue; + const result = resolveFn(source, args, contextValue, info); + let completed; + if ((0, _isPromise.isPromise)(result)) { + completed = result.then(resolved => completeValue(exeContext, returnType, fieldNodes, info, path, resolved)); + } else { + completed = completeValue(exeContext, returnType, fieldNodes, info, path, result); } - return unwrappedType; + if ((0, _isPromise.isPromise)(completed)) { + // Note: we don't rely on a `catch` method, but we do expect "thenable" + // to take a second callback for the error case. + return completed.then(undefined, rawError => { + const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path)); + return handleFieldError(error, returnType, exeContext); + }); + } + return completed; + } catch (rawError) { + const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path)); + return handleFieldError(error, returnType, exeContext); } } /** - * Used while defining GraphQL types to allow for circular references in - * otherwise immutable type definitions. + * @internal */ -function resolveReadonlyArrayThunk(thunk) { - return typeof thunk === 'function' ? thunk() : thunk; -} -function resolveObjMapThunk(thunk) { - return typeof thunk === 'function' ? thunk() : thunk; +function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) { + // The resolve function's optional fourth argument is a collection of + // information about the current execution state. + return { + fieldName: fieldDef.name, + fieldNodes, + returnType: fieldDef.type, + parentType, + path, + schema: exeContext.schema, + fragments: exeContext.fragments, + rootValue: exeContext.rootValue, + operation: exeContext.operation, + variableValues: exeContext.variableValues + }; } -/** - * Custom extensions - * - * @remarks - * Use a unique identifier name for your extension, for example the name of - * your library or project. Do not use a shortened identifier as this increases - * the risk of conflicts. We recommend you add at most one extension field, - * an object which can contain all the values you need. - */ +function handleFieldError(error, returnType, exeContext) { + // If the field type is non-nullable, then it is resolved without any + // protection from errors, however it still properly locates the error. + if ((0, _definition.isNonNullType)(returnType)) { + throw error; + } // Otherwise, error protection is applied, logging the error and resolving + // a null value for this field if one is encountered. + exeContext.errors.push(error); + return null; +} /** - * Scalar Type Definition + * Implements the instructions for completeValue as defined in the + * "Value Completion" section of the spec. * - * The leaf values of any request and input values to arguments are - * Scalars (or Enums) and are defined with a name and a series of functions - * used to parse input from ast or variables and to ensure validity. + * If the field type is Non-Null, then this recursively completes the value + * for the inner type. It throws a field error if that completion returns null, + * as per the "Nullability" section of the spec. * - * If a type's serialize function returns `null` or does not return a value - * (i.e. it returns `undefined`) then an error will be raised and a `null` - * value will be returned in the response. It is always better to validate + * If the field type is a List, then this recursively completes the value + * for the inner type on each item in the list. * - * Example: + * If the field type is a Scalar or Enum, ensures the completed value is a legal + * value of the type by calling the `serialize` method of GraphQL type + * definition. * - * ```ts - * const OddType = new GraphQLScalarType({ - * name: 'Odd', - * serialize(value) { - * if (!Number.isFinite(value)) { - * throw new Error( - * `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`, - * ); - * } + * If the field is an abstract type, determine the runtime type of the value + * and then complete based on that type * - * if (value % 2 === 0) { - * throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`); - * } - * return value; - * } - * }); - * ``` + * Otherwise, the field type expects a sub-selection set, and will complete the + * value by executing all sub-selections. */ -class GraphQLScalarType { - constructor(config) { - var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; - const parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.specifiedByURL = config.specifiedByURL; - this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc; - this.parseValue = parseValue; - this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables)); - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; - config.specifiedByURL == null || typeof config.specifiedByURL === 'string' || (0, _devAssert.devAssert)(false, `${this.name} must provide "specifiedByURL" as a string, ` + `but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.`); - config.serialize == null || typeof config.serialize === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`); - if (config.parseLiteral) { - typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`); + +function completeValue(exeContext, returnType, fieldNodes, info, path, result) { + // If result is an Error, throw a located error. + if (result instanceof Error) { + throw result; + } // If field type is NonNull, complete for inner type, and throw field error + // if result is null. + + if ((0, _definition.isNonNullType)(returnType)) { + const completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result); + if (completed === null) { + throw new Error(`Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`); } + return completed; + } // If result value is null or undefined then return null. + + if (result == null) { + return null; + } // If field type is List, complete each item in the list with the inner type + + if ((0, _definition.isListType)(returnType)) { + return completeListValue(exeContext, returnType, fieldNodes, info, path, result); + } // If field type is a leaf type, Scalar or Enum, serialize to a valid value, + // returning null if serialization is not possible. + + if ((0, _definition.isLeafType)(returnType)) { + return completeLeafValue(returnType, result); + } // If field type is an abstract type, Interface or Union, determine the + // runtime Object type and complete for that type. + + if ((0, _definition.isAbstractType)(returnType)) { + return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result); + } // If field type is Object, execute and complete all sub-selections. + + if ((0, _definition.isObjectType)(returnType)) { + return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result); } - get [Symbol.toStringTag]() { - return 'GraphQLScalarType'; - } - toConfig() { - return { - name: this.name, - description: this.description, - specifiedByURL: this.specifiedByURL, - serialize: this.serialize, - parseValue: this.parseValue, - parseLiteral: this.parseLiteral, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; - } - toString() { - return this.name; - } - toJSON() { - return this.toString(); - } -} + /* c8 ignore next 6 */ + // Not reachable, all possible output types have been considered. + false || (0, _invariant.invariant)(false, 'Cannot complete value of unexpected output type: ' + (0, _inspect.inspect)(returnType)); +} /** - * Object Type Definition - * - * Almost all of the GraphQL types you define will be object types. Object types - * have a name, but most importantly describe their fields. - * - * Example: - * - * ```ts - * const AddressType = new GraphQLObjectType({ - * name: 'Address', - * fields: { - * street: { type: GraphQLString }, - * number: { type: GraphQLInt }, - * formatted: { - * type: GraphQLString, - * resolve(obj) { - * return obj.number + ' ' + obj.street - * } - * } - * } - * }); - * ``` - * - * When two types need to refer to each other, or a type needs to refer to - * itself in a field, you can use a function expression (aka a closure or a - * thunk) to supply the fields lazily. - * - * Example: - * - * ```ts - * const PersonType = new GraphQLObjectType({ - * name: 'Person', - * fields: () => ({ - * name: { type: GraphQLString }, - * bestFriend: { type: PersonType }, - * }) - * }); - * ``` + * Complete a list value by completing each item in the list with the + * inner type */ -exports.GraphQLScalarType = GraphQLScalarType; -class GraphQLObjectType { - constructor(config) { - var _config$extensionASTN2; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.isTypeOf = config.isTypeOf; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; - this._fields = () => defineFieldMap(config); - this._interfaces = () => defineInterfaces(config); - config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "isTypeOf" as a function, ` + `but got: ${(0, _inspect.inspect)(config.isTypeOf)}.`); - } - get [Symbol.toStringTag]() { - return 'GraphQLObjectType'; - } - getFields() { - if (typeof this._fields === 'function') { - this._fields = this._fields(); - } - return this._fields; - } - getInterfaces() { - if (typeof this._interfaces === 'function') { - this._interfaces = this._interfaces(); + +function completeListValue(exeContext, returnType, fieldNodes, info, path, result) { + if (!(0, _isIterableObject.isIterableObject)(result)) { + throw new _GraphQLError.GraphQLError(`Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`); + } // This is specified as a simple map, however we're optimizing the path + // where the list contains no Promises by avoiding creating another Promise. + + const itemType = returnType.ofType; + let containsPromise = false; + const completedResults = Array.from(result, (item, index) => { + // No need to modify the info object containing the path, + // since from here on it is not ever accessed by resolver functions. + const itemPath = (0, _Path.addPath)(path, index, undefined); + try { + let completedItem; + if ((0, _isPromise.isPromise)(item)) { + completedItem = item.then(resolved => completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved)); + } else { + completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item); + } + if ((0, _isPromise.isPromise)(completedItem)) { + containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable" + // to take a second callback for the error case. + + return completedItem.then(undefined, rawError => { + const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath)); + return handleFieldError(error, itemType, exeContext); + }); + } + return completedItem; + } catch (rawError) { + const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath)); + return handleFieldError(error, itemType, exeContext); } - return this._interfaces; - } - toConfig() { - return { - name: this.name, - description: this.description, - interfaces: this.getInterfaces(), - fields: fieldsToFieldsConfig(this.getFields()), - isTypeOf: this.isTypeOf, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; - } - toString() { - return this.name; - } - toJSON() { - return this.toString(); - } -} -exports.GraphQLObjectType = GraphQLObjectType; -function defineInterfaces(config) { - var _config$interfaces; - const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : []); - Array.isArray(interfaces) || (0, _devAssert.devAssert)(false, `${config.name} interfaces must be an Array or a function which returns an Array.`); - return interfaces; -} -function defineFieldMap(config) { - const fieldMap = resolveObjMapThunk(config.fields); - isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`); - return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { - var _fieldConfig$args; - isPlainObj(fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field config must be an object.`); - fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field resolver must be a function if ` + `provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.`); - const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; - isPlainObj(argsConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} args must be an object with argument names as keys.`); - return { - name: (0, _assertName.assertName)(fieldName), - description: fieldConfig.description, - type: fieldConfig.type, - args: defineArguments(argsConfig), - resolve: fieldConfig.resolve, - subscribe: fieldConfig.subscribe, - deprecationReason: fieldConfig.deprecationReason, - extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), - astNode: fieldConfig.astNode - }; - }); -} -function defineArguments(config) { - return Object.entries(config).map(_ref => { - let [argName, argConfig] = _ref; - return { - name: (0, _assertName.assertName)(argName), - description: argConfig.description, - type: argConfig.type, - defaultValue: argConfig.defaultValue, - deprecationReason: argConfig.deprecationReason, - extensions: (0, _toObjMap.toObjMap)(argConfig.extensions), - astNode: argConfig.astNode - }; }); -} -function isPlainObj(obj) { - return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj); -} -function fieldsToFieldsConfig(fields) { - return (0, _mapValue.mapValue)(fields, field => ({ - description: field.description, - type: field.type, - args: argsToArgsConfig(field.args), - resolve: field.resolve, - subscribe: field.subscribe, - deprecationReason: field.deprecationReason, - extensions: field.extensions, - astNode: field.astNode - })); + return containsPromise ? Promise.all(completedResults) : completedResults; } /** - * @internal + * Complete a Scalar or Enum by serializing to a valid value, returning + * null if serialization is not possible. */ -function argsToArgsConfig(args) { - return (0, _keyValMap.keyValMap)(args, arg => arg.name, arg => ({ - description: arg.description, - type: arg.type, - defaultValue: arg.defaultValue, - deprecationReason: arg.deprecationReason, - extensions: arg.extensions, - astNode: arg.astNode - })); -} -function isRequiredArgument(arg) { - return isNonNullType(arg.type) && arg.defaultValue === undefined; +function completeLeafValue(returnType, result) { + const serializedResult = returnType.serialize(result); + if (serializedResult == null) { + throw new Error(`Expected \`${(0, _inspect.inspect)(returnType)}.serialize(${(0, _inspect.inspect)(result)})\` to ` + `return non-nullable value, returned: ${(0, _inspect.inspect)(serializedResult)}`); + } + return serializedResult; } - /** - * Interface Type Definition - * - * When a field can return one of a heterogeneous set of types, a Interface type - * is used to describe what types are possible, what fields are in common across - * all types, as well as a function to determine which type is actually used - * when the field is resolved. - * - * Example: - * - * ```ts - * const EntityType = new GraphQLInterfaceType({ - * name: 'Entity', - * fields: { - * name: { type: GraphQLString } - * } - * }); - * ``` + * Complete a value of an abstract type by determining the runtime object type + * of that value, then complete the value for that type. */ -class GraphQLInterfaceType { - constructor(config) { - var _config$extensionASTN3; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.resolveType = config.resolveType; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; - this._fields = defineFieldMap.bind(undefined, config); - this._interfaces = defineInterfaces.bind(undefined, config); - config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`); - } - get [Symbol.toStringTag]() { - return 'GraphQLInterfaceType'; + +function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) { + var _returnType$resolveTy; + const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver; + const contextValue = exeContext.contextValue; + const runtimeType = resolveTypeFn(result, contextValue, info, returnType); + if ((0, _isPromise.isPromise)(runtimeType)) { + return runtimeType.then(resolvedRuntimeType => completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result)); } - getFields() { - if (typeof this._fields === 'function') { - this._fields = this._fields(); - } - return this._fields; + return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result); +} +function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNodes, info, result) { + if (runtimeTypeName == null) { + throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, fieldNodes); + } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType` + // TODO: remove in 17.0.0 release + + if ((0, _definition.isObjectType)(runtimeTypeName)) { + throw new _GraphQLError.GraphQLError('Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.'); } - getInterfaces() { - if (typeof this._interfaces === 'function') { - this._interfaces = this._interfaces(); - } - return this._interfaces; + if (typeof runtimeTypeName !== 'string') { + throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` + `value ${(0, _inspect.inspect)(result)}, received "${(0, _inspect.inspect)(runtimeTypeName)}".`); } - toConfig() { - return { - name: this.name, - description: this.description, - interfaces: this.getInterfaces(), - fields: fieldsToFieldsConfig(this.getFields()), - resolveType: this.resolveType, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; + const runtimeType = exeContext.schema.getType(runtimeTypeName); + if (runtimeType == null) { + throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, { + nodes: fieldNodes + }); } - toString() { - return this.name; + if (!(0, _definition.isObjectType)(runtimeType)) { + throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, { + nodes: fieldNodes + }); } - toJSON() { - return this.toString(); + if (!exeContext.schema.isSubType(returnType, runtimeType)) { + throw new _GraphQLError.GraphQLError(`Runtime Object type "${runtimeType.name}" is not a possible type for "${returnType.name}".`, { + nodes: fieldNodes + }); } + return runtimeType; } - /** - * Union Type Definition - * - * When a field can return one of a heterogeneous set of types, a Union type - * is used to describe what types are possible as well as providing a function - * to determine which type is actually used when the field is resolved. - * - * Example: - * - * ```ts - * const PetType = new GraphQLUnionType({ - * name: 'Pet', - * types: [ DogType, CatType ], - * resolveType(value) { - * if (value instanceof Dog) { - * return DogType; - * } - * if (value instanceof Cat) { - * return CatType; - * } - * } - * }); - * ``` + * Complete an Object value by executing all sub-selections. */ -exports.GraphQLInterfaceType = GraphQLInterfaceType; -class GraphQLUnionType { - constructor(config) { - var _config$extensionASTN4; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.resolveType = config.resolveType; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; - this._types = defineTypes.bind(undefined, config); - config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`); - } - get [Symbol.toStringTag]() { - return 'GraphQLUnionType'; - } - getTypes() { - if (typeof this._types === 'function') { - this._types = this._types(); + +function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) { + // Collect sub-fields to execute to complete this value. + const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the + // current result. If isTypeOf returns false, then raise an error rather + // than continuing execution. + + if (returnType.isTypeOf) { + const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info); + if ((0, _isPromise.isPromise)(isTypeOf)) { + return isTypeOf.then(resolvedIsTypeOf => { + if (!resolvedIsTypeOf) { + throw invalidReturnTypeError(returnType, result, fieldNodes); + } + return executeFields(exeContext, returnType, result, path, subFieldNodes); + }); + } + if (!isTypeOf) { + throw invalidReturnTypeError(returnType, result, fieldNodes); } - return this._types; - } - toConfig() { - return { - name: this.name, - description: this.description, - types: this.getTypes(), - resolveType: this.resolveType, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; - } - toString() { - return this.name; - } - toJSON() { - return this.toString(); } + return executeFields(exeContext, returnType, result, path, subFieldNodes); } -exports.GraphQLUnionType = GraphQLUnionType; -function defineTypes(config) { - const types = resolveReadonlyArrayThunk(config.types); - Array.isArray(types) || (0, _devAssert.devAssert)(false, `Must provide Array of types or a function which returns such an array for Union ${config.name}.`); - return types; +function invalidReturnTypeError(returnType, result, fieldNodes) { + return new _GraphQLError.GraphQLError(`Expected value of type "${returnType.name}" but got: ${(0, _inspect.inspect)(result)}.`, { + nodes: fieldNodes + }); } - /** - * Enum Type Definition - * - * Some leaf values of requests and input values are Enums. GraphQL serializes - * Enum values as strings, however internally Enums can be represented by any - * kind of type, often integers. - * - * Example: + * If a resolveType function is not given, then a default resolve behavior is + * used which attempts two strategies: * - * ```ts - * const RGBType = new GraphQLEnumType({ - * name: 'RGB', - * values: { - * RED: { value: 0 }, - * GREEN: { value: 1 }, - * BLUE: { value: 2 } - * } - * }); - * ``` + * First, See if the provided value has a `__typename` field defined, if so, use + * that value as name of the resolved type. * - * Note: If a value is not provided in a definition, the name of the enum value - * will be used as its internal value. + * Otherwise, test each possible type for the abstract type by calling + * isTypeOf for the object being coerced, returning the first type that matches. */ -class GraphQLEnumType { - /* */ - constructor(config) { - var _config$extensionASTN5; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; - this._values = defineEnumValues(this.name, config.values); - this._valueLookup = new Map(this._values.map(enumValue => [enumValue.value, enumValue])); - this._nameLookup = (0, _keyMap.keyMap)(this._values, value => value.name); - } - get [Symbol.toStringTag]() { - return 'GraphQLEnumType'; - } - getValues() { - return this._values; + +const defaultTypeResolver = function (value, contextValue, info, abstractType) { + // First, look for `__typename`. + if ((0, _isObjectLike.isObjectLike)(value) && typeof value.__typename === 'string') { + return value.__typename; + } // Otherwise, test each possible type. + + const possibleTypes = info.schema.getPossibleTypes(abstractType); + const promisedIsTypeOfResults = []; + for (let i = 0; i < possibleTypes.length; i++) { + const type = possibleTypes[i]; + if (type.isTypeOf) { + const isTypeOfResult = type.isTypeOf(value, contextValue, info); + if ((0, _isPromise.isPromise)(isTypeOfResult)) { + promisedIsTypeOfResults[i] = isTypeOfResult; + } else if (isTypeOfResult) { + return type.name; + } + } } - getValue(name) { - return this._nameLookup[name]; + if (promisedIsTypeOfResults.length) { + return Promise.all(promisedIsTypeOfResults).then(isTypeOfResults => { + for (let i = 0; i < isTypeOfResults.length; i++) { + if (isTypeOfResults[i]) { + return possibleTypes[i].name; + } + } + }); } - serialize(outputValue) { - const enumValue = this._valueLookup.get(outputValue); - if (enumValue === undefined) { - throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); +}; +/** + * If a resolve function is not given, then a default resolve behavior is used + * which takes the property of the source object of the same name as the field + * and returns it as the result, or if it's a function, returns the result + * of calling that function while passing along args and context value. + */ +exports.defaultTypeResolver = defaultTypeResolver; +const defaultFieldResolver = function (source, args, contextValue, info) { + // ensure source is a value for which property access is acceptable. + if ((0, _isObjectLike.isObjectLike)(source) || typeof source === 'function') { + const property = source[info.fieldName]; + if (typeof property === 'function') { + return source[info.fieldName](args, contextValue, info); } - return enumValue.name; + return property; } - parseValue(inputValue) /* T */ - { - if (typeof inputValue !== 'string') { - const valueStr = (0, _inspect.inspect)(inputValue); - throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr)); - } - const enumValue = this.getValue(inputValue); - if (enumValue == null) { - throw new _GraphQLError.GraphQLError(`Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue)); - } - return enumValue.value; - } - parseLiteral(valueNode, _variables) /* T */ - { - // Note: variables will be resolved to a value before calling this function. - if (valueNode.kind !== _kinds.Kind.ENUM) { - const valueStr = (0, _printer.print)(valueNode); - throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), { - nodes: valueNode - }); - } - const enumValue = this.getValue(valueNode.value); - if (enumValue == null) { - const valueStr = (0, _printer.print)(valueNode); - throw new _GraphQLError.GraphQLError(`Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), { - nodes: valueNode - }); - } - return enumValue.value; - } - toConfig() { - const values = (0, _keyValMap.keyValMap)(this.getValues(), value => value.name, value => ({ - description: value.description, - value: value.value, - deprecationReason: value.deprecationReason, - extensions: value.extensions, - astNode: value.astNode - })); - return { - name: this.name, - description: this.description, - values, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; - } - toString() { - return this.name; - } - toJSON() { - return this.toString(); - } -} -exports.GraphQLEnumType = GraphQLEnumType; -function didYouMeanEnumValue(enumType, unknownValueStr) { - const allNames = enumType.getValues().map(value => value.name); - const suggestedValues = (0, _suggestionList.suggestionList)(unknownValueStr, allNames); - return (0, _didYouMean.didYouMean)('the enum value', suggestedValues); -} -function defineEnumValues(typeName, valueMap) { - isPlainObj(valueMap) || (0, _devAssert.devAssert)(false, `${typeName} values must be an object with value names as keys.`); - return Object.entries(valueMap).map(_ref2 => { - let [valueName, valueConfig] = _ref2; - isPlainObj(valueConfig) || (0, _devAssert.devAssert)(false, `${typeName}.${valueName} must refer to an object with a "value" key ` + `representing an internal value but got: ${(0, _inspect.inspect)(valueConfig)}.`); - return { - name: (0, _assertName.assertEnumValueName)(valueName), - description: valueConfig.description, - value: valueConfig.value !== undefined ? valueConfig.value : valueName, - deprecationReason: valueConfig.deprecationReason, - extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions), - astNode: valueConfig.astNode - }; - }); -} - +}; /** - * Input Object Type Definition - * - * An input object defines a structured collection of fields which may be - * supplied to a field argument. - * - * Using `NonNull` will ensure that a value must be provided by the query - * - * Example: + * This method looks up the field on the given type definition. + * It has special casing for the three introspection fields, + * __schema, __type and __typename. __typename is special because + * it can always be queried as a field, even in situations where no + * other fields are allowed, like on a Union. __schema and __type + * could get automatically added to the query type, but that would + * require mutating type definitions, which would cause issues. * - * ```ts - * const GeoPoint = new GraphQLInputObjectType({ - * name: 'GeoPoint', - * fields: { - * lat: { type: new GraphQLNonNull(GraphQLFloat) }, - * lon: { type: new GraphQLNonNull(GraphQLFloat) }, - * alt: { type: GraphQLFloat, defaultValue: 0 }, - * } - * }); - * ``` + * @internal */ -class GraphQLInputObjectType { - constructor(config) { - var _config$extensionASTN6; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; - this._fields = defineInputFieldMap.bind(undefined, config); - } - get [Symbol.toStringTag]() { - return 'GraphQLInputObjectType'; - } - getFields() { - if (typeof this._fields === 'function') { - this._fields = this._fields(); - } - return this._fields; - } - toConfig() { - const fields = (0, _mapValue.mapValue)(this.getFields(), field => ({ - description: field.description, - type: field.type, - defaultValue: field.defaultValue, - deprecationReason: field.deprecationReason, - extensions: field.extensions, - astNode: field.astNode - })); - return { - name: this.name, - description: this.description, - fields, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - }; - } - toString() { - return this.name; - } - toJSON() { - return this.toString(); +exports.defaultFieldResolver = defaultFieldResolver; +function getFieldDef(schema, parentType, fieldNode) { + const fieldName = fieldNode.name.value; + if (fieldName === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.SchemaMetaFieldDef; + } else if (fieldName === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.TypeMetaFieldDef; + } else if (fieldName === _introspection.TypeNameMetaFieldDef.name) { + return _introspection.TypeNameMetaFieldDef; } -} -exports.GraphQLInputObjectType = GraphQLInputObjectType; -function defineInputFieldMap(config) { - const fieldMap = resolveObjMapThunk(config.fields); - isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`); - return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { - !('resolve' in fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`); - return { - name: (0, _assertName.assertName)(fieldName), - description: fieldConfig.description, - type: fieldConfig.type, - defaultValue: fieldConfig.defaultValue, - deprecationReason: fieldConfig.deprecationReason, - extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), - astNode: fieldConfig.astNode - }; - }); -} -function isRequiredInputField(field) { - return isNonNullType(field.type) && field.defaultValue === undefined; + return parentType.getFields()[fieldName]; } /***/ }), -/***/ "../../../node_modules/graphql/type/directives.mjs": +/***/ "../../../node_modules/graphql/execution/index.mjs": /*!*********************************************************!*\ - !*** ../../../node_modules/graphql/type/directives.mjs ***! + !*** ../../../node_modules/graphql/execution/index.mjs ***! \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GraphQLSpecifiedByDirective = exports.GraphQLSkipDirective = exports.GraphQLIncludeDirective = exports.GraphQLDirective = exports.GraphQLDeprecatedDirective = exports.DEFAULT_DEPRECATION_REASON = void 0; -exports.assertDirective = assertDirective; -exports.isDirective = isDirective; -exports.isSpecifiedDirective = isSpecifiedDirective; -exports.specifiedDirectives = void 0; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); -var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); -var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -/** - * Test if the given value is a GraphQL directive. - */ - -function isDirective(directive) { - return (0, _instanceOf.instanceOf)(directive, GraphQLDirective); -} -function assertDirective(directive) { - if (!isDirective(directive)) { - throw new Error(`Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`); - } - return directive; -} -/** - * Custom extensions - * - * @remarks - * Use a unique identifier name for your extension, for example the name of - * your library or project. Do not use a shortened identifier as this increases - * the risk of conflicts. We recommend you add at most one extension field, - * an object which can contain all the values you need. - */ - -/** - * Directives are used by the GraphQL runtime as a way of modifying execution - * behavior. Type system creators will usually not create these directly. - */ -class GraphQLDirective { - constructor(config) { - var _config$isRepeatable, _config$args; - this.name = (0, _assertName.assertName)(config.name); - this.description = config.description; - this.locations = config.locations; - this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - Array.isArray(config.locations) || (0, _devAssert.devAssert)(false, `@${config.name} locations must be an Array.`); - const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; - (0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args) || (0, _devAssert.devAssert)(false, `@${config.name} args must be an object with argument names as keys.`); - this.args = (0, _definition.defineArguments)(args); - } - get [Symbol.toStringTag]() { - return 'GraphQLDirective'; - } - toConfig() { - return { - name: this.name, - description: this.description, - locations: this.locations, - args: (0, _definition.argsToArgsConfig)(this.args), - isRepeatable: this.isRepeatable, - extensions: this.extensions, - astNode: this.astNode - }; - } - toString() { - return '@' + this.name; - } - toJSON() { - return this.toString(); - } -} - -/** - * Used to conditionally include fields or fragments. - */ -exports.GraphQLDirective = GraphQLDirective; -const GraphQLIncludeDirective = new GraphQLDirective({ - name: 'include', - description: 'Directs the executor to include this field or fragment only when the `if` argument is true.', - locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], - args: { - if: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - description: 'Included when true.' - } - } -}); -/** - * Used to conditionally skip (exclude) fields or fragments. - */ -exports.GraphQLIncludeDirective = GraphQLIncludeDirective; -const GraphQLSkipDirective = new GraphQLDirective({ - name: 'skip', - description: 'Directs the executor to skip this field or fragment when the `if` argument is true.', - locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], - args: { - if: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - description: 'Skipped when true.' - } - } -}); -/** - * Constant string used for default reason for a deprecation. - */ -exports.GraphQLSkipDirective = GraphQLSkipDirective; -const DEFAULT_DEPRECATION_REASON = 'No longer supported'; -/** - * Used to declare element of a GraphQL schema as deprecated. - */ -exports.DEFAULT_DEPRECATION_REASON = DEFAULT_DEPRECATION_REASON; -const GraphQLDeprecatedDirective = new GraphQLDirective({ - name: 'deprecated', - description: 'Marks an element of a GraphQL schema as no longer supported.', - locations: [_directiveLocation.DirectiveLocation.FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ENUM_VALUE], - args: { - reason: { - type: _scalars.GraphQLString, - description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', - defaultValue: DEFAULT_DEPRECATION_REASON - } - } -}); -/** - * Used to provide a URL for specifying the behavior of custom scalar definitions. - */ -exports.GraphQLDeprecatedDirective = GraphQLDeprecatedDirective; -const GraphQLSpecifiedByDirective = new GraphQLDirective({ - name: 'specifiedBy', - description: 'Exposes a URL that specifies the behavior of this scalar.', - locations: [_directiveLocation.DirectiveLocation.SCALAR], - args: { - url: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - description: 'The URL that specifies the behavior of this scalar.' - } - } -}); -/** - * The full list of specified directives. - */ -exports.GraphQLSpecifiedByDirective = GraphQLSpecifiedByDirective; -const specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]); -exports.specifiedDirectives = specifiedDirectives; -function isSpecifiedDirective(directive) { - return specifiedDirectives.some(_ref => { - let { - name - } = _ref; - return name === directive.name; - }); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/type/index.mjs": -/*!****************************************************!*\ - !*** ../../../node_modules/graphql/type/index.mjs ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({ - enumerable: true, - get: function () { - return _directives.DEFAULT_DEPRECATION_REASON; - } -})); -Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({ - enumerable: true, - get: function () { - return _scalars.GRAPHQL_MAX_INT; - } -})); -Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({ - enumerable: true, - get: function () { - return _scalars.GRAPHQL_MIN_INT; - } -})); -Object.defineProperty(exports, "GraphQLBoolean", ({ - enumerable: true, - get: function () { - return _scalars.GraphQLBoolean; - } -})); -Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({ - enumerable: true, - get: function () { - return _directives.GraphQLDeprecatedDirective; - } -})); -Object.defineProperty(exports, "GraphQLDirective", ({ - enumerable: true, - get: function () { - return _directives.GraphQLDirective; - } -})); -Object.defineProperty(exports, "GraphQLEnumType", ({ - enumerable: true, - get: function () { - return _definition.GraphQLEnumType; - } -})); -Object.defineProperty(exports, "GraphQLFloat", ({ - enumerable: true, - get: function () { - return _scalars.GraphQLFloat; - } -})); -Object.defineProperty(exports, "GraphQLID", ({ - enumerable: true, - get: function () { - return _scalars.GraphQLID; - } -})); -Object.defineProperty(exports, "GraphQLIncludeDirective", ({ +Object.defineProperty(exports, "createSourceEventStream", ({ enumerable: true, get: function () { - return _directives.GraphQLIncludeDirective; + return _subscribe.createSourceEventStream; } })); -Object.defineProperty(exports, "GraphQLInputObjectType", ({ +Object.defineProperty(exports, "defaultFieldResolver", ({ enumerable: true, get: function () { - return _definition.GraphQLInputObjectType; + return _execute.defaultFieldResolver; } })); -Object.defineProperty(exports, "GraphQLInt", ({ +Object.defineProperty(exports, "defaultTypeResolver", ({ enumerable: true, get: function () { - return _scalars.GraphQLInt; + return _execute.defaultTypeResolver; } })); -Object.defineProperty(exports, "GraphQLInterfaceType", ({ +Object.defineProperty(exports, "execute", ({ enumerable: true, get: function () { - return _definition.GraphQLInterfaceType; + return _execute.execute; } })); -Object.defineProperty(exports, "GraphQLList", ({ +Object.defineProperty(exports, "executeSync", ({ enumerable: true, get: function () { - return _definition.GraphQLList; + return _execute.executeSync; } })); -Object.defineProperty(exports, "GraphQLNonNull", ({ +Object.defineProperty(exports, "getArgumentValues", ({ enumerable: true, get: function () { - return _definition.GraphQLNonNull; + return _values.getArgumentValues; } })); -Object.defineProperty(exports, "GraphQLObjectType", ({ +Object.defineProperty(exports, "getDirectiveValues", ({ enumerable: true, get: function () { - return _definition.GraphQLObjectType; + return _values.getDirectiveValues; } })); -Object.defineProperty(exports, "GraphQLScalarType", ({ +Object.defineProperty(exports, "getVariableValues", ({ enumerable: true, get: function () { - return _definition.GraphQLScalarType; + return _values.getVariableValues; } })); -Object.defineProperty(exports, "GraphQLSchema", ({ +Object.defineProperty(exports, "responsePathAsArray", ({ enumerable: true, get: function () { - return _schema.GraphQLSchema; + return _Path.pathToArray; } })); -Object.defineProperty(exports, "GraphQLSkipDirective", ({ +Object.defineProperty(exports, "subscribe", ({ enumerable: true, get: function () { - return _directives.GraphQLSkipDirective; + return _subscribe.subscribe; } })); -Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({ - enumerable: true, - get: function () { - return _directives.GraphQLSpecifiedByDirective; - } +var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs"); +var _execute = __webpack_require__(/*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs"); +var _subscribe = __webpack_require__(/*! ./subscribe.mjs */ "../../../node_modules/graphql/execution/subscribe.mjs"); +var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); + +/***/ }), + +/***/ "../../../node_modules/graphql/execution/mapAsyncIterator.mjs": +/*!********************************************************************!*\ + !*** ../../../node_modules/graphql/execution/mapAsyncIterator.mjs ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "GraphQLString", ({ - enumerable: true, - get: function () { - return _scalars.GraphQLString; +exports.mapAsyncIterator = mapAsyncIterator; +/** + * Given an AsyncIterable and a callback function, return an AsyncIterator + * which produces values mapped via calling the callback function. + */ +function mapAsyncIterator(iterable, callback) { + const iterator = iterable[Symbol.asyncIterator](); + async function mapResult(result) { + if (result.done) { + return result; + } + try { + return { + value: await callback(result.value), + done: false + }; + } catch (error) { + /* c8 ignore start */ + // FIXME: add test case + if (typeof iterator.return === 'function') { + try { + await iterator.return(); + } catch (_e) { + /* ignore error */ + } + } + throw error; + /* c8 ignore stop */ + } } + return { + async next() { + return mapResult(await iterator.next()); + }, + async return() { + // If iterator.return() does not exist, then type R must be undefined. + return typeof iterator.return === 'function' ? mapResult(await iterator.return()) : { + value: undefined, + done: true + }; + }, + async throw(error) { + if (typeof iterator.throw === 'function') { + return mapResult(await iterator.throw(error)); + } + throw error; + }, + [Symbol.asyncIterator]() { + return this; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/execution/subscribe.mjs": +/*!*************************************************************!*\ + !*** ../../../node_modules/graphql/execution/subscribe.mjs ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "GraphQLUnionType", ({ - enumerable: true, - get: function () { - return _definition.GraphQLUnionType; - } -})); -Object.defineProperty(exports, "SchemaMetaFieldDef", ({ - enumerable: true, - get: function () { - return _introspection.SchemaMetaFieldDef; - } -})); -Object.defineProperty(exports, "TypeKind", ({ - enumerable: true, - get: function () { - return _introspection.TypeKind; - } -})); -Object.defineProperty(exports, "TypeMetaFieldDef", ({ - enumerable: true, - get: function () { - return _introspection.TypeMetaFieldDef; +exports.createSourceEventStream = createSourceEventStream; +exports.subscribe = subscribe; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _isAsyncIterable = __webpack_require__(/*! ../jsutils/isAsyncIterable.mjs */ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs"); +var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _locatedError = __webpack_require__(/*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs"); +var _collectFields = __webpack_require__(/*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs"); +var _execute = __webpack_require__(/*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs"); +var _mapAsyncIterator = __webpack_require__(/*! ./mapAsyncIterator.mjs */ "../../../node_modules/graphql/execution/mapAsyncIterator.mjs"); +var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); +/** + * Implements the "Subscribe" algorithm described in the GraphQL specification. + * + * Returns a Promise which resolves to either an AsyncIterator (if successful) + * or an ExecutionResult (error). The promise will be rejected if the schema or + * other arguments to this function are invalid, or if the resolved event stream + * is not an async iterable. + * + * If the client-provided arguments to this function do not result in a + * compliant subscription, a GraphQL Response (ExecutionResult) with + * descriptive errors and no data will be returned. + * + * If the source stream could not be created due to faulty subscription + * resolver logic or underlying systems, the promise will resolve to a single + * ExecutionResult containing `errors` and no `data`. + * + * If the operation succeeded, the promise resolves to an AsyncIterator, which + * yields a stream of ExecutionResults representing the response stream. + * + * Accepts either an object with named arguments, or individual arguments. + */ + +async function subscribe(args) { + // Temporary for v15 to v16 migration. Remove in v17 + arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.'); + const resultOrStream = await createSourceEventStream(args); + if (!(0, _isAsyncIterable.isAsyncIterable)(resultOrStream)) { + return resultOrStream; + } // For each payload yielded from a subscription, map it over the normal + // GraphQL `execute` function, with `payload` as the rootValue. + // This implements the "MapSourceToResponseEvent" algorithm described in + // the GraphQL specification. The `execute` function provides the + // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the + // "ExecuteQuery" algorithm, for which `execute` is also used. + + const mapSourceToResponse = payload => (0, _execute.execute)({ + ...args, + rootValue: payload + }); // Map every source value to a ExecutionResult value as described above. + + return (0, _mapAsyncIterator.mapAsyncIterator)(resultOrStream, mapSourceToResponse); +} +function toNormalizedArgs(args) { + const firstArg = args[0]; + if (firstArg && 'document' in firstArg) { + return firstArg; } -})); -Object.defineProperty(exports, "TypeNameMetaFieldDef", ({ - enumerable: true, - get: function () { - return _introspection.TypeNameMetaFieldDef; + return { + schema: firstArg, + // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613 + document: args[1], + rootValue: args[2], + contextValue: args[3], + variableValues: args[4], + operationName: args[5], + subscribeFieldResolver: args[6] + }; +} +/** + * Implements the "CreateSourceEventStream" algorithm described in the + * GraphQL specification, resolving the subscription source event stream. + * + * Returns a Promise which resolves to either an AsyncIterable (if successful) + * or an ExecutionResult (error). The promise will be rejected if the schema or + * other arguments to this function are invalid, or if the resolved event stream + * is not an async iterable. + * + * If the client-provided arguments to this function do not result in a + * compliant subscription, a GraphQL Response (ExecutionResult) with + * descriptive errors and no data will be returned. + * + * If the the source stream could not be created due to faulty subscription + * resolver logic or underlying systems, the promise will resolve to a single + * ExecutionResult containing `errors` and no `data`. + * + * If the operation succeeded, the promise resolves to the AsyncIterable for the + * event stream returned by the resolver. + * + * A Source Event Stream represents a sequence of events, each of which triggers + * a GraphQL execution for that event. + * + * This may be useful when hosting the stateful subscription service in a + * different process or machine than the stateless GraphQL execution engine, + * or otherwise separating these two steps. For more on this, see the + * "Supporting Subscriptions at Scale" information in the GraphQL specification. + */ + +async function createSourceEventStream(...rawArgs) { + const args = toNormalizedArgs(rawArgs); + const { + schema, + document, + variableValues + } = args; // If arguments are missing or incorrectly typed, this is an internal + // developer mistake which should throw an early error. + + (0, _execute.assertValidExecutionArguments)(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments, + // a "Response" with only errors is returned. + + const exeContext = (0, _execute.buildExecutionContext)(args); // Return early errors if execution context failed. + + if (!('schema' in exeContext)) { + return { + errors: exeContext + }; } -})); -Object.defineProperty(exports, "__Directive", ({ - enumerable: true, - get: function () { - return _introspection.__Directive; + try { + const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error. + + if (!(0, _isAsyncIterable.isAsyncIterable)(eventStream)) { + throw new Error('Subscription field must return Async Iterable. ' + `Received: ${(0, _inspect.inspect)(eventStream)}.`); + } + return eventStream; + } catch (error) { + // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data. + // Otherwise treat the error as a system-class error and re-throw it. + if (error instanceof _GraphQLError.GraphQLError) { + return { + errors: [error] + }; + } + throw error; } -})); -Object.defineProperty(exports, "__DirectiveLocation", ({ - enumerable: true, - get: function () { - return _introspection.__DirectiveLocation; +} +async function executeSubscription(exeContext) { + const { + schema, + fragments, + operation, + variableValues, + rootValue + } = exeContext; + const rootType = schema.getSubscriptionType(); + if (rootType == null) { + throw new _GraphQLError.GraphQLError('Schema is not configured to execute subscription operation.', { + nodes: operation + }); } -})); -Object.defineProperty(exports, "__EnumValue", ({ - enumerable: true, - get: function () { - return _introspection.__EnumValue; + const rootFields = (0, _collectFields.collectFields)(schema, fragments, variableValues, rootType, operation.selectionSet); + const [responseName, fieldNodes] = [...rootFields.entries()][0]; + const fieldDef = (0, _execute.getFieldDef)(schema, rootType, fieldNodes[0]); + if (!fieldDef) { + const fieldName = fieldNodes[0].name.value; + throw new _GraphQLError.GraphQLError(`The subscription field "${fieldName}" is not defined.`, { + nodes: fieldNodes + }); } -})); -Object.defineProperty(exports, "__Field", ({ - enumerable: true, - get: function () { - return _introspection.__Field; + const path = (0, _Path.addPath)(undefined, responseName, rootType.name); + const info = (0, _execute.buildResolveInfo)(exeContext, fieldDef, fieldNodes, rootType, path); + try { + var _fieldDef$subscribe; + + // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification. + // It differs from "ResolveFieldValue" due to providing a different `resolveFn`. + // Build a JS object of arguments from the field.arguments AST, using the + // variables scope to fulfill any variable references. + const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that + // is provided to every resolve function within an execution. It is commonly + // used to represent an authenticated user, or request-specific caches. + + const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an + // AsyncIterable yielding raw payloads. + + const resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.subscribeFieldResolver; + const eventStream = await resolveFn(rootValue, args, contextValue, info); + if (eventStream instanceof Error) { + throw eventStream; + } + return eventStream; + } catch (error) { + throw (0, _locatedError.locatedError)(error, fieldNodes, (0, _Path.pathToArray)(path)); } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/execution/values.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/execution/values.mjs ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "__InputValue", ({ - enumerable: true, - get: function () { - return _introspection.__InputValue; +exports.getArgumentValues = getArgumentValues; +exports.getDirectiveValues = getDirectiveValues; +exports.getVariableValues = getVariableValues; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _printPathArray = __webpack_require__(/*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _coerceInputValue = __webpack_require__(/*! ../utilities/coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs"); +var _typeFromAST = __webpack_require__(/*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +var _valueFromAST = __webpack_require__(/*! ../utilities/valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); +/** + * Prepares an object map of variableValues of the correct type based on the + * provided variable definitions and arbitrary input. If the input cannot be + * parsed to match the variable definitions, a GraphQLError will be thrown. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + */ +function getVariableValues(schema, varDefNodes, inputs, options) { + const errors = []; + const maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors; + try { + const coerced = coerceVariableValues(schema, varDefNodes, inputs, error => { + if (maxErrors != null && errors.length >= maxErrors) { + throw new _GraphQLError.GraphQLError('Too many errors processing variables, error limit reached. Execution aborted.'); + } + errors.push(error); + }); + if (errors.length === 0) { + return { + coerced + }; + } + } catch (error) { + errors.push(error); } -})); -Object.defineProperty(exports, "__Schema", ({ - enumerable: true, - get: function () { - return _introspection.__Schema; + return { + errors + }; +} +function coerceVariableValues(schema, varDefNodes, inputs, onError) { + const coercedValues = {}; + for (const varDefNode of varDefNodes) { + const varName = varDefNode.variable.name.value; + const varType = (0, _typeFromAST.typeFromAST)(schema, varDefNode.type); + if (!(0, _definition.isInputType)(varType)) { + // Must use input types for variables. This should be caught during + // validation, however is checked again here for safety. + const varTypeStr = (0, _printer.print)(varDefNode.type); + onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, { + nodes: varDefNode.type + })); + continue; + } + if (!hasOwnProperty(inputs, varName)) { + if (varDefNode.defaultValue) { + coercedValues[varName] = (0, _valueFromAST.valueFromAST)(varDefNode.defaultValue, varType); + } else if ((0, _definition.isNonNullType)(varType)) { + const varTypeStr = (0, _inspect.inspect)(varType); + onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, { + nodes: varDefNode + })); + } + continue; + } + const value = inputs[varName]; + if (value === null && (0, _definition.isNonNullType)(varType)) { + const varTypeStr = (0, _inspect.inspect)(varType); + onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, { + nodes: varDefNode + })); + continue; + } + coercedValues[varName] = (0, _coerceInputValue.coerceInputValue)(value, varType, (path, invalidValue, error) => { + let prefix = `Variable "$${varName}" got invalid value ` + (0, _inspect.inspect)(invalidValue); + if (path.length > 0) { + prefix += ` at "${varName}${(0, _printPathArray.printPathArray)(path)}"`; + } + onError(new _GraphQLError.GraphQLError(prefix + '; ' + error.message, { + nodes: varDefNode, + originalError: error + })); + }); } -})); -Object.defineProperty(exports, "__Type", ({ - enumerable: true, - get: function () { - return _introspection.__Type; + return coercedValues; +} +/** + * Prepares an object map of argument values given a list of argument + * definitions and list of argument AST nodes. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + */ + +function getArgumentValues(def, node, variableValues) { + var _node$arguments; + const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : []; + const argNodeMap = (0, _keyMap.keyMap)(argumentNodes, arg => arg.name.value); + for (const argDef of def.args) { + const name = argDef.name; + const argType = argDef.type; + const argumentNode = argNodeMap[name]; + if (!argumentNode) { + if (argDef.defaultValue !== undefined) { + coercedValues[name] = argDef.defaultValue; + } else if ((0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + 'was not provided.', { + nodes: node + }); + } + continue; + } + const valueNode = argumentNode.value; + let isNull = valueNode.kind === _kinds.Kind.NULL; + if (valueNode.kind === _kinds.Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variableValues == null || !hasOwnProperty(variableValues, variableName)) { + if (argDef.defaultValue !== undefined) { + coercedValues[name] = argDef.defaultValue; + } else if ((0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + `was provided the variable "$${variableName}" which was not provided a runtime value.`, { + nodes: valueNode + }); + } + continue; + } + isNull = variableValues[variableName] == null; + } + if (isNull && (0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError(`Argument "${name}" of non-null type "${(0, _inspect.inspect)(argType)}" ` + 'must not be null.', { + nodes: valueNode + }); + } + const coercedValue = (0, _valueFromAST.valueFromAST)(valueNode, argType, variableValues); + if (coercedValue === undefined) { + // Note: ValuesOfCorrectTypeRule validation should catch this before + // execution. This is a runtime check to ensure execution does not + // continue with an invalid argument value. + throw new _GraphQLError.GraphQLError(`Argument "${name}" has invalid value ${(0, _printer.print)(valueNode)}.`, { + nodes: valueNode + }); + } + coercedValues[name] = coercedValue; } -})); -Object.defineProperty(exports, "__TypeKind", ({ - enumerable: true, - get: function () { - return _introspection.__TypeKind; + return coercedValues; +} +/** + * Prepares an object map of argument values given a directive definition + * and a AST node which may contain directives. Optionally also accepts a map + * of variable values. + * + * If the directive does not exist on the node, returns undefined. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + */ + +function getDirectiveValues(directiveDef, node, variableValues) { + var _node$directives; + const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find(directive => directive.name.value === directiveDef.name); + if (directiveNode) { + return getArgumentValues(directiveDef, directiveNode, variableValues); } +} +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/graphql.mjs": +/*!*************************************************!*\ + !*** ../../../node_modules/graphql/graphql.mjs ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "assertAbstractType", ({ - enumerable: true, - get: function () { - return _definition.assertAbstractType; +exports.graphql = graphql; +exports.graphqlSync = graphqlSync; +var _devAssert = __webpack_require__(/*! ./jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _isPromise = __webpack_require__(/*! ./jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs"); +var _parser = __webpack_require__(/*! ./language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); +var _validate = __webpack_require__(/*! ./type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); +var _validate2 = __webpack_require__(/*! ./validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); +var _execute = __webpack_require__(/*! ./execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs"); +/** + * This is the primary entry point function for fulfilling GraphQL operations + * by parsing, validating, and executing a GraphQL document along side a + * GraphQL schema. + * + * More sophisticated GraphQL servers, such as those which persist queries, + * may wish to separate the validation and execution phases to a static time + * tooling step, and a server runtime step. + * + * Accepts either an object with named arguments, or individual arguments: + * + * schema: + * The GraphQL type system to use when validating and executing a query. + * source: + * A GraphQL language formatted string representing the requested operation. + * rootValue: + * The value provided as the first argument to resolver functions on the top + * level type (e.g. the query object type). + * contextValue: + * The context value is provided as an argument to resolver functions after + * field arguments. It is used to pass shared information useful at any point + * during executing this query, for example the currently logged in user and + * connections to databases or other services. + * variableValues: + * A mapping of variable name to runtime value to use for all variables + * defined in the requestString. + * operationName: + * The name of the operation to use if requestString contains multiple + * possible operations. Can be omitted if requestString contains only + * one operation. + * fieldResolver: + * A resolver function to use when one is not provided by the schema. + * If not provided, the default field resolver is used (which looks for a + * value or method on the source value with the field's name). + * typeResolver: + * A type resolver function to use when none is provided by the schema. + * If not provided, the default type resolver is used (which looks for a + * `__typename` field or alternatively calls the `isTypeOf` method). + */ + +function graphql(args) { + // Always return a Promise for a consistent API. + return new Promise(resolve => resolve(graphqlImpl(args))); +} +/** + * The graphqlSync function also fulfills GraphQL operations by parsing, + * validating, and executing a GraphQL document along side a GraphQL schema. + * However, it guarantees to complete synchronously (or throw an error) assuming + * that all field resolvers are also synchronous. + */ + +function graphqlSync(args) { + const result = graphqlImpl(args); // Assert that the execution was synchronous. + + if ((0, _isPromise.isPromise)(result)) { + throw new Error('GraphQL execution failed to complete synchronously.'); } -})); -Object.defineProperty(exports, "assertCompositeType", ({ + return result; +} +function graphqlImpl(args) { + // Temporary for v15 to v16 migration. Remove in v17 + arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.'); + const { + schema, + source, + rootValue, + contextValue, + variableValues, + operationName, + fieldResolver, + typeResolver + } = args; // Validate Schema + + const schemaValidationErrors = (0, _validate.validateSchema)(schema); + if (schemaValidationErrors.length > 0) { + return { + errors: schemaValidationErrors + }; + } // Parse + + let document; + try { + document = (0, _parser.parse)(source); + } catch (syntaxError) { + return { + errors: [syntaxError] + }; + } // Validate + + const validationErrors = (0, _validate2.validate)(schema, document); + if (validationErrors.length > 0) { + return { + errors: validationErrors + }; + } // Execute + + return (0, _execute.execute)({ + schema, + document, + rootValue, + contextValue, + variableValues, + operationName, + fieldResolver, + typeResolver + }); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/index.mjs": +/*!***********************************************!*\ + !*** ../../../node_modules/graphql/index.mjs ***! + \***********************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "BREAK", ({ enumerable: true, get: function () { - return _definition.assertCompositeType; + return _index2.BREAK; } })); -Object.defineProperty(exports, "assertDirective", ({ +Object.defineProperty(exports, "BreakingChangeType", ({ enumerable: true, get: function () { - return _directives.assertDirective; + return _index6.BreakingChangeType; } })); -Object.defineProperty(exports, "assertEnumType", ({ +Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({ enumerable: true, get: function () { - return _definition.assertEnumType; + return _index.DEFAULT_DEPRECATION_REASON; } })); -Object.defineProperty(exports, "assertEnumValueName", ({ +Object.defineProperty(exports, "DangerousChangeType", ({ enumerable: true, get: function () { - return _assertName.assertEnumValueName; + return _index6.DangerousChangeType; } })); -Object.defineProperty(exports, "assertInputObjectType", ({ +Object.defineProperty(exports, "DirectiveLocation", ({ enumerable: true, get: function () { - return _definition.assertInputObjectType; + return _index2.DirectiveLocation; } })); -Object.defineProperty(exports, "assertInputType", ({ +Object.defineProperty(exports, "ExecutableDefinitionsRule", ({ enumerable: true, get: function () { - return _definition.assertInputType; + return _index4.ExecutableDefinitionsRule; } })); -Object.defineProperty(exports, "assertInterfaceType", ({ +Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({ enumerable: true, get: function () { - return _definition.assertInterfaceType; + return _index4.FieldsOnCorrectTypeRule; } })); -Object.defineProperty(exports, "assertLeafType", ({ +Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({ enumerable: true, get: function () { - return _definition.assertLeafType; + return _index4.FragmentsOnCompositeTypesRule; } })); -Object.defineProperty(exports, "assertListType", ({ +Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({ enumerable: true, get: function () { - return _definition.assertListType; + return _index.GRAPHQL_MAX_INT; } })); -Object.defineProperty(exports, "assertName", ({ +Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({ enumerable: true, get: function () { - return _assertName.assertName; + return _index.GRAPHQL_MIN_INT; } })); -Object.defineProperty(exports, "assertNamedType", ({ +Object.defineProperty(exports, "GraphQLBoolean", ({ enumerable: true, get: function () { - return _definition.assertNamedType; + return _index.GraphQLBoolean; } })); -Object.defineProperty(exports, "assertNonNullType", ({ +Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({ enumerable: true, get: function () { - return _definition.assertNonNullType; + return _index.GraphQLDeprecatedDirective; } })); -Object.defineProperty(exports, "assertNullableType", ({ +Object.defineProperty(exports, "GraphQLDirective", ({ enumerable: true, get: function () { - return _definition.assertNullableType; + return _index.GraphQLDirective; } })); -Object.defineProperty(exports, "assertObjectType", ({ +Object.defineProperty(exports, "GraphQLEnumType", ({ enumerable: true, get: function () { - return _definition.assertObjectType; + return _index.GraphQLEnumType; } })); -Object.defineProperty(exports, "assertOutputType", ({ +Object.defineProperty(exports, "GraphQLError", ({ enumerable: true, get: function () { - return _definition.assertOutputType; + return _index5.GraphQLError; } })); -Object.defineProperty(exports, "assertScalarType", ({ +Object.defineProperty(exports, "GraphQLFloat", ({ enumerable: true, get: function () { - return _definition.assertScalarType; + return _index.GraphQLFloat; } })); -Object.defineProperty(exports, "assertSchema", ({ +Object.defineProperty(exports, "GraphQLID", ({ enumerable: true, get: function () { - return _schema.assertSchema; + return _index.GraphQLID; } })); -Object.defineProperty(exports, "assertType", ({ +Object.defineProperty(exports, "GraphQLIncludeDirective", ({ enumerable: true, get: function () { - return _definition.assertType; + return _index.GraphQLIncludeDirective; } })); -Object.defineProperty(exports, "assertUnionType", ({ +Object.defineProperty(exports, "GraphQLInputObjectType", ({ enumerable: true, get: function () { - return _definition.assertUnionType; + return _index.GraphQLInputObjectType; } })); -Object.defineProperty(exports, "assertValidSchema", ({ +Object.defineProperty(exports, "GraphQLInt", ({ enumerable: true, get: function () { - return _validate.assertValidSchema; + return _index.GraphQLInt; } })); -Object.defineProperty(exports, "assertWrappingType", ({ +Object.defineProperty(exports, "GraphQLInterfaceType", ({ enumerable: true, get: function () { - return _definition.assertWrappingType; + return _index.GraphQLInterfaceType; } })); -Object.defineProperty(exports, "getNamedType", ({ +Object.defineProperty(exports, "GraphQLList", ({ enumerable: true, get: function () { - return _definition.getNamedType; + return _index.GraphQLList; } })); -Object.defineProperty(exports, "getNullableType", ({ +Object.defineProperty(exports, "GraphQLNonNull", ({ enumerable: true, get: function () { - return _definition.getNullableType; + return _index.GraphQLNonNull; } })); -Object.defineProperty(exports, "introspectionTypes", ({ +Object.defineProperty(exports, "GraphQLObjectType", ({ enumerable: true, get: function () { - return _introspection.introspectionTypes; + return _index.GraphQLObjectType; } })); -Object.defineProperty(exports, "isAbstractType", ({ +Object.defineProperty(exports, "GraphQLOneOfDirective", ({ enumerable: true, get: function () { - return _definition.isAbstractType; + return _index.GraphQLOneOfDirective; } })); -Object.defineProperty(exports, "isCompositeType", ({ +Object.defineProperty(exports, "GraphQLScalarType", ({ enumerable: true, get: function () { - return _definition.isCompositeType; + return _index.GraphQLScalarType; } })); -Object.defineProperty(exports, "isDirective", ({ +Object.defineProperty(exports, "GraphQLSchema", ({ enumerable: true, get: function () { - return _directives.isDirective; + return _index.GraphQLSchema; } })); -Object.defineProperty(exports, "isEnumType", ({ +Object.defineProperty(exports, "GraphQLSkipDirective", ({ enumerable: true, get: function () { - return _definition.isEnumType; + return _index.GraphQLSkipDirective; } })); -Object.defineProperty(exports, "isInputObjectType", ({ +Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({ enumerable: true, get: function () { - return _definition.isInputObjectType; + return _index.GraphQLSpecifiedByDirective; } })); -Object.defineProperty(exports, "isInputType", ({ +Object.defineProperty(exports, "GraphQLString", ({ enumerable: true, get: function () { - return _definition.isInputType; + return _index.GraphQLString; } })); -Object.defineProperty(exports, "isInterfaceType", ({ +Object.defineProperty(exports, "GraphQLUnionType", ({ enumerable: true, get: function () { - return _definition.isInterfaceType; + return _index.GraphQLUnionType; } })); -Object.defineProperty(exports, "isIntrospectionType", ({ +Object.defineProperty(exports, "Kind", ({ enumerable: true, get: function () { - return _introspection.isIntrospectionType; + return _index2.Kind; } })); -Object.defineProperty(exports, "isLeafType", ({ +Object.defineProperty(exports, "KnownArgumentNamesRule", ({ enumerable: true, get: function () { - return _definition.isLeafType; + return _index4.KnownArgumentNamesRule; } })); -Object.defineProperty(exports, "isListType", ({ +Object.defineProperty(exports, "KnownDirectivesRule", ({ enumerable: true, get: function () { - return _definition.isListType; + return _index4.KnownDirectivesRule; } })); -Object.defineProperty(exports, "isNamedType", ({ +Object.defineProperty(exports, "KnownFragmentNamesRule", ({ enumerable: true, get: function () { - return _definition.isNamedType; + return _index4.KnownFragmentNamesRule; } })); -Object.defineProperty(exports, "isNonNullType", ({ +Object.defineProperty(exports, "KnownTypeNamesRule", ({ enumerable: true, get: function () { - return _definition.isNonNullType; + return _index4.KnownTypeNamesRule; } })); -Object.defineProperty(exports, "isNullableType", ({ +Object.defineProperty(exports, "Lexer", ({ enumerable: true, get: function () { - return _definition.isNullableType; + return _index2.Lexer; } })); -Object.defineProperty(exports, "isObjectType", ({ +Object.defineProperty(exports, "Location", ({ enumerable: true, get: function () { - return _definition.isObjectType; + return _index2.Location; } })); -Object.defineProperty(exports, "isOutputType", ({ +Object.defineProperty(exports, "LoneAnonymousOperationRule", ({ enumerable: true, get: function () { - return _definition.isOutputType; + return _index4.LoneAnonymousOperationRule; } })); -Object.defineProperty(exports, "isRequiredArgument", ({ +Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({ enumerable: true, get: function () { - return _definition.isRequiredArgument; + return _index4.LoneSchemaDefinitionRule; } })); -Object.defineProperty(exports, "isRequiredInputField", ({ +Object.defineProperty(exports, "MaxIntrospectionDepthRule", ({ enumerable: true, get: function () { - return _definition.isRequiredInputField; + return _index4.MaxIntrospectionDepthRule; } })); -Object.defineProperty(exports, "isScalarType", ({ +Object.defineProperty(exports, "NoDeprecatedCustomRule", ({ enumerable: true, get: function () { - return _definition.isScalarType; + return _index4.NoDeprecatedCustomRule; } })); -Object.defineProperty(exports, "isSchema", ({ +Object.defineProperty(exports, "NoFragmentCyclesRule", ({ enumerable: true, get: function () { - return _schema.isSchema; + return _index4.NoFragmentCyclesRule; } })); -Object.defineProperty(exports, "isSpecifiedDirective", ({ +Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({ enumerable: true, get: function () { - return _directives.isSpecifiedDirective; + return _index4.NoSchemaIntrospectionCustomRule; } })); -Object.defineProperty(exports, "isSpecifiedScalarType", ({ +Object.defineProperty(exports, "NoUndefinedVariablesRule", ({ enumerable: true, get: function () { - return _scalars.isSpecifiedScalarType; + return _index4.NoUndefinedVariablesRule; } })); -Object.defineProperty(exports, "isType", ({ +Object.defineProperty(exports, "NoUnusedFragmentsRule", ({ enumerable: true, get: function () { - return _definition.isType; + return _index4.NoUnusedFragmentsRule; } })); -Object.defineProperty(exports, "isUnionType", ({ +Object.defineProperty(exports, "NoUnusedVariablesRule", ({ enumerable: true, get: function () { - return _definition.isUnionType; + return _index4.NoUnusedVariablesRule; } })); -Object.defineProperty(exports, "isWrappingType", ({ +Object.defineProperty(exports, "OperationTypeNode", ({ enumerable: true, get: function () { - return _definition.isWrappingType; + return _index2.OperationTypeNode; } })); -Object.defineProperty(exports, "resolveObjMapThunk", ({ +Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({ enumerable: true, get: function () { - return _definition.resolveObjMapThunk; + return _index4.OverlappingFieldsCanBeMergedRule; } })); -Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({ +Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({ enumerable: true, get: function () { - return _definition.resolveReadonlyArrayThunk; + return _index4.PossibleFragmentSpreadsRule; } })); -Object.defineProperty(exports, "specifiedDirectives", ({ +Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({ enumerable: true, get: function () { - return _directives.specifiedDirectives; + return _index4.PossibleTypeExtensionsRule; } })); -Object.defineProperty(exports, "specifiedScalarTypes", ({ +Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({ enumerable: true, get: function () { - return _scalars.specifiedScalarTypes; + return _index4.ProvidedRequiredArgumentsRule; } })); -Object.defineProperty(exports, "validateSchema", ({ +Object.defineProperty(exports, "ScalarLeafsRule", ({ enumerable: true, get: function () { - return _validate.validateSchema; + return _index4.ScalarLeafsRule; } })); -var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); -var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); - -/***/ }), - -/***/ "../../../node_modules/graphql/type/introspection.mjs": -/*!************************************************************!*\ - !*** ../../../node_modules/graphql/type/introspection.mjs ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +Object.defineProperty(exports, "SchemaMetaFieldDef", ({ + enumerable: true, + get: function () { + return _index.SchemaMetaFieldDef; + } })); -exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0; -exports.isIntrospectionType = isIntrospectionType; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); -var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _astFromValue = __webpack_require__(/*! ../utilities/astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -const __Schema = new _definition.GraphQLObjectType({ - name: '__Schema', - description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', - fields: () => ({ - description: { - type: _scalars.GraphQLString, - resolve: schema => schema.description - }, - types: { - description: 'A list of all types supported by this server.', - type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))), - resolve(schema) { - return Object.values(schema.getTypeMap()); - } - }, - queryType: { - description: 'The type that query operations will be rooted at.', - type: new _definition.GraphQLNonNull(__Type), - resolve: schema => schema.getQueryType() - }, - mutationType: { - description: 'If this server supports mutation, the type that mutation operations will be rooted at.', - type: __Type, - resolve: schema => schema.getMutationType() - }, - subscriptionType: { - description: 'If this server support subscription, the type that subscription operations will be rooted at.', - type: __Type, - resolve: schema => schema.getSubscriptionType() - }, - directives: { - description: 'A list of all directives supported by this server.', - type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))), - resolve: schema => schema.getDirectives() - } - }) -}); -exports.__Schema = __Schema; -const __Directive = new _definition.GraphQLObjectType({ - name: '__Directive', - description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - fields: () => ({ - name: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - resolve: directive => directive.name - }, - description: { - type: _scalars.GraphQLString, - resolve: directive => directive.description - }, - isRepeatable: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - resolve: directive => directive.isRepeatable - }, - locations: { - type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation))), - resolve: directive => directive.locations - }, - args: { - type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), - args: { - includeDeprecated: { - type: _scalars.GraphQLBoolean, - defaultValue: false - } - }, - resolve(field, _ref) { - let { - includeDeprecated - } = _ref; - return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null); - } - } - }) -}); -exports.__Directive = __Directive; -const __DirectiveLocation = new _definition.GraphQLEnumType({ - name: '__DirectiveLocation', - description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', - values: { - QUERY: { - value: _directiveLocation.DirectiveLocation.QUERY, - description: 'Location adjacent to a query operation.' - }, - MUTATION: { - value: _directiveLocation.DirectiveLocation.MUTATION, - description: 'Location adjacent to a mutation operation.' - }, - SUBSCRIPTION: { - value: _directiveLocation.DirectiveLocation.SUBSCRIPTION, - description: 'Location adjacent to a subscription operation.' - }, - FIELD: { - value: _directiveLocation.DirectiveLocation.FIELD, - description: 'Location adjacent to a field.' - }, - FRAGMENT_DEFINITION: { - value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION, - description: 'Location adjacent to a fragment definition.' - }, - FRAGMENT_SPREAD: { - value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, - description: 'Location adjacent to a fragment spread.' - }, - INLINE_FRAGMENT: { - value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT, - description: 'Location adjacent to an inline fragment.' - }, - VARIABLE_DEFINITION: { - value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION, - description: 'Location adjacent to a variable definition.' - }, - SCHEMA: { - value: _directiveLocation.DirectiveLocation.SCHEMA, - description: 'Location adjacent to a schema definition.' - }, - SCALAR: { - value: _directiveLocation.DirectiveLocation.SCALAR, - description: 'Location adjacent to a scalar definition.' - }, - OBJECT: { - value: _directiveLocation.DirectiveLocation.OBJECT, - description: 'Location adjacent to an object type definition.' - }, - FIELD_DEFINITION: { - value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION, - description: 'Location adjacent to a field definition.' - }, - ARGUMENT_DEFINITION: { - value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, - description: 'Location adjacent to an argument definition.' - }, - INTERFACE: { - value: _directiveLocation.DirectiveLocation.INTERFACE, - description: 'Location adjacent to an interface definition.' - }, - UNION: { - value: _directiveLocation.DirectiveLocation.UNION, - description: 'Location adjacent to a union definition.' - }, - ENUM: { - value: _directiveLocation.DirectiveLocation.ENUM, - description: 'Location adjacent to an enum definition.' - }, - ENUM_VALUE: { - value: _directiveLocation.DirectiveLocation.ENUM_VALUE, - description: 'Location adjacent to an enum value definition.' - }, - INPUT_OBJECT: { - value: _directiveLocation.DirectiveLocation.INPUT_OBJECT, - description: 'Location adjacent to an input object type definition.' - }, - INPUT_FIELD_DEFINITION: { - value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, - description: 'Location adjacent to an input object field definition.' - } +Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({ + enumerable: true, + get: function () { + return _index4.SingleFieldSubscriptionsRule; } -}); -exports.__DirectiveLocation = __DirectiveLocation; -const __Type = new _definition.GraphQLObjectType({ - name: '__Type', - description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, 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: () => ({ - kind: { - type: new _definition.GraphQLNonNull(__TypeKind), - resolve(type) { - if ((0, _definition.isScalarType)(type)) { - return TypeKind.SCALAR; - } - if ((0, _definition.isObjectType)(type)) { - return TypeKind.OBJECT; - } - if ((0, _definition.isInterfaceType)(type)) { - return TypeKind.INTERFACE; - } - if ((0, _definition.isUnionType)(type)) { - return TypeKind.UNION; - } - if ((0, _definition.isEnumType)(type)) { - return TypeKind.ENUM; - } - if ((0, _definition.isInputObjectType)(type)) { - return TypeKind.INPUT_OBJECT; - } - if ((0, _definition.isListType)(type)) { - return TypeKind.LIST; - } - if ((0, _definition.isNonNullType)(type)) { - return TypeKind.NON_NULL; - } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered) - - false || (0, _invariant.invariant)(false, `Unexpected type: "${(0, _inspect.inspect)(type)}".`); - } - }, - name: { - type: _scalars.GraphQLString, - resolve: type => 'name' in type ? type.name : undefined - }, - description: { - type: _scalars.GraphQLString, - resolve: (type // FIXME: add test case - ) => /* c8 ignore next */ - 'description' in type ? type.description : undefined - }, - specifiedByURL: { - type: _scalars.GraphQLString, - resolve: obj => 'specifiedByURL' in obj ? obj.specifiedByURL : undefined - }, - fields: { - type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)), - args: { - includeDeprecated: { - type: _scalars.GraphQLBoolean, - defaultValue: false - } - }, - resolve(type, _ref2) { - let { - includeDeprecated - } = _ref2; - if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { - const fields = Object.values(type.getFields()); - return includeDeprecated ? fields : fields.filter(field => field.deprecationReason == null); - } - } - }, - interfaces: { - type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), - resolve(type) { - if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { - return type.getInterfaces(); - } - } - }, - possibleTypes: { - type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), - resolve(type, _args, _context, _ref3) { - let { - schema - } = _ref3; - if ((0, _definition.isAbstractType)(type)) { - return schema.getPossibleTypes(type); - } - } - }, - enumValues: { - type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)), - args: { - includeDeprecated: { - type: _scalars.GraphQLBoolean, - defaultValue: false - } - }, - resolve(type, _ref4) { - let { - includeDeprecated - } = _ref4; - if ((0, _definition.isEnumType)(type)) { - const values = type.getValues(); - return includeDeprecated ? values : values.filter(field => field.deprecationReason == null); - } - } - }, - inputFields: { - type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)), - args: { - includeDeprecated: { - type: _scalars.GraphQLBoolean, - defaultValue: false - } - }, - resolve(type, _ref5) { - let { - includeDeprecated - } = _ref5; - if ((0, _definition.isInputObjectType)(type)) { - const values = Object.values(type.getFields()); - return includeDeprecated ? values : values.filter(field => field.deprecationReason == null); - } - } - }, - ofType: { - type: __Type, - resolve: type => 'ofType' in type ? type.ofType : undefined - } - }) -}); -exports.__Type = __Type; -const __Field = new _definition.GraphQLObjectType({ - name: '__Field', - description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', - fields: () => ({ - name: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - resolve: field => field.name - }, - description: { - type: _scalars.GraphQLString, - resolve: field => field.description - }, - args: { - type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), - args: { - includeDeprecated: { - type: _scalars.GraphQLBoolean, - defaultValue: false - } - }, - resolve(field, _ref6) { - let { - includeDeprecated - } = _ref6; - return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null); - } - }, - type: { - type: new _definition.GraphQLNonNull(__Type), - resolve: field => field.type - }, - isDeprecated: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - resolve: field => field.deprecationReason != null - }, - deprecationReason: { - type: _scalars.GraphQLString, - resolve: field => field.deprecationReason - } - }) -}); -exports.__Field = __Field; -const __InputValue = new _definition.GraphQLObjectType({ - name: '__InputValue', - description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', - fields: () => ({ - name: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - resolve: inputValue => inputValue.name - }, - description: { - type: _scalars.GraphQLString, - resolve: inputValue => inputValue.description - }, - type: { - type: new _definition.GraphQLNonNull(__Type), - resolve: inputValue => inputValue.type - }, - defaultValue: { - type: _scalars.GraphQLString, - description: 'A GraphQL-formatted string representing the default value for this input value.', - resolve(inputValue) { - const { - type, - defaultValue - } = inputValue; - const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type); - return valueAST ? (0, _printer.print)(valueAST) : null; - } - }, - isDeprecated: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - resolve: field => field.deprecationReason != null - }, - deprecationReason: { - type: _scalars.GraphQLString, - resolve: obj => obj.deprecationReason - } - }) -}); -exports.__InputValue = __InputValue; -const __EnumValue = new _definition.GraphQLObjectType({ - name: '__EnumValue', - description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', - fields: () => ({ - name: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - resolve: enumValue => enumValue.name - }, - description: { - type: _scalars.GraphQLString, - resolve: enumValue => enumValue.description - }, - isDeprecated: { - type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), - resolve: enumValue => enumValue.deprecationReason != null - }, - deprecationReason: { - type: _scalars.GraphQLString, - resolve: enumValue => enumValue.deprecationReason - } - }) -}); -exports.__EnumValue = __EnumValue; -var TypeKind; -exports.TypeKind = TypeKind; -(function (TypeKind) { - TypeKind['SCALAR'] = 'SCALAR'; - TypeKind['OBJECT'] = 'OBJECT'; - TypeKind['INTERFACE'] = 'INTERFACE'; - TypeKind['UNION'] = 'UNION'; - TypeKind['ENUM'] = 'ENUM'; - TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT'; - TypeKind['LIST'] = 'LIST'; - TypeKind['NON_NULL'] = 'NON_NULL'; -})(TypeKind || (exports.TypeKind = TypeKind = {})); -const __TypeKind = new _definition.GraphQLEnumType({ - name: '__TypeKind', - description: 'An enum describing what kind of type a given `__Type` is.', - values: { - SCALAR: { - value: TypeKind.SCALAR, - description: 'Indicates this type is a scalar.' - }, - OBJECT: { - value: TypeKind.OBJECT, - description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.' - }, - INTERFACE: { - value: TypeKind.INTERFACE, - description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.' - }, - UNION: { - value: TypeKind.UNION, - description: 'Indicates this type is a union. `possibleTypes` is a valid field.' - }, - ENUM: { - value: TypeKind.ENUM, - description: 'Indicates this type is an enum. `enumValues` is a valid field.' - }, - INPUT_OBJECT: { - value: TypeKind.INPUT_OBJECT, - description: 'Indicates this type is an input object. `inputFields` is a valid field.' - }, - LIST: { - value: TypeKind.LIST, - description: 'Indicates this type is a list. `ofType` is a valid field.' - }, - NON_NULL: { - value: TypeKind.NON_NULL, - description: 'Indicates this type is a non-null. `ofType` is a valid field.' - } +})); +Object.defineProperty(exports, "Source", ({ + enumerable: true, + get: function () { + return _index2.Source; } -}); -/** - * Note that these are GraphQLField and not GraphQLFieldConfig, - * so the format for args is different. - */ -exports.__TypeKind = __TypeKind; -const SchemaMetaFieldDef = { - name: '__schema', - type: new _definition.GraphQLNonNull(__Schema), - description: 'Access the current type schema of this server.', - args: [], - resolve: (_source, _args, _context, _ref7) => { - let { - schema - } = _ref7; - return schema; - }, - deprecationReason: undefined, - extensions: Object.create(null), - astNode: undefined -}; -exports.SchemaMetaFieldDef = SchemaMetaFieldDef; -const TypeMetaFieldDef = { - name: '__type', - type: __Type, - description: 'Request the type information of a single type.', - args: [{ - name: 'name', - description: undefined, - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - defaultValue: undefined, - deprecationReason: undefined, - extensions: Object.create(null), - astNode: undefined - }], - resolve: (_source, _ref8, _context, _ref9) => { - let { - name - } = _ref8; - let { - schema - } = _ref9; - return schema.getType(name); - }, - deprecationReason: undefined, - extensions: Object.create(null), - astNode: undefined -}; -exports.TypeMetaFieldDef = TypeMetaFieldDef; -const TypeNameMetaFieldDef = { - name: '__typename', - type: new _definition.GraphQLNonNull(_scalars.GraphQLString), - description: 'The name of the current Object type at runtime.', - args: [], - resolve: (_source, _args, _context, _ref10) => { - let { - parentType - } = _ref10; - return parentType.name; - }, - deprecationReason: undefined, - extensions: Object.create(null), - astNode: undefined -}; -exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef; -const introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]); -exports.introspectionTypes = introspectionTypes; -function isIntrospectionType(type) { - return introspectionTypes.some(_ref11 => { - let { - name - } = _ref11; - return type.name === name; - }); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/type/scalars.mjs": -/*!******************************************************!*\ - !*** ../../../node_modules/graphql/type/scalars.mjs ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0; -exports.isSpecifiedScalarType = isSpecifiedScalarType; -exports.specifiedScalarTypes = void 0; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -/** - * Maximum possible Int value as per GraphQL Spec (32-bit signed integer). - * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1 - * */ - -const GRAPHQL_MAX_INT = 2147483647; -/** - * Minimum possible Int value as per GraphQL Spec (32-bit signed integer). - * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1) - * */ -exports.GRAPHQL_MAX_INT = GRAPHQL_MAX_INT; -const GRAPHQL_MIN_INT = -2147483648; -exports.GRAPHQL_MIN_INT = GRAPHQL_MIN_INT; -const GraphQLInt = new _definition.GraphQLScalarType({ - name: 'Int', - description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', - serialize(outputValue) { - const coercedValue = serializeObject(outputValue); - if (typeof coercedValue === 'boolean') { - return coercedValue ? 1 : 0; - } - let num = coercedValue; - if (typeof coercedValue === 'string' && coercedValue !== '') { - num = Number(coercedValue); - } - if (typeof num !== 'number' || !Number.isInteger(num)) { - throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(coercedValue)}`); - } - if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { - throw new _GraphQLError.GraphQLError('Int cannot represent non 32-bit signed integer value: ' + (0, _inspect.inspect)(coercedValue)); - } - return num; - }, - parseValue(inputValue) { - if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) { - throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(inputValue)}`); - } - if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) { - throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inputValue}`); - } - return inputValue; - }, - parseLiteral(valueNode) { - if (valueNode.kind !== _kinds.Kind.INT) { - throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _printer.print)(valueNode)}`, { - nodes: valueNode - }); - } - const num = parseInt(valueNode.value, 10); - if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { - throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, { - nodes: valueNode - }); - } - return num; +Object.defineProperty(exports, "Token", ({ + enumerable: true, + get: function () { + return _index2.Token; } -}); -exports.GraphQLInt = GraphQLInt; -const GraphQLFloat = new _definition.GraphQLScalarType({ - name: 'Float', - description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', - serialize(outputValue) { - const coercedValue = serializeObject(outputValue); - if (typeof coercedValue === 'boolean') { - return coercedValue ? 1 : 0; - } - let num = coercedValue; - if (typeof coercedValue === 'string' && coercedValue !== '') { - num = Number(coercedValue); - } - if (typeof num !== 'number' || !Number.isFinite(num)) { - throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(coercedValue)}`); - } - return num; - }, - parseValue(inputValue) { - if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) { - throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(inputValue)}`); - } - return inputValue; - }, - parseLiteral(valueNode) { - if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) { - throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _printer.print)(valueNode)}`, valueNode); - } - return parseFloat(valueNode.value); +})); +Object.defineProperty(exports, "TokenKind", ({ + enumerable: true, + get: function () { + return _index2.TokenKind; } -}); -exports.GraphQLFloat = GraphQLFloat; -const GraphQLString = new _definition.GraphQLScalarType({ - name: 'String', - description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', - serialize(outputValue) { - const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not - // attempt to coerce object, function, symbol, or other types as strings. - - if (typeof coercedValue === 'string') { - return coercedValue; - } - if (typeof coercedValue === 'boolean') { - return coercedValue ? 'true' : 'false'; - } - if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) { - return coercedValue.toString(); - } - throw new _GraphQLError.GraphQLError(`String cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); - }, - parseValue(inputValue) { - if (typeof inputValue !== 'string') { - throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _inspect.inspect)(inputValue)}`); - } - return inputValue; - }, - parseLiteral(valueNode) { - if (valueNode.kind !== _kinds.Kind.STRING) { - throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _printer.print)(valueNode)}`, { - nodes: valueNode - }); - } - return valueNode.value; +})); +Object.defineProperty(exports, "TypeInfo", ({ + enumerable: true, + get: function () { + return _index6.TypeInfo; } -}); -exports.GraphQLString = GraphQLString; -const GraphQLBoolean = new _definition.GraphQLScalarType({ - name: 'Boolean', - description: 'The `Boolean` scalar type represents `true` or `false`.', - serialize(outputValue) { - const coercedValue = serializeObject(outputValue); - if (typeof coercedValue === 'boolean') { - return coercedValue; - } - if (Number.isFinite(coercedValue)) { - return coercedValue !== 0; - } - throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(coercedValue)}`); - }, - parseValue(inputValue) { - if (typeof inputValue !== 'boolean') { - throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(inputValue)}`); - } - return inputValue; - }, - parseLiteral(valueNode) { - if (valueNode.kind !== _kinds.Kind.BOOLEAN) { - throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _printer.print)(valueNode)}`, { - nodes: valueNode - }); - } - return valueNode.value; +})); +Object.defineProperty(exports, "TypeKind", ({ + enumerable: true, + get: function () { + return _index.TypeKind; } -}); -exports.GraphQLBoolean = GraphQLBoolean; -const GraphQLID = new _definition.GraphQLScalarType({ - name: 'ID', - description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', - serialize(outputValue) { - const coercedValue = serializeObject(outputValue); - if (typeof coercedValue === 'string') { - return coercedValue; - } - if (Number.isInteger(coercedValue)) { - return String(coercedValue); - } - throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); - }, - parseValue(inputValue) { - if (typeof inputValue === 'string') { - return inputValue; - } - if (typeof inputValue === 'number' && Number.isInteger(inputValue)) { - return inputValue.toString(); - } - throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}`); - }, - parseLiteral(valueNode) { - if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) { - throw new _GraphQLError.GraphQLError('ID cannot represent a non-string and non-integer value: ' + (0, _printer.print)(valueNode), { - nodes: valueNode - }); - } - return valueNode.value; +})); +Object.defineProperty(exports, "TypeMetaFieldDef", ({ + enumerable: true, + get: function () { + return _index.TypeMetaFieldDef; } -}); -exports.GraphQLID = GraphQLID; -const specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]); -exports.specifiedScalarTypes = specifiedScalarTypes; -function isSpecifiedScalarType(type) { - return specifiedScalarTypes.some(_ref => { - let { - name - } = _ref; - return type.name === name; - }); -} // Support serializing objects with custom valueOf() or toJSON() functions - -// a common way to represent a complex value which can be represented as -// a string (ex: MongoDB id objects). - -function serializeObject(outputValue) { - if ((0, _isObjectLike.isObjectLike)(outputValue)) { - if (typeof outputValue.valueOf === 'function') { - const valueOfResult = outputValue.valueOf(); - if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) { - return valueOfResult; - } - } - if (typeof outputValue.toJSON === 'function') { - return outputValue.toJSON(); - } +})); +Object.defineProperty(exports, "TypeNameMetaFieldDef", ({ + enumerable: true, + get: function () { + return _index.TypeNameMetaFieldDef; } - return outputValue; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/type/schema.mjs": -/*!*****************************************************!*\ - !*** ../../../node_modules/graphql/type/schema.mjs ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.GraphQLSchema = void 0; -exports.assertSchema = assertSchema; -exports.isSchema = isSchema; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); -var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -/** - * Test if the given value is a GraphQL schema. - */ - -function isSchema(schema) { - return (0, _instanceOf.instanceOf)(schema, GraphQLSchema); -} -function assertSchema(schema) { - if (!isSchema(schema)) { - throw new Error(`Expected ${(0, _inspect.inspect)(schema)} to be a GraphQL schema.`); +Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueArgumentDefinitionNamesRule; } - return schema; -} -/** - * Custom extensions - * - * @remarks - * Use a unique identifier name for your extension, for example the name of - * your library or project. Do not use a shortened identifier as this increases - * the risk of conflicts. We recommend you add at most one extension field, - * an object which can contain all the values you need. - */ - -/** - * Schema Definition - * - * A Schema is created by supplying the root types of each type of operation, - * query and mutation (optional). A schema definition is then supplied to the - * validator and executor. - * - * Example: - * - * ```ts - * const MyAppSchema = new GraphQLSchema({ - * query: MyAppQueryRootType, - * mutation: MyAppMutationRootType, - * }) - * ``` - * - * Note: When the schema is constructed, by default only the types that are - * reachable by traversing the root types are included, other types must be - * explicitly referenced. - * - * Example: - * - * ```ts - * const characterInterface = new GraphQLInterfaceType({ - * name: 'Character', - * ... - * }); - * - * const humanType = new GraphQLObjectType({ - * name: 'Human', - * interfaces: [characterInterface], - * ... - * }); - * - * const droidType = new GraphQLObjectType({ - * name: 'Droid', - * interfaces: [characterInterface], - * ... - * }); - * - * const schema = new GraphQLSchema({ - * query: new GraphQLObjectType({ - * name: 'Query', - * fields: { - * hero: { type: characterInterface, ... }, - * } - * }), - * ... - * // Since this schema references only the `Character` interface it's - * // necessary to explicitly list the types that implement it if - * // you want them to be included in the final schema. - * types: [humanType, droidType], - * }) - * ``` - * - * Note: If an array of `directives` are provided to GraphQLSchema, that will be - * the exact list of directives represented and allowed. If `directives` is not - * provided then a default set of the specified directives (e.g. `@include` and - * `@skip`) will be used. If you wish to provide *additional* directives to these - * specified directives, you must explicitly declare them. Example: - * - * ```ts - * const MyAppSchema = new GraphQLSchema({ - * ... - * directives: specifiedDirectives.concat([ myCustomDirective ]), - * }) - * ``` - */ -class GraphQLSchema { - // Used as a cache for validateSchema(). - constructor(config) { - var _config$extensionASTN, _config$directives; - - // If this schema was built from a source known to be valid, then it may be - // marked with assumeValid to avoid an additional type system validation. - this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors. - - (0, _isObjectLike.isObjectLike)(config) || (0, _devAssert.devAssert)(false, 'Must provide configuration object.'); - !config.types || Array.isArray(config.types) || (0, _devAssert.devAssert)(false, `"types" must be Array if provided but got: ${(0, _inspect.inspect)(config.types)}.`); - !config.directives || Array.isArray(config.directives) || (0, _devAssert.devAssert)(false, '"directives" must be Array if provided but got: ' + `${(0, _inspect.inspect)(config.directives)}.`); - this.description = config.description; - this.extensions = (0, _toObjMap.toObjMap)(config.extensions); - this.astNode = config.astNode; - this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; - this._queryType = config.query; - this._mutationType = config.mutation; - this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default. - - this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to - // the set of "collected" types, so `collectReferencedTypes` ignore them. - - const allReferencedTypes = new Set(config.types); - if (config.types != null) { - for (const type of config.types) { - // When we ready to process this type, we remove it from "collected" types - // and then add it together with all dependent types in the correct position. - allReferencedTypes.delete(type); - collectReferencedTypes(type, allReferencedTypes); - } - } - if (this._queryType != null) { - collectReferencedTypes(this._queryType, allReferencedTypes); - } - if (this._mutationType != null) { - collectReferencedTypes(this._mutationType, allReferencedTypes); - } - if (this._subscriptionType != null) { - collectReferencedTypes(this._subscriptionType, allReferencedTypes); - } - for (const directive of this._directives) { - // Directives are not validated until validateSchema() is called. - if ((0, _directives.isDirective)(directive)) { - for (const arg of directive.args) { - collectReferencedTypes(arg.type, allReferencedTypes); - } - } - } - collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema. - - this._typeMap = Object.create(null); - this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name. - - this._implementationsMap = Object.create(null); - for (const namedType of allReferencedTypes) { - if (namedType == null) { - continue; - } - const typeName = namedType.name; - typeName || (0, _devAssert.devAssert)(false, 'One of the provided types for building the Schema is missing a name.'); - if (this._typeMap[typeName] !== undefined) { - throw new Error(`Schema must contain uniquely named types but contains multiple types named "${typeName}".`); - } - this._typeMap[typeName] = namedType; - if ((0, _definition.isInterfaceType)(namedType)) { - // Store implementations by interface. - for (const iface of namedType.getInterfaces()) { - if ((0, _definition.isInterfaceType)(iface)) { - let implementations = this._implementationsMap[iface.name]; - if (implementations === undefined) { - implementations = this._implementationsMap[iface.name] = { - objects: [], - interfaces: [] - }; - } - implementations.interfaces.push(namedType); - } - } - } else if ((0, _definition.isObjectType)(namedType)) { - // Store implementations by objects. - for (const iface of namedType.getInterfaces()) { - if ((0, _definition.isInterfaceType)(iface)) { - let implementations = this._implementationsMap[iface.name]; - if (implementations === undefined) { - implementations = this._implementationsMap[iface.name] = { - objects: [], - interfaces: [] - }; - } - implementations.objects.push(namedType); - } - } - } - } +})); +Object.defineProperty(exports, "UniqueArgumentNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueArgumentNamesRule; } - get [Symbol.toStringTag]() { - return 'GraphQLSchema'; +})); +Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueDirectiveNamesRule; } - getQueryType() { - return this._queryType; +})); +Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueDirectivesPerLocationRule; } - getMutationType() { - return this._mutationType; +})); +Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueEnumValueNamesRule; } - getSubscriptionType() { - return this._subscriptionType; +})); +Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueFieldDefinitionNamesRule; } - getRootType(operation) { - switch (operation) { - case _ast.OperationTypeNode.QUERY: - return this.getQueryType(); - case _ast.OperationTypeNode.MUTATION: - return this.getMutationType(); - case _ast.OperationTypeNode.SUBSCRIPTION: - return this.getSubscriptionType(); - } +})); +Object.defineProperty(exports, "UniqueFragmentNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueFragmentNamesRule; } - getTypeMap() { - return this._typeMap; +})); +Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueInputFieldNamesRule; } - getType(name) { - return this.getTypeMap()[name]; +})); +Object.defineProperty(exports, "UniqueOperationNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueOperationNamesRule; } - getPossibleTypes(abstractType) { - return (0, _definition.isUnionType)(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; +})); +Object.defineProperty(exports, "UniqueOperationTypesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueOperationTypesRule; } - getImplementations(interfaceType) { - const implementations = this._implementationsMap[interfaceType.name]; - return implementations !== null && implementations !== void 0 ? implementations : { - objects: [], - interfaces: [] - }; +})); +Object.defineProperty(exports, "UniqueTypeNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueTypeNamesRule; } - isSubType(abstractType, maybeSubType) { - let map = this._subTypeMap[abstractType.name]; - if (map === undefined) { - map = Object.create(null); - if ((0, _definition.isUnionType)(abstractType)) { - for (const type of abstractType.getTypes()) { - map[type.name] = true; - } - } else { - const implementations = this.getImplementations(abstractType); - for (const type of implementations.objects) { - map[type.name] = true; - } - for (const type of implementations.interfaces) { - map[type.name] = true; - } - } - this._subTypeMap[abstractType.name] = map; - } - return map[maybeSubType.name] !== undefined; +})); +Object.defineProperty(exports, "UniqueVariableNamesRule", ({ + enumerable: true, + get: function () { + return _index4.UniqueVariableNamesRule; } - getDirectives() { - return this._directives; +})); +Object.defineProperty(exports, "ValidationContext", ({ + enumerable: true, + get: function () { + return _index4.ValidationContext; } - getDirective(name) { - return this.getDirectives().find(directive => directive.name === name); +})); +Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({ + enumerable: true, + get: function () { + return _index4.ValuesOfCorrectTypeRule; } - toConfig() { - return { - description: this.description, - query: this.getQueryType(), - mutation: this.getMutationType(), - subscription: this.getSubscriptionType(), - types: Object.values(this.getTypeMap()), - directives: this.getDirectives(), - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes, - assumeValid: this.__validationErrors !== undefined - }; +})); +Object.defineProperty(exports, "VariablesAreInputTypesRule", ({ + enumerable: true, + get: function () { + return _index4.VariablesAreInputTypesRule; } -} -exports.GraphQLSchema = GraphQLSchema; -function collectReferencedTypes(type, typeSet) { - const namedType = (0, _definition.getNamedType)(type); - if (!typeSet.has(namedType)) { - typeSet.add(namedType); - if ((0, _definition.isUnionType)(namedType)) { - for (const memberType of namedType.getTypes()) { - collectReferencedTypes(memberType, typeSet); - } - } else if ((0, _definition.isObjectType)(namedType) || (0, _definition.isInterfaceType)(namedType)) { - for (const interfaceType of namedType.getInterfaces()) { - collectReferencedTypes(interfaceType, typeSet); - } - for (const field of Object.values(namedType.getFields())) { - collectReferencedTypes(field.type, typeSet); - for (const arg of field.args) { - collectReferencedTypes(arg.type, typeSet); - } - } - } else if ((0, _definition.isInputObjectType)(namedType)) { - for (const field of Object.values(namedType.getFields())) { - collectReferencedTypes(field.type, typeSet); - } - } +})); +Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({ + enumerable: true, + get: function () { + return _index4.VariablesInAllowedPositionRule; } - return typeSet; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/type/validate.mjs": -/*!*******************************************************!*\ - !*** ../../../node_modules/graphql/type/validate.mjs ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.assertValidSchema = assertValidSchema; -exports.validateSchema = validateSchema; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _typeComparators = __webpack_require__(/*! ../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); -var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); -/** - * Implements the "Type Validation" sub-sections of the specification's - * "Type System" section. - * - * Validation runs synchronously, returning an array of encountered errors, or - * an empty array if no errors were encountered and the Schema is valid. - */ - -function validateSchema(schema) { - // First check to ensure the provided value is in fact a GraphQLSchema. - (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results. - - if (schema.__validationErrors) { - return schema.__validationErrors; - } // Validate the schema, producing a list of errors. - - const context = new SchemaValidationContext(schema); - validateRootTypes(context); - validateDirectives(context); - validateTypes(context); // Persist the results of validation before returning to ensure validation - // does not run multiple times for this schema. - - const errors = context.getErrors(); - schema.__validationErrors = errors; - return errors; -} -/** - * Utility function which asserts a schema is valid by throwing an error if - * it is invalid. - */ - -function assertValidSchema(schema) { - const errors = validateSchema(schema); - if (errors.length !== 0) { - throw new Error(errors.map(error => error.message).join('\n\n')); +Object.defineProperty(exports, "__Directive", ({ + enumerable: true, + get: function () { + return _index.__Directive; } -} -class SchemaValidationContext { - constructor(schema) { - this._errors = []; - this.schema = schema; +})); +Object.defineProperty(exports, "__DirectiveLocation", ({ + enumerable: true, + get: function () { + return _index.__DirectiveLocation; } - reportError(message, nodes) { - const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; - this._errors.push(new _GraphQLError.GraphQLError(message, { - nodes: _nodes - })); +})); +Object.defineProperty(exports, "__EnumValue", ({ + enumerable: true, + get: function () { + return _index.__EnumValue; } - getErrors() { - return this._errors; +})); +Object.defineProperty(exports, "__Field", ({ + enumerable: true, + get: function () { + return _index.__Field; } -} -function validateRootTypes(context) { - const schema = context.schema; - const queryType = schema.getQueryType(); - if (!queryType) { - context.reportError('Query root type must be provided.', schema.astNode); - } else if (!(0, _definition.isObjectType)(queryType)) { - var _getOperationTypeNode; - context.reportError(`Query root type must be Object type, it cannot be ${(0, _inspect.inspect)(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, _ast.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode); +})); +Object.defineProperty(exports, "__InputValue", ({ + enumerable: true, + get: function () { + return _index.__InputValue; } - const mutationType = schema.getMutationType(); - if (mutationType && !(0, _definition.isObjectType)(mutationType)) { - var _getOperationTypeNode2; - context.reportError('Mutation root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, _ast.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode); +})); +Object.defineProperty(exports, "__Schema", ({ + enumerable: true, + get: function () { + return _index.__Schema; } - const subscriptionType = schema.getSubscriptionType(); - if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) { - var _getOperationTypeNode3; - context.reportError('Subscription root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, _ast.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode); +})); +Object.defineProperty(exports, "__Type", ({ + enumerable: true, + get: function () { + return _index.__Type; } -} -function getOperationTypeNode(schema, operation) { - var _flatMap$find; - return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap( - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - schemaNode => { - var _schemaNode$operation; - return (/* c8 ignore next */ - (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : [] - ); - }).find(operationNode => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type; -} -function validateDirectives(context) { - for (const directive of context.schema.getDirectives()) { - // Ensure all directives are in fact GraphQL directives. - if (!(0, _directives.isDirective)(directive)) { - context.reportError(`Expected directive but got: ${(0, _inspect.inspect)(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode); - continue; - } // Ensure they are named correctly. - - validateName(context, directive); // TODO: Ensure proper locations. - // Ensure the arguments are valid. - - for (const arg of directive.args) { - // Ensure they are named correctly. - validateName(context, arg); // Ensure the type is an input type. - - if (!(0, _definition.isInputType)(arg.type)) { - context.reportError(`The type of @${directive.name}(${arg.name}:) must be Input Type ` + `but got: ${(0, _inspect.inspect)(arg.type)}.`, arg.astNode); - } - if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { - var _arg$astNode; - context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]); - } - } +})); +Object.defineProperty(exports, "__TypeKind", ({ + enumerable: true, + get: function () { + return _index.__TypeKind; } -} -function validateName(context, node) { - // Ensure names are valid, however introspection types opt out. - if (node.name.startsWith('__')) { - context.reportError(`Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, node.astNode); +})); +Object.defineProperty(exports, "assertAbstractType", ({ + enumerable: true, + get: function () { + return _index.assertAbstractType; } -} -function validateTypes(context) { - const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); - const typeMap = context.schema.getTypeMap(); - for (const type of Object.values(typeMap)) { - // Ensure all provided types are in fact GraphQL type. - if (!(0, _definition.isNamedType)(type)) { - context.reportError(`Expected GraphQL named type but got: ${(0, _inspect.inspect)(type)}.`, type.astNode); - continue; - } // Ensure it is named correctly (excluding introspection types). - - if (!(0, _introspection.isIntrospectionType)(type)) { - validateName(context, type); - } - if ((0, _definition.isObjectType)(type)) { - // Ensure fields are valid - validateFields(context, type); // Ensure objects implement the interfaces they claim to. - - validateInterfaces(context, type); - } else if ((0, _definition.isInterfaceType)(type)) { - // Ensure fields are valid. - validateFields(context, type); // Ensure interfaces implement the interfaces they claim to. - - validateInterfaces(context, type); - } else if ((0, _definition.isUnionType)(type)) { - // Ensure Unions include valid member types. - validateUnionMembers(context, type); - } else if ((0, _definition.isEnumType)(type)) { - // Ensure Enums have valid values. - validateEnumValues(context, type); - } else if ((0, _definition.isInputObjectType)(type)) { - // Ensure Input Object fields are valid. - validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references - - validateInputObjectCircularRefs(type); - } +})); +Object.defineProperty(exports, "assertCompositeType", ({ + enumerable: true, + get: function () { + return _index.assertCompositeType; } -} -function validateFields(context, type) { - const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields. - - if (fields.length === 0) { - context.reportError(`Type ${type.name} must define one or more fields.`, [type.astNode, ...type.extensionASTNodes]); +})); +Object.defineProperty(exports, "assertDirective", ({ + enumerable: true, + get: function () { + return _index.assertDirective; } - for (const field of fields) { - // Ensure they are named correctly. - validateName(context, field); // Ensure the type is an output type - - if (!(0, _definition.isOutputType)(field.type)) { - var _field$astNode; - context.reportError(`The type of ${type.name}.${field.name} must be Output Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type); - } // Ensure the arguments are valid - - for (const arg of field.args) { - const argName = arg.name; // Ensure they are named correctly. - - validateName(context, arg); // Ensure the type is an input type - - if (!(0, _definition.isInputType)(arg.type)) { - var _arg$astNode2; - context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input ` + `Type but got: ${(0, _inspect.inspect)(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type); - } - if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { - var _arg$astNode3; - context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]); - } - } +})); +Object.defineProperty(exports, "assertEnumType", ({ + enumerable: true, + get: function () { + return _index.assertEnumType; } -} -function validateInterfaces(context, type) { - const ifaceTypeNames = Object.create(null); - for (const iface of type.getInterfaces()) { - if (!(0, _definition.isInterfaceType)(iface)) { - context.reportError(`Type ${(0, _inspect.inspect)(type)} must only implement Interface types, ` + `it cannot implement ${(0, _inspect.inspect)(iface)}.`, getAllImplementsInterfaceNodes(type, iface)); - continue; - } - if (type === iface) { - context.reportError(`Type ${type.name} cannot implement itself because it would create a circular reference.`, getAllImplementsInterfaceNodes(type, iface)); - continue; - } - if (ifaceTypeNames[iface.name]) { - context.reportError(`Type ${type.name} can only implement ${iface.name} once.`, getAllImplementsInterfaceNodes(type, iface)); - continue; - } - ifaceTypeNames[iface.name] = true; - validateTypeImplementsAncestors(context, type, iface); - validateTypeImplementsInterface(context, type, iface); +})); +Object.defineProperty(exports, "assertEnumValueName", ({ + enumerable: true, + get: function () { + return _index.assertEnumValueName; } -} -function validateTypeImplementsInterface(context, type, iface) { - const typeFieldMap = type.getFields(); // Assert each interface field is implemented. - - for (const ifaceField of Object.values(iface.getFields())) { - const fieldName = ifaceField.name; - const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type. - - if (!typeField) { - context.reportError(`Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`, [ifaceField.astNode, type.astNode, ...type.extensionASTNodes]); - continue; - } // Assert interface field type is satisfied by type field type, by being - // a valid subtype. (covariant) - - if (!(0, _typeComparators.isTypeSubTypeOf)(context.schema, typeField.type, ifaceField.type)) { - var _ifaceField$astNode, _typeField$astNode; - context.reportError(`Interface field ${iface.name}.${fieldName} expects type ` + `${(0, _inspect.inspect)(ifaceField.type)} but ${type.name}.${fieldName} ` + `is type ${(0, _inspect.inspect)(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]); - } // Assert each interface field arg is implemented. - - for (const ifaceArg of ifaceField.args) { - const argName = ifaceArg.name; - const typeArg = typeField.args.find(arg => arg.name === argName); // Assert interface field arg exists on object field. - - if (!typeArg) { - context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`, [ifaceArg.astNode, typeField.astNode]); - continue; - } // Assert interface field arg type matches object field arg type. - // (invariant) - // TODO: change to contravariant? - - if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) { - var _ifaceArg$astNode, _typeArg$astNode; - context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) ` + `expects type ${(0, _inspect.inspect)(ifaceArg.type)} but ` + `${type.name}.${fieldName}(${argName}:) is type ` + `${(0, _inspect.inspect)(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]); - } // TODO: validate default values? - } // Assert additional arguments must not be required. - - for (const typeArg of typeField.args) { - const argName = typeArg.name; - const ifaceArg = ifaceField.args.find(arg => arg.name === argName); - if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) { - context.reportError(`Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, [typeArg.astNode, ifaceField.astNode]); - } - } +})); +Object.defineProperty(exports, "assertInputObjectType", ({ + enumerable: true, + get: function () { + return _index.assertInputObjectType; } -} -function validateTypeImplementsAncestors(context, type, iface) { - const ifaceInterfaces = type.getInterfaces(); - for (const transitive of iface.getInterfaces()) { - if (!ifaceInterfaces.includes(transitive)) { - context.reportError(transitive === type ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, [...getAllImplementsInterfaceNodes(iface, transitive), ...getAllImplementsInterfaceNodes(type, iface)]); - } +})); +Object.defineProperty(exports, "assertInputType", ({ + enumerable: true, + get: function () { + return _index.assertInputType; } -} -function validateUnionMembers(context, union) { - const memberTypes = union.getTypes(); - if (memberTypes.length === 0) { - context.reportError(`Union type ${union.name} must define one or more member types.`, [union.astNode, ...union.extensionASTNodes]); +})); +Object.defineProperty(exports, "assertInterfaceType", ({ + enumerable: true, + get: function () { + return _index.assertInterfaceType; } - const includedTypeNames = Object.create(null); - for (const memberType of memberTypes) { - if (includedTypeNames[memberType.name]) { - context.reportError(`Union type ${union.name} can only include type ${memberType.name} once.`, getUnionMemberTypeNodes(union, memberType.name)); - continue; - } - includedTypeNames[memberType.name] = true; - if (!(0, _definition.isObjectType)(memberType)) { - context.reportError(`Union type ${union.name} can only include Object types, ` + `it cannot include ${(0, _inspect.inspect)(memberType)}.`, getUnionMemberTypeNodes(union, String(memberType))); - } +})); +Object.defineProperty(exports, "assertLeafType", ({ + enumerable: true, + get: function () { + return _index.assertLeafType; } -} -function validateEnumValues(context, enumType) { - const enumValues = enumType.getValues(); - if (enumValues.length === 0) { - context.reportError(`Enum type ${enumType.name} must define one or more values.`, [enumType.astNode, ...enumType.extensionASTNodes]); +})); +Object.defineProperty(exports, "assertListType", ({ + enumerable: true, + get: function () { + return _index.assertListType; } - for (const enumValue of enumValues) { - // Ensure valid name. - validateName(context, enumValue); +})); +Object.defineProperty(exports, "assertName", ({ + enumerable: true, + get: function () { + return _index.assertName; } -} -function validateInputFields(context, inputObj) { - const fields = Object.values(inputObj.getFields()); - if (fields.length === 0) { - context.reportError(`Input Object type ${inputObj.name} must define one or more fields.`, [inputObj.astNode, ...inputObj.extensionASTNodes]); - } // Ensure the arguments are valid - - for (const field of fields) { - // Ensure they are named correctly. - validateName(context, field); // Ensure the type is an input type - - if (!(0, _definition.isInputType)(field.type)) { - var _field$astNode2; - context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type); - } - if ((0, _definition.isRequiredInputField)(field) && field.deprecationReason != null) { - var _field$astNode3; - context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]); - } +})); +Object.defineProperty(exports, "assertNamedType", ({ + enumerable: true, + get: function () { + return _index.assertNamedType; } -} -function createInputObjectCircularRefsValidator(context) { - // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'. - // Tracks already visited types to maintain O(N) and to ensure that cycles - // are not redundantly reported. - const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors - - const fieldPath = []; // Position in the type path - - const fieldPathIndexByTypeName = Object.create(null); - return detectCycleRecursive; // This does a straight-forward DFS to find cycles. - // It does not terminate when a cycle was found but continues to explore - // the graph to find all possible cycles. - - function detectCycleRecursive(inputObj) { - if (visitedTypes[inputObj.name]) { - return; - } - visitedTypes[inputObj.name] = true; - fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; - const fields = Object.values(inputObj.getFields()); - for (const field of fields) { - if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) { - const fieldType = field.type.ofType; - const cycleIndex = fieldPathIndexByTypeName[fieldType.name]; - fieldPath.push(field); - if (cycleIndex === undefined) { - detectCycleRecursive(fieldType); - } else { - const cyclePath = fieldPath.slice(cycleIndex); - const pathStr = cyclePath.map(fieldObj => fieldObj.name).join('.'); - context.reportError(`Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, cyclePath.map(fieldObj => fieldObj.astNode)); - } - fieldPath.pop(); - } - } - fieldPathIndexByTypeName[inputObj.name] = undefined; +})); +Object.defineProperty(exports, "assertNonNullType", ({ + enumerable: true, + get: function () { + return _index.assertNonNullType; } -} -function getAllImplementsInterfaceNodes(type, iface) { - const { - astNode, - extensionASTNodes - } = type; - const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - - return nodes.flatMap(typeNode => { - var _typeNode$interfaces; - return (/* c8 ignore next */ - (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : [] - ); - }).filter(ifaceNode => ifaceNode.name.value === iface.name); -} -function getUnionMemberTypeNodes(union, typeName) { - const { - astNode, - extensionASTNodes - } = union; - const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - - return nodes.flatMap(unionNode => { - var _unionNode$types; - return (/* c8 ignore next */ - (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : [] - ); - }).filter(typeNode => typeNode.name.value === typeName); -} -function getDeprecatedDirectiveNode(definitionNode) { - var _definitionNode$direc; - return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(node => node.name.value === _directives.GraphQLDeprecatedDirective.name); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/TypeInfo.mjs": -/*!************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/TypeInfo.mjs ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.TypeInfo = void 0; -exports.visitWithTypeInfo = visitWithTypeInfo; -var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); -/** - * TypeInfo is a utility class which, given a GraphQL schema, can keep track - * of the current field and type definitions at any point in a GraphQL document - * AST during a recursive descent by calling `enter(node)` and `leave(node)`. - */ - -class TypeInfo { - constructor(schema, - /** - * Initial type may be provided in rare cases to facilitate traversals - * beginning somewhere other than documents. - */ - initialType, /** @deprecated will be removed in 17.0.0 */ - getFieldDefFn) { - this._schema = schema; - this._typeStack = []; - this._parentTypeStack = []; - this._inputTypeStack = []; - this._fieldDefStack = []; - this._defaultValueStack = []; - this._directive = null; - this._argument = null; - this._enumValue = null; - this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; - if (initialType) { - if ((0, _definition.isInputType)(initialType)) { - this._inputTypeStack.push(initialType); - } - if ((0, _definition.isCompositeType)(initialType)) { - this._parentTypeStack.push(initialType); - } - if ((0, _definition.isOutputType)(initialType)) { - this._typeStack.push(initialType); - } - } +Object.defineProperty(exports, "assertNullableType", ({ + enumerable: true, + get: function () { + return _index.assertNullableType; } - get [Symbol.toStringTag]() { - return 'TypeInfo'; +})); +Object.defineProperty(exports, "assertObjectType", ({ + enumerable: true, + get: function () { + return _index.assertObjectType; } - getType() { - if (this._typeStack.length > 0) { - return this._typeStack[this._typeStack.length - 1]; - } +})); +Object.defineProperty(exports, "assertOutputType", ({ + enumerable: true, + get: function () { + return _index.assertOutputType; } - getParentType() { - if (this._parentTypeStack.length > 0) { - return this._parentTypeStack[this._parentTypeStack.length - 1]; - } +})); +Object.defineProperty(exports, "assertScalarType", ({ + enumerable: true, + get: function () { + return _index.assertScalarType; } - getInputType() { - if (this._inputTypeStack.length > 0) { - return this._inputTypeStack[this._inputTypeStack.length - 1]; - } +})); +Object.defineProperty(exports, "assertSchema", ({ + enumerable: true, + get: function () { + return _index.assertSchema; } - getParentInputType() { - if (this._inputTypeStack.length > 1) { - return this._inputTypeStack[this._inputTypeStack.length - 2]; - } +})); +Object.defineProperty(exports, "assertType", ({ + enumerable: true, + get: function () { + return _index.assertType; } - getFieldDef() { - if (this._fieldDefStack.length > 0) { - return this._fieldDefStack[this._fieldDefStack.length - 1]; - } +})); +Object.defineProperty(exports, "assertUnionType", ({ + enumerable: true, + get: function () { + return _index.assertUnionType; } - getDefaultValue() { - if (this._defaultValueStack.length > 0) { - return this._defaultValueStack[this._defaultValueStack.length - 1]; - } +})); +Object.defineProperty(exports, "assertValidName", ({ + enumerable: true, + get: function () { + return _index6.assertValidName; } - getDirective() { - return this._directive; +})); +Object.defineProperty(exports, "assertValidSchema", ({ + enumerable: true, + get: function () { + return _index.assertValidSchema; } - getArgument() { - return this._argument; +})); +Object.defineProperty(exports, "assertWrappingType", ({ + enumerable: true, + get: function () { + return _index.assertWrappingType; } - getEnumValue() { - return this._enumValue; +})); +Object.defineProperty(exports, "astFromValue", ({ + enumerable: true, + get: function () { + return _index6.astFromValue; } - enter(node) { - const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop - // any assumptions of a valid schema to ensure runtime types are properly - // checked before continuing since TypeInfo is used as part of validation - // which occurs before guarantees of schema and document validity. - - switch (node.kind) { - case _kinds.Kind.SELECTION_SET: - { - const namedType = (0, _definition.getNamedType)(this.getType()); - this._parentTypeStack.push((0, _definition.isCompositeType)(namedType) ? namedType : undefined); - break; - } - case _kinds.Kind.FIELD: - { - const parentType = this.getParentType(); - let fieldDef; - let fieldType; - if (parentType) { - fieldDef = this._getFieldDef(schema, parentType, node); - if (fieldDef) { - fieldType = fieldDef.type; - } - } - this._fieldDefStack.push(fieldDef); - this._typeStack.push((0, _definition.isOutputType)(fieldType) ? fieldType : undefined); - break; - } - case _kinds.Kind.DIRECTIVE: - this._directive = schema.getDirective(node.name.value); - break; - case _kinds.Kind.OPERATION_DEFINITION: - { - const rootType = schema.getRootType(node.operation); - this._typeStack.push((0, _definition.isObjectType)(rootType) ? rootType : undefined); - break; - } - case _kinds.Kind.INLINE_FRAGMENT: - case _kinds.Kind.FRAGMENT_DEFINITION: - { - const typeConditionAST = node.typeCondition; - const outputType = typeConditionAST ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST) : (0, _definition.getNamedType)(this.getType()); - this._typeStack.push((0, _definition.isOutputType)(outputType) ? outputType : undefined); - break; - } - case _kinds.Kind.VARIABLE_DEFINITION: - { - const inputType = (0, _typeFromAST.typeFromAST)(schema, node.type); - this._inputTypeStack.push((0, _definition.isInputType)(inputType) ? inputType : undefined); - break; - } - case _kinds.Kind.ARGUMENT: - { - var _this$getDirective; - let argDef; - let argType; - const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); - if (fieldOrDirective) { - argDef = fieldOrDirective.args.find(arg => arg.name === node.name.value); - if (argDef) { - argType = argDef.type; - } - } - this._argument = argDef; - this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined); - this._inputTypeStack.push((0, _definition.isInputType)(argType) ? argType : undefined); - break; - } - case _kinds.Kind.LIST: - { - const listType = (0, _definition.getNullableType)(this.getInputType()); - const itemType = (0, _definition.isListType)(listType) ? listType.ofType : listType; // List positions never have a default value. - - this._defaultValueStack.push(undefined); - this._inputTypeStack.push((0, _definition.isInputType)(itemType) ? itemType : undefined); - break; - } - case _kinds.Kind.OBJECT_FIELD: - { - const objectType = (0, _definition.getNamedType)(this.getInputType()); - let inputFieldType; - let inputField; - if ((0, _definition.isInputObjectType)(objectType)) { - inputField = objectType.getFields()[node.name.value]; - if (inputField) { - inputFieldType = inputField.type; - } - } - this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined); - this._inputTypeStack.push((0, _definition.isInputType)(inputFieldType) ? inputFieldType : undefined); - break; - } - case _kinds.Kind.ENUM: - { - const enumType = (0, _definition.getNamedType)(this.getInputType()); - let enumValue; - if ((0, _definition.isEnumType)(enumType)) { - enumValue = enumType.getValue(node.value); - } - this._enumValue = enumValue; - break; - } - default: // Ignore other nodes - } +})); +Object.defineProperty(exports, "buildASTSchema", ({ + enumerable: true, + get: function () { + return _index6.buildASTSchema; } - - leave(node) { - switch (node.kind) { - case _kinds.Kind.SELECTION_SET: - this._parentTypeStack.pop(); - break; - case _kinds.Kind.FIELD: - this._fieldDefStack.pop(); - this._typeStack.pop(); - break; - case _kinds.Kind.DIRECTIVE: - this._directive = null; - break; - case _kinds.Kind.OPERATION_DEFINITION: - case _kinds.Kind.INLINE_FRAGMENT: - case _kinds.Kind.FRAGMENT_DEFINITION: - this._typeStack.pop(); - break; - case _kinds.Kind.VARIABLE_DEFINITION: - this._inputTypeStack.pop(); - break; - case _kinds.Kind.ARGUMENT: - this._argument = null; - this._defaultValueStack.pop(); - this._inputTypeStack.pop(); - break; - case _kinds.Kind.LIST: - case _kinds.Kind.OBJECT_FIELD: - this._defaultValueStack.pop(); - this._inputTypeStack.pop(); - break; - case _kinds.Kind.ENUM: - this._enumValue = null; - break; - default: // Ignore other nodes - } +})); +Object.defineProperty(exports, "buildClientSchema", ({ + enumerable: true, + get: function () { + return _index6.buildClientSchema; } -} - -/** - * Not exactly the same as the executor's definition of getFieldDef, in this - * statically evaluated environment we do not always have an Object type, - * and need to handle Interface and Union types. - */ -exports.TypeInfo = TypeInfo; -function getFieldDef(schema, parentType, fieldNode) { - const name = fieldNode.name.value; - if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { - return _introspection.SchemaMetaFieldDef; +})); +Object.defineProperty(exports, "buildSchema", ({ + enumerable: true, + get: function () { + return _index6.buildSchema; } - if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { - return _introspection.TypeMetaFieldDef; +})); +Object.defineProperty(exports, "coerceInputValue", ({ + enumerable: true, + get: function () { + return _index6.coerceInputValue; } - if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) { - return _introspection.TypeNameMetaFieldDef; +})); +Object.defineProperty(exports, "concatAST", ({ + enumerable: true, + get: function () { + return _index6.concatAST; } - if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { - return parentType.getFields()[name]; +})); +Object.defineProperty(exports, "createSourceEventStream", ({ + enumerable: true, + get: function () { + return _index3.createSourceEventStream; } -} -/** - * Creates a new visitor instance which maintains a provided TypeInfo instance - * along with visiting visitor. - */ - -function visitWithTypeInfo(typeInfo, visitor) { - return { - enter() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - const node = args[0]; - typeInfo.enter(node); - const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).enter; - if (fn) { - const result = fn.apply(visitor, args); - if (result !== undefined) { - typeInfo.leave(node); - if ((0, _ast.isNode)(result)) { - typeInfo.enter(result); - } - } - return result; - } - }, - leave() { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - const node = args[0]; - const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).leave; - let result; - if (fn) { - result = fn.apply(visitor, args); - } - typeInfo.leave(node); - return result; - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/assertValidName.mjs": -/*!*******************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/assertValidName.mjs ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.assertValidName = assertValidName; -exports.isValidNameError = isValidNameError; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _assertName = __webpack_require__(/*! ../type/assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); -/* c8 ignore start */ - -/** - * Upholds the spec rules about naming. - * @deprecated Please use `assertName` instead. Will be removed in v17 - */ - -function assertValidName(name) { - const error = isValidNameError(name); - if (error) { - throw error; +Object.defineProperty(exports, "defaultFieldResolver", ({ + enumerable: true, + get: function () { + return _index3.defaultFieldResolver; } - return name; -} -/** - * Returns an Error if a name is invalid. - * @deprecated Please use `assertName` instead. Will be removed in v17 - */ - -function isValidNameError(name) { - typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.'); - if (name.startsWith('__')) { - return new _GraphQLError.GraphQLError(`Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`); +})); +Object.defineProperty(exports, "defaultTypeResolver", ({ + enumerable: true, + get: function () { + return _index3.defaultTypeResolver; } - try { - (0, _assertName.assertName)(name); - } catch (error) { - return error; +})); +Object.defineProperty(exports, "doTypesOverlap", ({ + enumerable: true, + get: function () { + return _index6.doTypesOverlap; } -} -/* c8 ignore stop */ - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/astFromValue.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/astFromValue.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.astFromValue = astFromValue; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -/** - * Produces a GraphQL Value AST given a JavaScript object. - * Function will match JavaScript/JSON values to GraphQL AST schema format - * by using suggested GraphQLInputType. For example: - * - * astFromValue("value", GraphQLString) - * - * A GraphQL type must be provided, which will be used to interpret different - * JavaScript values. - * - * | JSON Value | GraphQL Value | - * | ------------- | -------------------- | - * | Object | Input Object | - * | Array | List | - * | Boolean | Boolean | - * | String | String / Enum Value | - * | Number | Int / Float | - * | Unknown | Enum Value | - * | null | NullValue | - * - */ - -function astFromValue(value, type) { - if ((0, _definition.isNonNullType)(type)) { - const astValue = astFromValue(value, type.ofType); - if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) { - return null; - } - return astValue; - } // only explicit null, not undefined, NaN - - if (value === null) { - return { - kind: _kinds.Kind.NULL - }; - } // undefined - - if (value === undefined) { - return null; - } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but - // the value is not an array, convert the value using the list's item type. - - if ((0, _definition.isListType)(type)) { - const itemType = type.ofType; - if ((0, _isIterableObject.isIterableObject)(value)) { - const valuesNodes = []; - for (const item of value) { - const itemNode = astFromValue(item, itemType); - if (itemNode != null) { - valuesNodes.push(itemNode); - } - } - return { - kind: _kinds.Kind.LIST, - values: valuesNodes - }; - } - return astFromValue(value, itemType); - } // Populate the fields of the input object by creating ASTs from each value - // in the JavaScript object according to the fields in the input type. - - if ((0, _definition.isInputObjectType)(type)) { - if (!(0, _isObjectLike.isObjectLike)(value)) { - return null; - } - const fieldNodes = []; - for (const field of Object.values(type.getFields())) { - const fieldValue = astFromValue(value[field.name], field.type); - if (fieldValue) { - fieldNodes.push({ - kind: _kinds.Kind.OBJECT_FIELD, - name: { - kind: _kinds.Kind.NAME, - value: field.name - }, - value: fieldValue - }); - } - } - return { - kind: _kinds.Kind.OBJECT, - fields: fieldNodes - }; +Object.defineProperty(exports, "execute", ({ + enumerable: true, + get: function () { + return _index3.execute; } - if ((0, _definition.isLeafType)(type)) { - // Since value is an internally represented value, it must be serialized - // to an externally represented value before converting into an AST. - const serialized = type.serialize(value); - if (serialized == null) { - return null; - } // Others serialize based on their corresponding JavaScript scalar types. - - if (typeof serialized === 'boolean') { - return { - kind: _kinds.Kind.BOOLEAN, - value: serialized - }; - } // JavaScript numbers can be Int or Float values. - - if (typeof serialized === 'number' && Number.isFinite(serialized)) { - const stringNum = String(serialized); - return integerStringRegExp.test(stringNum) ? { - kind: _kinds.Kind.INT, - value: stringNum - } : { - kind: _kinds.Kind.FLOAT, - value: stringNum - }; - } - if (typeof serialized === 'string') { - // Enum types use Enum literals. - if ((0, _definition.isEnumType)(type)) { - return { - kind: _kinds.Kind.ENUM, - value: serialized - }; - } // ID types can use Int literals. - - if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) { - return { - kind: _kinds.Kind.INT, - value: serialized - }; - } - return { - kind: _kinds.Kind.STRING, - value: serialized - }; - } - throw new TypeError(`Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.`); +})); +Object.defineProperty(exports, "executeSync", ({ + enumerable: true, + get: function () { + return _index3.executeSync; } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered. - - false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); -} -/** - * IntValue: - * - NegativeSign? 0 - * - NegativeSign? NonZeroDigit ( Digit+ )? - */ - -const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/buildASTSchema.mjs": -/*!******************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/buildASTSchema.mjs ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.buildASTSchema = buildASTSchema; -exports.buildSchema = buildSchema; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); -var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); -var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); -var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs"); -/** - * This takes the ast of a schema document produced by the parse function in - * src/language/parser.js. - * - * If no schema definition is provided, then it will look for types named Query, - * Mutation and Subscription. - * - * Given that AST it constructs a GraphQLSchema. The resulting schema - * has no resolve methods, so execution will use default resolvers. - */ -function buildASTSchema(documentAST, options) { - documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.'); - if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { - (0, _validate.assertValidSDL)(documentAST); +Object.defineProperty(exports, "extendSchema", ({ + enumerable: true, + get: function () { + return _index6.extendSchema; } - const emptySchemaConfig = { - description: undefined, - types: [], - directives: [], - extensions: Object.create(null), - extensionASTNodes: [], - assumeValid: false - }; - const config = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options); - if (config.astNode == null) { - for (const type of config.types) { - switch (type.name) { - // Note: While this could make early assertions to get the correctly - // typed values below, that would throw immediately while type system - // validation with validateSchema() will produce more actionable results. - case 'Query': - // @ts-expect-error validated in `validateSchema` - config.query = type; - break; - case 'Mutation': - // @ts-expect-error validated in `validateSchema` - config.mutation = type; - break; - case 'Subscription': - // @ts-expect-error validated in `validateSchema` - config.subscription = type; - break; - } - } +})); +Object.defineProperty(exports, "findBreakingChanges", ({ + enumerable: true, + get: function () { + return _index6.findBreakingChanges; } - const directives = [...config.directives, - // If specified directives were not explicitly declared, add them. - ..._directives.specifiedDirectives.filter(stdDirective => config.directives.every(directive => directive.name !== stdDirective.name))]; - return new _schema.GraphQLSchema({ - ...config, - directives - }); -} -/** - * A helper function to build a GraphQLSchema directly from a source - * document. - */ - -function buildSchema(source, options) { - const document = (0, _parser.parse)(source, { - noLocation: options === null || options === void 0 ? void 0 : options.noLocation, - allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables - }); - return buildASTSchema(document, { - assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL, - assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid - }); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/buildClientSchema.mjs": -/*!*********************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/buildClientSchema.mjs ***! - \*********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.buildClientSchema = buildClientSchema; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); -var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); -var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); -/** - * Build a GraphQLSchema for use by client tools. - * - * Given the result of a client running the introspection query, creates and - * returns a GraphQLSchema instance which can be then used with all graphql-js - * tools, but cannot be used to execute a query, as introspection does not - * represent the "resolver", "parse" or "serialize" functions or any other - * server-internal mechanisms. - * - * This function expects a complete introspection result. Don't forget to check - * the "errors" field of a server response before calling this function. - */ - -function buildClientSchema(introspection, options) { - (0, _isObjectLike.isObjectLike)(introspection) && (0, _isObjectLike.isObjectLike)(introspection.__schema) || (0, _devAssert.devAssert)(false, `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0, _inspect.inspect)(introspection)}.`); // Get the schema from the introspection result. - - const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each. - - const typeMap = (0, _keyValMap.keyValMap)(schemaIntrospection.types, typeIntrospection => typeIntrospection.name, typeIntrospection => buildType(typeIntrospection)); // Include standard types only if they are used. - - for (const stdType of [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes]) { - if (typeMap[stdType.name]) { - typeMap[stdType.name] = stdType; - } - } // Get the root Query, Mutation, and Subscription types. - - const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; - const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; - const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if - // directives were not queried for. - - const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types. - - return new _schema.GraphQLSchema({ - description: schemaIntrospection.description, - query: queryType, - mutation: mutationType, - subscription: subscriptionType, - types: Object.values(typeMap), - directives, - assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid - }); // Given a type reference in introspection, return the GraphQLType instance. - // preferring cached instances before building new instances. - - function getType(typeRef) { - if (typeRef.kind === _introspection.TypeKind.LIST) { - const itemRef = typeRef.ofType; - if (!itemRef) { - throw new Error('Decorated type deeper than introspection query.'); - } - return new _definition.GraphQLList(getType(itemRef)); - } - if (typeRef.kind === _introspection.TypeKind.NON_NULL) { - const nullableRef = typeRef.ofType; - if (!nullableRef) { - throw new Error('Decorated type deeper than introspection query.'); - } - const nullableType = getType(nullableRef); - return new _definition.GraphQLNonNull((0, _definition.assertNullableType)(nullableType)); - } - return getNamedType(typeRef); +Object.defineProperty(exports, "findDangerousChanges", ({ + enumerable: true, + get: function () { + return _index6.findDangerousChanges; } - function getNamedType(typeRef) { - const typeName = typeRef.name; - if (!typeName) { - throw new Error(`Unknown type reference: ${(0, _inspect.inspect)(typeRef)}.`); - } - const type = typeMap[typeName]; - if (!type) { - throw new Error(`Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`); - } - return type; +})); +Object.defineProperty(exports, "formatError", ({ + enumerable: true, + get: function () { + return _index5.formatError; } - function getObjectType(typeRef) { - return (0, _definition.assertObjectType)(getNamedType(typeRef)); +})); +Object.defineProperty(exports, "getArgumentValues", ({ + enumerable: true, + get: function () { + return _index3.getArgumentValues; } - function getInterfaceType(typeRef) { - return (0, _definition.assertInterfaceType)(getNamedType(typeRef)); - } // Given a type's introspection result, construct the correct - // GraphQLType instance. - - function buildType(type) { - // eslint-disable-next-line @typescript-eslint/prefer-optional-chain - if (type != null && type.name != null && type.kind != null) { - // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17 - // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check - switch (type.kind) { - case _introspection.TypeKind.SCALAR: - return buildScalarDef(type); - case _introspection.TypeKind.OBJECT: - return buildObjectDef(type); - case _introspection.TypeKind.INTERFACE: - return buildInterfaceDef(type); - case _introspection.TypeKind.UNION: - return buildUnionDef(type); - case _introspection.TypeKind.ENUM: - return buildEnumDef(type); - case _introspection.TypeKind.INPUT_OBJECT: - return buildInputObjectDef(type); - } - } - const typeStr = (0, _inspect.inspect)(type); - throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`); +})); +Object.defineProperty(exports, "getDirectiveValues", ({ + enumerable: true, + get: function () { + return _index3.getDirectiveValues; } - function buildScalarDef(scalarIntrospection) { - return new _definition.GraphQLScalarType({ - name: scalarIntrospection.name, - description: scalarIntrospection.description, - specifiedByURL: scalarIntrospection.specifiedByURL - }); +})); +Object.defineProperty(exports, "getEnterLeaveForKind", ({ + enumerable: true, + get: function () { + return _index2.getEnterLeaveForKind; } - function buildImplementationsList(implementingIntrospection) { - // TODO: Temporary workaround until GraphQL ecosystem will fully support - // 'interfaces' on interface types. - if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _introspection.TypeKind.INTERFACE) { - return []; - } - if (!implementingIntrospection.interfaces) { - const implementingIntrospectionStr = (0, _inspect.inspect)(implementingIntrospection); - throw new Error(`Introspection result missing interfaces: ${implementingIntrospectionStr}.`); - } - return implementingIntrospection.interfaces.map(getInterfaceType); +})); +Object.defineProperty(exports, "getIntrospectionQuery", ({ + enumerable: true, + get: function () { + return _index6.getIntrospectionQuery; } - function buildObjectDef(objectIntrospection) { - return new _definition.GraphQLObjectType({ - name: objectIntrospection.name, - description: objectIntrospection.description, - interfaces: () => buildImplementationsList(objectIntrospection), - fields: () => buildFieldDefMap(objectIntrospection) - }); +})); +Object.defineProperty(exports, "getLocation", ({ + enumerable: true, + get: function () { + return _index2.getLocation; } - function buildInterfaceDef(interfaceIntrospection) { - return new _definition.GraphQLInterfaceType({ - name: interfaceIntrospection.name, - description: interfaceIntrospection.description, - interfaces: () => buildImplementationsList(interfaceIntrospection), - fields: () => buildFieldDefMap(interfaceIntrospection) - }); +})); +Object.defineProperty(exports, "getNamedType", ({ + enumerable: true, + get: function () { + return _index.getNamedType; } - function buildUnionDef(unionIntrospection) { - if (!unionIntrospection.possibleTypes) { - const unionIntrospectionStr = (0, _inspect.inspect)(unionIntrospection); - throw new Error(`Introspection result missing possibleTypes: ${unionIntrospectionStr}.`); - } - return new _definition.GraphQLUnionType({ - name: unionIntrospection.name, - description: unionIntrospection.description, - types: () => unionIntrospection.possibleTypes.map(getObjectType) - }); +})); +Object.defineProperty(exports, "getNullableType", ({ + enumerable: true, + get: function () { + return _index.getNullableType; } - function buildEnumDef(enumIntrospection) { - if (!enumIntrospection.enumValues) { - const enumIntrospectionStr = (0, _inspect.inspect)(enumIntrospection); - throw new Error(`Introspection result missing enumValues: ${enumIntrospectionStr}.`); - } - return new _definition.GraphQLEnumType({ - name: enumIntrospection.name, - description: enumIntrospection.description, - values: (0, _keyValMap.keyValMap)(enumIntrospection.enumValues, valueIntrospection => valueIntrospection.name, valueIntrospection => ({ - description: valueIntrospection.description, - deprecationReason: valueIntrospection.deprecationReason - })) - }); +})); +Object.defineProperty(exports, "getOperationAST", ({ + enumerable: true, + get: function () { + return _index6.getOperationAST; } - function buildInputObjectDef(inputObjectIntrospection) { - if (!inputObjectIntrospection.inputFields) { - const inputObjectIntrospectionStr = (0, _inspect.inspect)(inputObjectIntrospection); - throw new Error(`Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`); - } - return new _definition.GraphQLInputObjectType({ - name: inputObjectIntrospection.name, - description: inputObjectIntrospection.description, - fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields) - }); +})); +Object.defineProperty(exports, "getOperationRootType", ({ + enumerable: true, + get: function () { + return _index6.getOperationRootType; } - function buildFieldDefMap(typeIntrospection) { - if (!typeIntrospection.fields) { - throw new Error(`Introspection result missing fields: ${(0, _inspect.inspect)(typeIntrospection)}.`); - } - return (0, _keyValMap.keyValMap)(typeIntrospection.fields, fieldIntrospection => fieldIntrospection.name, buildField); +})); +Object.defineProperty(exports, "getVariableValues", ({ + enumerable: true, + get: function () { + return _index3.getVariableValues; } - function buildField(fieldIntrospection) { - const type = getType(fieldIntrospection.type); - if (!(0, _definition.isOutputType)(type)) { - const typeStr = (0, _inspect.inspect)(type); - throw new Error(`Introspection must provide output type for fields, but received: ${typeStr}.`); - } - if (!fieldIntrospection.args) { - const fieldIntrospectionStr = (0, _inspect.inspect)(fieldIntrospection); - throw new Error(`Introspection result missing field args: ${fieldIntrospectionStr}.`); - } - return { - description: fieldIntrospection.description, - deprecationReason: fieldIntrospection.deprecationReason, - type, - args: buildInputValueDefMap(fieldIntrospection.args) - }; +})); +Object.defineProperty(exports, "getVisitFn", ({ + enumerable: true, + get: function () { + return _index2.getVisitFn; } - function buildInputValueDefMap(inputValueIntrospections) { - return (0, _keyValMap.keyValMap)(inputValueIntrospections, inputValue => inputValue.name, buildInputValue); +})); +Object.defineProperty(exports, "graphql", ({ + enumerable: true, + get: function () { + return _graphql.graphql; } - function buildInputValue(inputValueIntrospection) { - const type = getType(inputValueIntrospection.type); - if (!(0, _definition.isInputType)(type)) { - const typeStr = (0, _inspect.inspect)(type); - throw new Error(`Introspection must provide input type for arguments, but received: ${typeStr}.`); - } - const defaultValue = inputValueIntrospection.defaultValue != null ? (0, _valueFromAST.valueFromAST)((0, _parser.parseValue)(inputValueIntrospection.defaultValue), type) : undefined; - return { - description: inputValueIntrospection.description, - type, - defaultValue, - deprecationReason: inputValueIntrospection.deprecationReason - }; +})); +Object.defineProperty(exports, "graphqlSync", ({ + enumerable: true, + get: function () { + return _graphql.graphqlSync; } - function buildDirective(directiveIntrospection) { - if (!directiveIntrospection.args) { - const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection); - throw new Error(`Introspection result missing directive args: ${directiveIntrospectionStr}.`); - } - if (!directiveIntrospection.locations) { - const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection); - throw new Error(`Introspection result missing directive locations: ${directiveIntrospectionStr}.`); - } - return new _directives.GraphQLDirective({ - name: directiveIntrospection.name, - description: directiveIntrospection.description, - isRepeatable: directiveIntrospection.isRepeatable, - locations: directiveIntrospection.locations.slice(), - args: buildInputValueDefMap(directiveIntrospection.args) - }); +})); +Object.defineProperty(exports, "introspectionFromSchema", ({ + enumerable: true, + get: function () { + return _index6.introspectionFromSchema; } -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/coerceInputValue.mjs": -/*!********************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/coerceInputValue.mjs ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.coerceInputValue = coerceInputValue; -var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs"); -var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); -var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs"); -var _printPathArray = __webpack_require__(/*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs"); -var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -/** - * Coerces a JavaScript value given a GraphQL Input Type. - */ -function coerceInputValue(inputValue, type) { - let onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOnError; - return coerceInputValueImpl(inputValue, type, onError, undefined); -} -function defaultOnError(path, invalidValue, error) { - let errorPrefix = 'Invalid value ' + (0, _inspect.inspect)(invalidValue); - if (path.length > 0) { - errorPrefix += ` at "value${(0, _printPathArray.printPathArray)(path)}"`; +Object.defineProperty(exports, "introspectionTypes", ({ + enumerable: true, + get: function () { + return _index.introspectionTypes; } - error.message = errorPrefix + ': ' + error.message; - throw error; -} -function coerceInputValueImpl(inputValue, type, onError, path) { - if ((0, _definition.isNonNullType)(type)) { - if (inputValue != null) { - return coerceInputValueImpl(inputValue, type.ofType, onError, path); - } - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected non-nullable type "${(0, _inspect.inspect)(type)}" not to be null.`)); - return; +})); +Object.defineProperty(exports, "isAbstractType", ({ + enumerable: true, + get: function () { + return _index.isAbstractType; } - if (inputValue == null) { - // Explicitly return the value null. - return null; +})); +Object.defineProperty(exports, "isCompositeType", ({ + enumerable: true, + get: function () { + return _index.isCompositeType; } - if ((0, _definition.isListType)(type)) { - const itemType = type.ofType; - if ((0, _isIterableObject.isIterableObject)(inputValue)) { - return Array.from(inputValue, (itemValue, index) => { - const itemPath = (0, _Path.addPath)(path, index, undefined); - return coerceInputValueImpl(itemValue, itemType, onError, itemPath); - }); - } // Lists accept a non-list value as a list of one. - - return [coerceInputValueImpl(inputValue, itemType, onError, path)]; +})); +Object.defineProperty(exports, "isConstValueNode", ({ + enumerable: true, + get: function () { + return _index2.isConstValueNode; } - if ((0, _definition.isInputObjectType)(type)) { - if (!(0, _isObjectLike.isObjectLike)(inputValue)) { - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`)); - return; - } - const coercedValue = {}; - const fieldDefs = type.getFields(); - for (const field of Object.values(fieldDefs)) { - const fieldValue = inputValue[field.name]; - if (fieldValue === undefined) { - if (field.defaultValue !== undefined) { - coercedValue[field.name] = field.defaultValue; - } else if ((0, _definition.isNonNullType)(field.type)) { - const typeStr = (0, _inspect.inspect)(field.type); - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${field.name}" of required type "${typeStr}" was not provided.`)); - } - continue; - } - coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, (0, _Path.addPath)(path, field.name, type.name)); - } // Ensure every provided field is defined. - - for (const fieldName of Object.keys(inputValue)) { - if (!fieldDefs[fieldName]) { - const suggestions = (0, _suggestionList.suggestionList)(fieldName, Object.keys(type.getFields())); - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${fieldName}" is not defined by type "${type.name}".` + (0, _didYouMean.didYouMean)(suggestions))); - } - } - return coercedValue; +})); +Object.defineProperty(exports, "isDefinitionNode", ({ + enumerable: true, + get: function () { + return _index2.isDefinitionNode; } - if ((0, _definition.isLeafType)(type)) { - let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(), - // which can throw to indicate failure. If it throws, maintain a reference - // to the original error. - - try { - parseResult = type.parseValue(inputValue); - } catch (error) { - if (error instanceof _GraphQLError.GraphQLError) { - onError((0, _Path.pathToArray)(path), inputValue, error); - } else { - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}". ` + error.message, { - originalError: error - })); - } - return; - } - if (parseResult === undefined) { - onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}".`)); - } - return parseResult; +})); +Object.defineProperty(exports, "isDirective", ({ + enumerable: true, + get: function () { + return _index.isDirective; } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered. - - false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/concatAST.mjs": -/*!*************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/concatAST.mjs ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.concatAST = concatAST; -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -/** - * Provided a collection of ASTs, presumably each from different files, - * concatenate the ASTs together into batched AST, useful for validating many - * GraphQL source files which together represent one conceptual application. - */ - -function concatAST(documents) { - const definitions = []; - for (const doc of documents) { - definitions.push(...doc.definitions); +Object.defineProperty(exports, "isEnumType", ({ + enumerable: true, + get: function () { + return _index.isEnumType; } - return { - kind: _kinds.Kind.DOCUMENT, - definitions - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/utilities/extendSchema.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/extendSchema.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.extendSchema = extendSchema; -exports.extendSchemaImpl = extendSchemaImpl; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _predicates = __webpack_require__(/*! ../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); -var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); -var _values = __webpack_require__(/*! ../execution/values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); -var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); -/** - * Produces a new schema given an existing schema and a document which may - * contain GraphQL type extensions and definitions. The original schema will - * remain unaltered. - * - * Because a schema represents a graph of references, a schema cannot be - * extended without effectively making an entire copy. We do not know until it's - * too late if subgraphs remain unchanged. - * - * This algorithm copies the provided schema, applying extensions while - * producing the copy. The original schema remains unaltered. - */ -function extendSchema(schema, documentAST, options) { - (0, _schema.assertSchema)(schema); - documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.'); - if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { - (0, _validate.assertValidSDLExtension)(documentAST, schema); +Object.defineProperty(exports, "isEqualType", ({ + enumerable: true, + get: function () { + return _index6.isEqualType; } - const schemaConfig = schema.toConfig(); - const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options); - return schemaConfig === extendedConfig ? schema : new _schema.GraphQLSchema(extendedConfig); -} -/** - * @internal - */ - -function extendSchemaImpl(schemaConfig, documentAST, options) { - var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; - - // Collect the type definitions and extensions found in the document. - const typeDefs = []; - const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can - // have the same name. For example, a type named "skip". - - const directiveDefs = []; - let schemaDef; // Schema extensions are collected which may add additional operation types. - - const schemaExtensions = []; - for (const def of documentAST.definitions) { - if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) { - schemaDef = def; - } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) { - schemaExtensions.push(def); - } else if ((0, _predicates.isTypeDefinitionNode)(def)) { - typeDefs.push(def); - } else if ((0, _predicates.isTypeExtensionNode)(def)) { - const extendedTypeName = def.name.value; - const existingTypeExtensions = typeExtensionsMap[extendedTypeName]; - typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; - } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { - directiveDefs.push(def); - } - } // If this document contains no new types, extensions, or directives then - // return the same unmodified GraphQLSchema instance. - - if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) { - return schemaConfig; +})); +Object.defineProperty(exports, "isExecutableDefinitionNode", ({ + enumerable: true, + get: function () { + return _index2.isExecutableDefinitionNode; } - const typeMap = Object.create(null); - for (const existingType of schemaConfig.types) { - typeMap[existingType.name] = extendNamedType(existingType); +})); +Object.defineProperty(exports, "isInputObjectType", ({ + enumerable: true, + get: function () { + return _index.isInputObjectType; } - for (const typeNode of typeDefs) { - var _stdTypeMap$name; - const name = typeNode.name.value; - typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); +})); +Object.defineProperty(exports, "isInputType", ({ + enumerable: true, + get: function () { + return _index.isInputType; } - const operationTypes = { - // Get the extended root operation types. - query: schemaConfig.query && replaceNamedType(schemaConfig.query), - mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), - subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription), - // Then, incorporate schema definition and all schema extensions. - ...(schemaDef && getOperationTypes([schemaDef])), - ...getOperationTypes(schemaExtensions) - }; // Then produce and return a Schema config with these types. - - return { - description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value, - ...operationTypes, - types: Object.values(typeMap), - directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)], - extensions: Object.create(null), - astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, - extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), - assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false - }; // Below are functions used for producing this schema that have closed over - // this scope and have access to the schema, cache, and newly defined types. - - function replaceType(type) { - if ((0, _definition.isListType)(type)) { - // @ts-expect-error - return new _definition.GraphQLList(replaceType(type.ofType)); - } - if ((0, _definition.isNonNullType)(type)) { - // @ts-expect-error - return new _definition.GraphQLNonNull(replaceType(type.ofType)); - } // @ts-expect-error FIXME - - return replaceNamedType(type); +})); +Object.defineProperty(exports, "isInterfaceType", ({ + enumerable: true, + get: function () { + return _index.isInterfaceType; } - function replaceNamedType(type) { - // Note: While this could make early assertions to get the correctly - // typed values, that would throw immediately while type system - // validation with validateSchema() will produce more actionable results. - return typeMap[type.name]; +})); +Object.defineProperty(exports, "isIntrospectionType", ({ + enumerable: true, + get: function () { + return _index.isIntrospectionType; } - function replaceDirective(directive) { - const config = directive.toConfig(); - return new _directives.GraphQLDirective({ - ...config, - args: (0, _mapValue.mapValue)(config.args, extendArg) - }); +})); +Object.defineProperty(exports, "isLeafType", ({ + enumerable: true, + get: function () { + return _index.isLeafType; } - function extendNamedType(type) { - if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) { - // Builtin types are not extended. - return type; - } - if ((0, _definition.isScalarType)(type)) { - return extendScalarType(type); - } - if ((0, _definition.isObjectType)(type)) { - return extendObjectType(type); - } - if ((0, _definition.isInterfaceType)(type)) { - return extendInterfaceType(type); - } - if ((0, _definition.isUnionType)(type)) { - return extendUnionType(type); - } - if ((0, _definition.isEnumType)(type)) { - return extendEnumType(type); - } - if ((0, _definition.isInputObjectType)(type)) { - return extendInputObjectType(type); - } - /* c8 ignore next 3 */ - // Not reachable, all possible type definition nodes have been considered. - - false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); +})); +Object.defineProperty(exports, "isListType", ({ + enumerable: true, + get: function () { + return _index.isListType; } - function extendInputObjectType(type) { - var _typeExtensionsMap$co; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; - return new _definition.GraphQLInputObjectType({ - ...config, - fields: () => ({ - ...(0, _mapValue.mapValue)(config.fields, field => ({ - ...field, - type: replaceType(field.type) - })), - ...buildInputFieldMap(extensions) - }), - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isNamedType", ({ + enumerable: true, + get: function () { + return _index.isNamedType; } - function extendEnumType(type) { - var _typeExtensionsMap$ty; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; - return new _definition.GraphQLEnumType({ - ...config, - values: { - ...config.values, - ...buildEnumValueMap(extensions) - }, - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isNonNullType", ({ + enumerable: true, + get: function () { + return _index.isNonNullType; } - function extendScalarType(type) { - var _typeExtensionsMap$co2; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; - let specifiedByURL = config.specifiedByURL; - for (const extensionNode of extensions) { - var _getSpecifiedByURL; - specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL; - } - return new _definition.GraphQLScalarType({ - ...config, - specifiedByURL, - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isNullableType", ({ + enumerable: true, + get: function () { + return _index.isNullableType; } - function extendObjectType(type) { - var _typeExtensionsMap$co3; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; - return new _definition.GraphQLObjectType({ - ...config, - interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)], - fields: () => ({ - ...(0, _mapValue.mapValue)(config.fields, extendField), - ...buildFieldMap(extensions) - }), - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isObjectType", ({ + enumerable: true, + get: function () { + return _index.isObjectType; } - function extendInterfaceType(type) { - var _typeExtensionsMap$co4; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; - return new _definition.GraphQLInterfaceType({ - ...config, - interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)], - fields: () => ({ - ...(0, _mapValue.mapValue)(config.fields, extendField), - ...buildFieldMap(extensions) - }), - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isOutputType", ({ + enumerable: true, + get: function () { + return _index.isOutputType; } - function extendUnionType(type) { - var _typeExtensionsMap$co5; - const config = type.toConfig(); - const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; - return new _definition.GraphQLUnionType({ - ...config, - types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)], - extensionASTNodes: config.extensionASTNodes.concat(extensions) - }); +})); +Object.defineProperty(exports, "isRequiredArgument", ({ + enumerable: true, + get: function () { + return _index.isRequiredArgument; } - function extendField(field) { - return { - ...field, - type: replaceType(field.type), - args: field.args && (0, _mapValue.mapValue)(field.args, extendArg) - }; +})); +Object.defineProperty(exports, "isRequiredInputField", ({ + enumerable: true, + get: function () { + return _index.isRequiredInputField; } - function extendArg(arg) { - return { - ...arg, - type: replaceType(arg.type) - }; +})); +Object.defineProperty(exports, "isScalarType", ({ + enumerable: true, + get: function () { + return _index.isScalarType; } - function getOperationTypes(nodes) { - const opTypes = {}; - for (const node of nodes) { - var _node$operationTypes; - - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - const operationTypesNodes = /* c8 ignore next */ - (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; - for (const operationType of operationTypesNodes) { - // Note: While this could make early assertions to get the correctly - // typed values below, that would throw immediately while type system - // validation with validateSchema() will produce more actionable results. - // @ts-expect-error - opTypes[operationType.operation] = getNamedType(operationType.type); - } - } - return opTypes; +})); +Object.defineProperty(exports, "isSchema", ({ + enumerable: true, + get: function () { + return _index.isSchema; } - function getNamedType(node) { - var _stdTypeMap$name2; - const name = node.name.value; - const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name]; - if (type === undefined) { - throw new Error(`Unknown type: "${name}".`); - } - return type; +})); +Object.defineProperty(exports, "isSelectionNode", ({ + enumerable: true, + get: function () { + return _index2.isSelectionNode; } - function getWrappedType(node) { - if (node.kind === _kinds.Kind.LIST_TYPE) { - return new _definition.GraphQLList(getWrappedType(node.type)); - } - if (node.kind === _kinds.Kind.NON_NULL_TYPE) { - return new _definition.GraphQLNonNull(getWrappedType(node.type)); - } - return getNamedType(node); +})); +Object.defineProperty(exports, "isSpecifiedDirective", ({ + enumerable: true, + get: function () { + return _index.isSpecifiedDirective; } - function buildDirective(node) { - var _node$description; - return new _directives.GraphQLDirective({ - name: node.name.value, - description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value, - // @ts-expect-error - locations: node.locations.map(_ref => { - let { - value - } = _ref; - return value; - }), - isRepeatable: node.repeatable, - args: buildArgumentMap(node.arguments), - astNode: node - }); +})); +Object.defineProperty(exports, "isSpecifiedScalarType", ({ + enumerable: true, + get: function () { + return _index.isSpecifiedScalarType; } - function buildFieldMap(nodes) { - const fieldConfigMap = Object.create(null); - for (const node of nodes) { - var _node$fields; - - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - const nodeFields = /* c8 ignore next */ - (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; - for (const field of nodeFields) { - var _field$description; - fieldConfigMap[field.name.value] = { - // Note: While this could make assertions to get the correctly typed - // value, that would throw immediately while type system validation - // with validateSchema() will produce more actionable results. - type: getWrappedType(field.type), - description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value, - args: buildArgumentMap(field.arguments), - deprecationReason: getDeprecationReason(field), - astNode: field - }; - } - } - return fieldConfigMap; +})); +Object.defineProperty(exports, "isType", ({ + enumerable: true, + get: function () { + return _index.isType; } - function buildArgumentMap(args) { - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - const argsNodes = /* c8 ignore next */ - args !== null && args !== void 0 ? args : []; - const argConfigMap = Object.create(null); - for (const arg of argsNodes) { - var _arg$description; - - // Note: While this could make assertions to get the correctly typed - // value, that would throw immediately while type system validation - // with validateSchema() will produce more actionable results. - const type = getWrappedType(arg.type); - argConfigMap[arg.name.value] = { - type, - description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value, - defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type), - deprecationReason: getDeprecationReason(arg), - astNode: arg - }; - } - return argConfigMap; +})); +Object.defineProperty(exports, "isTypeDefinitionNode", ({ + enumerable: true, + get: function () { + return _index2.isTypeDefinitionNode; } - function buildInputFieldMap(nodes) { - const inputFieldMap = Object.create(null); - for (const node of nodes) { - var _node$fields2; - - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - const fieldsNodes = /* c8 ignore next */ - (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : []; - for (const field of fieldsNodes) { - var _field$description2; - - // Note: While this could make assertions to get the correctly typed - // value, that would throw immediately while type system validation - // with validateSchema() will produce more actionable results. - const type = getWrappedType(field.type); - inputFieldMap[field.name.value] = { - type, - description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value, - defaultValue: (0, _valueFromAST.valueFromAST)(field.defaultValue, type), - deprecationReason: getDeprecationReason(field), - astNode: field - }; - } - } - return inputFieldMap; +})); +Object.defineProperty(exports, "isTypeExtensionNode", ({ + enumerable: true, + get: function () { + return _index2.isTypeExtensionNode; } - function buildEnumValueMap(nodes) { - const enumValueMap = Object.create(null); - for (const node of nodes) { - var _node$values; - - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - const valuesNodes = /* c8 ignore next */ - (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; - for (const value of valuesNodes) { - var _value$description; - enumValueMap[value.name.value] = { - description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value, - deprecationReason: getDeprecationReason(value), - astNode: value - }; - } - } - return enumValueMap; +})); +Object.defineProperty(exports, "isTypeNode", ({ + enumerable: true, + get: function () { + return _index2.isTypeNode; } - function buildInterfaces(nodes) { - // Note: While this could make assertions to get the correctly typed - // values below, that would throw immediately while type system - // validation with validateSchema() will produce more actionable results. - // @ts-expect-error - return nodes.flatMap( - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - node => { - var _node$interfaces$map, _node$interfaces; - return (/* c8 ignore next */ - (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : [] - ); - }); +})); +Object.defineProperty(exports, "isTypeSubTypeOf", ({ + enumerable: true, + get: function () { + return _index6.isTypeSubTypeOf; } - function buildUnionTypes(nodes) { - // Note: While this could make assertions to get the correctly typed - // values below, that would throw immediately while type system - // validation with validateSchema() will produce more actionable results. - // @ts-expect-error - return nodes.flatMap( - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - node => { - var _node$types$map, _node$types; - return (/* c8 ignore next */ - (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType)) !== null && _node$types$map !== void 0 ? _node$types$map : [] - ); - }); +})); +Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ + enumerable: true, + get: function () { + return _index2.isTypeSystemDefinitionNode; } - function buildType(astNode) { - var _typeExtensionsMap$na; - const name = astNode.name.value; - const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; - switch (astNode.kind) { - case _kinds.Kind.OBJECT_TYPE_DEFINITION: - { - var _astNode$description; - const allNodes = [astNode, ...extensionASTNodes]; - return new _definition.GraphQLObjectType({ - name, - description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value, - interfaces: () => buildInterfaces(allNodes), - fields: () => buildFieldMap(allNodes), - astNode, - extensionASTNodes - }); - } - case _kinds.Kind.INTERFACE_TYPE_DEFINITION: - { - var _astNode$description2; - const allNodes = [astNode, ...extensionASTNodes]; - return new _definition.GraphQLInterfaceType({ - name, - description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value, - interfaces: () => buildInterfaces(allNodes), - fields: () => buildFieldMap(allNodes), - astNode, - extensionASTNodes - }); - } - case _kinds.Kind.ENUM_TYPE_DEFINITION: - { - var _astNode$description3; - const allNodes = [astNode, ...extensionASTNodes]; - return new _definition.GraphQLEnumType({ - name, - description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value, - values: buildEnumValueMap(allNodes), - astNode, - extensionASTNodes - }); - } - case _kinds.Kind.UNION_TYPE_DEFINITION: - { - var _astNode$description4; - const allNodes = [astNode, ...extensionASTNodes]; - return new _definition.GraphQLUnionType({ - name, - description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value, - types: () => buildUnionTypes(allNodes), - astNode, - extensionASTNodes - }); - } - case _kinds.Kind.SCALAR_TYPE_DEFINITION: - { - var _astNode$description5; - return new _definition.GraphQLScalarType({ - name, - description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value, - specifiedByURL: getSpecifiedByURL(astNode), - astNode, - extensionASTNodes - }); - } - case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: - { - var _astNode$description6; - const allNodes = [astNode, ...extensionASTNodes]; - return new _definition.GraphQLInputObjectType({ - name, - description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value, - fields: () => buildInputFieldMap(allNodes), - astNode, - extensionASTNodes - }); - } - } +})); +Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ + enumerable: true, + get: function () { + return _index2.isTypeSystemExtensionNode; + } +})); +Object.defineProperty(exports, "isUnionType", ({ + enumerable: true, + get: function () { + return _index.isUnionType; + } +})); +Object.defineProperty(exports, "isValidNameError", ({ + enumerable: true, + get: function () { + return _index6.isValidNameError; + } +})); +Object.defineProperty(exports, "isValueNode", ({ + enumerable: true, + get: function () { + return _index2.isValueNode; + } +})); +Object.defineProperty(exports, "isWrappingType", ({ + enumerable: true, + get: function () { + return _index.isWrappingType; + } +})); +Object.defineProperty(exports, "lexicographicSortSchema", ({ + enumerable: true, + get: function () { + return _index6.lexicographicSortSchema; + } +})); +Object.defineProperty(exports, "locatedError", ({ + enumerable: true, + get: function () { + return _index5.locatedError; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _index2.parse; + } +})); +Object.defineProperty(exports, "parseConstValue", ({ + enumerable: true, + get: function () { + return _index2.parseConstValue; + } +})); +Object.defineProperty(exports, "parseType", ({ + enumerable: true, + get: function () { + return _index2.parseType; + } +})); +Object.defineProperty(exports, "parseValue", ({ + enumerable: true, + get: function () { + return _index2.parseValue; + } +})); +Object.defineProperty(exports, "print", ({ + enumerable: true, + get: function () { + return _index2.print; + } +})); +Object.defineProperty(exports, "printError", ({ + enumerable: true, + get: function () { + return _index5.printError; + } +})); +Object.defineProperty(exports, "printIntrospectionSchema", ({ + enumerable: true, + get: function () { + return _index6.printIntrospectionSchema; + } +})); +Object.defineProperty(exports, "printLocation", ({ + enumerable: true, + get: function () { + return _index2.printLocation; + } +})); +Object.defineProperty(exports, "printSchema", ({ + enumerable: true, + get: function () { + return _index6.printSchema; + } +})); +Object.defineProperty(exports, "printSourceLocation", ({ + enumerable: true, + get: function () { + return _index2.printSourceLocation; + } +})); +Object.defineProperty(exports, "printType", ({ + enumerable: true, + get: function () { + return _index6.printType; + } +})); +Object.defineProperty(exports, "recommendedRules", ({ + enumerable: true, + get: function () { + return _index4.recommendedRules; + } +})); +Object.defineProperty(exports, "resolveObjMapThunk", ({ + enumerable: true, + get: function () { + return _index.resolveObjMapThunk; + } +})); +Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({ + enumerable: true, + get: function () { + return _index.resolveReadonlyArrayThunk; + } +})); +Object.defineProperty(exports, "responsePathAsArray", ({ + enumerable: true, + get: function () { + return _index3.responsePathAsArray; + } +})); +Object.defineProperty(exports, "separateOperations", ({ + enumerable: true, + get: function () { + return _index6.separateOperations; + } +})); +Object.defineProperty(exports, "specifiedDirectives", ({ + enumerable: true, + get: function () { + return _index.specifiedDirectives; + } +})); +Object.defineProperty(exports, "specifiedRules", ({ + enumerable: true, + get: function () { + return _index4.specifiedRules; + } +})); +Object.defineProperty(exports, "specifiedScalarTypes", ({ + enumerable: true, + get: function () { + return _index.specifiedScalarTypes; + } +})); +Object.defineProperty(exports, "stripIgnoredCharacters", ({ + enumerable: true, + get: function () { + return _index6.stripIgnoredCharacters; + } +})); +Object.defineProperty(exports, "subscribe", ({ + enumerable: true, + get: function () { + return _index3.subscribe; + } +})); +Object.defineProperty(exports, "syntaxError", ({ + enumerable: true, + get: function () { + return _index5.syntaxError; + } +})); +Object.defineProperty(exports, "typeFromAST", ({ + enumerable: true, + get: function () { + return _index6.typeFromAST; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _index4.validate; + } +})); +Object.defineProperty(exports, "validateSchema", ({ + enumerable: true, + get: function () { + return _index.validateSchema; + } +})); +Object.defineProperty(exports, "valueFromAST", ({ + enumerable: true, + get: function () { + return _index6.valueFromAST; + } +})); +Object.defineProperty(exports, "valueFromASTUntyped", ({ + enumerable: true, + get: function () { + return _index6.valueFromASTUntyped; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.version; + } +})); +Object.defineProperty(exports, "versionInfo", ({ + enumerable: true, + get: function () { + return _version.versionInfo; + } +})); +Object.defineProperty(exports, "visit", ({ + enumerable: true, + get: function () { + return _index2.visit; + } +})); +Object.defineProperty(exports, "visitInParallel", ({ + enumerable: true, + get: function () { + return _index2.visitInParallel; + } +})); +Object.defineProperty(exports, "visitWithTypeInfo", ({ + enumerable: true, + get: function () { + return _index6.visitWithTypeInfo; } +})); +var _version = __webpack_require__(/*! ./version.mjs */ "../../../node_modules/graphql/version.mjs"); +var _graphql = __webpack_require__(/*! ./graphql.mjs */ "../../../node_modules/graphql/graphql.mjs"); +var _index = __webpack_require__(/*! ./type/index.mjs */ "../../../node_modules/graphql/type/index.mjs"); +var _index2 = __webpack_require__(/*! ./language/index.mjs */ "../../../node_modules/graphql/language/index.mjs"); +var _index3 = __webpack_require__(/*! ./execution/index.mjs */ "../../../node_modules/graphql/execution/index.mjs"); +var _index4 = __webpack_require__(/*! ./validation/index.mjs */ "../../../node_modules/graphql/validation/index.mjs"); +var _index5 = __webpack_require__(/*! ./error/index.mjs */ "../../../node_modules/graphql/error/index.mjs"); +var _index6 = __webpack_require__(/*! ./utilities/index.mjs */ "../../../node_modules/graphql/utilities/index.mjs"); + +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/Path.mjs": +/*!******************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/Path.mjs ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.addPath = addPath; +exports.pathToArray = pathToArray; +/** + * Given a Path and a key, return a new Path containing the new key. + */ +function addPath(prev, key, typename) { + return { + prev, + key, + typename + }; } -const stdTypeMap = (0, _keyMap.keyMap)([..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes], type => type.name); /** - * Given a field or enum value node, returns the string value for the - * deprecation reason. + * Given a Path, return an Array of the path keys. */ -function getDeprecationReason(node) { - const deprecated = (0, _values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues` +function pathToArray(path) { + const flattened = []; + let curr = path; + while (curr) { + flattened.push(curr.key); + curr = curr.prev; + } + return flattened.reverse(); +} - return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/devAssert.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/devAssert.mjs ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.devAssert = devAssert; +function devAssert(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message); + } } + +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/didYouMean.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/didYouMean.mjs ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.didYouMean = didYouMean; +const MAX_SUGGESTIONS = 5; /** - * Given a scalar node, returns the string value for the specifiedByURL. + * Given [ A, B, C ] return ' Did you mean A, B, or C?'. */ -function getSpecifiedByURL(node) { - const specifiedBy = (0, _values.getDirectiveValues)(_directives.GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues` - - return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; +function didYouMean(firstArg, secondArg) { + const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [undefined, firstArg]; + let message = ' Did you mean '; + if (subMessage) { + message += subMessage + ' '; + } + const suggestions = suggestionsArg.map(x => `"${x}"`); + switch (suggestions.length) { + case 0: + return ''; + case 1: + return message + suggestions[0] + '?'; + case 2: + return message + suggestions[0] + ' or ' + suggestions[1] + '?'; + } + const selected = suggestions.slice(0, MAX_SUGGESTIONS); + const lastItem = selected.pop(); + return message + selected.join(', ') + ', or ' + lastItem + '?'; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs": -/*!***********************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/findBreakingChanges.mjs ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/groupBy.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/groupBy.mjs ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DangerousChangeType = exports.BreakingChangeType = void 0; -exports.findBreakingChanges = findBreakingChanges; -exports.findDangerousChanges = findDangerousChanges; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); -var _sortValueNode = __webpack_require__(/*! ./sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs"); -var BreakingChangeType; -exports.BreakingChangeType = BreakingChangeType; -(function (BreakingChangeType) { - BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED'; - BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND'; - BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION'; - BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM'; - BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] = 'REQUIRED_INPUT_FIELD_ADDED'; - BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] = 'IMPLEMENTED_INTERFACE_REMOVED'; - BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED'; - BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND'; - BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED'; - BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED'; - BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND'; - BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED'; - BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED'; - BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] = 'REQUIRED_DIRECTIVE_ARG_ADDED'; - BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] = 'DIRECTIVE_REPEATABLE_REMOVED'; - BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] = 'DIRECTIVE_LOCATION_REMOVED'; -})(BreakingChangeType || (exports.BreakingChangeType = BreakingChangeType = {})); -var DangerousChangeType; -exports.DangerousChangeType = DangerousChangeType; -(function (DangerousChangeType) { - DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM'; - DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION'; - DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] = 'OPTIONAL_INPUT_FIELD_ADDED'; - DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED'; - DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] = 'IMPLEMENTED_INTERFACE_ADDED'; - DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE'; -})(DangerousChangeType || (exports.DangerousChangeType = DangerousChangeType = {})); +exports.groupBy = groupBy; /** - * Given two schemas, returns an Array containing descriptions of all the types - * of breaking changes covered by the other functions down below. + * Groups array items into a Map, given a function to produce grouping key. */ -function findBreakingChanges(oldSchema, newSchema) { - // @ts-expect-error - return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in BreakingChangeType); +function groupBy(list, keyFn) { + const result = new Map(); + for (const item of list) { + const key = keyFn(item); + const group = result.get(key); + if (group === undefined) { + result.set(key, [item]); + } else { + group.push(item); + } + } + return result; } + +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/identityFunc.mjs": +/*!**************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/identityFunc.mjs ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.identityFunc = identityFunc; /** - * Given two schemas, returns an Array containing descriptions of all the types - * of potentially dangerous changes covered by the other functions down below. + * Returns the first argument it receives. */ - -function findDangerousChanges(oldSchema, newSchema) { - // @ts-expect-error - return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in DangerousChangeType); -} -function findSchemaChanges(oldSchema, newSchema) { - return [...findTypeChanges(oldSchema, newSchema), ...findDirectiveChanges(oldSchema, newSchema)]; +function identityFunc(x) { + return x; } -function findDirectiveChanges(oldSchema, newSchema) { - const schemaChanges = []; - const directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives()); - for (const oldDirective of directivesDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.DIRECTIVE_REMOVED, - description: `${oldDirective.name} was removed.` - }); - } - for (const [oldDirective, newDirective] of directivesDiff.persisted) { - const argsDiff = diff(oldDirective.args, newDirective.args); - for (const newArg of argsDiff.added) { - if ((0, _definition.isRequiredArgument)(newArg)) { - schemaChanges.push({ - type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED, - description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.` - }); - } - } - for (const oldArg of argsDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.DIRECTIVE_ARG_REMOVED, - description: `${oldArg.name} was removed from ${oldDirective.name}.` - }); - } - if (oldDirective.isRepeatable && !newDirective.isRepeatable) { - schemaChanges.push({ - type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED, - description: `Repeatable flag was removed from ${oldDirective.name}.` - }); - } - for (const location of oldDirective.locations) { - if (!newDirective.locations.includes(location)) { - schemaChanges.push({ - type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED, - description: `${location} was removed from ${oldDirective.name}.` - }); - } - } - } - return schemaChanges; + +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/inspect.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/inspect.mjs ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.inspect = inspect; +const MAX_ARRAY_LENGTH = 10; +const MAX_RECURSIVE_DEPTH = 2; +/** + * Used to print values in error messages. + */ + +function inspect(value) { + return formatValue(value, []); } -function findTypeChanges(oldSchema, newSchema) { - const schemaChanges = []; - const typesDiff = diff(Object.values(oldSchema.getTypeMap()), Object.values(newSchema.getTypeMap())); - for (const oldType of typesDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.TYPE_REMOVED, - description: (0, _scalars.isSpecifiedScalarType)(oldType) ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.` : `${oldType.name} was removed.` - }); - } - for (const [oldType, newType] of typesDiff.persisted) { - if ((0, _definition.isEnumType)(oldType) && (0, _definition.isEnumType)(newType)) { - schemaChanges.push(...findEnumTypeChanges(oldType, newType)); - } else if ((0, _definition.isUnionType)(oldType) && (0, _definition.isUnionType)(newType)) { - schemaChanges.push(...findUnionTypeChanges(oldType, newType)); - } else if ((0, _definition.isInputObjectType)(oldType) && (0, _definition.isInputObjectType)(newType)) { - schemaChanges.push(...findInputObjectTypeChanges(oldType, newType)); - } else if ((0, _definition.isObjectType)(oldType) && (0, _definition.isObjectType)(newType)) { - schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType)); - } else if ((0, _definition.isInterfaceType)(oldType) && (0, _definition.isInterfaceType)(newType)) { - schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType)); - } else if (oldType.constructor !== newType.constructor) { - schemaChanges.push({ - type: BreakingChangeType.TYPE_CHANGED_KIND, - description: `${oldType.name} changed from ` + `${typeKindName(oldType)} to ${typeKindName(newType)}.` - }); - } +function formatValue(value, seenValues) { + switch (typeof value) { + case 'string': + return JSON.stringify(value); + case 'function': + return value.name ? `[function ${value.name}]` : '[function]'; + case 'object': + return formatObjectValue(value, seenValues); + default: + return String(value); } - return schemaChanges; } -function findInputObjectTypeChanges(oldType, newType) { - const schemaChanges = []; - const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields())); - for (const newField of fieldsDiff.added) { - if ((0, _definition.isRequiredInputField)(newField)) { - schemaChanges.push({ - type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED, - description: `A required field ${newField.name} on input type ${oldType.name} was added.` - }); - } else { - schemaChanges.push({ - type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED, - description: `An optional field ${newField.name} on input type ${oldType.name} was added.` - }); - } +function formatObjectValue(value, previouslySeenValues) { + if (value === null) { + return 'null'; } - for (const oldField of fieldsDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.FIELD_REMOVED, - description: `${oldType.name}.${oldField.name} was removed.` - }); + if (previouslySeenValues.includes(value)) { + return '[Circular]'; } - for (const [oldField, newField] of fieldsDiff.persisted) { - const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldField.type, newField.type); - if (!isSafe) { - schemaChanges.push({ - type: BreakingChangeType.FIELD_CHANGED_KIND, - description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.` - }); + const seenValues = [...previouslySeenValues, value]; + if (isJSONable(value)) { + const jsonValue = value.toJSON(); // check for infinite recursion + + if (jsonValue !== value) { + return typeof jsonValue === 'string' ? jsonValue : formatValue(jsonValue, seenValues); } + } else if (Array.isArray(value)) { + return formatArray(value, seenValues); } - return schemaChanges; + return formatObject(value, seenValues); } -function findUnionTypeChanges(oldType, newType) { - const schemaChanges = []; - const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes()); - for (const newPossibleType of possibleTypesDiff.added) { - schemaChanges.push({ - type: DangerousChangeType.TYPE_ADDED_TO_UNION, - description: `${newPossibleType.name} was added to union type ${oldType.name}.` - }); - } - for (const oldPossibleType of possibleTypesDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.TYPE_REMOVED_FROM_UNION, - description: `${oldPossibleType.name} was removed from union type ${oldType.name}.` - }); - } - return schemaChanges; +function isJSONable(value) { + return typeof value.toJSON === 'function'; } -function findEnumTypeChanges(oldType, newType) { - const schemaChanges = []; - const valuesDiff = diff(oldType.getValues(), newType.getValues()); - for (const newValue of valuesDiff.added) { - schemaChanges.push({ - type: DangerousChangeType.VALUE_ADDED_TO_ENUM, - description: `${newValue.name} was added to enum type ${oldType.name}.` - }); +function formatObject(object, seenValues) { + const entries = Object.entries(object); + if (entries.length === 0) { + return '{}'; } - for (const oldValue of valuesDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM, - description: `${oldValue.name} was removed from enum type ${oldType.name}.` - }); + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return '[' + getObjectTag(object) + ']'; } - return schemaChanges; + const properties = entries.map(([key, value]) => key + ': ' + formatValue(value, seenValues)); + return '{ ' + properties.join(', ') + ' }'; } -function findImplementedInterfacesChanges(oldType, newType) { - const schemaChanges = []; - const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces()); - for (const newInterface of interfacesDiff.added) { - schemaChanges.push({ - type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED, - description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.` - }); +function formatArray(array, seenValues) { + if (array.length === 0) { + return '[]'; } - for (const oldInterface of interfacesDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED, - description: `${oldType.name} no longer implements interface ${oldInterface.name}.` - }); + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return '[Array]'; } - return schemaChanges; -} -function findFieldChanges(oldType, newType) { - const schemaChanges = []; - const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields())); - for (const oldField of fieldsDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.FIELD_REMOVED, - description: `${oldType.name}.${oldField.name} was removed.` - }); + const len = Math.min(MAX_ARRAY_LENGTH, array.length); + const remaining = array.length - len; + const items = []; + for (let i = 0; i < len; ++i) { + items.push(formatValue(array[i], seenValues)); } - for (const [oldField, newField] of fieldsDiff.persisted) { - schemaChanges.push(...findArgChanges(oldType, oldField, newField)); - const isSafe = isChangeSafeForObjectOrInterfaceField(oldField.type, newField.type); - if (!isSafe) { - schemaChanges.push({ - type: BreakingChangeType.FIELD_CHANGED_KIND, - description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.` - }); - } + if (remaining === 1) { + items.push('... 1 more item'); + } else if (remaining > 1) { + items.push(`... ${remaining} more items`); } - return schemaChanges; + return '[' + items.join(', ') + ']'; } -function findArgChanges(oldType, oldField, newField) { - const schemaChanges = []; - const argsDiff = diff(oldField.args, newField.args); - for (const oldArg of argsDiff.removed) { - schemaChanges.push({ - type: BreakingChangeType.ARG_REMOVED, - description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.` - }); - } - for (const [oldArg, newArg] of argsDiff.persisted) { - const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArg.type, newArg.type); - if (!isSafe) { - schemaChanges.push({ - type: BreakingChangeType.ARG_CHANGED_KIND, - description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` + `${String(oldArg.type)} to ${String(newArg.type)}.` - }); - } else if (oldArg.defaultValue !== undefined) { - if (newArg.defaultValue === undefined) { - schemaChanges.push({ - type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, - description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.` - }); - } else { - // Since we looking only for client's observable changes we should - // compare default values in the same representation as they are - // represented inside introspection. - const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type); - const newValueStr = stringifyValue(newArg.defaultValue, newArg.type); - if (oldValueStr !== newValueStr) { - schemaChanges.push({ - type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, - description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.` - }); - } - } - } - } - for (const newArg of argsDiff.added) { - if ((0, _definition.isRequiredArgument)(newArg)) { - schemaChanges.push({ - type: BreakingChangeType.REQUIRED_ARG_ADDED, - description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.` - }); - } else { - schemaChanges.push({ - type: DangerousChangeType.OPTIONAL_ARG_ADDED, - description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.` - }); +function getObjectTag(object) { + const tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, ''); + if (tag === 'Object' && typeof object.constructor === 'function') { + const name = object.constructor.name; + if (typeof name === 'string' && name !== '') { + return name; } } - return schemaChanges; -} -function isChangeSafeForObjectOrInterfaceField(oldType, newType) { - if ((0, _definition.isListType)(oldType)) { - return ( - // if they're both lists, make sure the underlying types are compatible - (0, _definition.isListType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) || - // moving from nullable to non-null of the same underlying type is safe - (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) - ); - } - if ((0, _definition.isNonNullType)(oldType)) { - // if they're both non-null, make sure the underlying types are compatible - return (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType); - } - return ( - // if they're both named types, see if their names are equivalent - (0, _definition.isNamedType)(newType) && oldType.name === newType.name || - // moving from nullable to non-null of the same underlying type is safe - (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) - ); + return tag; } -function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) { - if ((0, _definition.isListType)(oldType)) { - // if they're both lists, make sure the underlying types are compatible - return (0, _definition.isListType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType); - } - if ((0, _definition.isNonNullType)(oldType)) { - return ( - // if they're both non-null, make sure the underlying types are - // compatible - (0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) || - // moving from non-null to nullable of the same underlying type is safe - !(0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType) - ); - } // if they're both named types, see if their names are equivalent - return (0, _definition.isNamedType)(newType) && oldType.name === newType.name; -} -function typeKindName(type) { - if ((0, _definition.isScalarType)(type)) { - return 'a Scalar type'; - } - if ((0, _definition.isObjectType)(type)) { - return 'an Object type'; - } - if ((0, _definition.isInterfaceType)(type)) { - return 'an Interface type'; - } - if ((0, _definition.isUnionType)(type)) { - return 'a Union type'; - } - if ((0, _definition.isEnumType)(type)) { - return 'an Enum type'; - } - if ((0, _definition.isInputObjectType)(type)) { - return 'an Input type'; +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/instanceOf.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/instanceOf.mjs ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.instanceOf = void 0; +var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +/* c8 ignore next 3 */ + +const isProduction = globalThis.process && +// eslint-disable-next-line no-undef +"development" === 'production'; +/** + * A replacement for instanceof which includes an error warning when multi-realm + * constructors are detected. + * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production + * See: https://webpack.js.org/guides/production/ + */ + +const instanceOf = exports.instanceOf = /* c8 ignore next 6 */ +// FIXME: https://github.com/graphql/graphql-js/issues/2317 +isProduction ? function instanceOf(value, constructor) { + return value instanceof constructor; +} : function instanceOf(value, constructor) { + if (value instanceof constructor) { + return true; } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered. + if (typeof value === 'object' && value !== null) { + var _value$constructor; - false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); -} -function stringifyValue(value, type) { - const ast = (0, _astFromValue.astFromValue)(value, type); - ast != null || (0, _invariant.invariant)(false); - return (0, _printer.print)((0, _sortValueNode.sortValueNode)(ast)); -} -function diff(oldArray, newArray) { - const added = []; - const removed = []; - const persisted = []; - const oldMap = (0, _keyMap.keyMap)(oldArray, _ref => { - let { - name - } = _ref; - return name; - }); - const newMap = (0, _keyMap.keyMap)(newArray, _ref2 => { - let { - name - } = _ref2; - return name; - }); - for (const oldItem of oldArray) { - const newItem = newMap[oldItem.name]; - if (newItem === undefined) { - removed.push(oldItem); - } else { - persisted.push([oldItem, newItem]); + // Prefer Symbol.toStringTag since it is immune to minification. + const className = constructor.prototype[Symbol.toStringTag]; + const valueClassName = + // We still need to support constructor's name to detect conflicts with older versions of this library. + Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009 + ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name; + if (className === valueClassName) { + const stringifiedValue = (0, _inspect.inspect)(value); + throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); } } - for (const newItem of newArray) { - if (oldMap[newItem.name] === undefined) { - added.push(newItem); - } + return false; +}; + +/***/ }), + +/***/ "../../../node_modules/graphql/jsutils/invariant.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/invariant.mjs ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.invariant = invariant; +function invariant(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message != null ? message : 'Unexpected invariant triggered.'); } - return { - added, - persisted, - removed - }; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs": -/*!*************************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs ***! - \*************************************************************************/ +/***/ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs": +/*!*****************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/isAsyncIterable.mjs ***! + \*****************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIntrospectionQuery = getIntrospectionQuery; +exports.isAsyncIterable = isAsyncIterable; /** - * Produce the GraphQL query recommended for a full schema introspection. - * Accepts optional IntrospectionOptions. + * Returns true if the provided object implements the AsyncIterator protocol via + * implementing a `Symbol.asyncIterator` method. */ -function getIntrospectionQuery(options) { - const optionsWithDefault = { - descriptions: true, - specifiedByUrl: false, - directiveIsRepeatable: false, - schemaDescription: false, - inputValueDeprecation: false, - ...options - }; - const descriptions = optionsWithDefault.descriptions ? 'description' : ''; - const specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByURL' : ''; - const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : ''; - const schemaDescription = optionsWithDefault.schemaDescription ? descriptions : ''; - function inputDeprecation(str) { - return optionsWithDefault.inputValueDeprecation ? str : ''; - } - return ` - query IntrospectionQuery { - __schema { - ${schemaDescription} - queryType { name } - mutationType { name } - subscriptionType { name } - types { - ...FullType - } - directives { - name - ${descriptions} - ${directiveIsRepeatable} - locations - args${inputDeprecation('(includeDeprecated: true)')} { - ...InputValue - } - } - } - } - - fragment FullType on __Type { - kind - name - ${descriptions} - ${specifiedByUrl} - fields(includeDeprecated: true) { - name - ${descriptions} - args${inputDeprecation('(includeDeprecated: true)')} { - ...InputValue - } - type { - ...TypeRef - } - isDeprecated - deprecationReason - } - inputFields${inputDeprecation('(includeDeprecated: true)')} { - ...InputValue - } - interfaces { - ...TypeRef - } - enumValues(includeDeprecated: true) { - name - ${descriptions} - isDeprecated - deprecationReason - } - possibleTypes { - ...TypeRef - } - } - - fragment InputValue on __InputValue { - name - ${descriptions} - type { ...TypeRef } - defaultValue - ${inputDeprecation('isDeprecated')} - ${inputDeprecation('deprecationReason')} - } - - fragment TypeRef on __Type { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - } - } - } - } - } - } - } - } - } - } - `; -} +function isAsyncIterable(maybeAsyncIterable) { + return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function'; +} /***/ }), -/***/ "../../../node_modules/graphql/utilities/getOperationAST.mjs": -/*!*******************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/getOperationAST.mjs ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/isIterableObject.mjs": +/*!******************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/isIterableObject.mjs ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOperationAST = getOperationAST; -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +exports.isIterableObject = isIterableObject; /** - * Returns an operation AST given a document AST and optionally an operation - * name. If a name is not provided, an operation is only returned if only one is - * provided in the document. + * Returns true if the provided object is an Object (i.e. not a string literal) + * and implements the Iterator protocol. + * + * This may be used in place of [Array.isArray()][isArray] to determine if + * an object should be iterated-over e.g. Array, Map, Set, Int8Array, + * TypedArray, etc. but excludes string literals. + * + * @example + * ```ts + * isIterableObject([ 1, 2, 3 ]) // true + * isIterableObject(new Map()) // true + * isIterableObject('ABC') // false + * isIterableObject({ key: 'value' }) // false + * isIterableObject({ length: 1, 0: 'Alpha' }) // false + * ``` */ - -function getOperationAST(documentAST, operationName) { - let operation = null; - for (const definition of documentAST.definitions) { - if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) { - var _definition$name; - if (operationName == null) { - // If no operation name was provided, only return an Operation if there - // is one defined in the document. Upon encountering the second, return - // null. - if (operation) { - return null; - } - operation = definition; - } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { - return definition; - } - } - } - return operation; +function isIterableObject(maybeIterable) { + return typeof maybeIterable === 'object' && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === 'function'; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/getOperationRootType.mjs": -/*!************************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/getOperationRootType.mjs ***! - \************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/isObjectLike.mjs": +/*!**************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/isObjectLike.mjs ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOperationRootType = getOperationRootType; -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.isObjectLike = isObjectLike; /** - * Extracts the root type of the operation from the schema. - * - * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17 + * Return true if `value` is object-like. A value is object-like if it's not + * `null` and has a `typeof` result of "object". */ -function getOperationRootType(schema, operation) { - if (operation.operation === 'query') { - const queryType = schema.getQueryType(); - if (!queryType) { - throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', { - nodes: operation - }); - } - return queryType; - } - if (operation.operation === 'mutation') { - const mutationType = schema.getMutationType(); - if (!mutationType) { - throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', { - nodes: operation - }); - } - return mutationType; - } - if (operation.operation === 'subscription') { - const subscriptionType = schema.getSubscriptionType(); - if (!subscriptionType) { - throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', { - nodes: operation - }); - } - return subscriptionType; - } - throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', { - nodes: operation - }); +function isObjectLike(value) { + return typeof value == 'object' && value !== null; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/index.mjs": -/*!*********************************************************!*\ - !*** ../../../node_modules/graphql/utilities/index.mjs ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/isPromise.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/isPromise.mjs ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -Object.defineProperty(exports, "BreakingChangeType", ({ - enumerable: true, - get: function () { - return _findBreakingChanges.BreakingChangeType; - } -})); -Object.defineProperty(exports, "DangerousChangeType", ({ - enumerable: true, - get: function () { - return _findBreakingChanges.DangerousChangeType; - } -})); -Object.defineProperty(exports, "TypeInfo", ({ - enumerable: true, - get: function () { - return _TypeInfo.TypeInfo; - } -})); -Object.defineProperty(exports, "assertValidName", ({ - enumerable: true, - get: function () { - return _assertValidName.assertValidName; - } -})); -Object.defineProperty(exports, "astFromValue", ({ - enumerable: true, - get: function () { - return _astFromValue.astFromValue; - } -})); -Object.defineProperty(exports, "buildASTSchema", ({ - enumerable: true, - get: function () { - return _buildASTSchema.buildASTSchema; - } -})); -Object.defineProperty(exports, "buildClientSchema", ({ - enumerable: true, - get: function () { - return _buildClientSchema.buildClientSchema; - } -})); -Object.defineProperty(exports, "buildSchema", ({ - enumerable: true, - get: function () { - return _buildASTSchema.buildSchema; - } -})); -Object.defineProperty(exports, "coerceInputValue", ({ - enumerable: true, - get: function () { - return _coerceInputValue.coerceInputValue; - } -})); -Object.defineProperty(exports, "concatAST", ({ - enumerable: true, - get: function () { - return _concatAST.concatAST; - } -})); -Object.defineProperty(exports, "doTypesOverlap", ({ - enumerable: true, - get: function () { - return _typeComparators.doTypesOverlap; - } -})); -Object.defineProperty(exports, "extendSchema", ({ - enumerable: true, - get: function () { - return _extendSchema.extendSchema; - } -})); -Object.defineProperty(exports, "findBreakingChanges", ({ - enumerable: true, - get: function () { - return _findBreakingChanges.findBreakingChanges; - } -})); -Object.defineProperty(exports, "findDangerousChanges", ({ - enumerable: true, - get: function () { - return _findBreakingChanges.findDangerousChanges; - } -})); -Object.defineProperty(exports, "getIntrospectionQuery", ({ - enumerable: true, - get: function () { - return _getIntrospectionQuery.getIntrospectionQuery; - } -})); -Object.defineProperty(exports, "getOperationAST", ({ - enumerable: true, - get: function () { - return _getOperationAST.getOperationAST; - } -})); -Object.defineProperty(exports, "getOperationRootType", ({ - enumerable: true, - get: function () { - return _getOperationRootType.getOperationRootType; - } -})); -Object.defineProperty(exports, "introspectionFromSchema", ({ - enumerable: true, - get: function () { - return _introspectionFromSchema.introspectionFromSchema; - } -})); -Object.defineProperty(exports, "isEqualType", ({ - enumerable: true, - get: function () { - return _typeComparators.isEqualType; - } -})); -Object.defineProperty(exports, "isTypeSubTypeOf", ({ - enumerable: true, - get: function () { - return _typeComparators.isTypeSubTypeOf; - } -})); -Object.defineProperty(exports, "isValidNameError", ({ - enumerable: true, - get: function () { - return _assertValidName.isValidNameError; - } -})); -Object.defineProperty(exports, "lexicographicSortSchema", ({ - enumerable: true, - get: function () { - return _lexicographicSortSchema.lexicographicSortSchema; - } -})); -Object.defineProperty(exports, "printIntrospectionSchema", ({ - enumerable: true, - get: function () { - return _printSchema.printIntrospectionSchema; - } -})); -Object.defineProperty(exports, "printSchema", ({ - enumerable: true, - get: function () { - return _printSchema.printSchema; - } -})); -Object.defineProperty(exports, "printType", ({ - enumerable: true, - get: function () { - return _printSchema.printType; - } -})); -Object.defineProperty(exports, "separateOperations", ({ - enumerable: true, - get: function () { - return _separateOperations.separateOperations; - } -})); -Object.defineProperty(exports, "stripIgnoredCharacters", ({ - enumerable: true, - get: function () { - return _stripIgnoredCharacters.stripIgnoredCharacters; - } -})); -Object.defineProperty(exports, "typeFromAST", ({ - enumerable: true, - get: function () { - return _typeFromAST.typeFromAST; - } -})); -Object.defineProperty(exports, "valueFromAST", ({ - enumerable: true, - get: function () { - return _valueFromAST.valueFromAST; - } -})); -Object.defineProperty(exports, "valueFromASTUntyped", ({ - enumerable: true, - get: function () { - return _valueFromASTUntyped.valueFromASTUntyped; - } -})); -Object.defineProperty(exports, "visitWithTypeInfo", ({ - enumerable: true, - get: function () { - return _TypeInfo.visitWithTypeInfo; - } -})); -var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs"); -var _getOperationAST = __webpack_require__(/*! ./getOperationAST.mjs */ "../../../node_modules/graphql/utilities/getOperationAST.mjs"); -var _getOperationRootType = __webpack_require__(/*! ./getOperationRootType.mjs */ "../../../node_modules/graphql/utilities/getOperationRootType.mjs"); -var _introspectionFromSchema = __webpack_require__(/*! ./introspectionFromSchema.mjs */ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs"); -var _buildClientSchema = __webpack_require__(/*! ./buildClientSchema.mjs */ "../../../node_modules/graphql/utilities/buildClientSchema.mjs"); -var _buildASTSchema = __webpack_require__(/*! ./buildASTSchema.mjs */ "../../../node_modules/graphql/utilities/buildASTSchema.mjs"); -var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs"); -var _lexicographicSortSchema = __webpack_require__(/*! ./lexicographicSortSchema.mjs */ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs"); -var _printSchema = __webpack_require__(/*! ./printSchema.mjs */ "../../../node_modules/graphql/utilities/printSchema.mjs"); -var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); -var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); -var _valueFromASTUntyped = __webpack_require__(/*! ./valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs"); -var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); -var _TypeInfo = __webpack_require__(/*! ./TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); -var _coerceInputValue = __webpack_require__(/*! ./coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs"); -var _concatAST = __webpack_require__(/*! ./concatAST.mjs */ "../../../node_modules/graphql/utilities/concatAST.mjs"); -var _separateOperations = __webpack_require__(/*! ./separateOperations.mjs */ "../../../node_modules/graphql/utilities/separateOperations.mjs"); -var _stripIgnoredCharacters = __webpack_require__(/*! ./stripIgnoredCharacters.mjs */ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs"); -var _typeComparators = __webpack_require__(/*! ./typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); -var _assertValidName = __webpack_require__(/*! ./assertValidName.mjs */ "../../../node_modules/graphql/utilities/assertValidName.mjs"); -var _findBreakingChanges = __webpack_require__(/*! ./findBreakingChanges.mjs */ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs"); +exports.isPromise = isPromise; +/** + * Returns true if the value acts like a Promise, i.e. has a "then" function, + * otherwise returns false. + */ +function isPromise(value) { + return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function'; +} /***/ }), -/***/ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs": -/*!***************************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/introspectionFromSchema.mjs ***! - \***************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/keyMap.mjs": +/*!********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/keyMap.mjs ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.introspectionFromSchema = introspectionFromSchema; -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); -var _execute = __webpack_require__(/*! ../execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs"); -var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs"); +exports.keyMap = keyMap; /** - * Build an IntrospectionQuery from a GraphQLSchema + * Creates a keyed JS object from an array, given a function to produce the keys + * for each value in the array. * - * IntrospectionQuery is useful for utilities that care about type and field - * relationships, but do not need to traverse through those relationships. + * This provides a convenient lookup for the array items if the key function + * produces unique results. + * ```ts + * const phoneBook = [ + * { name: 'Jon', num: '555-1234' }, + * { name: 'Jenny', num: '867-5309' } + * ] * - * This is the inverse of buildClientSchema. The primary use case is outside - * of the server context, for instance when doing schema comparisons. + * const entriesByName = keyMap( + * phoneBook, + * entry => entry.name + * ) + * + * // { + * // Jon: { name: 'Jon', num: '555-1234' }, + * // Jenny: { name: 'Jenny', num: '867-5309' } + * // } + * + * const jennyEntry = entriesByName['Jenny'] + * + * // { name: 'Jenny', num: '857-6309' } + * ``` */ - -function introspectionFromSchema(schema, options) { - const optionsWithDefaults = { - specifiedByUrl: true, - directiveIsRepeatable: true, - schemaDescription: true, - inputValueDeprecation: true, - ...options - }; - const document = (0, _parser.parse)((0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults)); - const result = (0, _execute.executeSync)({ - schema, - document - }); - !result.errors && result.data || (0, _invariant.invariant)(false); - return result.data; +function keyMap(list, keyFn) { + const result = Object.create(null); + for (const item of list) { + result[keyFn(item)] = item; + } + return result; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs": -/*!***************************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs ***! - \***************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/keyValMap.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/keyValMap.mjs ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.lexicographicSortSchema = lexicographicSortSchema; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); -var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); +exports.keyValMap = keyValMap; /** - * Sort GraphQLSchema. + * Creates a keyed JS object from an array, given a function to produce the keys + * and a function to produce the values from each item in the array. + * ```ts + * const phoneBook = [ + * { name: 'Jon', num: '555-1234' }, + * { name: 'Jenny', num: '867-5309' } + * ] * - * This function returns a sorted copy of the given GraphQLSchema. - */ - -function lexicographicSortSchema(schema) { - const schemaConfig = schema.toConfig(); - const typeMap = (0, _keyValMap.keyValMap)(sortByName(schemaConfig.types), type => type.name, sortNamedType); - return new _schema.GraphQLSchema({ - ...schemaConfig, - types: Object.values(typeMap), - directives: sortByName(schemaConfig.directives).map(sortDirective), - query: replaceMaybeType(schemaConfig.query), - mutation: replaceMaybeType(schemaConfig.mutation), - subscription: replaceMaybeType(schemaConfig.subscription) - }); - function replaceType(type) { - if ((0, _definition.isListType)(type)) { - // @ts-expect-error - return new _definition.GraphQLList(replaceType(type.ofType)); - } else if ((0, _definition.isNonNullType)(type)) { - // @ts-expect-error - return new _definition.GraphQLNonNull(replaceType(type.ofType)); - } // @ts-expect-error FIXME: TS Conversion - - return replaceNamedType(type); - } - function replaceNamedType(type) { - return typeMap[type.name]; - } - function replaceMaybeType(maybeType) { - return maybeType && replaceNamedType(maybeType); - } - function sortDirective(directive) { - const config = directive.toConfig(); - return new _directives.GraphQLDirective({ - ...config, - locations: sortBy(config.locations, x => x), - args: sortArgs(config.args) - }); - } - function sortArgs(args) { - return sortObjMap(args, arg => ({ - ...arg, - type: replaceType(arg.type) - })); - } - function sortFields(fieldsMap) { - return sortObjMap(fieldsMap, field => ({ - ...field, - type: replaceType(field.type), - args: field.args && sortArgs(field.args) - })); - } - function sortInputFields(fieldsMap) { - return sortObjMap(fieldsMap, field => ({ - ...field, - type: replaceType(field.type) - })); - } - function sortTypes(array) { - return sortByName(array).map(replaceNamedType); - } - function sortNamedType(type) { - if ((0, _definition.isScalarType)(type) || (0, _introspection.isIntrospectionType)(type)) { - return type; - } - if ((0, _definition.isObjectType)(type)) { - const config = type.toConfig(); - return new _definition.GraphQLObjectType({ - ...config, - interfaces: () => sortTypes(config.interfaces), - fields: () => sortFields(config.fields) - }); - } - if ((0, _definition.isInterfaceType)(type)) { - const config = type.toConfig(); - return new _definition.GraphQLInterfaceType({ - ...config, - interfaces: () => sortTypes(config.interfaces), - fields: () => sortFields(config.fields) - }); - } - if ((0, _definition.isUnionType)(type)) { - const config = type.toConfig(); - return new _definition.GraphQLUnionType({ - ...config, - types: () => sortTypes(config.types) - }); - } - if ((0, _definition.isEnumType)(type)) { - const config = type.toConfig(); - return new _definition.GraphQLEnumType({ - ...config, - values: sortObjMap(config.values, value => value) - }); - } - if ((0, _definition.isInputObjectType)(type)) { - const config = type.toConfig(); - return new _definition.GraphQLInputObjectType({ - ...config, - fields: () => sortInputFields(config.fields) - }); - } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered. - - false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); - } -} -function sortObjMap(map, sortValueFn) { - const sortedMap = Object.create(null); - for (const key of Object.keys(map).sort(_naturalCompare.naturalCompare)) { - sortedMap[key] = sortValueFn(map[key]); + * // { Jon: '555-1234', Jenny: '867-5309' } + * const phonesByName = keyValMap( + * phoneBook, + * entry => entry.name, + * entry => entry.num + * ) + * ``` + */ +function keyValMap(list, keyFn, valFn) { + const result = Object.create(null); + for (const item of list) { + result[keyFn(item)] = valFn(item); } - return sortedMap; -} -function sortByName(array) { - return sortBy(array, obj => obj.name); -} -function sortBy(array, mapToKey) { - return array.slice().sort((obj1, obj2) => { - const key1 = mapToKey(obj1); - const key2 = mapToKey(obj2); - return (0, _naturalCompare.naturalCompare)(key1, key2); - }); + return result; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/printSchema.mjs": -/*!***************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/printSchema.mjs ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/mapValue.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/mapValue.mjs ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.printIntrospectionSchema = printIntrospectionSchema; -exports.printSchema = printSchema; -exports.printType = printType; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); -var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); -function printSchema(schema) { - return printFilteredSchema(schema, n => !(0, _directives.isSpecifiedDirective)(n), isDefinedType); -} -function printIntrospectionSchema(schema) { - return printFilteredSchema(schema, _directives.isSpecifiedDirective, _introspection.isIntrospectionType); -} -function isDefinedType(type) { - return !(0, _scalars.isSpecifiedScalarType)(type) && !(0, _introspection.isIntrospectionType)(type); -} -function printFilteredSchema(schema, directiveFilter, typeFilter) { - const directives = schema.getDirectives().filter(directiveFilter); - const types = Object.values(schema.getTypeMap()).filter(typeFilter); - return [printSchemaDefinition(schema), ...directives.map(directive => printDirective(directive)), ...types.map(type => printType(type))].filter(Boolean).join('\n\n'); -} -function printSchemaDefinition(schema) { - if (schema.description == null && isSchemaOfCommonNames(schema)) { - return; - } - const operationTypes = []; - const queryType = schema.getQueryType(); - if (queryType) { - operationTypes.push(` query: ${queryType.name}`); - } - const mutationType = schema.getMutationType(); - if (mutationType) { - operationTypes.push(` mutation: ${mutationType.name}`); - } - const subscriptionType = schema.getSubscriptionType(); - if (subscriptionType) { - operationTypes.push(` subscription: ${subscriptionType.name}`); - } - return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`; -} +exports.mapValue = mapValue; /** - * GraphQL schema define root types for each type of operation. These types are - * the same as any other type and can be named in any manner, however there is - * a common naming convention: - * - * ```graphql - * schema { - * query: Query - * mutation: Mutation - * subscription: Subscription - * } - * ``` - * - * When using this naming convention, the schema description can be omitted. + * Creates an object map with the same keys as `map` and values generated by + * running each value of `map` thru `fn`. */ - -function isSchemaOfCommonNames(schema) { - const queryType = schema.getQueryType(); - if (queryType && queryType.name !== 'Query') { - return false; - } - const mutationType = schema.getMutationType(); - if (mutationType && mutationType.name !== 'Mutation') { - return false; - } - const subscriptionType = schema.getSubscriptionType(); - if (subscriptionType && subscriptionType.name !== 'Subscription') { - return false; - } - return true; -} -function printType(type) { - if ((0, _definition.isScalarType)(type)) { - return printScalar(type); - } - if ((0, _definition.isObjectType)(type)) { - return printObject(type); - } - if ((0, _definition.isInterfaceType)(type)) { - return printInterface(type); - } - if ((0, _definition.isUnionType)(type)) { - return printUnion(type); - } - if ((0, _definition.isEnumType)(type)) { - return printEnum(type); - } - if ((0, _definition.isInputObjectType)(type)) { - return printInputObject(type); - } - /* c8 ignore next 3 */ - // Not reachable, all possible types have been considered. - - false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); -} -function printScalar(type) { - return printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type); -} -function printImplementedInterfaces(type) { - const interfaces = type.getInterfaces(); - return interfaces.length ? ' implements ' + interfaces.map(i => i.name).join(' & ') : ''; -} -function printObject(type) { - return printDescription(type) + `type ${type.name}` + printImplementedInterfaces(type) + printFields(type); -} -function printInterface(type) { - return printDescription(type) + `interface ${type.name}` + printImplementedInterfaces(type) + printFields(type); -} -function printUnion(type) { - const types = type.getTypes(); - const possibleTypes = types.length ? ' = ' + types.join(' | ') : ''; - return printDescription(type) + 'union ' + type.name + possibleTypes; -} -function printEnum(type) { - const values = type.getValues().map((value, i) => printDescription(value, ' ', !i) + ' ' + value.name + printDeprecated(value.deprecationReason)); - return printDescription(type) + `enum ${type.name}` + printBlock(values); -} -function printInputObject(type) { - const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f)); - return printDescription(type) + `input ${type.name}` + printBlock(fields); -} -function printFields(type) { - const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, ' ', !i) + ' ' + f.name + printArgs(f.args, ' ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason)); - return printBlock(fields); -} -function printBlock(items) { - return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : ''; -} -function printArgs(args) { - let indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - if (args.length === 0) { - return ''; - } // If every arg does not have a description, print them on one line. - - if (args.every(arg => !arg.description)) { - return '(' + args.map(printInputValue).join(', ') + ')'; - } - return '(\n' + args.map((arg, i) => printDescription(arg, ' ' + indentation, !i) + ' ' + indentation + printInputValue(arg)).join('\n') + '\n' + indentation + ')'; -} -function printInputValue(arg) { - const defaultAST = (0, _astFromValue.astFromValue)(arg.defaultValue, arg.type); - let argDecl = arg.name + ': ' + String(arg.type); - if (defaultAST) { - argDecl += ` = ${(0, _printer.print)(defaultAST)}`; - } - return argDecl + printDeprecated(arg.deprecationReason); -} -function printDirective(directive) { - return printDescription(directive) + 'directive @' + directive.name + printArgs(directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | '); -} -function printDeprecated(reason) { - if (reason == null) { - return ''; - } - if (reason !== _directives.DEFAULT_DEPRECATION_REASON) { - const astValue = (0, _printer.print)({ - kind: _kinds.Kind.STRING, - value: reason - }); - return ` @deprecated(reason: ${astValue})`; - } - return ' @deprecated'; -} -function printSpecifiedByURL(scalar) { - if (scalar.specifiedByURL == null) { - return ''; - } - const astValue = (0, _printer.print)({ - kind: _kinds.Kind.STRING, - value: scalar.specifiedByURL - }); - return ` @specifiedBy(url: ${astValue})`; -} -function printDescription(def) { - let indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - let firstInBlock = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - const { - description - } = def; - if (description == null) { - return ''; +function mapValue(map, fn) { + const result = Object.create(null); + for (const key of Object.keys(map)) { + result[key] = fn(map[key], key); } - const blockString = (0, _printer.print)({ - kind: _kinds.Kind.STRING, - value: description, - block: (0, _blockString.isPrintableAsBlockString)(description) - }); - const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation; - return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n'; + return result; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/separateOperations.mjs": -/*!**********************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/separateOperations.mjs ***! - \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/memoize3.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/memoize3.mjs ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.separateOperations = separateOperations; -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +exports.memoize3 = memoize3; /** - * separateOperations accepts a single AST document which may contain many - * operations and fragments and returns a collection of AST documents each of - * which contains a single operation as well the fragment definitions it - * refers to. + * Memoizes the provided three-argument function. */ - -function separateOperations(documentAST) { - const operations = []; - const depGraph = Object.create(null); // Populate metadata and build a dependency graph. - - for (const definitionNode of documentAST.definitions) { - switch (definitionNode.kind) { - case _kinds.Kind.OPERATION_DEFINITION: - operations.push(definitionNode); - break; - case _kinds.Kind.FRAGMENT_DEFINITION: - depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet); - break; - default: // ignore non-executable definitions +function memoize3(fn) { + let cache0; + return function memoized(a1, a2, a3) { + if (cache0 === undefined) { + cache0 = new WeakMap(); } - } // For each operation, produce a new synthesized AST which includes only what - // is necessary for completing that operation. + let cache1 = cache0.get(a1); + if (cache1 === undefined) { + cache1 = new WeakMap(); + cache0.set(a1, cache1); + } + let cache2 = cache1.get(a2); + if (cache2 === undefined) { + cache2 = new WeakMap(); + cache1.set(a2, cache2); + } + let fnResult = cache2.get(a3); + if (fnResult === undefined) { + fnResult = fn(a1, a2, a3); + cache2.set(a3, fnResult); + } + return fnResult; + }; +} - const separatedDocumentASTs = Object.create(null); - for (const operation of operations) { - const dependencies = new Set(); - for (const fragmentName of collectDependencies(operation.selectionSet)) { - collectTransitiveDependencies(dependencies, depGraph, fragmentName); - } // Provides the empty string for anonymous operations. +/***/ }), - const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted - // to retain the same order as the original document. +/***/ "../../../node_modules/graphql/jsutils/naturalCompare.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/naturalCompare.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports) { - separatedDocumentASTs[operationName] = { - kind: _kinds.Kind.DOCUMENT, - definitions: documentAST.definitions.filter(node => node === operation || node.kind === _kinds.Kind.FRAGMENT_DEFINITION && dependencies.has(node.name.value)) - }; - } - return separatedDocumentASTs; -} +"use strict"; -// From a dependency graph, collects a list of transitive dependencies by -// recursing through a dependency graph. -function collectTransitiveDependencies(collected, depGraph, fromName) { - if (!collected.has(fromName)) { - collected.add(fromName); - const immediateDeps = depGraph[fromName]; - if (immediateDeps !== undefined) { - for (const toName of immediateDeps) { - collectTransitiveDependencies(collected, depGraph, toName); + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.naturalCompare = naturalCompare; +/** + * Returns a number indicating whether a reference string comes before, or after, + * or is the same as the given string in natural sort order. + * + * See: https://en.wikipedia.org/wiki/Natural_sort_order + * + */ +function naturalCompare(aStr, bStr) { + let aIndex = 0; + let bIndex = 0; + while (aIndex < aStr.length && bIndex < bStr.length) { + let aChar = aStr.charCodeAt(aIndex); + let bChar = bStr.charCodeAt(bIndex); + if (isDigit(aChar) && isDigit(bChar)) { + let aNum = 0; + do { + ++aIndex; + aNum = aNum * 10 + aChar - DIGIT_0; + aChar = aStr.charCodeAt(aIndex); + } while (isDigit(aChar) && aNum > 0); + let bNum = 0; + do { + ++bIndex; + bNum = bNum * 10 + bChar - DIGIT_0; + bChar = bStr.charCodeAt(bIndex); + } while (isDigit(bChar) && bNum > 0); + if (aNum < bNum) { + return -1; + } + if (aNum > bNum) { + return 1; + } + } else { + if (aChar < bChar) { + return -1; + } + if (aChar > bChar) { + return 1; } + ++aIndex; + ++bIndex; } } + return aStr.length - bStr.length; } -function collectDependencies(selectionSet) { - const dependencies = []; - (0, _visitor.visit)(selectionSet, { - FragmentSpread(node) { - dependencies.push(node.name.value); - } - }); - return dependencies; +const DIGIT_0 = 48; +const DIGIT_9 = 57; +function isDigit(code) { + return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/sortValueNode.mjs": -/*!*****************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/sortValueNode.mjs ***! - \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/printPathArray.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/printPathArray.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sortValueNode = sortValueNode; -var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +exports.printPathArray = printPathArray; /** - * Sort ValueNode. - * - * This function returns a sorted copy of the given ValueNode. - * - * @internal + * Build a string describing the path. */ - -function sortValueNode(valueNode) { - switch (valueNode.kind) { - case _kinds.Kind.OBJECT: - return { - ...valueNode, - fields: sortFields(valueNode.fields) - }; - case _kinds.Kind.LIST: - return { - ...valueNode, - values: valueNode.values.map(sortValueNode) - }; - case _kinds.Kind.INT: - case _kinds.Kind.FLOAT: - case _kinds.Kind.STRING: - case _kinds.Kind.BOOLEAN: - case _kinds.Kind.NULL: - case _kinds.Kind.ENUM: - case _kinds.Kind.VARIABLE: - return valueNode; - } -} -function sortFields(fields) { - return fields.map(fieldNode => ({ - ...fieldNode, - value: sortValueNode(fieldNode.value) - })).sort((fieldA, fieldB) => (0, _naturalCompare.naturalCompare)(fieldA.name.value, fieldB.name.value)); -} +function printPathArray(path) { + return path.map(key => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key).join(''); +} /***/ }), -/***/ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs": -/*!**************************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/promiseForObject.mjs": +/*!******************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/promiseForObject.mjs ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stripIgnoredCharacters = stripIgnoredCharacters; -var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); -var _lexer = __webpack_require__(/*! ../language/lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); -var _source = __webpack_require__(/*! ../language/source.mjs */ "../../../node_modules/graphql/language/source.mjs"); -var _tokenKind = __webpack_require__(/*! ../language/tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); +exports.promiseForObject = promiseForObject; /** - * Strips characters that are not significant to the validity or execution - * of a GraphQL document: - * - UnicodeBOM - * - WhiteSpace - * - LineTerminator - * - Comment - * - Comma - * - BlockString indentation - * - * Note: It is required to have a delimiter character between neighboring - * non-punctuator tokens and this function always uses single space as delimiter. - * - * It is guaranteed that both input and output documents if parsed would result - * in the exact same AST except for nodes location. - * - * Warning: It is guaranteed that this function will always produce stable results. - * However, it's not guaranteed that it will stay the same between different - * releases due to bugfixes or changes in the GraphQL specification. - * - * Query example: - * - * ```graphql - * query SomeQuery($foo: String!, $bar: String) { - * someField(foo: $foo, bar: $bar) { - * a - * b { - * c - * d - * } - * } - * } - * ``` - * - * Becomes: - * - * ```graphql - * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}} - * ``` - * - * SDL example: - * - * ```graphql - * """ - * Type description - * """ - * type Foo { - * """ - * Field description - * """ - * bar: String - * } - * ``` - * - * Becomes: + * This function transforms a JS object `ObjMap>` into + * a `Promise>` * - * ```graphql - * """Type description""" type Foo{"""Field description""" bar:String} - * ``` + * This is akin to bluebird's `Promise.props`, but implemented only using + * `Promise.all` so it will work with any implementation of ES6 promises. */ - -function stripIgnoredCharacters(source) { - const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); - const body = sourceObj.body; - const lexer = new _lexer.Lexer(sourceObj); - let strippedBody = ''; - let wasLastAddedTokenNonPunctuator = false; - while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) { - const currentToken = lexer.token; - const tokenKind = currentToken.kind; - /** - * Every two non-punctuator tokens should have space between them. - * Also prevent case of non-punctuator token following by spread resulting - * in invalid token (e.g. `1...` is invalid Float token). - */ - - const isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(currentToken.kind); - if (wasLastAddedTokenNonPunctuator) { - if (isNonPunctuator || currentToken.kind === _tokenKind.TokenKind.SPREAD) { - strippedBody += ' '; - } - } - const tokenBody = body.slice(currentToken.start, currentToken.end); - if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) { - strippedBody += (0, _blockString.printBlockString)(currentToken.value, { - minimize: true - }); - } else { - strippedBody += tokenBody; +function promiseForObject(object) { + return Promise.all(Object.values(object)).then(resolvedValues => { + const resolvedObject = Object.create(null); + for (const [i, key] of Object.keys(object).entries()) { + resolvedObject[key] = resolvedValues[i]; } - wasLastAddedTokenNonPunctuator = isNonPunctuator; - } - return strippedBody; + return resolvedObject; + }); } /***/ }), -/***/ "../../../node_modules/graphql/utilities/typeComparators.mjs": -/*!*******************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/typeComparators.mjs ***! - \*******************************************************************/ +/***/ "../../../node_modules/graphql/jsutils/promiseReduce.mjs": +/*!***************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/promiseReduce.mjs ***! + \***************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.doTypesOverlap = doTypesOverlap; -exports.isEqualType = isEqualType; -exports.isTypeSubTypeOf = isTypeSubTypeOf; -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +exports.promiseReduce = promiseReduce; +var _isPromise = __webpack_require__(/*! ./isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs"); /** - * Provided two types, return true if the types are equal (invariant). + * Similar to Array.prototype.reduce(), however the reducing callback may return + * a Promise, in which case reduction will continue after each promise resolves. + * + * If the callback does not return a Promise, then this function will also not + * return a Promise. */ -function isEqualType(typeA, typeB) { - // Equivalent types are equal. - if (typeA === typeB) { - return true; - } // If either type is non-null, the other must also be non-null. +function promiseReduce(values, callbackFn, initialValue) { + let accumulator = initialValue; + for (const value of values) { + accumulator = (0, _isPromise.isPromise)(accumulator) ? accumulator.then(resolved => callbackFn(resolved, value)) : callbackFn(accumulator, value); + } + return accumulator; +} - if ((0, _definition.isNonNullType)(typeA) && (0, _definition.isNonNullType)(typeB)) { - return isEqualType(typeA.ofType, typeB.ofType); - } // If either type is a list, the other must also be a list. +/***/ }), - if ((0, _definition.isListType)(typeA) && (0, _definition.isListType)(typeB)) { - return isEqualType(typeA.ofType, typeB.ofType); - } // Otherwise the types are not equal. +/***/ "../../../node_modules/graphql/jsutils/suggestionList.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/suggestionList.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - return false; -} -/** - * Provided a type and a super type, return true if the first type is either - * equal or a subset of the second super type (covariant). - */ +"use strict"; -function isTypeSubTypeOf(schema, maybeSubType, superType) { - // Equivalent type is a valid subtype - if (maybeSubType === superType) { - return true; - } // If superType is non-null, maybeSubType must also be non-null. - if ((0, _definition.isNonNullType)(superType)) { - if ((0, _definition.isNonNullType)(maybeSubType)) { - return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); - } - return false; - } - if ((0, _definition.isNonNullType)(maybeSubType)) { - // If superType is nullable, maybeSubType may be non-null or nullable. - return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); - } // If superType type is a list, maybeSubType type must also be a list. +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.suggestionList = suggestionList; +var _naturalCompare = __webpack_require__(/*! ./naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); +/** + * Given an invalid input string and a list of valid options, returns a filtered + * list of valid options sorted based on their similarity with the input. + */ - if ((0, _definition.isListType)(superType)) { - if ((0, _definition.isListType)(maybeSubType)) { - return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); +function suggestionList(input, options) { + const optionsByDistance = Object.create(null); + const lexicalDistance = new LexicalDistance(input); + const threshold = Math.floor(input.length * 0.4) + 1; + for (const option of options) { + const distance = lexicalDistance.measure(option, threshold); + if (distance !== undefined) { + optionsByDistance[option] = distance; } - return false; } - if ((0, _definition.isListType)(maybeSubType)) { - // If superType is not a list, maybeSubType must also be not a list. - return false; - } // If superType type is an abstract type, check if it is super type of maybeSubType. - // Otherwise, the child type is not a valid subtype of the parent type. - - return (0, _definition.isAbstractType)(superType) && ((0, _definition.isInterfaceType)(maybeSubType) || (0, _definition.isObjectType)(maybeSubType)) && schema.isSubType(superType, maybeSubType); + return Object.keys(optionsByDistance).sort((a, b) => { + const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b); + }); } /** - * Provided two composite types, determine if they "overlap". Two composite - * types overlap when the Sets of possible concrete types for each intersect. + * Computes the lexical distance between strings A and B. * - * This is often used to determine if a fragment of a given type could possibly - * be visited in a context of another type. + * The "distance" between two strings is given by counting the minimum number + * of edits needed to transform string A into string B. An edit can be an + * insertion, deletion, or substitution of a single character, or a swap of two + * adjacent characters. * - * This function is commutative. + * Includes a custom alteration from Damerau-Levenshtein to treat case changes + * as a single edit which helps identify mis-cased values with an edit distance + * of 1. + * + * This distance can be useful for detecting typos in input or sorting */ -function doTypesOverlap(schema, typeA, typeB) { - // Equivalent types overlap - if (typeA === typeB) { - return true; +class LexicalDistance { + constructor(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray(this._inputLowerCase); + this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)]; } - if ((0, _definition.isAbstractType)(typeA)) { - if ((0, _definition.isAbstractType)(typeB)) { - // If both types are abstract, then determine if there is any intersection - // between possible concrete types of each. - return schema.getPossibleTypes(typeA).some(type => schema.isSubType(typeB, type)); - } // Determine if the latter type is a possible concrete type of the former. + measure(option, threshold) { + if (this._input === option) { + return 0; + } + const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit - return schema.isSubType(typeA, typeB); - } - if ((0, _definition.isAbstractType)(typeB)) { - // Determine if the former type is a possible concrete type of the latter. - return schema.isSubType(typeB, typeA); - } // Otherwise the types do not overlap. + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + let a = stringToArray(optionLowerCase); + let b = this._inputArray; + if (a.length < b.length) { + const tmp = a; + a = b; + b = tmp; + } + const aLength = a.length; + const bLength = b.length; + if (aLength - bLength > threshold) { + return undefined; + } + const rows = this._rows; + for (let j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + for (let i = 1; i <= aLength; i++) { + const upRow = rows[(i - 1) % 3]; + const currentRow = rows[i % 3]; + let smallestCell = currentRow[0] = i; + for (let j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + let currentCell = Math.min(upRow[j] + 1, + // delete + currentRow[j - 1] + 1, + // insert + upRow[j - 1] + cost // substitute + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + // transposition + const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + currentRow[j] = currentCell; + } // Early exit, since distance can't go smaller than smallest element of the previous row. - return false; + if (smallestCell > threshold) { + return undefined; + } + } + const distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : undefined; + } +} +function stringToArray(str) { + const strLength = str.length; + const array = new Array(strLength); + for (let i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + return array; } /***/ }), -/***/ "../../../node_modules/graphql/utilities/typeFromAST.mjs": -/*!***************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/typeFromAST.mjs ***! - \***************************************************************/ +/***/ "../../../node_modules/graphql/jsutils/toError.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/toError.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.typeFromAST = typeFromAST; -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -function typeFromAST(schema, typeNode) { - switch (typeNode.kind) { - case _kinds.Kind.LIST_TYPE: - { - const innerType = typeFromAST(schema, typeNode.type); - return innerType && new _definition.GraphQLList(innerType); - } - case _kinds.Kind.NON_NULL_TYPE: - { - const innerType = typeFromAST(schema, typeNode.type); - return innerType && new _definition.GraphQLNonNull(innerType); - } - case _kinds.Kind.NAMED_TYPE: - return schema.getType(typeNode.name.value); +exports.toError = toError; +var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +/** + * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. + */ + +function toError(thrownValue) { + return thrownValue instanceof Error ? thrownValue : new NonErrorThrown(thrownValue); +} +class NonErrorThrown extends Error { + constructor(thrownValue) { + super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue)); + this.name = 'NonErrorThrown'; + this.thrownValue = thrownValue; } } /***/ }), -/***/ "../../../node_modules/graphql/utilities/valueFromAST.mjs": -/*!****************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/valueFromAST.mjs ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/jsutils/toObjMap.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/jsutils/toObjMap.mjs ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.valueFromAST = valueFromAST; -var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -/** - * Produces a JavaScript value given a GraphQL Value AST. - * - * A GraphQL type must be provided, which will be used to interpret different - * GraphQL Value literals. - * - * Returns `undefined` when the value could not be validly coerced according to - * the provided type. - * - * | GraphQL Value | JSON Value | - * | -------------------- | ------------- | - * | Input Object | Object | - * | List | Array | - * | Boolean | Boolean | - * | String | String | - * | Int / Float | Number | - * | Enum Value | Unknown | - * | NullValue | null | - * - */ - -function valueFromAST(valueNode, type, variables) { - if (!valueNode) { - // When there is no node, then there is also no value. - // Importantly, this is different from returning the value null. - return; - } - if (valueNode.kind === _kinds.Kind.VARIABLE) { - const variableName = valueNode.name.value; - if (variables == null || variables[variableName] === undefined) { - // No valid return value. - return; - } - const variableValue = variables[variableName]; - if (variableValue === null && (0, _definition.isNonNullType)(type)) { - return; // Invalid: intentionally return no value. - } // Note: This does no further checking that this variable is correct. - // This assumes that this query has been validated and the variable - // usage here is of the correct type. - - return variableValue; +exports.toObjMap = toObjMap; +function toObjMap(obj) { + if (obj == null) { + return Object.create(null); } - if ((0, _definition.isNonNullType)(type)) { - if (valueNode.kind === _kinds.Kind.NULL) { - return; // Invalid: intentionally return no value. - } - - return valueFromAST(valueNode, type.ofType, variables); + if (Object.getPrototypeOf(obj) === null) { + return obj; } - if (valueNode.kind === _kinds.Kind.NULL) { - // This is explicitly returning the value null. - return null; + const map = Object.create(null); + for (const [key, value] of Object.entries(obj)) { + map[key] = value; } - if ((0, _definition.isListType)(type)) { - const itemType = type.ofType; - if (valueNode.kind === _kinds.Kind.LIST) { - const coercedValues = []; - for (const itemNode of valueNode.values) { - if (isMissingVariable(itemNode, variables)) { - // If an array contains a missing variable, it is either coerced to - // null or if the item type is non-null, it considered invalid. - if ((0, _definition.isNonNullType)(itemType)) { - return; // Invalid: intentionally return no value. - } - - coercedValues.push(null); - } else { - const itemValue = valueFromAST(itemNode, itemType, variables); - if (itemValue === undefined) { - return; // Invalid: intentionally return no value. - } + return map; +} - coercedValues.push(itemValue); - } - } - return coercedValues; - } - const coercedValue = valueFromAST(valueNode, itemType, variables); - if (coercedValue === undefined) { - return; // Invalid: intentionally return no value. - } +/***/ }), - return [coercedValue]; - } - if ((0, _definition.isInputObjectType)(type)) { - if (valueNode.kind !== _kinds.Kind.OBJECT) { - return; // Invalid: intentionally return no value. - } +/***/ "../../../node_modules/graphql/language/ast.mjs": +/*!******************************************************!*\ + !*** ../../../node_modules/graphql/language/ast.mjs ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports) { - const coercedObj = Object.create(null); - const fieldNodes = (0, _keyMap.keyMap)(valueNode.fields, field => field.name.value); - for (const field of Object.values(type.getFields())) { - const fieldNode = fieldNodes[field.name]; - if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { - if (field.defaultValue !== undefined) { - coercedObj[field.name] = field.defaultValue; - } else if ((0, _definition.isNonNullType)(field.type)) { - return; // Invalid: intentionally return no value. - } +"use strict"; - continue; - } - const fieldValue = valueFromAST(fieldNode.value, field.type, variables); - if (fieldValue === undefined) { - return; // Invalid: intentionally return no value. - } - coercedObj[field.name] = fieldValue; - } - return coercedObj; - } - if ((0, _definition.isLeafType)(type)) { - // Scalars and Enums fulfill parsing a literal value via parseLiteral(). - // Invalid values represent a failure to parse correctly, in which case - // no value is returned. - let result; - try { - result = type.parseLiteral(valueNode, variables); - } catch (_error) { - return; // Invalid: intentionally return no value. - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0; +exports.isNode = isNode; +/** + * Contains a range of UTF-8 character offsets and token references that + * identify the region of the source from which the AST derived. + */ +class Location { + /** + * The character offset at which this Node begins. + */ - if (result === undefined) { - return; // Invalid: intentionally return no value. - } + /** + * The character offset at which this Node ends. + */ - return result; - } - /* c8 ignore next 3 */ - // Not reachable, all possible input types have been considered. + /** + * The Token at which this Node begins. + */ - false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); -} // Returns true if the provided valueNode is a variable which is not defined -// in the set of variables. + /** + * The Token at which this Node ends. + */ -function isMissingVariable(valueNode, variables) { - return valueNode.kind === _kinds.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined); + /** + * The Source document the AST represents. + */ + constructor(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + get [Symbol.toStringTag]() { + return 'Location'; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } } +/** + * Represents a range of characters represented by a lexical token + * within a Source. + */ +exports.Location = Location; +class Token { + /** + * The kind of Token. + */ -/***/ }), + /** + * The character offset at which this Node begins. + */ -/***/ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs": -/*!***********************************************************************!*\ - !*** ../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + /** + * The character offset at which this Node ends. + */ + /** + * The 1-indexed line number on which this Token appears. + */ + /** + * The 1-indexed column number at which this Token begins. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.valueFromASTUntyped = valueFromASTUntyped; -var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); + /** + * For non-punctuation tokens, represents the interpreted value of the token. + * + * Note: is undefined for punctuation tokens, but typed as string for + * convenience in the parser. + */ + + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + constructor(kind, start, end, line, column, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + + this.value = value; + this.prev = null; + this.next = null; + } + get [Symbol.toStringTag]() { + return 'Token'; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } +} /** - * Produces a JavaScript value given a GraphQL Value AST. - * - * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value - * will reflect the provided GraphQL value AST. - * - * | GraphQL Value | JavaScript Value | - * | -------------------- | ---------------- | - * | Input Object | Object | - * | List | Array | - * | Boolean | Boolean | - * | String / Enum | String | - * | Int / Float | Number | - * | Null | null | - * + * The list of all possible AST node types. */ -function valueFromASTUntyped(valueNode, variables) { - switch (valueNode.kind) { - case _kinds.Kind.NULL: - return null; - case _kinds.Kind.INT: - return parseInt(valueNode.value, 10); - case _kinds.Kind.FLOAT: - return parseFloat(valueNode.value); - case _kinds.Kind.STRING: - case _kinds.Kind.ENUM: - case _kinds.Kind.BOOLEAN: - return valueNode.value; - case _kinds.Kind.LIST: - return valueNode.values.map(node => valueFromASTUntyped(node, variables)); - case _kinds.Kind.OBJECT: - return (0, _keyValMap.keyValMap)(valueNode.fields, field => field.name.value, field => valueFromASTUntyped(field.value, variables)); - case _kinds.Kind.VARIABLE: - return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; - } +/** + * @internal + */ +exports.Token = Token; +const QueryDocumentKeys = exports.QueryDocumentKeys = { + Name: [], + Document: ['definitions'], + OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'], + VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], + Variable: ['name'], + SelectionSet: ['selections'], + Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], + Argument: ['name', 'value'], + FragmentSpread: ['name', 'directives'], + InlineFragment: ['typeCondition', 'directives', 'selectionSet'], + FragmentDefinition: ['name', + // Note: fragment variable definitions are deprecated and will removed in v17.0.0 + 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ['values'], + ObjectValue: ['fields'], + ObjectField: ['name', 'value'], + Directive: ['name', 'arguments'], + NamedType: ['name'], + ListType: ['type'], + NonNullType: ['type'], + SchemaDefinition: ['description', 'directives', 'operationTypes'], + OperationTypeDefinition: ['type'], + ScalarTypeDefinition: ['description', 'name', 'directives'], + ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], + FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], + InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'], + InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], + UnionTypeDefinition: ['description', 'name', 'directives', 'types'], + EnumTypeDefinition: ['description', 'name', 'directives', 'values'], + EnumValueDefinition: ['description', 'name', 'directives'], + InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], + DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], + SchemaExtension: ['directives', 'operationTypes'], + ScalarTypeExtension: ['name', 'directives'], + ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], + InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], + UnionTypeExtension: ['name', 'directives', 'types'], + EnumTypeExtension: ['name', 'directives', 'values'], + InputObjectTypeExtension: ['name', 'directives', 'fields'] +}; +const kindValues = new Set(Object.keys(QueryDocumentKeys)); +/** + * @internal + */ + +function isNode(maybeNode) { + const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; + return typeof maybeKind === 'string' && kindValues.has(maybeKind); } +/** Name */ + +var OperationTypeNode; +(function (OperationTypeNode) { + OperationTypeNode['QUERY'] = 'query'; + OperationTypeNode['MUTATION'] = 'mutation'; + OperationTypeNode['SUBSCRIPTION'] = 'subscription'; +})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {})); /***/ }), -/***/ "../../../node_modules/graphql/validation/ValidationContext.mjs": -/*!**********************************************************************!*\ - !*** ../../../node_modules/graphql/validation/ValidationContext.mjs ***! - \**********************************************************************/ +/***/ "../../../node_modules/graphql/language/blockString.mjs": +/*!**************************************************************!*\ + !*** ../../../node_modules/graphql/language/blockString.mjs ***! + \**************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ValidationContext = exports.SDLValidationContext = exports.ASTValidationContext = void 0; -var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); -var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); +exports.dedentBlockStringLines = dedentBlockStringLines; +exports.isPrintableAsBlockString = isPrintableAsBlockString; +exports.printBlockString = printBlockString; +var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); /** - * An instance of this class is passed as the "this" context to all validators, - * allowing access to commonly useful contextual information from within a - * validation rule. + * Produces the value of a block string from its parsed raw value, similar to + * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. + * + * This implements the GraphQL spec's BlockStringValue() static algorithm. + * + * @internal */ -class ASTValidationContext { - constructor(ast, onError) { - this._ast = ast; - this._fragments = undefined; - this._fragmentSpreads = new Map(); - this._recursivelyReferencedFragments = new Map(); - this._onError = onError; - } - get [Symbol.toStringTag]() { - return 'ASTValidationContext'; - } - reportError(error) { - this._onError(error); - } - getDocument() { - return this._ast; - } - getFragment(name) { - let fragments; - if (this._fragments) { - fragments = this._fragments; - } else { - fragments = Object.create(null); - for (const defNode of this.getDocument().definitions) { - if (defNode.kind === _kinds.Kind.FRAGMENT_DEFINITION) { - fragments[defNode.name.value] = defNode; - } - } - this._fragments = fragments; - } - return fragments[name]; - } - getFragmentSpreads(node) { - let spreads = this._fragmentSpreads.get(node); - if (!spreads) { - spreads = []; - const setsToVisit = [node]; - let set; - while (set = setsToVisit.pop()) { - for (const selection of set.selections) { - if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) { - spreads.push(selection); - } else if (selection.selectionSet) { - setsToVisit.push(selection.selectionSet); - } - } - } - this._fragmentSpreads.set(node, spreads); + +function dedentBlockStringLines(lines) { + var _firstNonEmptyLine2; + let commonIndent = Number.MAX_SAFE_INTEGER; + let firstNonEmptyLine = null; + let lastNonEmptyLine = -1; + for (let i = 0; i < lines.length; ++i) { + var _firstNonEmptyLine; + const line = lines[i]; + const indent = leadingWhitespace(line); + if (indent === line.length) { + continue; // skip empty lines } - return spreads; - } - getRecursivelyReferencedFragments(operation) { - let fragments = this._recursivelyReferencedFragments.get(operation); - if (!fragments) { - fragments = []; - const collectedNames = Object.create(null); - const nodesToVisit = [operation.selectionSet]; - let node; - while (node = nodesToVisit.pop()) { - for (const spread of this.getFragmentSpreads(node)) { - const fragName = spread.name.value; - if (collectedNames[fragName] !== true) { - collectedNames[fragName] = true; - const fragment = this.getFragment(fragName); - if (fragment) { - fragments.push(fragment); - nodesToVisit.push(fragment.selectionSet); - } - } - } - } - this._recursivelyReferencedFragments.set(operation, fragments); + firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; + lastNonEmptyLine = i; + if (i !== 0 && indent < commonIndent) { + commonIndent = indent; } - return fragments; } + return lines // Remove common indentation from all lines but first. + .map((line, i) => i === 0 ? line : line.slice(commonIndent)) // Remove leading and trailing blank lines. + .slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1); } -exports.ASTValidationContext = ASTValidationContext; -class SDLValidationContext extends ASTValidationContext { - constructor(ast, schema, onError) { - super(ast, onError); - this._schema = schema; - } - get [Symbol.toStringTag]() { - return 'SDLValidationContext'; - } - getSchema() { - return this._schema; +function leadingWhitespace(str) { + let i = 0; + while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) { + ++i; } + return i; } -exports.SDLValidationContext = SDLValidationContext; -class ValidationContext extends ASTValidationContext { - constructor(schema, ast, typeInfo, onError) { - super(ast, onError); - this._schema = schema; - this._typeInfo = typeInfo; - this._variableUsages = new Map(); - this._recursiveVariableUsages = new Map(); - } - get [Symbol.toStringTag]() { - return 'ValidationContext'; - } - getSchema() { - return this._schema; +/** + * @internal + */ + +function isPrintableAsBlockString(value) { + if (value === '') { + return true; // empty string is printable } - getVariableUsages(node) { - let usages = this._variableUsages.get(node); - if (!usages) { - const newUsages = []; - const typeInfo = new _TypeInfo.TypeInfo(this._schema); - (0, _visitor.visit)(node, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, { - VariableDefinition: () => false, - Variable(variable) { - newUsages.push({ - node: variable, - type: typeInfo.getInputType(), - defaultValue: typeInfo.getDefaultValue() - }); + let isEmptyLine = true; + let hasIndent = false; + let hasCommonIndent = true; + let seenNonEmptyLine = false; + for (let i = 0; i < value.length; ++i) { + switch (value.codePointAt(i)) { + case 0x0000: + case 0x0001: + case 0x0002: + case 0x0003: + case 0x0004: + case 0x0005: + case 0x0006: + case 0x0007: + case 0x0008: + case 0x000b: + case 0x000c: + case 0x000e: + case 0x000f: + return false; + // Has non-printable characters + + case 0x000d: + // \r + return false; + // Has \r or \r\n which will be replaced as \n + + case 10: + // \n + if (isEmptyLine && !seenNonEmptyLine) { + return false; // Has leading new line } - })); - usages = newUsages; - this._variableUsages.set(node, usages); - } - return usages; - } - getRecursiveVariableUsages(operation) { - let usages = this._recursiveVariableUsages.get(operation); - if (!usages) { - usages = this.getVariableUsages(operation); - for (const frag of this.getRecursivelyReferencedFragments(operation)) { - usages = usages.concat(this.getVariableUsages(frag)); - } - this._recursiveVariableUsages.set(operation, usages); + seenNonEmptyLine = true; + isEmptyLine = true; + hasIndent = false; + break; + case 9: // \t + + case 32: + // + hasIndent || (hasIndent = isEmptyLine); + break; + default: + hasCommonIndent && (hasCommonIndent = hasIndent); + isEmptyLine = false; } - return usages; - } - getType() { - return this._typeInfo.getType(); - } - getParentType() { - return this._typeInfo.getParentType(); - } - getInputType() { - return this._typeInfo.getInputType(); - } - getParentInputType() { - return this._typeInfo.getParentInputType(); - } - getFieldDef() { - return this._typeInfo.getFieldDef(); - } - getDirective() { - return this._typeInfo.getDirective(); } - getArgument() { - return this._typeInfo.getArgument(); + if (isEmptyLine) { + return false; // Has trailing empty lines } - getEnumValue() { - return this._typeInfo.getEnumValue(); + if (hasCommonIndent && seenNonEmptyLine) { + return false; // Has internal indent } + return true; } -exports.ValidationContext = ValidationContext; +/** + * Print a block string in the indented block form by adding a leading and + * trailing blank line. However, if a block string starts with whitespace and is + * a single-line, adding a leading blank line would strip that whitespace. + * + * @internal + */ -/***/ }), +function printBlockString(value, options) { + const escapedValue = value.replace(/"""/g, '\\"""'); // Expand a block string's raw value into independent lines. -/***/ "../../../node_modules/graphql/validation/index.mjs": -/*!**********************************************************!*\ - !*** ../../../node_modules/graphql/validation/index.mjs ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + const lines = escapedValue.split(/\r\n|[\n\r]/g); + const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line + const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every(line => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line + const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); // Trailing quote (single or double) or slash forces trailing new line -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "ExecutableDefinitionsRule", ({ - enumerable: true, - get: function () { - return _ExecutableDefinitionsRule.ExecutableDefinitionsRule; - } -})); -Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({ - enumerable: true, - get: function () { - return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule; - } -})); -Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({ - enumerable: true, - get: function () { - return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule; - } -})); -Object.defineProperty(exports, "KnownArgumentNamesRule", ({ - enumerable: true, - get: function () { - return _KnownArgumentNamesRule.KnownArgumentNamesRule; - } -})); -Object.defineProperty(exports, "KnownDirectivesRule", ({ - enumerable: true, - get: function () { - return _KnownDirectivesRule.KnownDirectivesRule; + const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; + const hasTrailingSlash = value.endsWith('\\'); + const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; + const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && ( + // add leading and trailing new lines only if it improves readability + !isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); + let result = ''; // Format a multi-line block quote to account for leading space. + + const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0)); + if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { + result += '\n'; } -})); -Object.defineProperty(exports, "KnownFragmentNamesRule", ({ - enumerable: true, - get: function () { - return _KnownFragmentNamesRule.KnownFragmentNamesRule; + result += escapedValue; + if (printAsMultipleLines || forceTrailingNewline) { + result += '\n'; } + return '"""' + result + '"""'; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/language/characterClasses.mjs": +/*!*******************************************************************!*\ + !*** ../../../node_modules/graphql/language/characterClasses.mjs ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "KnownTypeNamesRule", ({ - enumerable: true, - get: function () { - return _KnownTypeNamesRule.KnownTypeNamesRule; - } +exports.isDigit = isDigit; +exports.isLetter = isLetter; +exports.isNameContinue = isNameContinue; +exports.isNameStart = isNameStart; +exports.isWhiteSpace = isWhiteSpace; +/** + * ``` + * WhiteSpace :: + * - "Horizontal Tab (U+0009)" + * - "Space (U+0020)" + * ``` + * @internal + */ +function isWhiteSpace(code) { + return code === 0x0009 || code === 0x0020; +} +/** + * ``` + * Digit :: one of + * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` + * ``` + * @internal + */ + +function isDigit(code) { + return code >= 0x0030 && code <= 0x0039; +} +/** + * ``` + * Letter :: one of + * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` + * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z` + * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` + * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z` + * ``` + * @internal + */ + +function isLetter(code) { + return code >= 0x0061 && code <= 0x007a || + // A-Z + code >= 0x0041 && code <= 0x005a // a-z + ; +} +/** + * ``` + * NameStart :: + * - Letter + * - `_` + * ``` + * @internal + */ + +function isNameStart(code) { + return isLetter(code) || code === 0x005f; +} +/** + * ``` + * NameContinue :: + * - Letter + * - Digit + * - `_` + * ``` + * @internal + */ + +function isNameContinue(code) { + return isLetter(code) || isDigit(code) || code === 0x005f; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/language/directiveLocation.mjs": +/*!********************************************************************!*\ + !*** ../../../node_modules/graphql/language/directiveLocation.mjs ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "LoneAnonymousOperationRule", ({ - enumerable: true, - get: function () { - return _LoneAnonymousOperationRule.LoneAnonymousOperationRule; - } +exports.DirectiveLocation = void 0; +/** + * The set of allowed directive location values. + */ +var DirectiveLocation; +(function (DirectiveLocation) { + DirectiveLocation['QUERY'] = 'QUERY'; + DirectiveLocation['MUTATION'] = 'MUTATION'; + DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION'; + DirectiveLocation['FIELD'] = 'FIELD'; + DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION'; + DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD'; + DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT'; + DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION'; + DirectiveLocation['SCHEMA'] = 'SCHEMA'; + DirectiveLocation['SCALAR'] = 'SCALAR'; + DirectiveLocation['OBJECT'] = 'OBJECT'; + DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION'; + DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION'; + DirectiveLocation['INTERFACE'] = 'INTERFACE'; + DirectiveLocation['UNION'] = 'UNION'; + DirectiveLocation['ENUM'] = 'ENUM'; + DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE'; + DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT'; + DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION'; +})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {})); + +/** + * The enum type representing the directive location values. + * + * @deprecated Please use `DirectiveLocation`. Will be remove in v17. + */ + +/***/ }), + +/***/ "../../../node_modules/graphql/language/index.mjs": +/*!********************************************************!*\ + !*** ../../../node_modules/graphql/language/index.mjs ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({ +Object.defineProperty(exports, "BREAK", ({ enumerable: true, get: function () { - return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule; + return _visitor.BREAK; } })); -Object.defineProperty(exports, "NoDeprecatedCustomRule", ({ +Object.defineProperty(exports, "DirectiveLocation", ({ enumerable: true, get: function () { - return _NoDeprecatedCustomRule.NoDeprecatedCustomRule; + return _directiveLocation.DirectiveLocation; } })); -Object.defineProperty(exports, "NoFragmentCyclesRule", ({ +Object.defineProperty(exports, "Kind", ({ enumerable: true, get: function () { - return _NoFragmentCyclesRule.NoFragmentCyclesRule; + return _kinds.Kind; } })); -Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({ +Object.defineProperty(exports, "Lexer", ({ enumerable: true, get: function () { - return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule; + return _lexer.Lexer; } })); -Object.defineProperty(exports, "NoUndefinedVariablesRule", ({ +Object.defineProperty(exports, "Location", ({ enumerable: true, get: function () { - return _NoUndefinedVariablesRule.NoUndefinedVariablesRule; + return _ast.Location; } })); -Object.defineProperty(exports, "NoUnusedFragmentsRule", ({ +Object.defineProperty(exports, "OperationTypeNode", ({ enumerable: true, get: function () { - return _NoUnusedFragmentsRule.NoUnusedFragmentsRule; + return _ast.OperationTypeNode; } })); -Object.defineProperty(exports, "NoUnusedVariablesRule", ({ +Object.defineProperty(exports, "Source", ({ enumerable: true, get: function () { - return _NoUnusedVariablesRule.NoUnusedVariablesRule; + return _source.Source; } })); -Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({ +Object.defineProperty(exports, "Token", ({ enumerable: true, get: function () { - return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule; + return _ast.Token; } })); -Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({ +Object.defineProperty(exports, "TokenKind", ({ enumerable: true, get: function () { - return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule; + return _tokenKind.TokenKind; } })); -Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({ +Object.defineProperty(exports, "getEnterLeaveForKind", ({ enumerable: true, get: function () { - return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule; + return _visitor.getEnterLeaveForKind; } })); -Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({ +Object.defineProperty(exports, "getLocation", ({ enumerable: true, get: function () { - return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule; + return _location.getLocation; } })); -Object.defineProperty(exports, "ScalarLeafsRule", ({ +Object.defineProperty(exports, "getVisitFn", ({ enumerable: true, get: function () { - return _ScalarLeafsRule.ScalarLeafsRule; + return _visitor.getVisitFn; } })); -Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({ +Object.defineProperty(exports, "isConstValueNode", ({ enumerable: true, get: function () { - return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule; + return _predicates.isConstValueNode; } })); -Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({ +Object.defineProperty(exports, "isDefinitionNode", ({ enumerable: true, get: function () { - return _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule; + return _predicates.isDefinitionNode; } })); -Object.defineProperty(exports, "UniqueArgumentNamesRule", ({ +Object.defineProperty(exports, "isExecutableDefinitionNode", ({ enumerable: true, get: function () { - return _UniqueArgumentNamesRule.UniqueArgumentNamesRule; + return _predicates.isExecutableDefinitionNode; } })); -Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({ +Object.defineProperty(exports, "isSelectionNode", ({ enumerable: true, get: function () { - return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule; + return _predicates.isSelectionNode; } })); -Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({ +Object.defineProperty(exports, "isTypeDefinitionNode", ({ enumerable: true, get: function () { - return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule; + return _predicates.isTypeDefinitionNode; } })); -Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({ +Object.defineProperty(exports, "isTypeExtensionNode", ({ enumerable: true, get: function () { - return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule; + return _predicates.isTypeExtensionNode; } })); -Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({ +Object.defineProperty(exports, "isTypeNode", ({ enumerable: true, get: function () { - return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule; + return _predicates.isTypeNode; } })); -Object.defineProperty(exports, "UniqueFragmentNamesRule", ({ +Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ enumerable: true, get: function () { - return _UniqueFragmentNamesRule.UniqueFragmentNamesRule; + return _predicates.isTypeSystemDefinitionNode; } })); -Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({ +Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ enumerable: true, get: function () { - return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule; + return _predicates.isTypeSystemExtensionNode; } })); -Object.defineProperty(exports, "UniqueOperationNamesRule", ({ +Object.defineProperty(exports, "isValueNode", ({ enumerable: true, get: function () { - return _UniqueOperationNamesRule.UniqueOperationNamesRule; + return _predicates.isValueNode; } })); -Object.defineProperty(exports, "UniqueOperationTypesRule", ({ +Object.defineProperty(exports, "parse", ({ enumerable: true, get: function () { - return _UniqueOperationTypesRule.UniqueOperationTypesRule; + return _parser.parse; } })); -Object.defineProperty(exports, "UniqueTypeNamesRule", ({ +Object.defineProperty(exports, "parseConstValue", ({ enumerable: true, get: function () { - return _UniqueTypeNamesRule.UniqueTypeNamesRule; + return _parser.parseConstValue; } })); -Object.defineProperty(exports, "UniqueVariableNamesRule", ({ +Object.defineProperty(exports, "parseType", ({ enumerable: true, get: function () { - return _UniqueVariableNamesRule.UniqueVariableNamesRule; + return _parser.parseType; } })); -Object.defineProperty(exports, "ValidationContext", ({ +Object.defineProperty(exports, "parseValue", ({ enumerable: true, get: function () { - return _ValidationContext.ValidationContext; + return _parser.parseValue; } })); -Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({ +Object.defineProperty(exports, "print", ({ enumerable: true, get: function () { - return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule; + return _printer.print; } })); -Object.defineProperty(exports, "VariablesAreInputTypesRule", ({ +Object.defineProperty(exports, "printLocation", ({ enumerable: true, get: function () { - return _VariablesAreInputTypesRule.VariablesAreInputTypesRule; + return _printLocation.printLocation; } })); -Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({ +Object.defineProperty(exports, "printSourceLocation", ({ enumerable: true, get: function () { - return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule; + return _printLocation.printSourceLocation; } })); -Object.defineProperty(exports, "specifiedRules", ({ +Object.defineProperty(exports, "visit", ({ enumerable: true, get: function () { - return _specifiedRules.specifiedRules; + return _visitor.visit; } })); -Object.defineProperty(exports, "validate", ({ +Object.defineProperty(exports, "visitInParallel", ({ enumerable: true, get: function () { - return _validate.validate; + return _visitor.visitInParallel; } })); -var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); -var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs"); -var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs"); -var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs"); -var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs"); -var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs"); -var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs"); -var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs"); -var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs"); -var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs"); -var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs"); -var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs"); -var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs"); -var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs"); -var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs"); -var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs"); -var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs"); -var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs"); -var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs"); -var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs"); -var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs"); -var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs"); -var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs"); -var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs"); -var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs"); -var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs"); -var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs"); -var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs"); -var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs"); -var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs"); -var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs"); -var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs"); -var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs"); -var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs"); -var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs"); -var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs"); -var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs"); -var _NoDeprecatedCustomRule = __webpack_require__(/*! ./rules/custom/NoDeprecatedCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs"); -var _NoSchemaIntrospectionCustomRule = __webpack_require__(/*! ./rules/custom/NoSchemaIntrospectionCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs"); +var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs"); +var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs"); +var _printLocation = __webpack_require__(/*! ./printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs"); +var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); +var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); +var _parser = __webpack_require__(/*! ./parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); +var _printer = __webpack_require__(/*! ./printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _predicates = __webpack_require__(/*! ./predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs": -/*!************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs ***! - \************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/language/kinds.mjs": +/*!********************************************************!*\ + !*** ../../../node_modules/graphql/language/kinds.mjs ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExecutableDefinitionsRule = ExecutableDefinitionsRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +exports.Kind = void 0; /** - * Executable definitions - * - * A GraphQL document is only valid for execution if all definitions are either - * operation or fragment definitions. + * The set of allowed kind values for AST nodes. + */ +var Kind; +(function (Kind) { + Kind['NAME'] = 'Name'; + Kind['DOCUMENT'] = 'Document'; + Kind['OPERATION_DEFINITION'] = 'OperationDefinition'; + Kind['VARIABLE_DEFINITION'] = 'VariableDefinition'; + Kind['SELECTION_SET'] = 'SelectionSet'; + Kind['FIELD'] = 'Field'; + Kind['ARGUMENT'] = 'Argument'; + Kind['FRAGMENT_SPREAD'] = 'FragmentSpread'; + Kind['INLINE_FRAGMENT'] = 'InlineFragment'; + Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition'; + Kind['VARIABLE'] = 'Variable'; + Kind['INT'] = 'IntValue'; + Kind['FLOAT'] = 'FloatValue'; + Kind['STRING'] = 'StringValue'; + Kind['BOOLEAN'] = 'BooleanValue'; + Kind['NULL'] = 'NullValue'; + Kind['ENUM'] = 'EnumValue'; + Kind['LIST'] = 'ListValue'; + Kind['OBJECT'] = 'ObjectValue'; + Kind['OBJECT_FIELD'] = 'ObjectField'; + Kind['DIRECTIVE'] = 'Directive'; + Kind['NAMED_TYPE'] = 'NamedType'; + Kind['LIST_TYPE'] = 'ListType'; + Kind['NON_NULL_TYPE'] = 'NonNullType'; + Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition'; + Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition'; + Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition'; + Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition'; + Kind['FIELD_DEFINITION'] = 'FieldDefinition'; + Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition'; + Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition'; + Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition'; + Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition'; + Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition'; + Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition'; + Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition'; + Kind['SCHEMA_EXTENSION'] = 'SchemaExtension'; + Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension'; + Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension'; + Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension'; + Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension'; + Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension'; + Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension'; +})(Kind || (exports.Kind = Kind = {})); + +/** + * The enum type representing the possible kind values of AST nodes. * - * See https://spec.graphql.org/draft/#sec-Executable-Definitions + * @deprecated Please use `Kind`. Will be remove in v17. */ -function ExecutableDefinitionsRule(context) { - return { - Document(node) { - for (const definition of node.definitions) { - if (!(0, _predicates.isExecutableDefinitionNode)(definition)) { - const defName = definition.kind === _kinds.Kind.SCHEMA_DEFINITION || definition.kind === _kinds.Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"'; - context.reportError(new _GraphQLError.GraphQLError(`The ${defName} definition is not executable.`, { - nodes: definition - })); - } - } - return false; - } - }; -} /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs": -/*!**********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs ***! - \**********************************************************************************/ +/***/ "../../../node_modules/graphql/language/lexer.mjs": +/*!********************************************************!*\ + !*** ../../../node_modules/graphql/language/lexer.mjs ***! + \********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule; -var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _naturalCompare = __webpack_require__(/*! ../../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); -var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +exports.Lexer = void 0; +exports.isPunctuatorTokenKind = isPunctuatorTokenKind; +var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs"); +var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); +var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); +var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); /** - * Fields on correct type - * - * A GraphQL document is only valid if all fields selected are defined by the - * parent type, or are an allowed meta field such as __typename. - * - * See https://spec.graphql.org/draft/#sec-Field-Selections + * Given a Source object, creates a Lexer for that source. + * A Lexer is a stateful stream generator in that every time + * it is advanced, it returns the next token in the Source. Assuming the + * source lexes, the final Token emitted by the lexer will be of kind + * EOF, after which the lexer will repeatedly return the same EOF token + * whenever called. */ -function FieldsOnCorrectTypeRule(context) { - return { - Field(node) { - const type = context.getParentType(); - if (type) { - const fieldDef = context.getFieldDef(); - if (!fieldDef) { - // This field doesn't exist, lets look for suggestions. - const schema = context.getSchema(); - const fieldName = node.name.value; // First determine if there are any suggested types to condition on. - let suggestion = (0, _didYouMean.didYouMean)('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo? +class Lexer { + /** + * The previously focused non-ignored token. + */ - if (suggestion === '') { - suggestion = (0, _didYouMean.didYouMean)(getSuggestedFieldNames(type, fieldName)); - } // Report an error, including helpful suggestions. + /** + * The currently focused non-ignored token. + */ - context.reportError(new _GraphQLError.GraphQLError(`Cannot query field "${fieldName}" on type "${type.name}".` + suggestion, { - nodes: node - })); - } - } - } - }; -} -/** - * Go through all of the implementations of type, as well as the interfaces that - * they implement. If any of those types include the provided field, suggest them, - * sorted by how often the type is referenced. - */ + /** + * The (1-indexed) line containing the current token. + */ -function getSuggestedTypeNames(schema, type, fieldName) { - if (!(0, _definition.isAbstractType)(type)) { - // Must be an Object type, which does not have possible fields. - return []; + /** + * The character offset at which the current line begins. + */ + constructor(source) { + const startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0); + this.source = source; + this.lastToken = startOfFileToken; + this.token = startOfFileToken; + this.line = 1; + this.lineStart = 0; } - const suggestedTypes = new Set(); - const usageCount = Object.create(null); - for (const possibleType of schema.getPossibleTypes(type)) { - if (!possibleType.getFields()[fieldName]) { - continue; - } // This object type defines this field. - - suggestedTypes.add(possibleType); - usageCount[possibleType.name] = 1; - for (const possibleInterface of possibleType.getInterfaces()) { - var _usageCount$possibleI; - if (!possibleInterface.getFields()[fieldName]) { - continue; - } // This interface type defines this field. + get [Symbol.toStringTag]() { + return 'Lexer'; + } + /** + * Advances the token stream to the next non-ignored token. + */ - suggestedTypes.add(possibleInterface); - usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; - } + advance() { + this.lastToken = this.token; + const token = this.token = this.lookahead(); + return token; } - return [...suggestedTypes].sort((typeA, typeB) => { - // Suggest both interface and object types based on how common they are. - const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; - if (usageCountDiff !== 0) { - return usageCountDiff; - } // Suggest super types first followed by subtypes + /** + * Looks ahead and returns the next non-ignored token, but does not change + * the state of Lexer. + */ - if ((0, _definition.isInterfaceType)(typeA) && schema.isSubType(typeA, typeB)) { - return -1; - } - if ((0, _definition.isInterfaceType)(typeB) && schema.isSubType(typeB, typeA)) { - return 1; + lookahead() { + let token = this.token; + if (token.kind !== _tokenKind.TokenKind.EOF) { + do { + if (token.next) { + token = token.next; + } else { + // Read the next token and form a link in the token linked-list. + const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing. + + token.next = nextToken; // @ts-expect-error prev is only mutable during parsing. + + nextToken.prev = token; + token = nextToken; + } + } while (token.kind === _tokenKind.TokenKind.COMMENT); } - return (0, _naturalCompare.naturalCompare)(typeA.name, typeB.name); - }).map(x => x.name); + return token; + } } /** - * For the field name provided, determine if there are any similar field names - * that may be the result of a typo. + * @internal */ - -function getSuggestedFieldNames(type, fieldName) { - if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { - const possibleFieldNames = Object.keys(type.getFields()); - return (0, _suggestionList.suggestionList)(fieldName, possibleFieldNames); - } // Otherwise, must be a Union type, which does not define fields. - - return []; +exports.Lexer = Lexer; +function isPunctuatorTokenKind(kind) { + return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tokenKind.TokenKind.COLON || kind === _tokenKind.TokenKind.EQUALS || kind === _tokenKind.TokenKind.AT || kind === _tokenKind.TokenKind.BRACKET_L || kind === _tokenKind.TokenKind.BRACKET_R || kind === _tokenKind.TokenKind.BRACE_L || kind === _tokenKind.TokenKind.PIPE || kind === _tokenKind.TokenKind.BRACE_R; } +/** + * A Unicode scalar value is any Unicode code point except surrogate code + * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and + * 0xE000 to 0x10FFFF. + * + * SourceCharacter :: + * - "Any Unicode scalar value" + */ -/***/ }), +function isUnicodeScalarValue(code) { + return code >= 0x0000 && code <= 0xd7ff || code >= 0xe000 && code <= 0x10ffff; +} +/** + * The GraphQL specification defines source text as a sequence of unicode scalar + * values (which Unicode defines to exclude surrogate code points). However + * JavaScript defines strings as a sequence of UTF-16 code units which may + * include surrogates. A surrogate pair is a valid source character as it + * encodes a supplementary code point (above U+FFFF), but unpaired surrogate + * code points are not valid source characters. + */ -/***/ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs": -/*!****************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs ***! - \****************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +function isSupplementaryCodePoint(body, location) { + return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1)); +} +function isLeadingSurrogate(code) { + return code >= 0xd800 && code <= 0xdbff; +} +function isTrailingSurrogate(code) { + return code >= 0xdc00 && code <= 0xdfff; +} +/** + * Prints the code point (or end of file reference) at a given location in a + * source for use in error messages. + * + * Printable ASCII is printed quoted, while other points are printed in Unicode + * code point form (ie. U+1234). + */ +function printCodePointAt(lexer, location) { + const code = lexer.source.body.codePointAt(location); + if (code === undefined) { + return _tokenKind.TokenKind.EOF; + } else if (code >= 0x0020 && code <= 0x007e) { + // Printable ASCII + const char = String.fromCodePoint(code); + return char === '"' ? "'\"'" : `"${char}"`; + } // Unicode code point + return 'U+' + code.toString(16).toUpperCase().padStart(4, '0'); +} +/** + * Create a token with line and column location information. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +function createToken(lexer, kind, start, end, value) { + const line = lexer.line; + const col = 1 + start - lexer.lineStart; + return new _ast.Token(kind, start, end, line, col, value); +} /** - * Fragments on composite type - * - * Fragments use a type condition to determine if they apply, since fragments - * can only be spread into a composite type (object, interface, or union), the - * type condition must also be a composite type. + * Gets the next token from the source starting at the given position. * - * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types + * This skips over whitespace until it finds the next lexable token, then lexes + * punctuators immediately or calls the appropriate helper function for more + * complicated tokens. */ -function FragmentsOnCompositeTypesRule(context) { - return { - InlineFragment(node) { - const typeCondition = node.typeCondition; - if (typeCondition) { - const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition); - if (type && !(0, _definition.isCompositeType)(type)) { - const typeStr = (0, _printer.print)(typeCondition); - context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot condition on non composite type "${typeStr}".`, { - nodes: typeCondition - })); + +function readNextToken(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start; + while (position < bodyLength) { + const code = body.charCodeAt(position); // SourceCharacter + + switch (code) { + // Ignored :: + // - UnicodeBOM + // - WhiteSpace + // - LineTerminator + // - Comment + // - Comma + // + // UnicodeBOM :: "Byte Order Mark (U+FEFF)" + // + // WhiteSpace :: + // - "Horizontal Tab (U+0009)" + // - "Space (U+0020)" + // + // Comma :: , + case 0xfeff: // + + case 0x0009: // \t + + case 0x0020: // + + case 0x002c: + // , + ++position; + continue; + // LineTerminator :: + // - "New Line (U+000A)" + // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"] + // - "Carriage Return (U+000D)" "New Line (U+000A)" + + case 0x000a: + // \n + ++position; + ++lexer.line; + lexer.lineStart = position; + continue; + case 0x000d: + // \r + if (body.charCodeAt(position + 1) === 0x000a) { + position += 2; + } else { + ++position; } - } - }, - FragmentDefinition(node) { - const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.typeCondition); - if (type && !(0, _definition.isCompositeType)(type)) { - const typeStr = (0, _printer.print)(node.typeCondition); - context.reportError(new _GraphQLError.GraphQLError(`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, { - nodes: node.typeCondition - })); - } - } - }; -} + ++lexer.line; + lexer.lineStart = position; + continue; + // Comment -/***/ }), + case 0x0023: + // # + return readComment(lexer, position); + // Token :: + // - Punctuator + // - Name + // - IntValue + // - FloatValue + // - StringValue + // + // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | } -/***/ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs": -/*!*********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs ***! - \*********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + case 0x0021: + // ! + return createToken(lexer, _tokenKind.TokenKind.BANG, position, position + 1); + case 0x0024: + // $ + return createToken(lexer, _tokenKind.TokenKind.DOLLAR, position, position + 1); + case 0x0026: + // & + return createToken(lexer, _tokenKind.TokenKind.AMP, position, position + 1); + case 0x0028: + // ( + return createToken(lexer, _tokenKind.TokenKind.PAREN_L, position, position + 1); + case 0x0029: + // ) + return createToken(lexer, _tokenKind.TokenKind.PAREN_R, position, position + 1); + case 0x002e: + // . + if (body.charCodeAt(position + 1) === 0x002e && body.charCodeAt(position + 2) === 0x002e) { + return createToken(lexer, _tokenKind.TokenKind.SPREAD, position, position + 3); + } + break; + case 0x003a: + // : + return createToken(lexer, _tokenKind.TokenKind.COLON, position, position + 1); + case 0x003d: + // = + return createToken(lexer, _tokenKind.TokenKind.EQUALS, position, position + 1); + case 0x0040: + // @ + return createToken(lexer, _tokenKind.TokenKind.AT, position, position + 1); + case 0x005b: + // [ + return createToken(lexer, _tokenKind.TokenKind.BRACKET_L, position, position + 1); + case 0x005d: + // ] + return createToken(lexer, _tokenKind.TokenKind.BRACKET_R, position, position + 1); + case 0x007b: + // { + return createToken(lexer, _tokenKind.TokenKind.BRACE_L, position, position + 1); + case 0x007c: + // | + return createToken(lexer, _tokenKind.TokenKind.PIPE, position, position + 1); + case 0x007d: + // } + return createToken(lexer, _tokenKind.TokenKind.BRACE_R, position, position + 1); + // StringValue + case 0x0022: + // " + if (body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) { + return readBlockString(lexer, position); + } + return readString(lexer, position); + } // IntValue | FloatValue (Digit | -) + if ((0, _characterClasses.isDigit)(code) || code === 0x002d) { + return readNumber(lexer, position, code); + } // Name -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule; -exports.KnownArgumentNamesRule = KnownArgumentNamesRule; -var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); + if ((0, _characterClasses.isNameStart)(code)) { + return readName(lexer, position); + } + throw (0, _syntaxError.syntaxError)(lexer.source, position, code === 0x0027 ? 'Unexpected single quote character (\'), did you mean to use a double quote (")?' : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`); + } + return createToken(lexer, _tokenKind.TokenKind.EOF, bodyLength, bodyLength); +} /** - * Known argument names + * Reads a comment token from the source file. * - * A GraphQL field is only valid if all supplied arguments are defined by - * that field. + * ``` + * Comment :: # CommentChar* [lookahead != CommentChar] * - * See https://spec.graphql.org/draft/#sec-Argument-Names - * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations + * CommentChar :: SourceCharacter but not LineTerminator + * ``` */ -function KnownArgumentNamesRule(context) { - return { - // eslint-disable-next-line new-cap - ...KnownArgumentNamesOnDirectivesRule(context), - Argument(argNode) { - const argDef = context.getArgument(); - const fieldDef = context.getFieldDef(); - const parentType = context.getParentType(); - if (!argDef && fieldDef && parentType) { - const argName = argNode.name.value; - const knownArgsNames = fieldDef.args.map(arg => arg.name); - const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgsNames); - context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + (0, _didYouMean.didYouMean)(suggestions), { - nodes: argNode - })); - } + +function readComment(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); // LineTerminator (\n | \r) + + if (code === 0x000a || code === 0x000d) { + break; + } // SourceCharacter + + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + break; } - }; + } + return createToken(lexer, _tokenKind.TokenKind.COMMENT, start, position, body.slice(start + 1, position)); } /** - * @internal + * Reads a number token from the source file, either a FloatValue or an IntValue + * depending on whether a FractionalPart or ExponentPart is encountered. + * + * ``` + * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}] + * + * IntegerPart :: + * - NegativeSign? 0 + * - NegativeSign? NonZeroDigit Digit* + * + * NegativeSign :: - + * + * NonZeroDigit :: Digit but not `0` + * + * FloatValue :: + * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}] + * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}] + * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}] + * + * FractionalPart :: . Digit+ + * + * ExponentPart :: ExponentIndicator Sign? Digit+ + * + * ExponentIndicator :: one of `e` `E` + * + * Sign :: one of + - + * ``` */ -function KnownArgumentNamesOnDirectivesRule(context) { - const directiveArgs = Object.create(null); - const schema = context.getSchema(); - const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; - for (const directive of definedDirectives) { - directiveArgs[directive.name] = directive.args.map(arg => arg.name); - } - const astDefinitions = context.getDocument().definitions; - for (const def of astDefinitions) { - if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { - var _def$arguments; +function readNumber(lexer, start, firstCode) { + const body = lexer.source.body; + let position = start; + let code = firstCode; + let isFloat = false; // NegativeSign (-) - // FIXME: https://github.com/graphql/graphql-js/issues/2203 + if (code === 0x002d) { + code = body.charCodeAt(++position); + } // Zero (0) - /* c8 ignore next */ - const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; - directiveArgs[def.name.value] = argsNodes.map(arg => arg.name.value); - } - } - return { - Directive(directiveNode) { - const directiveName = directiveNode.name.value; - const knownArgs = directiveArgs[directiveName]; - if (directiveNode.arguments && knownArgs) { - for (const argNode of directiveNode.arguments) { - const argName = argNode.name.value; - if (!knownArgs.includes(argName)) { - const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgs); - context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on directive "@${directiveName}".` + (0, _didYouMean.didYouMean)(suggestions), { - nodes: argNode - })); - } - } - } - return false; + if (code === 0x0030) { + code = body.charCodeAt(++position); + if ((0, _characterClasses.isDigit)(code)) { + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, unexpected digit after 0: ${printCodePointAt(lexer, position)}.`); } - }; -} - -/***/ }), + } else { + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } // Full stop (.) -/***/ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs": -/*!******************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (code === 0x002e) { + isFloat = true; + code = body.charCodeAt(++position); + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } // E e + if (code === 0x0045 || code === 0x0065) { + isFloat = true; + code = body.charCodeAt(++position); // + - + if (code === 0x002b || code === 0x002d) { + code = body.charCodeAt(++position); + } + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } // Numbers cannot be followed by . or NameStart -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.KnownDirectivesRule = KnownDirectivesRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _ast = __webpack_require__(/*! ../../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); -var _directiveLocation = __webpack_require__(/*! ../../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); + if (code === 0x002e || (0, _characterClasses.isNameStart)(code)) { + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, expected digit but got: ${printCodePointAt(lexer, position)}.`); + } + return createToken(lexer, isFloat ? _tokenKind.TokenKind.FLOAT : _tokenKind.TokenKind.INT, start, position, body.slice(start, position)); +} /** - * Known directives - * - * A GraphQL document is only valid if all `@directives` are known by the - * schema and legally positioned. - * - * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined + * Returns the new position in the source after reading one or more digits. */ -function KnownDirectivesRule(context) { - const locationsMap = Object.create(null); - const schema = context.getSchema(); - const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; - for (const directive of definedDirectives) { - locationsMap[directive.name] = directive.locations; + +function readDigits(lexer, start, firstCode) { + if (!(0, _characterClasses.isDigit)(firstCode)) { + throw (0, _syntaxError.syntaxError)(lexer.source, start, `Invalid number, expected digit but got: ${printCodePointAt(lexer, start)}.`); } - const astDefinitions = context.getDocument().definitions; - for (const def of astDefinitions) { - if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { - locationsMap[def.name.value] = def.locations.map(name => name.value); + const body = lexer.source.body; + let position = start + 1; // +1 to skip first firstCode + + while ((0, _characterClasses.isDigit)(body.charCodeAt(position))) { + ++position; + } + return position; +} +/** + * Reads a single-quote string token from the source file. + * + * ``` + * StringValue :: + * - `""` [lookahead != `"`] + * - `"` StringCharacter+ `"` + * + * StringCharacter :: + * - SourceCharacter but not `"` or `\` or LineTerminator + * - `\u` EscapedUnicode + * - `\` EscapedCharacter + * + * EscapedUnicode :: + * - `{` HexDigit+ `}` + * - HexDigit HexDigit HexDigit HexDigit + * + * EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t` + * ``` + */ + +function readString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + let chunkStart = position; + let value = ''; + while (position < bodyLength) { + const code = body.charCodeAt(position); // Closing Quote (") + + if (code === 0x0022) { + value += body.slice(chunkStart, position); + return createToken(lexer, _tokenKind.TokenKind.STRING, start, position + 1, value); + } // Escape Sequence (\) + + if (code === 0x005c) { + value += body.slice(chunkStart, position); + const escape = body.charCodeAt(position + 1) === 0x0075 // u + ? body.charCodeAt(position + 2) === 0x007b // { + ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position); + value += escape.value; + position += escape.size; + chunkStart = position; + continue; + } // LineTerminator (\n | \r) + + if (code === 0x000a || code === 0x000d) { + break; + } // SourceCharacter + + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`); } } - return { - Directive(node, _key, _parent, _path, ancestors) { - const name = node.name.value; - const locations = locationsMap[name]; - if (!locations) { - context.reportError(new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, { - nodes: node - })); - return; - } - const candidateLocation = getDirectiveLocationForASTPath(ancestors); - if (candidateLocation && !locations.includes(candidateLocation)) { - context.reportError(new _GraphQLError.GraphQLError(`Directive "@${name}" may not be used on ${candidateLocation}.`, { - nodes: node - })); + throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.'); +} // The string value and lexed size of an escape sequence. + +function readEscapedUnicodeVariableWidth(lexer, position) { + const body = lexer.source.body; + let point = 0; + let size = 3; // Cannot be larger than 12 chars (\u{00000000}). + + while (size < 12) { + const code = body.charCodeAt(position + size++); // Closing Brace (}) + + if (code === 0x007d) { + // Must be at least 5 chars (\u{0}) and encode a Unicode scalar value. + if (size < 5 || !isUnicodeScalarValue(point)) { + break; } + return { + value: String.fromCodePoint(point), + size + }; + } // Append this hex digit to the code point. + + point = point << 4 | readHexDigit(code); + if (point < 0) { + break; } - }; + } + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + size)}".`); } -function getDirectiveLocationForASTPath(ancestors) { - const appliedTo = ancestors[ancestors.length - 1]; - 'kind' in appliedTo || (0, _invariant.invariant)(false); - switch (appliedTo.kind) { - case _kinds.Kind.OPERATION_DEFINITION: - return getDirectiveLocationForOperation(appliedTo.operation); - case _kinds.Kind.FIELD: - return _directiveLocation.DirectiveLocation.FIELD; - case _kinds.Kind.FRAGMENT_SPREAD: - return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD; - case _kinds.Kind.INLINE_FRAGMENT: - return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT; - case _kinds.Kind.FRAGMENT_DEFINITION: - return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION; - case _kinds.Kind.VARIABLE_DEFINITION: - return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION; - case _kinds.Kind.SCHEMA_DEFINITION: - case _kinds.Kind.SCHEMA_EXTENSION: - return _directiveLocation.DirectiveLocation.SCHEMA; - case _kinds.Kind.SCALAR_TYPE_DEFINITION: - case _kinds.Kind.SCALAR_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.SCALAR; - case _kinds.Kind.OBJECT_TYPE_DEFINITION: - case _kinds.Kind.OBJECT_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.OBJECT; - case _kinds.Kind.FIELD_DEFINITION: - return _directiveLocation.DirectiveLocation.FIELD_DEFINITION; - case _kinds.Kind.INTERFACE_TYPE_DEFINITION: - case _kinds.Kind.INTERFACE_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.INTERFACE; - case _kinds.Kind.UNION_TYPE_DEFINITION: - case _kinds.Kind.UNION_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.UNION; - case _kinds.Kind.ENUM_TYPE_DEFINITION: - case _kinds.Kind.ENUM_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.ENUM; - case _kinds.Kind.ENUM_VALUE_DEFINITION: - return _directiveLocation.DirectiveLocation.ENUM_VALUE; - case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: - case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: - return _directiveLocation.DirectiveLocation.INPUT_OBJECT; - case _kinds.Kind.INPUT_VALUE_DEFINITION: - { - const parentNode = ancestors[ancestors.length - 3]; - 'kind' in parentNode || (0, _invariant.invariant)(false); - return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION; +function readEscapedUnicodeFixedWidth(lexer, position) { + const body = lexer.source.body; + const code = read16BitHexCode(body, position + 2); + if (isUnicodeScalarValue(code)) { + return { + value: String.fromCodePoint(code), + size: 6 + }; + } // GraphQL allows JSON-style surrogate pair escape sequences, but only when + // a valid pair is formed. + + if (isLeadingSurrogate(code)) { + // \u + if (body.charCodeAt(position + 6) === 0x005c && body.charCodeAt(position + 7) === 0x0075) { + const trailingCode = read16BitHexCode(body, position + 8); + if (isTrailingSurrogate(trailingCode)) { + // JavaScript defines strings as a sequence of UTF-16 code units and + // encodes Unicode code points above U+FFFF using a surrogate pair of + // code units. Since this is a surrogate pair escape sequence, just + // include both codes into the JavaScript string value. Had JavaScript + // not been internally based on UTF-16, then this surrogate pair would + // be decoded to retrieve the supplementary code point. + return { + value: String.fromCodePoint(code, trailingCode), + size: 12 + }; } - // Not reachable, all possible types have been considered. + } + } + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".`); +} +/** + * Reads four hexadecimal characters and returns the positive integer that 16bit + * hexadecimal string represents. For example, "000f" will return 15, and "dead" + * will return 57005. + * + * Returns a negative number if any char was not a valid hexadecimal digit. + */ - /* c8 ignore next */ +function read16BitHexCode(body, position) { + // readHexDigit() returns -1 on error. ORing a negative value with any other + // value always produces a negative value. + return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3)); +} +/** + * Reads a hexadecimal character and returns its positive integer value (0-15). + * + * '0' becomes 0, '9' becomes 9 + * 'A' becomes 10, 'F' becomes 15 + * 'a' becomes 10, 'f' becomes 15 + * + * Returns -1 if the provided character code was not a valid hexadecimal digit. + * + * HexDigit :: one of + * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` + * - `A` `B` `C` `D` `E` `F` + * - `a` `b` `c` `d` `e` `f` + */ - default: - false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(appliedTo.kind)); - } +function readHexDigit(code) { + return code >= 0x0030 && code <= 0x0039 // 0-9 + ? code - 0x0030 : code >= 0x0041 && code <= 0x0046 // A-F + ? code - 0x0037 : code >= 0x0061 && code <= 0x0066 // a-f + ? code - 0x0057 : -1; } -function getDirectiveLocationForOperation(operation) { - switch (operation) { - case _ast.OperationTypeNode.QUERY: - return _directiveLocation.DirectiveLocation.QUERY; - case _ast.OperationTypeNode.MUTATION: - return _directiveLocation.DirectiveLocation.MUTATION; - case _ast.OperationTypeNode.SUBSCRIPTION: - return _directiveLocation.DirectiveLocation.SUBSCRIPTION; +/** + * | Escaped Character | Code Point | Character Name | + * | ----------------- | ---------- | ---------------------------- | + * | `"` | U+0022 | double quote | + * | `\` | U+005C | reverse solidus (back slash) | + * | `/` | U+002F | solidus (forward slash) | + * | `b` | U+0008 | backspace | + * | `f` | U+000C | form feed | + * | `n` | U+000A | line feed (new line) | + * | `r` | U+000D | carriage return | + * | `t` | U+0009 | horizontal tab | + */ + +function readEscapedCharacter(lexer, position) { + const body = lexer.source.body; + const code = body.charCodeAt(position + 1); + switch (code) { + case 0x0022: + // " + return { + value: '\u0022', + size: 2 + }; + case 0x005c: + // \ + return { + value: '\u005c', + size: 2 + }; + case 0x002f: + // / + return { + value: '\u002f', + size: 2 + }; + case 0x0062: + // b + return { + value: '\u0008', + size: 2 + }; + case 0x0066: + // f + return { + value: '\u000c', + size: 2 + }; + case 0x006e: + // n + return { + value: '\u000a', + size: 2 + }; + case 0x0072: + // r + return { + value: '\u000d', + size: 2 + }; + case 0x0074: + // t + return { + value: '\u0009', + size: 2 + }; } + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character escape sequence: "${body.slice(position, position + 2)}".`); } +/** + * Reads a block string token from the source file. + * + * ``` + * StringValue :: + * - `"""` BlockStringCharacter* `"""` + * + * BlockStringCharacter :: + * - SourceCharacter but not `"""` or `\"""` + * - `\"""` + * ``` + */ -/***/ }), +function readBlockString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let lineStart = lexer.lineStart; + let position = start + 3; + let chunkStart = position; + let currentLine = ''; + const blockLines = []; + while (position < bodyLength) { + const code = body.charCodeAt(position); // Closing Triple-Quote (""") -/***/ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs": -/*!*********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs ***! - \*********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (code === 0x0022 && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + const token = createToken(lexer, _tokenKind.TokenKind.BLOCK_STRING, start, position + 3, + // Return a string of the lines joined with U+000A. + (0, _blockString.dedentBlockStringLines)(blockLines).join('\n')); + lexer.line += blockLines.length - 1; + lexer.lineStart = lineStart; + return token; + } // Escaped Triple-Quote (\""") + + if (code === 0x005c && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 && body.charCodeAt(position + 3) === 0x0022) { + currentLine += body.slice(chunkStart, position); + chunkStart = position + 1; // skip only slash + position += 4; + continue; + } // LineTerminator + if (code === 0x000a || code === 0x000d) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) { + position += 2; + } else { + ++position; + } + currentLine = ''; + chunkStart = position; + lineStart = position; + continue; + } // SourceCharacter -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.KnownFragmentNamesRule = KnownFragmentNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`); + } + } + throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.'); +} /** - * Known fragment names - * - * A GraphQL document is only valid if all `...Fragment` fragment spreads refer - * to fragments defined in the same document. + * Reads an alphanumeric + underscore name from the source. * - * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined + * ``` + * Name :: + * - NameStart NameContinue* [lookahead != NameContinue] + * ``` */ -function KnownFragmentNamesRule(context) { - return { - FragmentSpread(node) { - const fragmentName = node.name.value; - const fragment = context.getFragment(fragmentName); - if (!fragment) { - context.reportError(new _GraphQLError.GraphQLError(`Unknown fragment "${fragmentName}".`, { - nodes: node.name - })); - } + +function readName(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if ((0, _characterClasses.isNameContinue)(code)) { + ++position; + } else { + break; } - }; + } + return createToken(lexer, _tokenKind.TokenKind.NAME, start, position, body.slice(start, position)); } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs": -/*!*****************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs ***! - \*****************************************************************************/ +/***/ "../../../node_modules/graphql/language/location.mjs": +/*!***********************************************************!*\ + !*** ../../../node_modules/graphql/language/location.mjs ***! + \***********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.KnownTypeNamesRule = KnownTypeNamesRule; -var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); -var _introspection = __webpack_require__(/*! ../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); -var _scalars = __webpack_require__(/*! ../../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +exports.getLocation = getLocation; +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +const LineRegExp = /\r\n|[\n\r]/g; /** - * Known type names - * - * A GraphQL document is only valid if referenced types (specifically - * variable definitions and fragment conditions) are defined by the type schema. - * - * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence + * Represents a location in a Source. */ -function KnownTypeNamesRule(context) { - const schema = context.getSchema(); - const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null); - const definedTypes = Object.create(null); - for (const def of context.getDocument().definitions) { - if ((0, _predicates.isTypeDefinitionNode)(def)) { - definedTypes[def.name.value] = true; + +/** + * Takes a Source and a UTF-8 character offset, and returns the corresponding + * line and column as a SourceLocation. + */ +function getLocation(source, position) { + let lastLineStart = 0; + let line = 1; + for (const match of source.body.matchAll(LineRegExp)) { + typeof match.index === 'number' || (0, _invariant.invariant)(false); + if (match.index >= position) { + break; } + lastLineStart = match.index + match[0].length; + line += 1; } - const typeNames = [...Object.keys(existingTypesMap), ...Object.keys(definedTypes)]; return { - NamedType(node, _1, parent, _2, ancestors) { - const typeName = node.name.value; - if (!existingTypesMap[typeName] && !definedTypes[typeName]) { - var _ancestors$; - const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; - const isSDL = definitionNode != null && isSDLNode(definitionNode); - if (isSDL && standardTypeNames.includes(typeName)) { - return; - } - const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames); - context.reportError(new _GraphQLError.GraphQLError(`Unknown type "${typeName}".` + (0, _didYouMean.didYouMean)(suggestedTypes), { - nodes: node - })); - } - } + line, + column: position + 1 - lastLineStart }; } -const standardTypeNames = [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes].map(type => type.name); -function isSDLNode(value) { - return 'kind' in value && ((0, _predicates.isTypeSystemDefinitionNode)(value) || (0, _predicates.isTypeSystemExtensionNode)(value)); -} /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs": -/*!*************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs ***! - \*************************************************************************************/ +/***/ "../../../node_modules/graphql/language/parser.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/language/parser.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +exports.Parser = void 0; +exports.parse = parse; +exports.parseConstValue = parseConstValue; +exports.parseType = parseType; +exports.parseValue = parseValue; +var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs"); +var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); +var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); +var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs"); +var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); /** - * Lone anonymous operation - * - * A GraphQL document is only valid if when it contains an anonymous operation - * (the query short-hand) that it contains only that one operation definition. - * - * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation + * Configuration options to control parser behavior */ -function LoneAnonymousOperationRule(context) { - let operationCount = 0; - return { - Document(node) { - operationCount = node.definitions.filter(definition => definition.kind === _kinds.Kind.OPERATION_DEFINITION).length; - }, - OperationDefinition(node) { - if (!node.name && operationCount > 1) { - context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', { - nodes: node - })); - } - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs ***! - \***********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * Lone Schema definition - * - * A GraphQL document is only valid if it contains only one schema definition. + * Given a GraphQL source, parses it into a Document. + * Throws GraphQLError if a syntax error is encountered. */ -function LoneSchemaDefinitionRule(context) { - var _ref, _ref2, _oldSchema$astNode; - const oldSchema = context.getSchema(); - const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); - let schemaDefinitionsCount = 0; - return { - SchemaDefinition(node) { - if (alreadyDefined) { - context.reportError(new _GraphQLError.GraphQLError('Cannot define a new schema within a schema extension.', { - nodes: node - })); - return; - } - if (schemaDefinitionsCount > 0) { - context.reportError(new _GraphQLError.GraphQLError('Must provide only one schema definition.', { - nodes: node - })); - } - ++schemaDefinitionsCount; - } - }; +function parse(source, options) { + const parser = new Parser(source, options); + return parser.parseDocument(); } - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs": -/*!*******************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs ***! - \*******************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoFragmentCyclesRule = NoFragmentCyclesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * No fragment cycles + * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for + * that value. + * Throws GraphQLError if a syntax error is encountered. * - * The graph of fragment spreads must not form any cycles including spreading itself. - * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data. + * This is useful within tools that operate upon GraphQL Values directly and + * in isolation of complete GraphQL documents. * - * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles + * Consider providing the results to the utility function: valueFromAST(). */ -function NoFragmentCyclesRule(context) { - // Tracks already visited fragments to maintain O(N) and to ensure that cycles - // are not redundantly reported. - const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors - - const spreadPath = []; // Position in the spread path - - const spreadPathIndexByName = Object.create(null); - return { - OperationDefinition: () => false, - FragmentDefinition(node) { - detectCycleRecursive(node); - return false; - } - }; // This does a straight-forward DFS to find cycles. - // It does not terminate when a cycle was found but continues to explore - // the graph to find all possible cycles. - function detectCycleRecursive(fragment) { - if (visitedFrags[fragment.name.value]) { - return; - } - const fragmentName = fragment.name.value; - visitedFrags[fragmentName] = true; - const spreadNodes = context.getFragmentSpreads(fragment.selectionSet); - if (spreadNodes.length === 0) { - return; - } - spreadPathIndexByName[fragmentName] = spreadPath.length; - for (const spreadNode of spreadNodes) { - const spreadName = spreadNode.name.value; - const cycleIndex = spreadPathIndexByName[spreadName]; - spreadPath.push(spreadNode); - if (cycleIndex === undefined) { - const spreadFragment = context.getFragment(spreadName); - if (spreadFragment) { - detectCycleRecursive(spreadFragment); - } - } else { - const cyclePath = spreadPath.slice(cycleIndex); - const viaPath = cyclePath.slice(0, -1).map(s => '"' + s.name.value + '"').join(', '); - context.reportError(new _GraphQLError.GraphQLError(`Cannot spread fragment "${spreadName}" within itself` + (viaPath !== '' ? ` via ${viaPath}.` : '.'), { - nodes: cyclePath - })); - } - spreadPath.pop(); - } - spreadPathIndexByName[fragmentName] = undefined; - } +function parseValue(source, options) { + const parser = new Parser(source, options); + parser.expectToken(_tokenKind.TokenKind.SOF); + const value = parser.parseValueLiteral(false); + parser.expectToken(_tokenKind.TokenKind.EOF); + return value; } +/** + * Similar to parseValue(), but raises a parse error if it encounters a + * variable. The return type will be a constant value. + */ -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs ***! - \***********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoUndefinedVariablesRule = NoUndefinedVariablesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +function parseConstValue(source, options) { + const parser = new Parser(source, options); + parser.expectToken(_tokenKind.TokenKind.SOF); + const value = parser.parseConstValueLiteral(); + parser.expectToken(_tokenKind.TokenKind.EOF); + return value; +} /** - * No undefined variables + * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for + * that type. + * Throws GraphQLError if a syntax error is encountered. * - * A GraphQL operation is only valid if all variables encountered, both directly - * and via fragment spreads, are defined by that operation. + * This is useful within tools that operate upon GraphQL Types directly and + * in isolation of complete GraphQL documents. * - * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined + * Consider providing the results to the utility function: typeFromAST(). */ -function NoUndefinedVariablesRule(context) { - let variableNameDefined = Object.create(null); - return { - OperationDefinition: { - enter() { - variableNameDefined = Object.create(null); - }, - leave(operation) { - const usages = context.getRecursiveVariableUsages(operation); - for (const { - node - } of usages) { - const varName = node.name.value; - if (variableNameDefined[varName] !== true) { - context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, { - nodes: [node, operation] - })); - } - } - } - }, - VariableDefinition(node) { - variableNameDefined[node.variable.name.value] = true; - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs": -/*!********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs ***! - \********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +function parseType(source, options) { + const parser = new Parser(source, options); + parser.expectToken(_tokenKind.TokenKind.SOF); + const type = parser.parseTypeReference(); + parser.expectToken(_tokenKind.TokenKind.EOF); + return type; +} /** - * No unused fragments + * This class is exported only to assist people in implementing their own parsers + * without duplicating too much code and should be used only as last resort for cases + * such as experimental syntax or if certain features could not be contributed upstream. * - * A GraphQL document is only valid if all fragment definitions are spread - * within operations, or spread within other fragments spread within operations. + * It is still part of the internal API and is versioned, so any changes to it are never + * considered breaking changes. If you still need to support multiple versions of the + * library, please use the `versionInfo` variable for version detection. * - * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used + * @internal */ -function NoUnusedFragmentsRule(context) { - const operationDefs = []; - const fragmentDefs = []; - return { - OperationDefinition(node) { - operationDefs.push(node); - return false; - }, - FragmentDefinition(node) { - fragmentDefs.push(node); - return false; - }, - Document: { - leave() { - const fragmentNameUsed = Object.create(null); - for (const operation of operationDefs) { - for (const fragment of context.getRecursivelyReferencedFragments(operation)) { - fragmentNameUsed[fragment.name.value] = true; - } - } - for (const fragmentDef of fragmentDefs) { - const fragName = fragmentDef.name.value; - if (fragmentNameUsed[fragName] !== true) { - context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" is never used.`, { - nodes: fragmentDef - })); - } - } - } - } - }; -} -/***/ }), +class Parser { + constructor(source, options = {}) { + const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); + this._lexer = new _lexer.Lexer(sourceObj); + this._options = options; + this._tokenCounter = 0; + } + /** + * Converts a name lex token into a name parse node. + */ -/***/ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs": -/*!********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs ***! - \********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + parseName() { + const token = this.expectToken(_tokenKind.TokenKind.NAME); + return this.node(token, { + kind: _kinds.Kind.NAME, + value: token.value + }); + } // Implements the parsing rules in the Document section. + + /** + * Document : Definition+ + */ + parseDocument() { + return this.node(this._lexer.token, { + kind: _kinds.Kind.DOCUMENT, + definitions: this.many(_tokenKind.TokenKind.SOF, this.parseDefinition, _tokenKind.TokenKind.EOF) + }); + } + /** + * Definition : + * - ExecutableDefinition + * - TypeSystemDefinition + * - TypeSystemExtension + * + * ExecutableDefinition : + * - OperationDefinition + * - FragmentDefinition + * + * TypeSystemDefinition : + * - SchemaDefinition + * - TypeDefinition + * - DirectiveDefinition + * + * TypeDefinition : + * - ScalarTypeDefinition + * - ObjectTypeDefinition + * - InterfaceTypeDefinition + * - UnionTypeDefinition + * - EnumTypeDefinition + * - InputObjectTypeDefinition + */ + parseDefinition() { + if (this.peek(_tokenKind.TokenKind.BRACE_L)) { + return this.parseOperationDefinition(); + } // Many definitions begin with a description and require a lookahead. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoUnusedVariablesRule = NoUnusedVariablesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -/** - * No unused variables - * - * A GraphQL operation is only valid if all variables defined by an operation - * are used, either directly or within a spread fragment. - * - * See https://spec.graphql.org/draft/#sec-All-Variables-Used - */ -function NoUnusedVariablesRule(context) { - let variableDefs = []; - return { - OperationDefinition: { - enter() { - variableDefs = []; - }, - leave(operation) { - const variableNameUsed = Object.create(null); - const usages = context.getRecursiveVariableUsages(operation); - for (const { - node - } of usages) { - variableNameUsed[node.name.value] = true; - } - for (const variableDef of variableDefs) { - const variableName = variableDef.variable.name.value; - if (variableNameUsed[variableName] !== true) { - context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, { - nodes: variableDef - })); - } - } + const hasDescription = this.peekDescription(); + const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token; + if (keywordToken.kind === _tokenKind.TokenKind.NAME) { + switch (keywordToken.value) { + case 'schema': + return this.parseSchemaDefinition(); + case 'scalar': + return this.parseScalarTypeDefinition(); + case 'type': + return this.parseObjectTypeDefinition(); + case 'interface': + return this.parseInterfaceTypeDefinition(); + case 'union': + return this.parseUnionTypeDefinition(); + case 'enum': + return this.parseEnumTypeDefinition(); + case 'input': + return this.parseInputObjectTypeDefinition(); + case 'directive': + return this.parseDirectiveDefinition(); + } + if (hasDescription) { + throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, 'Unexpected description, descriptions are supported only on type definitions.'); + } + switch (keywordToken.value) { + case 'query': + case 'mutation': + case 'subscription': + return this.parseOperationDefinition(); + case 'fragment': + return this.parseFragmentDefinition(); + case 'extend': + return this.parseTypeSystemExtension(); } - }, - VariableDefinition(def) { - variableDefs.push(def); } - }; -} - -/***/ }), + throw this.unexpected(keywordToken); + } // Implements the parsing rules in the Operations section. -/***/ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs": -/*!*******************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs ***! - \*******************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + /** + * OperationDefinition : + * - SelectionSet + * - OperationType Name? VariableDefinitions? Directives? SelectionSet + */ + parseOperationDefinition() { + const start = this._lexer.token; + if (this.peek(_tokenKind.TokenKind.BRACE_L)) { + return this.node(start, { + kind: _kinds.Kind.OPERATION_DEFINITION, + operation: _ast.OperationTypeNode.QUERY, + name: undefined, + variableDefinitions: [], + directives: [], + selectionSet: this.parseSelectionSet() + }); + } + const operation = this.parseOperationType(); + let name; + if (this.peek(_tokenKind.TokenKind.NAME)) { + name = this.parseName(); + } + return this.node(start, { + kind: _kinds.Kind.OPERATION_DEFINITION, + operation, + name, + variableDefinitions: this.parseVariableDefinitions(), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * OperationType : one of query mutation subscription + */ + parseOperationType() { + const operationToken = this.expectToken(_tokenKind.TokenKind.NAME); + switch (operationToken.value) { + case 'query': + return _ast.OperationTypeNode.QUERY; + case 'mutation': + return _ast.OperationTypeNode.MUTATION; + case 'subscription': + return _ast.OperationTypeNode.SUBSCRIPTION; + } + throw this.unexpected(operationToken); + } + /** + * VariableDefinitions : ( VariableDefinition+ ) + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _sortValueNode = __webpack_require__(/*! ../../utilities/sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs"); -var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); -function reasonMessage(reason) { - if (Array.isArray(reason)) { - return reason.map(_ref => { - let [responseName, subReason] = _ref; - return `subfields "${responseName}" conflict because ` + reasonMessage(subReason); - }).join(' and '); + parseVariableDefinitions() { + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseVariableDefinition, _tokenKind.TokenKind.PAREN_R); } - return reason; -} -/** - * Overlapping fields can be merged - * - * A selection set is only valid if all fields (including spreading any - * fragments) either correspond to distinct response names or can be merged - * without ambiguity. - * - * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging - */ + /** + * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? + */ -function OverlappingFieldsCanBeMergedRule(context) { - // A memoization for when two fragments are compared "between" each other for - // conflicts. Two fragments may be compared many times, so memoizing this can - // dramatically improve the performance of this validator. - const comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given - // selection set. Selection sets may be asked for this information multiple - // times, so this improves the performance of this validator. + parseVariableDefinition() { + return this.node(this._lexer.token, { + kind: _kinds.Kind.VARIABLE_DEFINITION, + variable: this.parseVariable(), + type: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseTypeReference()), + defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.parseConstValueLiteral() : undefined, + directives: this.parseConstDirectives() + }); + } + /** + * Variable : $ Name + */ - const cachedFieldsAndFragmentNames = new Map(); - return { - SelectionSet(selectionSet) { - const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet); - for (const [[responseName, reason], fields1, fields2] of conflicts) { - const reasonMsg = reasonMessage(reason); - context.reportError(new _GraphQLError.GraphQLError(`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, { - nodes: fields1.concat(fields2) - })); - } - } - }; -} - -/** - * Algorithm: - * - * Conflicts occur when two fields exist in a query which will produce the same - * response name, but represent differing values, thus creating a conflict. - * The algorithm below finds all conflicts via making a series of comparisons - * between fields. In order to compare as few fields as possible, this makes - * a series of comparisons "within" sets of fields and "between" sets of fields. - * - * Given any selection set, a collection produces both a set of fields by - * also including all inline fragments, as well as a list of fragments - * referenced by fragment spreads. - * - * A) Each selection set represented in the document first compares "within" its - * collected set of fields, finding any conflicts between every pair of - * overlapping fields. - * Note: This is the *only time* that a the fields "within" a set are compared - * to each other. After this only fields "between" sets are compared. - * - * B) Also, if any fragment is referenced in a selection set, then a - * comparison is made "between" the original set of fields and the - * referenced fragment. - * - * C) Also, if multiple fragments are referenced, then comparisons - * are made "between" each referenced fragment. - * - * D) When comparing "between" a set of fields and a referenced fragment, first - * a comparison is made between each field in the original set of fields and - * each field in the the referenced set of fields. - * - * E) Also, if any fragment is referenced in the referenced selection set, - * then a comparison is made "between" the original set of fields and the - * referenced fragment (recursively referring to step D). - * - * F) When comparing "between" two fragments, first a comparison is made between - * each field in the first referenced set of fields and each field in the the - * second referenced set of fields. - * - * G) Also, any fragments referenced by the first must be compared to the - * second, and any fragments referenced by the second must be compared to the - * first (recursively referring to step F). - * - * H) When comparing two fields, if both have selection sets, then a comparison - * is made "between" both selection sets, first comparing the set of fields in - * the first selection set with the set of fields in the second. - * - * I) Also, if any fragment is referenced in either selection set, then a - * comparison is made "between" the other set of fields and the - * referenced fragment. - * - * J) Also, if two fragments are referenced in both selection sets, then a - * comparison is made "between" the two fragments. - * - */ -// Find all conflicts found "within" a selection set, including those found -// via spreading in fragments. Called when visiting each SelectionSet in the -// GraphQL Document. -function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) { - const conflicts = []; - const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet); // (A) Find find all conflicts "within" the fields of this selection set. - // Note: this is the *only place* `collectConflictsWithin` is called. - - collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap); - if (fragmentNames.length !== 0) { - // (B) Then collect conflicts between these fields and those represented by - // each spread fragment name found. - for (let i = 0; i < fragmentNames.length; i++) { - collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this - // selection set to collect conflicts between fragments spread together. - // This compares each item in the list of fragment names to every other - // item in that same list (except for itself). - - for (let j = i + 1; j < fragmentNames.length; j++) { - collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]); - } - } + parseVariable() { + const start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.DOLLAR); + return this.node(start, { + kind: _kinds.Kind.VARIABLE, + name: this.parseName() + }); } - return conflicts; -} // Collect all conflicts found between a set of fields and a fragment reference -// including via spreading in any nested fragments. + /** + * ``` + * SelectionSet : { Selection+ } + * ``` + */ -function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) { - const fragment = context.getFragment(fragmentName); - if (!fragment) { - return; + parseSelectionSet() { + return this.node(this._lexer.token, { + kind: _kinds.Kind.SELECTION_SET, + selections: this.many(_tokenKind.TokenKind.BRACE_L, this.parseSelection, _tokenKind.TokenKind.BRACE_R) + }); } - const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment); // Do not compare a fragment's fieldMap to itself. - - if (fieldMap === fieldMap2) { - return; - } // (D) First collect any conflicts between the provided collection of fields - // and the collection of fields represented by the given fragment. + /** + * Selection : + * - Field + * - FragmentSpread + * - InlineFragment + */ - collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields - // and any fragment names found in the given fragment. + parseSelection() { + return this.peek(_tokenKind.TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + } + /** + * Field : Alias? Name Arguments? Directives? SelectionSet? + * + * Alias : Name : + */ - for (const referencedFragmentName of referencedFragmentNames) { - // Memoize so two fragments are not compared for conflicts more than once. - if (comparedFragmentPairs.has(referencedFragmentName, fragmentName, areMutuallyExclusive)) { - continue; + parseField() { + const start = this._lexer.token; + const nameOrAlias = this.parseName(); + let alias; + let name; + if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) { + alias = nameOrAlias; + name = this.parseName(); + } else { + name = nameOrAlias; } - comparedFragmentPairs.add(referencedFragmentName, fragmentName, areMutuallyExclusive); - collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName); + return this.node(start, { + kind: _kinds.Kind.FIELD, + alias, + name, + arguments: this.parseArguments(false), + directives: this.parseDirectives(false), + selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined + }); } -} // Collect all conflicts found between two fragments, including via spreading in -// any nested fragments. - -function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) { - // No need to compare a fragment to itself. - if (fragmentName1 === fragmentName2) { - return; - } // Memoize so two fragments are not compared for conflicts more than once. + /** + * Arguments[Const] : ( Argument[?Const]+ ) + */ - if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) { - return; - } - comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); - const fragment1 = context.getFragment(fragmentName1); - const fragment2 = context.getFragment(fragmentName2); - if (!fragment1 || !fragment2) { - return; + parseArguments(isConst) { + const item = isConst ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, item, _tokenKind.TokenKind.PAREN_R); } - const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1); - const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2); // (F) First, collect all conflicts between these two collections of fields - // (not including any nested fragments). - - collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested - // fragments spread in the second fragment. - - for (const referencedFragmentName2 of referencedFragmentNames2) { - collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2); - } // (G) Then collect conflicts between the second fragment and any nested - // fragments spread in the first fragment. + /** + * Argument[Const] : Name : Value[?Const] + */ - for (const referencedFragmentName1 of referencedFragmentNames1) { - collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2); + parseArgument(isConst = false) { + const start = this._lexer.token; + const name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + return this.node(start, { + kind: _kinds.Kind.ARGUMENT, + name, + value: this.parseValueLiteral(isConst) + }); } -} // Find all conflicts found between two selection sets, including those found -// via spreading in fragments. Called when determining if conflicts exist -// between the sub-fields of two overlapping fields. - -function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) { - const conflicts = []; - const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1); - const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2); // (H) First, collect all conflicts between these two collections of field. + parseConstArgument() { + return this.parseArgument(true); + } // Implements the parsing rules in the Fragments section. - collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and - // those referenced by each fragment name associated with the second. + /** + * Corresponds to both FragmentSpread and InlineFragment in the spec. + * + * FragmentSpread : ... FragmentName Directives? + * + * InlineFragment : ... TypeCondition? Directives? SelectionSet + */ - for (const fragmentName2 of fragmentNames2) { - collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2); - } // (I) Then collect conflicts between the second collection of fields and - // those referenced by each fragment name associated with the first. + parseFragment() { + const start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.SPREAD); + const hasTypeCondition = this.expectOptionalKeyword('on'); + if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) { + return this.node(start, { + kind: _kinds.Kind.FRAGMENT_SPREAD, + name: this.parseFragmentName(), + directives: this.parseDirectives(false) + }); + } + return this.node(start, { + kind: _kinds.Kind.INLINE_FRAGMENT, + typeCondition: hasTypeCondition ? this.parseNamedType() : undefined, + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * FragmentDefinition : + * - fragment FragmentName on TypeCondition Directives? SelectionSet + * + * TypeCondition : NamedType + */ - for (const fragmentName1 of fragmentNames1) { - collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1); - } // (J) Also collect conflicts between any fragment names by the first and - // fragment names by the second. This compares each item in the first set of - // names to each item in the second set of names. + parseFragmentDefinition() { + const start = this._lexer.token; + this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes + // the grammar of FragmentDefinition: + // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet - for (const fragmentName1 of fragmentNames1) { - for (const fragmentName2 of fragmentNames2) { - collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2); + if (this._options.allowLegacyFragmentVariables === true) { + return this.node(start, { + kind: _kinds.Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + variableDefinitions: this.parseVariableDefinitions(), + typeCondition: (this.expectKeyword('on'), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); } + return this.node(start, { + kind: _kinds.Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + typeCondition: (this.expectKeyword('on'), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); } - return conflicts; -} // Collect all Conflicts "within" one collection of fields. + /** + * FragmentName : Name but not `on` + */ -function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) { - // A field map is a keyed collection, where each key represents a response - // name and the value at that key is a list of all fields which provide that - // response name. For every response name, if there are multiple fields, they - // must be compared to find a potential conflict. - for (const [responseName, fields] of Object.entries(fieldMap)) { - // This compares every field in the list to every other field in this list - // (except to itself). If the list only has one item, nothing needs to - // be compared. - if (fields.length > 1) { - for (let i = 0; i < fields.length; i++) { - for (let j = i + 1; j < fields.length; j++) { - const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, - // within one collection is never mutually exclusive - responseName, fields[i], fields[j]); - if (conflict) { - conflicts.push(conflict); - } - } - } + parseFragmentName() { + if (this._lexer.token.value === 'on') { + throw this.unexpected(); } - } -} // Collect all Conflicts between two collections of fields. This is similar to, -// but different from the `collectConflictsWithin` function above. This check -// assumes that `collectConflictsWithin` has already been called on each -// provided collection of fields. This is true because this validator traverses -// each individual selection set. + return this.parseName(); + } // Implements the parsing rules in the Values section. -function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) { - // A field map is a keyed collection, where each key represents a response - // name and the value at that key is a list of all fields which provide that - // response name. For any response name which appears in both provided field - // maps, each field from the first field map must be compared to every field - // in the second field map to find potential conflicts. - for (const [responseName, fields1] of Object.entries(fieldMap1)) { - const fields2 = fieldMap2[responseName]; - if (fields2) { - for (const field1 of fields1) { - for (const field2 of fields2) { - const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2); - if (conflict) { - conflicts.push(conflict); + /** + * Value[Const] : + * - [~Const] Variable + * - IntValue + * - FloatValue + * - StringValue + * - BooleanValue + * - NullValue + * - EnumValue + * - ListValue[?Const] + * - ObjectValue[?Const] + * + * BooleanValue : one of `true` `false` + * + * NullValue : `null` + * + * EnumValue : Name but not `true`, `false` or `null` + */ + + parseValueLiteral(isConst) { + const token = this._lexer.token; + switch (token.kind) { + case _tokenKind.TokenKind.BRACKET_L: + return this.parseList(isConst); + case _tokenKind.TokenKind.BRACE_L: + return this.parseObject(isConst); + case _tokenKind.TokenKind.INT: + this.advanceLexer(); + return this.node(token, { + kind: _kinds.Kind.INT, + value: token.value + }); + case _tokenKind.TokenKind.FLOAT: + this.advanceLexer(); + return this.node(token, { + kind: _kinds.Kind.FLOAT, + value: token.value + }); + case _tokenKind.TokenKind.STRING: + case _tokenKind.TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + case _tokenKind.TokenKind.NAME: + this.advanceLexer(); + switch (token.value) { + case 'true': + return this.node(token, { + kind: _kinds.Kind.BOOLEAN, + value: true + }); + case 'false': + return this.node(token, { + kind: _kinds.Kind.BOOLEAN, + value: false + }); + case 'null': + return this.node(token, { + kind: _kinds.Kind.NULL + }); + default: + return this.node(token, { + kind: _kinds.Kind.ENUM, + value: token.value + }); + } + case _tokenKind.TokenKind.DOLLAR: + if (isConst) { + this.expectToken(_tokenKind.TokenKind.DOLLAR); + if (this._lexer.token.kind === _tokenKind.TokenKind.NAME) { + const varName = this._lexer.token.value; + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected variable "$${varName}" in constant value.`); + } else { + throw this.unexpected(token); } } - } + return this.parseVariable(); + default: + throw this.unexpected(); } } -} // Determines if there is a conflict between two particular fields, including -// comparing their sub-fields. - -function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) { - const [parentType1, node1, def1] = field1; - const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same - // time, due to the parent types, then it is safe to permit them to diverge - // in aliased field or arguments used as they will not present any ambiguity - // by differing. - // It is known that two parent types could never overlap if they are - // different Object types. Interface or Union types might overlap - if not - // in the current state of the schema, then perhaps in some future version, - // thus may not safely diverge. - - const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2); - if (!areMutuallyExclusive) { - // Two aliases must refer to the same field. - const name1 = node1.name.value; - const name2 = node2.name.value; - if (name1 !== name2) { - return [[responseName, `"${name1}" and "${name2}" are different fields`], [node1], [node2]]; - } // Two field calls must have the same arguments. - - if (!sameArguments(node1, node2)) { - return [[responseName, 'they have differing arguments'], [node1], [node2]]; - } - } // The return type for each field. - - const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; - const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; - if (type1 && type2 && doTypesConflict(type1, type2)) { - return [[responseName, `they return conflicting types "${(0, _inspect.inspect)(type1)}" and "${(0, _inspect.inspect)(type2)}"`], [node1], [node2]]; - } // Collect and compare sub-fields. Use the same "visited fragment names" list - // for both collections so fields in a fragment reference are never - // compared to themselves. - - const selectionSet1 = node1.selectionSet; - const selectionSet2 = node2.selectionSet; - if (selectionSet1 && selectionSet2) { - const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2); - return subfieldConflicts(conflicts, responseName, node1, node2); + parseConstValueLiteral() { + return this.parseValueLiteral(true); } -} -function sameArguments(node1, node2) { - const args1 = node1.arguments; - const args2 = node2.arguments; - if (args1 === undefined || args1.length === 0) { - return args2 === undefined || args2.length === 0; + parseStringLiteral() { + const token = this._lexer.token; + this.advanceLexer(); + return this.node(token, { + kind: _kinds.Kind.STRING, + value: token.value, + block: token.kind === _tokenKind.TokenKind.BLOCK_STRING + }); } - if (args2 === undefined || args2.length === 0) { - return false; + /** + * ListValue[Const] : + * - [ ] + * - [ Value[?Const]+ ] + */ + + parseList(isConst) { + const item = () => this.parseValueLiteral(isConst); + return this.node(this._lexer.token, { + kind: _kinds.Kind.LIST, + values: this.any(_tokenKind.TokenKind.BRACKET_L, item, _tokenKind.TokenKind.BRACKET_R) + }); } - /* c8 ignore next */ + /** + * ``` + * ObjectValue[Const] : + * - { } + * - { ObjectField[?Const]+ } + * ``` + */ - if (args1.length !== args2.length) { - /* c8 ignore next */ - return false; - /* c8 ignore next */ + parseObject(isConst) { + const item = () => this.parseObjectField(isConst); + return this.node(this._lexer.token, { + kind: _kinds.Kind.OBJECT, + fields: this.any(_tokenKind.TokenKind.BRACE_L, item, _tokenKind.TokenKind.BRACE_R) + }); } + /** + * ObjectField[Const] : Name : Value[?Const] + */ - const values2 = new Map(args2.map(_ref2 => { - let { + parseObjectField(isConst) { + const start = this._lexer.token; + const name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + return this.node(start, { + kind: _kinds.Kind.OBJECT_FIELD, name, - value - } = _ref2; - return [name.value, value]; - })); - return args1.every(arg1 => { - const value1 = arg1.value; - const value2 = values2.get(arg1.name.value); - if (value2 === undefined) { - return false; - } - return stringifyValue(value1) === stringifyValue(value2); - }); -} -function stringifyValue(value) { - return (0, _printer.print)((0, _sortValueNode.sortValueNode)(value)); -} // Two types conflict if both types could not apply to a value simultaneously. -// Composite types are ignored as their individual field types will be compared -// later recursively. However List and Non-Null types must match. + value: this.parseValueLiteral(isConst) + }); + } // Implements the parsing rules in the Directives section. -function doTypesConflict(type1, type2) { - if ((0, _definition.isListType)(type1)) { - return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; - } - if ((0, _definition.isListType)(type2)) { - return true; - } - if ((0, _definition.isNonNullType)(type1)) { - return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; - } - if ((0, _definition.isNonNullType)(type2)) { - return true; + /** + * Directives[Const] : Directive[?Const]+ + */ + + parseDirectives(isConst) { + const directives = []; + while (this.peek(_tokenKind.TokenKind.AT)) { + directives.push(this.parseDirective(isConst)); + } + return directives; } - if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) { - return type1 !== type2; + parseConstDirectives() { + return this.parseDirectives(true); } - return false; -} // Given a selection set, return the collection of fields (a mapping of response -// name to field nodes and definitions) as well as a list of fragment names -// referenced via fragment spreads. + /** + * ``` + * Directive[Const] : @ Name Arguments[?Const]? + * ``` + */ -function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) { - const cached = cachedFieldsAndFragmentNames.get(selectionSet); - if (cached) { - return cached; + parseDirective(isConst) { + const start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.AT); + return this.node(start, { + kind: _kinds.Kind.DIRECTIVE, + name: this.parseName(), + arguments: this.parseArguments(isConst) + }); + } // Implements the parsing rules in the Types section. + + /** + * Type : + * - NamedType + * - ListType + * - NonNullType + */ + + parseTypeReference() { + const start = this._lexer.token; + let type; + if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) { + const innerType = this.parseTypeReference(); + this.expectToken(_tokenKind.TokenKind.BRACKET_R); + type = this.node(start, { + kind: _kinds.Kind.LIST_TYPE, + type: innerType + }); + } else { + type = this.parseNamedType(); + } + if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) { + return this.node(start, { + kind: _kinds.Kind.NON_NULL_TYPE, + type + }); + } + return type; } - const nodeAndDefs = Object.create(null); - const fragmentNames = Object.create(null); - _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames); - const result = [nodeAndDefs, Object.keys(fragmentNames)]; - cachedFieldsAndFragmentNames.set(selectionSet, result); - return result; -} // Given a reference to a fragment, return the represented collection of fields -// as well as a list of nested fragment names referenced via fragment spreads. + /** + * NamedType : Name + */ -function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) { - // Short-circuit building a type from the node if possible. - const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); - if (cached) { - return cached; + parseNamedType() { + return this.node(this._lexer.token, { + kind: _kinds.Kind.NAMED_TYPE, + name: this.parseName() + }); + } // Implements the parsing rules in the Type Definition section. + + peekDescription() { + return this.peek(_tokenKind.TokenKind.STRING) || this.peek(_tokenKind.TokenKind.BLOCK_STRING); } - const fragmentType = (0, _typeFromAST.typeFromAST)(context.getSchema(), fragment.typeCondition); - return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet); -} -function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) { - for (const selection of selectionSet.selections) { - switch (selection.kind) { - case _kinds.Kind.FIELD: - { - const fieldName = selection.name.value; - let fieldDef; - if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { - fieldDef = parentType.getFields()[fieldName]; - } - const responseName = selection.alias ? selection.alias.value : fieldName; - if (!nodeAndDefs[responseName]) { - nodeAndDefs[responseName] = []; - } - nodeAndDefs[responseName].push([parentType, selection, fieldDef]); - break; - } - case _kinds.Kind.FRAGMENT_SPREAD: - fragmentNames[selection.name.value] = true; - break; - case _kinds.Kind.INLINE_FRAGMENT: - { - const typeCondition = selection.typeCondition; - const inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType; - _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames); - break; - } + /** + * Description : StringValue + */ + + parseDescription() { + if (this.peekDescription()) { + return this.parseStringLiteral(); } } -} // Given a series of Conflicts which occurred between two sub-fields, generate -// a single Conflict. + /** + * ``` + * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } + * ``` + */ -function subfieldConflicts(conflicts, responseName, node1, node2) { - if (conflicts.length > 0) { - return [[responseName, conflicts.map(_ref3 => { - let [reason] = _ref3; - return reason; - })], [node1, ...conflicts.map(_ref4 => { - let [, fields1] = _ref4; - return fields1; - }).flat()], [node2, ...conflicts.map(_ref5 => { - let [,, fields2] = _ref5; - return fields2; - }).flat()]]; + parseSchemaDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('schema'); + const directives = this.parseConstDirectives(); + const operationTypes = this.many(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); + return this.node(start, { + kind: _kinds.Kind.SCHEMA_DEFINITION, + description, + directives, + operationTypes + }); } -} -/** - * A way to keep track of pairs of things when the ordering of the pair does not matter. - */ + /** + * OperationTypeDefinition : OperationType : NamedType + */ -class PairSet { - constructor() { - this._data = new Map(); + parseOperationTypeDefinition() { + const start = this._lexer.token; + const operation = this.parseOperationType(); + this.expectToken(_tokenKind.TokenKind.COLON); + const type = this.parseNamedType(); + return this.node(start, { + kind: _kinds.Kind.OPERATION_TYPE_DEFINITION, + operation, + type + }); } - has(a, b, areMutuallyExclusive) { - var _this$_data$get; - const [key1, key2] = a < b ? [a, b] : [b, a]; - const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2); - if (result === undefined) { - return false; - } // areMutuallyExclusive being false is a superset of being true, hence if - // we want to know if this PairSet "has" these two with no exclusivity, - // we have to ensure it was added as such. + /** + * ScalarTypeDefinition : Description? scalar Name Directives[Const]? + */ - return areMutuallyExclusive ? true : areMutuallyExclusive === result; + parseScalarTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('scalar'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: _kinds.Kind.SCALAR_TYPE_DEFINITION, + description, + name, + directives + }); } - add(a, b, areMutuallyExclusive) { - const [key1, key2] = a < b ? [a, b] : [b, a]; - const map = this._data.get(key1); - if (map === undefined) { - this._data.set(key1, new Map([[key2, areMutuallyExclusive]])); - } else { - map.set(key2, areMutuallyExclusive); - } + /** + * ObjectTypeDefinition : + * Description? + * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? + */ + + parseObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('type'); + const name = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: _kinds.Kind.OBJECT_TYPE_DEFINITION, + description, + name, + interfaces, + directives, + fields + }); } -} + /** + * ImplementsInterfaces : + * - implements `&`? NamedType + * - ImplementsInterfaces & NamedType + */ -/***/ }), + parseImplementsInterfaces() { + return this.expectOptionalKeyword('implements') ? this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType) : []; + } + /** + * ``` + * FieldsDefinition : { FieldDefinition+ } + * ``` + */ -/***/ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs": -/*!**************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs ***! - \**************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + parseFieldsDefinition() { + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseFieldDefinition, _tokenKind.TokenKind.BRACE_R); + } + /** + * FieldDefinition : + * - Description? Name ArgumentsDefinition? : Type Directives[Const]? + */ + parseFieldDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name = this.parseName(); + const args = this.parseArgumentDefs(); + this.expectToken(_tokenKind.TokenKind.COLON); + const type = this.parseTypeReference(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: _kinds.Kind.FIELD_DEFINITION, + description, + name, + arguments: args, + type, + directives + }); + } + /** + * ArgumentsDefinition : ( InputValueDefinition+ ) + */ + parseArgumentDefs() { + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseInputValueDef, _tokenKind.TokenKind.PAREN_R); + } + /** + * InputValueDefinition : + * - Description? Name : Type DefaultValue? Directives[Const]? + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); -var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); -/** - * Possible fragment spread - * - * A fragment spread is only valid if the type condition could ever possibly - * be true: if there is a non-empty intersection of the possible parent types, - * and possible types which pass the type condition. - */ -function PossibleFragmentSpreadsRule(context) { - return { - InlineFragment(node) { - const fragType = context.getType(); - const parentType = context.getParentType(); - if ((0, _definition.isCompositeType)(fragType) && (0, _definition.isCompositeType)(parentType) && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { - const parentTypeStr = (0, _inspect.inspect)(parentType); - const fragTypeStr = (0, _inspect.inspect)(fragType); - context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { - nodes: node - })); - } - }, - FragmentSpread(node) { - const fragName = node.name.value; - const fragType = getFragmentType(context, fragName); - const parentType = context.getParentType(); - if (fragType && parentType && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { - const parentTypeStr = (0, _inspect.inspect)(parentType); - const fragTypeStr = (0, _inspect.inspect)(fragType); - context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { - nodes: node - })); - } - } - }; -} -function getFragmentType(context, name) { - const frag = context.getFragment(name); - if (frag) { - const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), frag.typeCondition); - if ((0, _definition.isCompositeType)(type)) { - return type; + parseInputValueDef() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + const type = this.parseTypeReference(); + let defaultValue; + if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) { + defaultValue = this.parseConstValueLiteral(); } + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: _kinds.Kind.INPUT_VALUE_DEFINITION, + description, + name, + type, + defaultValue, + directives + }); } -} + /** + * InterfaceTypeDefinition : + * - Description? interface Name Directives[Const]? FieldsDefinition? + */ -/***/ }), + parseInterfaceTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('interface'); + const name = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION, + description, + name, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeDefinition : + * - Description? union Name Directives[Const]? UnionMemberTypes? + */ -/***/ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs": -/*!*************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs ***! - \*************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + parseUnionTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('union'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + return this.node(start, { + kind: _kinds.Kind.UNION_TYPE_DEFINITION, + description, + name, + directives, + types + }); + } + /** + * UnionMemberTypes : + * - = `|`? NamedType + * - UnionMemberTypes | NamedType + */ + parseUnionMemberTypes() { + return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType) : []; + } + /** + * EnumTypeDefinition : + * - Description? enum Name Directives[Const]? EnumValuesDefinition? + */ + parseEnumTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('enum'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + return this.node(start, { + kind: _kinds.Kind.ENUM_TYPE_DEFINITION, + description, + name, + directives, + values + }); + } + /** + * ``` + * EnumValuesDefinition : { EnumValueDefinition+ } + * ``` + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule; -var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -/** - * Possible type extension - * - * A type extension is only valid if the type is defined and has the same kind. - */ -function PossibleTypeExtensionsRule(context) { - const schema = context.getSchema(); - const definedTypes = Object.create(null); - for (const def of context.getDocument().definitions) { - if ((0, _predicates.isTypeDefinitionNode)(def)) { - definedTypes[def.name.value] = def; - } + parseEnumValuesDefinition() { + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseEnumValueDefinition, _tokenKind.TokenKind.BRACE_R); } - return { - ScalarTypeExtension: checkExtension, - ObjectTypeExtension: checkExtension, - InterfaceTypeExtension: checkExtension, - UnionTypeExtension: checkExtension, - EnumTypeExtension: checkExtension, - InputObjectTypeExtension: checkExtension - }; - function checkExtension(node) { - const typeName = node.name.value; - const defNode = definedTypes[typeName]; - const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); - let expectedKind; - if (defNode) { - expectedKind = defKindToExtKind[defNode.kind]; - } else if (existingType) { - expectedKind = typeToExtKind(existingType); + /** + * EnumValueDefinition : Description? EnumValue Directives[Const]? + */ + + parseEnumValueDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name = this.parseEnumValueName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: _kinds.Kind.ENUM_VALUE_DEFINITION, + description, + name, + directives + }); + } + /** + * EnumValue : Name but not `true`, `false` or `null` + */ + + parseEnumValueName() { + if (this._lexer.token.value === 'true' || this._lexer.token.value === 'false' || this._lexer.token.value === 'null') { + throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, `${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`); } - if (expectedKind) { - if (expectedKind !== node.kind) { - const kindStr = extensionKindToTypeName(node.kind); - context.reportError(new _GraphQLError.GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, { - nodes: defNode ? [defNode, node] : node - })); - } - } else { - const allTypeNames = Object.keys({ - ...definedTypes, - ...(schema === null || schema === void 0 ? void 0 : schema.getTypeMap()) - }); - const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, allTypeNames); - context.reportError(new _GraphQLError.GraphQLError(`Cannot extend type "${typeName}" because it is not defined.` + (0, _didYouMean.didYouMean)(suggestedTypes), { - nodes: node.name - })); - } - } -} -const defKindToExtKind = { - [_kinds.Kind.SCALAR_TYPE_DEFINITION]: _kinds.Kind.SCALAR_TYPE_EXTENSION, - [_kinds.Kind.OBJECT_TYPE_DEFINITION]: _kinds.Kind.OBJECT_TYPE_EXTENSION, - [_kinds.Kind.INTERFACE_TYPE_DEFINITION]: _kinds.Kind.INTERFACE_TYPE_EXTENSION, - [_kinds.Kind.UNION_TYPE_DEFINITION]: _kinds.Kind.UNION_TYPE_EXTENSION, - [_kinds.Kind.ENUM_TYPE_DEFINITION]: _kinds.Kind.ENUM_TYPE_EXTENSION, - [_kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION]: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION -}; -function typeToExtKind(type) { - if ((0, _definition.isScalarType)(type)) { - return _kinds.Kind.SCALAR_TYPE_EXTENSION; + return this.parseName(); } - if ((0, _definition.isObjectType)(type)) { - return _kinds.Kind.OBJECT_TYPE_EXTENSION; + /** + * InputObjectTypeDefinition : + * - Description? input Name Directives[Const]? InputFieldsDefinition? + */ + + parseInputObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('input'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + return this.node(start, { + kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION, + description, + name, + directives, + fields + }); } - if ((0, _definition.isInterfaceType)(type)) { - return _kinds.Kind.INTERFACE_TYPE_EXTENSION; + /** + * ``` + * InputFieldsDefinition : { InputValueDefinition+ } + * ``` + */ + + parseInputFieldsDefinition() { + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseInputValueDef, _tokenKind.TokenKind.BRACE_R); } - if ((0, _definition.isUnionType)(type)) { - return _kinds.Kind.UNION_TYPE_EXTENSION; + /** + * TypeSystemExtension : + * - SchemaExtension + * - TypeExtension + * + * TypeExtension : + * - ScalarTypeExtension + * - ObjectTypeExtension + * - InterfaceTypeExtension + * - UnionTypeExtension + * - EnumTypeExtension + * - InputObjectTypeDefinition + */ + + parseTypeSystemExtension() { + const keywordToken = this._lexer.lookahead(); + if (keywordToken.kind === _tokenKind.TokenKind.NAME) { + switch (keywordToken.value) { + case 'schema': + return this.parseSchemaExtension(); + case 'scalar': + return this.parseScalarTypeExtension(); + case 'type': + return this.parseObjectTypeExtension(); + case 'interface': + return this.parseInterfaceTypeExtension(); + case 'union': + return this.parseUnionTypeExtension(); + case 'enum': + return this.parseEnumTypeExtension(); + case 'input': + return this.parseInputObjectTypeExtension(); + } + } + throw this.unexpected(keywordToken); } - if ((0, _definition.isEnumType)(type)) { - return _kinds.Kind.ENUM_TYPE_EXTENSION; + /** + * ``` + * SchemaExtension : + * - extend schema Directives[Const]? { OperationTypeDefinition+ } + * - extend schema Directives[Const] + * ``` + */ + + parseSchemaExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('schema'); + const directives = this.parseConstDirectives(); + const operationTypes = this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); + if (directives.length === 0 && operationTypes.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.SCHEMA_EXTENSION, + directives, + operationTypes + }); } - if ((0, _definition.isInputObjectType)(type)) { - return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; + /** + * ScalarTypeExtension : + * - extend scalar Name Directives[Const] + */ + + parseScalarTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('scalar'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + if (directives.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.SCALAR_TYPE_EXTENSION, + name, + directives + }); } - /* c8 ignore next 3 */ - // Not reachable. All possible types have been considered + /** + * ObjectTypeExtension : + * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend type Name ImplementsInterfaces? Directives[Const] + * - extend type Name ImplementsInterfaces + */ - false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); -} -function extensionKindToTypeName(kind) { - switch (kind) { - case _kinds.Kind.SCALAR_TYPE_EXTENSION: - return 'scalar'; - case _kinds.Kind.OBJECT_TYPE_EXTENSION: - return 'object'; - case _kinds.Kind.INTERFACE_TYPE_EXTENSION: - return 'interface'; - case _kinds.Kind.UNION_TYPE_EXTENSION: - return 'union'; - case _kinds.Kind.ENUM_TYPE_EXTENSION: - return 'enum'; - case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: - return 'input object'; - // Not reachable. All possible types have been considered + parseObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('type'); + const name = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.OBJECT_TYPE_EXTENSION, + name, + interfaces, + directives, + fields + }); + } + /** + * InterfaceTypeExtension : + * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend interface Name ImplementsInterfaces? Directives[Const] + * - extend interface Name ImplementsInterfaces + */ - /* c8 ignore next */ + parseInterfaceTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('interface'); + const name = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION, + name, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeExtension : + * - extend union Name Directives[Const]? UnionMemberTypes + * - extend union Name Directives[Const] + */ - default: - false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(kind)); + parseUnionTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('union'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + if (directives.length === 0 && types.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.UNION_TYPE_EXTENSION, + name, + directives, + types + }); } -} + /** + * EnumTypeExtension : + * - extend enum Name Directives[Const]? EnumValuesDefinition + * - extend enum Name Directives[Const] + */ -/***/ }), + parseEnumTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('enum'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + if (directives.length === 0 && values.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.ENUM_TYPE_EXTENSION, + name, + directives, + values + }); + } + /** + * InputObjectTypeExtension : + * - extend input Name Directives[Const]? InputFieldsDefinition + * - extend input Name Directives[Const] + */ -/***/ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs": -/*!****************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs ***! - \****************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + parseInputObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('input'); + const name = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + if (directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION, + name, + directives, + fields + }); + } + /** + * ``` + * DirectiveDefinition : + * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations + * ``` + */ + parseDirectiveDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword('directive'); + this.expectToken(_tokenKind.TokenKind.AT); + const name = this.parseName(); + const args = this.parseArgumentDefs(); + const repeatable = this.expectOptionalKeyword('repeatable'); + this.expectKeyword('on'); + const locations = this.parseDirectiveLocations(); + return this.node(start, { + kind: _kinds.Kind.DIRECTIVE_DEFINITION, + description, + name, + arguments: args, + repeatable, + locations + }); + } + /** + * DirectiveLocations : + * - `|`? DirectiveLocation + * - DirectiveLocations | DirectiveLocation + */ + parseDirectiveLocations() { + return this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseDirectiveLocation); + } + /* + * DirectiveLocation : + * - ExecutableDirectiveLocation + * - TypeSystemDirectiveLocation + * + * ExecutableDirectiveLocation : one of + * `QUERY` + * `MUTATION` + * `SUBSCRIPTION` + * `FIELD` + * `FRAGMENT_DEFINITION` + * `FRAGMENT_SPREAD` + * `INLINE_FRAGMENT` + * + * TypeSystemDirectiveLocation : one of + * `SCHEMA` + * `SCALAR` + * `OBJECT` + * `FIELD_DEFINITION` + * `ARGUMENT_DEFINITION` + * `INTERFACE` + * `UNION` + * `ENUM` + * `ENUM_VALUE` + * `INPUT_OBJECT` + * `INPUT_FIELD_DEFINITION` + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.ProvidedRequiredArgumentsOnDirectivesRule = ProvidedRequiredArgumentsOnDirectivesRule; -exports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -/** - * Provided required arguments - * - * A field or directive is only valid if all required (non-null without a - * default value) field arguments have been provided. - */ -function ProvidedRequiredArgumentsRule(context) { - return { - // eslint-disable-next-line new-cap - ...ProvidedRequiredArgumentsOnDirectivesRule(context), - Field: { - // Validate on leave to allow for deeper errors to appear first. - leave(fieldNode) { - var _fieldNode$arguments; - const fieldDef = context.getFieldDef(); - if (!fieldDef) { - return false; - } - const providedArgs = new Set( - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - /* c8 ignore next */ - (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map(arg => arg.name.value)); - for (const argDef of fieldDef.args) { - if (!providedArgs.has(argDef.name) && (0, _definition.isRequiredArgument)(argDef)) { - const argTypeStr = (0, _inspect.inspect)(argDef.type); - context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, { - nodes: fieldNode - })); - } - } - } + parseDirectiveLocation() { + const start = this._lexer.token; + const name = this.parseName(); + if (Object.prototype.hasOwnProperty.call(_directiveLocation.DirectiveLocation, name.value)) { + return name; } - }; -} -/** - * @internal - */ + throw this.unexpected(start); + } // Core parsing utility functions -function ProvidedRequiredArgumentsOnDirectivesRule(context) { - var _schema$getDirectives; - const requiredArgsMap = Object.create(null); - const schema = context.getSchema(); - const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : _directives.specifiedDirectives; - for (const directive of definedDirectives) { - requiredArgsMap[directive.name] = (0, _keyMap.keyMap)(directive.args.filter(_definition.isRequiredArgument), arg => arg.name); + /** + * Returns a node that, if configured to do so, sets a "loc" field as a + * location object, used to identify the place in the source that created a + * given parsed object. + */ + + node(startToken, node) { + if (this._options.noLocation !== true) { + node.loc = new _ast.Location(startToken, this._lexer.lastToken, this._lexer.source); + } + return node; } - const astDefinitions = context.getDocument().definitions; - for (const def of astDefinitions) { - if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { - var _def$arguments; + /** + * Determines if the next token is of a given kind + */ - // FIXME: https://github.com/graphql/graphql-js/issues/2203 + peek(kind) { + return this._lexer.token.kind === kind; + } + /** + * If the next token is of the given kind, return that token after advancing the lexer. + * Otherwise, do not change the parser state and throw an error. + */ - /* c8 ignore next */ - const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; - requiredArgsMap[def.name.value] = (0, _keyMap.keyMap)(argNodes.filter(isRequiredArgumentNode), arg => arg.name.value); + expectToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return token; } + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`); } - return { - Directive: { - // Validate on leave to allow for deeper errors to appear first. - leave(directiveNode) { - const directiveName = directiveNode.name.value; - const requiredArgs = requiredArgsMap[directiveName]; - if (requiredArgs) { - var _directiveNode$argume; + /** + * If the next token is of the given kind, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ - // FIXME: https://github.com/graphql/graphql-js/issues/2203 + expectOptionalToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * If the next token is a given keyword, advance the lexer. + * Otherwise, do not change the parser state and throw an error. + */ - /* c8 ignore next */ - const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; - const argNodeMap = new Set(argNodes.map(arg => arg.name.value)); - for (const [argName, argDef] of Object.entries(requiredArgs)) { - if (!argNodeMap.has(argName)) { - const argType = (0, _definition.isType)(argDef.type) ? (0, _inspect.inspect)(argDef.type) : (0, _printer.print)(argDef.type); - context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, { - nodes: directiveNode - })); - } - } - } - } + expectKeyword(value) { + const token = this._lexer.token; + if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { + this.advanceLexer(); + } else { + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected "${value}", found ${getTokenDesc(token)}.`); } - }; -} -function isRequiredArgumentNode(arg) { - return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null; -} + } + /** + * If the next token is a given keyword, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ -/***/ }), + expectOptionalKeyword(value) { + const token = this._lexer.token; + if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * Helper function for creating an error when an unexpected lexed token is encountered. + */ -/***/ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs": -/*!**************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + unexpected(atToken) { + const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; + return (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`); + } + /** + * Returns a possibly empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + any(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + while (!this.expectOptionalToken(closeKind)) { + nodes.push(parseFn.call(this)); + } + return nodes; + } + /** + * Returns a list of parse nodes, determined by the parseFn. + * It can be empty only if open token is missing otherwise it will always return non-empty list + * that begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + optionalMany(openKind, parseFn, closeKind) { + if (this.expectOptionalToken(openKind)) { + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + return []; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.ScalarLeafsRule = ScalarLeafsRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -/** - * Scalar leafs - * - * A GraphQL document is valid only if all leaf fields (fields without - * sub selections) are of scalar or enum types. - */ -function ScalarLeafsRule(context) { - return { - Field(node) { - const type = context.getType(); - const selectionSet = node.selectionSet; - if (type) { - if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) { - if (selectionSet) { - const fieldName = node.name.value; - const typeStr = (0, _inspect.inspect)(type); - context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, { - nodes: selectionSet - })); - } - } else if (!selectionSet) { - const fieldName = node.name.value; - const typeStr = (0, _inspect.inspect)(type); - context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, { - nodes: node - })); - } + many(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. + * Advances the parser to the next lex token after last item in the list. + */ + + delimitedMany(delimiterKind, parseFn) { + this.expectOptionalToken(delimiterKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (this.expectOptionalToken(delimiterKind)); + return nodes; + } + advanceLexer() { + const { + maxTokens + } = this._options; + const token = this._lexer.advance(); + if (maxTokens !== undefined && token.kind !== _tokenKind.TokenKind.EOF) { + ++this._tokenCounter; + if (this._tokenCounter > maxTokens) { + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`); } } - }; + } +} +/** + * A helper function to describe a token as a string for debugging. + */ +exports.Parser = Parser; +function getTokenDesc(token) { + const value = token.value; + return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : ''); +} +/** + * A helper function to describe a token kind as a string for debugging. + */ + +function getTokenKindDesc(kind) { + return (0, _lexer.isPunctuatorTokenKind)(kind) ? `"${kind}"` : kind; } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs": -/*!***************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs ***! - \***************************************************************************************/ +/***/ "../../../node_modules/graphql/language/predicates.mjs": +/*!*************************************************************!*\ + !*** ../../../node_modules/graphql/language/predicates.mjs ***! + \*************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _collectFields = __webpack_require__(/*! ../../execution/collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs"); -/** - * Subscriptions must only include a non-introspection field. - * - * A GraphQL subscription is valid only if it contains a single root field and - * that root field is not an introspection field. - * - * See https://spec.graphql.org/draft/#sec-Single-root-field - */ -function SingleFieldSubscriptionsRule(context) { - return { - OperationDefinition(node) { - if (node.operation === 'subscription') { - const schema = context.getSchema(); - const subscriptionType = schema.getSubscriptionType(); - if (subscriptionType) { - const operationName = node.name ? node.name.value : null; - const variableValues = Object.create(null); - const document = context.getDocument(); - const fragments = Object.create(null); - for (const definition of document.definitions) { - if (definition.kind === _kinds.Kind.FRAGMENT_DEFINITION) { - fragments[definition.name.value] = definition; - } - } - const fields = (0, _collectFields.collectFields)(schema, fragments, variableValues, subscriptionType, node.selectionSet); - if (fields.size > 1) { - const fieldSelectionLists = [...fields.values()]; - const extraFieldSelectionLists = fieldSelectionLists.slice(1); - const extraFieldSelections = extraFieldSelectionLists.flat(); - context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must select only one top level field.` : 'Anonymous Subscription must select only one top level field.', { - nodes: extraFieldSelections - })); - } - for (const fieldNodes of fields.values()) { - const field = fieldNodes[0]; - const fieldName = field.name.value; - if (fieldName.startsWith('__')) { - context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : 'Anonymous Subscription must not select an introspection top level field.', { - nodes: fieldNodes - })); - } - } - } - } - } - }; +exports.isConstValueNode = isConstValueNode; +exports.isDefinitionNode = isDefinitionNode; +exports.isExecutableDefinitionNode = isExecutableDefinitionNode; +exports.isSelectionNode = isSelectionNode; +exports.isTypeDefinitionNode = isTypeDefinitionNode; +exports.isTypeExtensionNode = isTypeExtensionNode; +exports.isTypeNode = isTypeNode; +exports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode; +exports.isTypeSystemExtensionNode = isTypeSystemExtensionNode; +exports.isValueNode = isValueNode; +var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +function isDefinitionNode(node) { + return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node); +} +function isExecutableDefinitionNode(node) { + return node.kind === _kinds.Kind.OPERATION_DEFINITION || node.kind === _kinds.Kind.FRAGMENT_DEFINITION; +} +function isSelectionNode(node) { + return node.kind === _kinds.Kind.FIELD || node.kind === _kinds.Kind.FRAGMENT_SPREAD || node.kind === _kinds.Kind.INLINE_FRAGMENT; +} +function isValueNode(node) { + return node.kind === _kinds.Kind.VARIABLE || node.kind === _kinds.Kind.INT || node.kind === _kinds.Kind.FLOAT || node.kind === _kinds.Kind.STRING || node.kind === _kinds.Kind.BOOLEAN || node.kind === _kinds.Kind.NULL || node.kind === _kinds.Kind.ENUM || node.kind === _kinds.Kind.LIST || node.kind === _kinds.Kind.OBJECT; +} +function isConstValueNode(node) { + return isValueNode(node) && (node.kind === _kinds.Kind.LIST ? node.values.some(isConstValueNode) : node.kind === _kinds.Kind.OBJECT ? node.fields.some(field => isConstValueNode(field.value)) : node.kind !== _kinds.Kind.VARIABLE); +} +function isTypeNode(node) { + return node.kind === _kinds.Kind.NAMED_TYPE || node.kind === _kinds.Kind.LIST_TYPE || node.kind === _kinds.Kind.NON_NULL_TYPE; +} +function isTypeSystemDefinitionNode(node) { + return node.kind === _kinds.Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds.Kind.DIRECTIVE_DEFINITION; +} +function isTypeDefinitionNode(node) { + return node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION || node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION || node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION || node.kind === _kinds.Kind.UNION_TYPE_DEFINITION || node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION; +} +function isTypeSystemExtensionNode(node) { + return node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); +} +function isTypeExtensionNode(node) { + return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs": -/*!********************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs ***! - \********************************************************************************************/ +/***/ "../../../node_modules/graphql/language/printLocation.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/language/printLocation.mjs ***! + \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueArgumentDefinitionNamesRule = UniqueArgumentDefinitionNamesRule; -var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.printLocation = printLocation; +exports.printSourceLocation = printSourceLocation; +var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs"); /** - * Unique argument definition names - * - * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments. - * A GraphQL Directive is only valid if all its arguments are uniquely named. + * Render a helpful description of the location in the GraphQL Source document. + */ +function printLocation(location) { + return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start)); +} +/** + * Render a helpful description of the location in the GraphQL Source document. */ -function UniqueArgumentDefinitionNamesRule(context) { - return { - DirectiveDefinition(directiveNode) { - var _directiveNode$argume; - - // FIXME: https://github.com/graphql/graphql-js/issues/2203 - - /* c8 ignore next */ - const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; - return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes); - }, - InterfaceTypeDefinition: checkArgUniquenessPerField, - InterfaceTypeExtension: checkArgUniquenessPerField, - ObjectTypeDefinition: checkArgUniquenessPerField, - ObjectTypeExtension: checkArgUniquenessPerField - }; - function checkArgUniquenessPerField(typeNode) { - var _typeNode$fields; - const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - - /* c8 ignore next */ - - const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : []; - for (const fieldDef of fieldNodes) { - var _fieldDef$arguments; - const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - /* c8 ignore next */ +function printSourceLocation(source, sourceLocation) { + const firstLineColumnOffset = source.locationOffset.column - 1; + const body = ''.padStart(firstLineColumnOffset) + source.body; + const lineIndex = sourceLocation.line - 1; + const lineOffset = source.locationOffset.line - 1; + const lineNum = sourceLocation.line + lineOffset; + const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + const columnNum = sourceLocation.column + columnOffset; + const locationStr = `${source.name}:${lineNum}:${columnNum}\n`; + const lines = body.split(/\r\n|[\n\r]/g); + const locationLine = lines[lineIndex]; // Special case for minified documents - const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : []; - checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes); - } - return false; - } - function checkArgUniqueness(parentName, argumentNodes) { - const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value); - for (const [argName, argNodes] of seenArgs) { - if (argNodes.length > 1) { - context.reportError(new _GraphQLError.GraphQLError(`Argument "${parentName}(${argName}:)" can only be defined once.`, { - nodes: argNodes.map(node => node.name) - })); - } + if (locationLine.length > 120) { + const subLineIndex = Math.floor(columnNum / 80); + const subLineColumnNum = columnNum % 80; + const subLines = []; + for (let i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); } - return false; + return locationStr + printPrefixedLines([[`${lineNum} |`, subLines[0]], ...subLines.slice(1, subLineIndex + 1).map(subLine => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)], ['|', subLines[subLineIndex + 1]]]); } + return locationStr + printPrefixedLines([ + // Lines specified like this: ["prefix", "string"], + [`${lineNum - 1} |`, lines[lineIndex - 1]], [`${lineNum} |`, locationLine], ['|', '^'.padStart(columnNum)], [`${lineNum + 1} |`, lines[lineIndex + 1]]]); +} +function printPrefixedLines(lines) { + const existingLines = lines.filter(([_, line]) => line !== undefined); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : '')).join('\n'); } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs": -/*!**********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs ***! - \**********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/language/printString.mjs": +/*!**************************************************************!*\ + !*** ../../../node_modules/graphql/language/printString.mjs ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule; -var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.printString = printString; /** - * Unique argument names - * - * A GraphQL field or directive is only valid if all supplied arguments are - * uniquely named. - * - * See https://spec.graphql.org/draft/#sec-Argument-Names + * Prints a string as a GraphQL StringValue literal. Replaces control characters + * and excluded characters (" U+0022 and \\ U+005C) with escape sequences. */ -function UniqueArgumentNamesRule(context) { - return { - Field: checkArgUniqueness, - Directive: checkArgUniqueness - }; - function checkArgUniqueness(parentNode) { - var _parentNode$arguments; +function printString(str) { + return `"${str.replace(escapedRegExp, escapedReplacer)}"`; +} // eslint-disable-next-line no-control-regex - // FIXME: https://github.com/graphql/graphql-js/issues/2203 +const escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; +function escapedReplacer(str) { + return escapeSequences[str.charCodeAt(0)]; +} // prettier-ignore - /* c8 ignore next */ - const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : []; - const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value); - for (const [argName, argNodes] of seenArgs) { - if (argNodes.length > 1) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one argument named "${argName}".`, { - nodes: argNodes.map(node => node.name) - })); - } - } - } -} +const escapeSequences = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F', '', '', '\\"', '', '', '', '', '', '', '', '', '', '', '', '', '', +// 2F +'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', +// 3F +'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', +// 4F +'', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '', +// 5F +'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', +// 6F +'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\u007F', '\\u0080', '\\u0081', '\\u0082', '\\u0083', '\\u0084', '\\u0085', '\\u0086', '\\u0087', '\\u0088', '\\u0089', '\\u008A', '\\u008B', '\\u008C', '\\u008D', '\\u008E', '\\u008F', '\\u0090', '\\u0091', '\\u0092', '\\u0093', '\\u0094', '\\u0095', '\\u0096', '\\u0097', '\\u0098', '\\u0099', '\\u009A', '\\u009B', '\\u009C', '\\u009D', '\\u009E', '\\u009F']; /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs ***! - \***********************************************************************************/ +/***/ "../../../node_modules/graphql/language/printer.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/language/printer.mjs ***! + \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.print = print; +var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); +var _printString = __webpack_require__(/*! ./printString.mjs */ "../../../node_modules/graphql/language/printString.mjs"); +var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); /** - * Unique directive names - * - * A GraphQL document is only valid if all defined directives have unique names. + * Converts an AST into a string, using one set of reasonable + * formatting rules. */ -function UniqueDirectiveNamesRule(context) { - const knownDirectiveNames = Object.create(null); - const schema = context.getSchema(); - return { - DirectiveDefinition(node) { - const directiveName = node.name.value; - if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) { - context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, { - nodes: node.name - })); - return; - } - if (knownDirectiveNames[directiveName]) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one directive named "@${directiveName}".`, { - nodes: [knownDirectiveNames[directiveName], node.name] - })); - } else { - knownDirectiveNames[directiveName] = node.name; - } - return false; - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs": -/*!******************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs ***! - \******************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - +function print(ast) { + return (0, _visitor.visit)(ast, printDocASTReducer); +} +const MAX_LINE_LENGTH = 80; +const printDocASTReducer = { + Name: { + leave: node => node.value + }, + Variable: { + leave: node => '$' + node.name + }, + // Document + Document: { + leave: node => join(node.definitions, '\n\n') + }, + OperationDefinition: { + leave(node) { + const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')'); + const prefix = join([node.operation, join([node.name, varDefs]), join(node.directives, ' ')], ' '); // Anonymous queries with no directives or variable definitions can use + // the query short form. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); -var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); -/** - * Unique directive names per location - * - * A GraphQL document is only valid if all non-repeatable directives at - * a given location are uniquely named. - * - * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location - */ -function UniqueDirectivesPerLocationRule(context) { - const uniqueDirectiveMap = Object.create(null); - const schema = context.getSchema(); - const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; - for (const directive of definedDirectives) { - uniqueDirectiveMap[directive.name] = !directive.isRepeatable; - } - const astDefinitions = context.getDocument().definitions; - for (const def of astDefinitions) { - if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { - uniqueDirectiveMap[def.name.value] = !def.repeatable; + return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet; } - } - const schemaDirectives = Object.create(null); - const typeDirectivesMap = Object.create(null); - return { - // Many different AST nodes may contain directives. Rather than listing - // them all, just listen for entering any node, and check to see if it - // defines any directives. - enter(node) { - if (!('directives' in node) || !node.directives) { - return; - } - let seenDirectives; - if (node.kind === _kinds.Kind.SCHEMA_DEFINITION || node.kind === _kinds.Kind.SCHEMA_EXTENSION) { - seenDirectives = schemaDirectives; - } else if ((0, _predicates.isTypeDefinitionNode)(node) || (0, _predicates.isTypeExtensionNode)(node)) { - const typeName = node.name.value; - seenDirectives = typeDirectivesMap[typeName]; - if (seenDirectives === undefined) { - typeDirectivesMap[typeName] = seenDirectives = Object.create(null); - } - } else { - seenDirectives = Object.create(null); - } - for (const directive of node.directives) { - const directiveName = directive.name.value; - if (uniqueDirectiveMap[directiveName]) { - if (seenDirectives[directiveName]) { - context.reportError(new _GraphQLError.GraphQLError(`The directive "@${directiveName}" can only be used once at this location.`, { - nodes: [seenDirectives[directiveName], directive] - })); - } else { - seenDirectives[directiveName] = directive; - } - } + }, + VariableDefinition: { + leave: ({ + variable, + type, + defaultValue, + directives + }) => variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' ')) + }, + SelectionSet: { + leave: ({ + selections + }) => block(selections) + }, + Field: { + leave({ + alias, + name, + arguments: args, + directives, + selectionSet + }) { + const prefix = wrap('', alias, ': ') + name; + let argsLine = prefix + wrap('(', join(args, ', '), ')'); + if (argsLine.length > MAX_LINE_LENGTH) { + argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)'); } + return join([argsLine, join(directives, ' '), selectionSet], ' '); } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs ***! - \***********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - + }, + Argument: { + leave: ({ + name, + value + }) => name + ': ' + value + }, + // Fragments + FragmentSpread: { + leave: ({ + name, + directives + }) => '...' + name + wrap(' ', join(directives, ' ')) + }, + InlineFragment: { + leave: ({ + typeCondition, + directives, + selectionSet + }) => join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ') + }, + FragmentDefinition: { + leave: ({ + name, + typeCondition, + variableDefinitions, + directives, + selectionSet + } // Note: fragment variable definitions are experimental and may be changed + ) => + // or removed in the future. + `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` + `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` + selectionSet + }, + // Value + IntValue: { + leave: ({ + value + }) => value + }, + FloatValue: { + leave: ({ + value + }) => value + }, + StringValue: { + leave: ({ + value, + block: isBlockString + }) => isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value) + }, + BooleanValue: { + leave: ({ + value + }) => value ? 'true' : 'false' + }, + NullValue: { + leave: () => 'null' + }, + EnumValue: { + leave: ({ + value + }) => value + }, + ListValue: { + leave: ({ + values + }) => '[' + join(values, ', ') + ']' + }, + ObjectValue: { + leave: ({ + fields + }) => '{' + join(fields, ', ') + '}' + }, + ObjectField: { + leave: ({ + name, + value + }) => name + ': ' + value + }, + // Directive + Directive: { + leave: ({ + name, + arguments: args + }) => '@' + name + wrap('(', join(args, ', '), ')') + }, + // Type + NamedType: { + leave: ({ + name + }) => name + }, + ListType: { + leave: ({ + type + }) => '[' + type + ']' + }, + NonNullType: { + leave: ({ + type + }) => type + '!' + }, + // Type System Definitions + SchemaDefinition: { + leave: ({ + description, + directives, + operationTypes + }) => wrap('', description, '\n') + join(['schema', join(directives, ' '), block(operationTypes)], ' ') + }, + OperationTypeDefinition: { + leave: ({ + operation, + type + }) => operation + ': ' + type + }, + ScalarTypeDefinition: { + leave: ({ + description, + name, + directives + }) => wrap('', description, '\n') + join(['scalar', name, join(directives, ' ')], ' ') + }, + ObjectTypeDefinition: { + leave: ({ + description, + name, + interfaces, + directives, + fields + }) => wrap('', description, '\n') + join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ') + }, + FieldDefinition: { + leave: ({ + description, + name, + arguments: args, + type, + directives + }) => wrap('', description, '\n') + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' ')) + }, + InputValueDefinition: { + leave: ({ + description, + name, + type, + defaultValue, + directives + }) => wrap('', description, '\n') + join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ') + }, + InterfaceTypeDefinition: { + leave: ({ + description, + name, + interfaces, + directives, + fields + }) => wrap('', description, '\n') + join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ') + }, + UnionTypeDefinition: { + leave: ({ + description, + name, + directives, + types + }) => wrap('', description, '\n') + join(['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ') + }, + EnumTypeDefinition: { + leave: ({ + description, + name, + directives, + values + }) => wrap('', description, '\n') + join(['enum', name, join(directives, ' '), block(values)], ' ') + }, + EnumValueDefinition: { + leave: ({ + description, + name, + directives + }) => wrap('', description, '\n') + join([name, join(directives, ' ')], ' ') + }, + InputObjectTypeDefinition: { + leave: ({ + description, + name, + directives, + fields + }) => wrap('', description, '\n') + join(['input', name, join(directives, ' '), block(fields)], ' ') + }, + DirectiveDefinition: { + leave: ({ + description, + name, + arguments: args, + repeatable, + locations + }) => wrap('', description, '\n') + 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ') + }, + SchemaExtension: { + leave: ({ + directives, + operationTypes + }) => join(['extend schema', join(directives, ' '), block(operationTypes)], ' ') + }, + ScalarTypeExtension: { + leave: ({ + name, + directives + }) => join(['extend scalar', name, join(directives, ' ')], ' ') + }, + ObjectTypeExtension: { + leave: ({ + name, + interfaces, + directives, + fields + }) => join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ') + }, + InterfaceTypeExtension: { + leave: ({ + name, + interfaces, + directives, + fields + }) => join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ') + }, + UnionTypeExtension: { + leave: ({ + name, + directives, + types + }) => join(['extend union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ') + }, + EnumTypeExtension: { + leave: ({ + name, + directives, + values + }) => join(['extend enum', name, join(directives, ' '), block(values)], ' ') + }, + InputObjectTypeExtension: { + leave: ({ + name, + directives, + fields + }) => join(['extend input', name, join(directives, ' '), block(fields)], ' ') + } +}; +/** + * Given maybeArray, print an empty string if it is null or empty, otherwise + * print all items together separated by separator if provided + */ +function join(maybeArray, separator = '') { + var _maybeArray$filter$jo; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(x => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ''; +} +/** + * Given array, print each item on its own line, wrapped in an indented `{ }` block. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +function block(array) { + return wrap('{\n', indent(join(array, '\n')), '\n}'); +} /** - * Unique enum value names - * - * A GraphQL enum type is only valid if all its values are uniquely named. + * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string. */ -function UniqueEnumValueNamesRule(context) { - const schema = context.getSchema(); - const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); - const knownValueNames = Object.create(null); - return { - EnumTypeDefinition: checkValueUniqueness, - EnumTypeExtension: checkValueUniqueness - }; - function checkValueUniqueness(node) { - var _node$values; - const typeName = node.name.value; - if (!knownValueNames[typeName]) { - knownValueNames[typeName] = Object.create(null); - } // FIXME: https://github.com/graphql/graphql-js/issues/2203 - /* c8 ignore next */ +function wrap(start, maybeString, end = '') { + return maybeString != null && maybeString !== '' ? start + maybeString + end : ''; +} +function indent(str) { + return wrap(' ', str.replace(/\n/g, '\n ')); +} +function hasMultilineItems(maybeArray) { + var _maybeArray$some; - const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; - const valueNames = knownValueNames[typeName]; - for (const valueDef of valueNodes) { - const valueName = valueDef.name.value; - const existingType = existingTypeMap[typeName]; - if ((0, _definition.isEnumType)(existingType) && existingType.getValue(valueName)) { - context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, { - nodes: valueDef.name - })); - } else if (valueNames[valueName]) { - context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" can only be defined once.`, { - nodes: [valueNames[valueName], valueDef.name] - })); - } else { - valueNames[valueName] = valueDef.name; - } - } - return false; - } + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some(str => str.includes('\n'))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs": -/*!*****************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs ***! - \*****************************************************************************************/ +/***/ "../../../node_modules/graphql/language/source.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/language/source.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +exports.Source = void 0; +exports.isSource = isSource; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); /** - * Unique field definition names - * - * A GraphQL complex type is only valid if all its fields are uniquely named. + * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are + * optional, but they are useful for clients who store GraphQL documents in source files. + * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might + * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`. + * The `line` and `column` properties in `locationOffset` are 1-indexed. */ -function UniqueFieldDefinitionNamesRule(context) { - const schema = context.getSchema(); - const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); - const knownFieldNames = Object.create(null); - return { - InputObjectTypeDefinition: checkFieldUniqueness, - InputObjectTypeExtension: checkFieldUniqueness, - InterfaceTypeDefinition: checkFieldUniqueness, - InterfaceTypeExtension: checkFieldUniqueness, - ObjectTypeDefinition: checkFieldUniqueness, - ObjectTypeExtension: checkFieldUniqueness - }; - function checkFieldUniqueness(node) { - var _node$fields; - const typeName = node.name.value; - if (!knownFieldNames[typeName]) { - knownFieldNames[typeName] = Object.create(null); - } // FIXME: https://github.com/graphql/graphql-js/issues/2203 - - /* c8 ignore next */ - - const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; - const fieldNames = knownFieldNames[typeName]; - for (const fieldDef of fieldNodes) { - const fieldName = fieldDef.name.value; - if (hasField(existingTypeMap[typeName], fieldName)) { - context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, { - nodes: fieldDef.name - })); - } else if (fieldNames[fieldName]) { - context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" can only be defined once.`, { - nodes: [fieldNames[fieldName], fieldDef.name] - })); - } else { - fieldNames[fieldName] = fieldDef.name; - } - } - return false; +class Source { + constructor(body, name = 'GraphQL request', locationOffset = { + line: 1, + column: 1 + }) { + typeof body === 'string' || (0, _devAssert.devAssert)(false, `Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`); + this.body = body; + this.name = name; + this.locationOffset = locationOffset; + this.locationOffset.line > 0 || (0, _devAssert.devAssert)(false, 'line in locationOffset is 1-indexed and must be positive.'); + this.locationOffset.column > 0 || (0, _devAssert.devAssert)(false, 'column in locationOffset is 1-indexed and must be positive.'); } -} -function hasField(type, fieldName) { - if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type) || (0, _definition.isInputObjectType)(type)) { - return type.getFields()[fieldName] != null; + get [Symbol.toStringTag]() { + return 'Source'; } - return false; } - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs": -/*!**********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs ***! - \**********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * Unique fragment names - * - * A GraphQL document is only valid if all defined fragments have unique names. + * Test if the given value is a Source object. * - * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness + * @internal */ -function UniqueFragmentNamesRule(context) { - const knownFragmentNames = Object.create(null); - return { - OperationDefinition: () => false, - FragmentDefinition(node) { - const fragmentName = node.name.value; - if (knownFragmentNames[fragmentName]) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one fragment named "${fragmentName}".`, { - nodes: [knownFragmentNames[fragmentName], node.name] - })); - } else { - knownFragmentNames[fragmentName] = node.name; - } - return false; - } - }; +exports.Source = Source; +function isSource(source) { + return (0, _instanceOf.instanceOf)(source, Source); } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs": -/*!************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs ***! - \************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/language/tokenKind.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/language/tokenKind.mjs ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule; -var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.TokenKind = void 0; /** - * Unique input field names - * - * A GraphQL input object value is only valid if all supplied fields are - * uniquely named. - * - * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness + * An exported enum describing the different kinds of tokens that the + * lexer emits. */ -function UniqueInputFieldNamesRule(context) { - const knownNameStack = []; - let knownNames = Object.create(null); - return { - ObjectValue: { - enter() { - knownNameStack.push(knownNames); - knownNames = Object.create(null); - }, - leave() { - const prevKnownNames = knownNameStack.pop(); - prevKnownNames || (0, _invariant.invariant)(false); - knownNames = prevKnownNames; - } - }, - ObjectField(node) { - const fieldName = node.name.value; - if (knownNames[fieldName]) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one input field named "${fieldName}".`, { - nodes: [knownNames[fieldName], node.name] - })); - } else { - knownNames[fieldName] = node.name; - } - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs ***! - \***********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - +var TokenKind; +(function (TokenKind) { + TokenKind['SOF'] = ''; + TokenKind['EOF'] = ''; + TokenKind['BANG'] = '!'; + TokenKind['DOLLAR'] = '$'; + TokenKind['AMP'] = '&'; + TokenKind['PAREN_L'] = '('; + TokenKind['PAREN_R'] = ')'; + TokenKind['SPREAD'] = '...'; + TokenKind['COLON'] = ':'; + TokenKind['EQUALS'] = '='; + TokenKind['AT'] = '@'; + TokenKind['BRACKET_L'] = '['; + TokenKind['BRACKET_R'] = ']'; + TokenKind['BRACE_L'] = '{'; + TokenKind['PIPE'] = '|'; + TokenKind['BRACE_R'] = '}'; + TokenKind['NAME'] = 'Name'; + TokenKind['INT'] = 'Int'; + TokenKind['FLOAT'] = 'Float'; + TokenKind['STRING'] = 'String'; + TokenKind['BLOCK_STRING'] = 'BlockString'; + TokenKind['COMMENT'] = 'Comment'; +})(TokenKind || (exports.TokenKind = TokenKind = {})); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueOperationNamesRule = UniqueOperationNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * Unique operation names - * - * A GraphQL document is only valid if all defined operations have unique names. + * The enum type representing the token kinds values. * - * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness + * @deprecated Please use `TokenKind`. Will be remove in v17. */ -function UniqueOperationNamesRule(context) { - const knownOperationNames = Object.create(null); - return { - OperationDefinition(node) { - const operationName = node.name; - if (operationName) { - if (knownOperationNames[operationName.value]) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one operation named "${operationName.value}".`, { - nodes: [knownOperationNames[operationName.value], operationName] - })); - } else { - knownOperationNames[operationName.value] = operationName; - } - } - return false; - }, - FragmentDefinition: () => false - }; -} /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs": -/*!***********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs ***! - \***********************************************************************************/ +/***/ "../../../node_modules/graphql/language/visitor.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/language/visitor.mjs ***! + \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueOperationTypesRule = UniqueOperationTypesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +exports.BREAK = void 0; +exports.getEnterLeaveForKind = getEnterLeaveForKind; +exports.getVisitFn = getVisitFn; +exports.visit = visit; +exports.visitInParallel = visitInParallel; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); /** - * Unique operation types - * - * A GraphQL document is only valid if it has only one type per operation. + * A visitor is provided to visit, it contains the collection of + * relevant functions to be called during the visitor's traversal. */ -function UniqueOperationTypesRule(context) { - const schema = context.getSchema(); - const definedOperationTypes = Object.create(null); - const existingOperationTypes = schema ? { - query: schema.getQueryType(), - mutation: schema.getMutationType(), - subscription: schema.getSubscriptionType() - } : {}; - return { - SchemaDefinition: checkOperationTypes, - SchemaExtension: checkOperationTypes - }; - function checkOperationTypes(node) { - var _node$operationTypes; - // See: https://github.com/graphql/graphql-js/issues/2203 +const BREAK = exports.BREAK = Object.freeze({}); +/** + * visit() will walk through an AST using a depth-first traversal, calling + * the visitor's enter function at each node in the traversal, and calling the + * leave function after visiting that node and all of its child nodes. + * + * By returning different values from the enter and leave functions, the + * behavior of the visitor can be altered, including skipping over a sub-tree of + * the AST (by returning false), editing the AST by returning a value or null + * to remove the value, or to stop the whole traversal by returning BREAK. + * + * When using visit() to edit an AST, the original AST will not be modified, and + * a new version of the AST with the changes applied will be returned from the + * visit function. + * + * ```ts + * const editedAST = visit(ast, { + * enter(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: skip visiting this node + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * }, + * leave(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: no action + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * } + * }); + * ``` + * + * Alternatively to providing enter() and leave() functions, a visitor can + * instead provide functions named the same as the kinds of AST nodes, or + * enter/leave visitors at a named key, leading to three permutations of the + * visitor API: + * + * 1) Named visitors triggered when entering a node of a specific kind. + * + * ```ts + * visit(ast, { + * Kind(node) { + * // enter the "Kind" node + * } + * }) + * ``` + * + * 2) Named visitors that trigger upon entering and leaving a node of a specific kind. + * + * ```ts + * visit(ast, { + * Kind: { + * enter(node) { + * // enter the "Kind" node + * } + * leave(node) { + * // leave the "Kind" node + * } + * } + * }) + * ``` + * + * 3) Generic visitors that trigger upon entering and leaving any node. + * + * ```ts + * visit(ast, { + * enter(node) { + * // enter any node + * }, + * leave(node) { + * // leave any node + * } + * }) + * ``` + */ - /* c8 ignore next */ - const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; - for (const operationType of operationTypesNodes) { - const operation = operationType.operation; - const alreadyDefinedOperationType = definedOperationTypes[operation]; - if (existingOperationTypes[operation]) { - context.reportError(new _GraphQLError.GraphQLError(`Type for ${operation} already defined in the schema. It cannot be redefined.`, { - nodes: operationType - })); - } else if (alreadyDefinedOperationType) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one ${operation} type in schema.`, { - nodes: [alreadyDefinedOperationType, operationType] - })); - } else { - definedOperationTypes[operation] = operationType; +function visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) { + const enterLeaveMap = new Map(); + for (const kind of Object.values(_kinds.Kind)) { + enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind)); + } + /* eslint-disable no-undef-init */ + + let stack = undefined; + let inArray = Array.isArray(root); + let keys = [root]; + let index = -1; + let edits = []; + let node = root; + let key = undefined; + let parent = undefined; + const path = []; + const ancestors = []; + /* eslint-enable no-undef-init */ + + do { + index++; + const isLeaving = index === keys.length; + const isEdited = isLeaving && edits.length !== 0; + if (isLeaving) { + key = ancestors.length === 0 ? undefined : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + if (isEdited) { + if (inArray) { + node = node.slice(); + let editOffset = 0; + for (const [editKey, editValue] of edits) { + const arrayKey = editKey - editOffset; + if (editValue === null) { + node.splice(arrayKey, 1); + editOffset++; + } else { + node[arrayKey] = editValue; + } + } + } else { + node = Object.defineProperties({}, Object.getOwnPropertyDescriptors(node)); + for (const [editKey, editValue] of edits) { + node[editKey] = editValue; + } + } + } + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else if (parent) { + key = inArray ? index : keys[index]; + node = parent[key]; + if (node === null || node === undefined) { + continue; } + path.push(key); } - return false; + let result; + if (!Array.isArray(node)) { + var _enterLeaveMap$get, _enterLeaveMap$get2; + (0, _ast.isNode)(node) || (0, _devAssert.devAssert)(false, `Invalid AST Node: ${(0, _inspect.inspect)(node)}.`); + const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; + result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); + if (result === BREAK) { + break; + } + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== undefined) { + edits.push([key, result]); + if (!isLeaving) { + if ((0, _ast.isNode)(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + if (result === undefined && isEdited) { + edits.push([key, node]); + } + if (isLeaving) { + path.pop(); + } else { + var _node$kind; + stack = { + inArray, + index, + keys, + edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; + index = -1; + edits = []; + if (parent) { + ancestors.push(parent); + } + parent = node; + } + } while (stack !== undefined); + if (edits.length !== 0) { + // New root + return edits[edits.length - 1][1]; } + return root; } - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs": -/*!******************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueTypeNamesRule = UniqueTypeNamesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); /** - * Unique type names + * Creates a new visitor instance which delegates to many visitors to run in + * parallel. Each visitor will be visited for each node before moving on. * - * A GraphQL document is only valid if all defined types have unique names. + * If a prior visitor edits a node, no following visitors will see that node. */ -function UniqueTypeNamesRule(context) { - const knownTypeNames = Object.create(null); - const schema = context.getSchema(); - return { - ScalarTypeDefinition: checkTypeName, - ObjectTypeDefinition: checkTypeName, - InterfaceTypeDefinition: checkTypeName, - UnionTypeDefinition: checkTypeName, - EnumTypeDefinition: checkTypeName, - InputObjectTypeDefinition: checkTypeName - }; - function checkTypeName(node) { - const typeName = node.name.value; - if (schema !== null && schema !== void 0 && schema.getType(typeName)) { - context.reportError(new _GraphQLError.GraphQLError(`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, { - nodes: node.name - })); - return; + +function visitInParallel(visitors) { + const skipping = new Array(visitors.length).fill(null); + const mergedVisitor = Object.create(null); + for (const kind of Object.values(_kinds.Kind)) { + let hasVisitor = false; + const enterList = new Array(visitors.length).fill(undefined); + const leaveList = new Array(visitors.length).fill(undefined); + for (let i = 0; i < visitors.length; ++i) { + const { + enter, + leave + } = getEnterLeaveForKind(visitors[i], kind); + hasVisitor || (hasVisitor = enter != null || leave != null); + enterList[i] = enter; + leaveList[i] = leave; } - if (knownTypeNames[typeName]) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one type named "${typeName}".`, { - nodes: [knownTypeNames[typeName], node.name] - })); - } else { - knownTypeNames[typeName] = node.name; + if (!hasVisitor) { + continue; } - return false; + const mergedEnterLeave = { + enter(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _enterList$i; + const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); + if (result === false) { + skipping[i] = node; + } else if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== undefined) { + return result; + } + } + } + }, + leave(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _leaveList$i; + const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); + if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== undefined && result !== false) { + return result; + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; + mergedVisitor[kind] = mergedEnterLeave; } + return mergedVisitor; } +/** + * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind. + */ -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs": -/*!**********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs ***! - \**********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - +function getEnterLeaveForKind(visitor, kind) { + const kindVisitor = visitor[kind]; + if (typeof kindVisitor === 'object') { + // { Kind: { enter() {}, leave() {} } } + return kindVisitor; + } else if (typeof kindVisitor === 'function') { + // { Kind() {} } + return { + enter: kindVisitor, + leave: undefined + }; + } // { enter() {}, leave() {} } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.UniqueVariableNamesRule = UniqueVariableNamesRule; -var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); + return { + enter: visitor.enter, + leave: visitor.leave + }; +} /** - * Unique variable names + * Given a visitor instance, if it is leaving or not, and a node kind, return + * the function the visitor runtime should call. * - * A GraphQL operation is only valid if all its variables are uniquely named. + * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17 */ -function UniqueVariableNamesRule(context) { - return { - OperationDefinition(operationNode) { - var _operationNode$variab; - // See: https://github.com/graphql/graphql-js/issues/2203 +/* c8 ignore next 8 */ - /* c8 ignore next */ - const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : []; - const seenVariableDefinitions = (0, _groupBy.groupBy)(variableDefinitions, node => node.variable.name.value); - for (const [variableName, variableNodes] of seenVariableDefinitions) { - if (variableNodes.length > 1) { - context.reportError(new _GraphQLError.GraphQLError(`There can be only one variable named "$${variableName}".`, { - nodes: variableNodes.map(node => node.variable.name) - })); - } - } - } - }; +function getVisitFn(visitor, kind, isLeaving) { + const { + enter, + leave + } = getEnterLeaveForKind(visitor, kind); + return isLeaving ? leave : enter; } /***/ }), -/***/ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs": -/*!**********************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs ***! - \**********************************************************************************/ +/***/ "../../../node_modules/graphql/type/assertName.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/type/assertName.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule; -var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); -var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +exports.assertEnumValueName = assertEnumValueName; +exports.assertName = assertName; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _characterClasses = __webpack_require__(/*! ../language/characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs"); /** - * Value literals of correct type - * - * A GraphQL document is only valid if all value literals are of the type - * expected at their position. - * - * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type + * Upholds the spec rules about naming. */ -function ValuesOfCorrectTypeRule(context) { - return { - ListValue(node) { - // Note: TypeInfo will traverse into a list's item type, so look to the - // parent input type to check if it is a list. - const type = (0, _definition.getNullableType)(context.getParentInputType()); - if (!(0, _definition.isListType)(type)) { - isValidValueNode(context, node); - return false; // Don't traverse further. - } - }, - - ObjectValue(node) { - const type = (0, _definition.getNamedType)(context.getInputType()); - if (!(0, _definition.isInputObjectType)(type)) { - isValidValueNode(context, node); - return false; // Don't traverse further. - } // Ensure every required field exists. - const fieldNodeMap = (0, _keyMap.keyMap)(node.fields, field => field.name.value); - for (const fieldDef of Object.values(type.getFields())) { - const fieldNode = fieldNodeMap[fieldDef.name]; - if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) { - const typeStr = (0, _inspect.inspect)(fieldDef.type); - context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, { - nodes: node - })); - } - } - }, - ObjectField(node) { - const parentType = (0, _definition.getNamedType)(context.getParentInputType()); - const fieldType = context.getInputType(); - if (!fieldType && (0, _definition.isInputObjectType)(parentType)) { - const suggestions = (0, _suggestionList.suggestionList)(node.name.value, Object.keys(parentType.getFields())); - context.reportError(new _GraphQLError.GraphQLError(`Field "${node.name.value}" is not defined by type "${parentType.name}".` + (0, _didYouMean.didYouMean)(suggestions), { - nodes: node - })); - } - }, - NullValue(node) { - const type = context.getInputType(); - if ((0, _definition.isNonNullType)(type)) { - context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${(0, _inspect.inspect)(type)}", found ${(0, _printer.print)(node)}.`, { - nodes: node - })); - } - }, - EnumValue: node => isValidValueNode(context, node), - IntValue: node => isValidValueNode(context, node), - FloatValue: node => isValidValueNode(context, node), - StringValue: node => isValidValueNode(context, node), - BooleanValue: node => isValidValueNode(context, node) - }; +function assertName(name) { + name != null || (0, _devAssert.devAssert)(false, 'Must provide name.'); + typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.'); + if (name.length === 0) { + throw new _GraphQLError.GraphQLError('Expected name to be a non-empty string.'); + } + for (let i = 1; i < name.length; ++i) { + if (!(0, _characterClasses.isNameContinue)(name.charCodeAt(i))) { + throw new _GraphQLError.GraphQLError(`Names must only contain [_a-zA-Z0-9] but "${name}" does not.`); + } + } + if (!(0, _characterClasses.isNameStart)(name.charCodeAt(0))) { + throw new _GraphQLError.GraphQLError(`Names must start with [_a-zA-Z] but "${name}" does not.`); + } + return name; } /** - * Any value literal may be a valid representation of a Scalar, depending on - * that scalar type. + * Upholds the spec rules about naming enum values. + * + * @internal */ -function isValidValueNode(context, node) { - // Report any error at the full type expected by the location. - const locationType = context.getInputType(); - if (!locationType) { - return; +function assertEnumValueName(name) { + if (name === 'true' || name === 'false' || name === 'null') { + throw new _GraphQLError.GraphQLError(`Enum values cannot be named: ${name}`); } - const type = (0, _definition.getNamedType)(locationType); - if (!(0, _definition.isLeafType)(type)) { - const typeStr = (0, _inspect.inspect)(locationType); - context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, { - nodes: node - })); - return; - } // Scalars and Enums determine if a literal value is valid via parseLiteral(), - // which may throw or return an invalid value to indicate failure. + return assertName(name); +} - try { - const parseResult = type.parseLiteral(node, undefined - /* variables */); +/***/ }), - if (parseResult === undefined) { - const typeStr = (0, _inspect.inspect)(locationType); - context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, { - nodes: node - })); - } - } catch (error) { - const typeStr = (0, _inspect.inspect)(locationType); - if (error instanceof _GraphQLError.GraphQLError) { - context.reportError(error); - } else { - context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}; ` + error.message, { - nodes: node, - originalError: error - })); - } - } -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs": -/*!*************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs ***! - \*************************************************************************************/ +/***/ "../../../node_modules/graphql/type/definition.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/type/definition.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule; -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0; +exports.argsToArgsConfig = argsToArgsConfig; +exports.assertAbstractType = assertAbstractType; +exports.assertCompositeType = assertCompositeType; +exports.assertEnumType = assertEnumType; +exports.assertInputObjectType = assertInputObjectType; +exports.assertInputType = assertInputType; +exports.assertInterfaceType = assertInterfaceType; +exports.assertLeafType = assertLeafType; +exports.assertListType = assertListType; +exports.assertNamedType = assertNamedType; +exports.assertNonNullType = assertNonNullType; +exports.assertNullableType = assertNullableType; +exports.assertObjectType = assertObjectType; +exports.assertOutputType = assertOutputType; +exports.assertScalarType = assertScalarType; +exports.assertType = assertType; +exports.assertUnionType = assertUnionType; +exports.assertWrappingType = assertWrappingType; +exports.defineArguments = defineArguments; +exports.getNamedType = getNamedType; +exports.getNullableType = getNullableType; +exports.isAbstractType = isAbstractType; +exports.isCompositeType = isCompositeType; +exports.isEnumType = isEnumType; +exports.isInputObjectType = isInputObjectType; +exports.isInputType = isInputType; +exports.isInterfaceType = isInterfaceType; +exports.isLeafType = isLeafType; +exports.isListType = isListType; +exports.isNamedType = isNamedType; +exports.isNonNullType = isNonNullType; +exports.isNullableType = isNullableType; +exports.isObjectType = isObjectType; +exports.isOutputType = isOutputType; +exports.isRequiredArgument = isRequiredArgument; +exports.isRequiredInputField = isRequiredInputField; +exports.isScalarType = isScalarType; +exports.isType = isType; +exports.isUnionType = isUnionType; +exports.isWrappingType = isWrappingType; +exports.resolveObjMapThunk = resolveObjMapThunk; +exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _identityFunc = __webpack_require__(/*! ../jsutils/identityFunc.mjs */ "../../../node_modules/graphql/jsutils/identityFunc.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); +var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs"); +var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _valueFromASTUntyped = __webpack_require__(/*! ../utilities/valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs"); +var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); +function isType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type); +} +function assertType(type) { + if (!isType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL type.`); + } + return type; +} /** - * Variables are input types - * - * A GraphQL operation is only valid if all the variables it defines are of - * input types (scalar, enum, or input object). - * - * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types + * There are predicates for each kind of GraphQL type. */ -function VariablesAreInputTypesRule(context) { - return { - VariableDefinition(node) { - const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type); - if (type !== undefined && !(0, _definition.isInputType)(type)) { - const variableName = node.variable.name.value; - const typeName = (0, _printer.print)(node.type); - context.reportError(new _GraphQLError.GraphQLError(`Variable "$${variableName}" cannot be non-input type "${typeName}".`, { - nodes: node.type - })); - } - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs": -/*!*****************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs ***! - \*****************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule; -var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); -var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); -var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +function isScalarType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLScalarType); +} +function assertScalarType(type) { + if (!isScalarType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Scalar type.`); + } + return type; +} +function isObjectType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLObjectType); +} +function assertObjectType(type) { + if (!isObjectType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Object type.`); + } + return type; +} +function isInterfaceType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLInterfaceType); +} +function assertInterfaceType(type) { + if (!isInterfaceType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Interface type.`); + } + return type; +} +function isUnionType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLUnionType); +} +function assertUnionType(type) { + if (!isUnionType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Union type.`); + } + return type; +} +function isEnumType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLEnumType); +} +function assertEnumType(type) { + if (!isEnumType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Enum type.`); + } + return type; +} +function isInputObjectType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLInputObjectType); +} +function assertInputObjectType(type) { + if (!isInputObjectType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Input Object type.`); + } + return type; +} +function isListType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLList); +} +function assertListType(type) { + if (!isListType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL List type.`); + } + return type; +} +function isNonNullType(type) { + return (0, _instanceOf.instanceOf)(type, GraphQLNonNull); +} +function assertNonNullType(type) { + if (!isNonNullType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Non-Null type.`); + } + return type; +} /** - * Variables in allowed position - * - * Variable usages must be compatible with the arguments they are passed to. - * - * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed + * These types may be used as input types for arguments and directives. */ -function VariablesInAllowedPositionRule(context) { - let varDefMap = Object.create(null); - return { - OperationDefinition: { - enter() { - varDefMap = Object.create(null); - }, - leave(operation) { - const usages = context.getRecursiveVariableUsages(operation); - for (const { - node, - type, - defaultValue - } of usages) { - const varName = node.name.value; - const varDef = varDefMap[varName]; - if (varDef && type) { - // A var type is allowed if it is the same or more strict (e.g. is - // a subtype of) than the expected type. It can be more strict if - // the variable type is non-null when the expected type is nullable. - // If both are list types, the variable item type can be more strict - // than the expected item type (contravariant). - const schema = context.getSchema(); - const varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type); - if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) { - const varTypeStr = (0, _inspect.inspect)(varType); - const typeStr = (0, _inspect.inspect)(type); - context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, { - nodes: [varDef, node] - })); - } - } - } - } - }, - VariableDefinition(node) { - varDefMap[node.variable.name.value] = node; - } - }; + +function isInputType(type) { + return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType); +} +function assertInputType(type) { + if (!isInputType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL input type.`); + } + return type; } /** - * Returns true if the variable is allowed in the location it was found, - * which includes considering if default values exist for either the variable - * or the location at which it is located. + * These types may be used as output types as the result of fields. */ -function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) { - if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) { - const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL; - const hasLocationDefaultValue = locationDefaultValue !== undefined; - if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { - return false; - } - const nullableLocationType = locationType.ofType; - return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, nullableLocationType); +function isOutputType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType); +} +function assertOutputType(type) { + if (!isOutputType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL output type.`); } - return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType); + return type; } +/** + * These types may describe types which may be leaf values. + */ -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs": -/*!****************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs ***! - \****************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - +function isLeafType(type) { + return isScalarType(type) || isEnumType(type); +} +function assertLeafType(type) { + if (!isLeafType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL leaf type.`); + } + return type; +} +/** + * These types may describe the parent context of a selection set. + */ +function isCompositeType(type) { + return isObjectType(type) || isInterfaceType(type) || isUnionType(type); +} +function assertCompositeType(type) { + if (!isCompositeType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL composite type.`); + } + return type; +} +/** + * These types may describe the parent context of a selection set. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoDeprecatedCustomRule = NoDeprecatedCustomRule; -var _invariant = __webpack_require__(/*! ../../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); -var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +function isAbstractType(type) { + return isInterfaceType(type) || isUnionType(type); +} +function assertAbstractType(type) { + if (!isAbstractType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL abstract type.`); + } + return type; +} /** - * No deprecated + * List Type Wrapper * - * A GraphQL document is only valid if all selected fields and all used enum values have not been - * deprecated. + * A list is a wrapping type which points to another type. + * Lists are often created within the context of defining the fields of + * an object type. * - * Note: This rule is optional and is not part of the Validation section of the GraphQL - * Specification. The main purpose of this rule is detection of deprecated usages and not - * necessarily to forbid their use when querying a service. + * Example: + * + * ```ts + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * parents: { type: new GraphQLList(PersonType) }, + * children: { type: new GraphQLList(PersonType) }, + * }) + * }) + * ``` */ -function NoDeprecatedCustomRule(context) { - return { - Field(node) { - const fieldDef = context.getFieldDef(); - const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; - if (fieldDef && deprecationReason != null) { - const parentType = context.getParentType(); - parentType != null || (0, _invariant.invariant)(false); - context.reportError(new _GraphQLError.GraphQLError(`The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, { - nodes: node - })); - } - }, - Argument(node) { - const argDef = context.getArgument(); - const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; - if (argDef && deprecationReason != null) { - const directiveDef = context.getDirective(); - if (directiveDef != null) { - context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { - nodes: node - })); - } else { - const parentType = context.getParentType(); - const fieldDef = context.getFieldDef(); - parentType != null && fieldDef != null || (0, _invariant.invariant)(false); - context.reportError(new _GraphQLError.GraphQLError(`Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { - nodes: node - })); - } - } - }, - ObjectField(node) { - const inputObjectDef = (0, _definition.getNamedType)(context.getParentInputType()); - if ((0, _definition.isInputObjectType)(inputObjectDef)) { - const inputFieldDef = inputObjectDef.getFields()[node.name.value]; - const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; - if (deprecationReason != null) { - context.reportError(new _GraphQLError.GraphQLError(`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, { - nodes: node - })); - } - } - }, - EnumValue(node) { - const enumValueDef = context.getEnumValue(); - const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; - if (enumValueDef && deprecationReason != null) { - const enumTypeDef = (0, _definition.getNamedType)(context.getInputType()); - enumTypeDef != null || (0, _invariant.invariant)(false); - context.reportError(new _GraphQLError.GraphQLError(`The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, { - nodes: node - })); - } - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs": -/*!*************************************************************************************************!*\ - !*** ../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs ***! - \*************************************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule; -var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); -var _introspection = __webpack_require__(/*! ../../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +class GraphQLList { + constructor(ofType) { + isType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.`); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return 'GraphQLList'; + } + toString() { + return '[' + String(this.ofType) + ']'; + } + toJSON() { + return this.toString(); + } +} /** - * Prohibit introspection queries + * Non-Null Type Wrapper * - * A GraphQL document is only valid if all fields selected are not fields that - * return an introspection type. + * A non-null is a wrapping type which points to another type. + * Non-null types enforce that their values are never null and can ensure + * an error is raised if this ever occurs during a request. It is useful for + * fields which you can make a strong guarantee on non-nullability, for example + * usually the id field of a database row will never be null. * - * Note: This rule is optional and is not part of the Validation section of the - * GraphQL Specification. This rule effectively disables introspection, which - * does not reflect best practices and should only be done if absolutely necessary. + * Example: + * + * ```ts + * const RowType = new GraphQLObjectType({ + * name: 'Row', + * fields: () => ({ + * id: { type: new GraphQLNonNull(GraphQLString) }, + * }) + * }) + * ``` + * Note: the enforcement of non-nullability occurs within the executor. */ -function NoSchemaIntrospectionCustomRule(context) { - return { - Field(node) { - const type = (0, _definition.getNamedType)(context.getType()); - if (type && (0, _introspection.isIntrospectionType)(type)) { - context.reportError(new _GraphQLError.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, { - nodes: node - })); - } - } - }; +exports.GraphQLList = GraphQLList; +class GraphQLNonNull { + constructor(ofType) { + isNullableType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL nullable type.`); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return 'GraphQLNonNull'; + } + toString() { + return String(this.ofType) + '!'; + } + toJSON() { + return this.toString(); + } } +/** + * These types wrap and modify other types + */ +exports.GraphQLNonNull = GraphQLNonNull; +function isWrappingType(type) { + return isListType(type) || isNonNullType(type); +} +function assertWrappingType(type) { + if (!isWrappingType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL wrapping type.`); + } + return type; +} +/** + * These types can all accept null as a value. + */ -/***/ }), - -/***/ "../../../node_modules/graphql/validation/specifiedRules.mjs": -/*!*******************************************************************!*\ - !*** ../../../node_modules/graphql/validation/specifiedRules.mjs ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.specifiedSDLRules = exports.specifiedRules = void 0; -var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs"); -var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs"); -var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs"); -var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs"); -var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs"); -var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs"); -var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs"); -var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs"); -var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs"); -var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs"); -var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs"); -var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs"); -var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs"); -var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs"); -var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs"); -var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs"); -var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs"); -var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs"); -var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs"); -var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs"); -var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs"); -var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs"); -var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs"); -var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs"); -var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs"); -var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs"); -var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs"); -var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs"); -var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs"); -var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs"); -var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs"); -var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs"); -var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs"); -var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs"); -// Spec Section: "Executable Definitions" -// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" - -// Spec Section: "Fragments on Composite Types" - -// Spec Section: "Argument Names" - -// Spec Section: "Directives Are Defined" - -// Spec Section: "Fragment spread target defined" - -// Spec Section: "Fragment Spread Type Existence" - -// Spec Section: "Lone Anonymous Operation" - -// SDL-specific validation rules - -// Spec Section: "Fragments must not form cycles" - -// Spec Section: "All Variable Used Defined" - -// Spec Section: "Fragments must be used" - -// Spec Section: "All Variables Used" - -// Spec Section: "Field Selection Merging" - -// Spec Section: "Fragment spread is possible" - -// Spec Section: "Argument Optionality" - -// Spec Section: "Leaf Field Selections" - -// Spec Section: "Subscriptions with Single Root Field" - -// Spec Section: "Argument Uniqueness" - -// Spec Section: "Directives Are Unique Per Location" - -// Spec Section: "Fragment Name Uniqueness" - -// Spec Section: "Input Object Field Uniqueness" - -// Spec Section: "Operation Name Uniqueness" - -// Spec Section: "Variable Uniqueness" - -// Spec Section: "Value Type Correctness" - -// Spec Section: "Variables are Input Types" +function isNullableType(type) { + return isType(type) && !isNonNullType(type); +} +function assertNullableType(type) { + if (!isNullableType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL nullable type.`); + } + return type; +} +function getNullableType(type) { + if (type) { + return isNonNullType(type) ? type.ofType : type; + } +} +/** + * These named types do not include modifiers like List or NonNull. + */ -// Spec Section: "All Variable Usages Are Allowed" +function isNamedType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type); +} +function assertNamedType(type) { + if (!isNamedType(type)) { + throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL named type.`); + } + return type; +} +function getNamedType(type) { + if (type) { + let unwrappedType = type; + while (isWrappingType(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + return unwrappedType; + } +} +/** + * Used while defining GraphQL types to allow for circular references in + * otherwise immutable type definitions. + */ +function resolveReadonlyArrayThunk(thunk) { + return typeof thunk === 'function' ? thunk() : thunk; +} +function resolveObjMapThunk(thunk) { + return typeof thunk === 'function' ? thunk() : thunk; +} /** - * This set includes all validation rules defined by the GraphQL spec. + * Custom extensions * - * The order of the rules in this list has been adjusted to lead to the - * most clear output when encountering multiple validation errors. + * @remarks + * Use a unique identifier name for your extension, for example the name of + * your library or project. Do not use a shortened identifier as this increases + * the risk of conflicts. We recommend you add at most one extension field, + * an object which can contain all the values you need. */ -const specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule]); + /** - * @internal + * Scalar Type Definition + * + * The leaf values of any request and input values to arguments are + * Scalars (or Enums) and are defined with a name and a series of functions + * used to parse input from ast or variables and to ensure validity. + * + * If a type's serialize function returns `null` or does not return a value + * (i.e. it returns `undefined`) then an error will be raised and a `null` + * value will be returned in the response. It is always better to validate + * + * Example: + * + * ```ts + * const OddType = new GraphQLScalarType({ + * name: 'Odd', + * serialize(value) { + * if (!Number.isFinite(value)) { + * throw new Error( + * `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`, + * ); + * } + * + * if (value % 2 === 0) { + * throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`); + * } + * return value; + * } + * }); + * ``` */ -exports.specifiedRules = specifiedRules; -const specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]); -exports.specifiedSDLRules = specifiedSDLRules; - -/***/ }), - -/***/ "../../../node_modules/graphql/validation/validate.mjs": -/*!*************************************************************!*\ - !*** ../../../node_modules/graphql/validation/validate.mjs ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - +class GraphQLScalarType { + constructor(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; + const parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.specifiedByURL = config.specifiedByURL; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc; + this.parseValue = parseValue; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables)); + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + config.specifiedByURL == null || typeof config.specifiedByURL === 'string' || (0, _devAssert.devAssert)(false, `${this.name} must provide "specifiedByURL" as a string, ` + `but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.`); + config.serialize == null || typeof config.serialize === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`); + if (config.parseLiteral) { + typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`); + } + } + get [Symbol.toStringTag]() { + return 'GraphQLScalarType'; + } + toConfig() { + return { + name: this.name, + description: this.description, + specifiedByURL: this.specifiedByURL, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.assertValidSDL = assertValidSDL; -exports.assertValidSDLExtension = assertValidSDLExtension; -exports.validate = validate; -exports.validateSDL = validateSDL; -var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); -var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); -var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); -var _validate = __webpack_require__(/*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); -var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); -var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs"); -var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs"); /** - * Implements the "Validation" section of the spec. + * Object Type Definition * - * Validation runs synchronously, returning an array of encountered errors, or - * an empty array if no errors were encountered and the document is valid. + * Almost all of the GraphQL types you define will be object types. Object types + * have a name, but most importantly describe their fields. * - * A list of specific validation rules may be provided. If not provided, the - * default list of rules defined by the GraphQL specification will be used. + * Example: * - * Each validation rules is a function which returns a visitor - * (see the language/visitor API). Visitor methods are expected to return - * GraphQLErrors, or Arrays of GraphQLErrors when invalid. + * ```ts + * const AddressType = new GraphQLObjectType({ + * name: 'Address', + * fields: { + * street: { type: GraphQLString }, + * number: { type: GraphQLInt }, + * formatted: { + * type: GraphQLString, + * resolve(obj) { + * return obj.number + ' ' + obj.street + * } + * } + * } + * }); + * ``` * - * Validate will stop validation after a `maxErrors` limit has been reached. - * Attackers can send pathologically invalid queries to induce a DoS attack, - * so by default `maxErrors` set to 100 errors. + * When two types need to refer to each other, or a type needs to refer to + * itself in a field, you can use a function expression (aka a closure or a + * thunk) to supply the fields lazily. * - * Optionally a custom TypeInfo instance may be provided. If not provided, one - * will be created from the provided schema. + * Example: + * + * ```ts + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * name: { type: GraphQLString }, + * bestFriend: { type: PersonType }, + * }) + * }); + * ``` */ - -function validate(schema, documentAST) { - let rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedRules; - let options = arguments.length > 3 ? arguments[3] : undefined; - let typeInfo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : new _TypeInfo.TypeInfo(schema); - var _options$maxErrors; - const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100; - documentAST || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error. - - (0, _validate.assertValidSchema)(schema); - const abortObj = Object.freeze({}); - const errors = []; - const context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, error => { - if (errors.length >= maxErrors) { - errors.push(new _GraphQLError.GraphQLError('Too many validation errors, error limit reached. Validation aborted.')); // eslint-disable-next-line @typescript-eslint/no-throw-literal - - throw abortObj; +exports.GraphQLScalarType = GraphQLScalarType; +class GraphQLObjectType { + constructor(config) { + var _config$extensionASTN2; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; + this._fields = () => defineFieldMap(config); + this._interfaces = () => defineInterfaces(config); + config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "isTypeOf" as a function, ` + `but got: ${(0, _inspect.inspect)(config.isTypeOf)}.`); + } + get [Symbol.toStringTag]() { + return 'GraphQLObjectType'; + } + getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); } - errors.push(error); - }); // This uses a specialized visitor which runs multiple visitors in parallel, - // while maintaining the visitor skip and break API. - - const visitor = (0, _visitor.visitInParallel)(rules.map(rule => rule(context))); // Visit the whole document with each instance of all provided rules. - - try { - (0, _visitor.visit)(documentAST, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor)); - } catch (e) { - if (e !== abortObj) { - throw e; + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === 'function') { + this._interfaces = this._interfaces(); } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); } - return errors; } -/** - * @internal - */ - -function validateSDL(documentAST, schemaToExtend) { - let rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedSDLRules; - const errors = []; - const context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, error => { - errors.push(error); +exports.GraphQLObjectType = GraphQLObjectType; +function defineInterfaces(config) { + var _config$interfaces; + const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : []); + Array.isArray(interfaces) || (0, _devAssert.devAssert)(false, `${config.name} interfaces must be an Array or a function which returns an Array.`); + return interfaces; +} +function defineFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + var _fieldConfig$args; + isPlainObj(fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field config must be an object.`); + fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field resolver must be a function if ` + `provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.`); + const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj(argsConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} args must be an object with argument names as keys.`); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + args: defineArguments(argsConfig), + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; }); - const visitors = rules.map(rule => rule(context)); - (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors)); - return errors; +} +function defineArguments(config) { + return Object.entries(config).map(([argName, argConfig]) => ({ + name: (0, _assertName.assertName)(argName), + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(argConfig.extensions), + astNode: argConfig.astNode + })); +} +function isPlainObj(obj) { + return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj); +} +function fieldsToFieldsConfig(fields) { + return (0, _mapValue.mapValue)(fields, field => ({ + description: field.description, + type: field.type, + args: argsToArgsConfig(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); } /** - * Utility function which asserts a SDL document is valid by throwing an error - * if it is invalid. - * * @internal */ -function assertValidSDL(documentAST) { - const errors = validateSDL(documentAST); - if (errors.length !== 0) { - throw new Error(errors.map(error => error.message).join('\n\n')); - } +function argsToArgsConfig(args) { + return (0, _keyValMap.keyValMap)(args, arg => arg.name, arg => ({ + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + })); +} +function isRequiredArgument(arg) { + return isNonNullType(arg.type) && arg.defaultValue === undefined; } + /** - * Utility function which asserts a SDL document is valid by throwing an error - * if it is invalid. + * Interface Type Definition * - * @internal + * When a field can return one of a heterogeneous set of types, a Interface type + * is used to describe what types are possible, what fields are in common across + * all types, as well as a function to determine which type is actually used + * when the field is resolved. + * + * Example: + * + * ```ts + * const EntityType = new GraphQLInterfaceType({ + * name: 'Entity', + * fields: { + * name: { type: GraphQLString } + * } + * }); + * ``` */ - -function assertValidSDLExtension(documentAST, schema) { - const errors = validateSDL(documentAST, schema); - if (errors.length !== 0) { - throw new Error(errors.map(error => error.message).join('\n\n')); +class GraphQLInterfaceType { + constructor(config) { + var _config$extensionASTN3; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; + this._fields = defineFieldMap.bind(undefined, config); + this._interfaces = defineInterfaces.bind(undefined, config); + config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`); + } + get [Symbol.toStringTag]() { + return 'GraphQLInterfaceType'; + } + getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === 'function') { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); } } -/***/ }), - -/***/ "../../../node_modules/graphql/version.mjs": -/*!*************************************************!*\ - !*** ../../../node_modules/graphql/version.mjs ***! - \*************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.versionInfo = exports.version = void 0; -// Note: This file is autogenerated using "resources/gen-version.js" script and -// automatically updated by "npm version" command. +/** + * Union Type Definition + * + * When a field can return one of a heterogeneous set of types, a Union type + * is used to describe what types are possible as well as providing a function + * to determine which type is actually used when the field is resolved. + * + * Example: + * + * ```ts + * const PetType = new GraphQLUnionType({ + * name: 'Pet', + * types: [ DogType, CatType ], + * resolveType(value) { + * if (value instanceof Dog) { + * return DogType; + * } + * if (value instanceof Cat) { + * return CatType; + * } + * } + * }); + * ``` + */ +exports.GraphQLInterfaceType = GraphQLInterfaceType; +class GraphQLUnionType { + constructor(config) { + var _config$extensionASTN4; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; + this._types = defineTypes.bind(undefined, config); + config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`); + } + get [Symbol.toStringTag]() { + return 'GraphQLUnionType'; + } + getTypes() { + if (typeof this._types === 'function') { + this._types = this._types(); + } + return this._types; + } + toConfig() { + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } +} +exports.GraphQLUnionType = GraphQLUnionType; +function defineTypes(config) { + const types = resolveReadonlyArrayThunk(config.types); + Array.isArray(types) || (0, _devAssert.devAssert)(false, `Must provide Array of types or a function which returns such an array for Union ${config.name}.`); + return types; +} /** - * A string containing the version of the GraphQL.js library + * Enum Type Definition + * + * Some leaf values of requests and input values are Enums. GraphQL serializes + * Enum values as strings, however internally Enums can be represented by any + * kind of type, often integers. + * + * Example: + * + * ```ts + * const RGBType = new GraphQLEnumType({ + * name: 'RGB', + * values: { + * RED: { value: 0 }, + * GREEN: { value: 1 }, + * BLUE: { value: 2 } + * } + * }); + * ``` + * + * Note: If a value is not provided in a definition, the name of the enum value + * will be used as its internal value. */ -const version = '16.8.1'; +class GraphQLEnumType { + /* */ + constructor(config) { + var _config$extensionASTN5; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; + this._values = typeof config.values === 'function' ? config.values : defineEnumValues(this.name, config.values); + this._valueLookup = null; + this._nameLookup = null; + } + get [Symbol.toStringTag]() { + return 'GraphQLEnumType'; + } + getValues() { + if (typeof this._values === 'function') { + this._values = defineEnumValues(this.name, this._values()); + } + return this._values; + } + getValue(name) { + if (this._nameLookup === null) { + this._nameLookup = (0, _keyMap.keyMap)(this.getValues(), value => value.name); + } + return this._nameLookup[name]; + } + serialize(outputValue) { + if (this._valueLookup === null) { + this._valueLookup = new Map(this.getValues().map(enumValue => [enumValue.value, enumValue])); + } + const enumValue = this._valueLookup.get(outputValue); + if (enumValue === undefined) { + throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); + } + return enumValue.name; + } + parseValue(inputValue) /* T */ + { + if (typeof inputValue !== 'string') { + const valueStr = (0, _inspect.inspect)(inputValue); + throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr)); + } + const enumValue = this.getValue(inputValue); + if (enumValue == null) { + throw new _GraphQLError.GraphQLError(`Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue)); + } + return enumValue.value; + } + parseLiteral(valueNode, _variables) /* T */ + { + // Note: variables will be resolved to a value before calling this function. + if (valueNode.kind !== _kinds.Kind.ENUM) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), { + nodes: valueNode + }); + } + const enumValue = this.getValue(valueNode.value); + if (enumValue == null) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError(`Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), { + nodes: valueNode + }); + } + return enumValue.value; + } + toConfig() { + const values = (0, _keyValMap.keyValMap)(this.getValues(), value => value.name, value => ({ + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + })); + return { + name: this.name, + description: this.description, + values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } +} +exports.GraphQLEnumType = GraphQLEnumType; +function didYouMeanEnumValue(enumType, unknownValueStr) { + const allNames = enumType.getValues().map(value => value.name); + const suggestedValues = (0, _suggestionList.suggestionList)(unknownValueStr, allNames); + return (0, _didYouMean.didYouMean)('the enum value', suggestedValues); +} +function defineEnumValues(typeName, valueMap) { + isPlainObj(valueMap) || (0, _devAssert.devAssert)(false, `${typeName} values must be an object with value names as keys.`); + return Object.entries(valueMap).map(([valueName, valueConfig]) => { + isPlainObj(valueConfig) || (0, _devAssert.devAssert)(false, `${typeName}.${valueName} must refer to an object with a "value" key ` + `representing an internal value but got: ${(0, _inspect.inspect)(valueConfig)}.`); + return { + name: (0, _assertName.assertEnumValueName)(valueName), + description: valueConfig.description, + value: valueConfig.value !== undefined ? valueConfig.value : valueName, + deprecationReason: valueConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); +} + /** - * An object containing the components of the GraphQL.js version string + * Input Object Type Definition + * + * An input object defines a structured collection of fields which may be + * supplied to a field argument. + * + * Using `NonNull` will ensure that a value must be provided by the query + * + * Example: + * + * ```ts + * const GeoPoint = new GraphQLInputObjectType({ + * name: 'GeoPoint', + * fields: { + * lat: { type: new GraphQLNonNull(GraphQLFloat) }, + * lon: { type: new GraphQLNonNull(GraphQLFloat) }, + * alt: { type: GraphQLFloat, defaultValue: 0 }, + * } + * }); + * ``` */ -exports.version = version; -const versionInfo = Object.freeze({ - major: 16, - minor: 8, - patch: 1, - preReleaseTag: null -}); -exports.versionInfo = versionInfo; +class GraphQLInputObjectType { + constructor(config) { + var _config$extensionASTN6, _config$isOneOf; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; + this.isOneOf = (_config$isOneOf = config.isOneOf) !== null && _config$isOneOf !== void 0 ? _config$isOneOf : false; + this._fields = defineInputFieldMap.bind(undefined, config); + } + get [Symbol.toStringTag]() { + return 'GraphQLInputObjectType'; + } + getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); + } + return this._fields; + } + toConfig() { + const fields = (0, _mapValue.mapValue)(this.getFields(), field => ({ + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + return { + name: this.name, + description: this.description, + fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes, + isOneOf: this.isOneOf + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } +} +exports.GraphQLInputObjectType = GraphQLInputObjectType; +function defineInputFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + !('resolve' in fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); +} +function isRequiredInputField(field) { + return isNonNullType(field.type) && field.defaultValue === undefined; +} /***/ }), -/***/ "../../../node_modules/hey-listen/dist/hey-listen.es.js": -/*!**************************************************************!*\ - !*** ../../../node_modules/hey-listen/dist/hey-listen.es.js ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/graphql/type/directives.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/type/directives.mjs ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.warning = exports.invariant = void 0; -var warning = function () {}; -exports.warning = warning; -var invariant = function () {}; -exports.invariant = invariant; -if (true) { - exports.warning = warning = function (check, message) { - if (!check && typeof console !== 'undefined') { - console.warn(message); - } - }; - exports.invariant = invariant = function (check, message) { - if (!check) { - throw new Error(message); - } - }; -} - -/***/ }), - -/***/ "../../../node_modules/is-plain-object/index.js": -/*!******************************************************!*\ - !*** ../../../node_modules/is-plain-object/index.js ***! - \******************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +exports.GraphQLSpecifiedByDirective = exports.GraphQLSkipDirective = exports.GraphQLOneOfDirective = exports.GraphQLIncludeDirective = exports.GraphQLDirective = exports.GraphQLDeprecatedDirective = exports.DEFAULT_DEPRECATION_REASON = void 0; +exports.assertDirective = assertDirective; +exports.isDirective = isDirective; +exports.isSpecifiedDirective = isSpecifiedDirective; +exports.specifiedDirectives = void 0; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); +var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); +var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +/** + * Test if the given value is a GraphQL directive. + */ -/*! - * is-plain-object +function isDirective(directive) { + return (0, _instanceOf.instanceOf)(directive, GraphQLDirective); +} +function assertDirective(directive) { + if (!isDirective(directive)) { + throw new Error(`Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`); + } + return directive; +} +/** + * Custom extensions * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. + * @remarks + * Use a unique identifier name for your extension, for example the name of + * your library or project. Do not use a shortened identifier as this increases + * the risk of conflicts. We recommend you add at most one extension field, + * an object which can contain all the values you need. */ - - -var isObject = __webpack_require__(/*! isobject */ "../../../node_modules/isobject/index.js"); -function isObjectObject(o) { - return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; +/** + * Directives are used by the GraphQL runtime as a way of modifying execution + * behavior. Type system creators will usually not create these directly. + */ +class GraphQLDirective { + constructor(config) { + var _config$isRepeatable, _config$args; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.locations = config.locations; + this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + Array.isArray(config.locations) || (0, _devAssert.devAssert)(false, `@${config.name} locations must be an Array.`); + const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; + (0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args) || (0, _devAssert.devAssert)(false, `@${config.name} args must be an object with argument names as keys.`); + this.args = (0, _definition.defineArguments)(args); + } + get [Symbol.toStringTag]() { + return 'GraphQLDirective'; + } + toConfig() { + return { + name: this.name, + description: this.description, + locations: this.locations, + args: (0, _definition.argsToArgsConfig)(this.args), + isRepeatable: this.isRepeatable, + extensions: this.extensions, + astNode: this.astNode + }; + } + toString() { + return '@' + this.name; + } + toJSON() { + return this.toString(); + } } -module.exports = function isPlainObject(o) { - var ctor, prot; - if (isObjectObject(o) === false) return false; - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; +/** + * Used to conditionally include fields or fragments. + */ +exports.GraphQLDirective = GraphQLDirective; +const GraphQLIncludeDirective = exports.GraphQLIncludeDirective = new GraphQLDirective({ + name: 'include', + description: 'Directs the executor to include this field or fragment only when the `if` argument is true.', + locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], + args: { + if: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + description: 'Included when true.' + } + } +}); +/** + * Used to conditionally skip (exclude) fields or fragments. + */ - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; +const GraphQLSkipDirective = exports.GraphQLSkipDirective = new GraphQLDirective({ + name: 'skip', + description: 'Directs the executor to skip this field or fragment when the `if` argument is true.', + locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], + args: { + if: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + description: 'Skipped when true.' + } } +}); +/** + * Constant string used for default reason for a deprecation. + */ - // Most likely a plain Object - return true; -}; +const DEFAULT_DEPRECATION_REASON = exports.DEFAULT_DEPRECATION_REASON = 'No longer supported'; +/** + * Used to declare element of a GraphQL schema as deprecated. + */ -/***/ }), +const GraphQLDeprecatedDirective = exports.GraphQLDeprecatedDirective = new GraphQLDirective({ + name: 'deprecated', + description: 'Marks an element of a GraphQL schema as no longer supported.', + locations: [_directiveLocation.DirectiveLocation.FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ENUM_VALUE], + args: { + reason: { + type: _scalars.GraphQLString, + description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', + defaultValue: DEFAULT_DEPRECATION_REASON + } + } +}); +/** + * Used to provide a URL for specifying the behavior of custom scalar definitions. + */ -/***/ "../../../node_modules/is-primitive/index.js": -/*!***************************************************!*\ - !*** ../../../node_modules/is-primitive/index.js ***! - \***************************************************/ -/***/ (function(module) { +const GraphQLSpecifiedByDirective = exports.GraphQLSpecifiedByDirective = new GraphQLDirective({ + name: 'specifiedBy', + description: 'Exposes a URL that specifies the behavior of this scalar.', + locations: [_directiveLocation.DirectiveLocation.SCALAR], + args: { + url: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: 'The URL that specifies the behavior of this scalar.' + } + } +}); +/** + * Used to indicate an Input Object is a OneOf Input Object. + */ -/*! - * is-primitive - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. +const GraphQLOneOfDirective = exports.GraphQLOneOfDirective = new GraphQLDirective({ + name: 'oneOf', + description: 'Indicates exactly one field must be supplied and this field must not be `null`.', + locations: [_directiveLocation.DirectiveLocation.INPUT_OBJECT], + args: {} +}); +/** + * The full list of specified directives. */ +const specifiedDirectives = exports.specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective, GraphQLOneOfDirective]); +function isSpecifiedDirective(directive) { + return specifiedDirectives.some(({ + name + }) => name === directive.name); +} +/***/ }), -module.exports = function isPrimitive(val) { - if (typeof val === 'object') { - return val === null; - } - return typeof val !== 'function'; -}; - -/***/ }), - -/***/ "../../../node_modules/isarray/index.js": -/*!**********************************************!*\ - !*** ../../../node_modules/isarray/index.js ***! - \**********************************************/ -/***/ (function(module) { - - - -var toString = {}.toString; -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - -/***/ }), - -/***/ "../../../node_modules/isobject/index.js": -/*!***********************************************!*\ - !*** ../../../node_modules/isobject/index.js ***! - \***********************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * isobject - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -var isArray = __webpack_require__(/*! isarray */ "../../../node_modules/isarray/index.js"); -module.exports = function isObject(val) { - return val != null && typeof val === 'object' && isArray(val) === false; -}; - -/***/ }), - -/***/ "../../../node_modules/meros/browser/index.mjs": -/*!*****************************************************!*\ - !*** ../../../node_modules/meros/browser/index.mjs ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/graphql/type/index.mjs": +/*!****************************************************!*\ + !*** ../../../node_modules/graphql/type/index.mjs ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.meros = meros; -const separator = '\r\n\r\n'; -const decoder = new TextDecoder(); -async function* generate(stream, boundary, options) { - const reader = stream.getReader(), - is_eager = !options || !options.multiple; - let buffer = '', - is_preamble = true, - payloads = []; - try { - let result; - outer: while (!(result = await reader.read()).done) { - const chunk = decoder.decode(result.value); - const idx_chunk = chunk.indexOf(boundary); - let idx_boundary = buffer.length; - buffer += chunk; - if (!!~idx_chunk) { - // chunk itself had `boundary` marker - idx_boundary += idx_chunk; - } else { - // search combined (boundary can be across chunks) - idx_boundary = buffer.indexOf(boundary); - } - payloads = []; - while (!!~idx_boundary) { - const current = buffer.substring(0, idx_boundary); - const next = buffer.substring(idx_boundary + boundary.length); - if (is_preamble) { - is_preamble = false; - } else { - const headers = {}; - const idx_headers = current.indexOf(separator); - const arr_headers = buffer.slice(0, idx_headers).toString().trim().split(/\r\n/); - // parse headers - let tmp; - while (tmp = arr_headers.shift()) { - tmp = tmp.split(': '); - headers[tmp.shift().toLowerCase()] = tmp.join(': '); - } - let body = current.substring(idx_headers + separator.length, current.lastIndexOf('\r\n')); - let is_json = false; - tmp = headers['content-type']; - if (tmp && !!~tmp.indexOf('application/json')) { - try { - body = JSON.parse(body); - is_json = true; - } catch (_) {} - } - tmp = { - headers, - body, - json: is_json - }; - is_eager ? yield tmp : payloads.push(tmp); - // hit a tail boundary, break - if (next.substring(0, 2) === '--') break outer; - } - buffer = next; - idx_boundary = buffer.indexOf(boundary); - } - if (payloads.length) yield payloads; - } - } finally { - if (payloads.length) yield payloads; - reader.releaseLock(); +Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({ + enumerable: true, + get: function () { + return _directives.DEFAULT_DEPRECATION_REASON; } -} - -/** - * Yield immediately for every part made available on the response. If the `content-type` of the response isn't a - * multipart body, then we'll resolve with {@link Response}. - * - * @example - * - * ```js - * const parts = await fetch('/fetch-multipart') - * .then(meros); - * - * for await (const part of parts) { - * // do something with this part - * } - * ``` - */ -async function meros(response, options) { - if (!response.ok || !response.body || response.bodyUsed) return response; - const ctype = response.headers.get('content-type'); - if (!ctype || !~ctype.indexOf('multipart/mixed')) return response; - const idx_boundary = ctype.indexOf('boundary='); - return generate(response.body, `--${!!~idx_boundary ? - // +9 for 'boundary='.length - ctype.substring(idx_boundary + 9).trim().replace(/['"]/g, '') : '-'}`, options); -} - -/***/ }), - -/***/ "../../../node_modules/nullthrows/nullthrows.js": -/*!******************************************************!*\ - !*** ../../../node_modules/nullthrows/nullthrows.js ***! - \******************************************************/ -/***/ (function(module) { - - - -function nullthrows(x, message) { - if (x != null) { - return x; +})); +Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({ + enumerable: true, + get: function () { + return _scalars.GRAPHQL_MAX_INT; } - var error = new Error(message !== undefined ? message : 'Got unexpected ' + x); - error.framesToPop = 1; // Skip nullthrows's own stack frame. - throw error; -} -module.exports = nullthrows; -module.exports["default"] = nullthrows; -Object.defineProperty(module.exports, "__esModule", ({ - value: true })); - -/***/ }), - -/***/ "../../../node_modules/popmotion/dist/popmotion.cjs.js": -/*!*************************************************************!*\ - !*** ../../../node_modules/popmotion/dist/popmotion.cjs.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({ + enumerable: true, + get: function () { + return _scalars.GRAPHQL_MIN_INT; + } })); -var tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js"); -var styleValueTypes = __webpack_require__(/*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js"); -var sync = __webpack_require__(/*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js"); -function _interopDefaultLegacy(e) { - return e && typeof e === 'object' && 'default' in e ? e : { - 'default': e - }; -} -var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync); -const clamp = (min, max, v) => Math.min(Math.max(v, min), max); -const safeMin = 0.001; -const minDuration = 0.01; -const maxDuration = 10.0; -const minDamping = 0.05; -const maxDamping = 1; -function findSpring(_ref) { - let { - duration = 800, - bounce = 0.25, - velocity = 0, - mass = 1 - } = _ref; - let envelope; - let derivative; - heyListen.warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less"); - let dampingRatio = 1 - bounce; - dampingRatio = clamp(minDamping, maxDamping, dampingRatio); - duration = clamp(minDuration, maxDuration, duration / 1000); - if (dampingRatio < 1) { - envelope = undampedFreq => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - a / b * c; - }; - derivative = undampedFreq => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return factor * ((d - e) * f) / g; - }; - } else { - envelope = undampedFreq => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = undampedFreq => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; +Object.defineProperty(exports, "GraphQLBoolean", ({ + enumerable: true, + get: function () { + return _scalars.GraphQLBoolean; } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = duration * 1000; - if (isNaN(undampedFreq)) { - return { - stiffness: 100, - damping: 10, - duration - }; - } else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration - }; +})); +Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLDeprecatedDirective; } -} -const rootIterations = 12; -function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); +})); +Object.defineProperty(exports, "GraphQLDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLDirective; } - return result; -} -function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); -} -const durationKeys = ["duration", "bounce"]; -const physicsKeys = ["stiffness", "damping", "mass"]; -function isSpringType(options, keys) { - return keys.some(key => options[key] !== undefined); -} -function getSpringOptions(options) { - let springOptions = Object.assign({ - velocity: 0.0, - stiffness: 100, - damping: 10, - mass: 1.0, - isResolvedFromDuration: false - }, options); - if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) { - const derived = findSpring(options); - springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { - velocity: 0.0, - mass: 1.0 - }); - springOptions.isResolvedFromDuration = true; +})); +Object.defineProperty(exports, "GraphQLEnumType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLEnumType; } - return springOptions; -} -function spring(_a) { - var { - from = 0.0, - to = 1.0, - restSpeed = 2, - restDelta - } = _a, - options = tslib.__rest(_a, ["from", "to", "restSpeed", "restDelta"]); - const state = { - done: false, - value: from - }; - let { - stiffness, - damping, - mass, - velocity, - duration, - isResolvedFromDuration - } = getSpringOptions(options); - let resolveSpring = zero; - let resolveVelocity = zero; - function createSpring() { - const initialVelocity = velocity ? -(velocity / 1000) : 0.0; - const initialDelta = to - from; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000; - if (restDelta === undefined) { - restDelta = Math.min(Math.abs(to - from) / 100, 0.4); - } - if (dampingRatio < 1) { - const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - resolveSpring = t => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t)); - }; - resolveVelocity = t => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return dampingRatio * undampedAngularFreq * envelope * (Math.sin(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq + initialDelta * Math.cos(angularFreq * t)) - envelope * (Math.cos(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq * initialDelta * Math.sin(angularFreq * t)); - }; - } else if (dampingRatio === 1) { - resolveSpring = t => to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t); - } else { - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = t => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq; - }; - } +})); +Object.defineProperty(exports, "GraphQLFloat", ({ + enumerable: true, + get: function () { + return _scalars.GraphQLFloat; } - createSpring(); - return { - next: t => { - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = resolveVelocity(t) * 1000; - const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed; - const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta; - state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold; - } else { - state.done = t >= duration; - } - state.value = state.done ? to : current; - return state; - }, - flipTarget: () => { - velocity = -velocity; - [from, to] = [to, from]; - createSpring(); - } - }; -} -spring.needsInterpolation = (a, b) => typeof a === "string" || typeof b === "string"; -const zero = _t => 0; -const progress = (from, to, value) => { - const toFromDifference = to - from; - return toFromDifference === 0 ? 1 : (value - from) / toFromDifference; -}; -const mix = (from, to, progress) => -progress * from + progress * to + from; -function hueToRgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; -} -function hslaToRgba(_ref2) { - let { - hue, - saturation, - lightness, - alpha - } = _ref2; - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } else { - const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); +})); +Object.defineProperty(exports, "GraphQLID", ({ + enumerable: true, + get: function () { + return _scalars.GraphQLID; } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha - }; -} -const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const toExpo = to * to; - return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo)); -}; -const colorTypes = [styleValueTypes.hex, styleValueTypes.rgba, styleValueTypes.hsla]; -const getColorType = v => colorTypes.find(type => type.test(v)); -const notAnimatable = color => `'${color}' is not an animatable color. Use the equivalent color code instead.`; -const mixColor = (from, to) => { - let fromColorType = getColorType(from); - let toColorType = getColorType(to); - heyListen.invariant(!!fromColorType, notAnimatable(from)); - heyListen.invariant(!!toColorType, notAnimatable(to)); - let fromColor = fromColorType.parse(from); - let toColor = toColorType.parse(to); - if (fromColorType === styleValueTypes.hsla) { - fromColor = hslaToRgba(fromColor); - fromColorType = styleValueTypes.rgba; +})); +Object.defineProperty(exports, "GraphQLIncludeDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLIncludeDirective; } - if (toColorType === styleValueTypes.hsla) { - toColor = hslaToRgba(toColor); - toColorType = styleValueTypes.rgba; +})); +Object.defineProperty(exports, "GraphQLInputObjectType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLInputObjectType; } - const blended = Object.assign({}, fromColor); - return v => { - for (const key in blended) { - if (key !== "alpha") { - blended[key] = mixLinearColor(fromColor[key], toColor[key], v); - } - } - blended.alpha = mix(fromColor.alpha, toColor.alpha, v); - return fromColorType.transform(blended); - }; -}; -const zeroPoint = { - x: 0, - y: 0, - z: 0 -}; -const isNum = v => typeof v === 'number'; -const combineFunctions = (a, b) => v => b(a(v)); -const pipe = function () { - for (var _len = arguments.length, transformers = new Array(_len), _key = 0; _key < _len; _key++) { - transformers[_key] = arguments[_key]; +})); +Object.defineProperty(exports, "GraphQLInt", ({ + enumerable: true, + get: function () { + return _scalars.GraphQLInt; } - return transformers.reduce(combineFunctions); -}; -function getMixer(origin, target) { - if (isNum(origin)) { - return v => mix(origin, target, v); - } else if (styleValueTypes.color.test(origin)) { - return mixColor(origin, target); - } else { - return mixComplex(origin, target); +})); +Object.defineProperty(exports, "GraphQLInterfaceType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLInterfaceType; } -} -const mixArray = (from, to) => { - const output = [...from]; - const numValues = output.length; - const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i])); - return v => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](v); - } - return output; - }; -}; -const mixObject = (origin, target) => { - const output = Object.assign(Object.assign({}, origin), target); - const blendValue = {}; - for (const key in output) { - if (origin[key] !== undefined && target[key] !== undefined) { - blendValue[key] = getMixer(origin[key], target[key]); - } +})); +Object.defineProperty(exports, "GraphQLList", ({ + enumerable: true, + get: function () { + return _definition.GraphQLList; } - return v => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; -}; -function analyse(value) { - const parsed = styleValueTypes.complex.parse(value); - const numValues = parsed.length; - let numNumbers = 0; - let numRGB = 0; - let numHSL = 0; - for (let i = 0; i < numValues; i++) { - if (numNumbers || typeof parsed[i] === "number") { - numNumbers++; - } else { - if (parsed[i].hue !== undefined) { - numHSL++; - } else { - numRGB++; - } - } +})); +Object.defineProperty(exports, "GraphQLNonNull", ({ + enumerable: true, + get: function () { + return _definition.GraphQLNonNull; } - return { - parsed, - numNumbers, - numRGB, - numHSL - }; -} -const mixComplex = (origin, target) => { - const template = styleValueTypes.complex.createTransformer(target); - const originStats = analyse(origin); - const targetStats = analyse(target); - const canInterpolate = originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers; - if (canInterpolate) { - return pipe(mixArray(originStats.parsed, targetStats.parsed), template); - } else { - heyListen.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`); - return p => `${p > 0 ? target : origin}`; +})); +Object.defineProperty(exports, "GraphQLObjectType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLObjectType; } -}; -const mixNumber = (from, to) => p => mix(from, to, p); -function detectMixerFactory(v) { - if (typeof v === 'number') { - return mixNumber; - } else if (typeof v === 'string') { - if (styleValueTypes.color.test(v)) { - return mixColor; - } else { - return mixComplex; - } - } else if (Array.isArray(v)) { - return mixArray; - } else if (typeof v === 'object') { - return mixObject; +})); +Object.defineProperty(exports, "GraphQLOneOfDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLOneOfDirective; } -} -function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || detectMixerFactory(output[0]); - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] : ease; - mixer = pipe(easingFunction, mixer); - } - mixers.push(mixer); +})); +Object.defineProperty(exports, "GraphQLScalarType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLScalarType; } - return mixers; -} -function fastInterpolate(_ref3, _ref4) { - let [from, to] = _ref3; - let [mixer] = _ref4; - return v => mixer(progress(from, to, v)); -} -function slowInterpolate(input, mixers) { - const inputLength = input.length; - const lastInputIndex = inputLength - 1; - return v => { - let mixerIndex = 0; - let foundMixerIndex = false; - if (v <= input[0]) { - foundMixerIndex = true; - } else if (v >= input[lastInputIndex]) { - mixerIndex = lastInputIndex - 1; - foundMixerIndex = true; - } - if (!foundMixerIndex) { - let i = 1; - for (; i < inputLength; i++) { - if (input[i] > v || i === lastInputIndex) { - break; - } - } - mixerIndex = i - 1; - } - const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v); - return mixers[mixerIndex](progressInRange); - }; -} -function interpolate(input, output) { - let { - clamp: isClamp = true, - ease, - mixer - } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - const inputLength = input.length; - heyListen.invariant(inputLength === output.length, 'Both input and output ranges must be the same length'); - heyListen.invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.'); - if (input[0] > input[inputLength - 1]) { - input = [].concat(input); - output = [].concat(output); - input.reverse(); - output.reverse(); +})); +Object.defineProperty(exports, "GraphQLSchema", ({ + enumerable: true, + get: function () { + return _schema.GraphQLSchema; } - const mixers = createMixers(output, ease, mixer); - const interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers); - return isClamp ? v => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator; -} -const reverseEasing = easing => p => 1 - easing(1 - p); -const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; -const createExpoIn = power => p => Math.pow(p, power); -const createBackIn = power => p => p * p * ((power + 1) * p - power); -const createAnticipate = power => { - const backEasing = createBackIn(power); - return p => (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); -}; -const DEFAULT_OVERSHOOT_STRENGTH = 1.525; -const BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0; -const BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0; -const BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0; -const linear = p => p; -const easeIn = createExpoIn(2); -const easeOut = reverseEasing(easeIn); -const easeInOut = mirrorEasing(easeIn); -const circIn = p => 1 - Math.sin(Math.acos(p)); -const circOut = reverseEasing(circIn); -const circInOut = mirrorEasing(circOut); -const backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH); -const backOut = reverseEasing(backIn); -const backInOut = mirrorEasing(backIn); -const anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH); -const ca = 4356.0 / 361.0; -const cb = 35442.0 / 1805.0; -const cc = 16061.0 / 1805.0; -const bounceOut = p => { - if (p === 1 || p === 0) return p; - const p2 = p * p; - return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72; -}; -const bounceIn = reverseEasing(bounceOut); -const bounceInOut = p => p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5; -function defaultEasing(values, easing) { - return values.map(() => easing || easeInOut).splice(0, values.length - 1); -} -function defaultOffset(values) { - const numValues = values.length; - return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0); -} -function convertOffsetToTimes(offset, duration) { - return offset.map(o => o * duration); -} -function keyframes(_ref5) { - let { - from = 0, - to = 1, - ease, - offset, - duration = 300 - } = _ref5; - const state = { - done: false, - value: from - }; - const values = Array.isArray(to) ? to : [from, to]; - const times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration); - function createInterpolator() { - return interpolate(times, values, { - ease: Array.isArray(ease) ? ease : defaultEasing(values, ease) - }); +})); +Object.defineProperty(exports, "GraphQLSkipDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLSkipDirective; } - let interpolator = createInterpolator(); - return { - next: t => { - state.value = interpolator(t); - state.done = t >= duration; - return state; - }, - flipTarget: () => { - values.reverse(); - interpolator = createInterpolator(); - } - }; -} -function decay(_ref6) { - let { - velocity = 0, - from = 0, - power = 0.8, - timeConstant = 350, - restDelta = 0.5, - modifyTarget - } = _ref6; - const state = { - done: false, - value: from - }; - let amplitude = power * velocity; - const ideal = from + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - if (target !== ideal) amplitude = target - from; - return { - next: t => { - const delta = -amplitude * Math.exp(-t / timeConstant); - state.done = !(delta > restDelta || delta < -restDelta); - state.value = state.done ? target : target + delta; - return state; - }, - flipTarget: () => {} - }; -} -const types = { - keyframes, - spring, - decay -}; -function detectAnimationFromOptions(config) { - if (Array.isArray(config.to)) { - return keyframes; - } else if (types[config.type]) { - return types[config.type]; +})); +Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({ + enumerable: true, + get: function () { + return _directives.GraphQLSpecifiedByDirective; } - const keys = new Set(Object.keys(config)); - if (keys.has("ease") || keys.has("duration") && !keys.has("dampingRatio")) { - return keyframes; - } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) { - return spring; +})); +Object.defineProperty(exports, "GraphQLString", ({ + enumerable: true, + get: function () { + return _scalars.GraphQLString; } - return keyframes; -} -function loopElapsed(elapsed, duration) { - let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - return elapsed - duration - delay; -} -function reverseElapsed(elapsed, duration) { - let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - let isForwardPlayback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay; -} -function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) { - return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay; -} -const framesync = update => { - const passTimestamp = _ref7 => { - let { - delta - } = _ref7; - return update(delta); - }; - return { - start: () => sync__default["default"].update(passTimestamp, true), - stop: () => sync.cancelSync.update(passTimestamp) - }; -}; -function animate(_a) { - var _b, _c; - var { - from, - autoplay = true, - driver = framesync, - elapsed = 0, - repeat: repeatMax = 0, - repeatType = "loop", - repeatDelay = 0, - onPlay, - onStop, - onComplete, - onRepeat, - onUpdate - } = _a, - options = tslib.__rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]); - let { - to - } = options; - let driverControls; - let repeatCount = 0; - let computedDuration = options.duration; - let latest; - let isComplete = false; - let isForwardPlayback = true; - let interpolateFromNumber; - const animator = detectAnimationFromOptions(options); - if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) { - interpolateFromNumber = interpolate([0, 100], [from, to], { - clamp: false - }); - from = 0; - to = 100; +})); +Object.defineProperty(exports, "GraphQLUnionType", ({ + enumerable: true, + get: function () { + return _definition.GraphQLUnionType; } - const animation = animator(Object.assign(Object.assign({}, options), { - from, - to - })); - function repeat() { - repeatCount++; - if (repeatType === "reverse") { - isForwardPlayback = repeatCount % 2 === 0; - elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback); - } else { - elapsed = loopElapsed(elapsed, computedDuration, repeatDelay); - if (repeatType === "mirror") animation.flipTarget(); - } - isComplete = false; - onRepeat && onRepeat(); +})); +Object.defineProperty(exports, "SchemaMetaFieldDef", ({ + enumerable: true, + get: function () { + return _introspection.SchemaMetaFieldDef; } - function complete() { - driverControls.stop(); - onComplete && onComplete(); +})); +Object.defineProperty(exports, "TypeKind", ({ + enumerable: true, + get: function () { + return _introspection.TypeKind; } - function update(delta) { - if (!isForwardPlayback) delta = -delta; - elapsed += delta; - if (!isComplete) { - const state = animation.next(Math.max(0, elapsed)); - latest = state.value; - if (interpolateFromNumber) latest = interpolateFromNumber(latest); - isComplete = isForwardPlayback ? state.done : elapsed <= 0; - } - onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest); - if (isComplete) { - if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : computedDuration = elapsed; - if (repeatCount < repeatMax) { - hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat(); - } else { - complete(); - } - } +})); +Object.defineProperty(exports, "TypeMetaFieldDef", ({ + enumerable: true, + get: function () { + return _introspection.TypeMetaFieldDef; } - function play() { - onPlay === null || onPlay === void 0 ? void 0 : onPlay(); - driverControls = driver(update); - driverControls.start(); +})); +Object.defineProperty(exports, "TypeNameMetaFieldDef", ({ + enumerable: true, + get: function () { + return _introspection.TypeNameMetaFieldDef; } - autoplay && play(); - return { - stop: () => { - onStop === null || onStop === void 0 ? void 0 : onStop(); - driverControls.stop(); - } - }; -} -function velocityPerSecond(velocity, frameDuration) { - return frameDuration ? velocity * (1000 / frameDuration) : 0; -} -function inertia(_ref8) { - let { - from = 0, - velocity = 0, - min, - max, - power = 0.8, - timeConstant = 750, - bounceStiffness = 500, - bounceDamping = 10, - restDelta = 1, - modifyTarget, - driver, - onUpdate, - onComplete, - onStop - } = _ref8; - let currentAnimation; - function isOutOfBounds(v) { - return min !== undefined && v < min || max !== undefined && v > max; +})); +Object.defineProperty(exports, "__Directive", ({ + enumerable: true, + get: function () { + return _introspection.__Directive; } - function boundaryNearest(v) { - if (min === undefined) return max; - if (max === undefined) return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; +})); +Object.defineProperty(exports, "__DirectiveLocation", ({ + enumerable: true, + get: function () { + return _introspection.__DirectiveLocation; } - function startAnimation(options) { - currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); - currentAnimation = animate(Object.assign(Object.assign({}, options), { - driver, - onUpdate: v => { - var _a; - onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v); - (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v); - }, - onComplete, - onStop - })); +})); +Object.defineProperty(exports, "__EnumValue", ({ + enumerable: true, + get: function () { + return _introspection.__EnumValue; } - function startSpring(options) { - startAnimation(Object.assign({ - type: "spring", - stiffness: bounceStiffness, - damping: bounceDamping, - restDelta - }, options)); +})); +Object.defineProperty(exports, "__Field", ({ + enumerable: true, + get: function () { + return _introspection.__Field; } - if (isOutOfBounds(from)) { - startSpring({ - from, - velocity, - to: boundaryNearest(from) - }); - } else { - let target = power * velocity + from; - if (typeof modifyTarget !== "undefined") target = modifyTarget(target); - const boundary = boundaryNearest(target); - const heading = boundary === min ? -1 : 1; - let prev; - let current; - const checkBoundary = v => { - prev = current; - current = v; - velocity = velocityPerSecond(v - prev, sync.getFrameData().delta); - if (heading === 1 && v > boundary || heading === -1 && v < boundary) { - startSpring({ - from: v, - to: boundary, - velocity - }); - } - }; - startAnimation({ - type: "decay", - from, - velocity, - timeConstant, - power, - restDelta, - modifyTarget, - onUpdate: isOutOfBounds(target) ? checkBoundary : undefined - }); +})); +Object.defineProperty(exports, "__InputValue", ({ + enumerable: true, + get: function () { + return _introspection.__InputValue; } - return { - stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop() - }; -} -const radiansToDegrees = radians => radians * 180 / Math.PI; -const angle = function (a) { - let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : zeroPoint; - return radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x)); -}; -const applyOffset = (from, to) => { - let hasReceivedFrom = true; - if (to === undefined) { - to = from; - hasReceivedFrom = false; +})); +Object.defineProperty(exports, "__Schema", ({ + enumerable: true, + get: function () { + return _introspection.__Schema; } - return v => { - if (hasReceivedFrom) { - return v - from + to; - } else { - from = v; - hasReceivedFrom = true; - return to; - } - }; -}; -const identity = v => v; -const createAttractor = function () { - let alterDisplacement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : identity; - return (constant, origin, v) => { - const displacement = origin - v; - const springModifiedDisplacement = -(0 - constant + 1) * (0 - alterDisplacement(Math.abs(displacement))); - return displacement <= 0 ? origin + springModifiedDisplacement : origin - springModifiedDisplacement; - }; -}; -const attract = createAttractor(); -const attractExpo = createAttractor(Math.sqrt); -const degreesToRadians = degrees => degrees * Math.PI / 180; -const isPoint = point => point.hasOwnProperty('x') && point.hasOwnProperty('y'); -const isPoint3D = point => isPoint(point) && point.hasOwnProperty('z'); -const distance1D = (a, b) => Math.abs(a - b); -function distance(a, b) { - if (isNum(a) && isNum(b)) { - return distance1D(a, b); - } else if (isPoint(a) && isPoint(b)) { - const xDelta = distance1D(a.x, b.x); - const yDelta = distance1D(a.y, b.y); - const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0; - return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2)); +})); +Object.defineProperty(exports, "__Type", ({ + enumerable: true, + get: function () { + return _introspection.__Type; } -} -const pointFromVector = (origin, angle, distance) => { - angle = degreesToRadians(angle); - return { - x: distance * Math.cos(angle) + origin.x, - y: distance * Math.sin(angle) + origin.y - }; -}; -const toDecimal = function (num) { - let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; - precision = Math.pow(10, precision); - return Math.round(num * precision) / precision; -}; -const smoothFrame = function (prevValue, nextValue, duration) { - let smoothing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - return toDecimal(prevValue + duration * (nextValue - prevValue) / Math.max(smoothing, duration)); -}; -const smooth = function () { - let strength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 50; - let previousValue = 0; - let lastUpdated = 0; - return v => { - const currentFramestamp = sync.getFrameData().timestamp; - const timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0; - const newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue; - lastUpdated = currentFramestamp; - previousValue = newValue; - return newValue; - }; -}; -const snap = points => { - if (typeof points === 'number') { - return v => Math.round(v / points) * points; - } else { - let i = 0; - const numPoints = points.length; - return v => { - let lastDistance = Math.abs(points[0] - v); - for (i = 1; i < numPoints; i++) { - const point = points[i]; - const distance = Math.abs(point - v); - if (distance === 0) return point; - if (distance > lastDistance) return points[i - 1]; - if (i === numPoints - 1) return point; - lastDistance = distance; - } - }; +})); +Object.defineProperty(exports, "__TypeKind", ({ + enumerable: true, + get: function () { + return _introspection.__TypeKind; } -}; -function velocityPerFrame(xps, frameDuration) { - return xps / (1000 / frameDuration); -} -const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((v - min) % rangeSize + rangeSize) % rangeSize + min; -}; -const a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1; -const b = (a1, a2) => 3.0 * a2 - 6.0 * a1; -const c = a1 => 3.0 * a1; -const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t; -const getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1); -const subdivisionPrecision = 0.0000001; -const subdivisionMaxIterations = 10; -function binarySubdivide(aX, aA, aB, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = aA + (aB - aA) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - aX; - if (currentX > 0.0) { - aB = currentT; - } else { - aA = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations); - return currentT; -} -const newtonIterations = 8; -const newtonMinSlope = 0.001; -function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { - for (let i = 0; i < newtonIterations; ++i) { - const currentSlope = getSlope(aGuessT, mX1, mX2); - if (currentSlope === 0.0) { - return aGuessT; - } - const currentX = calcBezier(aGuessT, mX1, mX2) - aX; - aGuessT -= currentX / currentSlope; +})); +Object.defineProperty(exports, "assertAbstractType", ({ + enumerable: true, + get: function () { + return _definition.assertAbstractType; } - return aGuessT; -} -const kSplineTableSize = 11; -const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); -function cubicBezier(mX1, mY1, mX2, mY2) { - if (mX1 === mY1 && mX2 === mY2) return linear; - const sampleValues = new Float32Array(kSplineTableSize); - for (let i = 0; i < kSplineTableSize; ++i) { - sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); +})); +Object.defineProperty(exports, "assertCompositeType", ({ + enumerable: true, + get: function () { + return _definition.assertCompositeType; } - function getTForX(aX) { - let intervalStart = 0.0; - let currentSample = 1; - const lastSample = kSplineTableSize - 1; - for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { - intervalStart += kSampleStepSize; - } - --currentSample; - const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]); - const guessForT = intervalStart + dist * kSampleStepSize; - const initialSlope = getSlope(guessForT, mX1, mX2); - if (initialSlope >= newtonMinSlope) { - return newtonRaphsonIterate(aX, guessForT, mX1, mX2); - } else if (initialSlope === 0.0) { - return guessForT; - } else { - return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); - } +})); +Object.defineProperty(exports, "assertDirective", ({ + enumerable: true, + get: function () { + return _directives.assertDirective; } - return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); -} -const steps = function (steps) { - let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'end'; - return progress => { - progress = direction === 'end' ? Math.min(progress, 0.999) : Math.max(progress, 0.001); - const expanded = progress * steps; - const rounded = direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / steps); - }; -}; -exports.angle = angle; -exports.animate = animate; -exports.anticipate = anticipate; -exports.applyOffset = applyOffset; -exports.attract = attract; -exports.attractExpo = attractExpo; -exports.backIn = backIn; -exports.backInOut = backInOut; -exports.backOut = backOut; -exports.bounceIn = bounceIn; -exports.bounceInOut = bounceInOut; -exports.bounceOut = bounceOut; -exports.circIn = circIn; -exports.circInOut = circInOut; -exports.circOut = circOut; -exports.clamp = clamp; -exports.createAnticipate = createAnticipate; -exports.createAttractor = createAttractor; -exports.createBackIn = createBackIn; -exports.createExpoIn = createExpoIn; -exports.cubicBezier = cubicBezier; -exports.decay = decay; -exports.degreesToRadians = degreesToRadians; -exports.distance = distance; -exports.easeIn = easeIn; -exports.easeInOut = easeInOut; -exports.easeOut = easeOut; -exports.inertia = inertia; -exports.interpolate = interpolate; -exports.isPoint = isPoint; -exports.isPoint3D = isPoint3D; -exports.keyframes = keyframes; -exports.linear = linear; -exports.mirrorEasing = mirrorEasing; -exports.mix = mix; -exports.mixColor = mixColor; -exports.mixComplex = mixComplex; -exports.pipe = pipe; -exports.pointFromVector = pointFromVector; -exports.progress = progress; -exports.radiansToDegrees = radiansToDegrees; -exports.reverseEasing = reverseEasing; -exports.smooth = smooth; -exports.smoothFrame = smoothFrame; -exports.snap = snap; -exports.spring = spring; -exports.steps = steps; -exports.toDecimal = toDecimal; -exports.velocityPerFrame = velocityPerFrame; -exports.velocityPerSecond = velocityPerSecond; -exports.wrap = wrap; - -/***/ }), - -/***/ "../../../node_modules/punycode.js/punycode.es6.js": -/*!*********************************************************!*\ - !*** ../../../node_modules/punycode.js/punycode.es6.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -/** Highest positive signed 32-bit float value */ -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.toUnicode = exports.toASCII = exports.encode = exports["default"] = exports.decode = void 0; -exports.ucs2decode = ucs2decode; -exports.ucs2encode = void 0; -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); +Object.defineProperty(exports, "assertEnumType", ({ + enumerable: true, + get: function () { + return _definition.assertEnumType; } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; +})); +Object.defineProperty(exports, "assertEnumValueName", ({ + enumerable: true, + get: function () { + return _assertName.assertEnumValueName; } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } +})); +Object.defineProperty(exports, "assertInputObjectType", ({ + enumerable: true, + get: function () { + return _definition.assertInputObjectType; } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -exports.ucs2encode = ucs2encode; -const basicToDigit = function (codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); +})); +Object.defineProperty(exports, "assertInputType", ({ + enumerable: true, + get: function () { + return _definition.assertInputType; } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; +})); +Object.defineProperty(exports, "assertInterfaceType", ({ + enumerable: true, + get: function () { + return _definition.assertInterfaceType; } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; +})); +Object.defineProperty(exports, "assertLeafType", ({ + enumerable: true, + get: function () { + return _definition.assertLeafType; } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function (digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function (delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for /* no initialization */ - (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); +})); +Object.defineProperty(exports, "assertListType", ({ + enumerable: true, + get: function () { + return _definition.assertListType; } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function (input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; +})); +Object.defineProperty(exports, "assertName", ({ + enumerable: true, + get: function () { + return _assertName.assertName; } - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); +})); +Object.defineProperty(exports, "assertNamedType", ({ + enumerable: true, + get: function () { + return _definition.assertNamedType; } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for /* no final expression */ - (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) { - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for /* no condition */ - (let w = 1, k = base;; k += base) { - if (index >= inputLength) { - error('invalid-input'); - } - const digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - i += digit * w; - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { - break; - } - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - w *= baseMinusT; - } - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); +})); +Object.defineProperty(exports, "assertNonNullType", ({ + enumerable: true, + get: function () { + return _definition.assertNonNullType; } - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -exports.decode = decode; -const encode = function (input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } +})); +Object.defineProperty(exports, "assertNullableType", ({ + enumerable: true, + get: function () { + return _definition.assertNullableType; } - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); +})); +Object.defineProperty(exports, "assertObjectType", ({ + enumerable: true, + get: function () { + return _definition.assertObjectType; } - - // Main encoding loop: - while (handledCPCount < inputLength) { - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for /* no condition */ - (let k = base;; k += base) { - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - ++delta; - ++n; +})); +Object.defineProperty(exports, "assertOutputType", ({ + enumerable: true, + get: function () { + return _definition.assertOutputType; } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -exports.encode = encode; -const toUnicode = function (input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -exports.toUnicode = toUnicode; -const toASCII = function (input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -exports.toASCII = toASCII; -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; -var _default = punycode; -exports["default"] = _default; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js": -/*!******************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.RemoveScrollBar = void 0; -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js"); -var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); -var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var Style = (0, _reactStyleSingleton.styleSingleton)(); -// important tip - once we measure scrollBar width and remove them -// we could not repeat this operation -// thus we are using style-singleton - only the first "yet correct" style will be applied. -var getStyles = function (_a, allowRelative, gapMode, important) { - var left = _a.left, - top = _a.top, - right = _a.right, - gap = _a.gap; - if (gapMode === void 0) { - gapMode = 'margin'; +Object.defineProperty(exports, "assertScalarType", ({ + enumerable: true, + get: function () { + return _definition.assertScalarType; } - return "\n .".concat(_constants.noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";")].filter(Boolean).join(''), "\n }\n \n .").concat(_constants.zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants.fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants.zeroRightClassName, " .").concat(_constants.zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(_constants.fullWidthClassName, " .").concat(_constants.fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(_constants.removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); -}; -/** - * Removes page scrollbar and blocks page scroll when mounted - */ -var RemoveScrollBar = function (props) { - var noRelative = props.noRelative, - noImportant = props.noImportant, - _a = props.gapMode, - gapMode = _a === void 0 ? 'margin' : _a; - var gap = React.useMemo(function () { - return (0, _utils.getGapWidth)(gapMode); - }, [gapMode]); - return /*#__PURE__*/React.createElement(Style, { - styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') - }); -}; -exports.RemoveScrollBar = RemoveScrollBar; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js": -/*!******************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports.zeroRightClassName = exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = void 0; -var zeroRightClassName = 'right-scroll-bar-position'; -exports.zeroRightClassName = zeroRightClassName; -var fullWidthClassName = 'width-before-scroll-bar'; -exports.fullWidthClassName = fullWidthClassName; -var noScrollbarsClassName = 'with-scroll-bars-hidden'; -/** - * Name of a CSS variable containing the amount of "hidden" scrollbar - * ! might be undefined ! use will fallback! - */ -exports.noScrollbarsClassName = noScrollbarsClassName; -var removedBarSizeVariable = '--removed-body-scroll-bar-size'; -exports.removedBarSizeVariable = removedBarSizeVariable; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js": -/*!**************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +Object.defineProperty(exports, "assertSchema", ({ + enumerable: true, + get: function () { + return _schema.assertSchema; + } })); -Object.defineProperty(exports, "RemoveScrollBar", ({ +Object.defineProperty(exports, "assertType", ({ enumerable: true, get: function () { - return _component.RemoveScrollBar; + return _definition.assertType; } })); -Object.defineProperty(exports, "fullWidthClassName", ({ +Object.defineProperty(exports, "assertUnionType", ({ enumerable: true, get: function () { - return _constants.fullWidthClassName; + return _definition.assertUnionType; } })); -Object.defineProperty(exports, "getGapWidth", ({ +Object.defineProperty(exports, "assertValidSchema", ({ enumerable: true, get: function () { - return _utils.getGapWidth; + return _validate.assertValidSchema; } })); -Object.defineProperty(exports, "noScrollbarsClassName", ({ +Object.defineProperty(exports, "assertWrappingType", ({ enumerable: true, get: function () { - return _constants.noScrollbarsClassName; + return _definition.assertWrappingType; } })); -Object.defineProperty(exports, "removedBarSizeVariable", ({ +Object.defineProperty(exports, "getNamedType", ({ enumerable: true, get: function () { - return _constants.removedBarSizeVariable; + return _definition.getNamedType; } })); -Object.defineProperty(exports, "zeroRightClassName", ({ +Object.defineProperty(exports, "getNullableType", ({ enumerable: true, get: function () { - return _constants.zeroRightClassName; + return _definition.getNullableType; } })); -var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js"); -var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); -var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js": -/*!**************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +Object.defineProperty(exports, "introspectionTypes", ({ + enumerable: true, + get: function () { + return _introspection.introspectionTypes; + } })); -exports.zeroGap = exports.getGapWidth = void 0; -var zeroGap = { - left: 0, - top: 0, - right: 0, - gap: 0 -}; -exports.zeroGap = zeroGap; -var parse = function (x) { - return parseInt(x || '', 10) || 0; -}; -var getOffset = function (gapMode) { - var cs = window.getComputedStyle(document.body); - if (true) { - if (cs.overflowY === 'hidden') { - console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body'); - } +Object.defineProperty(exports, "isAbstractType", ({ + enumerable: true, + get: function () { + return _definition.isAbstractType; } - var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft']; - var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop']; - var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight']; - return [parse(left), parse(top), parse(right)]; -}; -var getGapWidth = function (gapMode) { - if (gapMode === void 0) { - gapMode = 'margin'; +})); +Object.defineProperty(exports, "isCompositeType", ({ + enumerable: true, + get: function () { + return _definition.isCompositeType; } - if (typeof window === 'undefined') { - return zeroGap; +})); +Object.defineProperty(exports, "isDirective", ({ + enumerable: true, + get: function () { + return _directives.isDirective; } - var offsets = getOffset(gapMode); - var documentWidth = document.documentElement.clientWidth; - var windowWidth = window.innerWidth; - return { - left: offsets[0], - top: offsets[1], - right: offsets[2], - gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]) - }; -}; -exports.getGapWidth = getGapWidth; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js": -/*!****************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/Combination.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true })); -exports["default"] = void 0; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _UI = __webpack_require__(/*! ./UI */ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js"); -var _sidecar = _interopRequireDefault(__webpack_require__(/*! ./sidecar */ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var ReactRemoveScroll = /*#__PURE__*/React.forwardRef(function (props, ref) { - return /*#__PURE__*/React.createElement(_UI.RemoveScroll, (0, _tslib.__assign)({}, props, { - ref: ref, - sideCar: _sidecar.default - })); -}); -ReactRemoveScroll.classNames = _UI.RemoveScroll.classNames; -var _default = ReactRemoveScroll; -exports["default"] = _default; +Object.defineProperty(exports, "isEnumType", ({ + enumerable: true, + get: function () { + return _definition.isEnumType; + } +})); +Object.defineProperty(exports, "isInputObjectType", ({ + enumerable: true, + get: function () { + return _definition.isInputObjectType; + } +})); +Object.defineProperty(exports, "isInputType", ({ + enumerable: true, + get: function () { + return _definition.isInputType; + } +})); +Object.defineProperty(exports, "isInterfaceType", ({ + enumerable: true, + get: function () { + return _definition.isInterfaceType; + } +})); +Object.defineProperty(exports, "isIntrospectionType", ({ + enumerable: true, + get: function () { + return _introspection.isIntrospectionType; + } +})); +Object.defineProperty(exports, "isLeafType", ({ + enumerable: true, + get: function () { + return _definition.isLeafType; + } +})); +Object.defineProperty(exports, "isListType", ({ + enumerable: true, + get: function () { + return _definition.isListType; + } +})); +Object.defineProperty(exports, "isNamedType", ({ + enumerable: true, + get: function () { + return _definition.isNamedType; + } +})); +Object.defineProperty(exports, "isNonNullType", ({ + enumerable: true, + get: function () { + return _definition.isNonNullType; + } +})); +Object.defineProperty(exports, "isNullableType", ({ + enumerable: true, + get: function () { + return _definition.isNullableType; + } +})); +Object.defineProperty(exports, "isObjectType", ({ + enumerable: true, + get: function () { + return _definition.isObjectType; + } +})); +Object.defineProperty(exports, "isOutputType", ({ + enumerable: true, + get: function () { + return _definition.isOutputType; + } +})); +Object.defineProperty(exports, "isRequiredArgument", ({ + enumerable: true, + get: function () { + return _definition.isRequiredArgument; + } +})); +Object.defineProperty(exports, "isRequiredInputField", ({ + enumerable: true, + get: function () { + return _definition.isRequiredInputField; + } +})); +Object.defineProperty(exports, "isScalarType", ({ + enumerable: true, + get: function () { + return _definition.isScalarType; + } +})); +Object.defineProperty(exports, "isSchema", ({ + enumerable: true, + get: function () { + return _schema.isSchema; + } +})); +Object.defineProperty(exports, "isSpecifiedDirective", ({ + enumerable: true, + get: function () { + return _directives.isSpecifiedDirective; + } +})); +Object.defineProperty(exports, "isSpecifiedScalarType", ({ + enumerable: true, + get: function () { + return _scalars.isSpecifiedScalarType; + } +})); +Object.defineProperty(exports, "isType", ({ + enumerable: true, + get: function () { + return _definition.isType; + } +})); +Object.defineProperty(exports, "isUnionType", ({ + enumerable: true, + get: function () { + return _definition.isUnionType; + } +})); +Object.defineProperty(exports, "isWrappingType", ({ + enumerable: true, + get: function () { + return _definition.isWrappingType; + } +})); +Object.defineProperty(exports, "resolveObjMapThunk", ({ + enumerable: true, + get: function () { + return _definition.resolveObjMapThunk; + } +})); +Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({ + enumerable: true, + get: function () { + return _definition.resolveReadonlyArrayThunk; + } +})); +Object.defineProperty(exports, "specifiedDirectives", ({ + enumerable: true, + get: function () { + return _directives.specifiedDirectives; + } +})); +Object.defineProperty(exports, "specifiedScalarTypes", ({ + enumerable: true, + get: function () { + return _scalars.specifiedScalarTypes; + } +})); +Object.defineProperty(exports, "validateSchema", ({ + enumerable: true, + get: function () { + return _validate.validateSchema; + } +})); +var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); +var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); /***/ }), -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js": -/*!***************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***! - \***************************************************************************/ +/***/ "../../../node_modules/graphql/type/introspection.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/type/introspection.mjs ***! + \************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoveScrollSideCar = RemoveScrollSideCar; -exports.getTouchXY = exports.getDeltaXY = void 0; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _reactRemoveScrollBar = __webpack_require__(/*! react-remove-scroll-bar */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js"); -var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js"); -var _aggresiveCapture = __webpack_require__(/*! ./aggresiveCapture */ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"); -var _handleScroll = __webpack_require__(/*! ./handleScroll */ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var getTouchXY = function (event) { - return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0]; -}; -exports.getTouchXY = getTouchXY; -var getDeltaXY = function (event) { - return [event.deltaX, event.deltaY]; -}; -exports.getDeltaXY = getDeltaXY; -var extractRef = function (ref) { - return ref && 'current' in ref ? ref.current : ref; -}; -var deltaCompare = function (x, y) { - return x[0] === y[0] && x[1] === y[1]; -}; -var generateStyle = function (id) { - return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); -}; -var idCounter = 0; -var lockStack = []; -function RemoveScrollSideCar(props) { - var shouldPreventQueue = React.useRef([]); - var touchStartRef = React.useRef([0, 0]); - var activeAxis = React.useRef(); - var id = React.useState(idCounter++)[0]; - var Style = React.useState(function () { - return (0, _reactStyleSingleton.styleSingleton)(); - })[0]; - var lastProps = React.useRef(props); - React.useEffect(function () { - lastProps.current = props; - }, [props]); - React.useEffect(function () { - if (props.inert) { - document.body.classList.add("block-interactivity-".concat(id)); - var allow_1 = (0, _tslib.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); - allow_1.forEach(function (el) { - return el.classList.add("allow-interactivity-".concat(id)); - }); - return function () { - document.body.classList.remove("block-interactivity-".concat(id)); - allow_1.forEach(function (el) { - return el.classList.remove("allow-interactivity-".concat(id)); - }); - }; - } - return; - }, [props.inert, props.lockRef.current, props.shards]); - var shouldCancelEvent = React.useCallback(function (event, parent) { - if ('touches' in event && event.touches.length === 2) { - return !lastProps.current.allowPinchZoom; - } - var touch = getTouchXY(event); - var touchStart = touchStartRef.current; - var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0]; - var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1]; - var currentAxis; - var target = event.target; - var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v'; - // allow horizontal touch move on Range inputs. They will not cause any scroll - if ('touches' in event && moveDirection === 'h' && target.type === 'range') { - return false; +exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0; +exports.isIntrospectionType = isIntrospectionType; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _astFromValue = __webpack_require__(/*! ../utilities/astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +const __Schema = exports.__Schema = new _definition.GraphQLObjectType({ + name: '__Schema', + description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', + fields: () => ({ + description: { + type: _scalars.GraphQLString, + resolve: schema => schema.description + }, + types: { + description: 'A list of all types supported by this server.', + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))), + resolve(schema) { + return Object.values(schema.getTypeMap()); + } + }, + queryType: { + description: 'The type that query operations will be rooted at.', + type: new _definition.GraphQLNonNull(__Type), + resolve: schema => schema.getQueryType() + }, + mutationType: { + description: 'If this server supports mutation, the type that mutation operations will be rooted at.', + type: __Type, + resolve: schema => schema.getMutationType() + }, + subscriptionType: { + description: 'If this server support subscription, the type that subscription operations will be rooted at.', + type: __Type, + resolve: schema => schema.getSubscriptionType() + }, + directives: { + description: 'A list of all directives supported by this server.', + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))), + resolve: schema => schema.getDirectives() } - var canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target); - if (!canBeScrolledInMainDirection) { - return true; + }) +}); +const __Directive = exports.__Directive = new _definition.GraphQLObjectType({ + name: '__Directive', + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: directive => directive.name + }, + description: { + type: _scalars.GraphQLString, + resolve: directive => directive.description + }, + isRepeatable: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: directive => directive.isRepeatable + }, + locations: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation))), + resolve: directive => directive.locations + }, + args: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { + includeDeprecated + }) { + return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null); + } } - if (canBeScrolledInMainDirection) { - currentAxis = moveDirection; - } else { - currentAxis = moveDirection === 'v' ? 'h' : 'v'; - canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target); - // other axis might be not scrollable + }) +}); +const __DirectiveLocation = exports.__DirectiveLocation = new _definition.GraphQLEnumType({ + name: '__DirectiveLocation', + description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', + values: { + QUERY: { + value: _directiveLocation.DirectiveLocation.QUERY, + description: 'Location adjacent to a query operation.' + }, + MUTATION: { + value: _directiveLocation.DirectiveLocation.MUTATION, + description: 'Location adjacent to a mutation operation.' + }, + SUBSCRIPTION: { + value: _directiveLocation.DirectiveLocation.SUBSCRIPTION, + description: 'Location adjacent to a subscription operation.' + }, + FIELD: { + value: _directiveLocation.DirectiveLocation.FIELD, + description: 'Location adjacent to a field.' + }, + FRAGMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION, + description: 'Location adjacent to a fragment definition.' + }, + FRAGMENT_SPREAD: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, + description: 'Location adjacent to a fragment spread.' + }, + INLINE_FRAGMENT: { + value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT, + description: 'Location adjacent to an inline fragment.' + }, + VARIABLE_DEFINITION: { + value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION, + description: 'Location adjacent to a variable definition.' + }, + SCHEMA: { + value: _directiveLocation.DirectiveLocation.SCHEMA, + description: 'Location adjacent to a schema definition.' + }, + SCALAR: { + value: _directiveLocation.DirectiveLocation.SCALAR, + description: 'Location adjacent to a scalar definition.' + }, + OBJECT: { + value: _directiveLocation.DirectiveLocation.OBJECT, + description: 'Location adjacent to an object type definition.' + }, + FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION, + description: 'Location adjacent to a field definition.' + }, + ARGUMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, + description: 'Location adjacent to an argument definition.' + }, + INTERFACE: { + value: _directiveLocation.DirectiveLocation.INTERFACE, + description: 'Location adjacent to an interface definition.' + }, + UNION: { + value: _directiveLocation.DirectiveLocation.UNION, + description: 'Location adjacent to a union definition.' + }, + ENUM: { + value: _directiveLocation.DirectiveLocation.ENUM, + description: 'Location adjacent to an enum definition.' + }, + ENUM_VALUE: { + value: _directiveLocation.DirectiveLocation.ENUM_VALUE, + description: 'Location adjacent to an enum value definition.' + }, + INPUT_OBJECT: { + value: _directiveLocation.DirectiveLocation.INPUT_OBJECT, + description: 'Location adjacent to an input object type definition.' + }, + INPUT_FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, + description: 'Location adjacent to an input object field definition.' } + } +}); +const __Type = exports.__Type = new _definition.GraphQLObjectType({ + name: '__Type', + description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, 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: () => ({ + kind: { + type: new _definition.GraphQLNonNull(__TypeKind), + resolve(type) { + if ((0, _definition.isScalarType)(type)) { + return TypeKind.SCALAR; + } + if ((0, _definition.isObjectType)(type)) { + return TypeKind.OBJECT; + } + if ((0, _definition.isInterfaceType)(type)) { + return TypeKind.INTERFACE; + } + if ((0, _definition.isUnionType)(type)) { + return TypeKind.UNION; + } + if ((0, _definition.isEnumType)(type)) { + return TypeKind.ENUM; + } + if ((0, _definition.isInputObjectType)(type)) { + return TypeKind.INPUT_OBJECT; + } + if ((0, _definition.isListType)(type)) { + return TypeKind.LIST; + } + if ((0, _definition.isNonNullType)(type)) { + return TypeKind.NON_NULL; + } + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered) - if (!canBeScrolledInMainDirection) { - return false; - } - if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) { - activeAxis.current = currentAxis; - } - if (!currentAxis) { - return true; - } - var cancelingAxis = activeAxis.current || currentAxis; - return (0, _handleScroll.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true); - }, []); - var shouldPrevent = React.useCallback(function (_event) { - var event = _event; - if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) { - // not the last active - return; - } - var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); - var sourceEvent = shouldPreventQueue.current.filter(function (e) { - return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); - })[0]; - // self event, and should be canceled - if (sourceEvent && sourceEvent.should) { - if (event.cancelable) { - event.preventDefault(); + false || (0, _invariant.invariant)(false, `Unexpected type: "${(0, _inspect.inspect)(type)}".`); } - return; - } - // outside or shard event - if (!sourceEvent) { - var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) { - return node.contains(event.target); - }); - var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; - if (shouldStop) { - if (event.cancelable) { - event.preventDefault(); + }, + name: { + type: _scalars.GraphQLString, + resolve: type => 'name' in type ? type.name : undefined + }, + description: { + type: _scalars.GraphQLString, + resolve: (type // FIXME: add test case + ) => /* c8 ignore next */ + 'description' in type ? type.description : undefined + }, + specifiedByURL: { + type: _scalars.GraphQLString, + resolve: obj => 'specifiedByURL' in obj ? obj.specifiedByURL : undefined + }, + fields: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type, { + includeDeprecated + }) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + const fields = Object.values(type.getFields()); + return includeDeprecated ? fields : fields.filter(field => field.deprecationReason == null); + } + } + }, + interfaces: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), + resolve(type) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + return type.getInterfaces(); + } + } + }, + possibleTypes: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), + resolve(type, _args, _context, { + schema + }) { + if ((0, _definition.isAbstractType)(type)) { + return schema.getPossibleTypes(type); + } + } + }, + enumValues: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type, { + includeDeprecated + }) { + if ((0, _definition.isEnumType)(type)) { + const values = type.getValues(); + return includeDeprecated ? values : values.filter(field => field.deprecationReason == null); + } + } + }, + inputFields: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type, { + includeDeprecated + }) { + if ((0, _definition.isInputObjectType)(type)) { + const values = Object.values(type.getFields()); + return includeDeprecated ? values : values.filter(field => field.deprecationReason == null); + } + } + }, + ofType: { + type: __Type, + resolve: type => 'ofType' in type ? type.ofType : undefined + }, + isOneOf: { + type: _scalars.GraphQLBoolean, + resolve: type => { + if ((0, _definition.isInputObjectType)(type)) { + return type.isOneOf; } } } - }, []); - var shouldCancel = React.useCallback(function (name, delta, target, should) { - var event = { - name: name, - delta: delta, - target: target, - should: should - }; - shouldPreventQueue.current.push(event); - setTimeout(function () { - shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { - return e !== event; - }); - }, 1); - }, []); - var scrollTouchStart = React.useCallback(function (event) { - touchStartRef.current = getTouchXY(event); - activeAxis.current = undefined; - }, []); - var scrollWheel = React.useCallback(function (event) { - shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); - }, []); - var scrollTouchMove = React.useCallback(function (event) { - shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); - }, []); - React.useEffect(function () { - lockStack.push(Style); - props.setCallbacks({ - onScrollCapture: scrollWheel, - onWheelCapture: scrollWheel, - onTouchMoveCapture: scrollTouchMove - }); - document.addEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive); - document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive); - document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive); - return function () { - lockStack = lockStack.filter(function (inst) { - return inst !== Style; - }); - document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive); - document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive); - document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive); - }; - }, []); - var removeScrollBar = props.removeScrollBar, - inert = props.inert; - return /*#__PURE__*/React.createElement(React.Fragment, null, inert ? /*#__PURE__*/React.createElement(Style, { - styles: generateStyle(id) - }) : null, removeScrollBar ? /*#__PURE__*/React.createElement(_reactRemoveScrollBar.RemoveScrollBar, { - gapMode: "margin" - }) : null); -} - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js": -/*!*******************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/UI.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.RemoveScroll = void 0; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _constants = __webpack_require__(/*! react-remove-scroll-bar/constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); -var _useCallbackRef = __webpack_require__(/*! use-callback-ref */ "../../../node_modules/use-callback-ref/dist/es2015/index.js"); -var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var nothing = function () { - return; -}; -/** - * Removes scrollbar from the page and contain the scroll within the Lock - */ -var RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) { - var ref = React.useRef(null); - var _a = React.useState({ - onScrollCapture: nothing, - onWheelCapture: nothing, - onTouchMoveCapture: nothing - }), - callbacks = _a[0], - setCallbacks = _a[1]; - var forwardProps = props.forwardProps, - children = props.children, - className = props.className, - removeScrollBar = props.removeScrollBar, - enabled = props.enabled, - shards = props.shards, - sideCar = props.sideCar, - noIsolation = props.noIsolation, - inert = props.inert, - allowPinchZoom = props.allowPinchZoom, - _b = props.as, - Container = _b === void 0 ? 'div' : _b, - rest = (0, _tslib.__rest)(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]); - var SideCar = sideCar; - var containerRef = (0, _useCallbackRef.useMergeRefs)([ref, parentRef]); - var containerProps = (0, _tslib.__assign)((0, _tslib.__assign)({}, rest), callbacks); - return /*#__PURE__*/React.createElement(React.Fragment, null, enabled && /*#__PURE__*/React.createElement(SideCar, { - sideCar: _medium.effectCar, - removeScrollBar: removeScrollBar, - shards: shards, - noIsolation: noIsolation, - inert: inert, - setCallbacks: setCallbacks, - allowPinchZoom: !!allowPinchZoom, - lockRef: ref - }), forwardProps ? /*#__PURE__*/React.cloneElement(React.Children.only(children), (0, _tslib.__assign)((0, _tslib.__assign)({}, containerProps), { - ref: containerRef - })) : /*#__PURE__*/React.createElement(Container, (0, _tslib.__assign)({}, containerProps, { - className: className, - ref: containerRef - }), children)); + }) }); -exports.RemoveScroll = RemoveScroll; -RemoveScroll.defaultProps = { - enabled: true, - removeScrollBar: true, - inert: false -}; -RemoveScroll.classNames = { - fullWidth: _constants.fullWidthClassName, - zeroRight: _constants.zeroRightClassName -}; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js": -/*!*********************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***! - \*********************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.nonPassive = void 0; -var passiveSupported = false; -if (typeof window !== 'undefined') { - try { - var options = Object.defineProperty({}, 'passive', { - get: function () { - passiveSupported = true; - return true; +const __Field = exports.__Field = new _definition.GraphQLObjectType({ + name: '__Field', + description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: field => field.name + }, + description: { + type: _scalars.GraphQLString, + resolve: field => field.description + }, + args: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { + includeDeprecated + }) { + return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null); } - }); - // @ts-ignore - window.addEventListener('test', options, options); - // @ts-ignore - window.removeEventListener('test', options, options); - } catch (err) { - passiveSupported = false; - } -} -var nonPassive = passiveSupported ? { - passive: false -} : false; -exports.nonPassive = nonPassive; - -/***/ }), - -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js": -/*!*****************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***! - \*****************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.locationCouldBeScrolled = exports.handleScroll = void 0; -var alwaysContainsScroll = function (node) { - // textarea will always _contain_ scroll inside self. It only can be hidden - return node.tagName === 'TEXTAREA'; -}; -var elementCanBeScrolled = function (node, overflow) { - var styles = window.getComputedStyle(node); - return ( - // not-not-scrollable - styles[overflow] !== 'hidden' && - // contains scroll inside self - !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible') - ); -}; -var elementCouldBeVScrolled = function (node) { - return elementCanBeScrolled(node, 'overflowY'); -}; -var elementCouldBeHScrolled = function (node) { - return elementCanBeScrolled(node, 'overflowX'); -}; -var locationCouldBeScrolled = function (axis, node) { - var current = node; - do { - // Skip over shadow root - if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { - current = current.host; + }, + type: { + type: new _definition.GraphQLNonNull(__Type), + resolve: field => field.type + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: field => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: field => field.deprecationReason } - var isScrollable = elementCouldBeScrolled(axis, current); - if (isScrollable) { - var _a = getScrollVariables(axis, current), - s = _a[1], - d = _a[2]; - if (s > d) { - return true; + }) +}); +const __InputValue = exports.__InputValue = new _definition.GraphQLObjectType({ + name: '__InputValue', + description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: inputValue => inputValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: inputValue => inputValue.description + }, + type: { + type: new _definition.GraphQLNonNull(__Type), + resolve: inputValue => inputValue.type + }, + defaultValue: { + type: _scalars.GraphQLString, + description: 'A GraphQL-formatted string representing the default value for this input value.', + resolve(inputValue) { + const { + type, + defaultValue + } = inputValue; + const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type); + return valueAST ? (0, _printer.print)(valueAST) : null; } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: field => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: obj => obj.deprecationReason } - current = current.parentNode; - } while (current && current !== document.body); - return false; -}; -exports.locationCouldBeScrolled = locationCouldBeScrolled; -var getVScrollVariables = function (_a) { - var scrollTop = _a.scrollTop, - scrollHeight = _a.scrollHeight, - clientHeight = _a.clientHeight; - return [scrollTop, scrollHeight, clientHeight]; -}; -var getHScrollVariables = function (_a) { - var scrollLeft = _a.scrollLeft, - scrollWidth = _a.scrollWidth, - clientWidth = _a.clientWidth; - return [scrollLeft, scrollWidth, clientWidth]; -}; -var elementCouldBeScrolled = function (axis, node) { - return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node); -}; -var getScrollVariables = function (axis, node) { - return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node); -}; -var getDirectionFactor = function (axis, direction) { - /** - * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position, - * and then increasingly negative as you scroll towards the end of the content. - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft - */ - return axis === 'h' && direction === 'rtl' ? -1 : 1; -}; -var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) { - var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction); - var delta = directionFactor * sourceDelta; - // find scrollable target - var target = event.target; - var targetInLock = endTarget.contains(target); - var shouldCancelScroll = false; - var isDeltaPositive = delta > 0; - var availableScroll = 0; - var availableScrollTop = 0; - do { - var _a = getScrollVariables(axis, target), - position = _a[0], - scroll_1 = _a[1], - capacity = _a[2]; - var elementScroll = scroll_1 - capacity - directionFactor * position; - if (position || elementScroll) { - if (elementCouldBeScrolled(axis, target)) { - availableScroll += elementScroll; - availableScrollTop += position; - } + }) +}); +const __EnumValue = exports.__EnumValue = new _definition.GraphQLObjectType({ + name: '__EnumValue', + description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: enumValue => enumValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: enumValue => enumValue.description + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: enumValue => enumValue.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: enumValue => enumValue.deprecationReason + } + }) +}); +var TypeKind; +(function (TypeKind) { + TypeKind['SCALAR'] = 'SCALAR'; + TypeKind['OBJECT'] = 'OBJECT'; + TypeKind['INTERFACE'] = 'INTERFACE'; + TypeKind['UNION'] = 'UNION'; + TypeKind['ENUM'] = 'ENUM'; + TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT'; + TypeKind['LIST'] = 'LIST'; + TypeKind['NON_NULL'] = 'NON_NULL'; +})(TypeKind || (exports.TypeKind = TypeKind = {})); +const __TypeKind = exports.__TypeKind = new _definition.GraphQLEnumType({ + name: '__TypeKind', + description: 'An enum describing what kind of type a given `__Type` is.', + values: { + SCALAR: { + value: TypeKind.SCALAR, + description: 'Indicates this type is a scalar.' + }, + OBJECT: { + value: TypeKind.OBJECT, + description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.' + }, + INTERFACE: { + value: TypeKind.INTERFACE, + description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.' + }, + UNION: { + value: TypeKind.UNION, + description: 'Indicates this type is a union. `possibleTypes` is a valid field.' + }, + ENUM: { + value: TypeKind.ENUM, + description: 'Indicates this type is an enum. `enumValues` is a valid field.' + }, + INPUT_OBJECT: { + value: TypeKind.INPUT_OBJECT, + description: 'Indicates this type is an input object. `inputFields` is a valid field.' + }, + LIST: { + value: TypeKind.LIST, + description: 'Indicates this type is a list. `ofType` is a valid field.' + }, + NON_NULL: { + value: TypeKind.NON_NULL, + description: 'Indicates this type is a non-null. `ofType` is a valid field.' } - target = target.parentNode; - } while ( - // portaled content - !targetInLock && target !== document.body || - // self content - targetInLock && (endTarget.contains(target) || endTarget === target)); - if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) { - shouldCancelScroll = true; - } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) { - shouldCancelScroll = true; } - return shouldCancelScroll; +}); +/** + * Note that these are GraphQLField and not GraphQLFieldConfig, + * so the format for args is different. + */ + +const SchemaMetaFieldDef = exports.SchemaMetaFieldDef = { + name: '__schema', + type: new _definition.GraphQLNonNull(__Schema), + description: 'Access the current type schema of this server.', + args: [], + resolve: (_source, _args, _context, { + schema + }) => schema, + deprecationReason: undefined, + extensions: Object.create(null), + astNode: undefined }; -exports.handleScroll = handleScroll; +const TypeMetaFieldDef = exports.TypeMetaFieldDef = { + name: '__type', + type: __Type, + description: 'Request the type information of a single type.', + args: [{ + name: 'name', + description: undefined, + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + defaultValue: undefined, + deprecationReason: undefined, + extensions: Object.create(null), + astNode: undefined + }], + resolve: (_source, { + name + }, _context, { + schema + }) => schema.getType(name), + deprecationReason: undefined, + extensions: Object.create(null), + astNode: undefined +}; +const TypeNameMetaFieldDef = exports.TypeNameMetaFieldDef = { + name: '__typename', + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: 'The name of the current Object type at runtime.', + args: [], + resolve: (_source, _args, _context, { + parentType + }) => parentType.name, + deprecationReason: undefined, + extensions: Object.create(null), + astNode: undefined +}; +const introspectionTypes = exports.introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]); +function isIntrospectionType(type) { + return introspectionTypes.some(({ + name + }) => type.name === name); +} /***/ }), -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/index.js": -/*!**********************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/index.js ***! - \**********************************************************************/ +/***/ "../../../node_modules/graphql/type/scalars.mjs": +/*!******************************************************!*\ + !*** ../../../node_modules/graphql/type/scalars.mjs ***! + \******************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -Object.defineProperty(exports, "RemoveScroll", ({ - enumerable: true, - get: function () { - return _Combination.default; - } -})); -var _Combination = _interopRequireDefault(__webpack_require__(/*! ./Combination */ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), +exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0; +exports.isSpecifiedScalarType = isSpecifiedScalarType; +exports.specifiedScalarTypes = void 0; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Maximum possible Int value as per GraphQL Spec (32-bit signed integer). + * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1 + * */ -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js": -/*!***********************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/medium.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +const GRAPHQL_MAX_INT = exports.GRAPHQL_MAX_INT = 2147483647; +/** + * Minimum possible Int value as per GraphQL Spec (32-bit signed integer). + * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1) + * */ +const GRAPHQL_MIN_INT = exports.GRAPHQL_MIN_INT = -2147483648; +const GraphQLInt = exports.GraphQLInt = new _definition.GraphQLScalarType({ + name: 'Int', + description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === 'boolean') { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === 'string' && coercedValue !== '') { + num = Number(coercedValue); + } + if (typeof num !== 'number' || !Number.isInteger(num)) { + throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(coercedValue)}`); + } + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new _GraphQLError.GraphQLError('Int cannot represent non 32-bit signed integer value: ' + (0, _inspect.inspect)(coercedValue)); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) { + throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(inputValue)}`); + } + if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) { + throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inputValue}`); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _printer.print)(valueNode)}`, { + nodes: valueNode + }); + } + const num = parseInt(valueNode.value, 10); + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, { + nodes: valueNode + }); + } + return num; + } +}); +const GraphQLFloat = exports.GraphQLFloat = new _definition.GraphQLScalarType({ + name: 'Float', + description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === 'boolean') { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === 'string' && coercedValue !== '') { + num = Number(coercedValue); + } + if (typeof num !== 'number' || !Number.isFinite(num)) { + throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(coercedValue)}`); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) { + throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(inputValue)}`); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _printer.print)(valueNode)}`, valueNode); + } + return parseFloat(valueNode.value); + } +}); +const GraphQLString = exports.GraphQLString = new _definition.GraphQLScalarType({ + name: 'String', + description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not + // attempt to coerce object, function, symbol, or other types as strings. + if (typeof coercedValue === 'string') { + return coercedValue; + } + if (typeof coercedValue === 'boolean') { + return coercedValue ? 'true' : 'false'; + } + if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) { + return coercedValue.toString(); + } + throw new _GraphQLError.GraphQLError(`String cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); + }, + parseValue(inputValue) { + if (typeof inputValue !== 'string') { + throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _inspect.inspect)(inputValue)}`); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING) { + throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _printer.print)(valueNode)}`, { + nodes: valueNode + }); + } + return valueNode.value; + } +}); +const GraphQLBoolean = exports.GraphQLBoolean = new _definition.GraphQLScalarType({ + name: 'Boolean', + description: 'The `Boolean` scalar type represents `true` or `false`.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === 'boolean') { + return coercedValue; + } + if (Number.isFinite(coercedValue)) { + return coercedValue !== 0; + } + throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(coercedValue)}`); + }, + parseValue(inputValue) { + if (typeof inputValue !== 'boolean') { + throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(inputValue)}`); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.BOOLEAN) { + throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _printer.print)(valueNode)}`, { + nodes: valueNode + }); + } + return valueNode.value; + } +}); +const GraphQLID = exports.GraphQLID = new _definition.GraphQLScalarType({ + name: 'ID', + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === 'string') { + return coercedValue; + } + if (Number.isInteger(coercedValue)) { + return String(coercedValue); + } + throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}`); + }, + parseValue(inputValue) { + if (typeof inputValue === 'string') { + return inputValue; + } + if (typeof inputValue === 'number' && Number.isInteger(inputValue)) { + return inputValue.toString(); + } + throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}`); + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError('ID cannot represent a non-string and non-integer value: ' + (0, _printer.print)(valueNode), { + nodes: valueNode + }); + } + return valueNode.value; + } +}); +const specifiedScalarTypes = exports.specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]); +function isSpecifiedScalarType(type) { + return specifiedScalarTypes.some(({ + name + }) => type.name === name); +} // Support serializing objects with custom valueOf() or toJSON() functions - +// a common way to represent a complex value which can be represented as +// a string (ex: MongoDB id objects). -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.effectCar = void 0; -var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js"); -var effectCar = (0, _useSidecar.createSidecarMedium)(); -exports.effectCar = effectCar; +function serializeObject(outputValue) { + if ((0, _isObjectLike.isObjectLike)(outputValue)) { + if (typeof outputValue.valueOf === 'function') { + const valueOfResult = outputValue.valueOf(); + if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) { + return valueOfResult; + } + } + if (typeof outputValue.toJSON === 'function') { + return outputValue.toJSON(); + } + } + return outputValue; +} /***/ }), -/***/ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js": -/*!************************************************************************!*\ - !*** ../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js ***! - \************************************************************************/ +/***/ "../../../node_modules/graphql/type/schema.mjs": +/*!*****************************************************!*\ + !*** ../../../node_modules/graphql/type/schema.mjs ***! + \*****************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = void 0; -var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js"); -var _SideEffect = __webpack_require__(/*! ./SideEffect */ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js"); -var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js"); -var _default = (0, _useSidecar.exportSidecar)(_medium.effectCar, _SideEffect.RemoveScrollSideCar); -exports["default"] = _default; - -/***/ }), - -/***/ "../../../node_modules/react-style-singleton/dist/es2015/component.js": -/*!****************************************************************************!*\ - !*** ../../../node_modules/react-style-singleton/dist/es2015/component.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.styleSingleton = void 0; -var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js"); +exports.GraphQLSchema = void 0; +exports.assertSchema = assertSchema; +exports.isSchema = isSchema; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs"); +var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); /** - * create a Component to add styles on demand - * - styles are added when first instance is mounted - * - styles are removed when the last instance is unmounted - * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior + * Test if the given value is a GraphQL schema. */ -var styleSingleton = function () { - var useStyle = (0, _hook.styleHookSingleton)(); - var Sheet = function (_a) { - var styles = _a.styles, - dynamic = _a.dynamic; - useStyle(styles, dynamic); - return null; - }; - return Sheet; -}; -exports.styleSingleton = styleSingleton; - -/***/ }), - -/***/ "../../../node_modules/react-style-singleton/dist/es2015/hook.js": -/*!***********************************************************************!*\ - !*** ../../../node_modules/react-style-singleton/dist/es2015/hook.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - +function isSchema(schema) { + return (0, _instanceOf.instanceOf)(schema, GraphQLSchema); +} +function assertSchema(schema) { + if (!isSchema(schema)) { + throw new Error(`Expected ${(0, _inspect.inspect)(schema)} to be a GraphQL schema.`); + } + return schema; +} +/** + * Custom extensions + * + * @remarks + * Use a unique identifier name for your extension, for example the name of + * your library or project. Do not use a shortened identifier as this increases + * the risk of conflicts. We recommend you add at most one extension field, + * an object which can contain all the values you need. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.styleHookSingleton = void 0; -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /** - * creates a hook to control style singleton - * @see {@link styleSingleton} for a safer component version - * @example - * ```tsx - * const useStyle = styleHookSingleton(); - * /// - * useStyle('body { overflow: hidden}'); + * Schema Definition + * + * A Schema is created by supplying the root types of each type of operation, + * query and mutation (optional). A schema definition is then supplied to the + * validator and executor. + * + * Example: + * + * ```ts + * const MyAppSchema = new GraphQLSchema({ + * query: MyAppQueryRootType, + * mutation: MyAppMutationRootType, + * }) + * ``` + * + * Note: When the schema is constructed, by default only the types that are + * reachable by traversing the root types are included, other types must be + * explicitly referenced. + * + * Example: + * + * ```ts + * const characterInterface = new GraphQLInterfaceType({ + * name: 'Character', + * ... + * }); + * + * const humanType = new GraphQLObjectType({ + * name: 'Human', + * interfaces: [characterInterface], + * ... + * }); + * + * const droidType = new GraphQLObjectType({ + * name: 'Droid', + * interfaces: [characterInterface], + * ... + * }); + * + * const schema = new GraphQLSchema({ + * query: new GraphQLObjectType({ + * name: 'Query', + * fields: { + * hero: { type: characterInterface, ... }, + * } + * }), + * ... + * // Since this schema references only the `Character` interface it's + * // necessary to explicitly list the types that implement it if + * // you want them to be included in the final schema. + * types: [humanType, droidType], + * }) + * ``` + * + * Note: If an array of `directives` are provided to GraphQLSchema, that will be + * the exact list of directives represented and allowed. If `directives` is not + * provided then a default set of the specified directives (e.g. `@include` and + * `@skip`) will be used. If you wish to provide *additional* directives to these + * specified directives, you must explicitly declare them. Example: + * + * ```ts + * const MyAppSchema = new GraphQLSchema({ + * ... + * directives: specifiedDirectives.concat([ myCustomDirective ]), + * }) + * ``` */ -var styleHookSingleton = function () { - var sheet = (0, _singleton.stylesheetSingleton)(); - return function (styles, isDynamic) { - React.useEffect(function () { - sheet.add(styles); - return function () { - sheet.remove(); - }; - }, [styles && isDynamic]); - }; -}; -exports.styleHookSingleton = styleHookSingleton; +class GraphQLSchema { + // Used as a cache for validateSchema(). + constructor(config) { + var _config$extensionASTN, _config$directives; -/***/ }), + // If this schema was built from a source known to be valid, then it may be + // marked with assumeValid to avoid an additional type system validation. + this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors. -/***/ "../../../node_modules/react-style-singleton/dist/es2015/index.js": -/*!************************************************************************!*\ - !*** ../../../node_modules/react-style-singleton/dist/es2015/index.js ***! - \************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + (0, _isObjectLike.isObjectLike)(config) || (0, _devAssert.devAssert)(false, 'Must provide configuration object.'); + !config.types || Array.isArray(config.types) || (0, _devAssert.devAssert)(false, `"types" must be Array if provided but got: ${(0, _inspect.inspect)(config.types)}.`); + !config.directives || Array.isArray(config.directives) || (0, _devAssert.devAssert)(false, '"directives" must be Array if provided but got: ' + `${(0, _inspect.inspect)(config.directives)}.`); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + this._queryType = config.query; + this._mutationType = config.mutation; + this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default. + + this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to + // the set of "collected" types, so `collectReferencedTypes` ignore them. + const allReferencedTypes = new Set(config.types); + if (config.types != null) { + for (const type of config.types) { + // When we ready to process this type, we remove it from "collected" types + // and then add it together with all dependent types in the correct position. + allReferencedTypes.delete(type); + collectReferencedTypes(type, allReferencedTypes); + } + } + if (this._queryType != null) { + collectReferencedTypes(this._queryType, allReferencedTypes); + } + if (this._mutationType != null) { + collectReferencedTypes(this._mutationType, allReferencedTypes); + } + if (this._subscriptionType != null) { + collectReferencedTypes(this._subscriptionType, allReferencedTypes); + } + for (const directive of this._directives) { + // Directives are not validated until validateSchema() is called. + if ((0, _directives.isDirective)(directive)) { + for (const arg of directive.args) { + collectReferencedTypes(arg.type, allReferencedTypes); + } + } + } + collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema. + this._typeMap = Object.create(null); + this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "styleHookSingleton", ({ - enumerable: true, - get: function () { - return _hook.styleHookSingleton; + this._implementationsMap = Object.create(null); + for (const namedType of allReferencedTypes) { + if (namedType == null) { + continue; + } + const typeName = namedType.name; + typeName || (0, _devAssert.devAssert)(false, 'One of the provided types for building the Schema is missing a name.'); + if (this._typeMap[typeName] !== undefined) { + throw new Error(`Schema must contain uniquely named types but contains multiple types named "${typeName}".`); + } + this._typeMap[typeName] = namedType; + if ((0, _definition.isInterfaceType)(namedType)) { + // Store implementations by interface. + for (const iface of namedType.getInterfaces()) { + if ((0, _definition.isInterfaceType)(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === undefined) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.interfaces.push(namedType); + } + } + } else if ((0, _definition.isObjectType)(namedType)) { + // Store implementations by objects. + for (const iface of namedType.getInterfaces()) { + if ((0, _definition.isInterfaceType)(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === undefined) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.objects.push(namedType); + } + } + } + } } -})); -Object.defineProperty(exports, "styleSingleton", ({ - enumerable: true, - get: function () { - return _component.styleSingleton; + get [Symbol.toStringTag]() { + return 'GraphQLSchema'; } -})); -Object.defineProperty(exports, "stylesheetSingleton", ({ - enumerable: true, - get: function () { - return _singleton.stylesheetSingleton; + getQueryType() { + return this._queryType; } -})); -var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-style-singleton/dist/es2015/component.js"); -var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js"); -var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js"); - -/***/ }), - -/***/ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js": -/*!****************************************************************************!*\ - !*** ../../../node_modules/react-style-singleton/dist/es2015/singleton.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.stylesheetSingleton = void 0; -var _getNonce = __webpack_require__(/*! get-nonce */ "../../../node_modules/get-nonce/dist/es2015/index.js"); -function makeStyleTag() { - if (!document) return null; - var tag = document.createElement('style'); - tag.type = 'text/css'; - var nonce = (0, _getNonce.getNonce)(); - if (nonce) { - tag.setAttribute('nonce', nonce); + getMutationType() { + return this._mutationType; } - return tag; -} -function injectStyles(tag, css) { - // @ts-ignore - if (tag.styleSheet) { - // @ts-ignore - tag.styleSheet.cssText = css; - } else { - tag.appendChild(document.createTextNode(css)); + getSubscriptionType() { + return this._subscriptionType; + } + getRootType(operation) { + switch (operation) { + case _ast.OperationTypeNode.QUERY: + return this.getQueryType(); + case _ast.OperationTypeNode.MUTATION: + return this.getMutationType(); + case _ast.OperationTypeNode.SUBSCRIPTION: + return this.getSubscriptionType(); + } + } + getTypeMap() { + return this._typeMap; + } + getType(name) { + return this.getTypeMap()[name]; + } + getPossibleTypes(abstractType) { + return (0, _definition.isUnionType)(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; + } + getImplementations(interfaceType) { + const implementations = this._implementationsMap[interfaceType.name]; + return implementations !== null && implementations !== void 0 ? implementations : { + objects: [], + interfaces: [] + }; + } + isSubType(abstractType, maybeSubType) { + let map = this._subTypeMap[abstractType.name]; + if (map === undefined) { + map = Object.create(null); + if ((0, _definition.isUnionType)(abstractType)) { + for (const type of abstractType.getTypes()) { + map[type.name] = true; + } + } else { + const implementations = this.getImplementations(abstractType); + for (const type of implementations.objects) { + map[type.name] = true; + } + for (const type of implementations.interfaces) { + map[type.name] = true; + } + } + this._subTypeMap[abstractType.name] = map; + } + return map[maybeSubType.name] !== undefined; + } + getDirectives() { + return this._directives; + } + getDirective(name) { + return this.getDirectives().find(directive => directive.name === name); + } + toConfig() { + return { + description: this.description, + query: this.getQueryType(), + mutation: this.getMutationType(), + subscription: this.getSubscriptionType(), + types: Object.values(this.getTypeMap()), + directives: this.getDirectives(), + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes, + assumeValid: this.__validationErrors !== undefined + }; } } -function insertStyleTag(tag) { - var head = document.head || document.getElementsByTagName('head')[0]; - head.appendChild(tag); -} -var stylesheetSingleton = function () { - var counter = 0; - var stylesheet = null; - return { - add: function (style) { - if (counter == 0) { - if (stylesheet = makeStyleTag()) { - injectStyles(stylesheet, style); - insertStyleTag(stylesheet); +exports.GraphQLSchema = GraphQLSchema; +function collectReferencedTypes(type, typeSet) { + const namedType = (0, _definition.getNamedType)(type); + if (!typeSet.has(namedType)) { + typeSet.add(namedType); + if ((0, _definition.isUnionType)(namedType)) { + for (const memberType of namedType.getTypes()) { + collectReferencedTypes(memberType, typeSet); + } + } else if ((0, _definition.isObjectType)(namedType) || (0, _definition.isInterfaceType)(namedType)) { + for (const interfaceType of namedType.getInterfaces()) { + collectReferencedTypes(interfaceType, typeSet); + } + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); + for (const arg of field.args) { + collectReferencedTypes(arg.type, typeSet); } } - counter++; - }, - remove: function () { - counter--; - if (!counter && stylesheet) { - stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet); - stylesheet = null; + } else if ((0, _definition.isInputObjectType)(namedType)) { + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); } } - }; -}; -exports.stylesheetSingleton = stylesheetSingleton; + } + return typeSet; +} /***/ }), -/***/ "../../../node_modules/react/cjs/react-jsx-runtime.development.js": -/*!************************************************************************!*\ - !*** ../../../node_modules/react/cjs/react-jsx-runtime.development.js ***! - \************************************************************************/ +/***/ "../../../node_modules/graphql/type/validate.mjs": +/*!*******************************************************!*\ + !*** ../../../node_modules/graphql/type/validate.mjs ***! + \*******************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.assertValidSchema = assertValidSchema; +exports.validateSchema = validateSchema; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _typeComparators = __webpack_require__(/*! ../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); +var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); /** - * @license React - * react-jsx-runtime.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. + * Implements the "Type Validation" sub-sections of the specification's + * "Type System" section. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the Schema is valid. */ +function validateSchema(schema) { + // First check to ensure the provided value is in fact a GraphQLSchema. + (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results. + if (schema.__validationErrors) { + return schema.__validationErrors; + } // Validate the schema, producing a list of errors. -if (true) { - (function () { - 'use strict'; + const context = new SchemaValidationContext(schema); + validateRootTypes(context); + validateDirectives(context); + validateTypes(context); // Persist the results of validation before returning to ensure validation + // does not run multiple times for this schema. - var React = __webpack_require__(/*! react */ "react"); + const errors = context.getErrors(); + schema.__validationErrors = errors; + return errors; +} +/** + * Utility function which asserts a schema is valid by throwing an error if + * it is invalid. + */ - // ATTENTION - // When adding new symbols to this file, - // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' - // The Symbol used to tag the ReactElement-like types. - var REACT_ELEMENT_TYPE = Symbol.for('react.element'); - var REACT_PORTAL_TYPE = Symbol.for('react.portal'); - var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); - var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); - var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); - var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); - var REACT_CONTEXT_TYPE = Symbol.for('react.context'); - var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); - var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); - var REACT_MEMO_TYPE = Symbol.for('react.memo'); - var REACT_LAZY_TYPE = Symbol.for('react.lazy'); - var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - return null; - } - var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function error(format) { - { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - printWarning('error', format, args); - } - } - } - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } // eslint-disable-next-line react-internal/safe-string-coercion +function assertValidSchema(schema) { + const errors = validateSchema(schema); + if (errors.length !== 0) { + throw new Error(errors.map(error => error.message).join('\n\n')); + } +} +class SchemaValidationContext { + constructor(schema) { + this._errors = []; + this.schema = schema; + } + reportError(message, nodes) { + const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; + this._errors.push(new _GraphQLError.GraphQLError(message, { + nodes: _nodes + })); + } + getErrors() { + return this._errors; + } +} +function validateRootTypes(context) { + const schema = context.schema; + const queryType = schema.getQueryType(); + if (!queryType) { + context.reportError('Query root type must be provided.', schema.astNode); + } else if (!(0, _definition.isObjectType)(queryType)) { + var _getOperationTypeNode; + context.reportError(`Query root type must be Object type, it cannot be ${(0, _inspect.inspect)(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, _ast.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode); + } + const mutationType = schema.getMutationType(); + if (mutationType && !(0, _definition.isObjectType)(mutationType)) { + var _getOperationTypeNode2; + context.reportError('Mutation root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, _ast.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode); + } + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) { + var _getOperationTypeNode3; + context.reportError('Subscription root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, _ast.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode); + } +} +function getOperationTypeNode(schema, operation) { + var _flatMap$find; + return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + schemaNode => { + var _schemaNode$operation; + return /* c8 ignore next */( + (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : [] + ); + }).find(operationNode => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type; +} +function validateDirectives(context) { + for (const directive of context.schema.getDirectives()) { + // Ensure all directives are in fact GraphQL directives. + if (!(0, _directives.isDirective)(directive)) { + context.reportError(`Expected directive but got: ${(0, _inspect.inspect)(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode); + continue; + } // Ensure they are named correctly. - var argsWithFormat = args.map(function (item) { - return String(item); - }); // Careful: RN currently depends on this prefix + validateName(context, directive); // TODO: Ensure proper locations. + // Ensure the arguments are valid. - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging + for (const arg of directive.args) { + // Ensure they are named correctly. + validateName(context, arg); // Ensure the type is an input type. - Function.prototype.apply.call(console[level], console, argsWithFormat); + if (!(0, _definition.isInputType)(arg.type)) { + context.reportError(`The type of @${directive.name}(${arg.name}:) must be Input Type ` + `but got: ${(0, _inspect.inspect)(arg.type)}.`, arg.astNode); + } + if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { + var _arg$astNode; + context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]); } } + } +} +function validateName(context, node) { + // Ensure names are valid, however introspection types opt out. + if (node.name.startsWith('__')) { + context.reportError(`Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, node.astNode); + } +} +function validateTypes(context) { + const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); + const typeMap = context.schema.getTypeMap(); + for (const type of Object.values(typeMap)) { + // Ensure all provided types are in fact GraphQL type. + if (!(0, _definition.isNamedType)(type)) { + context.reportError(`Expected GraphQL named type but got: ${(0, _inspect.inspect)(type)}.`, type.astNode); + continue; + } // Ensure it is named correctly (excluding introspection types). - // ----------------------------------------------------------------------------- - - var enableScopeAPI = false; // Experimental Create Event Handle API. - var enableCacheElement = false; - var enableTransitionTracing = false; // No known bugs, but needs performance testing + if (!(0, _introspection.isIntrospectionType)(type)) { + validateName(context, type); + } + if ((0, _definition.isObjectType)(type)) { + // Ensure fields are valid + validateFields(context, type); // Ensure objects implement the interfaces they claim to. - var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber - // stuff. Intended to enable React core members to more easily debug scheduling - // issues in DEV builds. + validateInterfaces(context, type); + } else if ((0, _definition.isInterfaceType)(type)) { + // Ensure fields are valid. + validateFields(context, type); // Ensure interfaces implement the interfaces they claim to. - var enableDebugTracing = false; // Track which Fiber(s) schedule render work. + validateInterfaces(context, type); + } else if ((0, _definition.isUnionType)(type)) { + // Ensure Unions include valid member types. + validateUnionMembers(context, type); + } else if ((0, _definition.isEnumType)(type)) { + // Ensure Enums have valid values. + validateEnumValues(context, type); + } else if ((0, _definition.isInputObjectType)(type)) { + // Ensure Input Object fields are valid. + validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references - var REACT_MODULE_REFERENCE; - { - REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); + validateInputObjectCircularRefs(type); } - function isValidElementType(type) { - if (typeof type === 'string' || typeof type === 'function') { - return true; - } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). + } +} +function validateFields(context, type) { + const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields. - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { - return true; - } - if (typeof type === 'object' && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || - // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { - return true; - } - } - return false; - } - function getWrappedName(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - if (displayName) { - return displayName; - } - var functionName = innerType.displayName || innerType.name || ''; - return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; - } // Keep in sync with react-reconciler/getComponentNameFromFiber + if (fields.length === 0) { + context.reportError(`Type ${type.name} must define one or more fields.`, [type.astNode, ...type.extensionASTNodes]); + } + for (const field of fields) { + // Ensure they are named correctly. + validateName(context, field); // Ensure the type is an output type - function getContextName(type) { - return type.displayName || 'Context'; - } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. + if (!(0, _definition.isOutputType)(field.type)) { + var _field$astNode; + context.reportError(`The type of ${type.name}.${field.name} must be Output Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type); + } // Ensure the arguments are valid - function getComponentNameFromType(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - if (typeof type === 'string') { - return type; + for (const arg of field.args) { + const argName = arg.name; // Ensure they are named correctly. + + validateName(context, arg); // Ensure the type is an input type + + if (!(0, _definition.isInputType)(arg.type)) { + var _arg$astNode2; + context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input ` + `Type but got: ${(0, _inspect.inspect)(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type); } - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - case REACT_PORTAL_TYPE: - return 'Portal'; - case REACT_PROFILER_TYPE: - return 'Profiler'; - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; + if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { + var _arg$astNode3; + context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]); } - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - if (outerName !== null) { - return outerName; - } - return getComponentNameFromType(type.type) || 'Memo'; - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - return getComponentNameFromType(init(payload)); - } catch (x) { - return null; - } - } + } + } +} +function validateInterfaces(context, type) { + const ifaceTypeNames = Object.create(null); + for (const iface of type.getInterfaces()) { + if (!(0, _definition.isInterfaceType)(iface)) { + context.reportError(`Type ${(0, _inspect.inspect)(type)} must only implement Interface types, ` + `it cannot implement ${(0, _inspect.inspect)(iface)}.`, getAllImplementsInterfaceNodes(type, iface)); + continue; + } + if (type === iface) { + context.reportError(`Type ${type.name} cannot implement itself because it would create a circular reference.`, getAllImplementsInterfaceNodes(type, iface)); + continue; + } + if (ifaceTypeNames[iface.name]) { + context.reportError(`Type ${type.name} can only implement ${iface.name} once.`, getAllImplementsInterfaceNodes(type, iface)); + continue; + } + ifaceTypeNames[iface.name] = true; + validateTypeImplementsAncestors(context, type, iface); + validateTypeImplementsInterface(context, type, iface); + } +} +function validateTypeImplementsInterface(context, type, iface) { + const typeFieldMap = type.getFields(); // Assert each interface field is implemented. - // eslint-disable-next-line no-fallthrough - } - } + for (const ifaceField of Object.values(iface.getFields())) { + const fieldName = ifaceField.name; + const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type. - return null; - } - var assign = Object.assign; + if (!typeField) { + context.reportError(`Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`, [ifaceField.astNode, type.astNode, ...type.extensionASTNodes]); + continue; + } // Assert interface field type is satisfied by type field type, by being + // a valid subtype. (covariant) - // Helpers to patch console.logs to avoid logging during side-effect free - // replaying on render function. This currently only patches the object - // lazily which won't cover if the log function was extracted eagerly. - // We could also eagerly patch the method. - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() {} - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 + if (!(0, _typeComparators.isTypeSubTypeOf)(context.schema, typeField.type, ifaceField.type)) { + var _ifaceField$astNode, _typeField$astNode; + context.reportError(`Interface field ${iface.name}.${fieldName} expects type ` + `${(0, _inspect.inspect)(ifaceField.type)} but ${type.name}.${fieldName} ` + `is type ${(0, _inspect.inspect)(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]); + } // Assert each interface field arg is implemented. - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. + for (const ifaceArg of ifaceField.args) { + const argName = ifaceArg.name; + const typeArg = typeField.args.find(arg => arg.name === argName); // Assert interface field arg exists on object field. - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } + if (!typeArg) { + context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`, [ifaceArg.astNode, typeField.astNode]); + continue; + } // Assert interface field arg type matches object field arg type. + // (invariant) + // TODO: change to contravariant? - disabledDepth++; + if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) { + var _ifaceArg$astNode, _typeArg$astNode; + context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) ` + `expects type ${(0, _inspect.inspect)(ifaceArg.type)} but ` + `${type.name}.${fieldName}(${argName}:) is type ` + `${(0, _inspect.inspect)(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]); + } // TODO: validate default values? + } // Assert additional arguments must not be required. + + for (const typeArg of typeField.args) { + const argName = typeArg.name; + const ifaceArg = ifaceField.args.find(arg => arg.name === argName); + if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) { + context.reportError(`Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, [typeArg.astNode, ifaceField.astNode]); } } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. + } +} +function validateTypeImplementsAncestors(context, type, iface) { + const ifaceInterfaces = type.getInterfaces(); + for (const transitive of iface.getInterfaces()) { + if (!ifaceInterfaces.includes(transitive)) { + context.reportError(transitive === type ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, [...getAllImplementsInterfaceNodes(iface, transitive), ...getAllImplementsInterfaceNodes(type, iface)]); + } + } +} +function validateUnionMembers(context, union) { + const memberTypes = union.getTypes(); + if (memberTypes.length === 0) { + context.reportError(`Union type ${union.name} must define one or more member types.`, [union.astNode, ...union.extensionASTNodes]); + } + const includedTypeNames = Object.create(null); + for (const memberType of memberTypes) { + if (includedTypeNames[memberType.name]) { + context.reportError(`Union type ${union.name} can only include type ${memberType.name} once.`, getUnionMemberTypeNodes(union, memberType.name)); + continue; + } + includedTypeNames[memberType.name] = true; + if (!(0, _definition.isObjectType)(memberType)) { + context.reportError(`Union type ${union.name} can only include Object types, ` + `it cannot include ${(0, _inspect.inspect)(memberType)}.`, getUnionMemberTypeNodes(union, String(memberType))); + } + } +} +function validateEnumValues(context, enumType) { + const enumValues = enumType.getValues(); + if (enumValues.length === 0) { + context.reportError(`Enum type ${enumType.name} must define one or more values.`, [enumType.astNode, ...enumType.extensionASTNodes]); + } + for (const enumValue of enumValues) { + // Ensure valid name. + validateName(context, enumValue); + } +} +function validateInputFields(context, inputObj) { + const fields = Object.values(inputObj.getFields()); + if (fields.length === 0) { + context.reportError(`Input Object type ${inputObj.name} must define one or more fields.`, [inputObj.astNode, ...inputObj.extensionASTNodes]); + } // Ensure the arguments are valid - Object.defineProperties(console, { - log: assign({}, props, { - value: prevLog - }), - info: assign({}, props, { - value: prevInfo - }), - warn: assign({}, props, { - value: prevWarn - }), - error: assign({}, props, { - value: prevError - }), - group: assign({}, props, { - value: prevGroup - }), - groupCollapsed: assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } + for (const field of fields) { + // Ensure they are named correctly. + validateName(context, field); // Ensure the type is an input type - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } + if (!(0, _definition.isInputType)(field.type)) { + var _field$astNode2; + context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type); } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - return '\n' + prefix + name; - } + if ((0, _definition.isRequiredInputField)(field) && field.deprecationReason != null) { + var _field$astNode3; + context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]); } - var reentry = false; - var componentFrameCache; - { - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); + if (inputObj.isOneOf) { + validateOneOfInputObjectField(inputObj, field, context); } - function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - { - var frame = componentFrameCache.get(fn); - if (frame !== undefined) { - return frame; - } - } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. + } +} +function validateOneOfInputObjectField(type, field, context) { + if ((0, _definition.isNonNullType)(field.type)) { + var _field$astNode4; + context.reportError(`OneOf input field ${type.name}.${field.name} must be nullable.`, (_field$astNode4 = field.astNode) === null || _field$astNode4 === void 0 ? void 0 : _field$astNode4.type); + } + if (field.defaultValue !== undefined) { + context.reportError(`OneOf input field ${type.name}.${field.name} cannot have a default value.`, field.astNode); + } +} +function createInputObjectCircularRefsValidator(context) { + // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'. + // Tracks already visited types to maintain O(N) and to ensure that cycles + // are not redundantly reported. + const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors - ReactCurrentDispatcher.current = null; - disableLogs(); - } - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe + const fieldPath = []; // Position in the type path - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - fn.call(Fake.prototype); - } + const fieldPathIndexByTypeName = Object.create(null); + return detectCycleRecursive; // This does a straight-forward DFS to find cycles. + // It does not terminate when a cycle was found but continues to explore + // the graph to find all possible cycles. + + function detectCycleRecursive(inputObj) { + if (visitedTypes[inputObj.name]) { + return; + } + visitedTypes[inputObj.name] = true; + fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; + const fields = Object.values(inputObj.getFields()); + for (const field of fields) { + if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) { + const fieldType = field.type.ofType; + const cycleIndex = fieldPathIndexByTypeName[fieldType.name]; + fieldPath.push(field); + if (cycleIndex === undefined) { + detectCycleRecursive(fieldType); } else { - try { - throw Error(); - } catch (x) { - control = x; - } - fn(); + const cyclePath = fieldPath.slice(cycleIndex); + const pathStr = cyclePath.map(fieldObj => fieldObj.name).join('.'); + context.reportError(`Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, cyclePath.map(fieldObj => fieldObj.astNode)); } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. + fieldPath.pop(); + } + } + fieldPathIndexByTypeName[inputObj.name] = undefined; + } +} +function getAllImplementsInterfaceNodes(type, iface) { + const { + astNode, + extensionASTNodes + } = type; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "" - // but we have a user-provided "displayName" - // splice it in to make the stack more readable. + return nodes.flatMap(typeNode => { + var _typeNode$interfaces; + return /* c8 ignore next */( + (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : [] + ); + }).filter(ifaceNode => ifaceNode.name.value === iface.name); +} +function getUnionMemberTypeNodes(union, typeName) { + const { + astNode, + extensionASTNodes + } = union; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 - if (fn.displayName && _frame.includes('')) { - _frame = _frame.replace('', fn.displayName); - } - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. + return nodes.flatMap(unionNode => { + var _unionNode$types; + return /* c8 ignore next */( + (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : [] + ); + }).filter(typeNode => typeNode.name.value === typeName); +} +function getDeprecatedDirectiveNode(definitionNode) { + var _definitionNode$direc; + return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(node => node.name.value === _directives.GraphQLDeprecatedDirective.name); +} - return _frame; - } - } while (s >= 1 && c >= 0); - } - break; - } - } - } - } finally { - reentry = false; - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. +/***/ }), - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - return syntheticFrame; - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ''; - } - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); +/***/ "../../../node_modules/graphql/utilities/TypeInfo.mjs": +/*!************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/TypeInfo.mjs ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TypeInfo = void 0; +exports.visitWithTypeInfo = visitWithTypeInfo; +var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +/** + * TypeInfo is a utility class which, given a GraphQL schema, can keep track + * of the current field and type definitions at any point in a GraphQL document + * AST during a recursive descent by calling `enter(node)` and `leave(node)`. + */ + +class TypeInfo { + constructor(schema, + /** + * Initial type may be provided in rare cases to facilitate traversals + * beginning somewhere other than documents. + */ + initialType, /** @deprecated will be removed in 17.0.0 */ + getFieldDefFn) { + this._schema = schema; + this._typeStack = []; + this._parentTypeStack = []; + this._inputTypeStack = []; + this._fieldDefStack = []; + this._defaultValueStack = []; + this._directive = null; + this._argument = null; + this._enumValue = null; + this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; + if (initialType) { + if ((0, _definition.isInputType)(initialType)) { + this._inputTypeStack.push(initialType); } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame('Suspense'); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); + if ((0, _definition.isCompositeType)(initialType)) { + this._parentTypeStack.push(initialType); } - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } + if ((0, _definition.isOutputType)(initialType)) { + this._typeStack.push(initialType); } - return ''; } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); - } - } + } + get [Symbol.toStringTag]() { + return 'TypeInfo'; + } + getType() { + if (this._typeStack.length > 0) { + return this._typeStack[this._typeStack.length - 1]; } - function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - // $FlowFixMe This is okay but Flow doesn't know it. - var has = Function.call.bind(hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - // eslint-disable-next-line react-internal/prod-error-codes - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error('Failed %s type: %s', location, error$1.message); - setCurrentlyValidatingElement(null); - } - } - } - } + } + getParentType() { + if (this._parentTypeStack.length > 0) { + return this._parentTypeStack[this._parentTypeStack.length - 1]; } - var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare - - function isArray(a) { - return isArrayImpl(a); + } + getInputType() { + if (this._inputTypeStack.length > 0) { + return this._inputTypeStack[this._inputTypeStack.length - 1]; } - - /* - * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol - * and Temporal.* types. See https://github.com/facebook/react/pull/22064. - * - * The functions in this module will throw an easier-to-understand, - * easier-to-debug exception with a clear errors message message explaining the - * problem. (Instead of a confusing exception thrown inside the implementation - * of the `value` object). - */ - // $FlowFixMe only called in DEV, so void return is not possible. - function typeName(value) { - { - // toStringTag is needed for namespaced types like Temporal.Instant - var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; - return type; - } - } // $FlowFixMe only called in DEV, so void return is not possible. - - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } - } + } + getParentInputType() { + if (this._inputTypeStack.length > 1) { + return this._inputTypeStack[this._inputTypeStack.length - 2]; } - function testStringCoercion(value) { - // If you ended up here by following an exception call stack, here's what's - // happened: you supplied an object or symbol value to React (as a prop, key, - // DOM attribute, CSS property, string ref, etc.) and when React tried to - // coerce it to a string using `'' + value`, an exception was thrown. - // - // The most common types that will cause this exception are `Symbol` instances - // and Temporal objects like `Temporal.Instant`. But any object that has a - // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this - // exception. (Library authors do this to prevent users from using built-in - // numeric operators like `+` or comparison operators like `>=` because custom - // methods are needed to perform accurate arithmetic or comparison.) - // - // To fix the problem, coerce this object or symbol value to a string before - // passing it to React. The most reliable way is usually `String(value)`. - // - // To find which value is throwing, check the browser or debugger console. - // Before this exception was thrown, there should be `console.error` output - // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the - // problem and how that type was used: key, atrribute, input value prop, etc. - // In most cases, this console output also shows the component and its - // ancestor components where the exception happened. - // - // eslint-disable-next-line react-internal/safe-string-coercion - return '' + value; + } + getFieldDef() { + if (this._fieldDefStack.length > 0) { + return this._fieldDefStack[this._fieldDefStack.length - 1]; } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } + } + getDefaultValue() { + if (this._defaultValueStack.length > 0) { + return this._defaultValueStack[this._defaultValueStack.length - 1]; } + } + getDirective() { + return this._directive; + } + getArgument() { + return this._argument; + } + getEnumValue() { + return this._enumValue; + } + enter(node) { + const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop + // any assumptions of a valid schema to ensure runtime types are properly + // checked before continuing since TypeInfo is used as part of validation + // which occurs before guarantees of schema and document validity. - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown; - var specialPropRefWarningShown; - var didWarnAboutStringRefs; - { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config) { - { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - if (getter && getter.isReactWarning) { - return false; - } + switch (node.kind) { + case _kinds.Kind.SELECTION_SET: + { + const namedType = (0, _definition.getNamedType)(this.getType()); + this._parentTypeStack.push((0, _definition.isCompositeType)(namedType) ? namedType : undefined); + break; } - } - return config.ref !== undefined; - } - function hasValidKey(config) { - { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - if (getter && getter.isReactWarning) { - return false; + case _kinds.Kind.FIELD: + { + const parentType = this.getParentType(); + let fieldDef; + let fieldType; + if (parentType) { + fieldDef = this._getFieldDef(schema, parentType, node); + if (fieldDef) { + fieldType = fieldDef.type; + } } + this._fieldDefStack.push(fieldDef); + this._typeStack.push((0, _definition.isOutputType)(fieldType) ? fieldType : undefined); + break; } - } - return config.key !== undefined; - } - function warnIfStringRefCannotBeAutoConverted(config, self) { - { - if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); - didWarnAboutStringRefs[componentName] = true; - } + case _kinds.Kind.DIRECTIVE: + this._directive = schema.getDirective(node.name.value); + break; + case _kinds.Kind.OPERATION_DEFINITION: + { + const rootType = schema.getRootType(node.operation); + this._typeStack.push((0, _definition.isObjectType)(rootType) ? rootType : undefined); + break; } - } - } - function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); + case _kinds.Kind.INLINE_FRAGMENT: + case _kinds.Kind.FRAGMENT_DEFINITION: + { + const typeConditionAST = node.typeCondition; + const outputType = typeConditionAST ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST) : (0, _definition.getNamedType)(this.getType()); + this._typeStack.push((0, _definition.isOutputType)(outputType) ? outputType : undefined); + break; + } + case _kinds.Kind.VARIABLE_DEFINITION: + { + const inputType = (0, _typeFromAST.typeFromAST)(schema, node.type); + this._inputTypeStack.push((0, _definition.isInputType)(inputType) ? inputType : undefined); + break; + } + case _kinds.Kind.ARGUMENT: + { + var _this$getDirective; + let argDef; + let argType; + const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); + if (fieldOrDirective) { + argDef = fieldOrDirective.args.find(arg => arg.name === node.name.value); + if (argDef) { + argType = argDef.type; + } } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } + this._argument = argDef; + this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined); + this._inputTypeStack.push((0, _definition.isInputType)(argType) ? argType : undefined); + break; + } + case _kinds.Kind.LIST: + { + const listType = (0, _definition.getNullableType)(this.getInputType()); + const itemType = (0, _definition.isListType)(listType) ? listType.ofType : listType; // List positions never have a default value. + + this._defaultValueStack.push(undefined); + this._inputTypeStack.push((0, _definition.isInputType)(itemType) ? itemType : undefined); + break; + } + case _kinds.Kind.OBJECT_FIELD: + { + const objectType = (0, _definition.getNamedType)(this.getInputType()); + let inputFieldType; + let inputField; + if ((0, _definition.isInputObjectType)(objectType)) { + inputField = objectType.getFields()[node.name.value]; + if (inputField) { + inputFieldType = inputField.type; + } + } + this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined); + this._inputTypeStack.push((0, _definition.isInputType)(inputFieldType) ? inputFieldType : undefined); + break; + } + case _kinds.Kind.ENUM: + { + const enumType = (0, _definition.getNamedType)(this.getInputType()); + let enumValue; + if ((0, _definition.isEnumType)(enumType)) { + enumValue = enumType.getValue(node.value); + } + this._enumValue = enumValue; + break; + } + default: // Ignore other nodes } - function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); + } + leave(node) { + switch (node.kind) { + case _kinds.Kind.SELECTION_SET: + this._parentTypeStack.pop(); + break; + case _kinds.Kind.FIELD: + this._fieldDefStack.pop(); + this._typeStack.pop(); + break; + case _kinds.Kind.DIRECTIVE: + this._directive = null; + break; + case _kinds.Kind.OPERATION_DEFINITION: + case _kinds.Kind.INLINE_FRAGMENT: + case _kinds.Kind.FRAGMENT_DEFINITION: + this._typeStack.pop(); + break; + case _kinds.Kind.VARIABLE_DEFINITION: + this._inputTypeStack.pop(); + break; + case _kinds.Kind.ARGUMENT: + this._argument = null; + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case _kinds.Kind.LIST: + case _kinds.Kind.OBJECT_FIELD: + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case _kinds.Kind.ENUM: + this._enumValue = null; + break; + default: // Ignore other nodes + } + } +} + +/** + * Not exactly the same as the executor's definition of getFieldDef, in this + * statically evaluated environment we do not always have an Object type, + * and need to handle Interface and Union types. + */ +exports.TypeInfo = TypeInfo; +function getFieldDef(schema, parentType, fieldNode) { + const name = fieldNode.name.value; + if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.SchemaMetaFieldDef; + } + if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.TypeMetaFieldDef; + } + if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) { + return _introspection.TypeNameMetaFieldDef; + } + if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { + return parentType.getFields()[name]; + } +} +/** + * Creates a new visitor instance which maintains a provided TypeInfo instance + * along with visiting visitor. + */ + +function visitWithTypeInfo(typeInfo, visitor) { + return { + enter(...args) { + const node = args[0]; + typeInfo.enter(node); + const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).enter; + if (fn) { + const result = fn.apply(visitor, args); + if (result !== undefined) { + typeInfo.leave(node); + if ((0, _ast.isNode)(result)) { + typeInfo.enter(result); } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); + } + return result; + } + }, + leave(...args) { + const node = args[0]; + const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).leave; + let result; + if (fn) { + result = fn.apply(visitor, args); } + typeInfo.leave(node); + return result; } - /** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} props - * @param {*} key - * @param {string|object} ref - * @param {*} owner - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @internal - */ + }; +} - var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. +/***/ }), - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. +/***/ "../../../node_modules/graphql/utilities/assertValidName.mjs": +/*!*******************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/assertValidName.mjs ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. +"use strict"; - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - return element; - }; - /** - * https://github.com/reactjs/rfcs/pull/107 - * @param {*} type - * @param {object} props - * @param {string} key - */ - function jsxDEV(type, config, maybeKey, source, self) { - { - var propName; // Reserved names are extracted +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.assertValidName = assertValidName; +exports.isValidNameError = isValidNameError; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _assertName = __webpack_require__(/*! ../type/assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs"); +/* c8 ignore start */ - var props = {}; - var key = null; - var ref = null; // Currently, key can be spread in as a prop. This causes a potential - // issue if key is also explicitly declared (ie.
- // or
). We want to deprecate key spread, - // but as an intermediary step, we will use jsxDEV for everything except - //
, because we aren't currently able to tell if - // key is explicitly declared to be undefined or not. +/** + * Upholds the spec rules about naming. + * @deprecated Please use `assertName` instead. Will be removed in v17 + */ - if (maybeKey !== undefined) { - { - checkKeyStringCoercion(maybeKey); - } - key = '' + maybeKey; - } - if (hasValidKey(config)) { - { - checkKeyStringCoercion(config.key); - } - key = '' + config.key; - } - if (hasValidRef(config)) { - ref = config.ref; - warnIfStringRefCannotBeAutoConverted(config, self); - } // Remaining properties are added to a new props object +function assertValidName(name) { + const error = isValidNameError(name); + if (error) { + throw error; + } + return name; +} +/** + * Returns an Error if a name is invalid. + * @deprecated Please use `assertName` instead. Will be removed in v17 + */ - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } // Resolve default props +function isValidNameError(name) { + typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.'); + if (name.startsWith('__')) { + return new _GraphQLError.GraphQLError(`Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`); + } + try { + (0, _assertName.assertName)(name); + } catch (error) { + return error; + } +} +/* c8 ignore stop */ - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/astFromValue.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/astFromValue.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.astFromValue = astFromValue; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +/** + * Produces a GraphQL Value AST given a JavaScript object. + * Function will match JavaScript/JSON values to GraphQL AST schema format + * by using suggested GraphQLInputType. For example: + * + * astFromValue("value", GraphQLString) + * + * A GraphQL type must be provided, which will be used to interpret different + * JavaScript values. + * + * | JSON Value | GraphQL Value | + * | ------------- | -------------------- | + * | Object | Input Object | + * | Array | List | + * | Boolean | Boolean | + * | String | String / Enum Value | + * | Number | Int / Float | + * | Unknown | Enum Value | + * | null | NullValue | + * + */ + +function astFromValue(value, type) { + if ((0, _definition.isNonNullType)(type)) { + const astValue = astFromValue(value, type.ofType); + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) { + return null; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); + return astValue; + } // only explicit null, not undefined, NaN + + if (value === null) { + return { + kind: _kinds.Kind.NULL + }; + } // undefined + + if (value === undefined) { + return null; + } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but + // the value is not an array, convert the value using the list's item type. + + if ((0, _definition.isListType)(type)) { + const itemType = type.ofType; + if ((0, _isIterableObject.isIterableObject)(value)) { + const valuesNodes = []; + for (const item of value) { + const itemNode = astFromValue(item, itemType); + if (itemNode != null) { + valuesNodes.push(itemNode); } } + return { + kind: _kinds.Kind.LIST, + values: valuesNodes + }; } - var propTypesMisspellWarningShown; - { - propTypesMisspellWarningShown = false; - } - /** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ + return astFromValue(value, itemType); + } // Populate the fields of the input object by creating ASTs from each value + // in the JavaScript object according to the fields in the input type. - function isValidElement(object) { - { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } + if ((0, _definition.isInputObjectType)(type)) { + if (!(0, _isObjectLike.isObjectLike)(value)) { + return null; } - function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - return ''; + const fieldNodes = []; + for (const field of Object.values(type.getFields())) { + const fieldValue = astFromValue(value[field.name], field.type); + if (fieldValue) { + fieldNodes.push({ + kind: _kinds.Kind.OBJECT_FIELD, + name: { + kind: _kinds.Kind.NAME, + value: field.name + }, + value: fieldValue + }); } } - function getSourceInfoErrorAddendum(source) { - { - if (source !== undefined) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - return ''; - } + return { + kind: _kinds.Kind.OBJECT, + fields: fieldNodes + }; + } + if ((0, _definition.isLeafType)(type)) { + // Since value is an internally represented value, it must be serialized + // to an externally represented value before converting into an AST. + const serialized = type.serialize(value); + if (serialized == null) { + return null; + } // Others serialize based on their corresponding JavaScript scalar types. + + if (typeof serialized === 'boolean') { + return { + kind: _kinds.Kind.BOOLEAN, + value: serialized + }; + } // JavaScript numbers can be Int or Float values. + + if (typeof serialized === 'number' && Number.isFinite(serialized)) { + const stringNum = String(serialized); + return integerStringRegExp.test(stringNum) ? { + kind: _kinds.Kind.INT, + value: stringNum + } : { + kind: _kinds.Kind.FLOAT, + value: stringNum + }; } - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ + if (typeof serialized === 'string') { + // Enum types use Enum literals. + if ((0, _definition.isEnumType)(type)) { + return { + kind: _kinds.Kind.ENUM, + value: serialized + }; + } // ID types can use Int literals. - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - return info; + if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) { + return { + kind: _kinds.Kind.INT, + value: serialized + }; } + return { + kind: _kinds.Kind.STRING, + value: serialized + }; } - /** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - // Give the component that originally created this child. - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; - } - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); - } - } - /** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - function validateChildKeys(node, parentType) { - { - if (typeof node !== 'object') { - return; - } - if (isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } - } - /** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ + throw new TypeError(`Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.`); + } + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered. - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === undefined || typeof type === 'string') { - return; - } - var propTypes; - if (typeof type === 'function') { - propTypes = type.propTypes; - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || - // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - if (propTypes) { - // Intentionally inside to avoid triggering lazy initializers: - var name = getComponentNameFromType(type); - checkPropTypes(propTypes, element.props, 'prop', name, element); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: + false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); +} +/** + * IntValue: + * - NegativeSign? 0 + * - NegativeSign? NonZeroDigit ( Digit+ )? + */ - var _name = getComponentNameFromType(type); - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); - } - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); - } - } - } - /** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ +const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== 'children' && key !== 'key') { - setCurrentlyValidatingElement$1(fragment); - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - setCurrentlyValidatingElement$1(null); - break; - } - } - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - error('Invalid attribute `ref` supplied to `React.Fragment`.'); - setCurrentlyValidatingElement$1(null); - } - } - } - function jsxWithValidation(type, props, key, isStaticChildren, source, self) { - { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. +/***/ }), - if (!validType) { - var info = ''; - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendum(source); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - var typeString; - if (type === null) { - typeString = 'null'; - } else if (isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = typeof type; - } - error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. +/***/ "../../../node_modules/graphql/utilities/buildASTSchema.mjs": +/*!******************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/buildASTSchema.mjs ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) +"use strict"; - if (validType) { - var children = props.children; - if (children !== undefined) { - if (isStaticChildren) { - if (isArray(children)) { - for (var i = 0; i < children.length; i++) { - validateChildKeys(children[i], type); - } - if (Object.freeze) { - Object.freeze(children); - } - } else { - error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); - } - } else { - validateChildKeys(children, type); - } - } - } - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; - } - } // These two functions exist to still get child warnings in dev - // even with the prod transform. This means that jsxDEV is purely - // opt-in behavior for better messages but that we won't stop - // giving you warnings if you use production apis. - function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); - } - } - function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.buildASTSchema = buildASTSchema; +exports.buildSchema = buildSchema; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); +var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); +var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs"); +/** + * This takes the ast of a schema document produced by the parse function in + * src/language/parser.js. + * + * If no schema definition is provided, then it will look for types named Query, + * Mutation and Subscription. + * + * Given that AST it constructs a GraphQLSchema. The resulting schema + * has no resolve methods, so execution will use default resolvers. + */ +function buildASTSchema(documentAST, options) { + documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.'); + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + (0, _validate.assertValidSDL)(documentAST); + } + const emptySchemaConfig = { + description: undefined, + types: [], + directives: [], + extensions: Object.create(null), + extensionASTNodes: [], + assumeValid: false + }; + const config = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options); + if (config.astNode == null) { + for (const type of config.types) { + switch (type.name) { + // Note: While this could make early assertions to get the correctly + // typed values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + case 'Query': + // @ts-expect-error validated in `validateSchema` + config.query = type; + break; + case 'Mutation': + // @ts-expect-error validated in `validateSchema` + config.mutation = type; + break; + case 'Subscription': + // @ts-expect-error validated in `validateSchema` + config.subscription = type; + break; } } - var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children. - // for now we can ship identical prod functions + } + const directives = [...config.directives, + // If specified directives were not explicitly declared, add them. + ..._directives.specifiedDirectives.filter(stdDirective => config.directives.every(directive => directive.name !== stdDirective.name))]; + return new _schema.GraphQLSchema({ + ...config, + directives + }); +} +/** + * A helper function to build a GraphQLSchema directly from a source + * document. + */ - var jsxs = jsxWithValidationStatic; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.jsx = jsx; - exports.jsxs = jsxs; - })(); +function buildSchema(source, options) { + const document = (0, _parser.parse)(source, { + noLocation: options === null || options === void 0 ? void 0 : options.noLocation, + allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables + }); + return buildASTSchema(document, { + assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); } /***/ }), -/***/ "../../../node_modules/react/jsx-runtime.js": -/*!**************************************************!*\ - !*** ../../../node_modules/react/jsx-runtime.js ***! - \**************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ "../../../node_modules/graphql/utilities/buildClientSchema.mjs": +/*!*********************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/buildClientSchema.mjs ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -if (false) {} else { - module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../../../node_modules/react/cjs/react-jsx-runtime.development.js"); -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.buildClientSchema = buildClientSchema; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); +var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); +var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); +/** + * Build a GraphQLSchema for use by client tools. + * + * Given the result of a client running the introspection query, creates and + * returns a GraphQLSchema instance which can be then used with all graphql-js + * tools, but cannot be used to execute a query, as introspection does not + * represent the "resolver", "parse" or "serialize" functions or any other + * server-internal mechanisms. + * + * This function expects a complete introspection result. Don't forget to check + * the "errors" field of a server response before calling this function. + */ -/***/ }), +function buildClientSchema(introspection, options) { + (0, _isObjectLike.isObjectLike)(introspection) && (0, _isObjectLike.isObjectLike)(introspection.__schema) || (0, _devAssert.devAssert)(false, `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0, _inspect.inspect)(introspection)}.`); // Get the schema from the introspection result. -/***/ "../../../node_modules/set-value/index.js": -/*!************************************************!*\ - !*** ../../../node_modules/set-value/index.js ***! - \************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each. -/*! - * set-value - * - * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert). - * Released under the MIT License. - */ + const typeMap = (0, _keyValMap.keyValMap)(schemaIntrospection.types, typeIntrospection => typeIntrospection.name, typeIntrospection => buildType(typeIntrospection)); // Include standard types only if they are used. + for (const stdType of [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes]) { + if (typeMap[stdType.name]) { + typeMap[stdType.name] = stdType; + } + } // Get the root Query, Mutation, and Subscription types. + const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; + const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; + const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if + // directives were not queried for. -const { - deleteProperty -} = Reflect; -const isPrimitive = __webpack_require__(/*! is-primitive */ "../../../node_modules/is-primitive/index.js"); -const isPlainObject = __webpack_require__(/*! is-plain-object */ "../../../node_modules/is-plain-object/index.js"); -const isObject = value => { - return typeof value === 'object' && value !== null || typeof value === 'function'; -}; -const isUnsafeKey = key => { - return key === '__proto__' || key === 'constructor' || key === 'prototype'; -}; -const validateKey = key => { - if (!isPrimitive(key)) { - throw new TypeError('Object keys must be strings or symbols'); - } - if (isUnsafeKey(key)) { - throw new Error(`Cannot set unsafe key: "${key}"`); - } -}; -const toStringKey = input => { - return Array.isArray(input) ? input.flat().map(String).join(',') : input; -}; -const createMemoKey = (input, options) => { - if (typeof input !== 'string' || !options) return input; - let key = input + ';'; - if (options.arrays !== undefined) key += `arrays=${options.arrays};`; - if (options.separator !== undefined) key += `separator=${options.separator};`; - if (options.split !== undefined) key += `split=${options.split};`; - if (options.merge !== undefined) key += `merge=${options.merge};`; - if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`; - return key; -}; -const memoize = (input, options, fn) => { - const key = toStringKey(options ? createMemoKey(input, options) : input); - validateKey(key); - const value = setValue.cache.get(key) || fn(); - setValue.cache.set(key, value); - return value; -}; -const splitString = function (input) { - let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - const sep = options.separator || '.'; - const preserve = sep === '/' ? false : options.preservePaths; - if (typeof input === 'string' && preserve !== false && /\//.test(input)) { - return [input]; - } - const parts = []; - let part = ''; - const push = part => { - let number; - if (part.trim() !== '' && Number.isInteger(number = Number(part))) { - parts.push(number); - } else { - parts.push(part); + const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types. + + return new _schema.GraphQLSchema({ + description: schemaIntrospection.description, + query: queryType, + mutation: mutationType, + subscription: subscriptionType, + types: Object.values(typeMap), + directives, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); // Given a type reference in introspection, return the GraphQLType instance. + // preferring cached instances before building new instances. + + function getType(typeRef) { + if (typeRef.kind === _introspection.TypeKind.LIST) { + const itemRef = typeRef.ofType; + if (!itemRef) { + throw new Error('Decorated type deeper than introspection query.'); + } + return new _definition.GraphQLList(getType(itemRef)); } - }; - for (let i = 0; i < input.length; i++) { - const value = input[i]; - if (value === '\\') { - part += input[++i]; - continue; + if (typeRef.kind === _introspection.TypeKind.NON_NULL) { + const nullableRef = typeRef.ofType; + if (!nullableRef) { + throw new Error('Decorated type deeper than introspection query.'); + } + const nullableType = getType(nullableRef); + return new _definition.GraphQLNonNull((0, _definition.assertNullableType)(nullableType)); } - if (value === sep) { - push(part); - part = ''; - continue; + return getNamedType(typeRef); + } + function getNamedType(typeRef) { + const typeName = typeRef.name; + if (!typeName) { + throw new Error(`Unknown type reference: ${(0, _inspect.inspect)(typeRef)}.`); } - part += value; + const type = typeMap[typeName]; + if (!type) { + throw new Error(`Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`); + } + return type; } - if (part) { - push(part); + function getObjectType(typeRef) { + return (0, _definition.assertObjectType)(getNamedType(typeRef)); } - return parts; -}; -const split = (input, options) => { - if (options && typeof options.split === 'function') return options.split(input); - if (typeof input === 'symbol') return [input]; - if (Array.isArray(input)) return input; - return memoize(input, options, () => splitString(input, options)); -}; -const assignProp = (obj, prop, value, options) => { - validateKey(prop); - - // Delete property when "value" is undefined - if (value === undefined) { - deleteProperty(obj, prop); - } else if (options && options.merge) { - const merge = options.merge === 'function' ? options.merge : Object.assign; + function getInterfaceType(typeRef) { + return (0, _definition.assertInterfaceType)(getNamedType(typeRef)); + } // Given a type's introspection result, construct the correct + // GraphQLType instance. - // Only merge plain objects - if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) { - obj[prop] = merge(obj[prop], value); - } else { - obj[prop] = value; - } - } else { - obj[prop] = value; + function buildType(type) { + // eslint-disable-next-line @typescript-eslint/prefer-optional-chain + if (type != null && type.name != null && type.kind != null) { + // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17 + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check + switch (type.kind) { + case _introspection.TypeKind.SCALAR: + return buildScalarDef(type); + case _introspection.TypeKind.OBJECT: + return buildObjectDef(type); + case _introspection.TypeKind.INTERFACE: + return buildInterfaceDef(type); + case _introspection.TypeKind.UNION: + return buildUnionDef(type); + case _introspection.TypeKind.ENUM: + return buildEnumDef(type); + case _introspection.TypeKind.INPUT_OBJECT: + return buildInputObjectDef(type); + } + } + const typeStr = (0, _inspect.inspect)(type); + throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`); } - return obj; -}; -const setValue = (target, path, value, options) => { - if (!path || !isObject(target)) return target; - const keys = split(path, options); - let obj = target; - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const next = keys[i + 1]; - validateKey(key); - if (next === undefined) { - assignProp(obj, key, value, options); - break; + function buildScalarDef(scalarIntrospection) { + return new _definition.GraphQLScalarType({ + name: scalarIntrospection.name, + description: scalarIntrospection.description, + specifiedByURL: scalarIntrospection.specifiedByURL + }); + } + function buildImplementationsList(implementingIntrospection) { + // TODO: Temporary workaround until GraphQL ecosystem will fully support + // 'interfaces' on interface types. + if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _introspection.TypeKind.INTERFACE) { + return []; } - if (typeof next === 'number' && !Array.isArray(obj[key])) { - obj = obj[key] = []; - continue; + if (!implementingIntrospection.interfaces) { + const implementingIntrospectionStr = (0, _inspect.inspect)(implementingIntrospection); + throw new Error(`Introspection result missing interfaces: ${implementingIntrospectionStr}.`); } - if (!isObject(obj[key])) { - obj[key] = {}; + return implementingIntrospection.interfaces.map(getInterfaceType); + } + function buildObjectDef(objectIntrospection) { + return new _definition.GraphQLObjectType({ + name: objectIntrospection.name, + description: objectIntrospection.description, + interfaces: () => buildImplementationsList(objectIntrospection), + fields: () => buildFieldDefMap(objectIntrospection) + }); + } + function buildInterfaceDef(interfaceIntrospection) { + return new _definition.GraphQLInterfaceType({ + name: interfaceIntrospection.name, + description: interfaceIntrospection.description, + interfaces: () => buildImplementationsList(interfaceIntrospection), + fields: () => buildFieldDefMap(interfaceIntrospection) + }); + } + function buildUnionDef(unionIntrospection) { + if (!unionIntrospection.possibleTypes) { + const unionIntrospectionStr = (0, _inspect.inspect)(unionIntrospection); + throw new Error(`Introspection result missing possibleTypes: ${unionIntrospectionStr}.`); } - obj = obj[key]; + return new _definition.GraphQLUnionType({ + name: unionIntrospection.name, + description: unionIntrospection.description, + types: () => unionIntrospection.possibleTypes.map(getObjectType) + }); } - return target; -}; -setValue.split = split; -setValue.cache = new Map(); -setValue.clear = () => { - setValue.cache = new Map(); -}; -module.exports = setValue; + function buildEnumDef(enumIntrospection) { + if (!enumIntrospection.enumValues) { + const enumIntrospectionStr = (0, _inspect.inspect)(enumIntrospection); + throw new Error(`Introspection result missing enumValues: ${enumIntrospectionStr}.`); + } + return new _definition.GraphQLEnumType({ + name: enumIntrospection.name, + description: enumIntrospection.description, + values: (0, _keyValMap.keyValMap)(enumIntrospection.enumValues, valueIntrospection => valueIntrospection.name, valueIntrospection => ({ + description: valueIntrospection.description, + deprecationReason: valueIntrospection.deprecationReason + })) + }); + } + function buildInputObjectDef(inputObjectIntrospection) { + if (!inputObjectIntrospection.inputFields) { + const inputObjectIntrospectionStr = (0, _inspect.inspect)(inputObjectIntrospection); + throw new Error(`Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`); + } + return new _definition.GraphQLInputObjectType({ + name: inputObjectIntrospection.name, + description: inputObjectIntrospection.description, + fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields), + isOneOf: inputObjectIntrospection.isOneOf + }); + } + function buildFieldDefMap(typeIntrospection) { + if (!typeIntrospection.fields) { + throw new Error(`Introspection result missing fields: ${(0, _inspect.inspect)(typeIntrospection)}.`); + } + return (0, _keyValMap.keyValMap)(typeIntrospection.fields, fieldIntrospection => fieldIntrospection.name, buildField); + } + function buildField(fieldIntrospection) { + const type = getType(fieldIntrospection.type); + if (!(0, _definition.isOutputType)(type)) { + const typeStr = (0, _inspect.inspect)(type); + throw new Error(`Introspection must provide output type for fields, but received: ${typeStr}.`); + } + if (!fieldIntrospection.args) { + const fieldIntrospectionStr = (0, _inspect.inspect)(fieldIntrospection); + throw new Error(`Introspection result missing field args: ${fieldIntrospectionStr}.`); + } + return { + description: fieldIntrospection.description, + deprecationReason: fieldIntrospection.deprecationReason, + type, + args: buildInputValueDefMap(fieldIntrospection.args) + }; + } + function buildInputValueDefMap(inputValueIntrospections) { + return (0, _keyValMap.keyValMap)(inputValueIntrospections, inputValue => inputValue.name, buildInputValue); + } + function buildInputValue(inputValueIntrospection) { + const type = getType(inputValueIntrospection.type); + if (!(0, _definition.isInputType)(type)) { + const typeStr = (0, _inspect.inspect)(type); + throw new Error(`Introspection must provide input type for arguments, but received: ${typeStr}.`); + } + const defaultValue = inputValueIntrospection.defaultValue != null ? (0, _valueFromAST.valueFromAST)((0, _parser.parseValue)(inputValueIntrospection.defaultValue), type) : undefined; + return { + description: inputValueIntrospection.description, + type, + defaultValue, + deprecationReason: inputValueIntrospection.deprecationReason + }; + } + function buildDirective(directiveIntrospection) { + if (!directiveIntrospection.args) { + const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection); + throw new Error(`Introspection result missing directive args: ${directiveIntrospectionStr}.`); + } + if (!directiveIntrospection.locations) { + const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection); + throw new Error(`Introspection result missing directive locations: ${directiveIntrospectionStr}.`); + } + return new _directives.GraphQLDirective({ + name: directiveIntrospection.name, + description: directiveIntrospection.description, + isRepeatable: directiveIntrospection.isRepeatable, + locations: directiveIntrospection.locations.slice(), + args: buildInputValueDefMap(directiveIntrospection.args) + }); + } +} /***/ }), -/***/ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js": -/*!**********************************************************************!*\ - !*** ../../../node_modules/style-value-types/dist/valueTypes.cjs.js ***! - \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/graphql/utilities/coerceInputValue.mjs": +/*!********************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/coerceInputValue.mjs ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const clamp = (min, max) => v => Math.max(Math.min(v, max), min); -const sanitize = v => v % 1 ? Number(v.toFixed(5)) : v; -const floatRegex = /(-)?([\d]*\.?[\d])+/g; -const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi; -const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i; -function isString(v) { - return typeof v === 'string'; +exports.coerceInputValue = coerceInputValue; +var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs"); +var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs"); +var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs"); +var _printPathArray = __webpack_require__(/*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs"); +var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Coerces a JavaScript value given a GraphQL Input Type. + */ +function coerceInputValue(inputValue, type, onError = defaultOnError) { + return coerceInputValueImpl(inputValue, type, onError, undefined); } -const number = { - test: v => typeof v === 'number', - parse: parseFloat, - transform: v => v -}; -const alpha = Object.assign(Object.assign({}, number), { - transform: clamp(0, 1) -}); -const scale = Object.assign(Object.assign({}, number), { - default: 1 -}); -const createUnitType = unit => ({ - test: v => isString(v) && v.endsWith(unit) && v.split(' ').length === 1, - parse: parseFloat, - transform: v => `${v}${unit}` -}); -const degrees = createUnitType('deg'); -const percent = createUnitType('%'); -const px = createUnitType('px'); -const vh = createUnitType('vh'); -const vw = createUnitType('vw'); -const progressPercentage = Object.assign(Object.assign({}, percent), { - parse: v => percent.parse(v) / 100, - transform: v => percent.transform(v * 100) -}); -const isColorString = (type, testProp) => v => { - return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp)); -}; -const splitColor = (aName, bName, cName) => v => { - if (!isString(v)) return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1 - }; -}; -const hsla = { - test: isColorString('hsl', 'hue'), - parse: splitColor('hue', 'saturation', 'lightness'), - transform: _ref => { - let { - hue, - saturation, - lightness, - alpha: alpha$1 = 1 - } = _ref; - return 'hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')'; +function defaultOnError(path, invalidValue, error) { + let errorPrefix = 'Invalid value ' + (0, _inspect.inspect)(invalidValue); + if (path.length > 0) { + errorPrefix += ` at "value${(0, _printPathArray.printPathArray)(path)}"`; } -}; -const clampRgbUnit = clamp(0, 255); -const rgbUnit = Object.assign(Object.assign({}, number), { - transform: v => Math.round(clampRgbUnit(v)) -}); -const rgba = { - test: isColorString('rgb', 'red'), - parse: splitColor('red', 'green', 'blue'), - transform: _ref2 => { - let { - red, - green, - blue, - alpha: alpha$1 = 1 - } = _ref2; - return 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')'; + error.message = errorPrefix + ': ' + error.message; + throw error; +} +function coerceInputValueImpl(inputValue, type, onError, path) { + if ((0, _definition.isNonNullType)(type)) { + if (inputValue != null) { + return coerceInputValueImpl(inputValue, type.ofType, onError, path); + } + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected non-nullable type "${(0, _inspect.inspect)(type)}" not to be null.`)); + return; } -}; -function parseHex(v) { - let r = ''; - let g = ''; - let b = ''; - let a = ''; - if (v.length > 5) { - r = v.substr(1, 2); - g = v.substr(3, 2); - b = v.substr(5, 2); - a = v.substr(7, 2); - } else { - r = v.substr(1, 1); - g = v.substr(2, 1); - b = v.substr(3, 1); - a = v.substr(4, 1); - r += r; - g += g; - b += b; - a += a; + if (inputValue == null) { + // Explicitly return the value null. + return null; } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1 - }; -} -const hex = { - test: isColorString('#'), - parse: parseHex, - transform: rgba.transform -}; -const color = { - test: v => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: v => { - if (rgba.test(v)) { - return rgba.parse(v); - } else if (hsla.test(v)) { - return hsla.parse(v); - } else { - return hex.parse(v); + if ((0, _definition.isListType)(type)) { + const itemType = type.ofType; + if ((0, _isIterableObject.isIterableObject)(inputValue)) { + return Array.from(inputValue, (itemValue, index) => { + const itemPath = (0, _Path.addPath)(path, index, undefined); + return coerceInputValueImpl(itemValue, itemType, onError, itemPath); + }); + } // Lists accept a non-list value as a list of one. + + return [coerceInputValueImpl(inputValue, itemType, onError, path)]; + } + if ((0, _definition.isInputObjectType)(type)) { + if (!(0, _isObjectLike.isObjectLike)(inputValue)) { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`)); + return; } - }, - transform: v => { - return isString(v) ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v); + const coercedValue = {}; + const fieldDefs = type.getFields(); + for (const field of Object.values(fieldDefs)) { + const fieldValue = inputValue[field.name]; + if (fieldValue === undefined) { + if (field.defaultValue !== undefined) { + coercedValue[field.name] = field.defaultValue; + } else if ((0, _definition.isNonNullType)(field.type)) { + const typeStr = (0, _inspect.inspect)(field.type); + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${field.name}" of required type "${typeStr}" was not provided.`)); + } + continue; + } + coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, (0, _Path.addPath)(path, field.name, type.name)); + } // Ensure every provided field is defined. + + for (const fieldName of Object.keys(inputValue)) { + if (!fieldDefs[fieldName]) { + const suggestions = (0, _suggestionList.suggestionList)(fieldName, Object.keys(type.getFields())); + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${fieldName}" is not defined by type "${type.name}".` + (0, _didYouMean.didYouMean)(suggestions))); + } + } + if (type.isOneOf) { + const keys = Object.keys(coercedValue); + if (keys.length !== 1) { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Exactly one key must be specified for OneOf type "${type.name}".`)); + } + const key = keys[0]; + const value = coercedValue[key]; + if (value === null) { + onError((0, _Path.pathToArray)(path).concat(key), value, new _GraphQLError.GraphQLError(`Field "${key}" must be non-null.`)); + } + } + return coercedValue; } -}; -const colorToken = '${c}'; -const numberToken = '${n}'; -function test(v) { - var _a, _b, _c, _d; - return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0; -} -function analyse(v) { - if (typeof v === 'number') v = `${v}`; - const values = []; - let numColors = 0; - const colors = v.match(colorRegex); - if (colors) { - numColors = colors.length; - v = v.replace(colorRegex, colorToken); - values.push(...colors.map(color.parse)); + if ((0, _definition.isLeafType)(type)) { + let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(), + // which can throw to indicate failure. If it throws, maintain a reference + // to the original error. + + try { + parseResult = type.parseValue(inputValue); + } catch (error) { + if (error instanceof _GraphQLError.GraphQLError) { + onError((0, _Path.pathToArray)(path), inputValue, error); + } else { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}". ` + error.message, { + originalError: error + })); + } + return; + } + if (parseResult === undefined) { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}".`)); + } + return parseResult; } - const numbers = v.match(floatRegex); - if (numbers) { - v = v.replace(floatRegex, numberToken); - values.push(...numbers.map(number.parse)); + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered. + + false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/concatAST.mjs": +/*!*************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/concatAST.mjs ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.concatAST = concatAST; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +/** + * Provided a collection of ASTs, presumably each from different files, + * concatenate the ASTs together into batched AST, useful for validating many + * GraphQL source files which together represent one conceptual application. + */ + +function concatAST(documents) { + const definitions = []; + for (const doc of documents) { + definitions.push(...doc.definitions); } return { - values, - numColors, - tokenised: v - }; -} -function parse(v) { - return analyse(v).values; -} -function createTransformer(v) { - const { - values, - numColors, - tokenised - } = analyse(v); - const numValues = values.length; - return v => { - let output = tokenised; - for (let i = 0; i < numValues; i++) { - output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i])); - } - return output; + kind: _kinds.Kind.DOCUMENT, + definitions }; } -const convertNumbersToZero = v => typeof v === 'number' ? 0 : v; -function getAnimatableNone(v) { - const parsed = parse(v); - const transformer = createTransformer(v); - return transformer(parsed.map(convertNumbersToZero)); -} -const complex = { - test, - parse, - createTransformer, - getAnimatableNone -}; -const maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']); -function applyDefaultFilter(v) { - let [name, value] = v.slice(0, -1).split('('); - if (name === 'drop-shadow') return v; - const [number] = value.match(floatRegex) || []; - if (!number) return v; - const unit = value.replace(number, ''); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) defaultValue *= 100; - return name + '(' + defaultValue + unit + ')'; -} -const functionRegex = /([a-z-]*)\(.*?\)/g; -const filter = Object.assign(Object.assign({}, complex), { - getAnimatableNone: v => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(' ') : v; - } -}); -exports.alpha = alpha; -exports.color = color; -exports.complex = complex; -exports.degrees = degrees; -exports.filter = filter; -exports.hex = hex; -exports.hsla = hsla; -exports.number = number; -exports.percent = percent; -exports.progressPercentage = progressPercentage; -exports.px = px; -exports.rgbUnit = rgbUnit; -exports.rgba = rgba; -exports.scale = scale; -exports.vh = vh; -exports.vw = vw; /***/ }), -/***/ "../../../node_modules/toggle-selection/index.js": -/*!*******************************************************!*\ - !*** ../../../node_modules/toggle-selection/index.js ***! - \*******************************************************/ -/***/ (function(module) { +/***/ "../../../node_modules/graphql/utilities/extendSchema.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/extendSchema.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -module.exports = function () { - var selection = document.getSelection(); - if (!selection.rangeCount) { - return function () {}; - } - var active = document.activeElement; - var ranges = []; - for (var i = 0; i < selection.rangeCount; i++) { - ranges.push(selection.getRangeAt(i)); - } - switch (active.tagName.toUpperCase()) { - // .toUpperCase handles XHTML - case 'INPUT': - case 'TEXTAREA': - active.blur(); - break; - default: - active = null; - break; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.extendSchema = extendSchema; +exports.extendSchemaImpl = extendSchemaImpl; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _predicates = __webpack_require__(/*! ../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); +var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); +var _values = __webpack_require__(/*! ../execution/values.mjs */ "../../../node_modules/graphql/execution/values.mjs"); +var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); +/** + * Produces a new schema given an existing schema and a document which may + * contain GraphQL type extensions and definitions. The original schema will + * remain unaltered. + * + * Because a schema represents a graph of references, a schema cannot be + * extended without effectively making an entire copy. We do not know until it's + * too late if subgraphs remain unchanged. + * + * This algorithm copies the provided schema, applying extensions while + * producing the copy. The original schema remains unaltered. + */ +function extendSchema(schema, documentAST, options) { + (0, _schema.assertSchema)(schema); + documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.'); + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + (0, _validate.assertValidSDLExtension)(documentAST, schema); } - selection.removeAllRanges(); - return function () { - selection.type === 'Caret' && selection.removeAllRanges(); - if (!selection.rangeCount) { - ranges.forEach(function (range) { - selection.addRange(range); - }); - } - active && active.focus(); - }; -}; - -/***/ }), + const schemaConfig = schema.toConfig(); + const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options); + return schemaConfig === extendedConfig ? schema : new _schema.GraphQLSchema(extendedConfig); +} +/** + * @internal + */ -/***/ "../../../node_modules/tslib/tslib.es6.js": -/*!************************************************!*\ - !*** ../../../node_modules/tslib/tslib.es6.js ***! - \************************************************/ -/***/ (function(__unused_webpack_module, exports) { +function extendSchemaImpl(schemaConfig, documentAST, options) { + var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; + // Collect the type definitions and extensions found in the document. + const typeDefs = []; + const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can + // have the same name. For example, a type named "skip". + const directiveDefs = []; + let schemaDef; // Schema extensions are collected which may add additional operation types. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.__assign = void 0; -exports.__asyncDelegator = __asyncDelegator; -exports.__asyncGenerator = __asyncGenerator; -exports.__asyncValues = __asyncValues; -exports.__await = __await; -exports.__awaiter = __awaiter; -exports.__classPrivateFieldGet = __classPrivateFieldGet; -exports.__classPrivateFieldIn = __classPrivateFieldIn; -exports.__classPrivateFieldSet = __classPrivateFieldSet; -exports.__createBinding = void 0; -exports.__decorate = __decorate; -exports.__exportStar = __exportStar; -exports.__extends = __extends; -exports.__generator = __generator; -exports.__importDefault = __importDefault; -exports.__importStar = __importStar; -exports.__makeTemplateObject = __makeTemplateObject; -exports.__metadata = __metadata; -exports.__param = __param; -exports.__read = __read; -exports.__rest = __rest; -exports.__spread = __spread; -exports.__spreadArray = __spreadArray; -exports.__spreadArrays = __spreadArrays; -exports.__values = __values; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ + const schemaExtensions = []; + for (const def of documentAST.definitions) { + if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) { + schemaDef = def; + } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) { + schemaExtensions.push(def); + } else if ((0, _predicates.isTypeDefinitionNode)(def)) { + typeDefs.push(def); + } else if ((0, _predicates.isTypeExtensionNode)(def)) { + const extendedTypeName = def.name.value; + const existingTypeExtensions = typeExtensionsMap[extendedTypeName]; + typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; + } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + directiveDefs.push(def); + } + } // If this document contains no new types, extensions, or directives then + // return the same unmodified GraphQLSchema instance. -var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) { + return schemaConfig; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign = function () { - exports.__assign = __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + const typeMap = Object.create(null); + for (const existingType of schemaConfig.types) { + typeMap[existingType.name] = extendNamedType(existingType); + } + for (const typeNode of typeDefs) { + var _stdTypeMap$name; + const name = typeNode.name.value; + typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); + } + const operationTypes = { + // Get the extended root operation types. + query: schemaConfig.query && replaceNamedType(schemaConfig.query), + mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), + subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription), + // Then, incorporate schema definition and all schema extensions. + ...(schemaDef && getOperationTypes([schemaDef])), + ...getOperationTypes(schemaExtensions) + }; // Then produce and return a Schema config with these types. + + return { + description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value, + ...operationTypes, + types: Object.values(typeMap), + directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)], + extensions: Object.create(null), + astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, + extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), + assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false + }; // Below are functions used for producing this schema that have closed over + // this scope and have access to the schema, cache, and newly defined types. + + function replaceType(type) { + if ((0, _definition.isListType)(type)) { + // @ts-expect-error + return new _definition.GraphQLList(replaceType(type.ofType)); } - return t; - }; - return __assign.apply(this, arguments); -}; -exports.__assign = __assign; -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + if ((0, _definition.isNonNullType)(type)) { + // @ts-expect-error + return new _definition.GraphQLNonNull(replaceType(type.ofType)); + } // @ts-expect-error FIXME + + return replaceNamedType(type); } - return t; -} -function __decorate(decorators, target, key, desc) { - var c = arguments.length, - r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, - d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param(paramIndex, decorator) { - return function (target, key) { - decorator(target, key, paramIndex); - }; -} -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); + function replaceNamedType(type) { + // Note: While this could make early assertions to get the correctly + // typed values, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + return typeMap[type.name]; + } + function replaceDirective(directive) { + const config = directive.toConfig(); + return new _directives.GraphQLDirective({ + ...config, + args: (0, _mapValue.mapValue)(config.args, extendArg) }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + function extendNamedType(type) { + if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) { + // Builtin types are not extended. + return type; } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + if ((0, _definition.isScalarType)(type)) { + return extendScalarType(type); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if ((0, _definition.isObjectType)(type)) { + return extendObjectType(type); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; + if ((0, _definition.isInterfaceType)(type)) { + return extendInterfaceType(type); + } + if ((0, _definition.isUnionType)(type)) { + return extendUnionType(type); + } + if ((0, _definition.isEnumType)(type)) { + return extendEnumType(type); + } + if ((0, _definition.isInputObjectType)(type)) { + return extendInputObjectType(type); + } + /* c8 ignore next 3 */ + // Not reachable, all possible type definition nodes have been considered. + + false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); + } + function extendInputObjectType(type) { + var _typeExtensionsMap$co; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; + return new _definition.GraphQLInputObjectType({ + ...config, + fields: () => ({ + ...(0, _mapValue.mapValue)(config.fields, field => ({ + ...field, + type: replaceType(field.type) + })), + ...buildInputFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendEnumType(type) { + var _typeExtensionsMap$ty; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; + return new _definition.GraphQLEnumType({ + ...config, + values: { + ...config.values, + ...buildEnumValueMap(extensions) }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + function extendScalarType(type) { + var _typeExtensionsMap$co2; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; + let specifiedByURL = config.specifiedByURL; + for (const extensionNode of extensions) { + var _getSpecifiedByURL; + specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL; } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; + return new _definition.GraphQLScalarType({ + ...config, + specifiedByURL, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); } -} -var __createBinding = Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k]; - } + function extendObjectType(type) { + var _typeExtensionsMap$co3; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; + return new _definition.GraphQLObjectType({ + ...config, + interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)], + fields: () => ({ + ...(0, _mapValue.mapValue)(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendInterfaceType(type) { + var _typeExtensionsMap$co4; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; + return new _definition.GraphQLInterfaceType({ + ...config, + interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)], + fields: () => ({ + ...(0, _mapValue.mapValue)(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendUnionType(type) { + var _typeExtensionsMap$co5; + const config = type.toConfig(); + const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; + return new _definition.GraphQLUnionType({ + ...config, + types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)], + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendField(field) { + return { + ...field, + type: replaceType(field.type), + args: field.args && (0, _mapValue.mapValue)(field.args, extendArg) }; } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}; -exports.__createBinding = __createBinding; -function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error + function extendArg(arg) { + return { + ...arg, + type: replaceType(arg.type) }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } } - return ar; -} + function getOperationTypes(nodes) { + const opTypes = {}; + for (const node of nodes) { + var _node$operationTypes; -/** @deprecated */ -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; - return r; -} -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + const operationTypesNodes = /* c8 ignore next */ + (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + for (const operationType of operationTypesNodes) { + // Note: While this could make early assertions to get the correctly + // typed values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + // @ts-expect-error + opTypes[operationType.operation] = getNamedType(operationType.type); + } } + return opTypes; } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), - i, - q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function (v) { - return new Promise(function (a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); + function getNamedType(node) { + var _stdTypeMap$name2; + const name = node.name.value; + const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name]; + if (type === undefined) { + throw new Error(`Unknown type: "${name}".`); } + return type; } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + function getWrappedType(node) { + if (node.kind === _kinds.Kind.LIST_TYPE) { + return new _definition.GraphQLList(getWrappedType(node.type)); + } + if (node.kind === _kinds.Kind.NON_NULL_TYPE) { + return new _definition.GraphQLNonNull(getWrappedType(node.type)); + } + return getNamedType(node); } - function fulfill(value) { - resume("next", value); + function buildDirective(node) { + var _node$description; + return new _directives.GraphQLDirective({ + name: node.name.value, + description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value, + // @ts-expect-error + locations: node.locations.map(({ + value + }) => value), + isRepeatable: node.repeatable, + args: buildArgumentMap(node.arguments), + astNode: node + }); } - function reject(value) { - resume("throw", value); + function buildFieldMap(nodes) { + const fieldConfigMap = Object.create(null); + for (const node of nodes) { + var _node$fields; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + const nodeFields = /* c8 ignore next */ + (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + for (const field of nodeFields) { + var _field$description; + fieldConfigMap[field.name.value] = { + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + type: getWrappedType(field.type), + description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value, + args: buildArgumentMap(field.arguments), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return fieldConfigMap; } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + function buildArgumentMap(args) { + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + const argsNodes = /* c8 ignore next */ + args !== null && args !== void 0 ? args : []; + const argConfigMap = Object.create(null); + for (const arg of argsNodes) { + var _arg$description; + + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + const type = getWrappedType(arg.type); + argConfigMap[arg.name.value] = { + type, + description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value, + defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type), + deprecationReason: getDeprecationReason(arg), + astNode: arg + }; + } + return argConfigMap; } -} -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function () { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function (v) { - return (p = !p) ? { - value: __await(o[n](v)), - done: n === "return" - } : f ? f(v) : v; - } : f; + function buildInputFieldMap(nodes) { + const inputFieldMap = Object.create(null); + for (const node of nodes) { + var _node$fields2; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + const fieldsNodes = /* c8 ignore next */ + (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : []; + for (const field of fieldsNodes) { + var _field$description2; + + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + const type = getWrappedType(field.type); + inputFieldMap[field.name.value] = { + type, + description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value, + defaultValue: (0, _valueFromAST.valueFromAST)(field.defaultValue, type), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return inputFieldMap; } -} -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], - i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function (v) { - return new Promise(function (resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; + function buildEnumValueMap(nodes) { + const enumValueMap = Object.create(null); + for (const node of nodes) { + var _node$values; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + const valuesNodes = /* c8 ignore next */ + (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + for (const value of valuesNodes) { + var _value$description; + enumValueMap[value.name.value] = { + description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value, + deprecationReason: getDeprecationReason(value), + astNode: value + }; + } + } + return enumValueMap; } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function (v) { - resolve({ - value: v, - done: d - }); - }, reject); + function buildInterfaces(nodes) { + // Note: While this could make assertions to get the correctly typed + // values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + // @ts-expect-error + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + node => { + var _node$interfaces$map, _node$interfaces; + return /* c8 ignore next */( + (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : [] + ); + }); } -} -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { - value: raw + function buildUnionTypes(nodes) { + // Note: While this could make assertions to get the correctly typed + // values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + // @ts-expect-error + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + node => { + var _node$types$map, _node$types; + return /* c8 ignore next */( + (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType)) !== null && _node$types$map !== void 0 ? _node$types$map : [] + ); }); - } else { - cooked.raw = raw; } - return cooked; -} -; -var __setModuleDefault = Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}; -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -} -function __importDefault(mod) { - return mod && mod.__esModule ? mod : { - default: mod - }; -} -function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); + function buildType(astNode) { + var _typeExtensionsMap$na; + const name = astNode.name.value; + const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; + switch (astNode.kind) { + case _kinds.Kind.OBJECT_TYPE_DEFINITION: + { + var _astNode$description; + const allNodes = [astNode, ...extensionASTNodes]; + return new _definition.GraphQLObjectType({ + name, + description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case _kinds.Kind.INTERFACE_TYPE_DEFINITION: + { + var _astNode$description2; + const allNodes = [astNode, ...extensionASTNodes]; + return new _definition.GraphQLInterfaceType({ + name, + description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case _kinds.Kind.ENUM_TYPE_DEFINITION: + { + var _astNode$description3; + const allNodes = [astNode, ...extensionASTNodes]; + return new _definition.GraphQLEnumType({ + name, + description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value, + values: buildEnumValueMap(allNodes), + astNode, + extensionASTNodes + }); + } + case _kinds.Kind.UNION_TYPE_DEFINITION: + { + var _astNode$description4; + const allNodes = [astNode, ...extensionASTNodes]; + return new _definition.GraphQLUnionType({ + name, + description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value, + types: () => buildUnionTypes(allNodes), + astNode, + extensionASTNodes + }); + } + case _kinds.Kind.SCALAR_TYPE_DEFINITION: + { + var _astNode$description5; + return new _definition.GraphQLScalarType({ + name, + description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value, + specifiedByURL: getSpecifiedByURL(astNode), + astNode, + extensionASTNodes + }); + } + case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: + { + var _astNode$description6; + const allNodes = [astNode, ...extensionASTNodes]; + return new _definition.GraphQLInputObjectType({ + name, + description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value, + fields: () => buildInputFieldMap(allNodes), + astNode, + extensionASTNodes, + isOneOf: isOneOf(astNode) + }); + } + } + } } +const stdTypeMap = (0, _keyMap.keyMap)([..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes], type => type.name); +/** + * Given a field or enum value node, returns the string value for the + * deprecation reason. + */ -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js": -/*!***********************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/assignRef.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +function getDeprecationReason(node) { + const deprecated = (0, _values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues` + return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; +} +/** + * Given a scalar node, returns the string value for the specifiedByURL. + */ +function getSpecifiedByURL(node) { + const specifiedBy = (0, _values.getDirectiveValues)(_directives.GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues` -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.assignRef = assignRef; + return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; +} /** - * Assigns a value for a given ref, no matter of the ref format - * @param {RefObject} ref - a callback function or ref object - * @param value - a new value - * - * @see https://github.com/theKashey/use-callback-ref#assignref - * @example - * const refObject = useRef(); - * const refFn = (ref) => {....} - * - * assignRef(refObject, "refValue"); - * assignRef(refFn, "refValue"); + * Given an input object node, returns if the node should be OneOf. */ -function assignRef(ref, value) { - if (typeof ref === 'function') { - ref(value); - } else if (ref) { - ref.current = value; - } - return ref; + +function isOneOf(node) { + return Boolean((0, _values.getDirectiveValues)(_directives.GraphQLOneOfDirective, node)); } /***/ }), -/***/ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js": +/***/ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs": /*!***********************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/createRef.js ***! + !*** ../../../node_modules/graphql/utilities/findBreakingChanges.mjs ***! \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createCallbackRef = createCallbackRef; +exports.DangerousChangeType = exports.BreakingChangeType = void 0; +exports.findBreakingChanges = findBreakingChanges; +exports.findDangerousChanges = findDangerousChanges; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); +var _sortValueNode = __webpack_require__(/*! ./sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs"); +var BreakingChangeType; +(function (BreakingChangeType) { + BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED'; + BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND'; + BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION'; + BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM'; + BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] = 'REQUIRED_INPUT_FIELD_ADDED'; + BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] = 'IMPLEMENTED_INTERFACE_REMOVED'; + BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED'; + BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND'; + BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED'; + BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED'; + BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND'; + BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED'; + BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED'; + BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] = 'REQUIRED_DIRECTIVE_ARG_ADDED'; + BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] = 'DIRECTIVE_REPEATABLE_REMOVED'; + BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] = 'DIRECTIVE_LOCATION_REMOVED'; +})(BreakingChangeType || (exports.BreakingChangeType = BreakingChangeType = {})); +var DangerousChangeType; +(function (DangerousChangeType) { + DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM'; + DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION'; + DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] = 'OPTIONAL_INPUT_FIELD_ADDED'; + DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED'; + DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] = 'IMPLEMENTED_INTERFACE_ADDED'; + DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE'; +})(DangerousChangeType || (exports.DangerousChangeType = DangerousChangeType = {})); /** - * creates a Ref object with on change callback - * @param callback - * @returns {RefObject} - * - * @see {@link useCallbackRef} - * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs + * Given two schemas, returns an Array containing descriptions of all the types + * of breaking changes covered by the other functions down below. */ -function createCallbackRef(callback) { - var current = null; - return { - get current() { - return current; - }, - set current(value) { - var last = current; - if (last !== value) { - current = value; - callback(value, last); - } - } - }; +function findBreakingChanges(oldSchema, newSchema) { + // @ts-expect-error + return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in BreakingChangeType); } +/** + * Given two schemas, returns an Array containing descriptions of all the types + * of potentially dangerous changes covered by the other functions down below. + */ -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/index.js": -/*!*******************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/index.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "assignRef", ({ - enumerable: true, - get: function () { - return _assignRef.assignRef; - } -})); -Object.defineProperty(exports, "createCallbackRef", ({ - enumerable: true, - get: function () { - return _createRef.createCallbackRef; +function findDangerousChanges(oldSchema, newSchema) { + // @ts-expect-error + return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in DangerousChangeType); +} +function findSchemaChanges(oldSchema, newSchema) { + return [...findTypeChanges(oldSchema, newSchema), ...findDirectiveChanges(oldSchema, newSchema)]; +} +function findDirectiveChanges(oldSchema, newSchema) { + const schemaChanges = []; + const directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives()); + for (const oldDirective of directivesDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_REMOVED, + description: `${oldDirective.name} was removed.` + }); } -})); -Object.defineProperty(exports, "mergeRefs", ({ - enumerable: true, - get: function () { - return _mergeRef.mergeRefs; + for (const [oldDirective, newDirective] of directivesDiff.persisted) { + const argsDiff = diff(oldDirective.args, newDirective.args); + for (const newArg of argsDiff.added) { + if ((0, _definition.isRequiredArgument)(newArg)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED, + description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.` + }); + } + } + for (const oldArg of argsDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_ARG_REMOVED, + description: `${oldArg.name} was removed from ${oldDirective.name}.` + }); + } + if (oldDirective.isRepeatable && !newDirective.isRepeatable) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED, + description: `Repeatable flag was removed from ${oldDirective.name}.` + }); + } + for (const location of oldDirective.locations) { + if (!newDirective.locations.includes(location)) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED, + description: `${location} was removed from ${oldDirective.name}.` + }); + } + } } -})); -Object.defineProperty(exports, "refToCallback", ({ - enumerable: true, - get: function () { - return _refToCallback.refToCallback; + return schemaChanges; +} +function findTypeChanges(oldSchema, newSchema) { + const schemaChanges = []; + const typesDiff = diff(Object.values(oldSchema.getTypeMap()), Object.values(newSchema.getTypeMap())); + for (const oldType of typesDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.TYPE_REMOVED, + description: (0, _scalars.isSpecifiedScalarType)(oldType) ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.` : `${oldType.name} was removed.` + }); } -})); -Object.defineProperty(exports, "transformRef", ({ - enumerable: true, - get: function () { - return _transformRef.transformRef; + for (const [oldType, newType] of typesDiff.persisted) { + if ((0, _definition.isEnumType)(oldType) && (0, _definition.isEnumType)(newType)) { + schemaChanges.push(...findEnumTypeChanges(oldType, newType)); + } else if ((0, _definition.isUnionType)(oldType) && (0, _definition.isUnionType)(newType)) { + schemaChanges.push(...findUnionTypeChanges(oldType, newType)); + } else if ((0, _definition.isInputObjectType)(oldType) && (0, _definition.isInputObjectType)(newType)) { + schemaChanges.push(...findInputObjectTypeChanges(oldType, newType)); + } else if ((0, _definition.isObjectType)(oldType) && (0, _definition.isObjectType)(newType)) { + schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType)); + } else if ((0, _definition.isInterfaceType)(oldType) && (0, _definition.isInterfaceType)(newType)) { + schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType)); + } else if (oldType.constructor !== newType.constructor) { + schemaChanges.push({ + type: BreakingChangeType.TYPE_CHANGED_KIND, + description: `${oldType.name} changed from ` + `${typeKindName(oldType)} to ${typeKindName(newType)}.` + }); + } } -})); -Object.defineProperty(exports, "useCallbackRef", ({ - enumerable: true, - get: function () { - return _useRef.useCallbackRef; + return schemaChanges; +} +function findInputObjectTypeChanges(oldType, newType) { + const schemaChanges = []; + const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields())); + for (const newField of fieldsDiff.added) { + if ((0, _definition.isRequiredInputField)(newField)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED, + description: `A required field ${newField.name} on input type ${oldType.name} was added.` + }); + } else { + schemaChanges.push({ + type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED, + description: `An optional field ${newField.name} on input type ${oldType.name} was added.` + }); + } } -})); -Object.defineProperty(exports, "useMergeRefs", ({ - enumerable: true, - get: function () { - return _useMergeRef.useMergeRefs; + for (const oldField of fieldsDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_REMOVED, + description: `${oldType.name}.${oldField.name} was removed.` + }); } -})); -Object.defineProperty(exports, "useRefToCallback", ({ - enumerable: true, - get: function () { - return _refToCallback.useRefToCallback; + for (const [oldField, newField] of fieldsDiff.persisted) { + const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldField.type, newField.type); + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_CHANGED_KIND, + description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.` + }); + } } -})); -Object.defineProperty(exports, "useTransformRef", ({ - enumerable: true, - get: function () { - return _useTransformRef.useTransformRef; + return schemaChanges; +} +function findUnionTypeChanges(oldType, newType) { + const schemaChanges = []; + const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes()); + for (const newPossibleType of possibleTypesDiff.added) { + schemaChanges.push({ + type: DangerousChangeType.TYPE_ADDED_TO_UNION, + description: `${newPossibleType.name} was added to union type ${oldType.name}.` + }); } -})); -var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); -var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); -var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); -var _mergeRef = __webpack_require__(/*! ./mergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js"); -var _useMergeRef = __webpack_require__(/*! ./useMergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js"); -var _useTransformRef = __webpack_require__(/*! ./useTransformRef */ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js"); -var _transformRef = __webpack_require__(/*! ./transformRef */ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js"); -var _refToCallback = __webpack_require__(/*! ./refToCallback */ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js"); - -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js": -/*!**********************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js ***! - \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.mergeRefs = mergeRefs; -var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); -var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); -/** - * Merges two or more refs together providing a single interface to set their value - * @param {RefObject|Ref} refs - * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} - * - * @see {@link useMergeRefs} to be used in ReactComponents - * @example - * const Component = React.forwardRef((props, ref) => { - * const ownRef = useRef(); - * const domRef = mergeRefs([ref, ownRef]); // 👈 merge together - * return
...
- * } - */ -function mergeRefs(refs) { - return (0, _createRef.createCallbackRef)(function (newValue) { - return refs.forEach(function (ref) { - return (0, _assignRef.assignRef)(ref, newValue); + for (const oldPossibleType of possibleTypesDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.TYPE_REMOVED_FROM_UNION, + description: `${oldPossibleType.name} was removed from union type ${oldType.name}.` }); - }); + } + return schemaChanges; } - -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js": -/*!***************************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js ***! - \***************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.refToCallback = refToCallback; -exports.useRefToCallback = useRefToCallback; -/** - * Unmemoized version of {@link useRefToCallback} - * @see {@link useRefToCallback} - * @param ref - */ -function refToCallback(ref) { - return function (newValue) { - if (typeof ref === 'function') { - ref(newValue); - } else if (ref) { - ref.current = newValue; +function findEnumTypeChanges(oldType, newType) { + const schemaChanges = []; + const valuesDiff = diff(oldType.getValues(), newType.getValues()); + for (const newValue of valuesDiff.added) { + schemaChanges.push({ + type: DangerousChangeType.VALUE_ADDED_TO_ENUM, + description: `${newValue.name} was added to enum type ${oldType.name}.` + }); + } + for (const oldValue of valuesDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM, + description: `${oldValue.name} was removed from enum type ${oldType.name}.` + }); + } + return schemaChanges; +} +function findImplementedInterfacesChanges(oldType, newType) { + const schemaChanges = []; + const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces()); + for (const newInterface of interfacesDiff.added) { + schemaChanges.push({ + type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED, + description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.` + }); + } + for (const oldInterface of interfacesDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED, + description: `${oldType.name} no longer implements interface ${oldInterface.name}.` + }); + } + return schemaChanges; +} +function findFieldChanges(oldType, newType) { + const schemaChanges = []; + const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields())); + for (const oldField of fieldsDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_REMOVED, + description: `${oldType.name}.${oldField.name} was removed.` + }); + } + for (const [oldField, newField] of fieldsDiff.persisted) { + schemaChanges.push(...findArgChanges(oldType, oldField, newField)); + const isSafe = isChangeSafeForObjectOrInterfaceField(oldField.type, newField.type); + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_CHANGED_KIND, + description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.` + }); } - }; + } + return schemaChanges; } -var nullCallback = function () { - return null; -}; -// lets maintain a weak ref to, well, ref :) -// not using `kashe` to keep this package small -var weakMem = new WeakMap(); -var weakMemoize = function (ref) { - var usedRef = ref || nullCallback; - var storedRef = weakMem.get(usedRef); - if (storedRef) { - return storedRef; +function findArgChanges(oldType, oldField, newField) { + const schemaChanges = []; + const argsDiff = diff(oldField.args, newField.args); + for (const oldArg of argsDiff.removed) { + schemaChanges.push({ + type: BreakingChangeType.ARG_REMOVED, + description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.` + }); } - var cb = refToCallback(usedRef); - weakMem.set(usedRef, cb); - return cb; -}; -/** - * Transforms a given `ref` into `callback`. - * - * To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)} - * - * @param {ReactRef} ref - * @returns {Function} - * - * @see https://github.com/theKashey/use-callback-ref#reftocallback - * - * @example - * const ref = useRef(0); - * const setRef = useRefToCallback(ref); - * 👉 setRef(10); - * ✅ ref.current === 10 - */ -function useRefToCallback(ref) { - return weakMemoize(ref); + for (const [oldArg, newArg] of argsDiff.persisted) { + const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArg.type, newArg.type); + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.ARG_CHANGED_KIND, + description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` + `${String(oldArg.type)} to ${String(newArg.type)}.` + }); + } else if (oldArg.defaultValue !== undefined) { + if (newArg.defaultValue === undefined) { + schemaChanges.push({ + type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, + description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.` + }); + } else { + // Since we looking only for client's observable changes we should + // compare default values in the same representation as they are + // represented inside introspection. + const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type); + const newValueStr = stringifyValue(newArg.defaultValue, newArg.type); + if (oldValueStr !== newValueStr) { + schemaChanges.push({ + type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, + description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.` + }); + } + } + } + } + for (const newArg of argsDiff.added) { + if ((0, _definition.isRequiredArgument)(newArg)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_ARG_ADDED, + description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.` + }); + } else { + schemaChanges.push({ + type: DangerousChangeType.OPTIONAL_ARG_ADDED, + description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.` + }); + } + } + return schemaChanges; } +function isChangeSafeForObjectOrInterfaceField(oldType, newType) { + if ((0, _definition.isListType)(oldType)) { + return ( + // if they're both lists, make sure the underlying types are compatible + (0, _definition.isListType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) || + // moving from nullable to non-null of the same underlying type is safe + (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) + ); + } + if ((0, _definition.isNonNullType)(oldType)) { + // if they're both non-null, make sure the underlying types are compatible + return (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType); + } + return ( + // if they're both named types, see if their names are equivalent + (0, _definition.isNamedType)(newType) && oldType.name === newType.name || + // moving from nullable to non-null of the same underlying type is safe + (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) + ); +} +function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) { + if ((0, _definition.isListType)(oldType)) { + // if they're both lists, make sure the underlying types are compatible + return (0, _definition.isListType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType); + } + if ((0, _definition.isNonNullType)(oldType)) { + return ( + // if they're both non-null, make sure the underlying types are + // compatible + (0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) || + // moving from non-null to nullable of the same underlying type is safe + !(0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType) + ); + } // if they're both named types, see if their names are equivalent -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js": -/*!**************************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/transformRef.js ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - + return (0, _definition.isNamedType)(newType) && oldType.name === newType.name; +} +function typeKindName(type) { + if ((0, _definition.isScalarType)(type)) { + return 'a Scalar type'; + } + if ((0, _definition.isObjectType)(type)) { + return 'an Object type'; + } + if ((0, _definition.isInterfaceType)(type)) { + return 'an Interface type'; + } + if ((0, _definition.isUnionType)(type)) { + return 'a Union type'; + } + if ((0, _definition.isEnumType)(type)) { + return 'an Enum type'; + } + if ((0, _definition.isInputObjectType)(type)) { + return 'an Input type'; + } + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.transformRef = transformRef; -var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); -var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); -/** - * Transforms one ref to another - * @example - * ```tsx - * const ResizableWithRef = forwardRef((props, ref) => - * i ? i.resizable : null)}/> - * ); - * ``` - */ -function transformRef(ref, transformer) { - return (0, _createRef.createCallbackRef)(function (value) { - return (0, _assignRef.assignRef)(ref, transformer(value)); - }); + false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); +} +function stringifyValue(value, type) { + const ast = (0, _astFromValue.astFromValue)(value, type); + ast != null || (0, _invariant.invariant)(false); + return (0, _printer.print)((0, _sortValueNode.sortValueNode)(ast)); +} +function diff(oldArray, newArray) { + const added = []; + const removed = []; + const persisted = []; + const oldMap = (0, _keyMap.keyMap)(oldArray, ({ + name + }) => name); + const newMap = (0, _keyMap.keyMap)(newArray, ({ + name + }) => name); + for (const oldItem of oldArray) { + const newItem = newMap[oldItem.name]; + if (newItem === undefined) { + removed.push(oldItem); + } else { + persisted.push([oldItem, newItem]); + } + } + for (const newItem of newArray) { + if (oldMap[newItem.name] === undefined) { + added.push(newItem); + } + } + return { + added, + persisted, + removed + }; } /***/ }), -/***/ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js": +/***/ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs": /*!*************************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js ***! + !*** ../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs ***! \*************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.useMergeRefs = useMergeRefs; -var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); -var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); +exports.getIntrospectionQuery = getIntrospectionQuery; /** - * Merges two or more refs together providing a single interface to set their value - * @param {RefObject|Ref} refs - * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} - * - * @see {@link mergeRefs} a version without buit-in memoization - * @see https://github.com/theKashey/use-callback-ref#usemergerefs - * @example - * const Component = React.forwardRef((props, ref) => { - * const ownRef = useRef(); - * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together - * return
...
- * } + * Produce the GraphQL query recommended for a full schema introspection. + * Accepts optional IntrospectionOptions. */ -function useMergeRefs(refs, defaultValue) { - return (0, _useRef.useCallbackRef)(defaultValue || null, function (newValue) { - return refs.forEach(function (ref) { - return (0, _assignRef.assignRef)(ref, newValue); - }); - }); -} - -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js": -/*!********************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/useRef.js ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.useCallbackRef = useCallbackRef; -var _react = __webpack_require__(/*! react */ "react"); -/** - * creates a MutableRef with ref change callback - * @param initialValue - initial ref value - * @param {Function} callback - a callback to run when value changes - * - * @example - * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); - * ref.current = 1; - * // prints 0 -> 1 - * - * @see https://reactjs.org/docs/hooks-reference.html#useref - * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref - * @returns {MutableRefObject} - */ -function useCallbackRef(initialValue, callback) { - var ref = (0, _react.useState)(function () { - return { - // value - value: initialValue, - // last callback - callback: callback, - // "memoized" public interface - facade: { - get current() { - return ref.value; - }, - set current(value) { - var last = ref.value; - if (last !== value) { - ref.value = value; - ref.callback(value, last); +function getIntrospectionQuery(options) { + const optionsWithDefault = { + descriptions: true, + specifiedByUrl: false, + directiveIsRepeatable: false, + schemaDescription: false, + inputValueDeprecation: false, + oneOf: false, + ...options + }; + const descriptions = optionsWithDefault.descriptions ? 'description' : ''; + const specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByURL' : ''; + const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : ''; + const schemaDescription = optionsWithDefault.schemaDescription ? descriptions : ''; + function inputDeprecation(str) { + return optionsWithDefault.inputValueDeprecation ? str : ''; + } + const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : ''; + return ` + query IntrospectionQuery { + __schema { + ${schemaDescription} + queryType { name } + mutationType { name } + subscriptionType { name } + types { + ...FullType + } + directives { + name + ${descriptions} + ${directiveIsRepeatable} + locations + args${inputDeprecation('(includeDeprecated: true)')} { + ...InputValue } } } - }; - })[0]; - // update callback - ref.callback = callback; - return ref.facade; -} - -/***/ }), - -/***/ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js": -/*!*****************************************************************************!*\ - !*** ../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js ***! - \*****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + } + fragment FullType on __Type { + kind + name + ${descriptions} + ${specifiedByUrl} + ${oneOf} + fields(includeDeprecated: true) { + name + ${descriptions} + args${inputDeprecation('(includeDeprecated: true)')} { + ...InputValue + } + type { + ...TypeRef + } + isDeprecated + deprecationReason + } + inputFields${inputDeprecation('(includeDeprecated: true)')} { + ...InputValue + } + interfaces { + ...TypeRef + } + enumValues(includeDeprecated: true) { + name + ${descriptions} + isDeprecated + deprecationReason + } + possibleTypes { + ...TypeRef + } + } + fragment InputValue on __InputValue { + name + ${descriptions} + type { ...TypeRef } + defaultValue + ${inputDeprecation('isDeprecated')} + ${inputDeprecation('deprecationReason')} + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.useTransformRef = useTransformRef; -var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); -var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); -/** - * Create a _lense_ on Ref, making it possible to transform ref value - * @param {ReactRef} ref - * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update. - * @returns {RefObject} - * - * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle - * @example - * - * const ResizableWithRef = forwardRef((props, ref) => - * i ? i.resizable : null)}/> - * ); - */ -function useTransformRef(ref, transformer) { - return (0, _useRef.useCallbackRef)(null, function (value) { - return (0, _assignRef.assignRef)(ref, transformer(value)); - }); + fragment TypeRef on __Type { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + } + } + } + } + } + } + } + } + } + } + `; } /***/ }), -/***/ "../../../node_modules/use-sidecar/dist/es2015/config.js": -/*!***************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/config.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.setConfig = exports.config = void 0; -var config = { - onError: function (e) { - return console.error(e); - } -}; -exports.config = config; -var setConfig = function (conf) { - Object.assign(config, conf); -}; -exports.setConfig = setConfig; - -/***/ }), - -/***/ "../../../node_modules/use-sidecar/dist/es2015/env.js": -/*!************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/env.js ***! - \************************************************************/ +/***/ "../../../node_modules/graphql/utilities/getOperationAST.mjs": +/*!*******************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/getOperationAST.mjs ***! + \*******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.env = void 0; -var _detectNodeEs = __webpack_require__(/*! detect-node-es */ "../../../node_modules/detect-node-es/esm/browser.js"); -var env = { - isNode: _detectNodeEs.isNode, - forceCache: false -}; -exports.env = env; - -/***/ }), - -/***/ "../../../node_modules/use-sidecar/dist/es2015/exports.js": -/*!****************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/exports.js ***! - \****************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - +exports.getOperationAST = getOperationAST; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +/** + * Returns an operation AST given a document AST and optionally an operation + * name. If a name is not provided, an operation is only returned if only one is + * provided in the document. + */ -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.exportSidecar = exportSidecar; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var SideCar = function (_a) { - var sideCar = _a.sideCar, - rest = (0, _tslib.__rest)(_a, ["sideCar"]); - if (!sideCar) { - throw new Error('Sidecar: please provide `sideCar` property to import the right car'); - } - var Target = sideCar.read(); - if (!Target) { - throw new Error('Sidecar medium not found'); +function getOperationAST(documentAST, operationName) { + let operation = null; + for (const definition of documentAST.definitions) { + if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) { + var _definition$name; + if (operationName == null) { + // If no operation name was provided, only return an Operation if there + // is one defined in the document. Upon encountering the second, return + // null. + if (operation) { + return null; + } + operation = definition; + } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { + return definition; + } + } } - return /*#__PURE__*/React.createElement(Target, (0, _tslib.__assign)({}, rest)); -}; -SideCar.isSideCarExport = true; -function exportSidecar(medium, exported) { - medium.useMedium(exported); - return SideCar; + return operation; } /***/ }), -/***/ "../../../node_modules/use-sidecar/dist/es2015/hoc.js": -/*!************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/hoc.js ***! - \************************************************************/ +/***/ "../../../node_modules/graphql/utilities/getOperationRootType.mjs": +/*!************************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/getOperationRootType.mjs ***! + \************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sidecar = sidecar; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -// eslint-disable-next-line @typescript-eslint/ban-types -function sidecar(importer, errorComponent) { - var ErrorCase = function () { - return errorComponent; - }; - return function Sidecar(props) { - var _a = (0, _hook.useSidecar)(importer, props.sideCar), - Car = _a[0], - error = _a[1]; - if (error && errorComponent) { - return ErrorCase; +exports.getOperationRootType = getOperationRootType; +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Extracts the root type of the operation from the schema. + * + * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17 + */ +function getOperationRootType(schema, operation) { + if (operation.operation === 'query') { + const queryType = schema.getQueryType(); + if (!queryType) { + throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', { + nodes: operation + }); } - // @ts-expect-error type shenanigans - return Car ? /*#__PURE__*/React.createElement(Car, (0, _tslib.__assign)({}, props)) : null; - }; -} - -/***/ }), - -/***/ "../../../node_modules/use-sidecar/dist/es2015/hook.js": -/*!*************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/hook.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.useSidecar = useSidecar; -var _react = __webpack_require__(/*! react */ "react"); -var _env = __webpack_require__(/*! ./env */ "../../../node_modules/use-sidecar/dist/es2015/env.js"); -var cache = new WeakMap(); -var NO_OPTIONS = {}; -function useSidecar(importer, effect) { - var options = effect && effect.options || NO_OPTIONS; - if (_env.env.isNode && !options.ssr) { - return [null, null]; + return queryType; } - // eslint-disable-next-line react-hooks/rules-of-hooks - return useRealSidecar(importer, effect); -} -function useRealSidecar(importer, effect) { - var options = effect && effect.options || NO_OPTIONS; - var couldUseCache = _env.env.forceCache || _env.env.isNode && !!options.ssr || !options.async; - var _a = (0, _react.useState)(couldUseCache ? function () { - return cache.get(importer); - } : undefined), - Car = _a[0], - setCar = _a[1]; - var _b = (0, _react.useState)(null), - error = _b[0], - setError = _b[1]; - (0, _react.useEffect)(function () { - if (!Car) { - importer().then(function (car) { - var resolved = effect ? effect.read() : car.default || car; - if (!resolved) { - console.error('Sidecar error: with importer', importer); - var error_1; - if (effect) { - console.error('Sidecar error: with medium', effect); - error_1 = new Error('Sidecar medium was not found'); - } else { - error_1 = new Error('Sidecar was not found in exports'); - } - setError(function () { - return error_1; - }); - throw error_1; - } - cache.set(importer, resolved); - setCar(function () { - return resolved; - }); - }, function (e) { - return setError(function () { - return e; - }); + if (operation.operation === 'mutation') { + const mutationType = schema.getMutationType(); + if (!mutationType) { + throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', { + nodes: operation }); } - }, []); - return [Car, error]; + return mutationType; + } + if (operation.operation === 'subscription') { + const subscriptionType = schema.getSubscriptionType(); + if (!subscriptionType) { + throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', { + nodes: operation + }); + } + return subscriptionType; + } + throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', { + nodes: operation + }); } /***/ }), -/***/ "../../../node_modules/use-sidecar/dist/es2015/index.js": -/*!**************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/index.js ***! - \**************************************************************/ +/***/ "../../../node_modules/graphql/utilities/index.mjs": +/*!*********************************************************!*\ + !*** ../../../node_modules/graphql/utilities/index.mjs ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -Object.defineProperty(exports, "createMedium", ({ +Object.defineProperty(exports, "BreakingChangeType", ({ enumerable: true, get: function () { - return _medium.createMedium; + return _findBreakingChanges.BreakingChangeType; } })); -Object.defineProperty(exports, "createSidecarMedium", ({ +Object.defineProperty(exports, "DangerousChangeType", ({ enumerable: true, get: function () { - return _medium.createSidecarMedium; + return _findBreakingChanges.DangerousChangeType; } })); -Object.defineProperty(exports, "exportSidecar", ({ +Object.defineProperty(exports, "TypeInfo", ({ enumerable: true, get: function () { - return _exports.exportSidecar; + return _TypeInfo.TypeInfo; } })); -Object.defineProperty(exports, "renderCar", ({ +Object.defineProperty(exports, "assertValidName", ({ enumerable: true, get: function () { - return _renderProp.renderCar; + return _assertValidName.assertValidName; } })); -Object.defineProperty(exports, "setConfig", ({ +Object.defineProperty(exports, "astFromValue", ({ enumerable: true, get: function () { - return _config.setConfig; + return _astFromValue.astFromValue; } })); -Object.defineProperty(exports, "sidecar", ({ +Object.defineProperty(exports, "buildASTSchema", ({ enumerable: true, get: function () { - return _hoc.sidecar; + return _buildASTSchema.buildASTSchema; } })); -Object.defineProperty(exports, "useSidecar", ({ +Object.defineProperty(exports, "buildClientSchema", ({ enumerable: true, get: function () { - return _hook.useSidecar; + return _buildClientSchema.buildClientSchema; } })); -var _hoc = __webpack_require__(/*! ./hoc */ "../../../node_modules/use-sidecar/dist/es2015/hoc.js"); -var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js"); -var _config = __webpack_require__(/*! ./config */ "../../../node_modules/use-sidecar/dist/es2015/config.js"); -var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/use-sidecar/dist/es2015/medium.js"); -var _renderProp = __webpack_require__(/*! ./renderProp */ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js"); -var _exports = __webpack_require__(/*! ./exports */ "../../../node_modules/use-sidecar/dist/es2015/exports.js"); - -/***/ }), - -/***/ "../../../node_modules/use-sidecar/dist/es2015/medium.js": -/*!***************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/medium.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true +Object.defineProperty(exports, "buildSchema", ({ + enumerable: true, + get: function () { + return _buildASTSchema.buildSchema; + } })); -exports.createMedium = createMedium; -exports.createSidecarMedium = createSidecarMedium; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -function ItoI(a) { - return a; -} -function innerCreateMedium(defaults, middleware) { - if (middleware === void 0) { - middleware = ItoI; +Object.defineProperty(exports, "coerceInputValue", ({ + enumerable: true, + get: function () { + return _coerceInputValue.coerceInputValue; } - var buffer = []; - var assigned = false; - var medium = { - read: function () { - if (assigned) { - throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.'); - } - if (buffer.length) { - return buffer[buffer.length - 1]; - } - return defaults; - }, - useMedium: function (data) { - var item = middleware(data, assigned); - buffer.push(item); - return function () { - buffer = buffer.filter(function (x) { - return x !== item; - }); - }; - }, - assignSyncMedium: function (cb) { - assigned = true; - while (buffer.length) { - var cbs = buffer; - buffer = []; - cbs.forEach(cb); - } - buffer = { - push: function (x) { - return cb(x); - }, - filter: function () { - return buffer; - } - }; - }, - assignMedium: function (cb) { - assigned = true; - var pendingQueue = []; - if (buffer.length) { - var cbs = buffer; - buffer = []; - cbs.forEach(cb); - pendingQueue = buffer; - } - var executeQueue = function () { - var cbs = pendingQueue; - pendingQueue = []; - cbs.forEach(cb); - }; - var cycle = function () { - return Promise.resolve().then(executeQueue); - }; - cycle(); - buffer = { - push: function (x) { - pendingQueue.push(x); - cycle(); - }, - filter: function (filter) { - pendingQueue = pendingQueue.filter(filter); - return buffer; - } - }; - } - }; - return medium; -} -function createMedium(defaults, middleware) { - if (middleware === void 0) { - middleware = ItoI; +})); +Object.defineProperty(exports, "concatAST", ({ + enumerable: true, + get: function () { + return _concatAST.concatAST; } - return innerCreateMedium(defaults, middleware); -} -// eslint-disable-next-line @typescript-eslint/ban-types -function createSidecarMedium(options) { - if (options === void 0) { - options = {}; +})); +Object.defineProperty(exports, "doTypesOverlap", ({ + enumerable: true, + get: function () { + return _typeComparators.doTypesOverlap; } - var medium = innerCreateMedium(null); - medium.options = (0, _tslib.__assign)({ - async: true, - ssr: false - }, options); - return medium; -} +})); +Object.defineProperty(exports, "extendSchema", ({ + enumerable: true, + get: function () { + return _extendSchema.extendSchema; + } +})); +Object.defineProperty(exports, "findBreakingChanges", ({ + enumerable: true, + get: function () { + return _findBreakingChanges.findBreakingChanges; + } +})); +Object.defineProperty(exports, "findDangerousChanges", ({ + enumerable: true, + get: function () { + return _findBreakingChanges.findDangerousChanges; + } +})); +Object.defineProperty(exports, "getIntrospectionQuery", ({ + enumerable: true, + get: function () { + return _getIntrospectionQuery.getIntrospectionQuery; + } +})); +Object.defineProperty(exports, "getOperationAST", ({ + enumerable: true, + get: function () { + return _getOperationAST.getOperationAST; + } +})); +Object.defineProperty(exports, "getOperationRootType", ({ + enumerable: true, + get: function () { + return _getOperationRootType.getOperationRootType; + } +})); +Object.defineProperty(exports, "introspectionFromSchema", ({ + enumerable: true, + get: function () { + return _introspectionFromSchema.introspectionFromSchema; + } +})); +Object.defineProperty(exports, "isEqualType", ({ + enumerable: true, + get: function () { + return _typeComparators.isEqualType; + } +})); +Object.defineProperty(exports, "isTypeSubTypeOf", ({ + enumerable: true, + get: function () { + return _typeComparators.isTypeSubTypeOf; + } +})); +Object.defineProperty(exports, "isValidNameError", ({ + enumerable: true, + get: function () { + return _assertValidName.isValidNameError; + } +})); +Object.defineProperty(exports, "lexicographicSortSchema", ({ + enumerable: true, + get: function () { + return _lexicographicSortSchema.lexicographicSortSchema; + } +})); +Object.defineProperty(exports, "printIntrospectionSchema", ({ + enumerable: true, + get: function () { + return _printSchema.printIntrospectionSchema; + } +})); +Object.defineProperty(exports, "printSchema", ({ + enumerable: true, + get: function () { + return _printSchema.printSchema; + } +})); +Object.defineProperty(exports, "printType", ({ + enumerable: true, + get: function () { + return _printSchema.printType; + } +})); +Object.defineProperty(exports, "separateOperations", ({ + enumerable: true, + get: function () { + return _separateOperations.separateOperations; + } +})); +Object.defineProperty(exports, "stripIgnoredCharacters", ({ + enumerable: true, + get: function () { + return _stripIgnoredCharacters.stripIgnoredCharacters; + } +})); +Object.defineProperty(exports, "typeFromAST", ({ + enumerable: true, + get: function () { + return _typeFromAST.typeFromAST; + } +})); +Object.defineProperty(exports, "valueFromAST", ({ + enumerable: true, + get: function () { + return _valueFromAST.valueFromAST; + } +})); +Object.defineProperty(exports, "valueFromASTUntyped", ({ + enumerable: true, + get: function () { + return _valueFromASTUntyped.valueFromASTUntyped; + } +})); +Object.defineProperty(exports, "visitWithTypeInfo", ({ + enumerable: true, + get: function () { + return _TypeInfo.visitWithTypeInfo; + } +})); +var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs"); +var _getOperationAST = __webpack_require__(/*! ./getOperationAST.mjs */ "../../../node_modules/graphql/utilities/getOperationAST.mjs"); +var _getOperationRootType = __webpack_require__(/*! ./getOperationRootType.mjs */ "../../../node_modules/graphql/utilities/getOperationRootType.mjs"); +var _introspectionFromSchema = __webpack_require__(/*! ./introspectionFromSchema.mjs */ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs"); +var _buildClientSchema = __webpack_require__(/*! ./buildClientSchema.mjs */ "../../../node_modules/graphql/utilities/buildClientSchema.mjs"); +var _buildASTSchema = __webpack_require__(/*! ./buildASTSchema.mjs */ "../../../node_modules/graphql/utilities/buildASTSchema.mjs"); +var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs"); +var _lexicographicSortSchema = __webpack_require__(/*! ./lexicographicSortSchema.mjs */ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs"); +var _printSchema = __webpack_require__(/*! ./printSchema.mjs */ "../../../node_modules/graphql/utilities/printSchema.mjs"); +var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs"); +var _valueFromASTUntyped = __webpack_require__(/*! ./valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs"); +var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); +var _TypeInfo = __webpack_require__(/*! ./TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); +var _coerceInputValue = __webpack_require__(/*! ./coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs"); +var _concatAST = __webpack_require__(/*! ./concatAST.mjs */ "../../../node_modules/graphql/utilities/concatAST.mjs"); +var _separateOperations = __webpack_require__(/*! ./separateOperations.mjs */ "../../../node_modules/graphql/utilities/separateOperations.mjs"); +var _stripIgnoredCharacters = __webpack_require__(/*! ./stripIgnoredCharacters.mjs */ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs"); +var _typeComparators = __webpack_require__(/*! ./typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); +var _assertValidName = __webpack_require__(/*! ./assertValidName.mjs */ "../../../node_modules/graphql/utilities/assertValidName.mjs"); +var _findBreakingChanges = __webpack_require__(/*! ./findBreakingChanges.mjs */ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs"); /***/ }), -/***/ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js": -/*!*******************************************************************!*\ - !*** ../../../node_modules/use-sidecar/dist/es2015/renderProp.js ***! - \*******************************************************************/ +/***/ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs": +/*!***************************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/introspectionFromSchema.mjs ***! + \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.renderCar = renderCar; -var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js"); -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -function renderCar(WrappedComponent, defaults) { - function State(_a) { - var stateRef = _a.stateRef, - props = _a.props; - var renderTarget = (0, React.useCallback)(function SideTarget() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - (0, React.useLayoutEffect)(function () { - stateRef.current(args); - }); - return null; - }, []); - // @ts-ignore - return /*#__PURE__*/React.createElement(WrappedComponent, (0, _tslib.__assign)({}, props, { - children: renderTarget - })); - } - var Children = /*#__PURE__*/React.memo(function (_a) { - var stateRef = _a.stateRef, - defaultState = _a.defaultState, - children = _a.children; - var _b = (0, React.useState)(defaultState.current), - state = _b[0], - setState = _b[1]; - (0, React.useEffect)(function () { - stateRef.current = setState; - }, []); - return children.apply(void 0, state); - }, function () { - return true; - }); - return function Combiner(props) { - var defaultState = React.useRef(defaults(props)); - var ref = React.useRef(function (state) { - return defaultState.current = state; - }); - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(State, { - stateRef: ref, - props: props - }), /*#__PURE__*/React.createElement(Children, { - stateRef: ref, - defaultState: defaultState, - children: props.children - })); +exports.introspectionFromSchema = introspectionFromSchema; +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs"); +var _execute = __webpack_require__(/*! ../execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs"); +var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs"); +/** + * Build an IntrospectionQuery from a GraphQLSchema + * + * IntrospectionQuery is useful for utilities that care about type and field + * relationships, but do not need to traverse through those relationships. + * + * This is the inverse of buildClientSchema. The primary use case is outside + * of the server context, for instance when doing schema comparisons. + */ + +function introspectionFromSchema(schema, options) { + const optionsWithDefaults = { + specifiedByUrl: true, + directiveIsRepeatable: true, + schemaDescription: true, + inputValueDeprecation: true, + oneOf: true, + ...options }; + const document = (0, _parser.parse)((0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults)); + const result = (0, _execute.executeSync)({ + schema, + document + }); + !result.errors && result.data || (0, _invariant.invariant)(false); + return result.data; } /***/ }), -/***/ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js": -/*!*************************************************************************!*\ - !*** ../../../node_modules/vscode-languageserver-types/lib/esm/main.js ***! - \*************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs": +/*!***************************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs ***! + \***************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -/* -------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * ------------------------------------------------------------------------------------------ */ +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uinteger = exports.integer = exports.WorkspaceSymbol = exports.WorkspaceFolder = exports.WorkspaceEdit = exports.WorkspaceChange = exports.VersionedTextDocumentIdentifier = exports.URI = exports.TextEdit = exports.TextDocumentItem = exports.TextDocumentIdentifier = exports.TextDocumentEdit = exports.TextDocument = exports.SymbolTag = exports.SymbolKind = exports.SymbolInformation = exports.SignatureInformation = exports.SemanticTokens = exports.SemanticTokenTypes = exports.SemanticTokenModifiers = exports.SelectionRange = exports.RenameFile = exports.Range = exports.Position = exports.ParameterInformation = exports.OptionalVersionedTextDocumentIdentifier = exports.MarkupKind = exports.MarkupContent = exports.MarkedString = exports.LocationLink = exports.Location = exports.InsertTextMode = exports.InsertTextFormat = exports.InsertReplaceEdit = exports.InlineValueVariableLookup = exports.InlineValueText = exports.InlineValueEvaluatableExpression = exports.InlineValueContext = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlayHint = exports.Hover = exports.FormattingOptions = exports.FoldingRangeKind = exports.FoldingRange = exports.EOL = exports.DocumentUri = exports.DocumentSymbol = exports.DocumentLink = exports.DocumentHighlightKind = exports.DocumentHighlight = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.Diagnostic = exports.DeleteFile = exports.CreateFile = exports.CompletionList = exports.CompletionItemTag = exports.CompletionItemLabelDetails = exports.CompletionItemKind = exports.CompletionItem = exports.Command = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.CodeLens = exports.CodeDescription = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.CodeActionContext = exports.CodeAction = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.AnnotatedTextEdit = void 0; -var DocumentUri; -exports.DocumentUri = DocumentUri; -(function (DocumentUri) { - function is(value) { - return typeof value === 'string'; - } - DocumentUri.is = is; -})(DocumentUri || (exports.DocumentUri = DocumentUri = {})); -var URI; -exports.URI = URI; -(function (URI) { - function is(value) { - return typeof value === 'string'; - } - URI.is = is; -})(URI || (exports.URI = URI = {})); -var integer; -exports.integer = integer; -(function (integer) { - integer.MIN_VALUE = -2147483648; - integer.MAX_VALUE = 2147483647; - function is(value) { - return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; - } - integer.is = is; -})(integer || (exports.integer = integer = {})); -var uinteger; -exports.uinteger = uinteger; -(function (uinteger) { - uinteger.MIN_VALUE = 0; - uinteger.MAX_VALUE = 2147483647; - function is(value) { - return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; - } - uinteger.is = is; -})(uinteger || (exports.uinteger = uinteger = {})); -/** - * The Position namespace provides helper functions to work with - * [Position](#Position) literals. - */ -var Position; -exports.Position = Position; -(function (Position) { - /** - * Creates a new Position literal from the given line and character. - * @param line The position's line. - * @param character The position's character. - */ - function create(line, character) { - if (line === Number.MAX_VALUE) { - line = uinteger.MAX_VALUE; - } - if (character === Number.MAX_VALUE) { - character = uinteger.MAX_VALUE; - } - return { - line: line, - character: character - }; - } - Position.create = create; - /** - * Checks whether the given literal conforms to the [Position](#Position) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); - } - Position.is = is; -})(Position || (exports.Position = Position = {})); +exports.lexicographicSortSchema = lexicographicSortSchema; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); +var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs"); /** - * The Range namespace provides helper functions to work with - * [Range](#Range) literals. + * Sort GraphQLSchema. + * + * This function returns a sorted copy of the given GraphQLSchema. */ -var Range; -exports.Range = Range; -(function (Range) { - function create(one, two, three, four) { - if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { - return { - start: Position.create(one, two), - end: Position.create(three, four) - }; - } else if (Position.is(one) && Position.is(two)) { - return { - start: one, - end: two - }; - } else { - throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); - } + +function lexicographicSortSchema(schema) { + const schemaConfig = schema.toConfig(); + const typeMap = (0, _keyValMap.keyValMap)(sortByName(schemaConfig.types), type => type.name, sortNamedType); + return new _schema.GraphQLSchema({ + ...schemaConfig, + types: Object.values(typeMap), + directives: sortByName(schemaConfig.directives).map(sortDirective), + query: replaceMaybeType(schemaConfig.query), + mutation: replaceMaybeType(schemaConfig.mutation), + subscription: replaceMaybeType(schemaConfig.subscription) + }); + function replaceType(type) { + if ((0, _definition.isListType)(type)) { + // @ts-expect-error + return new _definition.GraphQLList(replaceType(type.ofType)); + } else if ((0, _definition.isNonNullType)(type)) { + // @ts-expect-error + return new _definition.GraphQLNonNull(replaceType(type.ofType)); + } // @ts-expect-error FIXME: TS Conversion + + return replaceNamedType(type); } - Range.create = create; - /** - * Checks whether the given literal conforms to the [Range](#Range) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + function replaceNamedType(type) { + return typeMap[type.name]; } - Range.is = is; -})(Range || (exports.Range = Range = {})); -/** - * The Location namespace provides helper functions to work with - * [Location](#Location) literals. - */ -var Location; -exports.Location = Location; -(function (Location) { - /** - * Creates a Location literal. - * @param uri The location's uri. - * @param range The location's range. - */ - function create(uri, range) { - return { - uri: uri, - range: range - }; + function replaceMaybeType(maybeType) { + return maybeType && replaceNamedType(maybeType); } - Location.create = create; - /** - * Checks whether the given literal conforms to the [Location](#Location) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + function sortDirective(directive) { + const config = directive.toConfig(); + return new _directives.GraphQLDirective({ + ...config, + locations: sortBy(config.locations, x => x), + args: sortArgs(config.args) + }); } - Location.is = is; -})(Location || (exports.Location = Location = {})); -/** - * The LocationLink namespace provides helper functions to work with - * [LocationLink](#LocationLink) literals. - */ -var LocationLink; -exports.LocationLink = LocationLink; -(function (LocationLink) { - /** - * Creates a LocationLink literal. - * @param targetUri The definition's uri. - * @param targetRange The full range of the definition. - * @param targetSelectionRange The span of the symbol definition at the target. - * @param originSelectionRange The span of the symbol being defined in the originating source file. - */ - function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { - return { - targetUri: targetUri, - targetRange: targetRange, - targetSelectionRange: targetSelectionRange, - originSelectionRange: originSelectionRange - }; + function sortArgs(args) { + return sortObjMap(args, arg => ({ + ...arg, + type: replaceType(arg.type) + })); } - LocationLink.create = create; - /** - * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range.is(candidate.targetSelectionRange) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + function sortFields(fieldsMap) { + return sortObjMap(fieldsMap, field => ({ + ...field, + type: replaceType(field.type), + args: field.args && sortArgs(field.args) + })); } - LocationLink.is = is; -})(LocationLink || (exports.LocationLink = LocationLink = {})); -/** - * The Color namespace provides helper functions to work with - * [Color](#Color) literals. - */ -var Color; -exports.Color = Color; -(function (Color) { - /** - * Creates a new Color literal. - */ - function create(red, green, blue, alpha) { - return { - red: red, - green: green, - blue: blue, - alpha: alpha - }; + function sortInputFields(fieldsMap) { + return sortObjMap(fieldsMap, field => ({ + ...field, + type: replaceType(field.type) + })); } - Color.create = create; - /** - * Checks whether the given literal conforms to the [Color](#Color) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1); + function sortTypes(array) { + return sortByName(array).map(replaceNamedType); } - Color.is = is; -})(Color || (exports.Color = Color = {})); -/** - * The ColorInformation namespace provides helper functions to work with - * [ColorInformation](#ColorInformation) literals. - */ -var ColorInformation; -exports.ColorInformation = ColorInformation; -(function (ColorInformation) { - /** - * Creates a new ColorInformation literal. - */ - function create(range, color) { - return { - range: range, - color: color - }; - } - ColorInformation.create = create; - /** - * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); - } - ColorInformation.is = is; -})(ColorInformation || (exports.ColorInformation = ColorInformation = {})); -/** - * The Color namespace provides helper functions to work with - * [ColorPresentation](#ColorPresentation) literals. - */ -var ColorPresentation; -exports.ColorPresentation = ColorPresentation; -(function (ColorPresentation) { - /** - * Creates a new ColorInformation literal. - */ - function create(label, textEdit, additionalTextEdits) { - return { - label: label, - textEdit: textEdit, - additionalTextEdits: additionalTextEdits - }; - } - ColorPresentation.create = create; - /** - * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); - } - ColorPresentation.is = is; -})(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {})); -/** - * A set of predefined range kinds. - */ -var FoldingRangeKind; -exports.FoldingRangeKind = FoldingRangeKind; -(function (FoldingRangeKind) { - /** - * Folding range for a comment - */ - FoldingRangeKind.Comment = 'comment'; - /** - * Folding range for a imports or includes - */ - FoldingRangeKind.Imports = 'imports'; - /** - * Folding range for a region (e.g. `#region`) - */ - FoldingRangeKind.Region = 'region'; -})(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {})); -/** - * The folding range namespace provides helper functions to work with - * [FoldingRange](#FoldingRange) literals. - */ -var FoldingRange; -exports.FoldingRange = FoldingRange; -(function (FoldingRange) { - /** - * Creates a new FoldingRange literal. - */ - function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { - var result = { - startLine: startLine, - endLine: endLine - }; - if (Is.defined(startCharacter)) { - result.startCharacter = startCharacter; + function sortNamedType(type) { + if ((0, _definition.isScalarType)(type) || (0, _introspection.isIntrospectionType)(type)) { + return type; } - if (Is.defined(endCharacter)) { - result.endCharacter = endCharacter; + if ((0, _definition.isObjectType)(type)) { + const config = type.toConfig(); + return new _definition.GraphQLObjectType({ + ...config, + interfaces: () => sortTypes(config.interfaces), + fields: () => sortFields(config.fields) + }); } - if (Is.defined(kind)) { - result.kind = kind; + if ((0, _definition.isInterfaceType)(type)) { + const config = type.toConfig(); + return new _definition.GraphQLInterfaceType({ + ...config, + interfaces: () => sortTypes(config.interfaces), + fields: () => sortFields(config.fields) + }); } - if (Is.defined(collapsedText)) { - result.collapsedText = collapsedText; + if ((0, _definition.isUnionType)(type)) { + const config = type.toConfig(); + return new _definition.GraphQLUnionType({ + ...config, + types: () => sortTypes(config.types) + }); } - return result; + if ((0, _definition.isEnumType)(type)) { + const config = type.toConfig(); + return new _definition.GraphQLEnumType({ + ...config, + values: sortObjMap(config.values, value => value) + }); + } + if ((0, _definition.isInputObjectType)(type)) { + const config = type.toConfig(); + return new _definition.GraphQLInputObjectType({ + ...config, + fields: () => sortInputFields(config.fields) + }); + } + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered. + + false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); } - FoldingRange.create = create; - /** - * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); +} +function sortObjMap(map, sortValueFn) { + const sortedMap = Object.create(null); + for (const key of Object.keys(map).sort(_naturalCompare.naturalCompare)) { + sortedMap[key] = sortValueFn(map[key]); } - FoldingRange.is = is; -})(FoldingRange || (exports.FoldingRange = FoldingRange = {})); -/** - * The DiagnosticRelatedInformation namespace provides helper functions to work with - * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals. - */ -var DiagnosticRelatedInformation; -exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation; -(function (DiagnosticRelatedInformation) { - /** - * Creates a new DiagnosticRelatedInformation literal. - */ - function create(location, message) { - return { - location: location, - message: message - }; + return sortedMap; +} +function sortByName(array) { + return sortBy(array, obj => obj.name); +} +function sortBy(array, mapToKey) { + return array.slice().sort((obj1, obj2) => { + const key1 = mapToKey(obj1); + const key2 = mapToKey(obj2); + return (0, _naturalCompare.naturalCompare)(key1, key2); + }); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/printSchema.mjs": +/*!***************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/printSchema.mjs ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.printIntrospectionSchema = printIntrospectionSchema; +exports.printSchema = printSchema; +exports.printType = printType; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs"); +function printSchema(schema) { + return printFilteredSchema(schema, n => !(0, _directives.isSpecifiedDirective)(n), isDefinedType); +} +function printIntrospectionSchema(schema) { + return printFilteredSchema(schema, _directives.isSpecifiedDirective, _introspection.isIntrospectionType); +} +function isDefinedType(type) { + return !(0, _scalars.isSpecifiedScalarType)(type) && !(0, _introspection.isIntrospectionType)(type); +} +function printFilteredSchema(schema, directiveFilter, typeFilter) { + const directives = schema.getDirectives().filter(directiveFilter); + const types = Object.values(schema.getTypeMap()).filter(typeFilter); + return [printSchemaDefinition(schema), ...directives.map(directive => printDirective(directive)), ...types.map(type => printType(type))].filter(Boolean).join('\n\n'); +} +function printSchemaDefinition(schema) { + if (schema.description == null && isSchemaOfCommonNames(schema)) { + return; } - DiagnosticRelatedInformation.create = create; - /** - * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + const operationTypes = []; + const queryType = schema.getQueryType(); + if (queryType) { + operationTypes.push(` query: ${queryType.name}`); } - DiagnosticRelatedInformation.is = is; -})(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {})); -/** - * The diagnostic's severity. - */ -var DiagnosticSeverity; -exports.DiagnosticSeverity = DiagnosticSeverity; -(function (DiagnosticSeverity) { - /** - * Reports an error. - */ - DiagnosticSeverity.Error = 1; - /** - * Reports a warning. - */ - DiagnosticSeverity.Warning = 2; - /** - * Reports an information. - */ - DiagnosticSeverity.Information = 3; - /** - * Reports a hint. - */ - DiagnosticSeverity.Hint = 4; -})(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {})); + const mutationType = schema.getMutationType(); + if (mutationType) { + operationTypes.push(` mutation: ${mutationType.name}`); + } + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType) { + operationTypes.push(` subscription: ${subscriptionType.name}`); + } + return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`; +} /** - * The diagnostic tags. + * GraphQL schema define root types for each type of operation. These types are + * the same as any other type and can be named in any manner, however there is + * a common naming convention: * - * @since 3.15.0 - */ -var DiagnosticTag; -exports.DiagnosticTag = DiagnosticTag; -(function (DiagnosticTag) { - /** - * Unused or unnecessary code. - * - * Clients are allowed to render diagnostics with this tag faded out instead of having - * an error squiggle. - */ - DiagnosticTag.Unnecessary = 1; - /** - * Deprecated or obsolete code. - * - * Clients are allowed to rendered diagnostics with this tag strike through. - */ - DiagnosticTag.Deprecated = 2; -})(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {})); -/** - * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * ```graphql + * schema { + * query: Query + * mutation: Mutation + * subscription: Subscription + * } + * ``` * - * @since 3.16.0 + * When using this naming convention, the schema description can be omitted. */ -var CodeDescription; -exports.CodeDescription = CodeDescription; -(function (CodeDescription) { - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.string(candidate.href); + +function isSchemaOfCommonNames(schema) { + const queryType = schema.getQueryType(); + if (queryType && queryType.name !== 'Query') { + return false; } - CodeDescription.is = is; -})(CodeDescription || (exports.CodeDescription = CodeDescription = {})); -/** - * The Diagnostic namespace provides helper functions to work with - * [Diagnostic](#Diagnostic) literals. - */ -var Diagnostic; -exports.Diagnostic = Diagnostic; -(function (Diagnostic) { - /** - * Creates a new Diagnostic literal. - */ - function create(range, message, severity, code, source, relatedInformation) { - var result = { - range: range, - message: message - }; - if (Is.defined(severity)) { - result.severity = severity; - } - if (Is.defined(code)) { - result.code = code; - } - if (Is.defined(source)) { - result.source = source; - } - if (Is.defined(relatedInformation)) { - result.relatedInformation = relatedInformation; - } - return result; + const mutationType = schema.getMutationType(); + if (mutationType && mutationType.name !== 'Mutation') { + return false; } - Diagnostic.create = create; - /** - * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. - */ - function is(value) { - var _a; - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType && subscriptionType.name !== 'Subscription') { + return false; } - Diagnostic.is = is; -})(Diagnostic || (exports.Diagnostic = Diagnostic = {})); -/** - * The Command namespace provides helper functions to work with - * [Command](#Command) literals. - */ -var Command; -exports.Command = Command; -(function (Command) { - /** - * Creates a new Command literal. - */ - function create(title, command) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var result = { - title: title, - command: command - }; - if (Is.defined(args) && args.length > 0) { - result.arguments = args; - } - return result; + return true; +} +function printType(type) { + if ((0, _definition.isScalarType)(type)) { + return printScalar(type); } - Command.create = create; - /** - * Checks whether the given literal conforms to the [Command](#Command) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + if ((0, _definition.isObjectType)(type)) { + return printObject(type); } - Command.is = is; -})(Command || (exports.Command = Command = {})); -/** - * The TextEdit namespace provides helper function to create replace, - * insert and delete edits more easily. - */ -var TextEdit; -exports.TextEdit = TextEdit; -(function (TextEdit) { - /** - * Creates a replace text edit. - * @param range The range of text to be replaced. - * @param newText The new text. - */ - function replace(range, newText) { - return { - range: range, - newText: newText - }; + if ((0, _definition.isInterfaceType)(type)) { + return printInterface(type); } - TextEdit.replace = replace; - /** - * Creates a insert text edit. - * @param position The position to insert the text at. - * @param newText The text to be inserted. - */ - function insert(position, newText) { - return { - range: { - start: position, - end: position - }, - newText: newText - }; + if ((0, _definition.isUnionType)(type)) { + return printUnion(type); } - TextEdit.insert = insert; - /** - * Creates a delete text edit. - * @param range The range of text to be deleted. - */ - function del(range) { - return { - range: range, - newText: '' - }; + if ((0, _definition.isEnumType)(type)) { + return printEnum(type); } - TextEdit.del = del; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range); + if ((0, _definition.isInputObjectType)(type)) { + return printInputObject(type); } - TextEdit.is = is; -})(TextEdit || (exports.TextEdit = TextEdit = {})); -var ChangeAnnotation; -exports.ChangeAnnotation = ChangeAnnotation; -(function (ChangeAnnotation) { - function create(label, needsConfirmation, description) { - var result = { - label: label - }; - if (needsConfirmation !== undefined) { - result.needsConfirmation = needsConfirmation; - } - if (description !== undefined) { - result.description = description; - } - return result; + /* c8 ignore next 3 */ + // Not reachable, all possible types have been considered. + + false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); +} +function printScalar(type) { + return printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type); +} +function printImplementedInterfaces(type) { + const interfaces = type.getInterfaces(); + return interfaces.length ? ' implements ' + interfaces.map(i => i.name).join(' & ') : ''; +} +function printObject(type) { + return printDescription(type) + `type ${type.name}` + printImplementedInterfaces(type) + printFields(type); +} +function printInterface(type) { + return printDescription(type) + `interface ${type.name}` + printImplementedInterfaces(type) + printFields(type); +} +function printUnion(type) { + const types = type.getTypes(); + const possibleTypes = types.length ? ' = ' + types.join(' | ') : ''; + return printDescription(type) + 'union ' + type.name + possibleTypes; +} +function printEnum(type) { + const values = type.getValues().map((value, i) => printDescription(value, ' ', !i) + ' ' + value.name + printDeprecated(value.deprecationReason)); + return printDescription(type) + `enum ${type.name}` + printBlock(values); +} +function printInputObject(type) { + const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f)); + return printDescription(type) + `input ${type.name}` + (type.isOneOf ? ' @oneOf' : '') + printBlock(fields); +} +function printFields(type) { + const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, ' ', !i) + ' ' + f.name + printArgs(f.args, ' ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason)); + return printBlock(fields); +} +function printBlock(items) { + return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : ''; +} +function printArgs(args, indentation = '') { + if (args.length === 0) { + return ''; + } // If every arg does not have a description, print them on one line. + + if (args.every(arg => !arg.description)) { + return '(' + args.map(printInputValue).join(', ') + ')'; } - ChangeAnnotation.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && (Is.string(candidate.description) || candidate.description === undefined); + return '(\n' + args.map((arg, i) => printDescription(arg, ' ' + indentation, !i) + ' ' + indentation + printInputValue(arg)).join('\n') + '\n' + indentation + ')'; +} +function printInputValue(arg) { + const defaultAST = (0, _astFromValue.astFromValue)(arg.defaultValue, arg.type); + let argDecl = arg.name + ': ' + String(arg.type); + if (defaultAST) { + argDecl += ` = ${(0, _printer.print)(defaultAST)}`; } - ChangeAnnotation.is = is; -})(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {})); -var ChangeAnnotationIdentifier; -exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier; -(function (ChangeAnnotationIdentifier) { - function is(value) { - var candidate = value; - return Is.string(candidate); + return argDecl + printDeprecated(arg.deprecationReason); +} +function printDirective(directive) { + return printDescription(directive) + 'directive @' + directive.name + printArgs(directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | '); +} +function printDeprecated(reason) { + if (reason == null) { + return ''; } - ChangeAnnotationIdentifier.is = is; -})(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {})); -var AnnotatedTextEdit; -exports.AnnotatedTextEdit = AnnotatedTextEdit; -(function (AnnotatedTextEdit) { - /** - * Creates an annotated replace text edit. - * - * @param range The range of text to be replaced. - * @param newText The new text. - * @param annotation The annotation. - */ - function replace(range, newText, annotation) { - return { - range: range, - newText: newText, - annotationId: annotation - }; - } - AnnotatedTextEdit.replace = replace; - /** - * Creates an annotated insert text edit. - * - * @param position The position to insert the text at. - * @param newText The text to be inserted. - * @param annotation The annotation. - */ - function insert(position, newText, annotation) { - return { - range: { - start: position, - end: position - }, - newText: newText, - annotationId: annotation - }; + if (reason !== _directives.DEFAULT_DEPRECATION_REASON) { + const astValue = (0, _printer.print)({ + kind: _kinds.Kind.STRING, + value: reason + }); + return ` @deprecated(reason: ${astValue})`; } - AnnotatedTextEdit.insert = insert; - /** - * Creates an annotated delete text edit. - * - * @param range The range of text to be deleted. - * @param annotation The annotation. - */ - function del(range, annotation) { - return { - range: range, - newText: '', - annotationId: annotation - }; + return ' @deprecated'; +} +function printSpecifiedByURL(scalar) { + if (scalar.specifiedByURL == null) { + return ''; } - AnnotatedTextEdit.del = del; - function is(value) { - var candidate = value; - return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + const astValue = (0, _printer.print)({ + kind: _kinds.Kind.STRING, + value: scalar.specifiedByURL + }); + return ` @specifiedBy(url: ${astValue})`; +} +function printDescription(def, indentation = '', firstInBlock = true) { + const { + description + } = def; + if (description == null) { + return ''; } - AnnotatedTextEdit.is = is; -})(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {})); + const blockString = (0, _printer.print)({ + kind: _kinds.Kind.STRING, + value: description, + block: (0, _blockString.isPrintableAsBlockString)(description) + }); + const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation; + return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n'; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/separateOperations.mjs": +/*!**********************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/separateOperations.mjs ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.separateOperations = separateOperations; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); /** - * The TextDocumentEdit namespace provides helper function to create - * an edit that manipulates a text document. + * separateOperations accepts a single AST document which may contain many + * operations and fragments and returns a collection of AST documents each of + * which contains a single operation as well the fragment definitions it + * refers to. */ -var TextDocumentEdit; -exports.TextDocumentEdit = TextDocumentEdit; -(function (TextDocumentEdit) { - /** - * Creates a new `TextDocumentEdit` - */ - function create(textDocument, edits) { - return { - textDocument: textDocument, - edits: edits + +function separateOperations(documentAST) { + const operations = []; + const depGraph = Object.create(null); // Populate metadata and build a dependency graph. + + for (const definitionNode of documentAST.definitions) { + switch (definitionNode.kind) { + case _kinds.Kind.OPERATION_DEFINITION: + operations.push(definitionNode); + break; + case _kinds.Kind.FRAGMENT_DEFINITION: + depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet); + break; + default: // ignore non-executable definitions + } + } // For each operation, produce a new synthesized AST which includes only what + // is necessary for completing that operation. + + const separatedDocumentASTs = Object.create(null); + for (const operation of operations) { + const dependencies = new Set(); + for (const fragmentName of collectDependencies(operation.selectionSet)) { + collectTransitiveDependencies(dependencies, depGraph, fragmentName); + } // Provides the empty string for anonymous operations. + + const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted + // to retain the same order as the original document. + + separatedDocumentASTs[operationName] = { + kind: _kinds.Kind.DOCUMENT, + definitions: documentAST.definitions.filter(node => node === operation || node.kind === _kinds.Kind.FRAGMENT_DEFINITION && dependencies.has(node.name.value)) }; } - TextDocumentEdit.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits); - } - TextDocumentEdit.is = is; -})(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {})); -var CreateFile; -exports.CreateFile = CreateFile; -(function (CreateFile) { - function create(uri, options, annotation) { - var result = { - kind: 'create', - uri: uri - }; - if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { - result.options = options; - } - if (annotation !== undefined) { - result.annotationId = annotation; + return separatedDocumentASTs; +} + +// From a dependency graph, collects a list of transitive dependencies by +// recursing through a dependency graph. +function collectTransitiveDependencies(collected, depGraph, fromName) { + if (!collected.has(fromName)) { + collected.add(fromName); + const immediateDeps = depGraph[fromName]; + if (immediateDeps !== undefined) { + for (const toName of immediateDeps) { + collectTransitiveDependencies(collected, depGraph, toName); + } } - return result; } - CreateFile.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); +} +function collectDependencies(selectionSet) { + const dependencies = []; + (0, _visitor.visit)(selectionSet, { + FragmentSpread(node) { + dependencies.push(node.name.value); + } + }); + return dependencies; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/sortValueNode.mjs": +/*!*****************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/sortValueNode.mjs ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.sortValueNode = sortValueNode; +var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +/** + * Sort ValueNode. + * + * This function returns a sorted copy of the given ValueNode. + * + * @internal + */ + +function sortValueNode(valueNode) { + switch (valueNode.kind) { + case _kinds.Kind.OBJECT: + return { + ...valueNode, + fields: sortFields(valueNode.fields) + }; + case _kinds.Kind.LIST: + return { + ...valueNode, + values: valueNode.values.map(sortValueNode) + }; + case _kinds.Kind.INT: + case _kinds.Kind.FLOAT: + case _kinds.Kind.STRING: + case _kinds.Kind.BOOLEAN: + case _kinds.Kind.NULL: + case _kinds.Kind.ENUM: + case _kinds.Kind.VARIABLE: + return valueNode; } - CreateFile.is = is; -})(CreateFile || (exports.CreateFile = CreateFile = {})); -var RenameFile; -exports.RenameFile = RenameFile; -(function (RenameFile) { - function create(oldUri, newUri, options, annotation) { - var result = { - kind: 'rename', - oldUri: oldUri, - newUri: newUri - }; - if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { - result.options = options; +} +function sortFields(fields) { + return fields.map(fieldNode => ({ + ...fieldNode, + value: sortValueNode(fieldNode.value) + })).sort((fieldA, fieldB) => (0, _naturalCompare.naturalCompare)(fieldA.name.value, fieldB.name.value)); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs": +/*!**************************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.stripIgnoredCharacters = stripIgnoredCharacters; +var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs"); +var _lexer = __webpack_require__(/*! ../language/lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs"); +var _source = __webpack_require__(/*! ../language/source.mjs */ "../../../node_modules/graphql/language/source.mjs"); +var _tokenKind = __webpack_require__(/*! ../language/tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs"); +/** + * Strips characters that are not significant to the validity or execution + * of a GraphQL document: + * - UnicodeBOM + * - WhiteSpace + * - LineTerminator + * - Comment + * - Comma + * - BlockString indentation + * + * Note: It is required to have a delimiter character between neighboring + * non-punctuator tokens and this function always uses single space as delimiter. + * + * It is guaranteed that both input and output documents if parsed would result + * in the exact same AST except for nodes location. + * + * Warning: It is guaranteed that this function will always produce stable results. + * However, it's not guaranteed that it will stay the same between different + * releases due to bugfixes or changes in the GraphQL specification. + * + * Query example: + * + * ```graphql + * query SomeQuery($foo: String!, $bar: String) { + * someField(foo: $foo, bar: $bar) { + * a + * b { + * c + * d + * } + * } + * } + * ``` + * + * Becomes: + * + * ```graphql + * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}} + * ``` + * + * SDL example: + * + * ```graphql + * """ + * Type description + * """ + * type Foo { + * """ + * Field description + * """ + * bar: String + * } + * ``` + * + * Becomes: + * + * ```graphql + * """Type description""" type Foo{"""Field description""" bar:String} + * ``` + */ + +function stripIgnoredCharacters(source) { + const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); + const body = sourceObj.body; + const lexer = new _lexer.Lexer(sourceObj); + let strippedBody = ''; + let wasLastAddedTokenNonPunctuator = false; + while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) { + const currentToken = lexer.token; + const tokenKind = currentToken.kind; + /** + * Every two non-punctuator tokens should have space between them. + * Also prevent case of non-punctuator token following by spread resulting + * in invalid token (e.g. `1...` is invalid Float token). + */ + + const isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(currentToken.kind); + if (wasLastAddedTokenNonPunctuator) { + if (isNonPunctuator || currentToken.kind === _tokenKind.TokenKind.SPREAD) { + strippedBody += ' '; + } } - if (annotation !== undefined) { - result.annotationId = annotation; + const tokenBody = body.slice(currentToken.start, currentToken.end); + if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) { + strippedBody += (0, _blockString.printBlockString)(currentToken.value, { + minimize: true + }); + } else { + strippedBody += tokenBody; } - return result; - } - RenameFile.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + wasLastAddedTokenNonPunctuator = isNonPunctuator; } - RenameFile.is = is; -})(RenameFile || (exports.RenameFile = RenameFile = {})); -var DeleteFile; -exports.DeleteFile = DeleteFile; -(function (DeleteFile) { - function create(uri, options, annotation) { - var result = { - kind: 'delete', - uri: uri - }; - if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { - result.options = options; - } - if (annotation !== undefined) { - result.annotationId = annotation; + return strippedBody; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/typeComparators.mjs": +/*!*******************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/typeComparators.mjs ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.doTypesOverlap = doTypesOverlap; +exports.isEqualType = isEqualType; +exports.isTypeSubTypeOf = isTypeSubTypeOf; +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Provided two types, return true if the types are equal (invariant). + */ +function isEqualType(typeA, typeB) { + // Equivalent types are equal. + if (typeA === typeB) { + return true; + } // If either type is non-null, the other must also be non-null. + + if ((0, _definition.isNonNullType)(typeA) && (0, _definition.isNonNullType)(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } // If either type is a list, the other must also be a list. + + if ((0, _definition.isListType)(typeA) && (0, _definition.isListType)(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } // Otherwise the types are not equal. + + return false; +} +/** + * Provided a type and a super type, return true if the first type is either + * equal or a subset of the second super type (covariant). + */ + +function isTypeSubTypeOf(schema, maybeSubType, superType) { + // Equivalent type is a valid subtype + if (maybeSubType === superType) { + return true; + } // If superType is non-null, maybeSubType must also be non-null. + + if ((0, _definition.isNonNullType)(superType)) { + if ((0, _definition.isNonNullType)(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); } - return result; + return false; } - DeleteFile.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + if ((0, _definition.isNonNullType)(maybeSubType)) { + // If superType is nullable, maybeSubType may be non-null or nullable. + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); + } // If superType type is a list, maybeSubType type must also be a list. + + if ((0, _definition.isListType)(superType)) { + if ((0, _definition.isListType)(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + return false; } - DeleteFile.is = is; -})(DeleteFile || (exports.DeleteFile = DeleteFile = {})); -var WorkspaceEdit; -exports.WorkspaceEdit = WorkspaceEdit; -(function (WorkspaceEdit) { - function is(value) { - var candidate = value; - return candidate && (candidate.changes !== undefined || candidate.documentChanges !== undefined) && (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { - if (Is.string(change.kind)) { - return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); - } else { - return TextDocumentEdit.is(change); - } - })); + if ((0, _definition.isListType)(maybeSubType)) { + // If superType is not a list, maybeSubType must also be not a list. + return false; + } // If superType type is an abstract type, check if it is super type of maybeSubType. + // Otherwise, the child type is not a valid subtype of the parent type. + + return (0, _definition.isAbstractType)(superType) && ((0, _definition.isInterfaceType)(maybeSubType) || (0, _definition.isObjectType)(maybeSubType)) && schema.isSubType(superType, maybeSubType); +} +/** + * Provided two composite types, determine if they "overlap". Two composite + * types overlap when the Sets of possible concrete types for each intersect. + * + * This is often used to determine if a fragment of a given type could possibly + * be visited in a context of another type. + * + * This function is commutative. + */ + +function doTypesOverlap(schema, typeA, typeB) { + // Equivalent types overlap + if (typeA === typeB) { + return true; } - WorkspaceEdit.is = is; -})(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {})); -var TextEditChangeImpl = /** @class */function () { - function TextEditChangeImpl(edits, changeAnnotations) { - this.edits = edits; - this.changeAnnotations = changeAnnotations; + if ((0, _definition.isAbstractType)(typeA)) { + if ((0, _definition.isAbstractType)(typeB)) { + // If both types are abstract, then determine if there is any intersection + // between possible concrete types of each. + return schema.getPossibleTypes(typeA).some(type => schema.isSubType(typeB, type)); + } // Determine if the latter type is a possible concrete type of the former. + + return schema.isSubType(typeA, typeB); } - TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { - var edit; - var id; - if (annotation === undefined) { - edit = TextEdit.insert(position, newText); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.insert(position, newText, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.insert(position, newText, id); - } - this.edits.push(edit); - if (id !== undefined) { - return id; - } - }; - TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { - var edit; - var id; - if (annotation === undefined) { - edit = TextEdit.replace(range, newText); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.replace(range, newText, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.replace(range, newText, id); - } - this.edits.push(edit); - if (id !== undefined) { - return id; - } - }; - TextEditChangeImpl.prototype.delete = function (range, annotation) { - var edit; - var id; - if (annotation === undefined) { - edit = TextEdit.del(range); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.del(range, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.del(range, id); - } - this.edits.push(edit); - if (id !== undefined) { - return id; - } - }; - TextEditChangeImpl.prototype.add = function (edit) { - this.edits.push(edit); - }; - TextEditChangeImpl.prototype.all = function () { - return this.edits; - }; - TextEditChangeImpl.prototype.clear = function () { - this.edits.splice(0, this.edits.length); - }; - TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { - if (value === undefined) { - throw new Error("Text edit change is not configured to manage change annotations."); - } - }; - return TextEditChangeImpl; -}(); + if ((0, _definition.isAbstractType)(typeB)) { + // Determine if the former type is a possible concrete type of the latter. + return schema.isSubType(typeB, typeA); + } // Otherwise the types do not overlap. + + return false; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/typeFromAST.mjs": +/*!***************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/typeFromAST.mjs ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.typeFromAST = typeFromAST; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +function typeFromAST(schema, typeNode) { + switch (typeNode.kind) { + case _kinds.Kind.LIST_TYPE: + { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new _definition.GraphQLList(innerType); + } + case _kinds.Kind.NON_NULL_TYPE: + { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new _definition.GraphQLNonNull(innerType); + } + case _kinds.Kind.NAMED_TYPE: + return schema.getType(typeNode.name.value); + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/valueFromAST.mjs": +/*!****************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/valueFromAST.mjs ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.valueFromAST = valueFromAST; +var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); /** - * A helper class + * Produces a JavaScript value given a GraphQL Value AST. + * + * A GraphQL type must be provided, which will be used to interpret different + * GraphQL Value literals. + * + * Returns `undefined` when the value could not be validly coerced according to + * the provided type. + * + * | GraphQL Value | JSON Value | + * | -------------------- | ------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String | String | + * | Int / Float | Number | + * | Enum Value | Unknown | + * | NullValue | null | + * */ -var ChangeAnnotations = /** @class */function () { - function ChangeAnnotations(annotations) { - this._annotations = annotations === undefined ? Object.create(null) : annotations; - this._counter = 0; - this._size = 0; + +function valueFromAST(valueNode, type, variables) { + if (!valueNode) { + // When there is no node, then there is also no value. + // Importantly, this is different from returning the value null. + return; } - ChangeAnnotations.prototype.all = function () { - return this._annotations; - }; - Object.defineProperty(ChangeAnnotations.prototype, "size", { - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { - var id; - if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { - id = idOrAnnotation; - } else { - id = this.nextId(); - annotation = idOrAnnotation; - } - if (this._annotations[id] !== undefined) { - throw new Error("Id ".concat(id, " is already in use.")); + if (valueNode.kind === _kinds.Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variables == null || variables[variableName] === undefined) { + // No valid return value. + return; } - if (annotation === undefined) { - throw new Error("No annotation provided for id ".concat(id)); + const variableValue = variables[variableName]; + if (variableValue === null && (0, _definition.isNonNullType)(type)) { + return; // Invalid: intentionally return no value. + } // Note: This does no further checking that this variable is correct. + // This assumes that this query has been validated and the variable + // usage here is of the correct type. + + return variableValue; + } + if ((0, _definition.isNonNullType)(type)) { + if (valueNode.kind === _kinds.Kind.NULL) { + return; // Invalid: intentionally return no value. } - this._annotations[id] = annotation; - this._size++; - return id; - }; - ChangeAnnotations.prototype.nextId = function () { - this._counter++; - return this._counter.toString(); - }; - return ChangeAnnotations; -}(); -/** - * A workspace change helps constructing changes to a workspace. - */ -var WorkspaceChange = /** @class */function () { - function WorkspaceChange(workspaceEdit) { - var _this = this; - this._textEditChanges = Object.create(null); - if (workspaceEdit !== undefined) { - this._workspaceEdit = workspaceEdit; - if (workspaceEdit.documentChanges) { - this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); - workspaceEdit.changeAnnotations = this._changeAnnotations.all(); - workspaceEdit.documentChanges.forEach(function (change) { - if (TextDocumentEdit.is(change)) { - var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); - _this._textEditChanges[change.textDocument.uri] = textEditChange; + return valueFromAST(valueNode, type.ofType, variables); + } + if (valueNode.kind === _kinds.Kind.NULL) { + // This is explicitly returning the value null. + return null; + } + if ((0, _definition.isListType)(type)) { + const itemType = type.ofType; + if (valueNode.kind === _kinds.Kind.LIST) { + const coercedValues = []; + for (const itemNode of valueNode.values) { + if (isMissingVariable(itemNode, variables)) { + // If an array contains a missing variable, it is either coerced to + // null or if the item type is non-null, it considered invalid. + if ((0, _definition.isNonNullType)(itemType)) { + return; // Invalid: intentionally return no value. } - }); - } else if (workspaceEdit.changes) { - Object.keys(workspaceEdit.changes).forEach(function (key) { - var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); - _this._textEditChanges[key] = textEditChange; - }); + coercedValues.push(null); + } else { + const itemValue = valueFromAST(itemNode, itemType, variables); + if (itemValue === undefined) { + return; // Invalid: intentionally return no value. + } + coercedValues.push(itemValue); + } } - } else { - this._workspaceEdit = {}; + return coercedValues; + } + const coercedValue = valueFromAST(valueNode, itemType, variables); + if (coercedValue === undefined) { + return; // Invalid: intentionally return no value. } + return [coercedValue]; } - Object.defineProperty(WorkspaceChange.prototype, "edit", { - /** - * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal - * use to be returned from a workspace edit operation like rename. - */ - get: function () { - this.initDocumentChanges(); - if (this._changeAnnotations !== undefined) { - if (this._changeAnnotations.size === 0) { - this._workspaceEdit.changeAnnotations = undefined; - } else { - this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + if ((0, _definition.isInputObjectType)(type)) { + if (valueNode.kind !== _kinds.Kind.OBJECT) { + return; // Invalid: intentionally return no value. + } + const coercedObj = Object.create(null); + const fieldNodes = (0, _keyMap.keyMap)(valueNode.fields, field => field.name.value); + for (const field of Object.values(type.getFields())) { + const fieldNode = fieldNodes[field.name]; + if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { + if (field.defaultValue !== undefined) { + coercedObj[field.name] = field.defaultValue; + } else if ((0, _definition.isNonNullType)(field.type)) { + return; // Invalid: intentionally return no value. } + continue; } - return this._workspaceEdit; - }, - enumerable: false, - configurable: true - }); - WorkspaceChange.prototype.getTextEditChange = function (key) { - if (OptionalVersionedTextDocumentIdentifier.is(key)) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === undefined) { - throw new Error('Workspace edit is not configured for document changes.'); - } - var textDocument = { - uri: key.uri, - version: key.version - }; - var result = this._textEditChanges[textDocument.uri]; - if (!result) { - var edits = []; - var textDocumentEdit = { - textDocument: textDocument, - edits: edits - }; - this._workspaceEdit.documentChanges.push(textDocumentEdit); - result = new TextEditChangeImpl(edits, this._changeAnnotations); - this._textEditChanges[textDocument.uri] = result; + const fieldValue = valueFromAST(fieldNode.value, field.type, variables); + if (fieldValue === undefined) { + return; // Invalid: intentionally return no value. } - return result; - } else { - this.initChanges(); - if (this._workspaceEdit.changes === undefined) { - throw new Error('Workspace edit is not configured for normal text edit changes.'); + coercedObj[field.name] = fieldValue; + } + if (type.isOneOf) { + const keys = Object.keys(coercedObj); + if (keys.length !== 1) { + return; // Invalid: not exactly one key, intentionally return no value. } - var result = this._textEditChanges[key]; - if (!result) { - var edits = []; - this._workspaceEdit.changes[key] = edits; - result = new TextEditChangeImpl(edits); - this._textEditChanges[key] = result; + if (coercedObj[keys[0]] === null) { + return; // Invalid: value not non-null, intentionally return no value. } - return result; - } - }; - WorkspaceChange.prototype.initDocumentChanges = function () { - if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { - this._changeAnnotations = new ChangeAnnotations(); - this._workspaceEdit.documentChanges = []; - this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); - } - }; - WorkspaceChange.prototype.initChanges = function () { - if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { - this._workspaceEdit.changes = Object.create(null); - } - }; - WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === undefined) { - throw new Error('Workspace edit is not configured for document changes.'); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; - } - var operation; - var id; - if (annotation === undefined) { - operation = CreateFile.create(uri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = CreateFile.create(uri, options, id); - } - this._workspaceEdit.documentChanges.push(operation); - if (id !== undefined) { - return id; - } - }; - WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === undefined) { - throw new Error('Workspace edit is not configured for document changes.'); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; - } - var operation; - var id; - if (annotation === undefined) { - operation = RenameFile.create(oldUri, newUri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = RenameFile.create(oldUri, newUri, options, id); - } - this._workspaceEdit.documentChanges.push(operation); - if (id !== undefined) { - return id; - } - }; - WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === undefined) { - throw new Error('Workspace edit is not configured for document changes.'); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; } - var operation; - var id; - if (annotation === undefined) { - operation = DeleteFile.create(uri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = DeleteFile.create(uri, options, id); + return coercedObj; + } + if ((0, _definition.isLeafType)(type)) { + // Scalars and Enums fulfill parsing a literal value via parseLiteral(). + // Invalid values represent a failure to parse correctly, in which case + // no value is returned. + let result; + try { + result = type.parseLiteral(valueNode, variables); + } catch (_error) { + return; // Invalid: intentionally return no value. } - this._workspaceEdit.documentChanges.push(operation); - if (id !== undefined) { - return id; + if (result === undefined) { + return; // Invalid: intentionally return no value. } - }; - return WorkspaceChange; -}(); -exports.WorkspaceChange = WorkspaceChange; -/** - * The TextDocumentIdentifier namespace provides helper functions to work with - * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. - */ -var TextDocumentIdentifier; -exports.TextDocumentIdentifier = TextDocumentIdentifier; -(function (TextDocumentIdentifier) { - /** - * Creates a new TextDocumentIdentifier literal. - * @param uri The document's uri. - */ - function create(uri) { - return { - uri: uri - }; - } - TextDocumentIdentifier.create = create; - /** - * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri); - } - TextDocumentIdentifier.is = is; -})(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {})); -/** - * The VersionedTextDocumentIdentifier namespace provides helper functions to work with - * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. - */ -var VersionedTextDocumentIdentifier; -exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier; -(function (VersionedTextDocumentIdentifier) { - /** - * Creates a new VersionedTextDocumentIdentifier literal. - * @param uri The document's uri. - * @param version The document's version. - */ - function create(uri, version) { - return { - uri: uri, - version: version - }; - } - VersionedTextDocumentIdentifier.create = create; - /** - * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + return result; } - VersionedTextDocumentIdentifier.is = is; -})(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {})); + /* c8 ignore next 3 */ + // Not reachable, all possible input types have been considered. + + false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type)); +} // Returns true if the provided valueNode is a variable which is not defined +// in the set of variables. + +function isMissingVariable(valueNode, variables) { + return valueNode.kind === _kinds.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs": +/*!***********************************************************************!*\ + !*** ../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.valueFromASTUntyped = valueFromASTUntyped; +var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs"); +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); /** - * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with - * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals. + * Produces a JavaScript value given a GraphQL Value AST. + * + * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value + * will reflect the provided GraphQL value AST. + * + * | GraphQL Value | JavaScript Value | + * | -------------------- | ---------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String / Enum | String | + * | Int / Float | Number | + * | Null | null | + * */ -var OptionalVersionedTextDocumentIdentifier; -exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier; -(function (OptionalVersionedTextDocumentIdentifier) { - /** - * Creates a new OptionalVersionedTextDocumentIdentifier literal. - * @param uri The document's uri. - * @param version The document's version. - */ - function create(uri, version) { - return { - uri: uri, - version: version - }; - } - OptionalVersionedTextDocumentIdentifier.create = create; - /** - * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + +function valueFromASTUntyped(valueNode, variables) { + switch (valueNode.kind) { + case _kinds.Kind.NULL: + return null; + case _kinds.Kind.INT: + return parseInt(valueNode.value, 10); + case _kinds.Kind.FLOAT: + return parseFloat(valueNode.value); + case _kinds.Kind.STRING: + case _kinds.Kind.ENUM: + case _kinds.Kind.BOOLEAN: + return valueNode.value; + case _kinds.Kind.LIST: + return valueNode.values.map(node => valueFromASTUntyped(node, variables)); + case _kinds.Kind.OBJECT: + return (0, _keyValMap.keyValMap)(valueNode.fields, field => field.name.value, field => valueFromASTUntyped(field.value, variables)); + case _kinds.Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; } - OptionalVersionedTextDocumentIdentifier.is = is; -})(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {})); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/ValidationContext.mjs": +/*!**********************************************************************!*\ + !*** ../../../node_modules/graphql/validation/ValidationContext.mjs ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ValidationContext = exports.SDLValidationContext = exports.ASTValidationContext = void 0; +var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); /** - * The TextDocumentItem namespace provides helper functions to work with - * [TextDocumentItem](#TextDocumentItem) literals. + * An instance of this class is passed as the "this" context to all validators, + * allowing access to commonly useful contextual information from within a + * validation rule. */ -var TextDocumentItem; -exports.TextDocumentItem = TextDocumentItem; -(function (TextDocumentItem) { - /** - * Creates a new TextDocumentItem literal. - * @param uri The document's uri. - * @param languageId The document's language identifier. - * @param version The document's version number. - * @param text The document's text. - */ - function create(uri, languageId, version, text) { - return { - uri: uri, - languageId: languageId, - version: version, - text: text - }; +class ASTValidationContext { + constructor(ast, onError) { + this._ast = ast; + this._fragments = undefined; + this._fragmentSpreads = new Map(); + this._recursivelyReferencedFragments = new Map(); + this._onError = onError; } - TextDocumentItem.create = create; - /** - * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + get [Symbol.toStringTag]() { + return 'ASTValidationContext'; } - TextDocumentItem.is = is; -})(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {})); -/** - * Describes the content type that a client supports in various - * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. - * - * Please note that `MarkupKinds` must not start with a `$`. This kinds - * are reserved for internal usage. - */ -var MarkupKind; -exports.MarkupKind = MarkupKind; -(function (MarkupKind) { - /** - * Plain text is supported as a content format - */ - MarkupKind.PlainText = 'plaintext'; - /** - * Markdown is supported as a content format - */ - MarkupKind.Markdown = 'markdown'; - /** - * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type. - */ - function is(value) { - var candidate = value; - return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + reportError(error) { + this._onError(error); } - MarkupKind.is = is; -})(MarkupKind || (exports.MarkupKind = MarkupKind = {})); -var MarkupContent; -exports.MarkupContent = MarkupContent; -(function (MarkupContent) { - /** - * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface. - */ - function is(value) { - var candidate = value; - return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + getDocument() { + return this._ast; } - MarkupContent.is = is; -})(MarkupContent || (exports.MarkupContent = MarkupContent = {})); -/** - * The kind of a completion entry. - */ -var CompletionItemKind; -exports.CompletionItemKind = CompletionItemKind; -(function (CompletionItemKind) { - CompletionItemKind.Text = 1; - CompletionItemKind.Method = 2; - CompletionItemKind.Function = 3; - CompletionItemKind.Constructor = 4; - CompletionItemKind.Field = 5; - CompletionItemKind.Variable = 6; - CompletionItemKind.Class = 7; - CompletionItemKind.Interface = 8; - CompletionItemKind.Module = 9; - CompletionItemKind.Property = 10; - CompletionItemKind.Unit = 11; - CompletionItemKind.Value = 12; - CompletionItemKind.Enum = 13; - CompletionItemKind.Keyword = 14; - CompletionItemKind.Snippet = 15; - CompletionItemKind.Color = 16; - CompletionItemKind.File = 17; - CompletionItemKind.Reference = 18; - CompletionItemKind.Folder = 19; - CompletionItemKind.EnumMember = 20; - CompletionItemKind.Constant = 21; - CompletionItemKind.Struct = 22; - CompletionItemKind.Event = 23; - CompletionItemKind.Operator = 24; - CompletionItemKind.TypeParameter = 25; -})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {})); -/** - * Defines whether the insert text in a completion item should be interpreted as - * plain text or a snippet. - */ -var InsertTextFormat; -exports.InsertTextFormat = InsertTextFormat; -(function (InsertTextFormat) { - /** - * The primary text to be inserted is treated as a plain string. - */ - InsertTextFormat.PlainText = 1; - /** - * The primary text to be inserted is treated as a snippet. - * - * A snippet can define tab stops and placeholders with `$1`, `$2` - * and `${3:foo}`. `$0` defines the final tab stop, it defaults to - * the end of the snippet. Placeholders with equal identifiers are linked, - * that is typing in one will update others too. - * - * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax - */ - InsertTextFormat.Snippet = 2; -})(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {})); -/** - * Completion item tags are extra annotations that tweak the rendering of a completion - * item. - * - * @since 3.15.0 - */ -var CompletionItemTag; -exports.CompletionItemTag = CompletionItemTag; -(function (CompletionItemTag) { - /** - * Render a completion as obsolete, usually using a strike-out. - */ - CompletionItemTag.Deprecated = 1; -})(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {})); -/** - * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. - * - * @since 3.16.0 - */ -var InsertReplaceEdit; -exports.InsertReplaceEdit = InsertReplaceEdit; -(function (InsertReplaceEdit) { - /** - * Creates a new insert / replace edit - */ - function create(newText, insert, replace) { - return { - newText: newText, - insert: insert, - replace: replace - }; + getFragment(name) { + let fragments; + if (this._fragments) { + fragments = this._fragments; + } else { + fragments = Object.create(null); + for (const defNode of this.getDocument().definitions) { + if (defNode.kind === _kinds.Kind.FRAGMENT_DEFINITION) { + fragments[defNode.name.value] = defNode; + } + } + this._fragments = fragments; + } + return fragments[name]; } - InsertReplaceEdit.create = create; - /** - * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface. - */ - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + getFragmentSpreads(node) { + let spreads = this._fragmentSpreads.get(node); + if (!spreads) { + spreads = []; + const setsToVisit = [node]; + let set; + while (set = setsToVisit.pop()) { + for (const selection of set.selections) { + if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) { + spreads.push(selection); + } else if (selection.selectionSet) { + setsToVisit.push(selection.selectionSet); + } + } + } + this._fragmentSpreads.set(node, spreads); + } + return spreads; } - InsertReplaceEdit.is = is; -})(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {})); -/** - * How whitespace and indentation is handled during completion - * item insertion. - * - * @since 3.16.0 - */ -var InsertTextMode; -exports.InsertTextMode = InsertTextMode; -(function (InsertTextMode) { - /** - * The insertion or replace strings is taken as it is. If the - * value is multi line the lines below the cursor will be - * inserted using the indentation defined in the string value. - * The client will not apply any kind of adjustments to the - * string. - */ - InsertTextMode.asIs = 1; - /** - * The editor adjusts leading whitespace of new lines so that - * they match the indentation up to the cursor of the line for - * which the item is accepted. - * - * Consider a line like this: <2tabs><3tabs>foo. Accepting a - * multi line completion item is indented using 2 tabs and all - * following lines inserted will be indented using 2 tabs as well. - */ - InsertTextMode.adjustIndentation = 2; -})(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {})); -var CompletionItemLabelDetails; -exports.CompletionItemLabelDetails = CompletionItemLabelDetails; -(function (CompletionItemLabelDetails) { - function is(value) { - var candidate = value; - return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && (Is.string(candidate.description) || candidate.description === undefined); + getRecursivelyReferencedFragments(operation) { + let fragments = this._recursivelyReferencedFragments.get(operation); + if (!fragments) { + fragments = []; + const collectedNames = Object.create(null); + const nodesToVisit = [operation.selectionSet]; + let node; + while (node = nodesToVisit.pop()) { + for (const spread of this.getFragmentSpreads(node)) { + const fragName = spread.name.value; + if (collectedNames[fragName] !== true) { + collectedNames[fragName] = true; + const fragment = this.getFragment(fragName); + if (fragment) { + fragments.push(fragment); + nodesToVisit.push(fragment.selectionSet); + } + } + } + } + this._recursivelyReferencedFragments.set(operation, fragments); + } + return fragments; } - CompletionItemLabelDetails.is = is; -})(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {})); -/** - * The CompletionItem namespace provides functions to deal with - * completion items. - */ -var CompletionItem; -exports.CompletionItem = CompletionItem; -(function (CompletionItem) { - /** - * Create a completion item and seed it with a label. - * @param label The completion item's label - */ - function create(label) { - return { - label: label - }; +} +exports.ASTValidationContext = ASTValidationContext; +class SDLValidationContext extends ASTValidationContext { + constructor(ast, schema, onError) { + super(ast, onError); + this._schema = schema; } - CompletionItem.create = create; -})(CompletionItem || (exports.CompletionItem = CompletionItem = {})); -/** - * The CompletionList namespace provides functions to deal with - * completion lists. - */ -var CompletionList; -exports.CompletionList = CompletionList; -(function (CompletionList) { - /** - * Creates a new completion list. - * - * @param items The completion items. - * @param isIncomplete The list is not complete. - */ - function create(items, isIncomplete) { - return { - items: items ? items : [], - isIncomplete: !!isIncomplete - }; + get [Symbol.toStringTag]() { + return 'SDLValidationContext'; } - CompletionList.create = create; -})(CompletionList || (exports.CompletionList = CompletionList = {})); -var MarkedString; -exports.MarkedString = MarkedString; -(function (MarkedString) { - /** - * Creates a marked string from plain text. - * - * @param plainText The plain text. - */ - function fromPlainText(plainText) { - return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + getSchema() { + return this._schema; } - - MarkedString.fromPlainText = fromPlainText; - /** - * Checks whether the given value conforms to the [MarkedString](#MarkedString) type. - */ - function is(value) { - var candidate = value; - return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value); +} +exports.SDLValidationContext = SDLValidationContext; +class ValidationContext extends ASTValidationContext { + constructor(schema, ast, typeInfo, onError) { + super(ast, onError); + this._schema = schema; + this._typeInfo = typeInfo; + this._variableUsages = new Map(); + this._recursiveVariableUsages = new Map(); } - MarkedString.is = is; -})(MarkedString || (exports.MarkedString = MarkedString = {})); -var Hover; -exports.Hover = Hover; -(function (Hover) { - /** - * Checks whether the given value conforms to the [Hover](#Hover) interface. - */ - function is(value) { - var candidate = value; - return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + get [Symbol.toStringTag]() { + return 'ValidationContext'; } - Hover.is = is; -})(Hover || (exports.Hover = Hover = {})); -/** - * The ParameterInformation namespace provides helper functions to work with - * [ParameterInformation](#ParameterInformation) literals. - */ -var ParameterInformation; -exports.ParameterInformation = ParameterInformation; -(function (ParameterInformation) { - /** - * Creates a new parameter information literal. - * - * @param label A label string. - * @param documentation A doc string. - */ - function create(label, documentation) { - return documentation ? { - label: label, - documentation: documentation - } : { - label: label - }; + getSchema() { + return this._schema; } - ParameterInformation.create = create; -})(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {})); -/** - * The SignatureInformation namespace provides helper functions to work with - * [SignatureInformation](#SignatureInformation) literals. - */ -var SignatureInformation; -exports.SignatureInformation = SignatureInformation; -(function (SignatureInformation) { - function create(label, documentation) { - var parameters = []; - for (var _i = 2; _i < arguments.length; _i++) { - parameters[_i - 2] = arguments[_i]; - } - var result = { - label: label - }; - if (Is.defined(documentation)) { - result.documentation = documentation; - } - if (Is.defined(parameters)) { - result.parameters = parameters; - } else { - result.parameters = []; + getVariableUsages(node) { + let usages = this._variableUsages.get(node); + if (!usages) { + const newUsages = []; + const typeInfo = new _TypeInfo.TypeInfo(this._schema); + (0, _visitor.visit)(node, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, { + VariableDefinition: () => false, + Variable(variable) { + newUsages.push({ + node: variable, + type: typeInfo.getInputType(), + defaultValue: typeInfo.getDefaultValue() + }); + } + })); + usages = newUsages; + this._variableUsages.set(node, usages); } - return result; + return usages; } - SignatureInformation.create = create; -})(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {})); -/** - * A document highlight kind. - */ -var DocumentHighlightKind; -exports.DocumentHighlightKind = DocumentHighlightKind; -(function (DocumentHighlightKind) { - /** - * A textual occurrence. - */ - DocumentHighlightKind.Text = 1; - /** - * Read-access of a symbol, like reading a variable. - */ - DocumentHighlightKind.Read = 2; - /** - * Write-access of a symbol, like writing to a variable. - */ - DocumentHighlightKind.Write = 3; -})(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {})); -/** - * DocumentHighlight namespace to provide helper functions to work with - * [DocumentHighlight](#DocumentHighlight) literals. - */ -var DocumentHighlight; -exports.DocumentHighlight = DocumentHighlight; -(function (DocumentHighlight) { - /** - * Create a DocumentHighlight object. - * @param range The range the highlight applies to. - * @param kind The highlight kind - */ - function create(range, kind) { - var result = { - range: range - }; - if (Is.number(kind)) { - result.kind = kind; + getRecursiveVariableUsages(operation) { + let usages = this._recursiveVariableUsages.get(operation); + if (!usages) { + usages = this.getVariableUsages(operation); + for (const frag of this.getRecursivelyReferencedFragments(operation)) { + usages = usages.concat(this.getVariableUsages(frag)); + } + this._recursiveVariableUsages.set(operation, usages); } - return result; + return usages; } - DocumentHighlight.create = create; -})(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {})); -/** - * A symbol kind. - */ -var SymbolKind; -exports.SymbolKind = SymbolKind; -(function (SymbolKind) { - SymbolKind.File = 1; - SymbolKind.Module = 2; - SymbolKind.Namespace = 3; - SymbolKind.Package = 4; - SymbolKind.Class = 5; - SymbolKind.Method = 6; - SymbolKind.Property = 7; - SymbolKind.Field = 8; - SymbolKind.Constructor = 9; - SymbolKind.Enum = 10; - SymbolKind.Interface = 11; - SymbolKind.Function = 12; - SymbolKind.Variable = 13; - SymbolKind.Constant = 14; - SymbolKind.String = 15; - SymbolKind.Number = 16; - SymbolKind.Boolean = 17; - SymbolKind.Array = 18; - SymbolKind.Object = 19; - SymbolKind.Key = 20; - SymbolKind.Null = 21; - SymbolKind.EnumMember = 22; - SymbolKind.Struct = 23; - SymbolKind.Event = 24; - SymbolKind.Operator = 25; - SymbolKind.TypeParameter = 26; -})(SymbolKind || (exports.SymbolKind = SymbolKind = {})); -/** - * Symbol tags are extra annotations that tweak the rendering of a symbol. - * @since 3.16 - */ -var SymbolTag; -exports.SymbolTag = SymbolTag; -(function (SymbolTag) { - /** - * Render a symbol as obsolete, usually using a strike-out. - */ - SymbolTag.Deprecated = 1; -})(SymbolTag || (exports.SymbolTag = SymbolTag = {})); -var SymbolInformation; -exports.SymbolInformation = SymbolInformation; -(function (SymbolInformation) { - /** - * Creates a new symbol information literal. - * - * @param name The name of the symbol. - * @param kind The kind of the symbol. - * @param range The range of the location of the symbol. - * @param uri The resource of the location of symbol. - * @param containerName The name of the symbol containing the symbol. - */ - function create(name, kind, range, uri, containerName) { - var result = { - name: name, - kind: kind, - location: { - uri: uri, - range: range - } - }; - if (containerName) { - result.containerName = containerName; - } - return result; + getType() { + return this._typeInfo.getType(); } - SymbolInformation.create = create; -})(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {})); -var WorkspaceSymbol; -exports.WorkspaceSymbol = WorkspaceSymbol; -(function (WorkspaceSymbol) { - /** - * Create a new workspace symbol. - * - * @param name The name of the symbol. - * @param kind The kind of the symbol. - * @param uri The resource of the location of the symbol. - * @param range An options range of the location. - * @returns A WorkspaceSymbol. - */ - function create(name, kind, uri, range) { - return range !== undefined ? { - name: name, - kind: kind, - location: { - uri: uri, - range: range - } - } : { - name: name, - kind: kind, - location: { - uri: uri - } - }; + getParentType() { + return this._typeInfo.getParentType(); } - WorkspaceSymbol.create = create; -})(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {})); -var DocumentSymbol; -exports.DocumentSymbol = DocumentSymbol; -(function (DocumentSymbol) { - /** - * Creates a new symbol information literal. - * - * @param name The name of the symbol. - * @param detail The detail of the symbol. - * @param kind The kind of the symbol. - * @param range The range of the symbol. - * @param selectionRange The selectionRange of the symbol. - * @param children Children of the symbol. - */ - function create(name, detail, kind, range, selectionRange, children) { - var result = { - name: name, - detail: detail, - kind: kind, - range: range, - selectionRange: selectionRange - }; - if (children !== undefined) { - result.children = children; - } - return result; + getInputType() { + return this._typeInfo.getInputType(); } - DocumentSymbol.create = create; - /** - * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface. - */ - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === undefined || Is.string(candidate.detail)) && (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && (candidate.children === undefined || Array.isArray(candidate.children)) && (candidate.tags === undefined || Array.isArray(candidate.tags)); + getParentInputType() { + return this._typeInfo.getParentInputType(); } - DocumentSymbol.is = is; -})(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {})); -/** - * A set of predefined code action kinds - */ -var CodeActionKind; -exports.CodeActionKind = CodeActionKind; -(function (CodeActionKind) { - /** - * Empty kind. - */ - CodeActionKind.Empty = ''; - /** - * Base kind for quickfix actions: 'quickfix' - */ - CodeActionKind.QuickFix = 'quickfix'; - /** - * Base kind for refactoring actions: 'refactor' - */ - CodeActionKind.Refactor = 'refactor'; - /** - * Base kind for refactoring extraction actions: 'refactor.extract' - * - * Example extract actions: - * - * - Extract method - * - Extract function - * - Extract variable - * - Extract interface from class - * - ... - */ - CodeActionKind.RefactorExtract = 'refactor.extract'; - /** - * Base kind for refactoring inline actions: 'refactor.inline' - * - * Example inline actions: - * - * - Inline function - * - Inline variable - * - Inline constant - * - ... - */ - CodeActionKind.RefactorInline = 'refactor.inline'; - /** - * Base kind for refactoring rewrite actions: 'refactor.rewrite' - * - * Example rewrite actions: - * - * - Convert JavaScript function to class - * - Add or remove parameter - * - Encapsulate field - * - Make method static - * - Move method to base class - * - ... - */ - CodeActionKind.RefactorRewrite = 'refactor.rewrite'; - /** - * Base kind for source actions: `source` - * - * Source code actions apply to the entire file. - */ - CodeActionKind.Source = 'source'; - /** - * Base kind for an organize imports source action: `source.organizeImports` - */ - CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; - /** - * Base kind for auto-fix source actions: `source.fixAll`. - * - * Fix all actions automatically fix errors that have a clear fix that do not require user input. - * They should not suppress errors or perform unsafe fixes such as generating new types or classes. - * - * @since 3.15.0 - */ - CodeActionKind.SourceFixAll = 'source.fixAll'; -})(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {})); -/** - * The reason why code actions were requested. - * - * @since 3.17.0 - */ -var CodeActionTriggerKind; -exports.CodeActionTriggerKind = CodeActionTriggerKind; -(function (CodeActionTriggerKind) { - /** - * Code actions were explicitly requested by the user or by an extension. - */ - CodeActionTriggerKind.Invoked = 1; - /** - * Code actions were requested automatically. - * - * This typically happens when current selection in a file changes, but can - * also be triggered when file content changes. - */ - CodeActionTriggerKind.Automatic = 2; -})(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {})); -/** - * The CodeActionContext namespace provides helper functions to work with - * [CodeActionContext](#CodeActionContext) literals. - */ -var CodeActionContext; -exports.CodeActionContext = CodeActionContext; -(function (CodeActionContext) { - /** - * Creates a new CodeActionContext literal. - */ - function create(diagnostics, only, triggerKind) { - var result = { - diagnostics: diagnostics - }; - if (only !== undefined && only !== null) { - result.only = only; - } - if (triggerKind !== undefined && triggerKind !== null) { - result.triggerKind = triggerKind; - } - return result; + getFieldDef() { + return this._typeInfo.getFieldDef(); } - CodeActionContext.create = create; - /** - * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + getDirective() { + return this._typeInfo.getDirective(); } - CodeActionContext.is = is; -})(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {})); -var CodeAction; -exports.CodeAction = CodeAction; -(function (CodeAction) { - function create(title, kindOrCommandOrEdit, kind) { - var result = { - title: title - }; - var checkKind = true; - if (typeof kindOrCommandOrEdit === 'string') { - checkKind = false; - result.kind = kindOrCommandOrEdit; - } else if (Command.is(kindOrCommandOrEdit)) { - result.command = kindOrCommandOrEdit; - } else { - result.edit = kindOrCommandOrEdit; - } - if (checkKind && kind !== undefined) { - result.kind = kind; - } - return result; + getArgument() { + return this._typeInfo.getArgument(); } - CodeAction.create = create; - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.title) && (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === undefined || Is.string(candidate.kind)) && (candidate.edit !== undefined || candidate.command !== undefined) && (candidate.command === undefined || Command.is(candidate.command)) && (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + getEnumValue() { + return this._typeInfo.getEnumValue(); } - CodeAction.is = is; -})(CodeAction || (exports.CodeAction = CodeAction = {})); -/** - * The CodeLens namespace provides helper functions to work with - * [CodeLens](#CodeLens) literals. - */ -var CodeLens; -exports.CodeLens = CodeLens; -(function (CodeLens) { - /** - * Creates a new CodeLens literal. - */ - function create(range, data) { - var result = { - range: range - }; - if (Is.defined(data)) { - result.data = data; - } - return result; +} +exports.ValidationContext = ValidationContext; + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/index.mjs": +/*!**********************************************************!*\ + !*** ../../../node_modules/graphql/validation/index.mjs ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "ExecutableDefinitionsRule", ({ + enumerable: true, + get: function () { + return _ExecutableDefinitionsRule.ExecutableDefinitionsRule; } - CodeLens.create = create; - /** - * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); +})); +Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({ + enumerable: true, + get: function () { + return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule; } - CodeLens.is = is; -})(CodeLens || (exports.CodeLens = CodeLens = {})); -/** - * The FormattingOptions namespace provides helper functions to work with - * [FormattingOptions](#FormattingOptions) literals. - */ -var FormattingOptions; -exports.FormattingOptions = FormattingOptions; -(function (FormattingOptions) { - /** - * Creates a new FormattingOptions literal. - */ - function create(tabSize, insertSpaces) { - return { - tabSize: tabSize, - insertSpaces: insertSpaces - }; +})); +Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({ + enumerable: true, + get: function () { + return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule; } - FormattingOptions.create = create; - /** - * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); +})); +Object.defineProperty(exports, "KnownArgumentNamesRule", ({ + enumerable: true, + get: function () { + return _KnownArgumentNamesRule.KnownArgumentNamesRule; } - FormattingOptions.is = is; -})(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {})); -/** - * The DocumentLink namespace provides helper functions to work with - * [DocumentLink](#DocumentLink) literals. - */ -var DocumentLink; -exports.DocumentLink = DocumentLink; -(function (DocumentLink) { - /** - * Creates a new DocumentLink literal. - */ - function create(range, target, data) { - return { - range: range, - target: target, - data: data - }; +})); +Object.defineProperty(exports, "KnownDirectivesRule", ({ + enumerable: true, + get: function () { + return _KnownDirectivesRule.KnownDirectivesRule; } - DocumentLink.create = create; - /** - * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); +})); +Object.defineProperty(exports, "KnownFragmentNamesRule", ({ + enumerable: true, + get: function () { + return _KnownFragmentNamesRule.KnownFragmentNamesRule; } - DocumentLink.is = is; -})(DocumentLink || (exports.DocumentLink = DocumentLink = {})); -/** - * The SelectionRange namespace provides helper function to work with - * SelectionRange literals. - */ -var SelectionRange; -exports.SelectionRange = SelectionRange; -(function (SelectionRange) { - /** - * Creates a new SelectionRange - * @param range the range. - * @param parent an optional parent. - */ - function create(range, parent) { - return { - range: range, - parent: parent - }; +})); +Object.defineProperty(exports, "KnownTypeNamesRule", ({ + enumerable: true, + get: function () { + return _KnownTypeNamesRule.KnownTypeNamesRule; } - SelectionRange.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); +})); +Object.defineProperty(exports, "LoneAnonymousOperationRule", ({ + enumerable: true, + get: function () { + return _LoneAnonymousOperationRule.LoneAnonymousOperationRule; } - SelectionRange.is = is; -})(SelectionRange || (exports.SelectionRange = SelectionRange = {})); -/** - * A set of predefined token types. This set is not fixed - * an clients can specify additional token types via the - * corresponding client capabilities. - * - * @since 3.16.0 - */ -var SemanticTokenTypes; -exports.SemanticTokenTypes = SemanticTokenTypes; -(function (SemanticTokenTypes) { - SemanticTokenTypes["namespace"] = "namespace"; - /** - * Represents a generic type. Acts as a fallback for types which can't be mapped to - * a specific type like class or enum. - */ - SemanticTokenTypes["type"] = "type"; - SemanticTokenTypes["class"] = "class"; - SemanticTokenTypes["enum"] = "enum"; - SemanticTokenTypes["interface"] = "interface"; - SemanticTokenTypes["struct"] = "struct"; - SemanticTokenTypes["typeParameter"] = "typeParameter"; - SemanticTokenTypes["parameter"] = "parameter"; - SemanticTokenTypes["variable"] = "variable"; - SemanticTokenTypes["property"] = "property"; - SemanticTokenTypes["enumMember"] = "enumMember"; - SemanticTokenTypes["event"] = "event"; - SemanticTokenTypes["function"] = "function"; - SemanticTokenTypes["method"] = "method"; - SemanticTokenTypes["macro"] = "macro"; - SemanticTokenTypes["keyword"] = "keyword"; - SemanticTokenTypes["modifier"] = "modifier"; - SemanticTokenTypes["comment"] = "comment"; - SemanticTokenTypes["string"] = "string"; - SemanticTokenTypes["number"] = "number"; - SemanticTokenTypes["regexp"] = "regexp"; - SemanticTokenTypes["operator"] = "operator"; - /** - * @since 3.17.0 - */ - SemanticTokenTypes["decorator"] = "decorator"; -})(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {})); -/** - * A set of predefined token modifiers. This set is not fixed - * an clients can specify additional token types via the - * corresponding client capabilities. - * - * @since 3.16.0 - */ -var SemanticTokenModifiers; -exports.SemanticTokenModifiers = SemanticTokenModifiers; -(function (SemanticTokenModifiers) { - SemanticTokenModifiers["declaration"] = "declaration"; - SemanticTokenModifiers["definition"] = "definition"; - SemanticTokenModifiers["readonly"] = "readonly"; - SemanticTokenModifiers["static"] = "static"; - SemanticTokenModifiers["deprecated"] = "deprecated"; - SemanticTokenModifiers["abstract"] = "abstract"; - SemanticTokenModifiers["async"] = "async"; - SemanticTokenModifiers["modification"] = "modification"; - SemanticTokenModifiers["documentation"] = "documentation"; - SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; -})(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {})); -/** - * @since 3.16.0 - */ -var SemanticTokens; -exports.SemanticTokens = SemanticTokens; -(function (SemanticTokens) { - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); +})); +Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({ + enumerable: true, + get: function () { + return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule; } - SemanticTokens.is = is; -})(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {})); -/** - * The InlineValueText namespace provides functions to deal with InlineValueTexts. - * - * @since 3.17.0 - */ -var InlineValueText; -exports.InlineValueText = InlineValueText; -(function (InlineValueText) { - /** - * Creates a new InlineValueText literal. - */ - function create(range, text) { - return { - range: range, - text: text - }; +})); +Object.defineProperty(exports, "MaxIntrospectionDepthRule", ({ + enumerable: true, + get: function () { + return _MaxIntrospectionDepthRule.MaxIntrospectionDepthRule; } - InlineValueText.create = create; - function is(value) { - var candidate = value; - return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); +})); +Object.defineProperty(exports, "NoDeprecatedCustomRule", ({ + enumerable: true, + get: function () { + return _NoDeprecatedCustomRule.NoDeprecatedCustomRule; } - InlineValueText.is = is; -})(InlineValueText || (exports.InlineValueText = InlineValueText = {})); -/** - * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. - * - * @since 3.17.0 - */ -var InlineValueVariableLookup; -exports.InlineValueVariableLookup = InlineValueVariableLookup; -(function (InlineValueVariableLookup) { - /** - * Creates a new InlineValueText literal. - */ - function create(range, variableName, caseSensitiveLookup) { - return { - range: range, - variableName: variableName, - caseSensitiveLookup: caseSensitiveLookup - }; +})); +Object.defineProperty(exports, "NoFragmentCyclesRule", ({ + enumerable: true, + get: function () { + return _NoFragmentCyclesRule.NoFragmentCyclesRule; } - InlineValueVariableLookup.create = create; - function is(value) { - var candidate = value; - return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === undefined); +})); +Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({ + enumerable: true, + get: function () { + return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule; } - InlineValueVariableLookup.is = is; -})(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {})); -/** - * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. - * - * @since 3.17.0 - */ -var InlineValueEvaluatableExpression; -exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression; -(function (InlineValueEvaluatableExpression) { - /** - * Creates a new InlineValueEvaluatableExpression literal. - */ - function create(range, expression) { - return { - range: range, - expression: expression - }; +})); +Object.defineProperty(exports, "NoUndefinedVariablesRule", ({ + enumerable: true, + get: function () { + return _NoUndefinedVariablesRule.NoUndefinedVariablesRule; } - InlineValueEvaluatableExpression.create = create; - function is(value) { - var candidate = value; - return candidate !== undefined && candidate !== null && Range.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === undefined); +})); +Object.defineProperty(exports, "NoUnusedFragmentsRule", ({ + enumerable: true, + get: function () { + return _NoUnusedFragmentsRule.NoUnusedFragmentsRule; } - InlineValueEvaluatableExpression.is = is; -})(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {})); -/** - * The InlineValueContext namespace provides helper functions to work with - * [InlineValueContext](#InlineValueContext) literals. - * - * @since 3.17.0 - */ -var InlineValueContext; -exports.InlineValueContext = InlineValueContext; -(function (InlineValueContext) { - /** - * Creates a new InlineValueContext literal. - */ - function create(frameId, stoppedLocation) { - return { - frameId: frameId, - stoppedLocation: stoppedLocation - }; +})); +Object.defineProperty(exports, "NoUnusedVariablesRule", ({ + enumerable: true, + get: function () { + return _NoUnusedVariablesRule.NoUnusedVariablesRule; } - InlineValueContext.create = create; - /** - * Checks whether the given literal conforms to the [InlineValueContext](#InlineValueContext) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(value.stoppedLocation); +})); +Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({ + enumerable: true, + get: function () { + return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule; } - InlineValueContext.is = is; -})(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {})); -/** - * Inlay hint kinds. - * - * @since 3.17.0 - */ -var InlayHintKind; -exports.InlayHintKind = InlayHintKind; -(function (InlayHintKind) { - /** - * An inlay hint that for a type annotation. - */ - InlayHintKind.Type = 1; - /** - * An inlay hint that is for a parameter. - */ - InlayHintKind.Parameter = 2; - function is(value) { - return value === 1 || value === 2; +})); +Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({ + enumerable: true, + get: function () { + return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule; } - InlayHintKind.is = is; -})(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {})); -var InlayHintLabelPart; -exports.InlayHintLabelPart = InlayHintLabelPart; -(function (InlayHintLabelPart) { - function create(value) { - return { - value: value - }; +})); +Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({ + enumerable: true, + get: function () { + return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule; } - InlayHintLabelPart.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === undefined || Location.is(candidate.location)) && (candidate.command === undefined || Command.is(candidate.command)); +})); +Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({ + enumerable: true, + get: function () { + return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule; } - InlayHintLabelPart.is = is; -})(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {})); -var InlayHint; -exports.InlayHint = InlayHint; -(function (InlayHint) { - function create(position, label, kind) { - var result = { - position: position, - label: label - }; - if (kind !== undefined) { - result.kind = kind; - } - return result; +})); +Object.defineProperty(exports, "ScalarLeafsRule", ({ + enumerable: true, + get: function () { + return _ScalarLeafsRule.ScalarLeafsRule; } - InlayHint.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Position.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) && candidate.textEdits === undefined || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); +})); +Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({ + enumerable: true, + get: function () { + return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule; } - InlayHint.is = is; -})(InlayHint || (exports.InlayHint = InlayHint = {})); -var WorkspaceFolder; -exports.WorkspaceFolder = WorkspaceFolder; -(function (WorkspaceFolder) { - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); +})); +Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule; } - WorkspaceFolder.is = is; -})(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {})); -var EOL = ['\n', '\r\n', '\r']; -/** - * @deprecated Use the text document from the new vscode-languageserver-textdocument package. - */ -exports.EOL = EOL; -var TextDocument; -exports.TextDocument = TextDocument; -(function (TextDocument) { - /** - * Creates a new ITextDocument literal from the given uri and content. - * @param uri The document's uri. - * @param languageId The document's language Id. - * @param version The document's version. - * @param content The document's content. - */ - function create(uri, languageId, version, content) { - return new FullTextDocument(uri, languageId, version, content); +})); +Object.defineProperty(exports, "UniqueArgumentNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueArgumentNamesRule.UniqueArgumentNamesRule; } - TextDocument.create = create; - /** - * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. - */ - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; +})); +Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule; } - TextDocument.is = is; - function applyEdits(document, edits) { - var text = document.getText(); - var sortedEdits = mergeSort(edits, function (a, b) { - var diff = a.range.start.line - b.range.start.line; - if (diff === 0) { - return a.range.start.character - b.range.start.character; - } - return diff; - }); - var lastModifiedOffset = text.length; - for (var i = sortedEdits.length - 1; i >= 0; i--) { - var e = sortedEdits[i]; - var startOffset = document.offsetAt(e.range.start); - var endOffset = document.offsetAt(e.range.end); - if (endOffset <= lastModifiedOffset) { - text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); - } else { - throw new Error('Overlapping edit'); - } - lastModifiedOffset = startOffset; - } - return text; +})); +Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({ + enumerable: true, + get: function () { + return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule; } - TextDocument.applyEdits = applyEdits; - function mergeSort(data, compare) { - if (data.length <= 1) { - // sorted - return data; - } - var p = data.length / 2 | 0; - var left = data.slice(0, p); - var right = data.slice(p); - mergeSort(left, compare); - mergeSort(right, compare); - var leftIdx = 0; - var rightIdx = 0; - var i = 0; - while (leftIdx < left.length && rightIdx < right.length) { - var ret = compare(left[leftIdx], right[rightIdx]); - if (ret <= 0) { - // smaller_equal -> take left to preserve order - data[i++] = left[leftIdx++]; - } else { - // greater -> take right - data[i++] = right[rightIdx++]; - } - } - while (leftIdx < left.length) { - data[i++] = left[leftIdx++]; - } - while (rightIdx < right.length) { - data[i++] = right[rightIdx++]; - } - return data; +})); +Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule; } -})(TextDocument || (exports.TextDocument = TextDocument = {})); -/** - * @deprecated Use the text document from the new vscode-languageserver-textdocument package. - */ -var FullTextDocument = /** @class */function () { - function FullTextDocument(uri, languageId, version, content) { - this._uri = uri; - this._languageId = languageId; - this._version = version; - this._content = content; - this._lineOffsets = undefined; +})); +Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule; } - Object.defineProperty(FullTextDocument.prototype, "uri", { - get: function () { - return this._uri; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(FullTextDocument.prototype, "languageId", { - get: function () { - return this._languageId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(FullTextDocument.prototype, "version", { - get: function () { - return this._version; - }, - enumerable: false, - configurable: true - }); - FullTextDocument.prototype.getText = function (range) { - if (range) { - var start = this.offsetAt(range.start); - var end = this.offsetAt(range.end); - return this._content.substring(start, end); - } - return this._content; - }; - FullTextDocument.prototype.update = function (event, version) { - this._content = event.text; - this._version = version; - this._lineOffsets = undefined; - }; - FullTextDocument.prototype.getLineOffsets = function () { - if (this._lineOffsets === undefined) { - var lineOffsets = []; - var text = this._content; - var isLineStart = true; - for (var i = 0; i < text.length; i++) { - if (isLineStart) { - lineOffsets.push(i); - isLineStart = false; - } - var ch = text.charAt(i); - isLineStart = ch === '\r' || ch === '\n'; - if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { - i++; - } - } - if (isLineStart && text.length > 0) { - lineOffsets.push(text.length); - } - this._lineOffsets = lineOffsets; - } - return this._lineOffsets; - }; - FullTextDocument.prototype.positionAt = function (offset) { - offset = Math.max(Math.min(offset, this._content.length), 0); - var lineOffsets = this.getLineOffsets(); - var low = 0, - high = lineOffsets.length; - if (high === 0) { - return Position.create(0, offset); - } - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (lineOffsets[mid] > offset) { - high = mid; - } else { - low = mid + 1; - } - } - // low is the least x for which the line offset is larger than the current offset - // or array.length if no line offset is larger than the current offset - var line = low - 1; - return Position.create(line, offset - lineOffsets[line]); - }; - FullTextDocument.prototype.offsetAt = function (position) { - var lineOffsets = this.getLineOffsets(); - if (position.line >= lineOffsets.length) { - return this._content.length; - } else if (position.line < 0) { - return 0; - } - var lineOffset = lineOffsets[position.line]; - var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; - return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); - }; - Object.defineProperty(FullTextDocument.prototype, "lineCount", { - get: function () { - return this.getLineOffsets().length; - }, - enumerable: false, - configurable: true - }); - return FullTextDocument; -}(); -var Is; -(function (Is) { - var toString = Object.prototype.toString; - function defined(value) { - return typeof value !== 'undefined'; +})); +Object.defineProperty(exports, "UniqueFragmentNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueFragmentNamesRule.UniqueFragmentNamesRule; } - Is.defined = defined; - function undefined(value) { - return typeof value === 'undefined'; +})); +Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule; } - Is.undefined = undefined; - function boolean(value) { - return value === true || value === false; +})); +Object.defineProperty(exports, "UniqueOperationNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueOperationNamesRule.UniqueOperationNamesRule; } - Is.boolean = boolean; - function string(value) { - return toString.call(value) === '[object String]'; +})); +Object.defineProperty(exports, "UniqueOperationTypesRule", ({ + enumerable: true, + get: function () { + return _UniqueOperationTypesRule.UniqueOperationTypesRule; } - Is.string = string; - function number(value) { - return toString.call(value) === '[object Number]'; +})); +Object.defineProperty(exports, "UniqueTypeNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueTypeNamesRule.UniqueTypeNamesRule; } - Is.number = number; - function numberRange(value, min, max) { - return toString.call(value) === '[object Number]' && min <= value && value <= max; +})); +Object.defineProperty(exports, "UniqueVariableNamesRule", ({ + enumerable: true, + get: function () { + return _UniqueVariableNamesRule.UniqueVariableNamesRule; } - Is.numberRange = numberRange; - function integer(value) { - return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; +})); +Object.defineProperty(exports, "ValidationContext", ({ + enumerable: true, + get: function () { + return _ValidationContext.ValidationContext; } - Is.integer = integer; - function uinteger(value) { - return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; +})); +Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({ + enumerable: true, + get: function () { + return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule; } - Is.uinteger = uinteger; - function func(value) { - return toString.call(value) === '[object Function]'; +})); +Object.defineProperty(exports, "VariablesAreInputTypesRule", ({ + enumerable: true, + get: function () { + return _VariablesAreInputTypesRule.VariablesAreInputTypesRule; } - Is.func = func; - function objectLiteral(value) { - // Strictly speaking class instances pass this check as well. Since the LSP - // doesn't use classes we ignore this for now. If we do we need to add something - // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` - return value !== null && typeof value === 'object'; +})); +Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({ + enumerable: true, + get: function () { + return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule; } - Is.objectLiteral = objectLiteral; - function typedArray(value, check) { - return Array.isArray(value) && value.every(check); +})); +Object.defineProperty(exports, "recommendedRules", ({ + enumerable: true, + get: function () { + return _specifiedRules.recommendedRules; } - Is.typedArray = typedArray; -})(Is || (Is = {})); - -/***/ }), - -/***/ "../../graphiql-react/dist/SchemaReference.cjs.js": -/*!********************************************************!*\ - !*** ../../graphiql-react/dist/SchemaReference.cjs.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -var m = Object.defineProperty; -var l = (n, r) => m(n, "name", { - value: r, - configurable: !0 -}); -const t = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"), - s = __webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js"); -function o(n, r) { - const e = { - schema: n, - type: null, - parentType: null, - inputType: null, - directiveDef: null, - fieldDef: null, - argDef: null, - argDefs: null, - objectFieldDefs: null - }; - return s.forEachState(r, i => { - var a, c; - switch (i.kind) { - case "Query": - case "ShortQuery": - e.type = n.getQueryType(); - break; - case "Mutation": - e.type = n.getMutationType(); - break; - case "Subscription": - e.type = n.getSubscriptionType(); - break; - case "InlineFragment": - case "FragmentDefinition": - i.type && (e.type = n.getType(i.type)); - break; - case "Field": - case "AliasedField": - e.fieldDef = e.type && i.name ? T(n, e.parentType, i.name) : null, e.type = (a = e.fieldDef) === null || a === void 0 ? void 0 : a.type; - break; - case "SelectionSet": - e.parentType = e.type ? t.getNamedType(e.type) : null; - break; - case "Directive": - e.directiveDef = i.name ? n.getDirective(i.name) : null; - break; - case "Arguments": - const f = i.prevState ? i.prevState.kind === "Field" ? e.fieldDef : i.prevState.kind === "Directive" ? e.directiveDef : i.prevState.kind === "AliasedField" ? i.prevState.name && T(n, e.parentType, i.prevState.name) : null : null; - e.argDefs = f ? f.args : null; - break; - case "Argument": - if (e.argDef = null, e.argDefs) { - for (let u = 0; u < e.argDefs.length; u++) if (e.argDefs[u].name === i.name) { - e.argDef = e.argDefs[u]; - break; - } - } - e.inputType = (c = e.argDef) === null || c === void 0 ? void 0 : c.type; - break; - case "EnumValue": - const d = e.inputType ? t.getNamedType(e.inputType) : null; - e.enumValue = d instanceof t.GraphQLEnumType ? b(d.getValues(), u => u.value === i.name) : null; - break; - case "ListValue": - const g = e.inputType ? t.getNullableType(e.inputType) : null; - e.inputType = g instanceof t.GraphQLList ? g.ofType : null; - break; - case "ObjectValue": - const y = e.inputType ? t.getNamedType(e.inputType) : null; - e.objectFieldDefs = y instanceof t.GraphQLInputObjectType ? y.getFields() : null; - break; - case "ObjectField": - const p = i.name && e.objectFieldDefs ? e.objectFieldDefs[i.name] : null; - e.inputType = p == null ? void 0 : p.type; - break; - case "NamedType": - e.type = i.name ? n.getType(i.name) : null; - break; - } - }), e; -} -l(o, "getTypeInfo"); -function T(n, r, e) { - if (e === t.SchemaMetaFieldDef.name && n.getQueryType() === r) return t.SchemaMetaFieldDef; - if (e === t.TypeMetaFieldDef.name && n.getQueryType() === r) return t.TypeMetaFieldDef; - if (e === t.TypeNameMetaFieldDef.name && t.isCompositeType(r)) return t.TypeNameMetaFieldDef; - if (r && r.getFields) return r.getFields()[e]; -} -l(T, "getFieldDef"); -function b(n, r) { - for (let e = 0; e < n.length; e++) if (r(n[e])) return n[e]; -} -l(b, "find"); -function v(n) { - return { - kind: "Field", - schema: n.schema, - field: n.fieldDef, - type: D(n.fieldDef) ? null : n.parentType - }; -} -l(v, "getFieldReference"); -function F(n) { - return { - kind: "Directive", - schema: n.schema, - directive: n.directiveDef - }; -} -l(F, "getDirectiveReference"); -function k(n) { - return n.directiveDef ? { - kind: "Argument", - schema: n.schema, - argument: n.argDef, - directive: n.directiveDef - } : { - kind: "Argument", - schema: n.schema, - argument: n.argDef, - field: n.fieldDef, - type: D(n.fieldDef) ? null : n.parentType - }; -} -l(k, "getArgumentReference"); -function S(n) { - return { - kind: "EnumValue", - value: n.enumValue || void 0, - type: n.inputType ? t.getNamedType(n.inputType) : void 0 - }; -} -l(S, "getEnumValueReference"); -function h(n, r) { - return { - kind: "Type", - schema: n.schema, - type: r || n.type - }; -} -l(h, "getTypeReference"); -function D(n) { - return n.name.slice(0, 2) === "__"; -} -l(D, "isMetaField"); -exports.getArgumentReference = k; -exports.getDirectiveReference = F; -exports.getEnumValueReference = S; -exports.getFieldReference = v; -exports.getTypeInfo = o; -exports.getTypeReference = h; +})); +Object.defineProperty(exports, "specifiedRules", ({ + enumerable: true, + get: function () { + return _specifiedRules.specifiedRules; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.validate; + } +})); +var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs"); +var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs"); +var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs"); +var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs"); +var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs"); +var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs"); +var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs"); +var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs"); +var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs"); +var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs"); +var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs"); +var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs"); +var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs"); +var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs"); +var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs"); +var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs"); +var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs"); +var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs"); +var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs"); +var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs"); +var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs"); +var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs"); +var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs"); +var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs"); +var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs"); +var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs"); +var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs"); +var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs"); +var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs"); +var _MaxIntrospectionDepthRule = __webpack_require__(/*! ./rules/MaxIntrospectionDepthRule.mjs */ "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs"); +var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs"); +var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs"); +var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs"); +var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs"); +var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs"); +var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs"); +var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs"); +var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs"); +var _NoDeprecatedCustomRule = __webpack_require__(/*! ./rules/custom/NoDeprecatedCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs"); +var _NoSchemaIntrospectionCustomRule = __webpack_require__(/*! ./rules/custom/NoSchemaIntrospectionCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs"); /***/ }), -/***/ "../../graphiql-react/dist/brace-fold.cjs.js": -/*!***************************************************!*\ - !*** ../../graphiql-react/dist/brace-fold.cjs.js ***! - \***************************************************/ +/***/ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs": +/*!************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs ***! + \************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var S = Object.defineProperty; -var y = (d, L) => S(d, "name", { - value: L, - configurable: !0 -}); -const _ = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function m(d, L) { - for (var e = 0; e < L.length; e++) { - const g = L[e]; - if (typeof g != "string" && !Array.isArray(g)) { - for (const t in g) if (t !== "default" && !(t in d)) { - const a = Object.getOwnPropertyDescriptor(g, t); - a && Object.defineProperty(d, t, a.get ? a : { - enumerable: !0, - get: () => g[t] - }); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ExecutableDefinitionsRule = ExecutableDefinitionsRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +/** + * Executable definitions + * + * A GraphQL document is only valid for execution if all definitions are either + * operation or fragment definitions. + * + * See https://spec.graphql.org/draft/#sec-Executable-Definitions + */ +function ExecutableDefinitionsRule(context) { + return { + Document(node) { + for (const definition of node.definitions) { + if (!(0, _predicates.isExecutableDefinitionNode)(definition)) { + const defName = definition.kind === _kinds.Kind.SCHEMA_DEFINITION || definition.kind === _kinds.Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"'; + context.reportError(new _GraphQLError.GraphQLError(`The ${defName} definition is not executable.`, { + nodes: definition + })); + } } + return false; } - } - return Object.freeze(Object.defineProperty(d, Symbol.toStringTag, { - value: "Module" - })); + }; } -y(m, "_mergeNamespaces"); -var I = { - exports: {} -}; -(function (d, L) { - (function (e) { - e(_.requireCodemirror()); - })(function (e) { - function g(t) { - return function (a, f) { - var n = f.line, - o = a.getLine(n); - function v(l) { - for (var u, c = f.ch, h = 0;;) { - var b = c <= 0 ? -1 : o.lastIndexOf(l[0], c - 1); - if (b == -1) { - if (h == 1) break; - h = 1, c = o.length; - continue; - } - if (h == 1 && b < f.ch) break; - if (u = a.getTokenTypeAt(e.Pos(n, b + 1)), !/^(comment|string)/.test(u)) return { - ch: b + 1, - tokenType: u, - pair: l - }; - c = b - 1; - } - } - y(v, "findOpening"); - function k(l) { - var u = 1, - c = a.lastLine(), - h, - b = l.ch, - j; - e: for (var T = n; T <= c; ++T) for (var A = a.getLine(T), p = T == n ? b : 0;;) { - var F = A.indexOf(l.pair[0], p), - O = A.indexOf(l.pair[1], p); - if (F < 0 && (F = A.length), O < 0 && (O = A.length), p = Math.min(F, O), p == A.length) break; - if (a.getTokenTypeAt(e.Pos(T, p + 1)) == l.tokenType) { - if (p == F) ++u;else if (! --u) { - h = T, j = p; - break e; - } - } - ++p; - } - return h == null || n == h ? null : { - from: e.Pos(n, b), - to: e.Pos(h, j) - }; - } - y(k, "findRange"); - for (var i = [], r = 0; r < t.length; r++) { - var s = v(t[r]); - s && i.push(s); - } - i.sort(function (l, u) { - return l.ch - u.ch; - }); - for (var r = 0; r < i.length; r++) { - var P = k(i[r]); - if (P) return P; - } - return null; - }; - } - y(g, "bracketFolding"), e.registerHelper("fold", "brace", g([["{", "}"], ["[", "]"]])), e.registerHelper("fold", "brace-paren", g([["{", "}"], ["[", "]"], ["(", ")"]])), e.registerHelper("fold", "import", function (t, a) { - function f(r) { - if (r < t.firstLine() || r > t.lastLine()) return null; - var s = t.getTokenAt(e.Pos(r, 1)); - if (/\S/.test(s.string) || (s = t.getTokenAt(e.Pos(r, s.end + 1))), s.type != "keyword" || s.string != "import") return null; - for (var P = r, l = Math.min(t.lastLine(), r + 10); P <= l; ++P) { - var u = t.getLine(P), - c = u.indexOf(";"); - if (c != -1) return { - startCh: s.end, - end: e.Pos(P, c) - }; - } - } - y(f, "hasImport"); - var n = a.line, - o = f(n), - v; - if (!o || f(n - 1) || (v = f(n - 2)) && v.end.line == n - 1) return null; - for (var k = o.end;;) { - var i = f(k.line + 1); - if (i == null) break; - k = i.end; - } - return { - from: t.clipPos(e.Pos(n, o.startCh + 1)), - to: k - }; - }), e.registerHelper("fold", "include", function (t, a) { - function f(i) { - if (i < t.firstLine() || i > t.lastLine()) return null; - var r = t.getTokenAt(e.Pos(i, 1)); - if (/\S/.test(r.string) || (r = t.getTokenAt(e.Pos(i, r.end + 1))), r.type == "meta" && r.string.slice(0, 8) == "#include") return r.start + 8; - } - y(f, "hasInclude"); - var n = a.line, - o = f(n); - if (o == null || f(n - 1) != null) return null; - for (var v = n;;) { - var k = f(v + 1); - if (k == null) break; - ++v; - } - return { - from: e.Pos(n, o + 1), - to: t.clipPos(e.Pos(v)) - }; - }); - }); -})(); -var H = I.exports; -const q = _.getDefaultExportFromCjs(H), - w = m({ - __proto__: null, - default: q - }, [H]); -exports.braceFold = w; /***/ }), -/***/ "../../graphiql-react/dist/closebrackets.cjs.js": -/*!******************************************************!*\ - !*** ../../graphiql-react/dist/closebrackets.cjs.js ***! - \******************************************************/ +/***/ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs": +/*!**********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs ***! + \**********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var G = Object.defineProperty; -var f = (S, P) => G(S, "name", { - value: P, - configurable: !0 -}); -const q = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function H(S, P) { - for (var a = 0; a < P.length; a++) { - const c = P[a]; - if (typeof c != "string" && !Array.isArray(c)) { - for (const i in c) if (i !== "default" && !(i in S)) { - const v = Object.getOwnPropertyDescriptor(c, i); - v && Object.defineProperty(S, i, v.get ? v : { - enumerable: !0, - get: () => c[i] - }); - } - } - } - return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { - value: "Module" - })); -} -f(H, "_mergeNamespaces"); -var J = { - exports: {} -}; -(function (S, P) { - (function (a) { - a(q.requireCodemirror()); - })(function (a) { - var c = { - pairs: `()[]{}''""`, - closeBefore: `)]}'":;>`, - triples: "", - explode: "[]{}" - }, - i = a.Pos; - a.defineOption("autoCloseBrackets", !1, function (e, t, n) { - n && n != a.Init && (e.removeKeyMap(B), e.state.closeBrackets = null), t && (_(v(t, "pairs")), e.state.closeBrackets = t, e.addKeyMap(B)); - }); - function v(e, t) { - return t == "pairs" && typeof e == "string" ? e : typeof e == "object" && e[t] != null ? e[t] : c[t]; - } - f(v, "getOption"); - var B = { - Backspace: L, - Enter: W - }; - function _(e) { - for (var t = 0; t < e.length; t++) { - var n = e.charAt(t), - s = "'" + n + "'"; - B[s] || (B[s] = K(n)); - } - } - f(_, "ensureBound"), _(c.pairs + "`"); - function K(e) { - return function (t) { - return z(t, e); - }; - } - f(K, "handler"); - function x(e) { - var t = e.state.closeBrackets; - if (!t || t.override) return t; - var n = e.getModeAt(e.getCursor()); - return n.closeBrackets || t; - } - f(x, "getConfig"); - function L(e) { - var t = x(e); - if (!t || e.getOption("disableInput")) return a.Pass; - for (var n = v(t, "pairs"), s = e.listSelections(), r = 0; r < s.length; r++) { - if (!s[r].empty()) return a.Pass; - var h = w(e, s[r].head); - if (!h || n.indexOf(h) % 2 != 0) return a.Pass; - } - for (var r = s.length - 1; r >= 0; r--) { - var o = s[r].head; - e.replaceRange("", i(o.line, o.ch - 1), i(o.line, o.ch + 1), "+delete"); - } - } - f(L, "handleBackspace"); - function W(e) { - var t = x(e), - n = t && v(t, "explode"); - if (!n || e.getOption("disableInput")) return a.Pass; - for (var s = e.listSelections(), r = 0; r < s.length; r++) { - if (!s[r].empty()) return a.Pass; - var h = w(e, s[r].head); - if (!h || n.indexOf(h) % 2 != 0) return a.Pass; - } - e.operation(function () { - var o = e.lineSeparator() || ` -`; - e.replaceSelection(o + o, null), O(e, -1), s = e.listSelections(); - for (var g = 0; g < s.length; g++) { - var A = s[g].head.line; - e.indentLine(A, null, !0), e.indentLine(A + 1, null, !0); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule; +var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _naturalCompare = __webpack_require__(/*! ../../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs"); +var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Fields on correct type + * + * A GraphQL document is only valid if all fields selected are defined by the + * parent type, or are an allowed meta field such as __typename. + * + * See https://spec.graphql.org/draft/#sec-Field-Selections + */ +function FieldsOnCorrectTypeRule(context) { + return { + Field(node) { + const type = context.getParentType(); + if (type) { + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + // This field doesn't exist, lets look for suggestions. + const schema = context.getSchema(); + const fieldName = node.name.value; // First determine if there are any suggested types to condition on. + + let suggestion = (0, _didYouMean.didYouMean)('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo? + + if (suggestion === '') { + suggestion = (0, _didYouMean.didYouMean)(getSuggestedFieldNames(type, fieldName)); + } // Report an error, including helpful suggestions. + + context.reportError(new _GraphQLError.GraphQLError(`Cannot query field "${fieldName}" on type "${type.name}".` + suggestion, { + nodes: node + })); } - }); - } - f(W, "handleEnter"); - function O(e, t) { - for (var n = [], s = e.listSelections(), r = 0, h = 0; h < s.length; h++) { - var o = s[h]; - o.head == e.getCursor() && (r = h); - var g = o.head.ch || t > 0 ? { - line: o.head.line, - ch: o.head.ch + t - } : { - line: o.head.line - 1 - }; - n.push({ - anchor: g, - head: g - }); } - e.setSelections(n, r); } - f(O, "moveSel"); - function $(e) { - var t = a.cmpPos(e.anchor, e.head) > 0; - return { - anchor: new i(e.anchor.line, e.anchor.ch + (t ? -1 : 1)), - head: new i(e.head.line, e.head.ch + (t ? 1 : -1)) - }; - } - f($, "contractSelection"); - function z(e, t) { - var n = x(e); - if (!n || e.getOption("disableInput")) return a.Pass; - var s = v(n, "pairs"), - r = s.indexOf(t); - if (r == -1) return a.Pass; - for (var h = v(n, "closeBefore"), o = v(n, "triples"), g = s.charAt(r + 1) == t, A = e.listSelections(), R = r % 2 == 0, b, j = 0; j < A.length; j++) { - var I = A[j], - l = I.head, - u, - y = e.getRange(l, i(l.line, l.ch + 1)); - if (R && !I.empty()) u = "surround";else if ((g || !R) && y == t) g && N(e, l) ? u = "both" : o.indexOf(t) >= 0 && e.getRange(l, i(l.line, l.ch + 3)) == t + t + t ? u = "skipThree" : u = "skip";else if (g && l.ch > 1 && o.indexOf(t) >= 0 && e.getRange(i(l.line, l.ch - 2), l) == t + t) { - if (l.ch > 2 && /\bstring/.test(e.getTokenTypeAt(i(l.line, l.ch - 2)))) return a.Pass; - u = "addFour"; - } else if (g) { - var F = l.ch == 0 ? " " : e.getRange(i(l.line, l.ch - 1), l); - if (!a.isWordChar(y) && F != t && !a.isWordChar(F)) u = "both";else return a.Pass; - } else if (R && (y.length === 0 || /\s/.test(y) || h.indexOf(y) > -1)) u = "both";else return a.Pass; - if (!b) b = u;else if (b != u) return a.Pass; - } - var k = r % 2 ? s.charAt(r - 1) : t, - E = r % 2 ? t : s.charAt(r + 1); - e.operation(function () { - if (b == "skip") O(e, 1);else if (b == "skipThree") O(e, 3);else if (b == "surround") { - for (var p = e.getSelections(), d = 0; d < p.length; d++) p[d] = k + p[d] + E; - e.replaceSelections(p, "around"), p = e.listSelections().slice(); - for (var d = 0; d < p.length; d++) p[d] = $(p[d]); - e.setSelections(p); - } else b == "both" ? (e.replaceSelection(k + E, null), e.triggerElectric(k + E), O(e, -1)) : b == "addFour" && (e.replaceSelection(k + k + k + k, "before"), O(e, 1)); - }); + }; +} +/** + * Go through all of the implementations of type, as well as the interfaces that + * they implement. If any of those types include the provided field, suggest them, + * sorted by how often the type is referenced. + */ + +function getSuggestedTypeNames(schema, type, fieldName) { + if (!(0, _definition.isAbstractType)(type)) { + // Must be an Object type, which does not have possible fields. + return []; + } + const suggestedTypes = new Set(); + const usageCount = Object.create(null); + for (const possibleType of schema.getPossibleTypes(type)) { + if (!possibleType.getFields()[fieldName]) { + continue; + } // This object type defines this field. + + suggestedTypes.add(possibleType); + usageCount[possibleType.name] = 1; + for (const possibleInterface of possibleType.getInterfaces()) { + var _usageCount$possibleI; + if (!possibleInterface.getFields()[fieldName]) { + continue; + } // This interface type defines this field. + + suggestedTypes.add(possibleInterface); + usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; } - f(z, "handleChar"); - function w(e, t) { - var n = e.getRange(i(t.line, t.ch - 1), i(t.line, t.ch + 1)); - return n.length == 2 ? n : null; + } + return [...suggestedTypes].sort((typeA, typeB) => { + // Suggest both interface and object types based on how common they are. + const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; + if (usageCountDiff !== 0) { + return usageCountDiff; + } // Suggest super types first followed by subtypes + + if ((0, _definition.isInterfaceType)(typeA) && schema.isSubType(typeA, typeB)) { + return -1; } - f(w, "charsAround"); - function N(e, t) { - var n = e.getTokenAt(i(t.line, t.ch + 1)); - return /\bstring/.test(n.type) && n.start == t.ch && (t.ch == 0 || !/\bstring/.test(e.getTokenTypeAt(t))); + if ((0, _definition.isInterfaceType)(typeB) && schema.isSubType(typeB, typeA)) { + return 1; } - f(N, "stringStartsAfter"); - }); -})(); -var D = J.exports; -const Q = q.getDefaultExportFromCjs(D), - T = H({ - __proto__: null, - default: Q - }, [D]); -exports.closebrackets = T; + return (0, _naturalCompare.naturalCompare)(typeA.name, typeB.name); + }).map(x => x.name); +} +/** + * For the field name provided, determine if there are any similar field names + * that may be the result of a typo. + */ + +function getSuggestedFieldNames(type, fieldName) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + const possibleFieldNames = Object.keys(type.getFields()); + return (0, _suggestionList.suggestionList)(fieldName, possibleFieldNames); + } // Otherwise, must be a Union type, which does not define fields. + + return []; +} /***/ }), -/***/ "../../graphiql-react/dist/codemirror.cjs.js": -/*!***************************************************!*\ - !*** ../../graphiql-react/dist/codemirror.cjs.js ***! - \***************************************************/ +/***/ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs": +/*!****************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs ***! + \****************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var u = Object.defineProperty; -var n = (r, t) => u(r, "name", { - value: t, - configurable: !0 -}); -const s = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function a(r, t) { - for (var i = 0; i < t.length; i++) { - const e = t[i]; - if (typeof e != "string" && !Array.isArray(e)) { - for (const o in e) if (o !== "default" && !(o in r)) { - const c = Object.getOwnPropertyDescriptor(e, o); - c && Object.defineProperty(r, o, c.get ? c : { - enumerable: !0, - get: () => e[o] - }); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +/** + * Fragments on composite type + * + * Fragments use a type condition to determine if they apply, since fragments + * can only be spread into a composite type (object, interface, or union), the + * type condition must also be a composite type. + * + * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types + */ +function FragmentsOnCompositeTypesRule(context) { + return { + InlineFragment(node) { + const typeCondition = node.typeCondition; + if (typeCondition) { + const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition); + if (type && !(0, _definition.isCompositeType)(type)) { + const typeStr = (0, _printer.print)(typeCondition); + context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot condition on non composite type "${typeStr}".`, { + nodes: typeCondition + })); + } + } + }, + FragmentDefinition(node) { + const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.typeCondition); + if (type && !(0, _definition.isCompositeType)(type)) { + const typeStr = (0, _printer.print)(node.typeCondition); + context.reportError(new _GraphQLError.GraphQLError(`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, { + nodes: node.typeCondition + })); } } - } - return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { - value: "Module" - })); + }; } -n(a, "_mergeNamespaces"); -var d = s.requireCodemirror(); -const f = s.getDefaultExportFromCjs(d), - l = a({ - __proto__: null, - default: f - }, [d]); -exports.CodeMirror = f; -exports.codemirror = l; /***/ }), -/***/ "../../graphiql-react/dist/codemirror.cjs2.js": -/*!****************************************************!*\ - !*** ../../graphiql-react/dist/codemirror.cjs2.js ***! - \****************************************************/ +/***/ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs": +/*!*********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs ***! + \*********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var su = Object.defineProperty; -var u = (He, Dn) => su(He, "name", { - value: Dn, - configurable: !0 -}); -var uu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof __webpack_require__.g < "u" ? __webpack_require__.g : typeof self < "u" ? self : {}; -function fu(He) { - return He && He.__esModule && Object.prototype.hasOwnProperty.call(He, "default") ? He.default : He; -} -u(fu, "getDefaultExportFromCjs"); -var Mn = { - exports: {} - }, - Ko; -function hu() { - return Ko || (Ko = 1, function (He, Dn) { - (function (ie, Lr) { - He.exports = Lr(); - })(uu, function () { - var ie = navigator.userAgent, - Lr = navigator.platform, - Fe = /gecko\/\d/i.test(ie), - Nn = /MSIE \d/.test(ie), - An = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie), - kr = /Edge\/(\d+)/.exec(ie), - O = Nn || An || kr, - I = O && (Nn ? document.documentMode || 6 : +(kr || An)[1]), - ne = !kr && /WebKit\//.test(ie), - _o = ne && /Qt\/\d+\.\d+/.test(ie), - Tr = !kr && /Chrome\//.test(ie), - we = /Opera\//.test(ie), - Mr = /Apple Computer/.test(navigator.vendor), - Xo = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie), - Yo = /PhantomJS/.test(ie), - Ut = Mr && (/Mobile\/\w+/.test(ie) || navigator.maxTouchPoints > 2), - Dr = /Android/.test(ie), - Kt = Ut || Dr || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie), - me = Ut || /Mac/.test(Lr), - qo = /\bCrOS\b/.test(ie), - Zo = /win/i.test(Lr), - et = we && ie.match(/Version\/(\d*\.\d*)/); - et && (et = Number(et[1])), et && et >= 15 && (we = !1, ne = !0); - var On = me && (_o || we && (et == null || et < 12.11)), - ci = Fe || O && I >= 9; - function mt(e) { - return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*"); - } - u(mt, "classTest"); - var tt = u(function (e, t) { - var i = e.className, - r = mt(t).exec(i); - if (r) { - var n = i.slice(r.index + r[0].length); - e.className = i.slice(0, r.index) + (n ? r[1] + n : ""); - } - }, "rmClass"); - function Ue(e) { - for (var t = e.childNodes.length; t > 0; --t) e.removeChild(e.firstChild); - return e; - } - u(Ue, "removeChildren"); - function ve(e, t) { - return Ue(e).appendChild(t); - } - u(ve, "removeChildrenAndAdd"); - function T(e, t, i, r) { - var n = document.createElement(e); - if (i && (n.className = i), r && (n.style.cssText = r), typeof t == "string") n.appendChild(document.createTextNode(t));else if (t) for (var l = 0; l < t.length; ++l) n.appendChild(t[l]); - return n; - } - u(T, "elt"); - function bt(e, t, i, r) { - var n = T(e, t, i, r); - return n.setAttribute("role", "presentation"), n; - } - u(bt, "eltP"); - var rt; - document.createRange ? rt = u(function (e, t, i, r) { - var n = document.createRange(); - return n.setEnd(r || e, i), n.setStart(e, t), n; - }, "range") : rt = u(function (e, t, i) { - var r = document.body.createTextRange(); - try { - r.moveToElementText(e.parentNode); - } catch { - return r; - } - return r.collapse(!0), r.moveEnd("character", i), r.moveStart("character", t), r; - }, "range"); - function Ke(e, t) { - if (t.nodeType == 3 && (t = t.parentNode), e.contains) return e.contains(t); - do if (t.nodeType == 11 && (t = t.host), t == e) return !0; while (t = t.parentNode); - } - u(Ke, "contains"); - function be() { - var e; - try { - e = document.activeElement; - } catch { - e = document.body || null; - } - for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement; - return e; - } - u(be, "activeElt"); - function it(e, t) { - var i = e.className; - mt(t).test(i) || (e.className += (i ? " " : "") + t); - } - u(it, "addClass"); - function di(e, t) { - for (var i = e.split(" "), r = 0; r < i.length; r++) i[r] && !mt(i[r]).test(t) && (t += " " + i[r]); - return t; - } - u(di, "joinClasses"); - var _t = u(function (e) { - e.select(); - }, "selectInput"); - Ut ? _t = u(function (e) { - e.selectionStart = 0, e.selectionEnd = e.value.length; - }, "selectInput") : O && (_t = u(function (e) { - try { - e.select(); - } catch {} - }, "selectInput")); - function pi(e) { - var t = Array.prototype.slice.call(arguments, 1); - return function () { - return e.apply(null, t); - }; - } - u(pi, "bind"); - function nt(e, t, i) { - t || (t = {}); - for (var r in e) e.hasOwnProperty(r) && (i !== !1 || !t.hasOwnProperty(r)) && (t[r] = e[r]); - return t; - } - u(nt, "copyObj"); - function xe(e, t, i, r, n) { - t == null && (t = e.search(/[^\s\u00a0]/), t == -1 && (t = e.length)); - for (var l = r || 0, o = n || 0;;) { - var a = e.indexOf(" ", l); - if (a < 0 || a >= t) return o + (t - l); - o += a - l, o += i - o % i, l = a + 1; - } - } - u(xe, "countColumn"); - var _e = u(function () { - this.id = null, this.f = null, this.time = 0, this.handler = pi(this.onTimeout, this); - }, "Delayed"); - _e.prototype.onTimeout = function (e) { - e.id = 0, e.time <= +new Date() ? e.f() : setTimeout(e.handler, e.time - +new Date()); - }, _e.prototype.set = function (e, t) { - this.f = t; - var i = +new Date() + e; - (!this.id || i < this.time) && (clearTimeout(this.id), this.id = setTimeout(this.handler, e), this.time = i); - }; - function ee(e, t) { - for (var i = 0; i < e.length; ++i) if (e[i] == t) return i; - return -1; - } - u(ee, "indexOf"); - var Wn = 50, - Nr = { - toString: function () { - return "CodeMirror.Pass"; - } - }, - Me = { - scroll: !1 - }, - vi = { - origin: "*mouse" - }, - Xt = { - origin: "+move" - }; - function gi(e, t, i) { - for (var r = 0, n = 0;;) { - var l = e.indexOf(" ", r); - l == -1 && (l = e.length); - var o = l - r; - if (l == e.length || n + o >= t) return r + Math.min(o, t - n); - if (n += l - r, n += i - n % i, r = l + 1, n >= t) return r; - } - } - u(gi, "findColumn"); - var Ar = [""]; - function yi(e) { - for (; Ar.length <= e;) Ar.push(H(Ar) + " "); - return Ar[e]; - } - u(yi, "spaceStr"); - function H(e) { - return e[e.length - 1]; - } - u(H, "lst"); - function Or(e, t) { - for (var i = [], r = 0; r < e.length; r++) i[r] = t(e[r], r); - return i; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule; +exports.KnownArgumentNamesRule = KnownArgumentNamesRule; +var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +/** + * Known argument names + * + * A GraphQL field is only valid if all supplied arguments are defined by + * that field. + * + * See https://spec.graphql.org/draft/#sec-Argument-Names + * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations + */ +function KnownArgumentNamesRule(context) { + return { + // eslint-disable-next-line new-cap + ...KnownArgumentNamesOnDirectivesRule(context), + Argument(argNode) { + const argDef = context.getArgument(); + const fieldDef = context.getFieldDef(); + const parentType = context.getParentType(); + if (!argDef && fieldDef && parentType) { + const argName = argNode.name.value; + const knownArgsNames = fieldDef.args.map(arg => arg.name); + const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgsNames); + context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + (0, _didYouMean.didYouMean)(suggestions), { + nodes: argNode + })); } - u(Or, "map"); - function Qo(e, t, i) { - for (var r = 0, n = i(t); r < e.length && i(e[r]) <= n;) r++; - e.splice(r, 0, t); - } - u(Qo, "insertSorted"); - function Hn() {} - u(Hn, "nothing"); - function Fn(e, t) { - var i; - return Object.create ? i = Object.create(e) : (Hn.prototype = e, i = new Hn()), t && nt(t, i), i; - } - u(Fn, "createObj"); - var Jo = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; - function mi(e) { - return /\w/.test(e) || e > "€" && (e.toUpperCase() != e.toLowerCase() || Jo.test(e)); - } - u(mi, "isWordCharBasic"); - function Wr(e, t) { - return t ? t.source.indexOf("\\w") > -1 && mi(e) ? !0 : t.test(e) : mi(e); - } - u(Wr, "isWordChar"); - function Pn(e) { - for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1; - return !0; - } - u(Pn, "isEmpty"); - var jo = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; - function bi(e) { - return e.charCodeAt(0) >= 768 && jo.test(e); - } - u(bi, "isExtendingChar"); - function En(e, t, i) { - for (; (i < 0 ? t > 0 : t < e.length) && bi(e.charAt(t));) t += i; - return t; - } - u(En, "skipExtendingChars"); - function Yt(e, t, i) { - for (var r = t > i ? -1 : 1;;) { - if (t == i) return t; - var n = (t + i) / 2, - l = r < 0 ? Math.ceil(n) : Math.floor(n); - if (l == t) return e(l) ? t : i; - e(l) ? i = l : t = l + r; - } - } - u(Yt, "findFirst"); - function Vo(e, t, i, r) { - if (!e) return r(t, i, "ltr", 0); - for (var n = !1, l = 0; l < e.length; ++l) { - var o = e[l]; - (o.from < i && o.to > t || t == i && o.to == t) && (r(Math.max(o.from, t), Math.min(o.to, i), o.level == 1 ? "rtl" : "ltr", l), n = !0); - } - n || r(t, i, "ltr"); - } - u(Vo, "iterateBidiSections"); - var qt = null; - function Zt(e, t, i) { - var _r2; - var r; - qt = null; - for (var n = 0; n < e.length; ++n) { - var l = e[n]; - if (l.from < t && l.to > t) return n; - l.to == t && (l.from != l.to && i == "before" ? r = n : qt = n), l.from == t && (l.from != l.to && i != "before" ? r = n : qt = n); - } - return (_r2 = r) !== null && _r2 !== void 0 ? _r2 : qt; - } - u(Zt, "getBidiPartAt"); - var $o = function () { - var e = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", - t = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; - function i(f) { - return f <= 247 ? e.charAt(f) : 1424 <= f && f <= 1524 ? "R" : 1536 <= f && f <= 1785 ? t.charAt(f - 1536) : 1774 <= f && f <= 2220 ? "r" : 8192 <= f && f <= 8203 ? "w" : f == 8204 ? "b" : "L"; - } - u(i, "charType"); - var r = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, - n = /[stwN]/, - l = /[LRr]/, - o = /[Lb1n]/, - a = /[1n]/; - function s(f, h, c) { - this.level = f, this.from = h, this.to = c; - } - return u(s, "BidiSpan"), function (f, h) { - var c = h == "ltr" ? "L" : "R"; - if (f.length == 0 || h == "ltr" && !r.test(f)) return !1; - for (var p = f.length, d = [], v = 0; v < p; ++v) d.push(i(f.charCodeAt(v))); - for (var g = 0, m = c; g < p; ++g) { - var b = d[g]; - b == "m" ? d[g] = m : m = b; - } - for (var C = 0, x = c; C < p; ++C) { - var w = d[C]; - w == "1" && x == "r" ? d[C] = "n" : l.test(w) && (x = w, w == "r" && (d[C] = "R")); - } - for (var k = 1, L = d[0]; k < p - 1; ++k) { - var A = d[k]; - A == "+" && L == "1" && d[k + 1] == "1" ? d[k] = "1" : A == "," && L == d[k + 1] && (L == "1" || L == "n") && (d[k] = L), L = A; - } - for (var E = 0; E < p; ++E) { - var j = d[E]; - if (j == ",") d[E] = "N";else if (j == "%") { - var B = void 0; - for (B = E + 1; B < p && d[B] == "%"; ++B); - for (var pe = E && d[E - 1] == "!" || B < p && d[B] == "1" ? "1" : "N", fe = E; fe < B; ++fe) d[fe] = pe; - E = B - 1; - } - } - for (var _ = 0, he = c; _ < p; ++_) { - var $ = d[_]; - he == "L" && $ == "1" ? d[_] = "L" : l.test($) && (he = $); - } - for (var Y = 0; Y < p; ++Y) if (n.test(d[Y])) { - var X = void 0; - for (X = Y + 1; X < p && n.test(d[X]); ++X); - for (var z = (Y ? d[Y - 1] : c) == "L", ce = (X < p ? d[X] : c) == "L", zt = z == ce ? z ? "L" : "R" : c, $e = Y; $e < X; ++$e) d[$e] = zt; - Y = X - 1; - } - for (var re = [], We, V = 0; V < p;) if (o.test(d[V])) { - var kn = V; - for (++V; V < p && o.test(d[V]); ++V); - re.push(new s(0, kn, V)); - } else { - var Ge = V, - gt = re.length, - yt = h == "rtl" ? 1 : 0; - for (++V; V < p && d[V] != "L"; ++V); - for (var oe = Ge; oe < V;) if (a.test(d[oe])) { - Ge < oe && (re.splice(gt, 0, new s(1, Ge, oe)), gt += yt); - var Gt = oe; - for (++oe; oe < V && a.test(d[oe]); ++oe); - re.splice(gt, 0, new s(2, Gt, oe)), gt += yt, Ge = oe; - } else ++oe; - Ge < V && re.splice(gt, 0, new s(1, Ge, V)); - } - return h == "ltr" && (re[0].level == 1 && (We = f.match(/^\s+/)) && (re[0].from = We[0].length, re.unshift(new s(0, 0, We[0].length))), H(re).level == 1 && (We = f.match(/\s+$/)) && (H(re).to -= We[0].length, re.push(new s(0, p - We[0].length, p)))), h == "rtl" ? re.reverse() : re; - }; - }(); - function Pe(e, t) { - var i = e.order; - return i == null && (i = e.order = $o(e.text, t)), i; - } - u(Pe, "getOrder"); - var In = [], - M = u(function (e, t, i) { - if (e.addEventListener) e.addEventListener(t, i, !1);else if (e.attachEvent) e.attachEvent("on" + t, i);else { - var r = e._handlers || (e._handlers = {}); - r[t] = (r[t] || In).concat(i); - } - }, "on"); - function xi(e, t) { - return e._handlers && e._handlers[t] || In; - } - u(xi, "getHandlers"); - function ge(e, t, i) { - if (e.removeEventListener) e.removeEventListener(t, i, !1);else if (e.detachEvent) e.detachEvent("on" + t, i);else { - var r = e._handlers, - n = r && r[t]; - if (n) { - var l = ee(n, i); - l > -1 && (r[t] = n.slice(0, l).concat(n.slice(l + 1))); + } + }; +} +/** + * @internal + */ + +function KnownArgumentNamesOnDirectivesRule(context) { + const directiveArgs = Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + for (const directive of definedDirectives) { + directiveArgs[directive.name] = directive.args.map(arg => arg.name); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + directiveArgs[def.name.value] = argsNodes.map(arg => arg.name.value); + } + } + return { + Directive(directiveNode) { + const directiveName = directiveNode.name.value; + const knownArgs = directiveArgs[directiveName]; + if (directiveNode.arguments && knownArgs) { + for (const argNode of directiveNode.arguments) { + const argName = argNode.name.value; + if (!knownArgs.includes(argName)) { + const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgs); + context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on directive "@${directiveName}".` + (0, _didYouMean.didYouMean)(suggestions), { + nodes: argNode + })); } } } - u(ge, "off"); - function U(e, t) { - var i = xi(e, t); - if (i.length) for (var r = Array.prototype.slice.call(arguments, 2), n = 0; n < i.length; ++n) i[n].apply(null, r); + return false; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs": +/*!******************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownDirectivesRule = KnownDirectivesRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _ast = __webpack_require__(/*! ../../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs"); +var _directiveLocation = __webpack_require__(/*! ../../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +/** + * Known directives + * + * A GraphQL document is only valid if all `@directives` are known by the + * schema and legally positioned. + * + * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined + */ +function KnownDirectivesRule(context) { + const locationsMap = Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + for (const directive of definedDirectives) { + locationsMap[directive.name] = directive.locations; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + locationsMap[def.name.value] = def.locations.map(name => name.value); + } + } + return { + Directive(node, _key, _parent, _path, ancestors) { + const name = node.name.value; + const locations = locationsMap[name]; + if (!locations) { + context.reportError(new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, { + nodes: node + })); + return; } - u(U, "signal"); - function q(e, t, i) { - return typeof t == "string" && (t = { - type: t, - preventDefault: function () { - this.defaultPrevented = !0; - } - }), U(e, i || t.type, e, t), Ci(t) || t.codemirrorIgnore; - } - u(q, "signalDOMEvent"); - function Rn(e) { - var t = e._handlers && e._handlers.cursorActivity; - if (t) for (var i = e.curOp.cursorActivityHandlers || (e.curOp.cursorActivityHandlers = []), r = 0; r < t.length; ++r) ee(i, t[r]) == -1 && i.push(t[r]); - } - u(Rn, "signalCursorActivity"); - function Ce(e, t) { - return xi(e, t).length > 0; - } - u(Ce, "hasHandler"); - function xt(e) { - e.prototype.on = function (t, i) { - M(this, t, i); - }, e.prototype.off = function (t, i) { - ge(this, t, i); - }; + const candidateLocation = getDirectiveLocationForASTPath(ancestors); + if (candidateLocation && !locations.includes(candidateLocation)) { + context.reportError(new _GraphQLError.GraphQLError(`Directive "@${name}" may not be used on ${candidateLocation}.`, { + nodes: node + })); } - u(xt, "eventMixin"); - function ae(e) { - e.preventDefault ? e.preventDefault() : e.returnValue = !1; - } - u(ae, "e_preventDefault"); - function Bn(e) { - e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0; - } - u(Bn, "e_stopPropagation"); - function Ci(e) { - return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == !1; - } - u(Ci, "e_defaultPrevented"); - function Qt(e) { - ae(e), Bn(e); - } - u(Qt, "e_stop"); - function wi(e) { - return e.target || e.srcElement; - } - u(wi, "e_target"); - function zn(e) { - var t = e.which; - return t == null && (e.button & 1 ? t = 1 : e.button & 2 ? t = 3 : e.button & 4 && (t = 2)), me && e.ctrlKey && t == 1 && (t = 3), t; - } - u(zn, "e_button"); - var ea = function () { - if (O && I < 9) return !1; - var e = T("div"); - return "draggable" in e || "dragDrop" in e; - }(), - Si; - function ta(e) { - if (Si == null) { - var t = T("span", "​"); - ve(e, T("span", [t, document.createTextNode("x")])), e.firstChild.offsetHeight != 0 && (Si = t.offsetWidth <= 1 && t.offsetHeight > 2 && !(O && I < 8)); - } - var i = Si ? T("span", "​") : T("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px"); - return i.setAttribute("cm-text", ""), i; - } - u(ta, "zeroWidthElement"); - var Li; - function ra(e) { - if (Li != null) return Li; - var t = ve(e, document.createTextNode("AخA")), - i = rt(t, 0, 1).getBoundingClientRect(), - r = rt(t, 1, 2).getBoundingClientRect(); - return Ue(e), !i || i.left == i.right ? !1 : Li = r.right - i.right < 3; - } - u(ra, "hasBadBidiRects"); - var ki = ` - -b`.split(/\n/).length != 3 ? function (e) { - for (var t = 0, i = [], r = e.length; t <= r;) { - var n = e.indexOf(` -`, t); - n == -1 && (n = e.length); - var l = e.slice(t, e.charAt(n - 1) == "\r" ? n - 1 : n), - o = l.indexOf("\r"); - o != -1 ? (i.push(l.slice(0, o)), t += o + 1) : (i.push(l), t = n + 1); - } - return i; - } : function (e) { - return e.split(/\r\n?|\n/); - }, - ia = window.getSelection ? function (e) { - try { - return e.selectionStart != e.selectionEnd; - } catch { - return !1; - } - } : function (e) { - var t; - try { - t = e.ownerDocument.selection.createRange(); - } catch {} - return !t || t.parentElement() != e ? !1 : t.compareEndPoints("StartToEnd", t) != 0; - }, - na = function () { - var e = T("div"); - return "oncopy" in e ? !0 : (e.setAttribute("oncopy", "return;"), typeof e.oncopy == "function"); - }(), - Ti = null; - function la(e) { - if (Ti != null) return Ti; - var t = ve(e, T("span", "x")), - i = t.getBoundingClientRect(), - r = rt(t, 0, 1).getBoundingClientRect(); - return Ti = Math.abs(i.left - r.left) > 1; - } - u(la, "hasBadZoomedRects"); - var Mi = {}, - Ct = {}; - function oa(e, t) { - arguments.length > 2 && (t.dependencies = Array.prototype.slice.call(arguments, 2)), Mi[e] = t; - } - u(oa, "defineMode"); - function aa(e, t) { - Ct[e] = t; - } - u(aa, "defineMIME"); - function Hr(e) { - if (typeof e == "string" && Ct.hasOwnProperty(e)) e = Ct[e];else if (e && typeof e.name == "string" && Ct.hasOwnProperty(e.name)) { - var t = Ct[e.name]; - typeof t == "string" && (t = { - name: t - }), e = Fn(t, e), e.name = t.name; - } else { - if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(e)) return Hr("application/xml"); - if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(e)) return Hr("application/json"); - } - return typeof e == "string" ? { - name: e - } : e || { - name: "null" - }; - } - u(Hr, "resolveMode"); - function Di(e, t) { - t = Hr(t); - var i = Mi[t.name]; - if (!i) return Di(e, "text/plain"); - var r = i(e, t); - if (wt.hasOwnProperty(t.name)) { - var n = wt[t.name]; - for (var l in n) n.hasOwnProperty(l) && (r.hasOwnProperty(l) && (r["_" + l] = r[l]), r[l] = n[l]); - } - if (r.name = t.name, t.helperType && (r.helperType = t.helperType), t.modeProps) for (var o in t.modeProps) r[o] = t.modeProps[o]; - return r; - } - u(Di, "getMode"); - var wt = {}; - function sa(e, t) { - var i = wt.hasOwnProperty(e) ? wt[e] : wt[e] = {}; - nt(t, i); - } - u(sa, "extendMode"); - function lt(e, t) { - if (t === !0) return t; - if (e.copyState) return e.copyState(t); - var i = {}; - for (var r in t) { - var n = t[r]; - n instanceof Array && (n = n.concat([])), i[r] = n; - } - return i; - } - u(lt, "copyState"); - function Ni(e, t) { - for (var i; e.innerMode && (i = e.innerMode(t), !(!i || i.mode == e));) t = i.state, e = i.mode; - return i || { - mode: e, - state: t - }; - } - u(Ni, "innerMode"); - function Gn(e, t, i) { - return e.startState ? e.startState(t, i) : !0; - } - u(Gn, "startState"); - var K = u(function (e, t, i) { - this.pos = this.start = 0, this.string = e, this.tabSize = t || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = i; - }, "StringStream"); - K.prototype.eol = function () { - return this.pos >= this.string.length; - }, K.prototype.sol = function () { - return this.pos == this.lineStart; - }, K.prototype.peek = function () { - return this.string.charAt(this.pos) || void 0; - }, K.prototype.next = function () { - if (this.pos < this.string.length) return this.string.charAt(this.pos++); - }, K.prototype.eat = function (e) { - var t = this.string.charAt(this.pos), - i; - if (typeof e == "string" ? i = t == e : i = t && (e.test ? e.test(t) : e(t)), i) return ++this.pos, t; - }, K.prototype.eatWhile = function (e) { - for (var t = this.pos; this.eat(e);); - return this.pos > t; - }, K.prototype.eatSpace = function () { - for (var e = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos));) ++this.pos; - return this.pos > e; - }, K.prototype.skipToEnd = function () { - this.pos = this.string.length; - }, K.prototype.skipTo = function (e) { - var t = this.string.indexOf(e, this.pos); - if (t > -1) return this.pos = t, !0; - }, K.prototype.backUp = function (e) { - this.pos -= e; - }, K.prototype.column = function () { - return this.lastColumnPos < this.start && (this.lastColumnValue = xe(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? xe(this.string, this.lineStart, this.tabSize) : 0); - }, K.prototype.indentation = function () { - return xe(this.string, null, this.tabSize) - (this.lineStart ? xe(this.string, this.lineStart, this.tabSize) : 0); - }, K.prototype.match = function (e, t, i) { - if (typeof e == "string") { - var r = u(function (o) { - return i ? o.toLowerCase() : o; - }, "cased"), - n = this.string.substr(this.pos, e.length); - if (r(n) == r(e)) return t !== !1 && (this.pos += e.length), !0; - } else { - var l = this.string.slice(this.pos).match(e); - return l && l.index > 0 ? null : (l && t !== !1 && (this.pos += l[0].length), l); - } - }, K.prototype.current = function () { - return this.string.slice(this.start, this.pos); - }, K.prototype.hideFirstChars = function (e, t) { - this.lineStart += e; - try { - return t(); - } finally { - this.lineStart -= e; - } - }, K.prototype.lookAhead = function (e) { - var t = this.lineOracle; - return t && t.lookAhead(e); - }, K.prototype.baseToken = function () { - var e = this.lineOracle; - return e && e.baseToken(this.pos); - }; - function S(e, t) { - if (t -= e.first, t < 0 || t >= e.size) throw new Error("There is no line " + (t + e.first) + " in the document."); - for (var i = e; !i.lines;) for (var r = 0;; ++r) { - var n = i.children[r], - l = n.chunkSize(); - if (t < l) { - i = n; - break; - } - t -= l; - } - return i.lines[t]; - } - u(S, "getLine"); - function ot(e, t, i) { - var r = [], - n = t.line; - return e.iter(t.line, i.line + 1, function (l) { - var o = l.text; - n == i.line && (o = o.slice(0, i.ch)), n == t.line && (o = o.slice(t.ch)), r.push(o), ++n; - }), r; - } - u(ot, "getBetween"); - function Ai(e, t, i) { - var r = []; - return e.iter(t, i, function (n) { - r.push(n.text); - }), r; - } - u(Ai, "getLines"); - function De(e, t) { - var i = t - e.height; - if (i) for (var r = e; r; r = r.parent) r.height += i; - } - u(De, "updateLineHeight"); - function F(e) { - if (e.parent == null) return null; - for (var t = e.parent, i = ee(t.lines, e), r = t.parent; r; t = r, r = r.parent) for (var n = 0; r.children[n] != t; ++n) i += r.children[n].chunkSize(); - return i + t.first; - } - u(F, "lineNo"); - function at(e, t) { - var i = e.first; - e: do { - for (var r = 0; r < e.children.length; ++r) { - var n = e.children[r], - l = n.height; - if (t < l) { - e = n; - continue e; - } - t -= l, i += n.chunkSize(); - } - return i; - } while (!e.lines); - for (var o = 0; o < e.lines.length; ++o) { - var a = e.lines[o], - s = a.height; - if (t < s) break; - t -= s; - } - return i + o; - } - u(at, "lineAtHeight"); - function Jt(e, t) { - return t >= e.first && t < e.first + e.size; - } - u(Jt, "isLine"); - function Oi(e, t) { - return String(e.lineNumberFormatter(t + e.firstLineNumber)); - } - u(Oi, "lineNumberFor"); - function y(e, t, i) { - if (i === void 0 && (i = null), !(this instanceof y)) return new y(e, t, i); - this.line = e, this.ch = t, this.sticky = i; - } - u(y, "Pos"); - function D(e, t) { - return e.line - t.line || e.ch - t.ch; - } - u(D, "cmp"); - function Wi(e, t) { - return e.sticky == t.sticky && D(e, t) == 0; - } - u(Wi, "equalCursorPos"); - function Hi(e) { - return y(e.line, e.ch); - } - u(Hi, "copyPos"); - function Fr(e, t) { - return D(e, t) < 0 ? t : e; - } - u(Fr, "maxPos"); - function Pr(e, t) { - return D(e, t) < 0 ? e : t; - } - u(Pr, "minPos"); - function Un(e, t) { - return Math.max(e.first, Math.min(t, e.first + e.size - 1)); - } - u(Un, "clipLine"); - function N(e, t) { - if (t.line < e.first) return y(e.first, 0); - var i = e.first + e.size - 1; - return t.line > i ? y(i, S(e, i).text.length) : ua(t, S(e, t.line).text.length); - } - u(N, "clipPos"); - function ua(e, t) { - var i = e.ch; - return i == null || i > t ? y(e.line, t) : i < 0 ? y(e.line, 0) : e; - } - u(ua, "clipToLen"); - function Kn(e, t) { - for (var i = [], r = 0; r < t.length; r++) i[r] = N(e, t[r]); - return i; + } + }; +} +function getDirectiveLocationForASTPath(ancestors) { + const appliedTo = ancestors[ancestors.length - 1]; + 'kind' in appliedTo || (0, _invariant.invariant)(false); + switch (appliedTo.kind) { + case _kinds.Kind.OPERATION_DEFINITION: + return getDirectiveLocationForOperation(appliedTo.operation); + case _kinds.Kind.FIELD: + return _directiveLocation.DirectiveLocation.FIELD; + case _kinds.Kind.FRAGMENT_SPREAD: + return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD; + case _kinds.Kind.INLINE_FRAGMENT: + return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT; + case _kinds.Kind.FRAGMENT_DEFINITION: + return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION; + case _kinds.Kind.VARIABLE_DEFINITION: + return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION; + case _kinds.Kind.SCHEMA_DEFINITION: + case _kinds.Kind.SCHEMA_EXTENSION: + return _directiveLocation.DirectiveLocation.SCHEMA; + case _kinds.Kind.SCALAR_TYPE_DEFINITION: + case _kinds.Kind.SCALAR_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.SCALAR; + case _kinds.Kind.OBJECT_TYPE_DEFINITION: + case _kinds.Kind.OBJECT_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.OBJECT; + case _kinds.Kind.FIELD_DEFINITION: + return _directiveLocation.DirectiveLocation.FIELD_DEFINITION; + case _kinds.Kind.INTERFACE_TYPE_DEFINITION: + case _kinds.Kind.INTERFACE_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.INTERFACE; + case _kinds.Kind.UNION_TYPE_DEFINITION: + case _kinds.Kind.UNION_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.UNION; + case _kinds.Kind.ENUM_TYPE_DEFINITION: + case _kinds.Kind.ENUM_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.ENUM; + case _kinds.Kind.ENUM_VALUE_DEFINITION: + return _directiveLocation.DirectiveLocation.ENUM_VALUE; + case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: + case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.INPUT_OBJECT; + case _kinds.Kind.INPUT_VALUE_DEFINITION: + { + const parentNode = ancestors[ancestors.length - 3]; + 'kind' in parentNode || (0, _invariant.invariant)(false); + return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION; } - u(Kn, "clipPosArray"); - var Er = u(function (e, t) { - this.state = e, this.lookAhead = t; - }, "SavedContext"), - Ne = u(function (e, t, i, r) { - this.state = t, this.doc = e, this.line = i, this.maxLookAhead = r || 0, this.baseTokens = null, this.baseTokenPos = 1; - }, "Context"); - Ne.prototype.lookAhead = function (e) { - var t = this.doc.getLine(this.line + e); - return t != null && e > this.maxLookAhead && (this.maxLookAhead = e), t; - }, Ne.prototype.baseToken = function (e) { - if (!this.baseTokens) return null; - for (; this.baseTokens[this.baseTokenPos] <= e;) this.baseTokenPos += 2; - var t = this.baseTokens[this.baseTokenPos + 1]; - return { - type: t && t.replace(/( |^)overlay .*/, ""), - size: this.baseTokens[this.baseTokenPos] - e - }; - }, Ne.prototype.nextLine = function () { - this.line++, this.maxLookAhead > 0 && this.maxLookAhead--; - }, Ne.fromSaved = function (e, t, i) { - return t instanceof Er ? new Ne(e, lt(e.mode, t.state), i, t.lookAhead) : new Ne(e, lt(e.mode, t), i); - }, Ne.prototype.save = function (e) { - var t = e !== !1 ? lt(this.doc.mode, this.state) : this.state; - return this.maxLookAhead > 0 ? new Er(t, this.maxLookAhead) : t; - }; - function _n(e, t, i, r) { - var n = [e.state.modeGen], - l = {}; - Jn(e, t.text, e.doc.mode, i, function (f, h) { - return n.push(f, h); - }, l, r); - for (var o = i.state, a = u(function (f) { - i.baseTokens = n; - var h = e.state.overlays[f], - c = 1, - p = 0; - i.state = !0, Jn(e, t.text, h.mode, i, function (d, v) { - for (var g = c; p < d;) { - var m = n[c]; - m > d && n.splice(c, 1, d, n[c + 1], m), c += 2, p = Math.min(d, m); - } - if (v) if (h.opaque) n.splice(g, c - g, d, "overlay " + v), c = g + 2;else for (; g < c; g += 2) { - var b = n[g + 1]; - n[g + 1] = (b ? b + " " : "") + "overlay " + v; - } - }, l), i.state = o, i.baseTokens = null, i.baseTokenPos = 1; - }, "loop"), s = 0; s < e.state.overlays.length; ++s) a(s); - return { - styles: n, - classes: l.bgClass || l.textClass ? l : null - }; + // Not reachable, all possible types have been considered. + + /* c8 ignore next */ + + default: + false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(appliedTo.kind)); + } +} +function getDirectiveLocationForOperation(operation) { + switch (operation) { + case _ast.OperationTypeNode.QUERY: + return _directiveLocation.DirectiveLocation.QUERY; + case _ast.OperationTypeNode.MUTATION: + return _directiveLocation.DirectiveLocation.MUTATION; + case _ast.OperationTypeNode.SUBSCRIPTION: + return _directiveLocation.DirectiveLocation.SUBSCRIPTION; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs": +/*!*********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs ***! + \*********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownFragmentNamesRule = KnownFragmentNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Known fragment names + * + * A GraphQL document is only valid if all `...Fragment` fragment spreads refer + * to fragments defined in the same document. + * + * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined + */ +function KnownFragmentNamesRule(context) { + return { + FragmentSpread(node) { + const fragmentName = node.name.value; + const fragment = context.getFragment(fragmentName); + if (!fragment) { + context.reportError(new _GraphQLError.GraphQLError(`Unknown fragment "${fragmentName}".`, { + nodes: node.name + })); } - u(_n, "highlightLine"); - function Xn(e, t, i) { - if (!t.styles || t.styles[0] != e.state.modeGen) { - var r = jt(e, F(t)), - n = t.text.length > e.options.maxHighlightLength && lt(e.doc.mode, r.state), - l = _n(e, t, r); - n && (r.state = n), t.stateAfter = r.save(!n), t.styles = l.styles, l.classes ? t.styleClasses = l.classes : t.styleClasses && (t.styleClasses = null), i === e.doc.highlightFrontier && (e.doc.modeFrontier = Math.max(e.doc.modeFrontier, ++e.doc.highlightFrontier)); - } - return t.styles; - } - u(Xn, "getLineStyles"); - function jt(e, t, i) { - var r = e.doc, - n = e.display; - if (!r.mode.startState) return new Ne(r, !0, t); - var l = fa(e, t, i), - o = l > r.first && S(r, l - 1).stateAfter, - a = o ? Ne.fromSaved(r, o, l) : new Ne(r, Gn(r.mode), l); - return r.iter(l, t, function (s) { - Fi(e, s.text, a); - var f = a.line; - s.stateAfter = f == t - 1 || f % 5 == 0 || f >= n.viewFrom && f < n.viewTo ? a.save() : null, a.nextLine(); - }), i && (r.modeFrontier = a.line), a; - } - u(jt, "getContextBefore"); - function Fi(e, t, i, r) { - var n = e.doc.mode, - l = new K(t, e.options.tabSize, i); - for (l.start = l.pos = r || 0, t == "" && Yn(n, i.state); !l.eol();) Pi(n, l, i.state), l.start = l.pos; - } - u(Fi, "processLine"); - function Yn(e, t) { - if (e.blankLine) return e.blankLine(t); - if (e.innerMode) { - var i = Ni(e, t); - if (i.mode.blankLine) return i.mode.blankLine(i.state); - } - } - u(Yn, "callBlankLine"); - function Pi(e, t, i, r) { - for (var n = 0; n < 10; n++) { - r && (r[0] = Ni(e, i).mode); - var l = e.token(t, i); - if (t.pos > t.start) return l; - } - throw new Error("Mode " + e.name + " failed to advance stream."); - } - u(Pi, "readToken"); - var qn = u(function (e, t, i) { - this.start = e.start, this.end = e.pos, this.string = e.current(), this.type = t || null, this.state = i; - }, "Token"); - function Zn(e, t, i, r) { - var n = e.doc, - l = n.mode, - o; - t = N(n, t); - var a = S(n, t.line), - s = jt(e, t.line, i), - f = new K(a.text, e.options.tabSize, s), - h; - for (r && (h = []); (r || f.pos < t.ch) && !f.eol();) f.start = f.pos, o = Pi(l, f, s.state), r && h.push(new qn(f, o, lt(n.mode, s.state))); - return r ? h : new qn(f, o, s.state); - } - u(Zn, "takeToken"); - function Qn(e, t) { - if (e) for (;;) { - var i = e.match(/(?:^|\s+)line-(background-)?(\S+)/); - if (!i) break; - e = e.slice(0, i.index) + e.slice(i.index + i[0].length); - var r = i[1] ? "bgClass" : "textClass"; - t[r] == null ? t[r] = i[2] : new RegExp("(?:^|\\s)" + i[2] + "(?:$|\\s)").test(t[r]) || (t[r] += " " + i[2]); - } - return e; - } - u(Qn, "extractLineClasses"); - function Jn(e, t, i, r, n, l, o) { - var a = i.flattenSpans; - a == null && (a = e.options.flattenSpans); - var s = 0, - f = null, - h = new K(t, e.options.tabSize, r), - c, - p = e.options.addModeClass && [null]; - for (t == "" && Qn(Yn(i, r.state), l); !h.eol();) { - if (h.pos > e.options.maxHighlightLength ? (a = !1, o && Fi(e, t, r, h.pos), h.pos = t.length, c = null) : c = Qn(Pi(i, h, r.state, p), l), p) { - var d = p[0].name; - d && (c = "m-" + (c ? d + " " + c : d)); - } - if (!a || f != c) { - for (; s < h.start;) s = Math.min(h.start, s + 5e3), n(s, f); - f = c; - } - h.start = h.pos; - } - for (; s < h.pos;) { - var v = Math.min(h.pos, s + 5e3); - n(v, f), s = v; - } - } - u(Jn, "runMode"); - function fa(e, t, i) { - for (var r, n, l = e.doc, o = i ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), a = t; a > o; --a) { - if (a <= l.first) return l.first; - var s = S(l, a - 1), - f = s.stateAfter; - if (f && (!i || a + (f instanceof Er ? f.lookAhead : 0) <= l.modeFrontier)) return a; - var h = xe(s.text, null, e.options.tabSize); - (n == null || r > h) && (n = a - 1, r = h); - } - return n; - } - u(fa, "findStartLine"); - function ha(e, t) { - if (e.modeFrontier = Math.min(e.modeFrontier, t), !(e.highlightFrontier < t - 10)) { - for (var i = e.first, r = t - 1; r > i; r--) { - var n = S(e, r).stateAfter; - if (n && (!(n instanceof Er) || r + n.lookAhead < t)) { - i = r + 1; - break; - } - } - e.highlightFrontier = Math.min(e.highlightFrontier, i); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs": +/*!*****************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs ***! + \*****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownTypeNamesRule = KnownTypeNamesRule; +var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +var _introspection = __webpack_require__(/*! ../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +var _scalars = __webpack_require__(/*! ../../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs"); +/** + * Known type names + * + * A GraphQL document is only valid if referenced types (specifically + * variable definitions and fragment conditions) are defined by the type schema. + * + * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence + */ +function KnownTypeNamesRule(context) { + const schema = context.getSchema(); + const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null); + const definedTypes = Object.create(null); + for (const def of context.getDocument().definitions) { + if ((0, _predicates.isTypeDefinitionNode)(def)) { + definedTypes[def.name.value] = true; + } + } + const typeNames = [...Object.keys(existingTypesMap), ...Object.keys(definedTypes)]; + return { + NamedType(node, _1, parent, _2, ancestors) { + const typeName = node.name.value; + if (!existingTypesMap[typeName] && !definedTypes[typeName]) { + var _ancestors$; + const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; + const isSDL = definitionNode != null && isSDLNode(definitionNode); + if (isSDL && standardTypeNames.includes(typeName)) { + return; } + const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames); + context.reportError(new _GraphQLError.GraphQLError(`Unknown type "${typeName}".` + (0, _didYouMean.didYouMean)(suggestedTypes), { + nodes: node + })); } - u(ha, "retreatFrontier"); - var jn = !1, - Ee = !1; - function ca() { - jn = !0; + } + }; +} +const standardTypeNames = [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes].map(type => type.name); +function isSDLNode(value) { + return 'kind' in value && ((0, _predicates.isTypeSystemDefinitionNode)(value) || (0, _predicates.isTypeSystemExtensionNode)(value)); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs": +/*!*************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs ***! + \*************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +/** + * Lone anonymous operation + * + * A GraphQL document is only valid if when it contains an anonymous operation + * (the query short-hand) that it contains only that one operation definition. + * + * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation + */ +function LoneAnonymousOperationRule(context) { + let operationCount = 0; + return { + Document(node) { + operationCount = node.definitions.filter(definition => definition.kind === _kinds.Kind.OPERATION_DEFINITION).length; + }, + OperationDefinition(node) { + if (!node.name && operationCount > 1) { + context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', { + nodes: node + })); } - u(ca, "seeReadOnlySpans"); - function da() { - Ee = !0; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Lone Schema definition + * + * A GraphQL document is only valid if it contains only one schema definition. + */ +function LoneSchemaDefinitionRule(context) { + var _ref, _ref2, _oldSchema$astNode; + const oldSchema = context.getSchema(); + const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); + let schemaDefinitionsCount = 0; + return { + SchemaDefinition(node) { + if (alreadyDefined) { + context.reportError(new _GraphQLError.GraphQLError('Cannot define a new schema within a schema extension.', { + nodes: node + })); + return; } - u(da, "seeCollapsedSpans"); - function Ir(e, t, i) { - this.marker = e, this.from = t, this.to = i; + if (schemaDefinitionsCount > 0) { + context.reportError(new _GraphQLError.GraphQLError('Must provide only one schema definition.', { + nodes: node + })); } - u(Ir, "MarkedSpan"); - function Vt(e, t) { - if (e) for (var i = 0; i < e.length; ++i) { - var r = e[i]; - if (r.marker == t) return r; - } + ++schemaDefinitionsCount; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs": +/*!************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs ***! + \************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.MaxIntrospectionDepthRule = MaxIntrospectionDepthRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +const MAX_LISTS_DEPTH = 3; +function MaxIntrospectionDepthRule(context) { + /** + * Counts the depth of list fields in "__Type" recursively and + * returns `true` if the limit has been reached. + */ + function checkDepth(node, visitedFragments = Object.create(null), depth = 0) { + if (node.kind === _kinds.Kind.FRAGMENT_SPREAD) { + const fragmentName = node.name.value; + if (visitedFragments[fragmentName] === true) { + // Fragment cycles are handled by `NoFragmentCyclesRule`. + return false; } - u(Vt, "getMarkedSpanFor"); - function pa(e, t) { - for (var i, r = 0; r < e.length; ++r) e[r] != t && (i || (i = [])).push(e[r]); - return i; + const fragment = context.getFragment(fragmentName); + if (!fragment) { + // Missing fragments checks are handled by `KnownFragmentNamesRule`. + return false; + } // Rather than following an immutable programming pattern which has + // significant memory and garbage collection overhead, we've opted to + // take a mutable approach for efficiency's sake. Importantly visiting a + // fragment twice is fine, so long as you don't do one visit inside the + // other. + + try { + visitedFragments[fragmentName] = true; + return checkDepth(fragment, visitedFragments, depth); + } finally { + visitedFragments[fragmentName] = undefined; } - u(pa, "removeMarkedSpan"); - function va(e, t, i) { - var r = i && window.WeakSet && (i.markedSpans || (i.markedSpans = new WeakSet())); - r && e.markedSpans && r.has(e.markedSpans) ? e.markedSpans.push(t) : (e.markedSpans = e.markedSpans ? e.markedSpans.concat([t]) : [t], r && r.add(e.markedSpans)), t.marker.attachLine(e); - } - u(va, "addMarkedSpan"); - function ga(e, t, i) { - var r; - if (e) for (var n = 0; n < e.length; ++n) { - var l = e[n], - o = l.marker, - a = l.from == null || (o.inclusiveLeft ? l.from <= t : l.from < t); - if (a || l.from == t && o.type == "bookmark" && (!i || !l.marker.insertLeft)) { - var s = l.to == null || (o.inclusiveRight ? l.to >= t : l.to > t); - (r || (r = [])).push(new Ir(o, l.from, s ? null : l.to)); - } - } - return r; + } + if (node.kind === _kinds.Kind.FIELD && ( + // check all introspection lists + node.name.value === 'fields' || node.name.value === 'interfaces' || node.name.value === 'possibleTypes' || node.name.value === 'inputFields')) { + // eslint-disable-next-line no-param-reassign + depth++; + if (depth >= MAX_LISTS_DEPTH) { + return true; } - u(ga, "markedSpansBefore"); - function ya(e, t, i) { - var r; - if (e) for (var n = 0; n < e.length; ++n) { - var l = e[n], - o = l.marker, - a = l.to == null || (o.inclusiveRight ? l.to >= t : l.to > t); - if (a || l.from == t && o.type == "bookmark" && (!i || l.marker.insertLeft)) { - var s = l.from == null || (o.inclusiveLeft ? l.from <= t : l.from < t); - (r || (r = [])).push(new Ir(o, s ? null : l.from - t, l.to == null ? null : l.to - t)); - } + } // handles fields and inline fragments + + if ('selectionSet' in node && node.selectionSet) { + for (const child of node.selectionSet.selections) { + if (checkDepth(child, visitedFragments, depth)) { + return true; } - return r; } - u(ya, "markedSpansAfter"); - function Ei(e, t) { - if (t.full) return null; - var i = Jt(e, t.from.line) && S(e, t.from.line).markedSpans, - r = Jt(e, t.to.line) && S(e, t.to.line).markedSpans; - if (!i && !r) return null; - var n = t.from.ch, - l = t.to.ch, - o = D(t.from, t.to) == 0, - a = ga(i, n, o), - s = ya(r, l, o), - f = t.text.length == 1, - h = H(t.text).length + (f ? n : 0); - if (a) for (var c = 0; c < a.length; ++c) { - var p = a[c]; - if (p.to == null) { - var d = Vt(s, p.marker); - d ? f && (p.to = d.to == null ? null : d.to + h) : p.to = n; - } - } - if (s) for (var v = 0; v < s.length; ++v) { - var g = s[v]; - if (g.to != null && (g.to += h), g.from == null) { - var m = Vt(a, g.marker); - m || (g.from = h, f && (a || (a = [])).push(g)); - } else g.from += h, f && (a || (a = [])).push(g); - } - a && (a = Vn(a)), s && s != a && (s = Vn(s)); - var b = [a]; - if (!f) { - var C = t.text.length - 2, - x; - if (C > 0 && a) for (var w = 0; w < a.length; ++w) a[w].to == null && (x || (x = [])).push(new Ir(a[w].marker, null, null)); - for (var k = 0; k < C; ++k) b.push(x); - b.push(s); - } - return b; - } - u(Ei, "stretchSpansOverChange"); - function Vn(e) { - for (var t = 0; t < e.length; ++t) { - var i = e[t]; - i.from != null && i.from == i.to && i.marker.clearWhenEmpty !== !1 && e.splice(t--, 1); - } - return e.length ? e : null; - } - u(Vn, "clearEmptySpans"); - function ma(e, t, i) { - var r = null; - if (e.iter(t.line, i.line + 1, function (d) { - if (d.markedSpans) for (var v = 0; v < d.markedSpans.length; ++v) { - var g = d.markedSpans[v].marker; - g.readOnly && (!r || ee(r, g) == -1) && (r || (r = [])).push(g); - } - }), !r) return null; - for (var n = [{ - from: t, - to: i - }], l = 0; l < r.length; ++l) for (var o = r[l], a = o.find(0), s = 0; s < n.length; ++s) { - var f = n[s]; - if (!(D(f.to, a.from) < 0 || D(f.from, a.to) > 0)) { - var h = [s, 1], - c = D(f.from, a.from), - p = D(f.to, a.to); - (c < 0 || !o.inclusiveLeft && !c) && h.push({ - from: f.from, - to: a.from - }), (p > 0 || !o.inclusiveRight && !p) && h.push({ - from: a.to, - to: f.to - }), n.splice.apply(n, h), s += h.length - 3; - } + } + return false; + } + return { + Field(node) { + if (node.name.value === '__schema' || node.name.value === '__type') { + if (checkDepth(node)) { + context.reportError(new _GraphQLError.GraphQLError('Maximum introspection depth exceeded', { + nodes: [node] + })); + return false; } - return n; - } - u(ma, "removeReadOnlyRanges"); - function $n(e) { - var t = e.markedSpans; - if (t) { - for (var i = 0; i < t.length; ++i) t[i].marker.detachLine(e); - e.markedSpans = null; - } - } - u($n, "detachMarkedSpans"); - function el(e, t) { - if (t) { - for (var i = 0; i < t.length; ++i) t[i].marker.attachLine(e); - e.markedSpans = t; - } - } - u(el, "attachMarkedSpans"); - function Rr(e) { - return e.inclusiveLeft ? -1 : 0; - } - u(Rr, "extraLeft"); - function Br(e) { - return e.inclusiveRight ? 1 : 0; - } - u(Br, "extraRight"); - function Ii(e, t) { - var i = e.lines.length - t.lines.length; - if (i != 0) return i; - var r = e.find(), - n = t.find(), - l = D(r.from, n.from) || Rr(e) - Rr(t); - if (l) return -l; - var o = D(r.to, n.to) || Br(e) - Br(t); - return o || t.id - e.id; - } - u(Ii, "compareCollapsedMarkers"); - function tl(e, t) { - var i = Ee && e.markedSpans, - r; - if (i) for (var n = void 0, l = 0; l < i.length; ++l) n = i[l], n.marker.collapsed && (t ? n.from : n.to) == null && (!r || Ii(r, n.marker) < 0) && (r = n.marker); - return r; } - u(tl, "collapsedSpanAtSide"); - function rl(e) { - return tl(e, !0); - } - u(rl, "collapsedSpanAtStart"); - function zr(e) { - return tl(e, !1); - } - u(zr, "collapsedSpanAtEnd"); - function ba(e, t) { - var i = Ee && e.markedSpans, - r; - if (i) for (var n = 0; n < i.length; ++n) { - var l = i[n]; - l.marker.collapsed && (l.from == null || l.from < t) && (l.to == null || l.to > t) && (!r || Ii(r, l.marker) < 0) && (r = l.marker); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs": +/*!*******************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs ***! + \*******************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoFragmentCyclesRule = NoFragmentCyclesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * No fragment cycles + * + * The graph of fragment spreads must not form any cycles including spreading itself. + * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data. + * + * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles + */ +function NoFragmentCyclesRule(context) { + // Tracks already visited fragments to maintain O(N) and to ensure that cycles + // are not redundantly reported. + const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors + + const spreadPath = []; // Position in the spread path + + const spreadPathIndexByName = Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + detectCycleRecursive(node); + return false; + } + }; // This does a straight-forward DFS to find cycles. + // It does not terminate when a cycle was found but continues to explore + // the graph to find all possible cycles. + + function detectCycleRecursive(fragment) { + if (visitedFrags[fragment.name.value]) { + return; + } + const fragmentName = fragment.name.value; + visitedFrags[fragmentName] = true; + const spreadNodes = context.getFragmentSpreads(fragment.selectionSet); + if (spreadNodes.length === 0) { + return; + } + spreadPathIndexByName[fragmentName] = spreadPath.length; + for (const spreadNode of spreadNodes) { + const spreadName = spreadNode.name.value; + const cycleIndex = spreadPathIndexByName[spreadName]; + spreadPath.push(spreadNode); + if (cycleIndex === undefined) { + const spreadFragment = context.getFragment(spreadName); + if (spreadFragment) { + detectCycleRecursive(spreadFragment); } - return r; + } else { + const cyclePath = spreadPath.slice(cycleIndex); + const viaPath = cyclePath.slice(0, -1).map(s => '"' + s.name.value + '"').join(', '); + context.reportError(new _GraphQLError.GraphQLError(`Cannot spread fragment "${spreadName}" within itself` + (viaPath !== '' ? ` via ${viaPath}.` : '.'), { + nodes: cyclePath + })); } - u(ba, "collapsedSpanAround"); - function il(e, t, i, r, n) { - var l = S(e, t), - o = Ee && l.markedSpans; - if (o) for (var a = 0; a < o.length; ++a) { - var s = o[a]; - if (s.marker.collapsed) { - var f = s.marker.find(0), - h = D(f.from, i) || Rr(s.marker) - Rr(n), - c = D(f.to, r) || Br(s.marker) - Br(n); - if (!(h >= 0 && c <= 0 || h <= 0 && c >= 0) && (h <= 0 && (s.marker.inclusiveRight && n.inclusiveLeft ? D(f.to, i) >= 0 : D(f.to, i) > 0) || h >= 0 && (s.marker.inclusiveRight && n.inclusiveLeft ? D(f.from, r) <= 0 : D(f.from, r) < 0))) return !0; + spreadPath.pop(); + } + spreadPathIndexByName[fragmentName] = undefined; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUndefinedVariablesRule = NoUndefinedVariablesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * No undefined variables + * + * A GraphQL operation is only valid if all variables encountered, both directly + * and via fragment spreads, are defined by that operation. + * + * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined + */ +function NoUndefinedVariablesRule(context) { + let variableNameDefined = Object.create(null); + return { + OperationDefinition: { + enter() { + variableNameDefined = Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { + node + } of usages) { + const varName = node.name.value; + if (variableNameDefined[varName] !== true) { + context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, { + nodes: [node, operation] + })); } } } - u(il, "conflictingCollapsedRange"); - function Se(e) { - for (var t; t = rl(e);) e = t.find(-1, !0).line; - return e; - } - u(Se, "visualLine"); - function xa(e) { - for (var t; t = zr(e);) e = t.find(1, !0).line; - return e; - } - u(xa, "visualLineEnd"); - function Ca(e) { - for (var t, i; t = zr(e);) e = t.find(1, !0).line, (i || (i = [])).push(e); - return i; - } - u(Ca, "visualLineContinued"); - function Ri(e, t) { - var i = S(e, t), - r = Se(i); - return i == r ? t : F(r); - } - u(Ri, "visualLineNo"); - function nl(e, t) { - if (t > e.lastLine()) return t; - var i = S(e, t), - r; - if (!Xe(e, i)) return t; - for (; r = zr(i);) i = r.find(1, !0).line; - return F(i) + 1; - } - u(nl, "visualLineEndNo"); - function Xe(e, t) { - var i = Ee && t.markedSpans; - if (i) { - for (var r = void 0, n = 0; n < i.length; ++n) if (r = i[n], !!r.marker.collapsed) { - if (r.from == null) return !0; - if (!r.marker.widgetNode && r.from == 0 && r.marker.inclusiveLeft && Bi(e, t, r)) return !0; + }, + VariableDefinition(node) { + variableNameDefined[node.variable.name.value] = true; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs": +/*!********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs ***! + \********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * No unused fragments + * + * A GraphQL document is only valid if all fragment definitions are spread + * within operations, or spread within other fragments spread within operations. + * + * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used + */ +function NoUnusedFragmentsRule(context) { + const operationDefs = []; + const fragmentDefs = []; + return { + OperationDefinition(node) { + operationDefs.push(node); + return false; + }, + FragmentDefinition(node) { + fragmentDefs.push(node); + return false; + }, + Document: { + leave() { + const fragmentNameUsed = Object.create(null); + for (const operation of operationDefs) { + for (const fragment of context.getRecursivelyReferencedFragments(operation)) { + fragmentNameUsed[fragment.name.value] = true; } } - } - u(Xe, "lineIsHidden"); - function Bi(e, t, i) { - if (i.to == null) { - var r = i.marker.find(1, !0); - return Bi(e, r.line, Vt(r.line.markedSpans, i.marker)); - } - if (i.marker.inclusiveRight && i.to == t.text.length) return !0; - for (var n = void 0, l = 0; l < t.markedSpans.length; ++l) if (n = t.markedSpans[l], n.marker.collapsed && !n.marker.widgetNode && n.from == i.to && (n.to == null || n.to != i.from) && (n.marker.inclusiveLeft || i.marker.inclusiveRight) && Bi(e, t, n)) return !0; - } - u(Bi, "lineIsHiddenInner"); - function Ie(e) { - e = Se(e); - for (var t = 0, i = e.parent, r = 0; r < i.lines.length; ++r) { - var n = i.lines[r]; - if (n == e) break; - t += n.height; - } - for (var l = i.parent; l; i = l, l = i.parent) for (var o = 0; o < l.children.length; ++o) { - var a = l.children[o]; - if (a == i) break; - t += a.height; - } - return t; - } - u(Ie, "heightAtLine"); - function Gr(e) { - if (e.height == 0) return 0; - for (var t = e.text.length, i, r = e; i = rl(r);) { - var n = i.find(0, !0); - r = n.from.line, t += n.from.ch - n.to.ch; - } - for (r = e; i = zr(r);) { - var l = i.find(0, !0); - t -= r.text.length - l.from.ch, r = l.to.line, t += r.text.length - l.to.ch; - } - return t; - } - u(Gr, "lineLength"); - function zi(e) { - var t = e.display, - i = e.doc; - t.maxLine = S(i, i.first), t.maxLineLength = Gr(t.maxLine), t.maxLineChanged = !0, i.iter(function (r) { - var n = Gr(r); - n > t.maxLineLength && (t.maxLineLength = n, t.maxLine = r); - }); - } - u(zi, "findMaxLine"); - var St = u(function (e, t, i) { - this.text = e, el(this, t), this.height = i ? i(this) : 1; - }, "Line"); - St.prototype.lineNo = function () { - return F(this); - }, xt(St); - function wa(e, t, i, r) { - e.text = t, e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), e.order != null && (e.order = null), $n(e), el(e, i); - var n = r ? r(e) : 1; - n != e.height && De(e, n); - } - u(wa, "updateLine"); - function Sa(e) { - e.parent = null, $n(e); - } - u(Sa, "cleanUpLine"); - var La = {}, - ka = {}; - function ll(e, t) { - if (!e || /^\s*$/.test(e)) return null; - var i = t.addModeClass ? ka : La; - return i[e] || (i[e] = e.replace(/\S+/g, "cm-$&")); - } - u(ll, "interpretTokenStyle"); - function ol(e, t) { - var i = bt("span", null, null, ne ? "padding-right: .1px" : null), - r = { - pre: bt("pre", [i], "CodeMirror-line"), - content: i, - col: 0, - pos: 0, - cm: e, - trailingSpace: !1, - splitSpaces: e.getOption("lineWrapping") - }; - t.measure = {}; - for (var n = 0; n <= (t.rest ? t.rest.length : 0); n++) { - var l = n ? t.rest[n - 1] : t.line, - o = void 0; - r.pos = 0, r.addToken = Ma, ra(e.display.measure) && (o = Pe(l, e.doc.direction)) && (r.addToken = Na(r.addToken, o)), r.map = []; - var a = t != e.display.externalMeasured && F(l); - Aa(l, r, Xn(e, l, a)), l.styleClasses && (l.styleClasses.bgClass && (r.bgClass = di(l.styleClasses.bgClass, r.bgClass || "")), l.styleClasses.textClass && (r.textClass = di(l.styleClasses.textClass, r.textClass || ""))), r.map.length == 0 && r.map.push(0, 0, r.content.appendChild(ta(e.display.measure))), n == 0 ? (t.measure.map = r.map, t.measure.cache = {}) : ((t.measure.maps || (t.measure.maps = [])).push(r.map), (t.measure.caches || (t.measure.caches = [])).push({})); - } - if (ne) { - var s = r.content.lastChild; - (/\bcm-tab\b/.test(s.className) || s.querySelector && s.querySelector(".cm-tab")) && (r.content.className = "cm-tab-wrap-hack"); - } - return U(e, "renderLine", e, t.line, r.pre), r.pre.className && (r.textClass = di(r.pre.className, r.textClass || "")), r; - } - u(ol, "buildLineContent"); - function Ta(e) { - var t = T("span", "•", "cm-invalidchar"); - return t.title = "\\u" + e.charCodeAt(0).toString(16), t.setAttribute("aria-label", t.title), t; - } - u(Ta, "defaultSpecialCharPlaceholder"); - function Ma(e, t, i, r, n, l, o) { - if (t) { - var a = e.splitSpaces ? Da(t, e.trailingSpace) : t, - s = e.cm.state.specialChars, - f = !1, - h; - if (!s.test(t)) e.col += t.length, h = document.createTextNode(a), e.map.push(e.pos, e.pos + t.length, h), O && I < 9 && (f = !0), e.pos += t.length;else { - h = document.createDocumentFragment(); - for (var c = 0;;) { - s.lastIndex = c; - var p = s.exec(t), - d = p ? p.index - c : t.length - c; - if (d) { - var v = document.createTextNode(a.slice(c, c + d)); - O && I < 9 ? h.appendChild(T("span", [v])) : h.appendChild(v), e.map.push(e.pos, e.pos + d, v), e.col += d, e.pos += d; - } - if (!p) break; - c += d + 1; - var g = void 0; - if (p[0] == " ") { - var m = e.cm.options.tabSize, - b = m - e.col % m; - g = h.appendChild(T("span", yi(b), "cm-tab")), g.setAttribute("role", "presentation"), g.setAttribute("cm-text", " "), e.col += b; - } else p[0] == "\r" || p[0] == ` -` ? (g = h.appendChild(T("span", p[0] == "\r" ? "␍" : "␤", "cm-invalidchar")), g.setAttribute("cm-text", p[0]), e.col += 1) : (g = e.cm.options.specialCharPlaceholder(p[0]), g.setAttribute("cm-text", p[0]), O && I < 9 ? h.appendChild(T("span", [g])) : h.appendChild(g), e.col += 1); - e.map.push(e.pos, e.pos + 1, g), e.pos++; - } - } - if (e.trailingSpace = a.charCodeAt(t.length - 1) == 32, i || r || n || f || l || o) { - var C = i || ""; - r && (C += r), n && (C += n); - var x = T("span", [h], C, l); - if (o) for (var w in o) o.hasOwnProperty(w) && w != "style" && w != "class" && x.setAttribute(w, o[w]); - return e.content.appendChild(x); + for (const fragmentDef of fragmentDefs) { + const fragName = fragmentDef.name.value; + if (fragmentNameUsed[fragName] !== true) { + context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" is never used.`, { + nodes: fragmentDef + })); } - e.content.appendChild(h); } } - u(Ma, "buildToken"); - function Da(e, t) { - if (e.length > 1 && !/ /.test(e)) return e; - for (var i = t, r = "", n = 0; n < e.length; n++) { - var l = e.charAt(n); - l == " " && i && (n == e.length - 1 || e.charCodeAt(n + 1) == 32) && (l = " "), r += l, i = l == " "; - } - return r; - } - u(Da, "splitSpaces"); - function Na(e, t) { - return function (i, r, n, l, o, a, s) { - n = n ? n + " cm-force-border" : "cm-force-border"; - for (var f = i.pos, h = f + r.length;;) { - for (var c = void 0, p = 0; p < t.length && (c = t[p], !(c.to > f && c.from <= f)); p++); - if (c.to >= h) return e(i, r, n, l, o, a, s); - e(i, r.slice(0, c.to - f), n, l, null, a, s), l = null, r = r.slice(c.to - f), f = c.to; - } - }; - } - u(Na, "buildTokenBadBidi"); - function al(e, t, i, r) { - var n = !r && i.widgetNode; - n && e.map.push(e.pos, e.pos + t, n), !r && e.cm.display.input.needsContentAttribute && (n || (n = e.content.appendChild(document.createElement("span"))), n.setAttribute("cm-marker", i.id)), n && (e.cm.display.input.setUneditable(n), e.content.appendChild(n)), e.pos += t, e.trailingSpace = !1; - } - u(al, "buildCollapsedSpan"); - function Aa(e, t, i) { - var r = e.markedSpans, - n = e.text, - l = 0; - if (!r) { - for (var o = 1; o < i.length; o += 2) t.addToken(t, n.slice(l, l = i[o]), ll(i[o + 1], t.cm.options)); - return; - } - for (var a = n.length, s = 0, f = 1, h = "", c, p, d = 0, v, g, m, b, C;;) { - if (d == s) { - v = g = m = p = "", C = null, b = null, d = 1 / 0; - for (var x = [], w = void 0, k = 0; k < r.length; ++k) { - var L = r[k], - A = L.marker; - if (A.type == "bookmark" && L.from == s && A.widgetNode) x.push(A);else if (L.from <= s && (L.to == null || L.to > s || A.collapsed && L.to == s && L.from == s)) { - if (L.to != null && L.to != s && d > L.to && (d = L.to, g = ""), A.className && (v += " " + A.className), A.css && (p = (p ? p + ";" : "") + A.css), A.startStyle && L.from == s && (m += " " + A.startStyle), A.endStyle && L.to == d && (w || (w = [])).push(A.endStyle, L.to), A.title && ((C || (C = {})).title = A.title), A.attributes) for (var E in A.attributes) (C || (C = {}))[E] = A.attributes[E]; - A.collapsed && (!b || Ii(b.marker, A) < 0) && (b = L); - } else L.from > s && d > L.from && (d = L.from); - } - if (w) for (var j = 0; j < w.length; j += 2) w[j + 1] == d && (g += " " + w[j]); - if (!b || b.from == s) for (var B = 0; B < x.length; ++B) al(t, 0, x[B]); - if (b && (b.from || 0) == s) { - if (al(t, (b.to == null ? a + 1 : b.to) - s, b.marker, b.from == null), b.to == null) return; - b.to == s && (b = !1); - } - } - if (s >= a) break; - for (var pe = Math.min(a, d);;) { - if (h) { - var fe = s + h.length; - if (!b) { - var _ = fe > pe ? h.slice(0, pe - s) : h; - t.addToken(t, _, c ? c + v : v, m, s + _.length == d ? g : "", p, C); - } - if (fe >= pe) { - h = h.slice(pe - s), s = pe; - break; - } - s = fe, m = ""; - } - h = n.slice(l, l = i[f++]), c = ll(i[f++], t.cm.options); - } + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs": +/*!********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs ***! + \********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUnusedVariablesRule = NoUnusedVariablesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * No unused variables + * + * A GraphQL operation is only valid if all variables defined by an operation + * are used, either directly or within a spread fragment. + * + * See https://spec.graphql.org/draft/#sec-All-Variables-Used + */ +function NoUnusedVariablesRule(context) { + let variableDefs = []; + return { + OperationDefinition: { + enter() { + variableDefs = []; + }, + leave(operation) { + const variableNameUsed = Object.create(null); + const usages = context.getRecursiveVariableUsages(operation); + for (const { + node + } of usages) { + variableNameUsed[node.name.value] = true; } - } - u(Aa, "insertLineContent"); - function sl(e, t, i) { - this.line = t, this.rest = Ca(t), this.size = this.rest ? F(H(this.rest)) - i + 1 : 1, this.node = this.text = null, this.hidden = Xe(e, t); - } - u(sl, "LineView"); - function Ur(e, t, i) { - for (var r = [], n, l = t; l < i; l = n) { - var o = new sl(e.doc, S(e.doc, l), l); - n = l + o.size, r.push(o); + for (const variableDef of variableDefs) { + const variableName = variableDef.variable.name.value; + if (variableNameUsed[variableName] !== true) { + context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, { + nodes: variableDef + })); + } } - return r; } - u(Ur, "buildViewArray"); - var Lt = null; - function Oa(e) { - Lt ? Lt.ops.push(e) : e.ownsGroup = Lt = { - ops: [e], - delayedCallbacks: [] - }; + }, + VariableDefinition(def) { + variableDefs.push(def); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs": +/*!*******************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs ***! + \*******************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _sortValueNode = __webpack_require__(/*! ../../utilities/sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs"); +var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +function reasonMessage(reason) { + if (Array.isArray(reason)) { + return reason.map(([responseName, subReason]) => `subfields "${responseName}" conflict because ` + reasonMessage(subReason)).join(' and '); + } + return reason; +} +/** + * Overlapping fields can be merged + * + * A selection set is only valid if all fields (including spreading any + * fragments) either correspond to distinct response names or can be merged + * without ambiguity. + * + * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging + */ + +function OverlappingFieldsCanBeMergedRule(context) { + // A memoization for when two fragments are compared "between" each other for + // conflicts. Two fragments may be compared many times, so memoizing this can + // dramatically improve the performance of this validator. + const comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given + // selection set. Selection sets may be asked for this information multiple + // times, so this improves the performance of this validator. + + const cachedFieldsAndFragmentNames = new Map(); + return { + SelectionSet(selectionSet) { + const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet); + for (const [[responseName, reason], fields1, fields2] of conflicts) { + const reasonMsg = reasonMessage(reason); + context.reportError(new _GraphQLError.GraphQLError(`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, { + nodes: fields1.concat(fields2) + })); } - u(Oa, "pushOperation"); - function Wa(e) { - var t = e.delayedCallbacks, - i = 0; - do { - for (; i < t.length; i++) t[i].call(null); - for (var r = 0; r < e.ops.length; r++) { - var n = e.ops[r]; - if (n.cursorActivityHandlers) for (; n.cursorActivityCalled < n.cursorActivityHandlers.length;) n.cursorActivityHandlers[n.cursorActivityCalled++].call(null, n.cm); - } - } while (i < t.length); + } + }; +} + +/** + * Algorithm: + * + * Conflicts occur when two fields exist in a query which will produce the same + * response name, but represent differing values, thus creating a conflict. + * The algorithm below finds all conflicts via making a series of comparisons + * between fields. In order to compare as few fields as possible, this makes + * a series of comparisons "within" sets of fields and "between" sets of fields. + * + * Given any selection set, a collection produces both a set of fields by + * also including all inline fragments, as well as a list of fragments + * referenced by fragment spreads. + * + * A) Each selection set represented in the document first compares "within" its + * collected set of fields, finding any conflicts between every pair of + * overlapping fields. + * Note: This is the *only time* that a the fields "within" a set are compared + * to each other. After this only fields "between" sets are compared. + * + * B) Also, if any fragment is referenced in a selection set, then a + * comparison is made "between" the original set of fields and the + * referenced fragment. + * + * C) Also, if multiple fragments are referenced, then comparisons + * are made "between" each referenced fragment. + * + * D) When comparing "between" a set of fields and a referenced fragment, first + * a comparison is made between each field in the original set of fields and + * each field in the the referenced set of fields. + * + * E) Also, if any fragment is referenced in the referenced selection set, + * then a comparison is made "between" the original set of fields and the + * referenced fragment (recursively referring to step D). + * + * F) When comparing "between" two fragments, first a comparison is made between + * each field in the first referenced set of fields and each field in the the + * second referenced set of fields. + * + * G) Also, any fragments referenced by the first must be compared to the + * second, and any fragments referenced by the second must be compared to the + * first (recursively referring to step F). + * + * H) When comparing two fields, if both have selection sets, then a comparison + * is made "between" both selection sets, first comparing the set of fields in + * the first selection set with the set of fields in the second. + * + * I) Also, if any fragment is referenced in either selection set, then a + * comparison is made "between" the other set of fields and the + * referenced fragment. + * + * J) Also, if two fragments are referenced in both selection sets, then a + * comparison is made "between" the two fragments. + * + */ +// Find all conflicts found "within" a selection set, including those found +// via spreading in fragments. Called when visiting each SelectionSet in the +// GraphQL Document. +function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) { + const conflicts = []; + const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet); // (A) Find find all conflicts "within" the fields of this selection set. + // Note: this is the *only place* `collectConflictsWithin` is called. + + collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap); + if (fragmentNames.length !== 0) { + // (B) Then collect conflicts between these fields and those represented by + // each spread fragment name found. + for (let i = 0; i < fragmentNames.length; i++) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this + // selection set to collect conflicts between fragments spread together. + // This compares each item in the list of fragment names to every other + // item in that same list (except for itself). + + for (let j = i + 1; j < fragmentNames.length; j++) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]); } - u(Wa, "fireCallbacksForOps"); - function Ha(e, t) { - var i = e.ownsGroup; - if (i) try { - Wa(i); - } finally { - Lt = null, t(i); - } - } - u(Ha, "finishOperation"); - var $t = null; - function Z(e, t) { - var i = xi(e, t); - if (i.length) { - var r = Array.prototype.slice.call(arguments, 2), - n; - Lt ? n = Lt.delayedCallbacks : $t ? n = $t : (n = $t = [], setTimeout(Fa, 0)); - for (var l = u(function (a) { - n.push(function () { - return i[a].apply(null, r); - }); - }, "loop"), o = 0; o < i.length; ++o) l(o); - } - } - u(Z, "signalLater"); - function Fa() { - var e = $t; - $t = null; - for (var t = 0; t < e.length; ++t) e[t](); - } - u(Fa, "fireOrphanDelayed"); - function ul(e, t, i, r) { - for (var n = 0; n < t.changes.length; n++) { - var l = t.changes[n]; - l == "text" ? Ea(e, t) : l == "gutter" ? hl(e, t, i, r) : l == "class" ? Gi(e, t) : l == "widget" && Ia(e, t, r); - } - t.changes = null; - } - u(ul, "updateLineForChanges"); - function er(e) { - return e.node == e.text && (e.node = T("div", null, null, "position: relative"), e.text.parentNode && e.text.parentNode.replaceChild(e.node, e.text), e.node.appendChild(e.text), O && I < 8 && (e.node.style.zIndex = 2)), e.node; - } - u(er, "ensureLineWrapped"); - function Pa(e, t) { - var i = t.bgClass ? t.bgClass + " " + (t.line.bgClass || "") : t.line.bgClass; - if (i && (i += " CodeMirror-linebackground"), t.background) i ? t.background.className = i : (t.background.parentNode.removeChild(t.background), t.background = null);else if (i) { - var r = er(t); - t.background = r.insertBefore(T("div", null, i), r.firstChild), e.display.input.setUneditable(t.background); - } - } - u(Pa, "updateLineBackground"); - function fl(e, t) { - var i = e.display.externalMeasured; - return i && i.line == t.line ? (e.display.externalMeasured = null, t.measure = i.measure, i.built) : ol(e, t); - } - u(fl, "getLineContent"); - function Ea(e, t) { - var i = t.text.className, - r = fl(e, t); - t.text == t.node && (t.node = r.pre), t.text.parentNode.replaceChild(r.pre, t.text), t.text = r.pre, r.bgClass != t.bgClass || r.textClass != t.textClass ? (t.bgClass = r.bgClass, t.textClass = r.textClass, Gi(e, t)) : i && (t.text.className = i); - } - u(Ea, "updateLineText"); - function Gi(e, t) { - Pa(e, t), t.line.wrapClass ? er(t).className = t.line.wrapClass : t.node != t.text && (t.node.className = ""); - var i = t.textClass ? t.textClass + " " + (t.line.textClass || "") : t.line.textClass; - t.text.className = i || ""; - } - u(Gi, "updateLineClasses"); - function hl(e, t, i, r) { - if (t.gutter && (t.node.removeChild(t.gutter), t.gutter = null), t.gutterBackground && (t.node.removeChild(t.gutterBackground), t.gutterBackground = null), t.line.gutterClass) { - var n = er(t); - t.gutterBackground = T("div", null, "CodeMirror-gutter-background " + t.line.gutterClass, "left: " + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + "px; width: " + r.gutterTotalWidth + "px"), e.display.input.setUneditable(t.gutterBackground), n.insertBefore(t.gutterBackground, t.text); - } - var l = t.line.gutterMarkers; - if (e.options.lineNumbers || l) { - var o = er(t), - a = t.gutter = T("div", null, "CodeMirror-gutter-wrapper", "left: " + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + "px"); - if (a.setAttribute("aria-hidden", "true"), e.display.input.setUneditable(a), o.insertBefore(a, t.text), t.line.gutterClass && (a.className += " " + t.line.gutterClass), e.options.lineNumbers && (!l || !l["CodeMirror-linenumbers"]) && (t.lineNumber = a.appendChild(T("div", Oi(e.options, i), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + r.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + e.display.lineNumInnerWidth + "px"))), l) for (var s = 0; s < e.display.gutterSpecs.length; ++s) { - var f = e.display.gutterSpecs[s].className, - h = l.hasOwnProperty(f) && l[f]; - h && a.appendChild(T("div", [h], "CodeMirror-gutter-elt", "left: " + r.gutterLeft[f] + "px; width: " + r.gutterWidth[f] + "px")); + } + } + return conflicts; +} // Collect all conflicts found between a set of fields and a fragment reference +// including via spreading in any nested fragments. + +function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) { + const fragment = context.getFragment(fragmentName); + if (!fragment) { + return; + } + const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment); // Do not compare a fragment's fieldMap to itself. + + if (fieldMap === fieldMap2) { + return; + } // (D) First collect any conflicts between the provided collection of fields + // and the collection of fields represented by the given fragment. + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields + // and any fragment names found in the given fragment. + + for (const referencedFragmentName of referencedFragmentNames) { + // Memoize so two fragments are not compared for conflicts more than once. + if (comparedFragmentPairs.has(referencedFragmentName, fragmentName, areMutuallyExclusive)) { + continue; + } + comparedFragmentPairs.add(referencedFragmentName, fragmentName, areMutuallyExclusive); + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName); + } +} // Collect all conflicts found between two fragments, including via spreading in +// any nested fragments. + +function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) { + // No need to compare a fragment to itself. + if (fragmentName1 === fragmentName2) { + return; + } // Memoize so two fragments are not compared for conflicts more than once. + + if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) { + return; + } + comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); + const fragment1 = context.getFragment(fragmentName1); + const fragment2 = context.getFragment(fragmentName2); + if (!fragment1 || !fragment2) { + return; + } + const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1); + const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2); // (F) First, collect all conflicts between these two collections of fields + // (not including any nested fragments). + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested + // fragments spread in the second fragment. + + for (const referencedFragmentName2 of referencedFragmentNames2) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2); + } // (G) Then collect conflicts between the second fragment and any nested + // fragments spread in the first fragment. + + for (const referencedFragmentName1 of referencedFragmentNames1) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2); + } +} // Find all conflicts found between two selection sets, including those found +// via spreading in fragments. Called when determining if conflicts exist +// between the sub-fields of two overlapping fields. + +function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) { + const conflicts = []; + const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1); + const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2); // (H) First, collect all conflicts between these two collections of field. + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and + // those referenced by each fragment name associated with the second. + + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2); + } // (I) Then collect conflicts between the second collection of fields and + // those referenced by each fragment name associated with the first. + + for (const fragmentName1 of fragmentNames1) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1); + } // (J) Also collect conflicts between any fragment names by the first and + // fragment names by the second. This compares each item in the first set of + // names to each item in the second set of names. + + for (const fragmentName1 of fragmentNames1) { + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2); + } + } + return conflicts; +} // Collect all Conflicts "within" one collection of fields. + +function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) { + // A field map is a keyed collection, where each key represents a response + // name and the value at that key is a list of all fields which provide that + // response name. For every response name, if there are multiple fields, they + // must be compared to find a potential conflict. + for (const [responseName, fields] of Object.entries(fieldMap)) { + // This compares every field in the list to every other field in this list + // (except to itself). If the list only has one item, nothing needs to + // be compared. + if (fields.length > 1) { + for (let i = 0; i < fields.length; i++) { + for (let j = i + 1; j < fields.length; j++) { + const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, + // within one collection is never mutually exclusive + responseName, fields[i], fields[j]); + if (conflict) { + conflicts.push(conflict); } } } - u(hl, "updateLineGutter"); - function Ia(e, t, i) { - t.alignable && (t.alignable = null); - for (var r = mt("CodeMirror-linewidget"), n = t.node.firstChild, l = void 0; n; n = l) l = n.nextSibling, r.test(n.className) && t.node.removeChild(n); - cl(e, t, i); - } - u(Ia, "updateLineWidgets"); - function Ra(e, t, i, r) { - var n = fl(e, t); - return t.text = t.node = n.pre, n.bgClass && (t.bgClass = n.bgClass), n.textClass && (t.textClass = n.textClass), Gi(e, t), hl(e, t, i, r), cl(e, t, r), t.node; - } - u(Ra, "buildLineElement"); - function cl(e, t, i) { - if (dl(e, t.line, t, i, !0), t.rest) for (var r = 0; r < t.rest.length; r++) dl(e, t.rest[r], t, i, !1); - } - u(cl, "insertLineWidgets"); - function dl(e, t, i, r, n) { - if (t.widgets) for (var l = er(i), o = 0, a = t.widgets; o < a.length; ++o) { - var s = a[o], - f = T("div", [s.node], "CodeMirror-linewidget" + (s.className ? " " + s.className : "")); - s.handleMouseEvents || f.setAttribute("cm-ignore-events", "true"), Ba(s, f, i, r), e.display.input.setUneditable(f), n && s.above ? l.insertBefore(f, i.gutter || i.text) : l.appendChild(f), Z(s, "redraw"); - } - } - u(dl, "insertLineWidgetsFor"); - function Ba(e, t, i, r) { - if (e.noHScroll) { - (i.alignable || (i.alignable = [])).push(t); - var n = r.wrapperWidth; - t.style.left = r.fixedPos + "px", e.coverGutter || (n -= r.gutterTotalWidth, t.style.paddingLeft = r.gutterTotalWidth + "px"), t.style.width = n + "px"; - } - e.coverGutter && (t.style.zIndex = 5, t.style.position = "relative", e.noHScroll || (t.style.marginLeft = -r.gutterTotalWidth + "px")); - } - u(Ba, "positionLineWidget"); - function tr(e) { - if (e.height != null) return e.height; - var t = e.doc.cm; - if (!t) return 0; - if (!Ke(document.body, e.node)) { - var i = "position: relative;"; - e.coverGutter && (i += "margin-left: -" + t.display.gutters.offsetWidth + "px;"), e.noHScroll && (i += "width: " + t.display.wrapper.clientWidth + "px;"), ve(t.display.measure, T("div", [e.node], null, i)); - } - return e.height = e.node.parentNode.offsetHeight; - } - u(tr, "widgetHeight"); - function Re(e, t) { - for (var i = wi(t); i != e.wrapper; i = i.parentNode) if (!i || i.nodeType == 1 && i.getAttribute("cm-ignore-events") == "true" || i.parentNode == e.sizer && i != e.mover) return !0; - } - u(Re, "eventInWidget"); - function Kr(e) { - return e.lineSpace.offsetTop; - } - u(Kr, "paddingTop"); - function Ui(e) { - return e.mover.offsetHeight - e.lineSpace.offsetHeight; - } - u(Ui, "paddingVert"); - function pl(e) { - if (e.cachedPaddingH) return e.cachedPaddingH; - var t = ve(e.measure, T("pre", "x", "CodeMirror-line-like")), - i = window.getComputedStyle ? window.getComputedStyle(t) : t.currentStyle, - r = { - left: parseInt(i.paddingLeft), - right: parseInt(i.paddingRight) - }; - return !isNaN(r.left) && !isNaN(r.right) && (e.cachedPaddingH = r), r; - } - u(pl, "paddingH"); - function Ae(e) { - return Wn - e.display.nativeBarWidth; - } - u(Ae, "scrollGap"); - function st(e) { - return e.display.scroller.clientWidth - Ae(e) - e.display.barWidth; - } - u(st, "displayWidth"); - function Ki(e) { - return e.display.scroller.clientHeight - Ae(e) - e.display.barHeight; - } - u(Ki, "displayHeight"); - function za(e, t, i) { - var r = e.options.lineWrapping, - n = r && st(e); - if (!t.measure.heights || r && t.measure.width != n) { - var l = t.measure.heights = []; - if (r) { - t.measure.width = n; - for (var o = t.text.firstChild.getClientRects(), a = 0; a < o.length - 1; a++) { - var s = o[a], - f = o[a + 1]; - Math.abs(s.bottom - f.bottom) > 2 && l.push((s.bottom + f.top) / 2 - i.top); - } + } + } +} // Collect all Conflicts between two collections of fields. This is similar to, +// but different from the `collectConflictsWithin` function above. This check +// assumes that `collectConflictsWithin` has already been called on each +// provided collection of fields. This is true because this validator traverses +// each individual selection set. + +function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) { + // A field map is a keyed collection, where each key represents a response + // name and the value at that key is a list of all fields which provide that + // response name. For any response name which appears in both provided field + // maps, each field from the first field map must be compared to every field + // in the second field map to find potential conflicts. + for (const [responseName, fields1] of Object.entries(fieldMap1)) { + const fields2 = fieldMap2[responseName]; + if (fields2) { + for (const field1 of fields1) { + for (const field2 of fields2) { + const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2); + if (conflict) { + conflicts.push(conflict); } - l.push(i.bottom - i.top); } } - u(za, "ensureLineHeights"); - function vl(e, t, i) { - if (e.line == t) return { - map: e.measure.map, - cache: e.measure.cache - }; - if (e.rest) { - for (var r = 0; r < e.rest.length; r++) if (e.rest[r] == t) return { - map: e.measure.maps[r], - cache: e.measure.caches[r] - }; - for (var n = 0; n < e.rest.length; n++) if (F(e.rest[n]) > i) return { - map: e.measure.maps[n], - cache: e.measure.caches[n], - before: !0 - }; - } - } - u(vl, "mapFromLineView"); - function Ga(e, t) { - t = Se(t); - var i = F(t), - r = e.display.externalMeasured = new sl(e.doc, t, i); - r.lineN = i; - var n = r.built = ol(e, r); - return r.text = n.pre, ve(e.display.lineMeasure, n.pre), r; - } - u(Ga, "updateExternalMeasurement"); - function gl(e, t, i, r) { - return Oe(e, kt(e, t), i, r); - } - u(gl, "measureChar"); - function _i(e, t) { - if (t >= e.display.viewFrom && t < e.display.viewTo) return e.display.view[ht(e, t)]; - var i = e.display.externalMeasured; - if (i && t >= i.lineN && t < i.lineN + i.size) return i; - } - u(_i, "findViewForLine"); - function kt(e, t) { - var i = F(t), - r = _i(e, i); - r && !r.text ? r = null : r && r.changes && (ul(e, r, i, Qi(e)), e.curOp.forceUpdate = !0), r || (r = Ga(e, t)); - var n = vl(r, t, i); - return { - line: t, - view: r, - rect: null, - map: n.map, - cache: n.cache, - before: n.before, - hasHeights: !1 - }; - } - u(kt, "prepareMeasureForLine"); - function Oe(e, t, i, r, n) { - t.before && (i = -1); - var l = i + (r || ""), - o; - return t.cache.hasOwnProperty(l) ? o = t.cache[l] : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || (za(e, t.view, t.rect), t.hasHeights = !0), o = Ka(e, t, i, r), o.bogus || (t.cache[l] = o)), { - left: o.left, - right: o.right, - top: n ? o.rtop : o.top, - bottom: n ? o.rbottom : o.bottom - }; - } - u(Oe, "measureCharPrepared"); - var yl = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }; - function ml(e, t, i) { - for (var r, n, l, o, a, s, f = 0; f < e.length; f += 3) if (a = e[f], s = e[f + 1], t < a ? (n = 0, l = 1, o = "left") : t < s ? (n = t - a, l = n + 1) : (f == e.length - 3 || t == s && e[f + 3] > t) && (l = s - a, n = l - 1, t >= s && (o = "right")), n != null) { - if (r = e[f + 2], a == s && i == (r.insertLeft ? "left" : "right") && (o = i), i == "left" && n == 0) for (; f && e[f - 2] == e[f - 3] && e[f - 1].insertLeft;) r = e[(f -= 3) + 2], o = "left"; - if (i == "right" && n == s - a) for (; f < e.length - 3 && e[f + 3] == e[f + 4] && !e[f + 5].insertLeft;) r = e[(f += 3) + 2], o = "right"; - break; - } - return { - node: r, - start: n, - end: l, - collapse: o, - coverStart: a, - coverEnd: s - }; - } - u(ml, "nodeAndOffsetInLineMap"); - function Ua(e, t) { - var i = yl; - if (t == "left") for (var r = 0; r < e.length && (i = e[r]).left == i.right; r++);else for (var n = e.length - 1; n >= 0 && (i = e[n]).left == i.right; n--); - return i; - } - u(Ua, "getUsefulRect"); - function Ka(e, t, i, r) { - var n = ml(t.map, i, r), - l = n.node, - o = n.start, - a = n.end, - s = n.collapse, - f; - if (l.nodeType == 3) { - for (var h = 0; h < 4; h++) { - for (; o && bi(t.line.text.charAt(n.coverStart + o));) --o; - for (; n.coverStart + a < n.coverEnd && bi(t.line.text.charAt(n.coverStart + a));) ++a; - if (O && I < 9 && o == 0 && a == n.coverEnd - n.coverStart ? f = l.parentNode.getBoundingClientRect() : f = Ua(rt(l, o, a).getClientRects(), r), f.left || f.right || o == 0) break; - a = o, o = o - 1, s = "right"; + } + } +} // Determines if there is a conflict between two particular fields, including +// comparing their sub-fields. + +function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) { + const [parentType1, node1, def1] = field1; + const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same + // time, due to the parent types, then it is safe to permit them to diverge + // in aliased field or arguments used as they will not present any ambiguity + // by differing. + // It is known that two parent types could never overlap if they are + // different Object types. Interface or Union types might overlap - if not + // in the current state of the schema, then perhaps in some future version, + // thus may not safely diverge. + + const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2); + if (!areMutuallyExclusive) { + // Two aliases must refer to the same field. + const name1 = node1.name.value; + const name2 = node2.name.value; + if (name1 !== name2) { + return [[responseName, `"${name1}" and "${name2}" are different fields`], [node1], [node2]]; + } // Two field calls must have the same arguments. + + if (!sameArguments(node1, node2)) { + return [[responseName, 'they have differing arguments'], [node1], [node2]]; + } + } // The return type for each field. + + const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; + const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; + if (type1 && type2 && doTypesConflict(type1, type2)) { + return [[responseName, `they return conflicting types "${(0, _inspect.inspect)(type1)}" and "${(0, _inspect.inspect)(type2)}"`], [node1], [node2]]; + } // Collect and compare sub-fields. Use the same "visited fragment names" list + // for both collections so fields in a fragment reference are never + // compared to themselves. + + const selectionSet1 = node1.selectionSet; + const selectionSet2 = node2.selectionSet; + if (selectionSet1 && selectionSet2) { + const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2); + return subfieldConflicts(conflicts, responseName, node1, node2); + } +} +function sameArguments(node1, node2) { + const args1 = node1.arguments; + const args2 = node2.arguments; + if (args1 === undefined || args1.length === 0) { + return args2 === undefined || args2.length === 0; + } + if (args2 === undefined || args2.length === 0) { + return false; + } + /* c8 ignore next */ + + if (args1.length !== args2.length) { + /* c8 ignore next */ + return false; + /* c8 ignore next */ + } + const values2 = new Map(args2.map(({ + name, + value + }) => [name.value, value])); + return args1.every(arg1 => { + const value1 = arg1.value; + const value2 = values2.get(arg1.name.value); + if (value2 === undefined) { + return false; + } + return stringifyValue(value1) === stringifyValue(value2); + }); +} +function stringifyValue(value) { + return (0, _printer.print)((0, _sortValueNode.sortValueNode)(value)); +} // Two types conflict if both types could not apply to a value simultaneously. +// Composite types are ignored as their individual field types will be compared +// later recursively. However List and Non-Null types must match. + +function doTypesConflict(type1, type2) { + if ((0, _definition.isListType)(type1)) { + return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if ((0, _definition.isListType)(type2)) { + return true; + } + if ((0, _definition.isNonNullType)(type1)) { + return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if ((0, _definition.isNonNullType)(type2)) { + return true; + } + if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) { + return type1 !== type2; + } + return false; +} // Given a selection set, return the collection of fields (a mapping of response +// name to field nodes and definitions) as well as a list of fragment names +// referenced via fragment spreads. + +function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) { + const cached = cachedFieldsAndFragmentNames.get(selectionSet); + if (cached) { + return cached; + } + const nodeAndDefs = Object.create(null); + const fragmentNames = Object.create(null); + _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames); + const result = [nodeAndDefs, Object.keys(fragmentNames)]; + cachedFieldsAndFragmentNames.set(selectionSet, result); + return result; +} // Given a reference to a fragment, return the represented collection of fields +// as well as a list of nested fragment names referenced via fragment spreads. + +function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) { + // Short-circuit building a type from the node if possible. + const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); + if (cached) { + return cached; + } + const fragmentType = (0, _typeFromAST.typeFromAST)(context.getSchema(), fragment.typeCondition); + return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet); +} +function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case _kinds.Kind.FIELD: + { + const fieldName = selection.name.value; + let fieldDef; + if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { + fieldDef = parentType.getFields()[fieldName]; } - O && I < 11 && (f = _a(e.display.measure, f)); - } else { - o > 0 && (s = r = "right"); - var c; - e.options.lineWrapping && (c = l.getClientRects()).length > 1 ? f = c[r == "right" ? c.length - 1 : 0] : f = l.getBoundingClientRect(); - } - if (O && I < 9 && !o && (!f || !f.left && !f.right)) { - var p = l.parentNode.getClientRects()[0]; - p ? f = { - left: p.left, - right: p.left + Mt(e.display), - top: p.top, - bottom: p.bottom - } : f = yl; - } - for (var d = f.top - t.rect.top, v = f.bottom - t.rect.top, g = (d + v) / 2, m = t.view.measure.heights, b = 0; b < m.length - 1 && !(g < m[b]); b++); - var C = b ? m[b - 1] : 0, - x = m[b], - w = { - left: (s == "right" ? f.right : f.left) - t.rect.left, - right: (s == "left" ? f.left : f.right) - t.rect.left, - top: C, - bottom: x - }; - return !f.left && !f.right && (w.bogus = !0), e.options.singleCursorHeightPerLine || (w.rtop = d, w.rbottom = v), w; - } - u(Ka, "measureCharInner"); - function _a(e, t) { - if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !la(e)) return t; - var i = screen.logicalXDPI / screen.deviceXDPI, - r = screen.logicalYDPI / screen.deviceYDPI; - return { - left: t.left * i, - right: t.right * i, - top: t.top * r, - bottom: t.bottom * r - }; - } - u(_a, "maybeUpdateRectForZooming"); - function bl(e) { - if (e.measure && (e.measure.cache = {}, e.measure.heights = null, e.rest)) for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {}; - } - u(bl, "clearLineMeasurementCacheFor"); - function xl(e) { - e.display.externalMeasure = null, Ue(e.display.lineMeasure); - for (var t = 0; t < e.display.view.length; t++) bl(e.display.view[t]); - } - u(xl, "clearLineMeasurementCache"); - function rr(e) { - xl(e), e.display.cachedCharWidth = e.display.cachedTextHeight = e.display.cachedPaddingH = null, e.options.lineWrapping || (e.display.maxLineChanged = !0), e.display.lineNumChars = null; - } - u(rr, "clearCaches"); - function Cl() { - return Tr && Dr ? -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) : window.pageXOffset || (document.documentElement || document.body).scrollLeft; - } - u(Cl, "pageScrollX"); - function wl() { - return Tr && Dr ? -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) : window.pageYOffset || (document.documentElement || document.body).scrollTop; - } - u(wl, "pageScrollY"); - function Xi(e) { - var t = Se(e), - i = t.widgets, - r = 0; - if (i) for (var n = 0; n < i.length; ++n) i[n].above && (r += tr(i[n])); - return r; - } - u(Xi, "widgetTopHeight"); - function _r(e, t, i, r, n) { - if (!n) { - var l = Xi(t); - i.top += l, i.bottom += l; - } - if (r == "line") return i; - r || (r = "local"); - var o = Ie(t); - if (r == "local" ? o += Kr(e.display) : o -= e.display.viewOffset, r == "page" || r == "window") { - var a = e.display.lineSpace.getBoundingClientRect(); - o += a.top + (r == "window" ? 0 : wl()); - var s = a.left + (r == "window" ? 0 : Cl()); - i.left += s, i.right += s; - } - return i.top += o, i.bottom += o, i; - } - u(_r, "intoCoordSystem"); - function Sl(e, t, i) { - if (i == "div") return t; - var r = t.left, - n = t.top; - if (i == "page") r -= Cl(), n -= wl();else if (i == "local" || !i) { - var l = e.display.sizer.getBoundingClientRect(); - r += l.left, n += l.top; - } - var o = e.display.lineSpace.getBoundingClientRect(); - return { - left: r - o.left, - top: n - o.top - }; - } - u(Sl, "fromCoordSystem"); - function Xr(e, t, i, r, n) { - return r || (r = S(e.doc, t.line)), _r(e, r, gl(e, r, t.ch, n), i); - } - u(Xr, "charCoords"); - function Le(e, t, i, r, n, l) { - r = r || S(e.doc, t.line), n || (n = kt(e, r)); - function o(v, g) { - var m = Oe(e, n, v, g ? "right" : "left", l); - return g ? m.left = m.right : m.right = m.left, _r(e, r, m, i); - } - u(o, "get"); - var a = Pe(r, e.doc.direction), - s = t.ch, - f = t.sticky; - if (s >= r.text.length ? (s = r.text.length, f = "before") : s <= 0 && (s = 0, f = "after"), !a) return o(f == "before" ? s - 1 : s, f == "before"); - function h(v, g, m) { - var b = a[g], - C = b.level == 1; - return o(m ? v - 1 : v, C != m); - } - u(h, "getBidi"); - var c = Zt(a, s, f), - p = qt, - d = h(s, c, f == "before"); - return p != null && (d.other = h(s, p, f != "before")), d; - } - u(Le, "cursorCoords"); - function Ll(e, t) { - var i = 0; - t = N(e.doc, t), e.options.lineWrapping || (i = Mt(e.display) * t.ch); - var r = S(e.doc, t.line), - n = Ie(r) + Kr(e.display); - return { - left: i, - right: i, - top: n, - bottom: n + r.height - }; - } - u(Ll, "estimateCoords"); - function Yi(e, t, i, r, n) { - var l = y(e, t, i); - return l.xRel = n, r && (l.outside = r), l; - } - u(Yi, "PosWithInfo"); - function qi(e, t, i) { - var r = e.doc; - if (i += e.display.viewOffset, i < 0) return Yi(r.first, 0, null, -1, -1); - var n = at(r, i), - l = r.first + r.size - 1; - if (n > l) return Yi(r.first + r.size - 1, S(r, l).text.length, null, 1, 1); - t < 0 && (t = 0); - for (var o = S(r, n);;) { - var a = Xa(e, o, n, t, i), - s = ba(o, a.ch + (a.xRel > 0 || a.outside > 0 ? 1 : 0)); - if (!s) return a; - var f = s.find(1); - if (f.line == n) return f; - o = S(r, n = f.line); - } - } - u(qi, "coordsChar"); - function kl(e, t, i, r) { - r -= Xi(t); - var n = t.text.length, - l = Yt(function (o) { - return Oe(e, i, o - 1).bottom <= r; - }, n, 0); - return n = Yt(function (o) { - return Oe(e, i, o).top > r; - }, l, n), { - begin: l, - end: n - }; - } - u(kl, "wrappedLineExtent"); - function Tl(e, t, i, r) { - i || (i = kt(e, t)); - var n = _r(e, t, Oe(e, i, r), "line").top; - return kl(e, t, i, n); - } - u(Tl, "wrappedLineExtentChar"); - function Zi(e, t, i, r) { - return e.bottom <= i ? !1 : e.top > i ? !0 : (r ? e.left : e.right) > t; - } - u(Zi, "boxIsAfter"); - function Xa(e, t, i, r, n) { - n -= Ie(t); - var l = kt(e, t), - o = Xi(t), - a = 0, - s = t.text.length, - f = !0, - h = Pe(t, e.doc.direction); - if (h) { - var c = (e.options.lineWrapping ? qa : Ya)(e, t, i, l, h, r, n); - f = c.level != 1, a = f ? c.from : c.to - 1, s = f ? c.to : c.from - 1; - } - var p = null, - d = null, - v = Yt(function (k) { - var L = Oe(e, l, k); - return L.top += o, L.bottom += o, Zi(L, r, n, !1) ? (L.top <= n && L.left <= r && (p = k, d = L), !0) : !1; - }, a, s), - g, - m, - b = !1; - if (d) { - var C = r - d.left < d.right - r, - x = C == f; - v = p + (x ? 0 : 1), m = x ? "after" : "before", g = C ? d.left : d.right; - } else { - !f && (v == s || v == a) && v++, m = v == 0 ? "after" : v == t.text.length ? "before" : Oe(e, l, v - (f ? 1 : 0)).bottom + o <= n == f ? "after" : "before"; - var w = Le(e, y(i, v, m), "line", t, l); - g = w.left, b = n < w.top ? -1 : n >= w.bottom ? 1 : 0; - } - return v = En(t.text, v, 1), Yi(i, v, m, b, r - g); - } - u(Xa, "coordsCharInner"); - function Ya(e, t, i, r, n, l, o) { - var a = Yt(function (c) { - var p = n[c], - d = p.level != 1; - return Zi(Le(e, y(i, d ? p.to : p.from, d ? "before" : "after"), "line", t, r), l, o, !0); - }, 0, n.length - 1), - s = n[a]; - if (a > 0) { - var f = s.level != 1, - h = Le(e, y(i, f ? s.from : s.to, f ? "after" : "before"), "line", t, r); - Zi(h, l, o, !0) && h.top > o && (s = n[a - 1]); - } - return s; - } - u(Ya, "coordsBidiPart"); - function qa(e, t, i, r, n, l, o) { - var a = kl(e, t, r, o), - s = a.begin, - f = a.end; - /\s/.test(t.text.charAt(f - 1)) && f--; - for (var h = null, c = null, p = 0; p < n.length; p++) { - var d = n[p]; - if (!(d.from >= f || d.to <= s)) { - var v = d.level != 1, - g = Oe(e, r, v ? Math.min(f, d.to) - 1 : Math.max(s, d.from)).right, - m = g < l ? l - g + 1e9 : g - l; - (!h || c > m) && (h = d, c = m); + const responseName = selection.alias ? selection.alias.value : fieldName; + if (!nodeAndDefs[responseName]) { + nodeAndDefs[responseName] = []; } + nodeAndDefs[responseName].push([parentType, selection, fieldDef]); + break; } - return h || (h = n[n.length - 1]), h.from < s && (h = { - from: s, - to: h.to, - level: h.level - }), h.to > f && (h = { - from: h.from, - to: f, - level: h.level - }), h; - } - u(qa, "coordsBidiPartWrapped"); - var ut; - function Tt(e) { - if (e.cachedTextHeight != null) return e.cachedTextHeight; - if (ut == null) { - ut = T("pre", null, "CodeMirror-line-like"); - for (var t = 0; t < 49; ++t) ut.appendChild(document.createTextNode("x")), ut.appendChild(T("br")); - ut.appendChild(document.createTextNode("x")); - } - ve(e.measure, ut); - var i = ut.offsetHeight / 50; - return i > 3 && (e.cachedTextHeight = i), Ue(e.measure), i || 1; - } - u(Tt, "textHeight"); - function Mt(e) { - if (e.cachedCharWidth != null) return e.cachedCharWidth; - var t = T("span", "xxxxxxxxxx"), - i = T("pre", [t], "CodeMirror-line-like"); - ve(e.measure, i); - var r = t.getBoundingClientRect(), - n = (r.right - r.left) / 10; - return n > 2 && (e.cachedCharWidth = n), n || 10; - } - u(Mt, "charWidth"); - function Qi(e) { - for (var t = e.display, i = {}, r = {}, n = t.gutters.clientLeft, l = t.gutters.firstChild, o = 0; l; l = l.nextSibling, ++o) { - var a = e.display.gutterSpecs[o].className; - i[a] = l.offsetLeft + l.clientLeft + n, r[a] = l.clientWidth; - } - return { - fixedPos: Ji(t), - gutterTotalWidth: t.gutters.offsetWidth, - gutterLeft: i, - gutterWidth: r, - wrapperWidth: t.wrapper.clientWidth - }; - } - u(Qi, "getDimensions"); - function Ji(e) { - return e.scroller.getBoundingClientRect().left - e.sizer.getBoundingClientRect().left; - } - u(Ji, "compensateForHScroll"); - function Ml(e) { - var t = Tt(e.display), - i = e.options.lineWrapping, - r = i && Math.max(5, e.display.scroller.clientWidth / Mt(e.display) - 3); - return function (n) { - if (Xe(e.doc, n)) return 0; - var l = 0; - if (n.widgets) for (var o = 0; o < n.widgets.length; o++) n.widgets[o].height && (l += n.widgets[o].height); - return i ? l + (Math.ceil(n.text.length / r) || 1) * t : l + t; - }; - } - u(Ml, "estimateHeight"); - function ji(e) { - var t = e.doc, - i = Ml(e); - t.iter(function (r) { - var n = i(r); - n != r.height && De(r, n); - }); - } - u(ji, "estimateLineHeights"); - function ft(e, t, i, r) { - var n = e.display; - if (!i && wi(t).getAttribute("cm-not-content") == "true") return null; - var l, - o, - a = n.lineSpace.getBoundingClientRect(); - try { - l = t.clientX - a.left, o = t.clientY - a.top; - } catch { - return null; - } - var s = qi(e, l, o), - f; - if (r && s.xRel > 0 && (f = S(e.doc, s.line).text).length == s.ch) { - var h = xe(f, f.length, e.options.tabSize) - f.length; - s = y(s.line, Math.max(0, Math.round((l - pl(e.display).left) / Mt(e.display)) - h)); - } - return s; - } - u(ft, "posFromMouse"); - function ht(e, t) { - if (t >= e.display.viewTo || (t -= e.display.viewFrom, t < 0)) return null; - for (var i = e.display.view, r = 0; r < i.length; r++) if (t -= i[r].size, t < 0) return r; - } - u(ht, "findViewIndex"); - function se(e, t, i, r) { - t == null && (t = e.doc.first), i == null && (i = e.doc.first + e.doc.size), r || (r = 0); - var n = e.display; - if (r && i < n.viewTo && (n.updateLineNumbers == null || n.updateLineNumbers > t) && (n.updateLineNumbers = t), e.curOp.viewChanged = !0, t >= n.viewTo) Ee && Ri(e.doc, t) < n.viewTo && qe(e);else if (i <= n.viewFrom) Ee && nl(e.doc, i + r) > n.viewFrom ? qe(e) : (n.viewFrom += r, n.viewTo += r);else if (t <= n.viewFrom && i >= n.viewTo) qe(e);else if (t <= n.viewFrom) { - var l = Yr(e, i, i + r, 1); - l ? (n.view = n.view.slice(l.index), n.viewFrom = l.lineN, n.viewTo += r) : qe(e); - } else if (i >= n.viewTo) { - var o = Yr(e, t, t, -1); - o ? (n.view = n.view.slice(0, o.index), n.viewTo = o.lineN) : qe(e); - } else { - var a = Yr(e, t, t, -1), - s = Yr(e, i, i + r, 1); - a && s ? (n.view = n.view.slice(0, a.index).concat(Ur(e, a.lineN, s.lineN)).concat(n.view.slice(s.index)), n.viewTo += r) : qe(e); - } - var f = n.externalMeasured; - f && (i < f.lineN ? f.lineN += r : t < f.lineN + f.size && (n.externalMeasured = null)); - } - u(se, "regChange"); - function Ye(e, t, i) { - e.curOp.viewChanged = !0; - var r = e.display, - n = e.display.externalMeasured; - if (n && t >= n.lineN && t < n.lineN + n.size && (r.externalMeasured = null), !(t < r.viewFrom || t >= r.viewTo)) { - var l = r.view[ht(e, t)]; - if (l.node != null) { - var o = l.changes || (l.changes = []); - ee(o, i) == -1 && o.push(i); - } - } - } - u(Ye, "regLineChange"); - function qe(e) { - e.display.viewFrom = e.display.viewTo = e.doc.first, e.display.view = [], e.display.viewOffset = 0; - } - u(qe, "resetView"); - function Yr(e, t, i, r) { - var n = ht(e, t), - l, - o = e.display.view; - if (!Ee || i == e.doc.first + e.doc.size) return { - index: n, - lineN: i - }; - for (var a = e.display.viewFrom, s = 0; s < n; s++) a += o[s].size; - if (a != t) { - if (r > 0) { - if (n == o.length - 1) return null; - l = a + o[n].size - t, n++; - } else l = a - t; - t += l, i += l; - } - for (; Ri(e.doc, i) != i;) { - if (n == (r < 0 ? 0 : o.length - 1)) return null; - i += r * o[n - (r < 0 ? 1 : 0)].size, n += r; + case _kinds.Kind.FRAGMENT_SPREAD: + fragmentNames[selection.name.value] = true; + break; + case _kinds.Kind.INLINE_FRAGMENT: + { + const typeCondition = selection.typeCondition; + const inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType; + _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames); + break; } - return { - index: n, - lineN: i - }; + } + } +} // Given a series of Conflicts which occurred between two sub-fields, generate +// a single Conflict. + +function subfieldConflicts(conflicts, responseName, node1, node2) { + if (conflicts.length > 0) { + return [[responseName, conflicts.map(([reason]) => reason)], [node1, ...conflicts.map(([, fields1]) => fields1).flat()], [node2, ...conflicts.map(([,, fields2]) => fields2).flat()]]; + } +} +/** + * A way to keep track of pairs of things when the ordering of the pair does not matter. + */ + +class PairSet { + constructor() { + this._data = new Map(); + } + has(a, b, areMutuallyExclusive) { + var _this$_data$get; + const [key1, key2] = a < b ? [a, b] : [b, a]; + const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2); + if (result === undefined) { + return false; + } // areMutuallyExclusive being false is a superset of being true, hence if + // we want to know if this PairSet "has" these two with no exclusivity, + // we have to ensure it was added as such. + + return areMutuallyExclusive ? true : areMutuallyExclusive === result; + } + add(a, b, areMutuallyExclusive) { + const [key1, key2] = a < b ? [a, b] : [b, a]; + const map = this._data.get(key1); + if (map === undefined) { + this._data.set(key1, new Map([[key2, areMutuallyExclusive]])); + } else { + map.set(key2, areMutuallyExclusive); + } + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs": +/*!**************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs ***! + \**************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); +var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +/** + * Possible fragment spread + * + * A fragment spread is only valid if the type condition could ever possibly + * be true: if there is a non-empty intersection of the possible parent types, + * and possible types which pass the type condition. + */ +function PossibleFragmentSpreadsRule(context) { + return { + InlineFragment(node) { + const fragType = context.getType(); + const parentType = context.getParentType(); + if ((0, _definition.isCompositeType)(fragType) && (0, _definition.isCompositeType)(parentType) && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { + const parentTypeStr = (0, _inspect.inspect)(parentType); + const fragTypeStr = (0, _inspect.inspect)(fragType); + context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { + nodes: node + })); } - u(Yr, "viewCuttingPoint"); - function Za(e, t, i) { - var r = e.display, - n = r.view; - n.length == 0 || t >= r.viewTo || i <= r.viewFrom ? (r.view = Ur(e, t, i), r.viewFrom = t) : (r.viewFrom > t ? r.view = Ur(e, t, r.viewFrom).concat(r.view) : r.viewFrom < t && (r.view = r.view.slice(ht(e, t))), r.viewFrom = t, r.viewTo < i ? r.view = r.view.concat(Ur(e, r.viewTo, i)) : r.viewTo > i && (r.view = r.view.slice(0, ht(e, i)))), r.viewTo = i; + }, + FragmentSpread(node) { + const fragName = node.name.value; + const fragType = getFragmentType(context, fragName); + const parentType = context.getParentType(); + if (fragType && parentType && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { + const parentTypeStr = (0, _inspect.inspect)(parentType); + const fragTypeStr = (0, _inspect.inspect)(fragType); + context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { + nodes: node + })); } - u(Za, "adjustView"); - function Dl(e) { - for (var t = e.display.view, i = 0, r = 0; r < t.length; r++) { - var n = t[r]; - !n.hidden && (!n.node || n.changes) && ++i; - } - return i; + } + }; +} +function getFragmentType(context, name) { + const frag = context.getFragment(name); + if (frag) { + const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), frag.typeCondition); + if ((0, _definition.isCompositeType)(type)) { + return type; + } + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs": +/*!*************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs ***! + \*************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule; +var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Possible type extension + * + * A type extension is only valid if the type is defined and has the same kind. + */ +function PossibleTypeExtensionsRule(context) { + const schema = context.getSchema(); + const definedTypes = Object.create(null); + for (const def of context.getDocument().definitions) { + if ((0, _predicates.isTypeDefinitionNode)(def)) { + definedTypes[def.name.value] = def; + } + } + return { + ScalarTypeExtension: checkExtension, + ObjectTypeExtension: checkExtension, + InterfaceTypeExtension: checkExtension, + UnionTypeExtension: checkExtension, + EnumTypeExtension: checkExtension, + InputObjectTypeExtension: checkExtension + }; + function checkExtension(node) { + const typeName = node.name.value; + const defNode = definedTypes[typeName]; + const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); + let expectedKind; + if (defNode) { + expectedKind = defKindToExtKind[defNode.kind]; + } else if (existingType) { + expectedKind = typeToExtKind(existingType); + } + if (expectedKind) { + if (expectedKind !== node.kind) { + const kindStr = extensionKindToTypeName(node.kind); + context.reportError(new _GraphQLError.GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, { + nodes: defNode ? [defNode, node] : node + })); } - u(Dl, "countDirtyView"); - function ir(e) { - e.display.input.showSelection(e.display.input.prepareSelection()); - } - u(ir, "updateSelection"); - function Nl(e, t) { - t === void 0 && (t = !0); - var i = e.doc, - r = {}, - n = r.cursors = document.createDocumentFragment(), - l = r.selection = document.createDocumentFragment(), - o = e.options.$customCursor; - o && (t = !0); - for (var a = 0; a < i.sel.ranges.length; a++) if (!(!t && a == i.sel.primIndex)) { - var s = i.sel.ranges[a]; - if (!(s.from().line >= e.display.viewTo || s.to().line < e.display.viewFrom)) { - var f = s.empty(); - if (o) { - var h = o(e, s); - h && Vi(e, h, n); - } else (f || e.options.showCursorWhenSelecting) && Vi(e, s.head, n); - f || Qa(e, s, l); - } + } else { + const allTypeNames = Object.keys({ + ...definedTypes, + ...(schema === null || schema === void 0 ? void 0 : schema.getTypeMap()) + }); + const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, allTypeNames); + context.reportError(new _GraphQLError.GraphQLError(`Cannot extend type "${typeName}" because it is not defined.` + (0, _didYouMean.didYouMean)(suggestedTypes), { + nodes: node.name + })); + } + } +} +const defKindToExtKind = { + [_kinds.Kind.SCALAR_TYPE_DEFINITION]: _kinds.Kind.SCALAR_TYPE_EXTENSION, + [_kinds.Kind.OBJECT_TYPE_DEFINITION]: _kinds.Kind.OBJECT_TYPE_EXTENSION, + [_kinds.Kind.INTERFACE_TYPE_DEFINITION]: _kinds.Kind.INTERFACE_TYPE_EXTENSION, + [_kinds.Kind.UNION_TYPE_DEFINITION]: _kinds.Kind.UNION_TYPE_EXTENSION, + [_kinds.Kind.ENUM_TYPE_DEFINITION]: _kinds.Kind.ENUM_TYPE_EXTENSION, + [_kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION]: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION +}; +function typeToExtKind(type) { + if ((0, _definition.isScalarType)(type)) { + return _kinds.Kind.SCALAR_TYPE_EXTENSION; + } + if ((0, _definition.isObjectType)(type)) { + return _kinds.Kind.OBJECT_TYPE_EXTENSION; + } + if ((0, _definition.isInterfaceType)(type)) { + return _kinds.Kind.INTERFACE_TYPE_EXTENSION; + } + if ((0, _definition.isUnionType)(type)) { + return _kinds.Kind.UNION_TYPE_EXTENSION; + } + if ((0, _definition.isEnumType)(type)) { + return _kinds.Kind.ENUM_TYPE_EXTENSION; + } + if ((0, _definition.isInputObjectType)(type)) { + return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + /* c8 ignore next 3 */ + // Not reachable. All possible types have been considered + + false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type)); +} +function extensionKindToTypeName(kind) { + switch (kind) { + case _kinds.Kind.SCALAR_TYPE_EXTENSION: + return 'scalar'; + case _kinds.Kind.OBJECT_TYPE_EXTENSION: + return 'object'; + case _kinds.Kind.INTERFACE_TYPE_EXTENSION: + return 'interface'; + case _kinds.Kind.UNION_TYPE_EXTENSION: + return 'union'; + case _kinds.Kind.ENUM_TYPE_EXTENSION: + return 'enum'; + case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: + return 'input object'; + // Not reachable. All possible types have been considered + + /* c8 ignore next */ + + default: + false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(kind)); + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs": +/*!****************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs ***! + \****************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ProvidedRequiredArgumentsOnDirectivesRule = ProvidedRequiredArgumentsOnDirectivesRule; +exports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +/** + * Provided required arguments + * + * A field or directive is only valid if all required (non-null without a + * default value) field arguments have been provided. + */ +function ProvidedRequiredArgumentsRule(context) { + return { + // eslint-disable-next-line new-cap + ...ProvidedRequiredArgumentsOnDirectivesRule(context), + Field: { + // Validate on leave to allow for deeper errors to appear first. + leave(fieldNode) { + var _fieldNode$arguments; + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + return false; } - return r; - } - u(Nl, "prepareSelection"); - function Vi(e, t, i) { - var r = Le(e, t, "div", null, null, !e.options.singleCursorHeightPerLine), - n = i.appendChild(T("div", " ", "CodeMirror-cursor")); - if (n.style.left = r.left + "px", n.style.top = r.top + "px", n.style.height = Math.max(0, r.bottom - r.top) * e.options.cursorHeight + "px", /\bcm-fat-cursor\b/.test(e.getWrapperElement().className)) { - var l = Xr(e, t, "div", null, null), - o = l.right - l.left; - n.style.width = (o > 0 ? o : e.defaultCharWidth()) + "px"; - } - if (r.other) { - var a = i.appendChild(T("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor")); - a.style.display = "", a.style.left = r.other.left + "px", a.style.top = r.other.top + "px", a.style.height = (r.other.bottom - r.other.top) * .85 + "px"; - } - } - u(Vi, "drawSelectionCursor"); - function qr(e, t) { - return e.top - t.top || e.left - t.left; - } - u(qr, "cmpCoords"); - function Qa(e, t, i) { - var r = e.display, - n = e.doc, - l = document.createDocumentFragment(), - o = pl(e.display), - a = o.left, - s = Math.max(r.sizerWidth, st(e) - r.sizer.offsetLeft) - o.right, - f = n.direction == "ltr"; - function h(x, w, k, L) { - w < 0 && (w = 0), w = Math.round(w), L = Math.round(L), l.appendChild(T("div", null, "CodeMirror-selected", "position: absolute; left: " + x + `px; - top: ` + w + "px; width: " + (k !== null && k !== void 0 ? k : s - x) + `px; - height: ` + (L - w) + "px")); - } - u(h, "add"); - function c(x, w, k) { - var L = S(n, x), - A = L.text.length, - E, - j; - function B(_, he) { - return Xr(e, y(x, _), "div", L, he); - } - u(B, "coords"); - function pe(_, he, $) { - var Y = Tl(e, L, null, _), - X = he == "ltr" == ($ == "after") ? "left" : "right", - z = $ == "after" ? Y.begin : Y.end - (/\s/.test(L.text.charAt(Y.end - 1)) ? 2 : 1); - return B(z, X)[X]; + const providedArgs = new Set( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + /* c8 ignore next */ + (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map(arg => arg.name.value)); + for (const argDef of fieldDef.args) { + if (!providedArgs.has(argDef.name) && (0, _definition.isRequiredArgument)(argDef)) { + const argTypeStr = (0, _inspect.inspect)(argDef.type); + context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, { + nodes: fieldNode + })); } - u(pe, "wrapX"); - var fe = Pe(L, n.direction); - return Vo(fe, w || 0, k !== null && k !== void 0 ? k : A, function (_, he, $, Y) { - var X = $ == "ltr", - z = B(_, X ? "left" : "right"), - ce = B(he - 1, X ? "right" : "left"), - zt = w == null && _ == 0, - $e = k == null && he == A, - re = Y == 0, - We = !fe || Y == fe.length - 1; - if (ce.top - z.top <= 3) { - var V = (f ? zt : $e) && re, - kn = (f ? $e : zt) && We, - Ge = V ? a : (X ? z : ce).left, - gt = kn ? s : (X ? ce : z).right; - h(Ge, z.top, gt - Ge, z.bottom); - } else { - var yt, oe, Gt, Tn; - X ? (yt = f && zt && re ? a : z.left, oe = f ? s : pe(_, $, "before"), Gt = f ? a : pe(he, $, "after"), Tn = f && $e && We ? s : ce.right) : (yt = f ? pe(_, $, "before") : a, oe = !f && zt && re ? s : z.right, Gt = !f && $e && We ? a : ce.left, Tn = f ? pe(he, $, "after") : s), h(yt, z.top, oe - yt, z.bottom), z.bottom < ce.top && h(a, z.bottom, null, ce.top), h(Gt, ce.top, Tn - Gt, ce.bottom); - } - (!E || qr(z, E) < 0) && (E = z), qr(ce, E) < 0 && (E = ce), (!j || qr(z, j) < 0) && (j = z), qr(ce, j) < 0 && (j = ce); - }), { - start: E, - end: j - }; } - u(c, "drawForLine"); - var p = t.from(), - d = t.to(); - if (p.line == d.line) c(p.line, p.ch, d.ch);else { - var v = S(n, p.line), - g = S(n, d.line), - m = Se(v) == Se(g), - b = c(p.line, p.ch, m ? v.text.length + 1 : null).end, - C = c(d.line, m ? 0 : null, d.ch).start; - m && (b.top < C.top - 2 ? (h(b.right, b.top, null, b.bottom), h(a, C.top, C.left, C.bottom)) : h(b.right, b.top, C.left - b.right, b.bottom)), b.bottom < C.top && h(a, b.bottom, null, C.top); - } - i.appendChild(l); - } - u(Qa, "drawSelectionRange"); - function $i(e) { - if (e.state.focused) { - var t = e.display; - clearInterval(t.blinker); - var i = !0; - t.cursorDiv.style.visibility = "", e.options.cursorBlinkRate > 0 ? t.blinker = setInterval(function () { - e.hasFocus() || Dt(e), t.cursorDiv.style.visibility = (i = !i) ? "" : "hidden"; - }, e.options.cursorBlinkRate) : e.options.cursorBlinkRate < 0 && (t.cursorDiv.style.visibility = "hidden"); - } - } - u($i, "restartBlink"); - function Al(e) { - e.hasFocus() || (e.display.input.focus(), e.state.focused || tn(e)); - } - u(Al, "ensureFocus"); - function en(e) { - e.state.delayingBlurEvent = !0, setTimeout(function () { - e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1, e.state.focused && Dt(e)); - }, 100); } - u(en, "delayBlurEvent"); - function tn(e, t) { - e.state.delayingBlurEvent && !e.state.draggingText && (e.state.delayingBlurEvent = !1), e.options.readOnly != "nocursor" && (e.state.focused || (U(e, "focus", e, t), e.state.focused = !0, it(e.display.wrapper, "CodeMirror-focused"), !e.curOp && e.display.selForContextMenu != e.doc.sel && (e.display.input.reset(), ne && setTimeout(function () { - return e.display.input.reset(!0); - }, 20)), e.display.input.receivedFocus()), $i(e)); - } - u(tn, "onFocus"); - function Dt(e, t) { - e.state.delayingBlurEvent || (e.state.focused && (U(e, "blur", e, t), e.state.focused = !1, tt(e.display.wrapper, "CodeMirror-focused")), clearInterval(e.display.blinker), setTimeout(function () { - e.state.focused || (e.display.shift = !1); - }, 150)); - } - u(Dt, "onBlur"); - function Zr(e) { - for (var t = e.display, i = t.lineDiv.offsetTop, r = Math.max(0, t.scroller.getBoundingClientRect().top), n = t.lineDiv.getBoundingClientRect().top, l = 0, o = 0; o < t.view.length; o++) { - var a = t.view[o], - s = e.options.lineWrapping, - f = void 0, - h = 0; - if (!a.hidden) { - if (n += a.line.height, O && I < 8) { - var c = a.node.offsetTop + a.node.offsetHeight; - f = c - i, i = c; - } else { - var p = a.node.getBoundingClientRect(); - f = p.bottom - p.top, !s && a.text.firstChild && (h = a.text.firstChild.getBoundingClientRect().right - p.left - 1); - } - var d = a.line.height - f; - if ((d > .005 || d < -.005) && (n < r && (l -= d), De(a.line, f), Ol(a.line), a.rest)) for (var v = 0; v < a.rest.length; v++) Ol(a.rest[v]); - if (h > e.display.sizerWidth) { - var g = Math.ceil(h / Mt(e.display)); - g > e.display.maxLineLength && (e.display.maxLineLength = g, e.display.maxLine = a.line, e.display.maxLineChanged = !0); + } + }; +} +/** + * @internal + */ + +function ProvidedRequiredArgumentsOnDirectivesRule(context) { + var _schema$getDirectives; + const requiredArgsMap = Object.create(null); + const schema = context.getSchema(); + const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : _directives.specifiedDirectives; + for (const directive of definedDirectives) { + requiredArgsMap[directive.name] = (0, _keyMap.keyMap)(directive.args.filter(_definition.isRequiredArgument), arg => arg.name); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + requiredArgsMap[def.name.value] = (0, _keyMap.keyMap)(argNodes.filter(isRequiredArgumentNode), arg => arg.name.value); + } + } + return { + Directive: { + // Validate on leave to allow for deeper errors to appear first. + leave(directiveNode) { + const directiveName = directiveNode.name.value; + const requiredArgs = requiredArgsMap[directiveName]; + if (requiredArgs) { + var _directiveNode$argume; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + const argNodeMap = new Set(argNodes.map(arg => arg.name.value)); + for (const [argName, argDef] of Object.entries(requiredArgs)) { + if (!argNodeMap.has(argName)) { + const argType = (0, _definition.isType)(argDef.type) ? (0, _inspect.inspect)(argDef.type) : (0, _printer.print)(argDef.type); + context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, { + nodes: directiveNode + })); } } } - Math.abs(l) > 2 && (t.scroller.scrollTop += l); - } - u(Zr, "updateHeightsInViewport"); - function Ol(e) { - if (e.widgets) for (var t = 0; t < e.widgets.length; ++t) { - var i = e.widgets[t], - r = i.node.parentNode; - r && (i.height = r.offsetHeight); - } - } - u(Ol, "updateWidgetHeight"); - function Qr(e, t, i) { - var r = i && i.top != null ? Math.max(0, i.top) : e.scroller.scrollTop; - r = Math.floor(r - Kr(e)); - var n = i && i.bottom != null ? i.bottom : r + e.wrapper.clientHeight, - l = at(t, r), - o = at(t, n); - if (i && i.ensure) { - var a = i.ensure.from.line, - s = i.ensure.to.line; - a < l ? (l = a, o = at(t, Ie(S(t, a)) + e.wrapper.clientHeight)) : Math.min(s, t.lastLine()) >= o && (l = at(t, Ie(S(t, s)) - e.wrapper.clientHeight), o = s); - } - return { - from: l, - to: Math.max(o, l + 1) - }; } - u(Qr, "visibleLines"); - function Ja(e, t) { - if (!q(e, "scrollCursorIntoView")) { - var i = e.display, - r = i.sizer.getBoundingClientRect(), - n = null; - if (t.top + r.top < 0 ? n = !0 : t.bottom + r.top > (window.innerHeight || document.documentElement.clientHeight) && (n = !1), n != null && !Yo) { - var l = T("div", "​", null, `position: absolute; - top: ` + (t.top - i.viewOffset - Kr(e.display)) + `px; - height: ` + (t.bottom - t.top + Ae(e) + i.barHeight) + `px; - left: ` + t.left + "px; width: " + Math.max(2, t.right - t.left) + "px;"); - e.display.lineSpace.appendChild(l), l.scrollIntoView(n), e.display.lineSpace.removeChild(l); + } + }; +} +function isRequiredArgumentNode(arg) { + return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs": +/*!**************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ScalarLeafsRule = ScalarLeafsRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Scalar leafs + * + * A GraphQL document is valid only if all leaf fields (fields without + * sub selections) are of scalar or enum types. + */ +function ScalarLeafsRule(context) { + return { + Field(node) { + const type = context.getType(); + const selectionSet = node.selectionSet; + if (type) { + if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) { + if (selectionSet) { + const fieldName = node.name.value; + const typeStr = (0, _inspect.inspect)(type); + context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, { + nodes: selectionSet + })); } + } else if (!selectionSet) { + const fieldName = node.name.value; + const typeStr = (0, _inspect.inspect)(type); + context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, { + nodes: node + })); } } - u(Ja, "maybeScrollWindow"); - function ja(e, t, i, r) { - r == null && (r = 0); - var n; - !e.options.lineWrapping && t == i && (i = t.sticky == "before" ? y(t.line, t.ch + 1, "before") : t, t = t.ch ? y(t.line, t.sticky == "before" ? t.ch - 1 : t.ch, "after") : t); - for (var l = 0; l < 5; l++) { - var o = !1, - a = Le(e, t), - s = !i || i == t ? a : Le(e, i); - n = { - left: Math.min(a.left, s.left), - top: Math.min(a.top, s.top) - r, - right: Math.max(a.left, s.left), - bottom: Math.max(a.bottom, s.bottom) + r - }; - var f = rn(e, n), - h = e.doc.scrollTop, - c = e.doc.scrollLeft; - if (f.scrollTop != null && (lr(e, f.scrollTop), Math.abs(e.doc.scrollTop - h) > 1 && (o = !0)), f.scrollLeft != null && (ct(e, f.scrollLeft), Math.abs(e.doc.scrollLeft - c) > 1 && (o = !0)), !o) break; - } - return n; - } - u(ja, "scrollPosIntoView"); - function Va(e, t) { - var i = rn(e, t); - i.scrollTop != null && lr(e, i.scrollTop), i.scrollLeft != null && ct(e, i.scrollLeft); - } - u(Va, "scrollIntoView"); - function rn(e, t) { - var i = e.display, - r = Tt(e.display); - t.top < 0 && (t.top = 0); - var n = e.curOp && e.curOp.scrollTop != null ? e.curOp.scrollTop : i.scroller.scrollTop, - l = Ki(e), - o = {}; - t.bottom - t.top > l && (t.bottom = t.top + l); - var a = e.doc.height + Ui(i), - s = t.top < r, - f = t.bottom > a - r; - if (t.top < n) o.scrollTop = s ? 0 : t.top;else if (t.bottom > n + l) { - var h = Math.min(t.top, (f ? a : t.bottom) - l); - h != n && (o.scrollTop = h); - } - var c = e.options.fixedGutter ? 0 : i.gutters.offsetWidth, - p = e.curOp && e.curOp.scrollLeft != null ? e.curOp.scrollLeft : i.scroller.scrollLeft - c, - d = st(e) - i.gutters.offsetWidth, - v = t.right - t.left > d; - return v && (t.right = t.left + d), t.left < 10 ? o.scrollLeft = 0 : t.left < p ? o.scrollLeft = Math.max(0, t.left + c - (v ? 0 : 10)) : t.right > d + p - 3 && (o.scrollLeft = t.right + (v ? 0 : 10) - d), o; - } - u(rn, "calculateScrollPos"); - function nn(e, t) { - t != null && (Jr(e), e.curOp.scrollTop = (e.curOp.scrollTop == null ? e.doc.scrollTop : e.curOp.scrollTop) + t); - } - u(nn, "addToScrollTop"); - function Nt(e) { - Jr(e); - var t = e.getCursor(); - e.curOp.scrollToPos = { - from: t, - to: t, - margin: e.options.cursorScrollMargin - }; - } - u(Nt, "ensureCursorVisible"); - function nr(e, t, i) { - (t != null || i != null) && Jr(e), t != null && (e.curOp.scrollLeft = t), i != null && (e.curOp.scrollTop = i); - } - u(nr, "scrollToCoords"); - function $a(e, t) { - Jr(e), e.curOp.scrollToPos = t; - } - u($a, "scrollToRange"); - function Jr(e) { - var t = e.curOp.scrollToPos; - if (t) { - e.curOp.scrollToPos = null; - var i = Ll(e, t.from), - r = Ll(e, t.to); - Wl(e, i, r, t.margin); - } - } - u(Jr, "resolveScrollToPos"); - function Wl(e, t, i, r) { - var n = rn(e, { - left: Math.min(t.left, i.left), - top: Math.min(t.top, i.top) - r, - right: Math.max(t.right, i.right), - bottom: Math.max(t.bottom, i.bottom) + r - }); - nr(e, n.scrollLeft, n.scrollTop); - } - u(Wl, "scrollToCoordsRange"); - function lr(e, t) { - Math.abs(e.doc.scrollTop - t) < 2 || (Fe || on(e, { - top: t - }), Hl(e, t, !0), Fe && on(e), sr(e, 100)); - } - u(lr, "updateScrollTop"); - function Hl(e, t, i) { - t = Math.max(0, Math.min(e.display.scroller.scrollHeight - e.display.scroller.clientHeight, t)), !(e.display.scroller.scrollTop == t && !i) && (e.doc.scrollTop = t, e.display.scrollbars.setScrollTop(t), e.display.scroller.scrollTop != t && (e.display.scroller.scrollTop = t)); - } - u(Hl, "setScrollTop"); - function ct(e, t, i, r) { - t = Math.max(0, Math.min(t, e.display.scroller.scrollWidth - e.display.scroller.clientWidth)), !((i ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) && !r) && (e.doc.scrollLeft = t, Rl(e), e.display.scroller.scrollLeft != t && (e.display.scroller.scrollLeft = t), e.display.scrollbars.setScrollLeft(t)); - } - u(ct, "setScrollLeft"); - function or(e) { - var t = e.display, - i = t.gutters.offsetWidth, - r = Math.round(e.doc.height + Ui(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 ? i : 0, - docHeight: r, - scrollHeight: r + Ae(e) + t.barHeight, - nativeBarWidth: t.nativeBarWidth, - gutterWidth: i - }; - } - u(or, "measureForScrollbars"); - var dt = u(function (e, t, i) { - this.cm = i; - var r = this.vert = T("div", [T("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"), - n = this.horiz = T("div", [T("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); - r.tabIndex = n.tabIndex = -1, e(r), e(n), M(r, "scroll", function () { - r.clientHeight && t(r.scrollTop, "vertical"); - }), M(n, "scroll", function () { - n.clientWidth && t(n.scrollLeft, "horizontal"); - }), this.checkedZeroWidth = !1, O && I < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px"); - }, "NativeScrollbars"); - dt.prototype.update = function (e) { - var t = e.scrollWidth > e.clientWidth + 1, - i = e.scrollHeight > e.clientHeight + 1, - r = e.nativeBarWidth; - if (i) { - this.vert.style.display = "block", this.vert.style.bottom = t ? r + "px" : "0"; - var n = e.viewHeight - (t ? r : 0); - this.vert.firstChild.style.height = Math.max(0, e.scrollHeight - e.clientHeight + n) + "px"; - } else this.vert.scrollTop = 0, this.vert.style.display = "", this.vert.firstChild.style.height = "0"; - if (t) { - this.horiz.style.display = "block", this.horiz.style.right = i ? r + "px" : "0", this.horiz.style.left = e.barLeft + "px"; - var l = e.viewWidth - e.barLeft - (i ? r : 0); - this.horiz.firstChild.style.width = Math.max(0, e.scrollWidth - e.clientWidth + l) + "px"; - } else this.horiz.style.display = "", this.horiz.firstChild.style.width = "0"; - return !this.checkedZeroWidth && e.clientHeight > 0 && (r == 0 && this.zeroWidthHack(), this.checkedZeroWidth = !0), { - right: i ? r : 0, - bottom: t ? r : 0 - }; - }, dt.prototype.setScrollLeft = function (e) { - this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); - }, dt.prototype.setScrollTop = function (e) { - this.vert.scrollTop != e && (this.vert.scrollTop = e), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); - }, dt.prototype.zeroWidthHack = function () { - var e = me && !Xo ? "12px" : "18px"; - this.horiz.style.height = this.vert.style.width = e, this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none", this.disableHoriz = new _e(), this.disableVert = new _e(); - }, dt.prototype.enableZeroWidthBar = function (e, t, i) { - e.style.pointerEvents = "auto"; - function r() { - var n = e.getBoundingClientRect(), - l = i == "vert" ? document.elementFromPoint(n.right - 1, (n.top + n.bottom) / 2) : document.elementFromPoint((n.right + n.left) / 2, n.bottom - 1); - l != e ? e.style.pointerEvents = "none" : t.set(1e3, r); - } - u(r, "maybeDisable"), t.set(1e3, r); - }, dt.prototype.clear = function () { - var e = this.horiz.parentNode; - e.removeChild(this.horiz), e.removeChild(this.vert); - }; - var ar = u(function () {}, "NullScrollbars"); - ar.prototype.update = function () { - return { - bottom: 0, - right: 0 - }; - }, ar.prototype.setScrollLeft = function () {}, ar.prototype.setScrollTop = function () {}, ar.prototype.clear = function () {}; - function At(e, t) { - t || (t = or(e)); - var i = e.display.barWidth, - r = e.display.barHeight; - Fl(e, t); - for (var n = 0; n < 4 && i != e.display.barWidth || r != e.display.barHeight; n++) i != e.display.barWidth && e.options.lineWrapping && Zr(e), Fl(e, or(e)), i = e.display.barWidth, r = e.display.barHeight; - } - u(At, "updateScrollbars"); - function Fl(e, t) { - var i = e.display, - r = i.scrollbars.update(t); - i.sizer.style.paddingRight = (i.barWidth = r.right) + "px", i.sizer.style.paddingBottom = (i.barHeight = r.bottom) + "px", i.heightForcer.style.borderBottom = r.bottom + "px solid transparent", r.right && r.bottom ? (i.scrollbarFiller.style.display = "block", i.scrollbarFiller.style.height = r.bottom + "px", i.scrollbarFiller.style.width = r.right + "px") : i.scrollbarFiller.style.display = "", r.bottom && e.options.coverGutterNextToScrollbar && e.options.fixedGutter ? (i.gutterFiller.style.display = "block", i.gutterFiller.style.height = r.bottom + "px", i.gutterFiller.style.width = t.gutterWidth + "px") : i.gutterFiller.style.display = ""; - } - u(Fl, "updateScrollbarsInner"); - var Pl = { - native: dt, - null: ar - }; - function El(e) { - e.display.scrollbars && (e.display.scrollbars.clear(), e.display.scrollbars.addClass && tt(e.display.wrapper, e.display.scrollbars.addClass)), e.display.scrollbars = new Pl[e.options.scrollbarStyle](function (t) { - e.display.wrapper.insertBefore(t, e.display.scrollbarFiller), M(t, "mousedown", function () { - e.state.focused && setTimeout(function () { - return e.display.input.focus(); - }, 0); - }), t.setAttribute("cm-not-content", "true"); - }, function (t, i) { - i == "horizontal" ? ct(e, t) : lr(e, t); - }, e), e.display.scrollbars.addClass && it(e.display.wrapper, e.display.scrollbars.addClass); - } - u(El, "initScrollbars"); - var es = 0; - function pt(e) { - e.curOp = { - cm: e, - viewChanged: !1, - startHeight: e.doc.height, - forceUpdate: !1, - updateInput: 0, - typing: !1, - changeObjs: null, - cursorActivityHandlers: null, - cursorActivityCalled: 0, - selectionChanged: !1, - updateMaxLine: !1, - scrollLeft: null, - scrollTop: null, - scrollToPos: null, - focus: !1, - id: ++es, - markArrays: null - }, Oa(e.curOp); - } - u(pt, "startOperation"); - function vt(e) { - var t = e.curOp; - t && Ha(t, function (i) { - for (var r = 0; r < i.ops.length; r++) i.ops[r].cm.curOp = null; - ts(i); - }); - } - u(vt, "endOperation"); - function ts(e) { - for (var t = e.ops, i = 0; i < t.length; i++) rs(t[i]); - for (var r = 0; r < t.length; r++) is(t[r]); - for (var n = 0; n < t.length; n++) ns(t[n]); - for (var l = 0; l < t.length; l++) ls(t[l]); - for (var o = 0; o < t.length; o++) os(t[o]); - } - u(ts, "endOperations"); - function rs(e) { - var t = e.cm, - i = t.display; - ss(t), e.updateMaxLine && zi(t), e.mustUpdate = e.viewChanged || e.forceUpdate || e.scrollTop != null || e.scrollToPos && (e.scrollToPos.from.line < i.viewFrom || e.scrollToPos.to.line >= i.viewTo) || i.maxLineChanged && t.options.lineWrapping, e.update = e.mustUpdate && new jr(t, e.mustUpdate && { - top: e.scrollTop, - ensure: e.scrollToPos - }, e.forceUpdate); - } - u(rs, "endOperation_R1"); - function is(e) { - e.updatedDisplay = e.mustUpdate && ln(e.cm, e.update); - } - u(is, "endOperation_W1"); - function ns(e) { - var t = e.cm, - i = t.display; - e.updatedDisplay && Zr(t), e.barMeasure = or(t), i.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo = gl(t, i.maxLine, i.maxLine.text.length).left + 3, t.display.sizerWidth = e.adjustWidthTo, e.barMeasure.scrollWidth = Math.max(i.scroller.clientWidth, i.sizer.offsetLeft + e.adjustWidthTo + Ae(t) + t.display.barWidth), e.maxScrollLeft = Math.max(0, i.sizer.offsetLeft + e.adjustWidthTo - st(t))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = i.input.prepareSelection()); - } - u(ns, "endOperation_R2"); - function ls(e) { - var t = e.cm; - e.adjustWidthTo != null && (t.display.sizer.style.minWidth = e.adjustWidthTo + "px", e.maxScrollLeft < t.doc.scrollLeft && ct(t, Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), !0), t.display.maxLineChanged = !1); - var i = e.focus && e.focus == be(); - e.preparedSelection && t.display.input.showSelection(e.preparedSelection, i), (e.updatedDisplay || e.startHeight != t.doc.height) && At(t, e.barMeasure), e.updatedDisplay && sn(t, e.barMeasure), e.selectionChanged && $i(t), t.state.focused && e.updateInput && t.display.input.reset(e.typing), i && Al(e.cm); - } - u(ls, "endOperation_W2"); - function os(e) { - var t = e.cm, - i = t.display, - r = t.doc; - if (e.updatedDisplay && Il(t, e.update), i.wheelStartX != null && (e.scrollTop != null || e.scrollLeft != null || e.scrollToPos) && (i.wheelStartX = i.wheelStartY = null), e.scrollTop != null && Hl(t, e.scrollTop, e.forceScroll), e.scrollLeft != null && ct(t, e.scrollLeft, !0, !0), e.scrollToPos) { - var n = ja(t, N(r, e.scrollToPos.from), N(r, e.scrollToPos.to), e.scrollToPos.margin); - Ja(t, n); - } - var l = e.maybeHiddenMarkers, - o = e.maybeUnhiddenMarkers; - if (l) for (var a = 0; a < l.length; ++a) l[a].lines.length || U(l[a], "hide"); - if (o) for (var s = 0; s < o.length; ++s) o[s].lines.length && U(o[s], "unhide"); - i.wrapper.offsetHeight && (r.scrollTop = t.display.scroller.scrollTop), e.changeObjs && U(t, "changes", t, e.changeObjs), e.update && e.update.finish(); - } - u(os, "endOperation_finish"); - function de(e, t) { - if (e.curOp) return t(); - pt(e); - try { - return t(); - } finally { - vt(e); - } - } - u(de, "runInOp"); - function Q(e, t) { - return function () { - if (e.curOp) return t.apply(e, arguments); - pt(e); - try { - return t.apply(e, arguments); - } finally { - vt(e); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs": +/*!***************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs ***! + \***************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _collectFields = __webpack_require__(/*! ../../execution/collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs"); +/** + * Subscriptions must only include a non-introspection field. + * + * A GraphQL subscription is valid only if it contains a single root field and + * that root field is not an introspection field. + * + * See https://spec.graphql.org/draft/#sec-Single-root-field + */ +function SingleFieldSubscriptionsRule(context) { + return { + OperationDefinition(node) { + if (node.operation === 'subscription') { + const schema = context.getSchema(); + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType) { + const operationName = node.name ? node.name.value : null; + const variableValues = Object.create(null); + const document = context.getDocument(); + const fragments = Object.create(null); + for (const definition of document.definitions) { + if (definition.kind === _kinds.Kind.FRAGMENT_DEFINITION) { + fragments[definition.name.value] = definition; + } } - }; - } - u(Q, "operation"); - function le(e) { - return function () { - if (this.curOp) return e.apply(this, arguments); - pt(this); - try { - return e.apply(this, arguments); - } finally { - vt(this); + const fields = (0, _collectFields.collectFields)(schema, fragments, variableValues, subscriptionType, node.selectionSet); + if (fields.size > 1) { + const fieldSelectionLists = [...fields.values()]; + const extraFieldSelectionLists = fieldSelectionLists.slice(1); + const extraFieldSelections = extraFieldSelectionLists.flat(); + context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must select only one top level field.` : 'Anonymous Subscription must select only one top level field.', { + nodes: extraFieldSelections + })); } - }; - } - u(le, "methodOp"); - function J(e) { - return function () { - var t = this.cm; - if (!t || t.curOp) return e.apply(this, arguments); - pt(t); - try { - return e.apply(this, arguments); - } finally { - vt(t); + for (const fieldNodes of fields.values()) { + const field = fieldNodes[0]; + const fieldName = field.name.value; + if (fieldName.startsWith('__')) { + context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : 'Anonymous Subscription must not select an introspection top level field.', { + nodes: fieldNodes + })); + } } - }; - } - u(J, "docMethodOp"); - function sr(e, t) { - e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(t, pi(as, e)); - } - u(sr, "startWorker"); - function as(e) { - var t = e.doc; - if (!(t.highlightFrontier >= e.display.viewTo)) { - var i = +new Date() + e.options.workTime, - r = jt(e, t.highlightFrontier), - n = []; - t.iter(r.line, Math.min(t.first + t.size, e.display.viewTo + 500), function (l) { - if (r.line >= e.display.viewFrom) { - var o = l.styles, - a = l.text.length > e.options.maxHighlightLength ? lt(t.mode, r.state) : null, - s = _n(e, l, r, !0); - a && (r.state = a), l.styles = s.styles; - var f = l.styleClasses, - h = s.classes; - h ? l.styleClasses = h : f && (l.styleClasses = null); - for (var c = !o || o.length != l.styles.length || f != h && (!f || !h || f.bgClass != h.bgClass || f.textClass != h.textClass), p = 0; !c && p < o.length; ++p) c = o[p] != l.styles[p]; - c && n.push(r.line), l.stateAfter = r.save(), r.nextLine(); - } else l.text.length <= e.options.maxHighlightLength && Fi(e, l.text, r), l.stateAfter = r.line % 5 == 0 ? r.save() : null, r.nextLine(); - if (+new Date() > i) return sr(e, e.options.workDelay), !0; - }), t.highlightFrontier = r.line, t.modeFrontier = Math.max(t.modeFrontier, r.line), n.length && de(e, function () { - for (var l = 0; l < n.length; l++) Ye(e, n[l], "text"); - }); } } - u(as, "highlightWorker"); - var jr = u(function (e, t, i) { - var r = e.display; - this.viewport = t, this.visible = Qr(r, e.doc, t), this.editorIsHidden = !r.wrapper.offsetWidth, this.wrapperHeight = r.wrapper.clientHeight, this.wrapperWidth = r.wrapper.clientWidth, this.oldDisplayWidth = st(e), this.force = i, this.dims = Qi(e), this.events = []; - }, "DisplayUpdate"); - jr.prototype.signal = function (e, t) { - Ce(e, t) && this.events.push(arguments); - }, jr.prototype.finish = function () { - for (var e = 0; e < this.events.length; e++) U.apply(null, this.events[e]); - }; - function ss(e) { - var t = e.display; - !t.scrollbarsClipped && t.scroller.offsetWidth && (t.nativeBarWidth = t.scroller.offsetWidth - t.scroller.clientWidth, t.heightForcer.style.height = Ae(e) + "px", t.sizer.style.marginBottom = -t.nativeBarWidth + "px", t.sizer.style.borderRightWidth = Ae(e) + "px", t.scrollbarsClipped = !0); - } - u(ss, "maybeClipScrollbars"); - function us(e) { - if (e.hasFocus()) return null; - var t = be(); - if (!t || !Ke(e.display.lineDiv, t)) return null; - var i = { - activeElt: t - }; - if (window.getSelection) { - var r = window.getSelection(); - r.anchorNode && r.extend && Ke(e.display.lineDiv, r.anchorNode) && (i.anchorNode = r.anchorNode, i.anchorOffset = r.anchorOffset, i.focusNode = r.focusNode, i.focusOffset = r.focusOffset); - } - return i; - } - u(us, "selectionSnapshot"); - function fs(e) { - if (!(!e || !e.activeElt || e.activeElt == be()) && (e.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e.anchorNode && Ke(document.body, e.anchorNode) && Ke(document.body, e.focusNode))) { - var t = window.getSelection(), - i = document.createRange(); - i.setEnd(e.anchorNode, e.anchorOffset), i.collapse(!1), t.removeAllRanges(), t.addRange(i), t.extend(e.focusNode, e.focusOffset); - } - } - u(fs, "restoreSelection"); - function ln(e, t) { - var i = e.display, - r = e.doc; - if (t.editorIsHidden) return qe(e), !1; - if (!t.force && t.visible.from >= i.viewFrom && t.visible.to <= i.viewTo && (i.updateLineNumbers == null || i.updateLineNumbers >= i.viewTo) && i.renderedView == i.view && Dl(e) == 0) return !1; - Bl(e) && (qe(e), t.dims = Qi(e)); - var n = r.first + r.size, - l = Math.max(t.visible.from - e.options.viewportMargin, r.first), - o = Math.min(n, t.visible.to + e.options.viewportMargin); - i.viewFrom < l && l - i.viewFrom < 20 && (l = Math.max(r.first, i.viewFrom)), i.viewTo > o && i.viewTo - o < 20 && (o = Math.min(n, i.viewTo)), Ee && (l = Ri(e.doc, l), o = nl(e.doc, o)); - var a = l != i.viewFrom || o != i.viewTo || i.lastWrapHeight != t.wrapperHeight || i.lastWrapWidth != t.wrapperWidth; - Za(e, l, o), i.viewOffset = Ie(S(e.doc, i.viewFrom)), e.display.mover.style.top = i.viewOffset + "px"; - var s = Dl(e); - if (!a && s == 0 && !t.force && i.renderedView == i.view && (i.updateLineNumbers == null || i.updateLineNumbers >= i.viewTo)) return !1; - var f = us(e); - return s > 4 && (i.lineDiv.style.display = "none"), hs(e, i.updateLineNumbers, t.dims), s > 4 && (i.lineDiv.style.display = ""), i.renderedView = i.view, fs(f), Ue(i.cursorDiv), Ue(i.selectionDiv), i.gutters.style.height = i.sizer.style.minHeight = 0, a && (i.lastWrapHeight = t.wrapperHeight, i.lastWrapWidth = t.wrapperWidth, sr(e, 400)), i.updateLineNumbers = null, !0; - } - u(ln, "updateDisplayIfNeeded"); - function Il(e, t) { - for (var i = t.viewport, r = !0;; r = !1) { - if (!r || !e.options.lineWrapping || t.oldDisplayWidth == st(e)) { - if (i && i.top != null && (i = { - top: Math.min(e.doc.height + Ui(e.display) - Ki(e), i.top) - }), t.visible = Qr(e.display, e.doc, i), t.visible.from >= e.display.viewFrom && t.visible.to <= e.display.viewTo) break; - } else r && (t.visible = Qr(e.display, e.doc, i)); - if (!ln(e, t)) break; - Zr(e); - var n = or(e); - ir(e), At(e, n), sn(e, n), 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); - } - u(Il, "postUpdateDisplay"); - function on(e, t) { - var i = new jr(e, t); - if (ln(e, i)) { - Zr(e), Il(e, i); - var r = or(e); - ir(e), At(e, r), sn(e, r), i.finish(); - } - } - u(on, "updateDisplaySimple"); - function hs(e, t, i) { - var r = e.display, - n = e.options.lineNumbers, - l = r.lineDiv, - o = l.firstChild; - function a(v) { - var g = v.nextSibling; - return ne && me && e.display.currentWheelTarget == v ? v.style.display = "none" : v.parentNode.removeChild(v), g; - } - u(a, "rm"); - for (var s = r.view, f = r.viewFrom, h = 0; h < s.length; h++) { - var c = s[h]; - if (!c.hidden) if (!c.node || c.node.parentNode != l) { - var p = Ra(e, c, f, i); - l.insertBefore(p, o); - } else { - for (; o != c.node;) o = a(o); - var d = n && t != null && t <= f && c.lineNumber; - c.changes && (ee(c.changes, "gutter") > -1 && (d = !1), ul(e, c, f, i)), d && (Ue(c.lineNumber), c.lineNumber.appendChild(document.createTextNode(Oi(e.options, f)))), o = c.node.nextSibling; - } - f += c.size; - } - for (; o;) o = a(o); - } - u(hs, "patchDisplay"); - function an(e) { - var t = e.gutters.offsetWidth; - e.sizer.style.marginLeft = t + "px", Z(e, "gutterChanged", e); - } - u(an, "updateGutterSpace"); - function sn(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 + Ae(e) + "px"; - } - u(sn, "setDocumentHeight"); - function Rl(e) { - var t = e.display, - i = t.view; - if (!(!t.alignWidgets && (!t.gutters.firstChild || !e.options.fixedGutter))) { - for (var r = Ji(t) - t.scroller.scrollLeft + e.doc.scrollLeft, n = t.gutters.offsetWidth, l = r + "px", o = 0; o < i.length; o++) if (!i[o].hidden) { - e.options.fixedGutter && (i[o].gutter && (i[o].gutter.style.left = l), i[o].gutterBackground && (i[o].gutterBackground.style.left = l)); - var a = i[o].alignable; - if (a) for (var s = 0; s < a.length; s++) a[s].style.left = l; - } - e.options.fixedGutter && (t.gutters.style.left = r + n + "px"); - } - } - u(Rl, "alignHorizontally"); - function Bl(e) { - if (!e.options.lineNumbers) return !1; - var t = e.doc, - i = Oi(e.options, t.first + t.size - 1), - r = e.display; - if (i.length != r.lineNumChars) { - var n = r.measure.appendChild(T("div", [T("div", i)], "CodeMirror-linenumber CodeMirror-gutter-elt")), - l = n.firstChild.offsetWidth, - o = n.offsetWidth - l; - return r.lineGutter.style.width = "", r.lineNumInnerWidth = Math.max(l, r.lineGutter.offsetWidth - o) + 1, r.lineNumWidth = r.lineNumInnerWidth + o, r.lineNumChars = r.lineNumInnerWidth ? i.length : -1, r.lineGutter.style.width = r.lineNumWidth + "px", an(e.display), !0; - } - return !1; - } - u(Bl, "maybeUpdateLineNumberWidth"); - function un(e, t) { - for (var i = [], r = !1, n = 0; n < e.length; n++) { - var l = e[n], - o = null; - if (typeof l != "string" && (o = l.style, l = l.className), l == "CodeMirror-linenumbers") if (t) r = !0;else continue; - i.push({ - className: l, - style: o - }); - } - return t && !r && i.push({ - className: "CodeMirror-linenumbers", - style: null - }), i; - } - u(un, "getGutters"); - function zl(e) { - var t = e.gutters, - i = e.gutterSpecs; - Ue(t), e.lineGutter = null; - for (var r = 0; r < i.length; ++r) { - var n = i[r], - l = n.className, - o = n.style, - a = t.appendChild(T("div", null, "CodeMirror-gutter " + l)); - o && (a.style.cssText = o), l == "CodeMirror-linenumbers" && (e.lineGutter = a, a.style.width = (e.lineNumWidth || 1) + "px"); - } - t.style.display = i.length ? "" : "none", an(e); - } - u(zl, "renderGutters"); - function ur(e) { - zl(e.display), se(e), Rl(e); - } - u(ur, "updateGutters"); - function cs(e, t, i, r) { - var n = this; - this.input = i, n.scrollbarFiller = T("div", null, "CodeMirror-scrollbar-filler"), n.scrollbarFiller.setAttribute("cm-not-content", "true"), n.gutterFiller = T("div", null, "CodeMirror-gutter-filler"), n.gutterFiller.setAttribute("cm-not-content", "true"), n.lineDiv = bt("div", null, "CodeMirror-code"), n.selectionDiv = T("div", null, null, "position: relative; z-index: 1"), n.cursorDiv = T("div", null, "CodeMirror-cursors"), n.measure = T("div", null, "CodeMirror-measure"), n.lineMeasure = T("div", null, "CodeMirror-measure"), n.lineSpace = bt("div", [n.measure, n.lineMeasure, n.selectionDiv, n.cursorDiv, n.lineDiv], null, "position: relative; outline: none"); - var l = bt("div", [n.lineSpace], "CodeMirror-lines"); - n.mover = T("div", [l], null, "position: relative"), n.sizer = T("div", [n.mover], "CodeMirror-sizer"), n.sizerWidth = null, n.heightForcer = T("div", null, null, "position: absolute; height: " + Wn + "px; width: 1px;"), n.gutters = T("div", null, "CodeMirror-gutters"), n.lineGutter = null, n.scroller = T("div", [n.sizer, n.heightForcer, n.gutters], "CodeMirror-scroll"), n.scroller.setAttribute("tabIndex", "-1"), n.wrapper = T("div", [n.scrollbarFiller, n.gutterFiller, n.scroller], "CodeMirror"), n.wrapper.setAttribute("translate", "no"), O && I < 8 && (n.gutters.style.zIndex = -1, n.scroller.style.paddingRight = 0), !ne && !(Fe && Kt) && (n.scroller.draggable = !0), e && (e.appendChild ? e.appendChild(n.wrapper) : e(n.wrapper)), n.viewFrom = n.viewTo = t.first, n.reportedViewFrom = n.reportedViewTo = t.first, n.view = [], n.renderedView = null, n.externalMeasured = null, n.viewOffset = 0, n.lastWrapHeight = n.lastWrapWidth = 0, n.updateLineNumbers = null, n.nativeBarWidth = n.barHeight = n.barWidth = 0, n.scrollbarsClipped = !1, n.lineNumWidth = n.lineNumInnerWidth = n.lineNumChars = null, n.alignWidgets = !1, n.cachedCharWidth = n.cachedTextHeight = n.cachedPaddingH = null, n.maxLine = null, n.maxLineLength = 0, n.maxLineChanged = !1, n.wheelDX = n.wheelDY = n.wheelStartX = n.wheelStartY = null, n.shift = !1, n.selForContextMenu = null, n.activeTouch = null, n.gutterSpecs = un(r.gutters, r.lineNumbers), zl(n), i.init(n); - } - u(cs, "Display"); - var Vr = 0, - Be = null; - O ? Be = -.53 : Fe ? Be = 15 : Tr ? Be = -.7 : Mr && (Be = -1 / 3); - function Gl(e) { - var t = e.wheelDeltaX, - i = e.wheelDeltaY; - return t == null && e.detail && e.axis == e.HORIZONTAL_AXIS && (t = e.detail), i == null && e.detail && e.axis == e.VERTICAL_AXIS ? i = e.detail : i == null && (i = e.wheelDelta), { - x: t, - y: i - }; - } - u(Gl, "wheelEventDelta"); - function ds(e) { - var t = Gl(e); - return t.x *= Be, t.y *= Be, t; - } - u(ds, "wheelEventPixels"); - function Ul(e, t) { - var i = Gl(t), - r = i.x, - n = i.y, - l = Be; - t.deltaMode === 0 && (r = t.deltaX, n = t.deltaY, l = 1); - var o = e.display, - a = o.scroller, - s = a.scrollWidth > a.clientWidth, - f = a.scrollHeight > a.clientHeight; - if (r && s || n && f) { - if (n && me && ne) { - e: for (var h = t.target, c = o.view; h != a; h = h.parentNode) for (var p = 0; p < c.length; p++) if (c[p].node == h) { - e.display.currentWheelTarget = h; - break e; - } - } - if (r && !Fe && !we && l != null) { - n && f && lr(e, Math.max(0, a.scrollTop + n * l)), ct(e, Math.max(0, a.scrollLeft + r * l)), (!n || n && f) && ae(t), o.wheelStartX = null; - return; - } - if (n && l != null) { - var d = n * l, - v = e.doc.scrollTop, - g = v + o.wrapper.clientHeight; - d < 0 ? v = Math.max(0, v + d - 50) : g = Math.min(e.doc.height, g + d + 50), on(e, { - top: v, - bottom: g - }); - } - Vr < 20 && t.deltaMode !== 0 && (o.wheelStartX == null ? (o.wheelStartX = a.scrollLeft, o.wheelStartY = a.scrollTop, o.wheelDX = r, o.wheelDY = n, setTimeout(function () { - if (o.wheelStartX != null) { - var m = a.scrollLeft - o.wheelStartX, - b = a.scrollTop - o.wheelStartY, - C = b && o.wheelDY && b / o.wheelDY || m && o.wheelDX && m / o.wheelDX; - o.wheelStartX = o.wheelStartY = null, C && (Be = (Be * Vr + C) / (Vr + 1), ++Vr); - } - }, 200)) : (o.wheelDX += r, o.wheelDY += n)); - } - } - u(Ul, "onScrollWheel"); - var ye = u(function (e, t) { - this.ranges = e, this.primIndex = t; - }, "Selection"); - ye.prototype.primary = function () { - return this.ranges[this.primIndex]; - }, ye.prototype.equals = function (e) { - if (e == this) return !0; - if (e.primIndex != this.primIndex || e.ranges.length != this.ranges.length) return !1; - for (var t = 0; t < this.ranges.length; t++) { - var i = this.ranges[t], - r = e.ranges[t]; - if (!Wi(i.anchor, r.anchor) || !Wi(i.head, r.head)) return !1; - } - return !0; - }, ye.prototype.deepCopy = function () { - for (var e = [], t = 0; t < this.ranges.length; t++) e[t] = new W(Hi(this.ranges[t].anchor), Hi(this.ranges[t].head)); - return new ye(e, this.primIndex); - }, ye.prototype.somethingSelected = function () { - for (var e = 0; e < this.ranges.length; e++) if (!this.ranges[e].empty()) return !0; - return !1; - }, ye.prototype.contains = function (e, t) { - t || (t = e); - for (var i = 0; i < this.ranges.length; i++) { - var r = this.ranges[i]; - if (D(t, r.from()) >= 0 && D(e, r.to()) <= 0) return i; - } - return -1; - }; - var W = u(function (e, t) { - this.anchor = e, this.head = t; - }, "Range"); - W.prototype.from = function () { - return Pr(this.anchor, this.head); - }, W.prototype.to = function () { - return Fr(this.anchor, this.head); - }, W.prototype.empty = function () { - return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; - }; - function ke(e, t, i) { - var r = e && e.options.selectionsMayTouch, - n = t[i]; - t.sort(function (p, d) { - return D(p.from(), d.from()); - }), i = ee(t, n); - for (var l = 1; l < t.length; l++) { - var o = t[l], - a = t[l - 1], - s = D(a.to(), o.from()); - if (r && !o.empty() ? s > 0 : s >= 0) { - var f = Pr(a.from(), o.from()), - h = Fr(a.to(), o.to()), - c = a.empty() ? o.from() == o.head : a.from() == a.head; - l <= i && --i, t.splice(--l, 2, new W(c ? h : f, c ? f : h)); - } - } - return new ye(t, i); - } - u(ke, "normalizeSelection"); - function Ze(e, t) { - return new ye([new W(e, t || e)], 0); - } - u(Ze, "simpleSelection"); - function Qe(e) { - return e.text ? y(e.from.line + e.text.length - 1, H(e.text).length + (e.text.length == 1 ? e.from.ch : 0)) : e.to; - } - u(Qe, "changeEnd"); - function Kl(e, t) { - if (D(e, t.from) < 0) return e; - if (D(e, t.to) <= 0) return Qe(t); - var i = e.line + t.text.length - (t.to.line - t.from.line) - 1, - r = e.ch; - return e.line == t.to.line && (r += Qe(t).ch - t.to.ch), y(i, r); - } - u(Kl, "adjustForChange"); - function fn(e, t) { - for (var i = [], r = 0; r < e.sel.ranges.length; r++) { - var n = e.sel.ranges[r]; - i.push(new W(Kl(n.anchor, t), Kl(n.head, t))); - } - return ke(e.cm, i, e.sel.primIndex); - } - u(fn, "computeSelAfterChange"); - function _l(e, t, i) { - return e.line == t.line ? y(i.line, e.ch - t.ch + i.ch) : y(i.line + (e.line - t.line), e.ch); - } - u(_l, "offsetPos"); - function ps(e, t, i) { - for (var r = [], n = y(e.first, 0), l = n, o = 0; o < t.length; o++) { - var a = t[o], - s = _l(a.from, n, l), - f = _l(Qe(a), n, l); - if (n = a.to, l = f, i == "around") { - var h = e.sel.ranges[o], - c = D(h.head, h.anchor) < 0; - r[o] = new W(c ? f : s, c ? s : f); - } else r[o] = new W(s, s); - } - return new ye(r, e.sel.primIndex); - } - u(ps, "computeReplacedSel"); - function hn(e) { - e.doc.mode = Di(e.options, e.doc.modeOption), fr(e); - } - u(hn, "loadMode"); - function fr(e) { - e.doc.iter(function (t) { - t.stateAfter && (t.stateAfter = null), t.styles && (t.styles = null); - }), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, sr(e, 100), e.state.modeGen++, e.curOp && se(e); - } - u(fr, "resetModeState"); - function Xl(e, t) { - return t.from.ch == 0 && t.to.ch == 0 && H(t.text) == "" && (!e.cm || e.cm.options.wholeLineUpdateBefore); - } - u(Xl, "isWholeLineUpdate"); - function cn(e, t, i, r) { - function n(C) { - return i ? i[C] : null; - } - u(n, "spansFor"); - function l(C, x, w) { - wa(C, x, w, r), Z(C, "change", C, t); - } - u(l, "update"); - function o(C, x) { - for (var w = [], k = C; k < x; ++k) w.push(new St(f[k], n(k), r)); - return w; - } - u(o, "linesFor"); - var a = t.from, - s = t.to, - f = t.text, - h = S(e, a.line), - c = S(e, s.line), - p = H(f), - d = n(f.length - 1), - v = s.line - a.line; - if (t.full) e.insert(0, o(0, f.length)), e.remove(f.length, e.size - f.length);else if (Xl(e, t)) { - var g = o(0, f.length - 1); - l(c, c.text, d), v && e.remove(a.line, v), g.length && e.insert(a.line, g); - } else if (h == c) { - if (f.length == 1) l(h, h.text.slice(0, a.ch) + p + h.text.slice(s.ch), d);else { - var m = o(1, f.length - 1); - m.push(new St(p + h.text.slice(s.ch), d, r)), l(h, h.text.slice(0, a.ch) + f[0], n(0)), e.insert(a.line + 1, m); - } - } else if (f.length == 1) l(h, h.text.slice(0, a.ch) + f[0] + c.text.slice(s.ch), n(0)), e.remove(a.line + 1, v);else { - l(h, h.text.slice(0, a.ch) + f[0], n(0)), l(c, p + c.text.slice(s.ch), d); - var b = o(1, f.length - 1); - v > 1 && e.remove(a.line + 1, v - 1), e.insert(a.line + 1, b); - } - Z(e, "change", e, t); - } - u(cn, "updateDoc"); - function Je(e, t, i) { - function r(n, l, o) { - if (n.linked) for (var a = 0; a < n.linked.length; ++a) { - var s = n.linked[a]; - if (s.doc != l) { - var f = o && s.sharedHist; - i && !f || (t(s.doc, f), r(s.doc, n, f)); - } - } - } - u(r, "propagate"), r(e, null, !0); - } - u(Je, "linkedDocs"); - function Yl(e, t) { - if (t.cm) throw new Error("This document is already in use."); - e.doc = t, t.cm = e, ji(e), hn(e), ql(e), e.options.direction = t.direction, e.options.lineWrapping || zi(e), e.options.mode = t.modeOption, se(e); - } - u(Yl, "attachDoc"); - function ql(e) { - (e.doc.direction == "rtl" ? it : tt)(e.display.lineDiv, "CodeMirror-rtl"); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs": +/*!********************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs ***! + \********************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueArgumentDefinitionNamesRule = UniqueArgumentDefinitionNamesRule; +var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique argument definition names + * + * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments. + * A GraphQL Directive is only valid if all its arguments are uniquely named. + */ +function UniqueArgumentDefinitionNamesRule(context) { + return { + DirectiveDefinition(directiveNode) { + var _directiveNode$argume; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes); + }, + InterfaceTypeDefinition: checkArgUniquenessPerField, + InterfaceTypeExtension: checkArgUniquenessPerField, + ObjectTypeDefinition: checkArgUniquenessPerField, + ObjectTypeExtension: checkArgUniquenessPerField + }; + function checkArgUniquenessPerField(typeNode) { + var _typeNode$fields; + const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : []; + for (const fieldDef of fieldNodes) { + var _fieldDef$arguments; + const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : []; + checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes); + } + return false; + } + function checkArgUniqueness(parentName, argumentNodes) { + const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError(new _GraphQLError.GraphQLError(`Argument "${parentName}(${argName}:)" can only be defined once.`, { + nodes: argNodes.map(node => node.name) + })); } - u(ql, "setDirectionClass"); - function vs(e) { - de(e, function () { - ql(e), se(e); - }); + } + return false; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs": +/*!**********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule; +var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique argument names + * + * A GraphQL field or directive is only valid if all supplied arguments are + * uniquely named. + * + * See https://spec.graphql.org/draft/#sec-Argument-Names + */ +function UniqueArgumentNamesRule(context) { + return { + Field: checkArgUniqueness, + Directive: checkArgUniqueness + }; + function checkArgUniqueness(parentNode) { + var _parentNode$arguments; + + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : []; + const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one argument named "${argName}".`, { + nodes: argNodes.map(node => node.name) + })); } - u(vs, "directionChanged"); - function $r(e) { - this.done = [], this.undone = [], this.undoDepth = e ? e.undoDepth : 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = e ? e.maxGeneration : 1; + } + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique directive names + * + * A GraphQL document is only valid if all defined directives have unique names. + */ +function UniqueDirectiveNamesRule(context) { + const knownDirectiveNames = Object.create(null); + const schema = context.getSchema(); + return { + DirectiveDefinition(node) { + const directiveName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) { + context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, { + nodes: node.name + })); + return; } - u($r, "History"); - function dn(e, t) { - var i = { - from: Hi(t.from), - to: Qe(t), - text: ot(e, t.from, t.to) - }; - return Jl(e, i, t.from.line, t.to.line + 1), Je(e, function (r) { - return Jl(r, i, t.from.line, t.to.line + 1); - }, !0), i; - } - u(dn, "historyChangeFromChange"); - function Zl(e) { - for (; e.length;) { - var t = H(e); - if (t.ranges) e.pop();else break; - } - } - u(Zl, "clearSelectionEvents"); - function gs(e, t) { - if (t) return Zl(e.done), H(e.done); - if (e.done.length && !H(e.done).ranges) return H(e.done); - if (e.done.length > 1 && !e.done[e.done.length - 2].ranges) return e.done.pop(), H(e.done); - } - u(gs, "lastChangeEvent"); - function Ql(e, t, i, r) { - var n = e.history; - n.undone.length = 0; - var l = +new Date(), - o, - a; - if ((n.lastOp == r || n.lastOrigin == t.origin && t.origin && (t.origin.charAt(0) == "+" && n.lastModTime > l - (e.cm ? e.cm.options.historyEventDelay : 500) || t.origin.charAt(0) == "*")) && (o = gs(n, n.lastOp == r))) a = H(o.changes), D(t.from, t.to) == 0 && D(t.from, a.to) == 0 ? a.to = Qe(t) : o.changes.push(dn(e, t));else { - var s = H(n.done); - for ((!s || !s.ranges) && ei(e.sel, n.done), o = { - changes: [dn(e, t)], - generation: n.generation - }, n.done.push(o); n.done.length > n.undoDepth;) n.done.shift(), n.done[0].ranges || n.done.shift(); - } - n.done.push(i), n.generation = ++n.maxGeneration, n.lastModTime = n.lastSelTime = l, n.lastOp = n.lastSelOp = r, n.lastOrigin = n.lastSelOrigin = t.origin, a || U(e, "historyAdded"); - } - u(Ql, "addChangeToHistory"); - function ys(e, t, i, r) { - var n = t.charAt(0); - return n == "*" || n == "+" && i.ranges.length == r.ranges.length && i.somethingSelected() == r.somethingSelected() && new Date() - e.history.lastSelTime <= (e.cm ? e.cm.options.historyEventDelay : 500); - } - u(ys, "selectionEventCanBeMerged"); - function ms(e, t, i, r) { - var n = e.history, - l = r && r.origin; - i == n.lastSelOp || l && n.lastSelOrigin == l && (n.lastModTime == n.lastSelTime && n.lastOrigin == l || ys(e, l, H(n.done), t)) ? n.done[n.done.length - 1] = t : ei(t, n.done), n.lastSelTime = +new Date(), n.lastSelOrigin = l, n.lastSelOp = i, r && r.clearRedo !== !1 && Zl(n.undone); - } - u(ms, "addSelectionToHistory"); - function ei(e, t) { - var i = H(t); - i && i.ranges && i.equals(e) || t.push(e); - } - u(ei, "pushSelectionToHistory"); - function Jl(e, t, i, r) { - var n = t["spans_" + e.id], - l = 0; - e.iter(Math.max(e.first, i), Math.min(e.first + e.size, r), function (o) { - o.markedSpans && ((n || (n = t["spans_" + e.id] = {}))[l] = o.markedSpans), ++l; - }); + if (knownDirectiveNames[directiveName]) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one directive named "@${directiveName}".`, { + nodes: [knownDirectiveNames[directiveName], node.name] + })); + } else { + knownDirectiveNames[directiveName] = node.name; } - u(Jl, "attachLocalSpans"); - function bs(e) { - if (!e) return null; - for (var t, i = 0; i < e.length; ++i) e[i].marker.explicitlyCleared ? t || (t = e.slice(0, i)) : t && t.push(e[i]); - return t ? t.length ? t : null : e; - } - u(bs, "removeClearedSpans"); - function xs(e, t) { - var i = t["spans_" + e.id]; - if (!i) return null; - for (var r = [], n = 0; n < t.text.length; ++n) r.push(bs(i[n])); - return r; + return false; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs": +/*!******************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs ***! + \******************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs"); +var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs"); +/** + * Unique directive names per location + * + * A GraphQL document is only valid if all non-repeatable directives at + * a given location are uniquely named. + * + * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location + */ +function UniqueDirectivesPerLocationRule(context) { + const uniqueDirectiveMap = Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + for (const directive of definedDirectives) { + uniqueDirectiveMap[directive.name] = !directive.isRepeatable; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + uniqueDirectiveMap[def.name.value] = !def.repeatable; + } + } + const schemaDirectives = Object.create(null); + const typeDirectivesMap = Object.create(null); + return { + // Many different AST nodes may contain directives. Rather than listing + // them all, just listen for entering any node, and check to see if it + // defines any directives. + enter(node) { + if (!('directives' in node) || !node.directives) { + return; } - u(xs, "getOldSpans"); - function jl(e, t) { - var i = xs(e, t), - r = Ei(e, t); - if (!i) return r; - if (!r) return i; - for (var n = 0; n < i.length; ++n) { - var l = i[n], - o = r[n]; - if (l && o) e: for (var a = 0; a < o.length; ++a) { - for (var s = o[a], f = 0; f < l.length; ++f) if (l[f].marker == s.marker) continue e; - l.push(s); - } else o && (i[n] = o); + let seenDirectives; + if (node.kind === _kinds.Kind.SCHEMA_DEFINITION || node.kind === _kinds.Kind.SCHEMA_EXTENSION) { + seenDirectives = schemaDirectives; + } else if ((0, _predicates.isTypeDefinitionNode)(node) || (0, _predicates.isTypeExtensionNode)(node)) { + const typeName = node.name.value; + seenDirectives = typeDirectivesMap[typeName]; + if (seenDirectives === undefined) { + typeDirectivesMap[typeName] = seenDirectives = Object.create(null); } - return i; + } else { + seenDirectives = Object.create(null); } - u(jl, "mergeOldSpans"); - function Ot(e, t, i) { - for (var r = [], n = 0; n < e.length; ++n) { - var l = e[n]; - if (l.ranges) { - r.push(i ? ye.prototype.deepCopy.call(l) : l); - continue; - } - var o = l.changes, - a = []; - r.push({ - changes: a - }); - for (var s = 0; s < o.length; ++s) { - var f = o[s], - h = void 0; - if (a.push({ - from: f.from, - to: f.to, - text: f.text - }), t) for (var c in f) (h = c.match(/^spans_(\d+)$/)) && ee(t, Number(h[1])) > -1 && (H(a)[c] = f[c], delete f[c]); + for (const directive of node.directives) { + const directiveName = directive.name.value; + if (uniqueDirectiveMap[directiveName]) { + if (seenDirectives[directiveName]) { + context.reportError(new _GraphQLError.GraphQLError(`The directive "@${directiveName}" can only be used once at this location.`, { + nodes: [seenDirectives[directiveName], directive] + })); + } else { + seenDirectives[directiveName] = directive; } } - return r; } - u(Ot, "copyHistoryArray"); - function pn(e, t, i, r) { - if (r) { - var n = e.anchor; - if (i) { - var l = D(t, n) < 0; - l != D(i, n) < 0 ? (n = t, t = i) : l != D(t, i) < 0 && (t = i); - } - return new W(n, t); - } else return new W(i || t, t); - } - u(pn, "extendRange"); - function ti(e, t, i, r, n) { - n == null && (n = e.cm && (e.cm.display.shift || e.extend)), te(e, new ye([pn(e.sel.primary(), t, i, n)], 0), r); - } - u(ti, "extendSelection"); - function Vl(e, t, i) { - for (var r = [], n = e.cm && (e.cm.display.shift || e.extend), l = 0; l < e.sel.ranges.length; l++) r[l] = pn(e.sel.ranges[l], t[l], null, n); - var o = ke(e.cm, r, e.sel.primIndex); - te(e, o, i); - } - u(Vl, "extendSelections"); - function vn(e, t, i, r) { - var n = e.sel.ranges.slice(0); - n[t] = i, te(e, ke(e.cm, n, e.sel.primIndex), r); - } - u(vn, "replaceOneSelection"); - function $l(e, t, i, r) { - te(e, Ze(t, i), r); - } - u($l, "setSimpleSelection"); - function Cs(e, t, i) { - var r = { - ranges: t.ranges, - update: function (n) { - this.ranges = []; - for (var l = 0; l < n.length; l++) this.ranges[l] = new W(N(e, n[l].anchor), N(e, n[l].head)); - }, - origin: i && i.origin - }; - return U(e, "beforeSelectionChange", e, r), e.cm && U(e.cm, "beforeSelectionChange", e.cm, r), r.ranges != t.ranges ? ke(e.cm, r.ranges, r.ranges.length - 1) : t; - } - u(Cs, "filterSelectionChange"); - function eo(e, t, i) { - var r = e.history.done, - n = H(r); - n && n.ranges ? (r[r.length - 1] = t, ri(e, t, i)) : te(e, t, i); - } - u(eo, "setSelectionReplaceHistory"); - function te(e, t, i) { - ri(e, t, i), ms(e, e.sel, e.cm ? e.cm.curOp.id : NaN, i); - } - u(te, "setSelection"); - function ri(e, t, i) { - (Ce(e, "beforeSelectionChange") || e.cm && Ce(e.cm, "beforeSelectionChange")) && (t = Cs(e, t, i)); - var r = i && i.bias || (D(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1); - to(e, io(e, t, r, !0)), !(i && i.scroll === !1) && e.cm && e.cm.getOption("readOnly") != "nocursor" && Nt(e.cm); - } - u(ri, "setSelectionNoUndo"); - function to(e, t) { - t.equals(e.sel) || (e.sel = t, e.cm && (e.cm.curOp.updateInput = 1, e.cm.curOp.selectionChanged = !0, Rn(e.cm)), Z(e, "cursorActivity", e)); - } - u(to, "setSelectionInner"); - function ro(e) { - to(e, io(e, e.sel, null, !1)); - } - u(ro, "reCheckSelection"); - function io(e, t, i, r) { - for (var n, l = 0; l < t.ranges.length; l++) { - var o = t.ranges[l], - a = t.ranges.length == e.sel.ranges.length && e.sel.ranges[l], - s = ii(e, o.anchor, a && a.anchor, i, r), - f = ii(e, o.head, a && a.head, i, r); - (n || s != o.anchor || f != o.head) && (n || (n = t.ranges.slice(0, l)), n[l] = new W(s, f)); - } - return n ? ke(e.cm, n, t.primIndex) : t; - } - u(io, "skipAtomicInSelection"); - function Wt(e, t, i, r, n) { - var l = S(e, t.line); - if (l.markedSpans) for (var o = 0; o < l.markedSpans.length; ++o) { - var a = l.markedSpans[o], - s = a.marker, - f = "selectLeft" in s ? !s.selectLeft : s.inclusiveLeft, - h = "selectRight" in s ? !s.selectRight : s.inclusiveRight; - if ((a.from == null || (f ? a.from <= t.ch : a.from < t.ch)) && (a.to == null || (h ? a.to >= t.ch : a.to > t.ch))) { - if (n && (U(s, "beforeCursorEnter"), s.explicitlyCleared)) if (l.markedSpans) { - --o; - continue; - } else break; - if (!s.atomic) continue; - if (i) { - var c = s.find(r < 0 ? 1 : -1), - p = void 0; - if ((r < 0 ? h : f) && (c = no(e, c, -r, c && c.line == t.line ? l : null)), c && c.line == t.line && (p = D(c, i)) && (r < 0 ? p < 0 : p > 0)) return Wt(e, c, t, r, n); - } - var d = s.find(r < 0 ? -1 : 1); - return (r < 0 ? f : h) && (d = no(e, d, r, d.line == t.line ? l : null)), d ? Wt(e, d, t, r, n) : null; - } - } - return t; - } - u(Wt, "skipAtomicInner"); - function ii(e, t, i, r, n) { - var l = r || 1, - o = Wt(e, t, i, l, n) || !n && Wt(e, t, i, l, !0) || Wt(e, t, i, -l, n) || !n && Wt(e, t, i, -l, !0); - return o || (e.cantEdit = !0, y(e.first, 0)); - } - u(ii, "skipAtomic"); - function no(e, t, i, r) { - return i < 0 && t.ch == 0 ? t.line > e.first ? N(e, y(t.line - 1)) : null : i > 0 && t.ch == (r || S(e, t.line)).text.length ? t.line < e.first + e.size - 1 ? y(t.line + 1, 0) : null : new y(t.line, t.ch + i); - } - u(no, "movePos"); - function lo(e) { - e.setSelection(y(e.firstLine(), 0), y(e.lastLine()), Me); - } - u(lo, "selectAll"); - function oo(e, t, i) { - var r = { - canceled: !1, - from: t.from, - to: t.to, - text: t.text, - origin: t.origin, - cancel: function () { - return r.canceled = !0; - } - }; - return i && (r.update = function (n, l, o, a) { - n && (r.from = N(e, n)), l && (r.to = N(e, l)), o && (r.text = o), a !== void 0 && (r.origin = a); - }), U(e, "beforeChange", e, r), e.cm && U(e.cm, "beforeChange", e.cm, r), r.canceled ? (e.cm && (e.cm.curOp.updateInput = 2), null) : { - from: r.from, - to: r.to, - text: r.text, - origin: r.origin - }; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Unique enum value names + * + * A GraphQL enum type is only valid if all its values are uniquely named. + */ +function UniqueEnumValueNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); + const knownValueNames = Object.create(null); + return { + EnumTypeDefinition: checkValueUniqueness, + EnumTypeExtension: checkValueUniqueness + }; + function checkValueUniqueness(node) { + var _node$values; + const typeName = node.name.value; + if (!knownValueNames[typeName]) { + knownValueNames[typeName] = Object.create(null); + } // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + const valueNames = knownValueNames[typeName]; + for (const valueDef of valueNodes) { + const valueName = valueDef.name.value; + const existingType = existingTypeMap[typeName]; + if ((0, _definition.isEnumType)(existingType) && existingType.getValue(valueName)) { + context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, { + nodes: valueDef.name + })); + } else if (valueNames[valueName]) { + context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" can only be defined once.`, { + nodes: [valueNames[valueName], valueDef.name] + })); + } else { + valueNames[valueName] = valueDef.name; } - u(oo, "filterChange"); - function Ht(e, t, i) { - if (e.cm) { - if (!e.cm.curOp) return Q(e.cm, Ht)(e, t, i); - if (e.cm.state.suppressEdits) return; - } - if (!((Ce(e, "beforeChange") || e.cm && Ce(e.cm, "beforeChange")) && (t = oo(e, t, !0), !t))) { - var r = jn && !i && ma(e, t.from, t.to); - if (r) for (var n = r.length - 1; n >= 0; --n) ao(e, { - from: r[n].from, - to: r[n].to, - text: n ? [""] : t.text, - origin: t.origin - });else ao(e, t); - } - } - u(Ht, "makeChange"); - function ao(e, t) { - if (!(t.text.length == 1 && t.text[0] == "" && D(t.from, t.to) == 0)) { - var i = fn(e, t); - Ql(e, t, i, e.cm ? e.cm.curOp.id : NaN), hr(e, t, i, Ei(e, t)); - var r = []; - Je(e, function (n, l) { - !l && ee(r, n.history) == -1 && (ho(n.history, t), r.push(n.history)), hr(n, t, null, Ei(n, t)); - }); - } + } + return false; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs": +/*!*****************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs ***! + \*****************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Unique field definition names + * + * A GraphQL complex type is only valid if all its fields are uniquely named. + */ +function UniqueFieldDefinitionNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); + const knownFieldNames = Object.create(null); + return { + InputObjectTypeDefinition: checkFieldUniqueness, + InputObjectTypeExtension: checkFieldUniqueness, + InterfaceTypeDefinition: checkFieldUniqueness, + InterfaceTypeExtension: checkFieldUniqueness, + ObjectTypeDefinition: checkFieldUniqueness, + ObjectTypeExtension: checkFieldUniqueness + }; + function checkFieldUniqueness(node) { + var _node$fields; + const typeName = node.name.value; + if (!knownFieldNames[typeName]) { + knownFieldNames[typeName] = Object.create(null); + } // FIXME: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + + const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + const fieldNames = knownFieldNames[typeName]; + for (const fieldDef of fieldNodes) { + const fieldName = fieldDef.name.value; + if (hasField(existingTypeMap[typeName], fieldName)) { + context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, { + nodes: fieldDef.name + })); + } else if (fieldNames[fieldName]) { + context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" can only be defined once.`, { + nodes: [fieldNames[fieldName], fieldDef.name] + })); + } else { + fieldNames[fieldName] = fieldDef.name; } - u(ao, "makeChangeInner"); - function ni(e, t, i) { - var r = e.cm && e.cm.state.suppressEdits; - if (!(r && !i)) { - for (var n = e.history, l, o = e.sel, a = t == "undo" ? n.done : n.undone, s = t == "undo" ? n.undone : n.done, f = 0; f < a.length && (l = a[f], !(i ? l.ranges && !l.equals(e.sel) : !l.ranges)); f++); - if (f != a.length) { - for (n.lastOrigin = n.lastSelOrigin = null;;) if (l = a.pop(), l.ranges) { - if (ei(l, s), i && !l.equals(e.sel)) { - te(e, l, { - clearRedo: !1 - }); - return; - } - o = l; - } else if (r) { - a.push(l); - return; - } else break; - var h = []; - ei(o, s), s.push({ - changes: h, - generation: n.generation - }), n.generation = l.generation || ++n.maxGeneration; - for (var c = Ce(e, "beforeChange") || e.cm && Ce(e.cm, "beforeChange"), p = u(function (g) { - var m = l.changes[g]; - if (m.origin = t, c && !oo(e, m, !1)) return a.length = 0, {}; - h.push(dn(e, m)); - var b = g ? fn(e, m) : H(a); - hr(e, m, b, jl(e, m)), !g && e.cm && e.cm.scrollIntoView({ - from: m.from, - to: Qe(m) - }); - var C = []; - Je(e, function (x, w) { - !w && ee(C, x.history) == -1 && (ho(x.history, m), C.push(x.history)), hr(x, m, null, jl(x, m)); - }); - }, "loop"), d = l.changes.length - 1; d >= 0; --d) { - var v = p(d); - if (v) return v.v; - } - } - } + } + return false; + } +} +function hasField(type, fieldName) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type) || (0, _definition.isInputObjectType)(type)) { + return type.getFields()[fieldName] != null; + } + return false; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs": +/*!**********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique fragment names + * + * A GraphQL document is only valid if all defined fragments have unique names. + * + * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness + */ +function UniqueFragmentNamesRule(context) { + const knownFragmentNames = Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + const fragmentName = node.name.value; + if (knownFragmentNames[fragmentName]) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one fragment named "${fragmentName}".`, { + nodes: [knownFragmentNames[fragmentName], node.name] + })); + } else { + knownFragmentNames[fragmentName] = node.name; } - u(ni, "makeChangeFromHistory"); - function so(e, t) { - if (t != 0 && (e.first += t, e.sel = new ye(Or(e.sel.ranges, function (n) { - return new W(y(n.anchor.line + t, n.anchor.ch), y(n.head.line + t, n.head.ch)); - }), e.sel.primIndex), e.cm)) { - se(e.cm, e.first, e.first - t, t); - for (var i = e.cm.display, r = i.viewFrom; r < i.viewTo; r++) Ye(e.cm, r, "gutter"); - } + return false; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs": +/*!************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs ***! + \************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule; +var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique input field names + * + * A GraphQL input object value is only valid if all supplied fields are + * uniquely named. + * + * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness + */ +function UniqueInputFieldNamesRule(context) { + const knownNameStack = []; + let knownNames = Object.create(null); + return { + ObjectValue: { + enter() { + knownNameStack.push(knownNames); + knownNames = Object.create(null); + }, + leave() { + const prevKnownNames = knownNameStack.pop(); + prevKnownNames || (0, _invariant.invariant)(false); + knownNames = prevKnownNames; } - u(so, "shiftDoc"); - function hr(e, t, i, r) { - if (e.cm && !e.cm.curOp) return Q(e.cm, hr)(e, t, i, r); - if (t.to.line < e.first) { - so(e, t.text.length - 1 - (t.to.line - t.from.line)); - return; - } - if (!(t.from.line > e.lastLine())) { - if (t.from.line < e.first) { - var n = t.text.length - 1 - (e.first - t.from.line); - so(e, n), t = { - from: y(e.first, 0), - to: y(t.to.line + n, t.to.ch), - text: [H(t.text)], - origin: t.origin - }; - } - var l = e.lastLine(); - t.to.line > l && (t = { - from: t.from, - to: y(l, S(e, l).text.length), - text: [t.text[0]], - origin: t.origin - }), t.removed = ot(e, t.from, t.to), i || (i = fn(e, t)), e.cm ? ws(e.cm, t, r) : cn(e, t, r), ri(e, i, Me), e.cantEdit && ii(e, y(e.firstLine(), 0)) && (e.cantEdit = !1); - } - } - u(hr, "makeChangeSingleDoc"); - function ws(e, t, i) { - var r = e.doc, - n = e.display, - l = t.from, - o = t.to, - a = !1, - s = l.line; - e.options.lineWrapping || (s = F(Se(S(r, l.line))), r.iter(s, o.line + 1, function (d) { - if (d == n.maxLine) return a = !0, !0; - })), r.sel.contains(t.from, t.to) > -1 && Rn(e), cn(r, t, i, Ml(e)), e.options.lineWrapping || (r.iter(s, l.line + t.text.length, function (d) { - var v = Gr(d); - v > n.maxLineLength && (n.maxLine = d, n.maxLineLength = v, n.maxLineChanged = !0, a = !1); - }), a && (e.curOp.updateMaxLine = !0)), ha(r, l.line), sr(e, 400); - var f = t.text.length - (o.line - l.line) - 1; - t.full ? se(e) : l.line == o.line && t.text.length == 1 && !Xl(e.doc, t) ? Ye(e, l.line, "text") : se(e, l.line, o.line + 1, f); - var h = Ce(e, "changes"), - c = Ce(e, "change"); - if (c || h) { - var p = { - from: l, - to: o, - text: t.text, - removed: t.removed, - origin: t.origin - }; - c && Z(e, "change", e, p), h && (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(p); - } - e.display.selForContextMenu = null; - } - u(ws, "makeChangeSingleDocInEditor"); - function Ft(e, t, i, r, n) { - var l; - r || (r = i), D(r, i) < 0 && (l = [r, i], i = l[0], r = l[1]), typeof t == "string" && (t = e.splitLines(t)), Ht(e, { - from: i, - to: r, - text: t, - origin: n - }); + }, + ObjectField(node) { + const fieldName = node.name.value; + if (knownNames[fieldName]) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one input field named "${fieldName}".`, { + nodes: [knownNames[fieldName], node.name] + })); + } else { + knownNames[fieldName] = node.name; } - u(Ft, "replaceRange"); - function uo(e, t, i, r) { - i < e.line ? e.line += r : t < e.line && (e.line = t, e.ch = 0); - } - u(uo, "rebaseHistSelSingle"); - function fo(e, t, i, r) { - for (var n = 0; n < e.length; ++n) { - var l = e[n], - o = !0; - if (l.ranges) { - l.copied || (l = e[n] = l.deepCopy(), l.copied = !0); - for (var a = 0; a < l.ranges.length; a++) uo(l.ranges[a].anchor, t, i, r), uo(l.ranges[a].head, t, i, r); - continue; - } - for (var s = 0; s < l.changes.length; ++s) { - var f = l.changes[s]; - if (i < f.from.line) f.from = y(f.from.line + r, f.from.ch), f.to = y(f.to.line + r, f.to.ch);else if (t <= f.to.line) { - o = !1; - break; - } - } - o || (e.splice(0, n + 1), n = 0); - } - } - u(fo, "rebaseHistArray"); - function ho(e, t) { - var i = t.from.line, - r = t.to.line, - n = t.text.length - (r - i) - 1; - fo(e.done, i, r, n), fo(e.undone, i, r, n); - } - u(ho, "rebaseHist"); - function cr(e, t, i, r) { - var n = t, - l = t; - return typeof t == "number" ? l = S(e, Un(e, t)) : n = F(t), n == null ? null : (r(l, n) && e.cm && Ye(e.cm, n, i), l); - } - u(cr, "changeLine"); - function dr(e) { - this.lines = e, this.parent = null; - for (var t = 0, i = 0; i < e.length; ++i) e[i].parent = this, t += e[i].height; - this.height = t; - } - u(dr, "LeafChunk"), dr.prototype = { - chunkSize: function () { - return this.lines.length; - }, - removeInner: function (e, t) { - for (var i = e, r = e + t; i < r; ++i) { - var n = this.lines[i]; - this.height -= n.height, Sa(n), Z(n, "delete"); - } - this.lines.splice(e, t); - }, - collapse: function (e) { - e.push.apply(e, this.lines); - }, - insertInner: function (e, t, i) { - this.height += i, this.lines = this.lines.slice(0, e).concat(t).concat(this.lines.slice(e)); - for (var r = 0; r < t.length; ++r) t[r].parent = this; - }, - iterN: function (e, t, i) { - for (var r = e + t; e < r; ++e) if (i(this.lines[e])) return !0; - } - }; - function pr(e) { - this.children = e; - for (var t = 0, i = 0, r = 0; r < e.length; ++r) { - var n = e[r]; - t += n.chunkSize(), i += n.height, n.parent = this; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueOperationNamesRule = UniqueOperationNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique operation names + * + * A GraphQL document is only valid if all defined operations have unique names. + * + * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness + */ +function UniqueOperationNamesRule(context) { + const knownOperationNames = Object.create(null); + return { + OperationDefinition(node) { + const operationName = node.name; + if (operationName) { + if (knownOperationNames[operationName.value]) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one operation named "${operationName.value}".`, { + nodes: [knownOperationNames[operationName.value], operationName] + })); + } else { + knownOperationNames[operationName.value] = operationName; } - this.size = t, this.height = i, this.parent = null; } - u(pr, "BranchChunk"), pr.prototype = { - chunkSize: function () { - return this.size; - }, - removeInner: function (e, t) { - this.size -= t; - for (var i = 0; i < this.children.length; ++i) { - var r = this.children[i], - n = r.chunkSize(); - if (e < n) { - var l = Math.min(t, n - e), - o = r.height; - if (r.removeInner(e, l), this.height -= o - r.height, n == l && (this.children.splice(i--, 1), r.parent = null), (t -= l) == 0) break; - e = 0; - } else e -= n; - } - if (this.size - t < 25 && (this.children.length > 1 || !(this.children[0] instanceof dr))) { - var a = []; - this.collapse(a), this.children = [new dr(a)], this.children[0].parent = this; - } - }, - collapse: function (e) { - for (var t = 0; t < this.children.length; ++t) this.children[t].collapse(e); - }, - insertInner: function (e, t, i) { - this.size += t.length, this.height += i; - for (var r = 0; r < this.children.length; ++r) { - var n = this.children[r], - l = n.chunkSize(); - if (e <= l) { - if (n.insertInner(e, t, i), n.lines && n.lines.length > 50) { - for (var o = n.lines.length % 25 + 25, a = o; a < n.lines.length;) { - var s = new dr(n.lines.slice(a, a += 25)); - n.height -= s.height, this.children.splice(++r, 0, s), s.parent = this; - } - n.lines = n.lines.slice(0, o), this.maybeSpill(); - } - break; - } - e -= l; - } - }, - maybeSpill: function () { - if (!(this.children.length <= 10)) { - var e = this; - do { - var t = e.children.splice(e.children.length - 5, 5), - i = new pr(t); - if (e.parent) { - e.size -= i.size, e.height -= i.height; - var n = ee(e.parent.children, e); - e.parent.children.splice(n + 1, 0, i); - } else { - var r = new pr(e.children); - r.parent = e, e.children = [r, i], e = r; - } - i.parent = e.parent; - } while (e.children.length > 10); - e.parent.maybeSpill(); - } - }, - iterN: function (e, t, i) { - for (var r = 0; r < this.children.length; ++r) { - var n = this.children[r], - l = n.chunkSize(); - if (e < l) { - var o = Math.min(t, l - e); - if (n.iterN(e, o, i)) return !0; - if ((t -= o) == 0) break; - e = 0; - } else e -= l; - } - } - }; - var vr = u(function (e, t, i) { - if (i) for (var r in i) i.hasOwnProperty(r) && (this[r] = i[r]); - this.doc = e, this.node = t; - }, "LineWidget"); - vr.prototype.clear = function () { - var e = this.doc.cm, - t = this.line.widgets, - i = this.line, - r = F(i); - if (!(r == null || !t)) { - for (var n = 0; n < t.length; ++n) t[n] == this && t.splice(n--, 1); - t.length || (i.widgets = null); - var l = tr(this); - De(i, Math.max(0, i.height - l)), e && (de(e, function () { - co(e, i, -l), Ye(e, r, "widget"); - }), Z(e, "lineWidgetCleared", e, this, r)); - } - }, vr.prototype.changed = function () { - var e = this, - t = this.height, - i = this.doc.cm, - r = this.line; - this.height = null; - var n = tr(this) - t; - n && (Xe(this.doc, r) || De(r, r.height + n), i && de(i, function () { - i.curOp.forceUpdate = !0, co(i, r, n), Z(i, "lineWidgetChanged", i, e, F(r)); + return false; + }, + FragmentDefinition: () => false + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs": +/*!***********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs ***! + \***********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueOperationTypesRule = UniqueOperationTypesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique operation types + * + * A GraphQL document is only valid if it has only one type per operation. + */ +function UniqueOperationTypesRule(context) { + const schema = context.getSchema(); + const definedOperationTypes = Object.create(null); + const existingOperationTypes = schema ? { + query: schema.getQueryType(), + mutation: schema.getMutationType(), + subscription: schema.getSubscriptionType() + } : {}; + return { + SchemaDefinition: checkOperationTypes, + SchemaExtension: checkOperationTypes + }; + function checkOperationTypes(node) { + var _node$operationTypes; + + // See: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + for (const operationType of operationTypesNodes) { + const operation = operationType.operation; + const alreadyDefinedOperationType = definedOperationTypes[operation]; + if (existingOperationTypes[operation]) { + context.reportError(new _GraphQLError.GraphQLError(`Type for ${operation} already defined in the schema. It cannot be redefined.`, { + nodes: operationType })); - }, xt(vr); - function co(e, t, i) { - Ie(t) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && nn(e, i); - } - u(co, "adjustScrollWhenAboveVisible"); - function Ss(e, t, i, r) { - var n = new vr(e, i, r), - l = e.cm; - return l && n.noHScroll && (l.display.alignWidgets = !0), cr(e, t, "widget", function (o) { - var a = o.widgets || (o.widgets = []); - if (n.insertAt == null ? a.push(n) : a.splice(Math.min(a.length, Math.max(0, n.insertAt)), 0, n), n.line = o, l && !Xe(e, o)) { - var s = Ie(o) < e.scrollTop; - De(o, o.height + tr(n)), s && nn(l, n.height), l.curOp.forceUpdate = !0; - } - return !0; - }), l && Z(l, "lineWidgetAdded", l, n, typeof t == "number" ? t : F(t)), n; - } - u(Ss, "addLineWidget"); - var po = 0, - je = u(function (e, t) { - this.lines = [], this.type = t, this.doc = e, this.id = ++po; - }, "TextMarker"); - je.prototype.clear = function () { - if (!this.explicitlyCleared) { - var e = this.doc.cm, - t = e && !e.curOp; - if (t && pt(e), Ce(this, "clear")) { - var i = this.find(); - i && Z(this, "clear", i.from, i.to); - } - for (var r = null, n = null, l = 0; l < this.lines.length; ++l) { - var o = this.lines[l], - a = Vt(o.markedSpans, this); - e && !this.collapsed ? Ye(e, F(o), "text") : e && (a.to != null && (n = F(o)), a.from != null && (r = F(o))), o.markedSpans = pa(o.markedSpans, a), a.from == null && this.collapsed && !Xe(this.doc, o) && e && De(o, Tt(e.display)); - } - if (e && this.collapsed && !e.options.lineWrapping) for (var s = 0; s < this.lines.length; ++s) { - var f = Se(this.lines[s]), - h = Gr(f); - h > e.display.maxLineLength && (e.display.maxLine = f, e.display.maxLineLength = h, e.display.maxLineChanged = !0); - } - r != null && e && this.collapsed && se(e, r, n + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, e && ro(e.doc)), e && Z(e, "markerCleared", e, this, r, n), t && vt(e), this.parent && this.parent.clear(); - } - }, je.prototype.find = function (e, t) { - e == null && this.type == "bookmark" && (e = 1); - for (var i, r, n = 0; n < this.lines.length; ++n) { - var l = this.lines[n], - o = Vt(l.markedSpans, this); - if (o.from != null && (i = y(t ? l : F(l), o.from), e == -1)) return i; - if (o.to != null && (r = y(t ? l : F(l), o.to), e == 1)) return r; - } - return i && { - from: i, - to: r - }; - }, je.prototype.changed = function () { - var e = this, - t = this.find(-1, !0), - i = this, - r = this.doc.cm; - !t || !r || de(r, function () { - var n = t.line, - l = F(t.line), - o = _i(r, l); - if (o && (bl(o), r.curOp.selectionChanged = r.curOp.forceUpdate = !0), r.curOp.updateMaxLine = !0, !Xe(i.doc, n) && i.height != null) { - var a = i.height; - i.height = null; - var s = tr(i) - a; - s && De(n, n.height + s); - } - Z(r, "markerChanged", r, e); - }); - }, je.prototype.attachLine = function (e) { - if (!this.lines.length && this.doc.cm) { - var t = this.doc.cm.curOp; - (!t.maybeHiddenMarkers || ee(t.maybeHiddenMarkers, this) == -1) && (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])).push(this); - } - this.lines.push(e); - }, je.prototype.detachLine = function (e) { - if (this.lines.splice(ee(this.lines, e), 1), !this.lines.length && this.doc.cm) { - var t = this.doc.cm.curOp; - (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this); - } - }, xt(je); - function Pt(e, t, i, r, n) { - if (r && r.shared) return Ls(e, t, i, r, n); - if (e.cm && !e.cm.curOp) return Q(e.cm, Pt)(e, t, i, r, n); - var l = new je(e, n), - o = D(t, i); - if (r && nt(r, l, !1), o > 0 || o == 0 && l.clearWhenEmpty !== !1) return l; - if (l.replacedWith && (l.collapsed = !0, l.widgetNode = bt("span", [l.replacedWith], "CodeMirror-widget"), r.handleMouseEvents || l.widgetNode.setAttribute("cm-ignore-events", "true"), r.insertLeft && (l.widgetNode.insertLeft = !0)), l.collapsed) { - if (il(e, t.line, t, i, l) || t.line != i.line && il(e, i.line, t, i, l)) throw new Error("Inserting collapsed marker partially overlapping an existing one"); - da(); - } - l.addToHistory && Ql(e, { - from: t, - to: i, - origin: "markText" - }, e.sel, NaN); - var a = t.line, - s = e.cm, - f; - if (e.iter(a, i.line + 1, function (c) { - s && l.collapsed && !s.options.lineWrapping && Se(c) == s.display.maxLine && (f = !0), l.collapsed && a != t.line && De(c, 0), va(c, new Ir(l, a == t.line ? t.ch : null, a == i.line ? i.ch : null), e.cm && e.cm.curOp), ++a; - }), l.collapsed && e.iter(t.line, i.line + 1, function (c) { - Xe(e, c) && De(c, 0); - }), l.clearOnEnter && M(l, "beforeCursorEnter", function () { - return l.clear(); - }), l.readOnly && (ca(), (e.history.done.length || e.history.undone.length) && e.clearHistory()), l.collapsed && (l.id = ++po, l.atomic = !0), s) { - if (f && (s.curOp.updateMaxLine = !0), l.collapsed) se(s, t.line, i.line + 1);else if (l.className || l.startStyle || l.endStyle || l.css || l.attributes || l.title) for (var h = t.line; h <= i.line; h++) Ye(s, h, "text"); - l.atomic && ro(s.doc), Z(s, "markerAdded", s, l); - } - return l; - } - u(Pt, "markText"); - var gr = u(function (e, t) { - this.markers = e, this.primary = t; - for (var i = 0; i < e.length; ++i) e[i].parent = this; - }, "SharedTextMarker"); - gr.prototype.clear = function () { - if (!this.explicitlyCleared) { - this.explicitlyCleared = !0; - for (var e = 0; e < this.markers.length; ++e) this.markers[e].clear(); - Z(this, "clear"); - } - }, gr.prototype.find = function (e, t) { - return this.primary.find(e, t); - }, xt(gr); - function Ls(e, t, i, r, n) { - r = nt(r), r.shared = !1; - var l = [Pt(e, t, i, r, n)], - o = l[0], - a = r.widgetNode; - return Je(e, function (s) { - a && (r.widgetNode = a.cloneNode(!0)), l.push(Pt(s, N(s, t), N(s, i), r, n)); - for (var f = 0; f < s.linked.length; ++f) if (s.linked[f].isParent) return; - o = H(l); - }), new gr(l, o); - } - u(Ls, "markTextShared"); - function vo(e) { - return e.findMarks(y(e.first, 0), e.clipPos(y(e.lastLine())), function (t) { - return t.parent; - }); + } else if (alreadyDefinedOperationType) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one ${operation} type in schema.`, { + nodes: [alreadyDefinedOperationType, operationType] + })); + } else { + definedOperationTypes[operation] = operationType; } - u(vo, "findSharedMarkers"); - function ks(e, t) { - for (var i = 0; i < t.length; i++) { - var r = t[i], - n = r.find(), - l = e.clipPos(n.from), - o = e.clipPos(n.to); - if (D(l, o)) { - var a = Pt(e, l, o, r.primary, r.primary.type); - r.markers.push(a), a.parent = r; - } + } + return false; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs": +/*!******************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueTypeNamesRule = UniqueTypeNamesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique type names + * + * A GraphQL document is only valid if all defined types have unique names. + */ +function UniqueTypeNamesRule(context) { + const knownTypeNames = Object.create(null); + const schema = context.getSchema(); + return { + ScalarTypeDefinition: checkTypeName, + ObjectTypeDefinition: checkTypeName, + InterfaceTypeDefinition: checkTypeName, + UnionTypeDefinition: checkTypeName, + EnumTypeDefinition: checkTypeName, + InputObjectTypeDefinition: checkTypeName + }; + function checkTypeName(node) { + const typeName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getType(typeName)) { + context.reportError(new _GraphQLError.GraphQLError(`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, { + nodes: node.name + })); + return; + } + if (knownTypeNames[typeName]) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one type named "${typeName}".`, { + nodes: [knownTypeNames[typeName], node.name] + })); + } else { + knownTypeNames[typeName] = node.name; + } + return false; + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs": +/*!**********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueVariableNamesRule = UniqueVariableNamesRule; +var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +/** + * Unique variable names + * + * A GraphQL operation is only valid if all its variables are uniquely named. + */ +function UniqueVariableNamesRule(context) { + return { + OperationDefinition(operationNode) { + var _operationNode$variab; + + // See: https://github.com/graphql/graphql-js/issues/2203 + + /* c8 ignore next */ + const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : []; + const seenVariableDefinitions = (0, _groupBy.groupBy)(variableDefinitions, node => node.variable.name.value); + for (const [variableName, variableNodes] of seenVariableDefinitions) { + if (variableNodes.length > 1) { + context.reportError(new _GraphQLError.GraphQLError(`There can be only one variable named "$${variableName}".`, { + nodes: variableNodes.map(node => node.variable.name) + })); } } - u(ks, "copySharedMarkers"); - function Ts(e) { - for (var t = u(function (r) { - var n = e[r], - l = [n.primary.doc]; - Je(n.primary.doc, function (s) { - return l.push(s); - }); - for (var o = 0; o < n.markers.length; o++) { - var a = n.markers[o]; - ee(l, a.doc) == -1 && (a.parent = null, n.markers.splice(o--, 1)); - } - }, "loop"), i = 0; i < e.length; i++) t(i); - } - u(Ts, "detachSharedMarkers"); - var Ms = 0, - ue = u(function (e, t, i, r, n) { - if (!(this instanceof ue)) return new ue(e, t, i, r, n); - i == null && (i = 0), pr.call(this, [new dr([new St("", null)])]), this.first = i, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = i; - var l = y(i, 0); - this.sel = Ze(l), this.history = new $r(null), this.id = ++Ms, this.modeOption = t, this.lineSep = r, this.direction = n == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof e == "string" && (e = this.splitLines(e)), cn(this, { - from: l, - to: l, - text: e - }), te(this, Ze(l), Me); - }, "Doc"); - ue.prototype = Fn(pr.prototype, { - constructor: ue, - iter: function (e, t, i) { - i ? this.iterN(e - this.first, t - e, i) : this.iterN(this.first, this.first + this.size, e); - }, - insert: function (e, t) { - for (var i = 0, r = 0; r < t.length; ++r) i += t[r].height; - this.insertInner(e - this.first, t, i); - }, - remove: function (e, t) { - this.removeInner(e - this.first, t); - }, - getValue: function (e) { - var t = Ai(this, this.first, this.first + this.size); - return e === !1 ? t : t.join(e || this.lineSeparator()); - }, - setValue: J(function (e) { - var t = y(this.first, 0), - i = this.first + this.size - 1; - Ht(this, { - from: t, - to: y(i, S(this, i).text.length), - text: this.splitLines(e), - origin: "setValue", - full: !0 - }, !0), this.cm && nr(this.cm, 0, 0), te(this, Ze(t), Me); - }), - replaceRange: function (e, t, i, r) { - t = N(this, t), i = i ? N(this, i) : t, Ft(this, e, t, i, r); - }, - getRange: function (e, t, i) { - var r = ot(this, N(this, e), N(this, t)); - return i === !1 ? r : i === "" ? r.join("") : r.join(i || this.lineSeparator()); - }, - getLine: function (e) { - var t = this.getLineHandle(e); - return t && t.text; - }, - getLineHandle: function (e) { - if (Jt(this, e)) return S(this, e); - }, - getLineNumber: function (e) { - return F(e); - }, - getLineHandleVisualStart: function (e) { - return typeof e == "number" && (e = S(this, e)), Se(e); - }, - lineCount: function () { - return this.size; - }, - firstLine: function () { - return this.first; - }, - lastLine: function () { - return this.first + this.size - 1; - }, - clipPos: function (e) { - return N(this, e); - }, - getCursor: function (e) { - var t = this.sel.primary(), - i; - return e == null || e == "head" ? i = t.head : e == "anchor" ? i = t.anchor : e == "end" || e == "to" || e === !1 ? i = t.to() : i = t.from(), i; - }, - listSelections: function () { - return this.sel.ranges; - }, - somethingSelected: function () { - return this.sel.somethingSelected(); - }, - setCursor: J(function (e, t, i) { - $l(this, N(this, typeof e == "number" ? y(e, t || 0) : e), null, i); - }), - setSelection: J(function (e, t, i) { - $l(this, N(this, e), N(this, t || e), i); - }), - extendSelection: J(function (e, t, i) { - ti(this, N(this, e), t && N(this, t), i); - }), - extendSelections: J(function (e, t) { - Vl(this, Kn(this, e), t); - }), - extendSelectionsBy: J(function (e, t) { - var i = Or(this.sel.ranges, e); - Vl(this, Kn(this, i), t); - }), - setSelections: J(function (e, t, i) { - if (e.length) { - for (var r = [], n = 0; n < e.length; n++) r[n] = new W(N(this, e[n].anchor), N(this, e[n].head || e[n].anchor)); - t == null && (t = Math.min(e.length - 1, this.sel.primIndex)), te(this, ke(this.cm, r, t), i); - } - }), - addSelection: J(function (e, t, i) { - var r = this.sel.ranges.slice(0); - r.push(new W(N(this, e), N(this, t || e))), te(this, ke(this.cm, r, r.length - 1), i); - }), - getSelection: function (e) { - for (var t = this.sel.ranges, i, r = 0; r < t.length; r++) { - var n = ot(this, t[r].from(), t[r].to()); - i = i ? i.concat(n) : n; - } - return e === !1 ? i : i.join(e || this.lineSeparator()); - }, - getSelections: function (e) { - for (var t = [], i = this.sel.ranges, r = 0; r < i.length; r++) { - var n = ot(this, i[r].from(), i[r].to()); - e !== !1 && (n = n.join(e || this.lineSeparator())), t[r] = n; - } - return t; - }, - replaceSelection: function (e, t, i) { - for (var r = [], n = 0; n < this.sel.ranges.length; n++) r[n] = e; - this.replaceSelections(r, t, i || "+input"); - }, - replaceSelections: J(function (e, t, i) { - for (var r = [], n = this.sel, l = 0; l < n.ranges.length; l++) { - var o = n.ranges[l]; - r[l] = { - from: o.from(), - to: o.to(), - text: this.splitLines(e[l]), - origin: i - }; - } - for (var a = t && t != "end" && ps(this, r, t), s = r.length - 1; s >= 0; s--) Ht(this, r[s]); - a ? eo(this, a) : this.cm && Nt(this.cm); - }), - undo: J(function () { - ni(this, "undo"); - }), - redo: J(function () { - ni(this, "redo"); - }), - undoSelection: J(function () { - ni(this, "undo", !0); - }), - redoSelection: J(function () { - ni(this, "redo", !0); - }), - setExtending: function (e) { - this.extend = e; - }, - getExtending: function () { - return this.extend; - }, - historySize: function () { - for (var e = this.history, t = 0, i = 0, r = 0; r < e.done.length; r++) e.done[r].ranges || ++t; - for (var n = 0; n < e.undone.length; n++) e.undone[n].ranges || ++i; - return { - undo: t, - redo: i - }; - }, - clearHistory: function () { - var e = this; - this.history = new $r(this.history), Je(this, function (t) { - return t.history = e.history; - }, !0); - }, - markClean: function () { - this.cleanGeneration = this.changeGeneration(!0); - }, - changeGeneration: function (e) { - return e && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation; - }, - isClean: function (e) { - return this.history.generation == (e || this.cleanGeneration); - }, - getHistory: function () { - return { - done: Ot(this.history.done), - undone: Ot(this.history.undone) - }; - }, - setHistory: function (e) { - var t = this.history = new $r(this.history); - t.done = Ot(e.done.slice(0), null, !0), t.undone = Ot(e.undone.slice(0), null, !0); - }, - setGutterMarker: J(function (e, t, i) { - return cr(this, e, "gutter", function (r) { - var n = r.gutterMarkers || (r.gutterMarkers = {}); - return n[t] = i, !i && Pn(n) && (r.gutterMarkers = null), !0; - }); - }), - clearGutter: J(function (e) { - var t = this; - this.iter(function (i) { - i.gutterMarkers && i.gutterMarkers[e] && cr(t, i, "gutter", function () { - return i.gutterMarkers[e] = null, Pn(i.gutterMarkers) && (i.gutterMarkers = null), !0; - }); - }); - }), - lineInfo: function (e) { - var t; - if (typeof e == "number") { - if (!Jt(this, e) || (t = e, e = S(this, e), !e)) return null; - } else if (t = F(e), t == null) return null; - return { - line: t, - handle: e, - text: e.text, - gutterMarkers: e.gutterMarkers, - textClass: e.textClass, - bgClass: e.bgClass, - wrapClass: e.wrapClass, - widgets: e.widgets - }; - }, - addLineClass: J(function (e, t, i) { - return cr(this, e, t == "gutter" ? "gutter" : "class", function (r) { - var n = t == "text" ? "textClass" : t == "background" ? "bgClass" : t == "gutter" ? "gutterClass" : "wrapClass"; - if (!r[n]) r[n] = i;else { - if (mt(i).test(r[n])) return !1; - r[n] += " " + i; - } - return !0; - }); - }), - removeLineClass: J(function (e, t, i) { - return cr(this, e, t == "gutter" ? "gutter" : "class", function (r) { - var n = t == "text" ? "textClass" : t == "background" ? "bgClass" : t == "gutter" ? "gutterClass" : "wrapClass", - l = r[n]; - if (l) { - if (i == null) r[n] = null;else { - var o = l.match(mt(i)); - if (!o) return !1; - var a = o.index + o[0].length; - r[n] = l.slice(0, o.index) + (!o.index || a == l.length ? "" : " ") + l.slice(a) || null; - } - } else return !1; - return !0; - }); - }), - addLineWidget: J(function (e, t, i) { - return Ss(this, e, t, i); - }), - removeLineWidget: function (e) { - e.clear(); - }, - markText: function (e, t, i) { - return Pt(this, N(this, e), N(this, t), i, i && i.type || "range"); - }, - setBookmark: function (e, t) { - var i = { - replacedWith: t && (t.nodeType == null ? t.widget : t), - insertLeft: t && t.insertLeft, - clearWhenEmpty: !1, - shared: t && t.shared, - handleMouseEvents: t && t.handleMouseEvents - }; - return e = N(this, e), Pt(this, e, e, i, "bookmark"); - }, - findMarksAt: function (e) { - e = N(this, e); - var t = [], - i = S(this, e.line).markedSpans; - if (i) for (var r = 0; r < i.length; ++r) { - var n = i[r]; - (n.from == null || n.from <= e.ch) && (n.to == null || n.to >= e.ch) && t.push(n.marker.parent || n.marker); - } - return t; - }, - findMarks: function (e, t, i) { - e = N(this, e), t = N(this, t); - var r = [], - n = e.line; - return this.iter(e.line, t.line + 1, function (l) { - var o = l.markedSpans; - if (o) for (var a = 0; a < o.length; a++) { - var s = o[a]; - !(s.to != null && n == e.line && e.ch >= s.to || s.from == null && n != e.line || s.from != null && n == t.line && s.from >= t.ch) && (!i || i(s.marker)) && r.push(s.marker.parent || s.marker); - } - ++n; - }), r; - }, - getAllMarks: function () { - var e = []; - return this.iter(function (t) { - var i = t.markedSpans; - if (i) for (var r = 0; r < i.length; ++r) i[r].from != null && e.push(i[r].marker); - }), e; - }, - posFromIndex: function (e) { - var t, - i = this.first, - r = this.lineSeparator().length; - return this.iter(function (n) { - var l = n.text.length + r; - if (l > e) return t = e, !0; - e -= l, ++i; - }), N(this, y(i, t)); - }, - indexFromPos: function (e) { - e = N(this, e); - var t = e.ch; - if (e.line < this.first || e.ch < 0) return 0; - var i = this.lineSeparator().length; - return this.iter(this.first, e.line, function (r) { - t += r.text.length + i; - }), t; - }, - copy: function (e) { - var t = new ue(Ai(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction); - return t.scrollTop = this.scrollTop, t.scrollLeft = this.scrollLeft, t.sel = this.sel, t.extend = !1, e && (t.history.undoDepth = this.history.undoDepth, t.setHistory(this.getHistory())), t; - }, - linkedDoc: function (e) { - e || (e = {}); - var t = this.first, - i = this.first + this.size; - e.from != null && e.from > t && (t = e.from), e.to != null && e.to < i && (i = e.to); - var r = new ue(Ai(this, t, i), e.mode || this.modeOption, t, this.lineSep, this.direction); - return e.sharedHist && (r.history = this.history), (this.linked || (this.linked = [])).push({ - doc: r, - sharedHist: e.sharedHist - }), r.linked = [{ - doc: this, - isParent: !0, - sharedHist: e.sharedHist - }], ks(r, vo(this)), r; - }, - unlinkDoc: function (e) { - if (e instanceof R && (e = e.doc), this.linked) for (var t = 0; t < this.linked.length; ++t) { - var i = this.linked[t]; - if (i.doc == e) { - this.linked.splice(t, 1), e.unlinkDoc(this), Ts(vo(this)); - break; - } - } - if (e.history == this.history) { - var r = [e.id]; - Je(e, function (n) { - return r.push(n.id); - }, !0), e.history = new $r(null), e.history.done = Ot(this.history.done, r), e.history.undone = Ot(this.history.undone, r); - } - }, - iterLinkedDocs: function (e) { - Je(this, e); - }, - getMode: function () { - return this.mode; - }, - getEditor: function () { - return this.cm; - }, - splitLines: function (e) { - return this.lineSep ? e.split(this.lineSep) : ki(e); - }, - lineSeparator: function () { - return this.lineSep || ` -`; - }, - setDirection: J(function (e) { - e != "rtl" && (e = "ltr"), e != this.direction && (this.direction = e, this.iter(function (t) { - return t.order = null; - }), this.cm && vs(this.cm)); - }) - }), ue.prototype.eachLine = ue.prototype.iter; - var go = 0; - function Ds(e) { - var t = this; - if (yo(t), !(q(t, e) || Re(t.display, e))) { - ae(e), O && (go = +new Date()); - var i = ft(t, e, !0), - r = e.dataTransfer.files; - if (!(!i || t.isReadOnly())) if (r && r.length && window.FileReader && window.File) for (var n = r.length, l = Array(n), o = 0, a = u(function () { - ++o == n && Q(t, function () { - i = N(t.doc, i); - var d = { - from: i, - to: i, - text: t.doc.splitLines(l.filter(function (v) { - return v != null; - }).join(t.doc.lineSeparator())), - origin: "paste" - }; - Ht(t.doc, d), eo(t.doc, Ze(N(t.doc, i), N(t.doc, Qe(d)))); - })(); - }, "markAsReadAndPasteIfAllFilesAreRead"), s = u(function (d, v) { - if (t.options.allowDropFileTypes && ee(t.options.allowDropFileTypes, d.type) == -1) { - a(); - return; - } - var g = new FileReader(); - g.onerror = function () { - return a(); - }, g.onload = function () { - var m = g.result; - if (/[\x00-\x08\x0e-\x1f]{2}/.test(m)) { - a(); - return; - } - l[v] = m, a(); - }, g.readAsText(d); - }, "readTextFromFile"), f = 0; f < r.length; f++) s(r[f], f);else { - if (t.state.draggingText && t.doc.sel.contains(i) > -1) { - t.state.draggingText(e), setTimeout(function () { - return t.display.input.focus(); - }, 20); - return; - } - try { - var h = e.dataTransfer.getData("Text"); - if (h) { - var c; - if (t.state.draggingText && !t.state.draggingText.copy && (c = t.listSelections()), ri(t.doc, Ze(i, i)), c) for (var p = 0; p < c.length; ++p) Ft(t.doc, "", c[p].anchor, c[p].head, "drag"); - t.replaceSelection(h, "around", "paste"), t.display.input.focus(); - } - } catch {} - } - } + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs": +/*!**********************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule; +var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs"); +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs"); +var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * Value literals of correct type + * + * A GraphQL document is only valid if all value literals are of the type + * expected at their position. + * + * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type + */ +function ValuesOfCorrectTypeRule(context) { + let variableDefinitions = {}; + return { + OperationDefinition: { + enter() { + variableDefinitions = {}; } - u(Ds, "onDrop"); - function Ns(e, t) { - if (O && (!e.state.draggingText || +new Date() - go < 100)) { - Qt(t); - return; - } - if (!(q(e, t) || Re(e.display, t)) && (t.dataTransfer.setData("Text", e.getSelection()), t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setDragImage && !Mr)) { - var i = T("img", null, null, "position: fixed; left: 0; top: 0;"); - i.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", we && (i.width = i.height = 1, e.display.wrapper.appendChild(i), i._top = i.offsetTop), t.dataTransfer.setDragImage(i, 0, 0), we && i.parentNode.removeChild(i); - } + }, + VariableDefinition(definition) { + variableDefinitions[definition.variable.name.value] = definition; + }, + ListValue(node) { + // Note: TypeInfo will traverse into a list's item type, so look to the + // parent input type to check if it is a list. + const type = (0, _definition.getNullableType)(context.getParentInputType()); + if (!(0, _definition.isListType)(type)) { + isValidValueNode(context, node); + return false; // Don't traverse further. } - u(Ns, "onDragStart"); - function As(e, t) { - var i = ft(e, t); - if (i) { - var r = document.createDocumentFragment(); - Vi(e, i, r), e.display.dragCursor || (e.display.dragCursor = T("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), e.display.lineSpace.insertBefore(e.display.dragCursor, e.display.cursorDiv)), ve(e.display.dragCursor, r); + }, + ObjectValue(node) { + const type = (0, _definition.getNamedType)(context.getInputType()); + if (!(0, _definition.isInputObjectType)(type)) { + isValidValueNode(context, node); + return false; // Don't traverse further. + } // Ensure every required field exists. + + const fieldNodeMap = (0, _keyMap.keyMap)(node.fields, field => field.name.value); + for (const fieldDef of Object.values(type.getFields())) { + const fieldNode = fieldNodeMap[fieldDef.name]; + if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) { + const typeStr = (0, _inspect.inspect)(fieldDef.type); + context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, { + nodes: node + })); } } - u(As, "onDragOver"); - function yo(e) { - e.display.dragCursor && (e.display.lineSpace.removeChild(e.display.dragCursor), e.display.dragCursor = null); - } - u(yo, "clearDragCursor"); - function mo(e) { - if (document.getElementsByClassName) { - for (var t = document.getElementsByClassName("CodeMirror"), i = [], r = 0; r < t.length; r++) { - var n = t[r].CodeMirror; - n && i.push(n); - } - i.length && i[0].operation(function () { - for (var l = 0; l < i.length; l++) e(i[l]); - }); - } + if (type.isOneOf) { + validateOneOfInputObject(context, node, type, fieldNodeMap, variableDefinitions); } - u(mo, "forEachCodeMirror"); - var bo = !1; - function Os() { - bo || (Ws(), bo = !0); - } - u(Os, "ensureGlobalHandlers"); - function Ws() { - var e; - M(window, "resize", function () { - e == null && (e = setTimeout(function () { - e = null, mo(Hs); - }, 100)); - }), M(window, "blur", function () { - return mo(Dt); - }); + }, + ObjectField(node) { + const parentType = (0, _definition.getNamedType)(context.getParentInputType()); + const fieldType = context.getInputType(); + if (!fieldType && (0, _definition.isInputObjectType)(parentType)) { + const suggestions = (0, _suggestionList.suggestionList)(node.name.value, Object.keys(parentType.getFields())); + context.reportError(new _GraphQLError.GraphQLError(`Field "${node.name.value}" is not defined by type "${parentType.name}".` + (0, _didYouMean.didYouMean)(suggestions), { + nodes: node + })); } - u(Ws, "registerGlobalHandlers"); - function Hs(e) { - var t = e.display; - t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null, t.scrollbarsClipped = !1, e.setSize(); - } - u(Hs, "onResize"); - for (var Ve = { - 3: "Pause", - 8: "Backspace", - 9: "Tab", - 13: "Enter", - 16: "Shift", - 17: "Ctrl", - 18: "Alt", - 19: "Pause", - 20: "CapsLock", - 27: "Esc", - 32: "Space", - 33: "PageUp", - 34: "PageDown", - 35: "End", - 36: "Home", - 37: "Left", - 38: "Up", - 39: "Right", - 40: "Down", - 44: "PrintScrn", - 45: "Insert", - 46: "Delete", - 59: ";", - 61: "=", - 91: "Mod", - 92: "Mod", - 93: "Mod", - 106: "*", - 107: "=", - 109: "-", - 110: ".", - 111: "/", - 145: "ScrollLock", - 173: "-", - 186: ";", - 187: "=", - 188: ",", - 189: "-", - 190: ".", - 191: "/", - 192: "`", - 219: "[", - 220: "\\", - 221: "]", - 222: "'", - 224: "Mod", - 63232: "Up", - 63233: "Down", - 63234: "Left", - 63235: "Right", - 63272: "Delete", - 63273: "Home", - 63275: "End", - 63276: "PageUp", - 63277: "PageDown", - 63302: "Insert" - }, yr = 0; yr < 10; yr++) Ve[yr + 48] = Ve[yr + 96] = String(yr); - for (var li = 65; li <= 90; li++) Ve[li] = String.fromCharCode(li); - for (var mr = 1; mr <= 12; mr++) Ve[mr + 111] = Ve[mr + 63235] = "F" + mr; - var ze = {}; - ze.basic = { - Left: "goCharLeft", - Right: "goCharRight", - Up: "goLineUp", - Down: "goLineDown", - End: "goLineEnd", - Home: "goLineStartSmart", - PageUp: "goPageUp", - PageDown: "goPageDown", - Delete: "delCharAfter", - Backspace: "delCharBefore", - "Shift-Backspace": "delCharBefore", - Tab: "defaultTab", - "Shift-Tab": "indentAuto", - Enter: "newlineAndIndent", - Insert: "toggleOverwrite", - Esc: "singleSelection" - }, ze.pcDefault = { - "Ctrl-A": "selectAll", - "Ctrl-D": "deleteLine", - "Ctrl-Z": "undo", - "Shift-Ctrl-Z": "redo", - "Ctrl-Y": "redo", - "Ctrl-Home": "goDocStart", - "Ctrl-End": "goDocEnd", - "Ctrl-Up": "goLineUp", - "Ctrl-Down": "goLineDown", - "Ctrl-Left": "goGroupLeft", - "Ctrl-Right": "goGroupRight", - "Alt-Left": "goLineStart", - "Alt-Right": "goLineEnd", - "Ctrl-Backspace": "delGroupBefore", - "Ctrl-Delete": "delGroupAfter", - "Ctrl-S": "save", - "Ctrl-F": "find", - "Ctrl-G": "findNext", - "Shift-Ctrl-G": "findPrev", - "Shift-Ctrl-F": "replace", - "Shift-Ctrl-R": "replaceAll", - "Ctrl-[": "indentLess", - "Ctrl-]": "indentMore", - "Ctrl-U": "undoSelection", - "Shift-Ctrl-U": "redoSelection", - "Alt-U": "redoSelection", - fallthrough: "basic" - }, ze.emacsy = { - "Ctrl-F": "goCharRight", - "Ctrl-B": "goCharLeft", - "Ctrl-P": "goLineUp", - "Ctrl-N": "goLineDown", - "Ctrl-A": "goLineStart", - "Ctrl-E": "goLineEnd", - "Ctrl-V": "goPageDown", - "Shift-Ctrl-V": "goPageUp", - "Ctrl-D": "delCharAfter", - "Ctrl-H": "delCharBefore", - "Alt-Backspace": "delWordBefore", - "Ctrl-K": "killLine", - "Ctrl-T": "transposeChars", - "Ctrl-O": "openLine" - }, ze.macDefault = { - "Cmd-A": "selectAll", - "Cmd-D": "deleteLine", - "Cmd-Z": "undo", - "Shift-Cmd-Z": "redo", - "Cmd-Y": "redo", - "Cmd-Home": "goDocStart", - "Cmd-Up": "goDocStart", - "Cmd-End": "goDocEnd", - "Cmd-Down": "goDocEnd", - "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight", - "Cmd-Left": "goLineLeft", - "Cmd-Right": "goLineRight", - "Alt-Backspace": "delGroupBefore", - "Ctrl-Alt-Backspace": "delGroupAfter", - "Alt-Delete": "delGroupAfter", - "Cmd-S": "save", - "Cmd-F": "find", - "Cmd-G": "findNext", - "Shift-Cmd-G": "findPrev", - "Cmd-Alt-F": "replace", - "Shift-Cmd-Alt-F": "replaceAll", - "Cmd-[": "indentLess", - "Cmd-]": "indentMore", - "Cmd-Backspace": "delWrappedLineLeft", - "Cmd-Delete": "delWrappedLineRight", - "Cmd-U": "undoSelection", - "Shift-Cmd-U": "redoSelection", - "Ctrl-Up": "goDocStart", - "Ctrl-Down": "goDocEnd", - fallthrough: ["basic", "emacsy"] - }, ze.default = me ? ze.macDefault : ze.pcDefault; - function Fs(e) { - var t = e.split(/-(?!$)/); - e = t[t.length - 1]; - for (var i, r, n, l, o = 0; o < t.length - 1; o++) { - var a = t[o]; - if (/^(cmd|meta|m)$/i.test(a)) l = !0;else if (/^a(lt)?$/i.test(a)) i = !0;else if (/^(c|ctrl|control)$/i.test(a)) r = !0;else if (/^s(hift)?$/i.test(a)) n = !0;else throw new Error("Unrecognized modifier name: " + a); - } - return i && (e = "Alt-" + e), r && (e = "Ctrl-" + e), l && (e = "Cmd-" + e), n && (e = "Shift-" + e), e; - } - u(Fs, "normalizeKeyName"); - function Ps(e) { - var t = {}; - for (var i in e) if (e.hasOwnProperty(i)) { - var r = e[i]; - if (/^(name|fallthrough|(de|at)tach)$/.test(i)) continue; - if (r == "...") { - delete e[i]; - continue; - } - for (var n = Or(i.split(" "), Fs), l = 0; l < n.length; l++) { - var o = void 0, - a = void 0; - l == n.length - 1 ? (a = n.join(" "), o = r) : (a = n.slice(0, l + 1).join(" "), o = "..."); - var s = t[a]; - if (!s) t[a] = o;else if (s != o) throw new Error("Inconsistent bindings for " + a); - } - delete e[i]; - } - for (var f in t) e[f] = t[f]; - return e; - } - u(Ps, "normalizeKeyMap"); - function Et(e, t, i, r) { - t = oi(t); - var n = t.call ? t.call(e, r) : t[e]; - if (n === !1) return "nothing"; - if (n === "...") return "multi"; - if (n != null && i(n)) return "handled"; - if (t.fallthrough) { - if (Object.prototype.toString.call(t.fallthrough) != "[object Array]") return Et(e, t.fallthrough, i, r); - for (var l = 0; l < t.fallthrough.length; l++) { - var o = Et(e, t.fallthrough[l], i, r); - if (o) return o; - } - } + }, + NullValue(node) { + const type = context.getInputType(); + if ((0, _definition.isNonNullType)(type)) { + context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${(0, _inspect.inspect)(type)}", found ${(0, _printer.print)(node)}.`, { + nodes: node + })); } - u(Et, "lookupKey"); - function xo(e) { - var t = typeof e == "string" ? e : Ve[e.keyCode]; - return t == "Ctrl" || t == "Alt" || t == "Shift" || t == "Mod"; - } - u(xo, "isModifierKey"); - function Co(e, t, i) { - var r = e; - return t.altKey && r != "Alt" && (e = "Alt-" + e), (On ? t.metaKey : t.ctrlKey) && r != "Ctrl" && (e = "Ctrl-" + e), (On ? t.ctrlKey : t.metaKey) && r != "Mod" && (e = "Cmd-" + e), !i && t.shiftKey && r != "Shift" && (e = "Shift-" + e), e; - } - u(Co, "addModifierNames"); - function wo(e, t) { - if (we && e.keyCode == 34 && e.char) return !1; - var i = Ve[e.keyCode]; - return i == null || e.altGraphKey ? !1 : (e.keyCode == 3 && e.code && (i = e.code), Co(i, e, t)); - } - u(wo, "keyName"); - function oi(e) { - return typeof e == "string" ? ze[e] : e; - } - u(oi, "getKeyMap"); - function It(e, t) { - for (var i = e.doc.sel.ranges, r = [], n = 0; n < i.length; n++) { - for (var l = t(i[n]); r.length && D(l.from, H(r).to) <= 0;) { - var o = r.pop(); - if (D(o.from, l.from) < 0) { - l.from = o.from; - break; - } - } - r.push(l); - } - de(e, function () { - for (var a = r.length - 1; a >= 0; a--) Ft(e.doc, "", r[a].from, r[a].to, "+delete"); - Nt(e); - }); + }, + EnumValue: node => isValidValueNode(context, node), + IntValue: node => isValidValueNode(context, node), + FloatValue: node => isValidValueNode(context, node), + StringValue: node => isValidValueNode(context, node), + BooleanValue: node => isValidValueNode(context, node) + }; +} +/** + * Any value literal may be a valid representation of a Scalar, depending on + * that scalar type. + */ + +function isValidValueNode(context, node) { + // Report any error at the full type expected by the location. + const locationType = context.getInputType(); + if (!locationType) { + return; + } + const type = (0, _definition.getNamedType)(locationType); + if (!(0, _definition.isLeafType)(type)) { + const typeStr = (0, _inspect.inspect)(locationType); + context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, { + nodes: node + })); + return; + } // Scalars and Enums determine if a literal value is valid via parseLiteral(), + // which may throw or return an invalid value to indicate failure. + + try { + const parseResult = type.parseLiteral(node, undefined + /* variables */); + if (parseResult === undefined) { + const typeStr = (0, _inspect.inspect)(locationType); + context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, { + nodes: node + })); + } + } catch (error) { + const typeStr = (0, _inspect.inspect)(locationType); + if (error instanceof _GraphQLError.GraphQLError) { + context.reportError(error); + } else { + context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}; ` + error.message, { + nodes: node, + originalError: error + })); + } + } +} +function validateOneOfInputObject(context, node, type, fieldNodeMap, variableDefinitions) { + var _fieldNodeMap$keys$; + const keys = Object.keys(fieldNodeMap); + const isNotExactlyOneField = keys.length !== 1; + if (isNotExactlyOneField) { + context.reportError(new _GraphQLError.GraphQLError(`OneOf Input Object "${type.name}" must specify exactly one key.`, { + nodes: [node] + })); + return; + } + const value = (_fieldNodeMap$keys$ = fieldNodeMap[keys[0]]) === null || _fieldNodeMap$keys$ === void 0 ? void 0 : _fieldNodeMap$keys$.value; + const isNullLiteral = !value || value.kind === _kinds.Kind.NULL; + const isVariable = (value === null || value === void 0 ? void 0 : value.kind) === _kinds.Kind.VARIABLE; + if (isNullLiteral) { + context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${keys[0]}" must be non-null.`, { + nodes: [node] + })); + return; + } + if (isVariable) { + const variableName = value.name.value; + const definition = variableDefinitions[variableName]; + const isNullableVariable = definition.type.kind !== _kinds.Kind.NON_NULL_TYPE; + if (isNullableVariable) { + context.reportError(new _GraphQLError.GraphQLError(`Variable "${variableName}" must be non-nullable to be used for OneOf Input Object "${type.name}".`, { + nodes: [node] + })); + } + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs": +/*!*************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs ***! + \*************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule; +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +/** + * Variables are input types + * + * A GraphQL operation is only valid if all the variables it defines are of + * input types (scalar, enum, or input object). + * + * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types + */ +function VariablesAreInputTypesRule(context) { + return { + VariableDefinition(node) { + const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type); + if (type !== undefined && !(0, _definition.isInputType)(type)) { + const variableName = node.variable.name.value; + const typeName = (0, _printer.print)(node.type); + context.reportError(new _GraphQLError.GraphQLError(`Variable "$${variableName}" cannot be non-input type "${typeName}".`, { + nodes: node.type + })); } - u(It, "deleteNearSelection"); - function gn(e, t, i) { - var r = En(e.text, t + i, i); - return r < 0 || r > e.text.length ? null : r; - } - u(gn, "moveCharLogically"); - function yn(e, t, i) { - var r = gn(e, t.ch, i); - return r == null ? null : new y(t.line, r, i < 0 ? "after" : "before"); - } - u(yn, "moveLogically"); - function mn(e, t, i, r, n) { - if (e) { - t.doc.direction == "rtl" && (n = -n); - var l = Pe(i, t.doc.direction); - if (l) { - var o = n < 0 ? H(l) : l[0], - a = n < 0 == (o.level == 1), - s = a ? "after" : "before", - f; - if (o.level > 0 || t.doc.direction == "rtl") { - var h = kt(t, i); - f = n < 0 ? i.text.length - 1 : 0; - var c = Oe(t, h, f).top; - f = Yt(function (p) { - return Oe(t, h, p).top == c; - }, n < 0 == (o.level == 1) ? o.from : o.to - 1, f), s == "before" && (f = gn(i, f, 1)); - } else f = n < 0 ? o.to : o.from; - return new y(r, f, s); - } - } - return new y(r, n < 0 ? i.text.length : 0, n < 0 ? "before" : "after"); - } - u(mn, "endOfLine"); - function Es(e, t, i, r) { - var n = Pe(t, e.doc.direction); - if (!n) return yn(t, i, r); - i.ch >= t.text.length ? (i.ch = t.text.length, i.sticky = "before") : i.ch <= 0 && (i.ch = 0, i.sticky = "after"); - var l = Zt(n, i.ch, i.sticky), - o = n[l]; - if (e.doc.direction == "ltr" && o.level % 2 == 0 && (r > 0 ? o.to > i.ch : o.from < i.ch)) return yn(t, i, r); - var a = u(function (b, C) { - return gn(t, b instanceof y ? b.ch : b, C); - }, "mv"), - s, - f = u(function (b) { - return e.options.lineWrapping ? (s = s || kt(e, t), Tl(e, t, s, b)) : { - begin: 0, - end: t.text.length - }; - }, "getWrappedLineExtent"), - h = f(i.sticky == "before" ? a(i, -1) : i.ch); - if (e.doc.direction == "rtl" || o.level == 1) { - var c = o.level == 1 == r < 0, - p = a(i, c ? 1 : -1); - if (p != null && (c ? p <= o.to && p <= h.end : p >= o.from && p >= h.begin)) { - var d = c ? "before" : "after"; - return new y(i.line, p, d); - } - } - var v = u(function (b, C, x) { - for (var w = u(function (E, j) { - return j ? new y(i.line, a(E, 1), "before") : new y(i.line, E, "after"); - }, "getRes"); b >= 0 && b < n.length; b += C) { - var k = n[b], - L = C > 0 == (k.level != 1), - A = L ? x.begin : a(x.end, -1); - if (k.from <= A && A < k.to || (A = L ? k.from : a(k.to, -1), x.begin <= A && A < x.end)) return w(A, L); - } - }, "searchInVisualLine"), - g = v(l + r, r, h); - if (g) return g; - var m = r > 0 ? h.end : a(h.begin, -1); - return m != null && !(r > 0 && m == t.text.length) && (g = v(r > 0 ? 0 : n.length - 1, r, f(m)), g) ? g : null; - } - u(Es, "moveVisually"); - var br = { - selectAll: lo, - singleSelection: function (e) { - return e.setSelection(e.getCursor("anchor"), e.getCursor("head"), Me); - }, - killLine: function (e) { - return It(e, function (t) { - if (t.empty()) { - var i = S(e.doc, t.head.line).text.length; - return t.head.ch == i && t.head.line < e.lastLine() ? { - from: t.head, - to: y(t.head.line + 1, 0) - } : { - from: t.head, - to: y(t.head.line, i) - }; - } else return { - from: t.from(), - to: t.to() - }; - }); - }, - deleteLine: function (e) { - return It(e, function (t) { - return { - from: y(t.from().line, 0), - to: N(e.doc, y(t.to().line + 1, 0)) - }; - }); - }, - delLineLeft: function (e) { - return It(e, function (t) { - return { - from: y(t.from().line, 0), - to: t.from() - }; - }); - }, - delWrappedLineLeft: function (e) { - return It(e, function (t) { - var i = e.charCoords(t.head, "div").top + 5, - r = e.coordsChar({ - left: 0, - top: i - }, "div"); - return { - from: r, - to: t.from() - }; - }); - }, - delWrappedLineRight: function (e) { - return It(e, function (t) { - var i = e.charCoords(t.head, "div").top + 5, - r = e.coordsChar({ - left: e.display.lineDiv.offsetWidth + 100, - top: i - }, "div"); - return { - from: t.from(), - to: r - }; - }); - }, - undo: function (e) { - return e.undo(); - }, - redo: function (e) { - return e.redo(); - }, - undoSelection: function (e) { - return e.undoSelection(); - }, - redoSelection: function (e) { - return e.redoSelection(); - }, - goDocStart: function (e) { - return e.extendSelection(y(e.firstLine(), 0)); - }, - goDocEnd: function (e) { - return e.extendSelection(y(e.lastLine())); - }, - goLineStart: function (e) { - return e.extendSelectionsBy(function (t) { - return So(e, t.head.line); - }, { - origin: "+move", - bias: 1 - }); - }, - goLineStartSmart: function (e) { - return e.extendSelectionsBy(function (t) { - return Lo(e, t.head); - }, { - origin: "+move", - bias: 1 - }); - }, - goLineEnd: function (e) { - return e.extendSelectionsBy(function (t) { - return Is(e, t.head.line); - }, { - origin: "+move", - bias: -1 - }); - }, - goLineRight: function (e) { - return e.extendSelectionsBy(function (t) { - var i = e.cursorCoords(t.head, "div").top + 5; - return e.coordsChar({ - left: e.display.lineDiv.offsetWidth + 100, - top: i - }, "div"); - }, Xt); - }, - goLineLeft: function (e) { - return e.extendSelectionsBy(function (t) { - var i = e.cursorCoords(t.head, "div").top + 5; - return e.coordsChar({ - left: 0, - top: i - }, "div"); - }, Xt); - }, - goLineLeftSmart: function (e) { - return e.extendSelectionsBy(function (t) { - var i = e.cursorCoords(t.head, "div").top + 5, - r = e.coordsChar({ - left: 0, - top: i - }, "div"); - return r.ch < e.getLine(r.line).search(/\S/) ? Lo(e, t.head) : r; - }, Xt); - }, - goLineUp: function (e) { - return e.moveV(-1, "line"); - }, - goLineDown: function (e) { - return e.moveV(1, "line"); - }, - goPageUp: function (e) { - return e.moveV(-1, "page"); - }, - goPageDown: function (e) { - return e.moveV(1, "page"); - }, - goCharLeft: function (e) { - return e.moveH(-1, "char"); - }, - goCharRight: function (e) { - return e.moveH(1, "char"); - }, - goColumnLeft: function (e) { - return e.moveH(-1, "column"); - }, - goColumnRight: function (e) { - return e.moveH(1, "column"); - }, - goWordLeft: function (e) { - return e.moveH(-1, "word"); - }, - goGroupRight: function (e) { - return e.moveH(1, "group"); - }, - goGroupLeft: function (e) { - return e.moveH(-1, "group"); - }, - goWordRight: function (e) { - return e.moveH(1, "word"); - }, - delCharBefore: function (e) { - return e.deleteH(-1, "codepoint"); - }, - delCharAfter: function (e) { - return e.deleteH(1, "char"); - }, - delWordBefore: function (e) { - return e.deleteH(-1, "word"); - }, - delWordAfter: function (e) { - return e.deleteH(1, "word"); - }, - delGroupBefore: function (e) { - return e.deleteH(-1, "group"); - }, - delGroupAfter: function (e) { - return e.deleteH(1, "group"); - }, - indentAuto: function (e) { - return e.indentSelection("smart"); - }, - indentMore: function (e) { - return e.indentSelection("add"); - }, - indentLess: function (e) { - return e.indentSelection("subtract"); - }, - insertTab: function (e) { - return e.replaceSelection(" "); - }, - insertSoftTab: function (e) { - for (var t = [], i = e.listSelections(), r = e.options.tabSize, n = 0; n < i.length; n++) { - var l = i[n].from(), - o = xe(e.getLine(l.line), l.ch, r); - t.push(yi(r - o % r)); - } - e.replaceSelections(t); - }, - defaultTab: function (e) { - e.somethingSelected() ? e.indentSelection("add") : e.execCommand("insertTab"); - }, - transposeChars: function (e) { - return de(e, function () { - for (var t = e.listSelections(), i = [], r = 0; r < t.length; r++) if (t[r].empty()) { - var n = t[r].head, - l = S(e.doc, n.line).text; - if (l) { - if (n.ch == l.length && (n = new y(n.line, n.ch - 1)), n.ch > 0) n = new y(n.line, n.ch + 1), e.replaceRange(l.charAt(n.ch - 1) + l.charAt(n.ch - 2), y(n.line, n.ch - 2), n, "+transpose");else if (n.line > e.doc.first) { - var o = S(e.doc, n.line - 1).text; - o && (n = new y(n.line, 1), e.replaceRange(l.charAt(0) + e.doc.lineSeparator() + o.charAt(o.length - 1), y(n.line - 1, o.length - 1), n, "+transpose")); - } - } - i.push(new W(n, n)); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs": +/*!*****************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs ***! + \*****************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule; +var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs"); +var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs"); +var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs"); +/** + * Variables in allowed position + * + * Variable usages must be compatible with the arguments they are passed to. + * + * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed + */ +function VariablesInAllowedPositionRule(context) { + let varDefMap = Object.create(null); + return { + OperationDefinition: { + enter() { + varDefMap = Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { + node, + type, + defaultValue + } of usages) { + const varName = node.name.value; + const varDef = varDefMap[varName]; + if (varDef && type) { + // A var type is allowed if it is the same or more strict (e.g. is + // a subtype of) than the expected type. It can be more strict if + // the variable type is non-null when the expected type is nullable. + // If both are list types, the variable item type can be more strict + // than the expected item type (contravariant). + const schema = context.getSchema(); + const varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type); + if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) { + const varTypeStr = (0, _inspect.inspect)(varType); + const typeStr = (0, _inspect.inspect)(type); + context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, { + nodes: [varDef, node] + })); } - e.setSelections(i); - }); - }, - newlineAndIndent: function (e) { - return de(e, function () { - for (var t = e.listSelections(), i = t.length - 1; i >= 0; i--) e.replaceRange(e.doc.lineSeparator(), t[i].anchor, t[i].head, "+input"); - t = e.listSelections(); - for (var r = 0; r < t.length; r++) e.indentLine(t[r].from().line, null, !0); - Nt(e); - }); - }, - openLine: function (e) { - return e.replaceSelection(` -`, "start"); - }, - toggleOverwrite: function (e) { - return e.toggleOverwrite(); - } - }; - function So(e, t) { - var i = S(e.doc, t), - r = Se(i); - return r != i && (t = F(r)), mn(!0, e, r, t, 1); - } - u(So, "lineStart"); - function Is(e, t) { - var i = S(e.doc, t), - r = xa(i); - return r != i && (t = F(r)), mn(!0, e, i, t, -1); - } - u(Is, "lineEnd"); - function Lo(e, t) { - var i = So(e, t.line), - r = S(e.doc, i.line), - n = Pe(r, e.doc.direction); - if (!n || n[0].level == 0) { - var l = Math.max(i.ch, r.text.search(/\S/)), - o = t.line == i.line && t.ch <= l && t.ch; - return y(i.line, o ? 0 : l, i.sticky); - } - return i; - } - u(Lo, "lineStartSmart"); - function ai(e, t, i) { - if (typeof t == "string" && (t = br[t], !t)) return !1; - e.display.input.ensurePolled(); - var r = e.display.shift, - n = !1; - try { - e.isReadOnly() && (e.state.suppressEdits = !0), i && (e.display.shift = !1), n = t(e) != Nr; - } finally { - e.display.shift = r, e.state.suppressEdits = !1; - } - return n; - } - u(ai, "doHandleBinding"); - function Rs(e, t, i) { - for (var r = 0; r < e.state.keyMaps.length; r++) { - var n = Et(t, e.state.keyMaps[r], i, e); - if (n) return n; - } - return e.options.extraKeys && Et(t, e.options.extraKeys, i, e) || Et(t, e.options.keyMap, i, e); - } - u(Rs, "lookupKeyForEditor"); - var Bs = new _e(); - function xr(e, t, i, r) { - var n = e.state.keySeq; - if (n) { - if (xo(t)) return "handled"; - if (/\'$/.test(t) ? e.state.keySeq = null : Bs.set(50, function () { - e.state.keySeq == n && (e.state.keySeq = null, e.display.input.reset()); - }), ko(e, n + " " + t, i, r)) return !0; - } - return ko(e, t, i, r); - } - u(xr, "dispatchKey"); - function ko(e, t, i, r) { - var n = Rs(e, t, r); - return n == "multi" && (e.state.keySeq = t), n == "handled" && Z(e, "keyHandled", e, t, i), (n == "handled" || n == "multi") && (ae(i), $i(e)), !!n; - } - u(ko, "dispatchKeyInner"); - function To(e, t) { - var i = wo(t, !0); - return i ? t.shiftKey && !e.state.keySeq ? xr(e, "Shift-" + i, t, function (r) { - return ai(e, r, !0); - }) || xr(e, i, t, function (r) { - if (typeof r == "string" ? /^go[A-Z]/.test(r) : r.motion) return ai(e, r); - }) : xr(e, i, t, function (r) { - return ai(e, r); - }) : !1; - } - u(To, "handleKeyBinding"); - function zs(e, t, i) { - return xr(e, "'" + i + "'", t, function (r) { - return ai(e, r, !0); - }); - } - u(zs, "handleCharBinding"); - var bn = null; - function Mo(e) { - var t = this; - if (!(e.target && e.target != t.display.input.getField()) && (t.curOp.focus = be(), !q(t, e))) { - O && I < 11 && e.keyCode == 27 && (e.returnValue = !1); - var i = e.keyCode; - t.display.shift = i == 16 || e.shiftKey; - var r = To(t, e); - we && (bn = r ? i : null, !r && i == 88 && !na && (me ? e.metaKey : e.ctrlKey) && t.replaceSelection("", null, "cut")), Fe && !me && !r && i == 46 && e.shiftKey && !e.ctrlKey && document.execCommand && document.execCommand("cut"), i == 18 && !/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) && Gs(t); - } - } - u(Mo, "onKeyDown"); - function Gs(e) { - var t = e.display.lineDiv; - it(t, "CodeMirror-crosshair"); - function i(r) { - (r.keyCode == 18 || !r.altKey) && (tt(t, "CodeMirror-crosshair"), ge(document, "keyup", i), ge(document, "mouseover", i)); - } - u(i, "up"), M(document, "keyup", i), M(document, "mouseover", i); - } - u(Gs, "showCrossHair"); - function Do(e) { - e.keyCode == 16 && (this.doc.sel.shift = !1), q(this, e); - } - u(Do, "onKeyUp"); - function No(e) { - var t = this; - if (!(e.target && e.target != t.display.input.getField()) && !(Re(t.display, e) || q(t, e) || e.ctrlKey && !e.altKey || me && e.metaKey)) { - var i = e.keyCode, - r = e.charCode; - if (we && i == bn) { - bn = null, ae(e); - return; - } - if (!(we && (!e.which || e.which < 10) && To(t, e))) { - var n = String.fromCharCode(r !== null && r !== void 0 ? r : i); - n != "\b" && (zs(t, e, n) || t.display.input.onKeyPress(e)); - } - } - } - u(No, "onKeyPress"); - var Us = 400, - xn = u(function (e, t, i) { - this.time = e, this.pos = t, this.button = i; - }, "PastClick"); - xn.prototype.compare = function (e, t, i) { - return this.time + Us > e && D(t, this.pos) == 0 && i == this.button; - }; - var Cr, wr; - function Ks(e, t) { - var i = +new Date(); - return wr && wr.compare(i, e, t) ? (Cr = wr = null, "triple") : Cr && Cr.compare(i, e, t) ? (wr = new xn(i, e, t), Cr = null, "double") : (Cr = new xn(i, e, t), wr = null, "single"); - } - u(Ks, "clickRepeat"); - function Ao(e) { - var t = this, - i = t.display; - if (!(q(t, e) || i.activeTouch && i.input.supportsTouch())) { - if (i.input.ensurePolled(), i.shift = e.shiftKey, Re(i, e)) { - ne || (i.scroller.draggable = !1, setTimeout(function () { - return i.scroller.draggable = !0; - }, 100)); - return; - } - if (!Cn(t, e)) { - var r = ft(t, e), - n = zn(e), - l = r ? Ks(r, n) : "single"; - window.focus(), n == 1 && t.state.selectingText && t.state.selectingText(e), !(r && _s(t, n, r, l, e)) && (n == 1 ? r ? Ys(t, r, l, e) : wi(e) == i.scroller && ae(e) : n == 2 ? (r && ti(t.doc, r), setTimeout(function () { - return i.input.focus(); - }, 20)) : n == 3 && (ci ? t.display.input.onContextMenu(e) : en(t))); } } } - u(Ao, "onMouseDown"); - function _s(e, t, i, r, n) { - var l = "Click"; - return r == "double" ? l = "Double" + l : r == "triple" && (l = "Triple" + l), l = (t == 1 ? "Left" : t == 2 ? "Middle" : "Right") + l, xr(e, Co(l, n), n, function (o) { - if (typeof o == "string" && (o = br[o]), !o) return !1; - var a = !1; - try { - e.isReadOnly() && (e.state.suppressEdits = !0), a = o(e, i) != Nr; - } finally { - e.state.suppressEdits = !1; - } - return a; - }); + }, + VariableDefinition(node) { + varDefMap[node.variable.name.value] = node; + } + }; +} +/** + * Returns true if the variable is allowed in the location it was found, + * which includes considering if default values exist for either the variable + * or the location at which it is located. + */ + +function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) { + if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) { + const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL; + const hasLocationDefaultValue = locationDefaultValue !== undefined; + if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { + return false; + } + const nullableLocationType = locationType.ofType; + return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, nullableLocationType); + } + return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType); +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs": +/*!****************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs ***! + \****************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoDeprecatedCustomRule = NoDeprecatedCustomRule; +var _invariant = __webpack_require__(/*! ../../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs"); +var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +/** + * No deprecated + * + * A GraphQL document is only valid if all selected fields and all used enum values have not been + * deprecated. + * + * Note: This rule is optional and is not part of the Validation section of the GraphQL + * Specification. The main purpose of this rule is detection of deprecated usages and not + * necessarily to forbid their use when querying a service. + */ +function NoDeprecatedCustomRule(context) { + return { + Field(node) { + const fieldDef = context.getFieldDef(); + const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; + if (fieldDef && deprecationReason != null) { + const parentType = context.getParentType(); + parentType != null || (0, _invariant.invariant)(false); + context.reportError(new _GraphQLError.GraphQLError(`The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, { + nodes: node + })); } - u(_s, "handleMappedButton"); - function Xs(e, t, i) { - var r = e.getOption("configureMouse"), - n = r ? r(e, t, i) : {}; - if (n.unit == null) { - var l = qo ? i.shiftKey && i.metaKey : i.altKey; - n.unit = l ? "rectangle" : t == "single" ? "char" : t == "double" ? "word" : "line"; - } - return (n.extend == null || e.doc.extend) && (n.extend = e.doc.extend || i.shiftKey), n.addNew == null && (n.addNew = me ? i.metaKey : i.ctrlKey), n.moveOnDrag == null && (n.moveOnDrag = !(me ? i.altKey : i.ctrlKey)), n; - } - u(Xs, "configureMouse"); - function Ys(e, t, i, r) { - O ? setTimeout(pi(Al, e), 0) : e.curOp.focus = be(); - var n = Xs(e, i, r), - l = e.doc.sel, - o; - e.options.dragDrop && ea && !e.isReadOnly() && i == "single" && (o = l.contains(t)) > -1 && (D((o = l.ranges[o]).from(), t) < 0 || t.xRel > 0) && (D(o.to(), t) > 0 || t.xRel < 0) ? qs(e, r, t, n) : Zs(e, r, t, n); - } - u(Ys, "leftButtonDown"); - function qs(e, t, i, r) { - var n = e.display, - l = !1, - o = Q(e, function (f) { - ne && (n.scroller.draggable = !1), e.state.draggingText = !1, e.state.delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = !1 : en(e)), ge(n.wrapper.ownerDocument, "mouseup", o), ge(n.wrapper.ownerDocument, "mousemove", a), ge(n.scroller, "dragstart", s), ge(n.scroller, "drop", o), l || (ae(f), r.addNew || ti(e.doc, i, null, null, r.extend), ne && !Mr || O && I == 9 ? setTimeout(function () { - n.wrapper.ownerDocument.body.focus({ - preventScroll: !0 - }), n.input.focus(); - }, 20) : n.input.focus()); - }), - a = u(function (f) { - l = l || Math.abs(t.clientX - f.clientX) + Math.abs(t.clientY - f.clientY) >= 10; - }, "mouseMove"), - s = u(function () { - return l = !0; - }, "dragStart"); - ne && (n.scroller.draggable = !0), e.state.draggingText = o, o.copy = !r.moveOnDrag, M(n.wrapper.ownerDocument, "mouseup", o), M(n.wrapper.ownerDocument, "mousemove", a), M(n.scroller, "dragstart", s), M(n.scroller, "drop", o), e.state.delayingBlurEvent = !0, setTimeout(function () { - return n.input.focus(); - }, 20), n.scroller.dragDrop && n.scroller.dragDrop(); - } - u(qs, "leftButtonStartDrag"); - function Oo(e, t, i) { - if (i == "char") return new W(t, t); - if (i == "word") return e.findWordAt(t); - if (i == "line") return new W(y(t.line, 0), N(e.doc, y(t.line + 1, 0))); - var r = i(e, t); - return new W(r.from, r.to); - } - u(Oo, "rangeForUnit"); - function Zs(e, t, i, r) { - O && en(e); - var n = e.display, - l = e.doc; - ae(t); - var o, - a, - s = l.sel, - f = s.ranges; - if (r.addNew && !r.extend ? (a = l.sel.contains(i), a > -1 ? o = f[a] : o = new W(i, i)) : (o = l.sel.primary(), a = l.sel.primIndex), r.unit == "rectangle") r.addNew || (o = new W(i, i)), i = ft(e, t, !0, !0), a = -1;else { - var h = Oo(e, i, r.unit); - r.extend ? o = pn(o, h.anchor, h.head, r.extend) : o = h; - } - r.addNew ? a == -1 ? (a = f.length, te(l, ke(e, f.concat([o]), a), { - scroll: !1, - origin: "*mouse" - })) : f.length > 1 && f[a].empty() && r.unit == "char" && !r.extend ? (te(l, ke(e, f.slice(0, a).concat(f.slice(a + 1)), 0), { - scroll: !1, - origin: "*mouse" - }), s = l.sel) : vn(l, a, o, vi) : (a = 0, te(l, new ye([o], 0), vi), s = l.sel); - var c = i; - function p(x) { - if (D(c, x) != 0) if (c = x, r.unit == "rectangle") { - for (var w = [], k = e.options.tabSize, L = xe(S(l, i.line).text, i.ch, k), A = xe(S(l, x.line).text, x.ch, k), E = Math.min(L, A), j = Math.max(L, A), B = Math.min(i.line, x.line), pe = Math.min(e.lastLine(), Math.max(i.line, x.line)); B <= pe; B++) { - var fe = S(l, B).text, - _ = gi(fe, E, k); - E == j ? w.push(new W(y(B, _), y(B, _))) : fe.length > _ && w.push(new W(y(B, _), y(B, gi(fe, j, k)))); - } - w.length || w.push(new W(i, i)), te(l, ke(e, s.ranges.slice(0, a).concat(w), a), { - origin: "*mouse", - scroll: !1 - }), e.scrollIntoView(x); - } else { - var he = o, - $ = Oo(e, x, r.unit), - Y = he.anchor, - X; - D($.anchor, Y) > 0 ? (X = $.head, Y = Pr(he.from(), $.anchor)) : (X = $.anchor, Y = Fr(he.to(), $.head)); - var z = s.ranges.slice(0); - z[a] = Qs(e, new W(N(l, Y), X)), te(l, ke(e, z, a), vi); - } - } - u(p, "extendTo"); - var d = n.wrapper.getBoundingClientRect(), - v = 0; - function g(x) { - var w = ++v, - k = ft(e, x, !0, r.unit == "rectangle"); - if (k) if (D(k, c) != 0) { - e.curOp.focus = be(), p(k); - var L = Qr(n, l); - (k.line >= L.to || k.line < L.from) && setTimeout(Q(e, function () { - v == w && g(x); - }), 150); - } else { - var A = x.clientY < d.top ? -20 : x.clientY > d.bottom ? 20 : 0; - A && setTimeout(Q(e, function () { - v == w && (n.scroller.scrollTop += A, g(x)); - }), 50); - } - } - u(g, "extend"); - function m(x) { - e.state.selectingText = !1, v = 1 / 0, x && (ae(x), n.input.focus()), ge(n.wrapper.ownerDocument, "mousemove", b), ge(n.wrapper.ownerDocument, "mouseup", C), l.history.lastSelOrigin = null; - } - u(m, "done"); - var b = Q(e, function (x) { - x.buttons === 0 || !zn(x) ? m(x) : g(x); - }), - C = Q(e, m); - e.state.selectingText = C, M(n.wrapper.ownerDocument, "mousemove", b), M(n.wrapper.ownerDocument, "mouseup", C); - } - u(Zs, "leftButtonSelect"); - function Qs(e, t) { - var i = t.anchor, - r = t.head, - n = S(e.doc, i.line); - if (D(i, r) == 0 && i.sticky == r.sticky) return t; - var l = Pe(n); - if (!l) return t; - var o = Zt(l, i.ch, i.sticky), - a = l[o]; - if (a.from != i.ch && a.to != i.ch) return t; - var s = o + (a.from == i.ch == (a.level != 1) ? 0 : 1); - if (s == 0 || s == l.length) return t; - var f; - if (r.line != i.line) f = (r.line - i.line) * (e.doc.direction == "ltr" ? 1 : -1) > 0;else { - var h = Zt(l, r.ch, r.sticky), - c = h - o || (r.ch - i.ch) * (a.level == 1 ? -1 : 1); - h == s - 1 || h == s ? f = c < 0 : f = c > 0; - } - var p = l[s + (f ? -1 : 0)], - d = f == (p.level == 1), - v = d ? p.from : p.to, - g = d ? "after" : "before"; - return i.ch == v && i.sticky == g ? t : new W(new y(i.line, v, g), r); - } - u(Qs, "bidiSimplify"); - function Wo(e, t, i, r) { - var n, l; - if (t.touches) n = t.touches[0].clientX, l = t.touches[0].clientY;else try { - n = t.clientX, l = t.clientY; - } catch { - return !1; - } - if (n >= Math.floor(e.display.gutters.getBoundingClientRect().right)) return !1; - r && ae(t); - var o = e.display, - a = o.lineDiv.getBoundingClientRect(); - if (l > a.bottom || !Ce(e, i)) return Ci(t); - l -= a.top - o.viewOffset; - for (var s = 0; s < e.display.gutterSpecs.length; ++s) { - var f = o.gutters.childNodes[s]; - if (f && f.getBoundingClientRect().right >= n) { - var h = at(e.doc, l), - c = e.display.gutterSpecs[s]; - return U(e, i, e, h, c.className, t), Ci(t); - } + }, + Argument(node) { + const argDef = context.getArgument(); + const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; + if (argDef && deprecationReason != null) { + const directiveDef = context.getDirective(); + if (directiveDef != null) { + context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { + nodes: node + })); + } else { + const parentType = context.getParentType(); + const fieldDef = context.getFieldDef(); + parentType != null && fieldDef != null || (0, _invariant.invariant)(false); + context.reportError(new _GraphQLError.GraphQLError(`Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { + nodes: node + })); } } - u(Wo, "gutterEvent"); - function Cn(e, t) { - return Wo(e, t, "gutterClick", !0); - } - u(Cn, "clickInGutter"); - function Ho(e, t) { - Re(e.display, t) || Js(e, t) || q(e, t, "contextmenu") || ci || e.display.input.onContextMenu(t); - } - u(Ho, "onContextMenu"); - function Js(e, t) { - return Ce(e, "gutterContextMenu") ? Wo(e, t, "gutterContextMenu", !1) : !1; - } - u(Js, "contextMenuInGutter"); - function Fo(e) { - e.display.wrapper.className = e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + e.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), rr(e); - } - u(Fo, "themeChanged"); - var Rt = { - toString: function () { - return "CodeMirror.Init"; - } - }, - Po = {}, - si = {}; - function js(e) { - var t = e.optionHandlers; - function i(r, n, l, o) { - e.defaults[r] = n, l && (t[r] = o ? function (a, s, f) { - f != Rt && l(a, s, f); - } : l); - } - u(i, "option"), e.defineOption = i, e.Init = Rt, i("value", "", function (r, n) { - return r.setValue(n); - }, !0), i("mode", null, function (r, n) { - r.doc.modeOption = n, hn(r); - }, !0), i("indentUnit", 2, hn, !0), i("indentWithTabs", !1), i("smartIndent", !0), i("tabSize", 4, function (r) { - fr(r), rr(r), se(r); - }, !0), i("lineSeparator", null, function (r, n) { - if (r.doc.lineSep = n, !!n) { - var l = [], - o = r.doc.first; - r.doc.iter(function (s) { - for (var f = 0;;) { - var h = s.text.indexOf(n, f); - if (h == -1) break; - f = h + n.length, l.push(y(o, h)); - } - o++; - }); - for (var a = l.length - 1; a >= 0; a--) Ft(r.doc, n, l[a], y(l[a].line, l[a].ch + n.length)); - } - }), i("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (r, n, l) { - r.state.specialChars = new RegExp(n.source + (n.test(" ") ? "" : "| "), "g"), l != Rt && r.refresh(); - }), i("specialCharPlaceholder", Ta, function (r) { - return r.refresh(); - }, !0), i("electricChars", !0), i("inputStyle", Kt ? "contenteditable" : "textarea", function () { - throw new Error("inputStyle can not (yet) be changed in a running editor"); - }, !0), i("spellcheck", !1, function (r, n) { - return r.getInputField().spellcheck = n; - }, !0), i("autocorrect", !1, function (r, n) { - return r.getInputField().autocorrect = n; - }, !0), i("autocapitalize", !1, function (r, n) { - return r.getInputField().autocapitalize = n; - }, !0), i("rtlMoveVisually", !Zo), i("wholeLineUpdateBefore", !0), i("theme", "default", function (r) { - Fo(r), ur(r); - }, !0), i("keyMap", "default", function (r, n, l) { - var o = oi(n), - a = l != Rt && oi(l); - a && a.detach && a.detach(r, o), o.attach && o.attach(r, a || null); - }), i("extraKeys", null), i("configureMouse", null), i("lineWrapping", !1, $s, !0), i("gutters", [], function (r, n) { - r.display.gutterSpecs = un(n, r.options.lineNumbers), ur(r); - }, !0), i("fixedGutter", !0, function (r, n) { - r.display.gutters.style.left = n ? Ji(r.display) + "px" : "0", r.refresh(); - }, !0), i("coverGutterNextToScrollbar", !1, function (r) { - return At(r); - }, !0), i("scrollbarStyle", "native", function (r) { - El(r), At(r), r.display.scrollbars.setScrollTop(r.doc.scrollTop), r.display.scrollbars.setScrollLeft(r.doc.scrollLeft); - }, !0), i("lineNumbers", !1, function (r, n) { - r.display.gutterSpecs = un(r.options.gutters, n), ur(r); - }, !0), i("firstLineNumber", 1, ur, !0), i("lineNumberFormatter", function (r) { - return r; - }, ur, !0), i("showCursorWhenSelecting", !1, ir, !0), i("resetSelectionOnContextMenu", !0), i("lineWiseCopyCut", !0), i("pasteLinesPerSelection", !0), i("selectionsMayTouch", !1), i("readOnly", !1, function (r, n) { - n == "nocursor" && (Dt(r), r.display.input.blur()), r.display.input.readOnlyChanged(n); - }), i("screenReaderLabel", null, function (r, n) { - n = n === "" ? null : n, r.display.input.screenReaderLabelChanged(n); - }), i("disableInput", !1, function (r, n) { - n || r.display.input.reset(); - }, !0), i("dragDrop", !0, Vs), i("allowDropFileTypes", null), i("cursorBlinkRate", 530), i("cursorScrollMargin", 0), i("cursorHeight", 1, ir, !0), i("singleCursorHeightPerLine", !0, ir, !0), i("workTime", 100), i("workDelay", 100), i("flattenSpans", !0, fr, !0), i("addModeClass", !1, fr, !0), i("pollInterval", 100), i("undoDepth", 200, function (r, n) { - return r.doc.history.undoDepth = n; - }), i("historyEventDelay", 1250), i("viewportMargin", 10, function (r) { - return r.refresh(); - }, !0), i("maxHighlightLength", 1e4, fr, !0), i("moveInputWithCursor", !0, function (r, n) { - n || r.display.input.resetPosition(); - }), i("tabindex", null, function (r, n) { - return r.display.input.getField().tabIndex = n || ""; - }), i("autofocus", null), i("direction", "ltr", function (r, n) { - return r.doc.setDirection(n); - }, !0), i("phrases", null); - } - u(js, "defineOptions"); - function Vs(e, t, i) { - var r = i && i != Rt; - if (!t != !r) { - var n = e.display.dragFunctions, - l = t ? M : ge; - l(e.display.scroller, "dragstart", n.start), l(e.display.scroller, "dragenter", n.enter), l(e.display.scroller, "dragover", n.over), l(e.display.scroller, "dragleave", n.leave), l(e.display.scroller, "drop", n.drop); - } - } - u(Vs, "dragDropChanged"); - function $s(e) { - e.options.lineWrapping ? (it(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer.style.minWidth = "", e.display.sizerWidth = null) : (tt(e.display.wrapper, "CodeMirror-wrap"), zi(e)), ji(e), se(e), rr(e), setTimeout(function () { - return At(e); - }, 100); - } - u($s, "wrappingChanged"); - function R(e, t) { - var i = this; - if (!(this instanceof R)) return new R(e, t); - this.options = t = t ? nt(t) : {}, nt(Po, t, !1); - var r = t.value; - typeof r == "string" ? r = new ue(r, t.mode, null, t.lineSeparator, t.direction) : t.mode && (r.modeOption = t.mode), this.doc = r; - var n = new R.inputStyles[t.inputStyle](this), - l = this.display = new cs(e, r, n, t); - l.wrapper.CodeMirror = this, Fo(this), t.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), El(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 _e(), - keySeq: null, - specialChars: null - }, t.autofocus && !Kt && l.input.focus(), O && I < 11 && setTimeout(function () { - return i.display.input.reset(!0); - }, 20), eu(this), Os(), pt(this), this.curOp.forceUpdate = !0, Yl(this, r), t.autofocus && !Kt || this.hasFocus() ? setTimeout(function () { - i.hasFocus() && !i.state.focused && tn(i); - }, 20) : Dt(this); - for (var o in si) si.hasOwnProperty(o) && si[o](this, t[o], Rt); - Bl(this), t.finishInit && t.finishInit(this); - for (var a = 0; a < wn.length; ++a) wn[a](this); - vt(this), ne && t.lineWrapping && getComputedStyle(l.lineDiv).textRendering == "optimizelegibility" && (l.lineDiv.style.textRendering = "auto"); - } - u(R, "CodeMirror"), R.defaults = Po, R.optionHandlers = si; - function eu(e) { - var t = e.display; - M(t.scroller, "mousedown", Q(e, Ao)), O && I < 11 ? M(t.scroller, "dblclick", Q(e, function (s) { - if (!q(e, s)) { - var f = ft(e, s); - if (!(!f || Cn(e, s) || Re(e.display, s))) { - ae(s); - var h = e.findWordAt(f); - ti(e.doc, h.anchor, h.head); - } - } - })) : M(t.scroller, "dblclick", function (s) { - return q(e, s) || ae(s); - }), M(t.scroller, "contextmenu", function (s) { - return Ho(e, s); - }), M(t.input.getField(), "contextmenu", function (s) { - t.scroller.contains(s.target) || Ho(e, s); - }); - var i, - r = { - end: 0 - }; - function n() { - t.activeTouch && (i = setTimeout(function () { - return t.activeTouch = null; - }, 1e3), r = t.activeTouch, r.end = +new Date()); - } - u(n, "finishTouch"); - function l(s) { - if (s.touches.length != 1) return !1; - var f = s.touches[0]; - return f.radiusX <= 1 && f.radiusY <= 1; - } - u(l, "isMouseLikeTouchEvent"); - function o(s, f) { - if (f.left == null) return !0; - var h = f.left - s.left, - c = f.top - s.top; - return h * h + c * c > 20 * 20; - } - u(o, "farAway"), M(t.scroller, "touchstart", function (s) { - if (!q(e, s) && !l(s) && !Cn(e, s)) { - t.input.ensurePolled(), clearTimeout(i); - var f = +new Date(); - t.activeTouch = { - start: f, - moved: !1, - prev: f - r.end <= 300 ? r : null - }, s.touches.length == 1 && (t.activeTouch.left = s.touches[0].pageX, t.activeTouch.top = s.touches[0].pageY); - } - }), M(t.scroller, "touchmove", function () { - t.activeTouch && (t.activeTouch.moved = !0); - }), M(t.scroller, "touchend", function (s) { - var f = t.activeTouch; - if (f && !Re(t, s) && f.left != null && !f.moved && new Date() - f.start < 300) { - var h = e.coordsChar(t.activeTouch, "page"), - c; - !f.prev || o(f, f.prev) ? c = new W(h, h) : !f.prev.prev || o(f, f.prev.prev) ? c = e.findWordAt(h) : c = new W(y(h.line, 0), N(e.doc, y(h.line + 1, 0))), e.setSelection(c.anchor, c.head), e.focus(), ae(s); - } - n(); - }), M(t.scroller, "touchcancel", n), M(t.scroller, "scroll", function () { - t.scroller.clientHeight && (lr(e, t.scroller.scrollTop), ct(e, t.scroller.scrollLeft, !0), U(e, "scroll", e)); - }), M(t.scroller, "mousewheel", function (s) { - return Ul(e, s); - }), M(t.scroller, "DOMMouseScroll", function (s) { - return Ul(e, s); - }), M(t.wrapper, "scroll", function () { - return t.wrapper.scrollTop = t.wrapper.scrollLeft = 0; - }), t.dragFunctions = { - enter: function (s) { - q(e, s) || Qt(s); - }, - over: function (s) { - q(e, s) || (As(e, s), Qt(s)); - }, - start: function (s) { - return Ns(e, s); - }, - drop: Q(e, Ds), - leave: function (s) { - q(e, s) || yo(e); - } - }; - var a = t.input.getField(); - M(a, "keyup", function (s) { - return Do.call(e, s); - }), M(a, "keydown", Q(e, Mo)), M(a, "keypress", Q(e, No)), M(a, "focus", function (s) { - return tn(e, s); - }), M(a, "blur", function (s) { - return Dt(e, s); - }); - } - u(eu, "registerEventHandlers"); - var wn = []; - R.defineInitHook = function (e) { - return wn.push(e); - }; - function Sr(e, t, i, r) { - var n = e.doc, - l; - i == null && (i = "add"), i == "smart" && (n.mode.indent ? l = jt(e, t).state : i = "prev"); - var o = e.options.tabSize, - a = S(n, t), - s = xe(a.text, null, o); - a.stateAfter && (a.stateAfter = null); - var f = a.text.match(/^\s*/)[0], - h; - if (!r && !/\S/.test(a.text)) h = 0, i = "not";else if (i == "smart" && (h = n.mode.indent(l, a.text.slice(f.length), a.text), h == Nr || h > 150)) { - if (!r) return; - i = "prev"; - } - i == "prev" ? t > n.first ? h = xe(S(n, t - 1).text, null, o) : h = 0 : i == "add" ? h = s + e.options.indentUnit : i == "subtract" ? h = s - e.options.indentUnit : typeof i == "number" && (h = s + i), h = Math.max(0, h); - var c = "", - p = 0; - if (e.options.indentWithTabs) for (var d = Math.floor(h / o); d; --d) p += o, c += " "; - if (p < h && (c += yi(h - p)), c != f) return Ft(n, c, y(t, 0), y(t, f.length), "+input"), a.stateAfter = null, !0; - for (var v = 0; v < n.sel.ranges.length; v++) { - var g = n.sel.ranges[v]; - if (g.head.line == t && g.head.ch < f.length) { - var m = y(t, f.length); - vn(n, v, new W(m, m)); - break; - } + }, + ObjectField(node) { + const inputObjectDef = (0, _definition.getNamedType)(context.getParentInputType()); + if ((0, _definition.isInputObjectType)(inputObjectDef)) { + const inputFieldDef = inputObjectDef.getFields()[node.name.value]; + const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; + if (deprecationReason != null) { + context.reportError(new _GraphQLError.GraphQLError(`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, { + nodes: node + })); } } - u(Sr, "indentLine"); - var Te = null; - function ui(e) { - Te = e; - } - u(ui, "setLastCopied"); - function Sn(e, t, i, r, n) { - var l = e.doc; - e.display.shift = !1, r || (r = l.sel); - var o = +new Date() - 200, - a = n == "paste" || e.state.pasteIncoming > o, - s = ki(t), - f = null; - if (a && r.ranges.length > 1) if (Te && Te.text.join(` -`) == t) { - if (r.ranges.length % Te.text.length == 0) { - f = []; - for (var h = 0; h < Te.text.length; h++) f.push(l.splitLines(Te.text[h])); - } - } else s.length == r.ranges.length && e.options.pasteLinesPerSelection && (f = Or(s, function (b) { - return [b]; + }, + EnumValue(node) { + const enumValueDef = context.getEnumValue(); + const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; + if (enumValueDef && deprecationReason != null) { + const enumTypeDef = (0, _definition.getNamedType)(context.getInputType()); + enumTypeDef != null || (0, _invariant.invariant)(false); + context.reportError(new _GraphQLError.GraphQLError(`The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, { + nodes: node })); - for (var c = e.curOp.updateInput, p = r.ranges.length - 1; p >= 0; p--) { - var d = r.ranges[p], - v = d.from(), - g = d.to(); - d.empty() && (i && i > 0 ? v = y(v.line, v.ch - i) : e.state.overwrite && !a ? g = y(g.line, Math.min(S(l, g.line).text.length, g.ch + H(s).length)) : a && Te && Te.lineWise && Te.text.join(` -`) == s.join(` -`) && (v = g = y(v.line, 0))); - var m = { - from: v, - to: g, - text: f ? f[p % f.length] : s, - origin: n || (a ? "paste" : e.state.cutIncoming > o ? "cut" : "+input") - }; - Ht(e.doc, m), Z(e, "inputRead", e, m); - } - t && !a && Io(e, t), Nt(e), e.curOp.updateInput < 2 && (e.curOp.updateInput = c), e.curOp.typing = !0, e.state.pasteIncoming = e.state.cutIncoming = -1; - } - u(Sn, "applyTextInput"); - function Eo(e, t) { - var i = e.clipboardData && e.clipboardData.getData("Text"); - if (i) return e.preventDefault(), !t.isReadOnly() && !t.options.disableInput && de(t, function () { - return Sn(t, i, 0, null, "paste"); - }), !0; - } - u(Eo, "handlePaste"); - function Io(e, t) { - if (!(!e.options.electricChars || !e.options.smartIndent)) for (var i = e.doc.sel, r = i.ranges.length - 1; r >= 0; r--) { - var n = i.ranges[r]; - if (!(n.head.ch > 100 || r && i.ranges[r - 1].head.line == n.head.line)) { - var l = e.getModeAt(n.head), - o = !1; - if (l.electricChars) { - for (var a = 0; a < l.electricChars.length; a++) if (t.indexOf(l.electricChars.charAt(a)) > -1) { - o = Sr(e, n.head.line, "smart"); - break; - } - } else l.electricInput && l.electricInput.test(S(e.doc, n.head.line).text.slice(0, n.head.ch)) && (o = Sr(e, n.head.line, "smart")); - o && Z(e, "electricInput", e, n.head.line); - } - } } - u(Io, "triggerElectric"); - function Ro(e) { - for (var t = [], i = [], r = 0; r < e.doc.sel.ranges.length; r++) { - var n = e.doc.sel.ranges[r].head.line, - l = { - anchor: y(n, 0), - head: y(n + 1, 0) - }; - i.push(l), t.push(e.getRange(l.anchor, l.head)); - } - return { - text: t, - ranges: i - }; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs": +/*!*************************************************************************************************!*\ + !*** ../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs ***! + \*************************************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule; +var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs"); +var _introspection = __webpack_require__(/*! ../../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs"); +/** + * Prohibit introspection queries + * + * A GraphQL document is only valid if all fields selected are not fields that + * return an introspection type. + * + * Note: This rule is optional and is not part of the Validation section of the + * GraphQL Specification. This rule effectively disables introspection, which + * does not reflect best practices and should only be done if absolutely necessary. + */ +function NoSchemaIntrospectionCustomRule(context) { + return { + Field(node) { + const type = (0, _definition.getNamedType)(context.getType()); + if (type && (0, _introspection.isIntrospectionType)(type)) { + context.reportError(new _GraphQLError.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, { + nodes: node + })); } - u(Ro, "copyableRanges"); - function Bo(e, t, i, r) { - e.setAttribute("autocorrect", i ? "" : "off"), e.setAttribute("autocapitalize", r ? "" : "off"), e.setAttribute("spellcheck", !!t); - } - u(Bo, "disableBrowserMagic"); - function zo() { - var e = T("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"), - t = T("div", [e], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); - return ne ? e.style.width = "1000px" : e.setAttribute("wrap", "off"), Ut && (e.style.border = "1px solid black"), Bo(e), t; - } - u(zo, "hiddenTextarea"); - function tu(e) { - var t = e.optionHandlers, - i = e.helpers = {}; - e.prototype = { - constructor: e, - focus: function () { - window.focus(), this.display.input.focus(); - }, - setOption: function (r, n) { - var l = this.options, - o = l[r]; - l[r] == n && r != "mode" || (l[r] = n, t.hasOwnProperty(r) && Q(this, t[r])(this, n, o), U(this, "optionChange", this, r)); - }, - getOption: function (r) { - return this.options[r]; - }, - getDoc: function () { - return this.doc; - }, - addKeyMap: function (r, n) { - this.state.keyMaps[n ? "push" : "unshift"](oi(r)); - }, - removeKeyMap: function (r) { - for (var n = this.state.keyMaps, l = 0; l < n.length; ++l) if (n[l] == r || n[l].name == r) return n.splice(l, 1), !0; - }, - addOverlay: le(function (r, n) { - var l = r.token ? r : e.getMode(this.options, r); - if (l.startState) throw new Error("Overlays may not be stateful."); - Qo(this.state.overlays, { - mode: l, - modeSpec: r, - opaque: n && n.opaque, - priority: n && n.priority || 0 - }, function (o) { - return o.priority; - }), this.state.modeGen++, se(this); - }), - removeOverlay: le(function (r) { - for (var n = this.state.overlays, l = 0; l < n.length; ++l) { - var o = n[l].modeSpec; - if (o == r || typeof r == "string" && o.name == r) { - n.splice(l, 1), this.state.modeGen++, se(this); - return; - } - } - }), - indentLine: le(function (r, n, l) { - typeof n != "string" && typeof n != "number" && (n == null ? n = this.options.smartIndent ? "smart" : "prev" : n = n ? "add" : "subtract"), Jt(this.doc, r) && Sr(this, r, n, l); - }), - indentSelection: le(function (r) { - for (var n = this.doc.sel.ranges, l = -1, o = 0; o < n.length; o++) { - var a = n[o]; - if (a.empty()) a.head.line > l && (Sr(this, a.head.line, r, !0), l = a.head.line, o == this.doc.sel.primIndex && Nt(this));else { - var s = a.from(), - f = a.to(), - h = Math.max(l, s.line); - l = Math.min(this.lastLine(), f.line - (f.ch ? 0 : 1)) + 1; - for (var c = h; c < l; ++c) Sr(this, c, r); - var p = this.doc.sel.ranges; - s.ch == 0 && n.length == p.length && p[o].from().ch > 0 && vn(this.doc, o, new W(s, p[o].to()), Me); - } - } - }), - getTokenAt: function (r, n) { - return Zn(this, r, n); - }, - getLineTokens: function (r, n) { - return Zn(this, y(r), n, !0); - }, - getTokenTypeAt: function (r) { - r = N(this.doc, r); - var n = Xn(this, S(this.doc, r.line)), - l = 0, - o = (n.length - 1) / 2, - a = r.ch, - s; - if (a == 0) s = n[2];else for (;;) { - var f = l + o >> 1; - if ((f ? n[f * 2 - 1] : 0) >= a) o = f;else if (n[f * 2 + 1] < a) l = f + 1;else { - s = n[f * 2 + 2]; - break; - } - } - var h = s ? s.indexOf("overlay ") : -1; - return h < 0 ? s : h == 0 ? null : s.slice(0, h - 1); - }, - getModeAt: function (r) { - var n = this.doc.mode; - return n.innerMode ? e.innerMode(n, this.getTokenAt(r).state).mode : n; - }, - getHelper: function (r, n) { - return this.getHelpers(r, n)[0]; - }, - getHelpers: function (r, n) { - var l = []; - if (!i.hasOwnProperty(n)) return l; - var o = i[n], - a = this.getModeAt(r); - if (typeof a[n] == "string") o[a[n]] && l.push(o[a[n]]);else if (a[n]) for (var s = 0; s < a[n].length; s++) { - var f = o[a[n][s]]; - f && l.push(f); - } else a.helperType && o[a.helperType] ? l.push(o[a.helperType]) : o[a.name] && l.push(o[a.name]); - for (var h = 0; h < o._global.length; h++) { - var c = o._global[h]; - c.pred(a, this) && ee(l, c.val) == -1 && l.push(c.val); - } - return l; - }, - getStateAfter: function (r, n) { - var _r3; - var l = this.doc; - return r = Un(l, (_r3 = r) !== null && _r3 !== void 0 ? _r3 : l.first + l.size - 1), jt(this, r + 1, n).state; - }, - cursorCoords: function (r, n) { - var l, - o = this.doc.sel.primary(); - return r == null ? l = o.head : typeof r == "object" ? l = N(this.doc, r) : l = r ? o.from() : o.to(), Le(this, l, n || "page"); - }, - charCoords: function (r, n) { - return Xr(this, N(this.doc, r), n || "page"); - }, - coordsChar: function (r, n) { - return r = Sl(this, r, n || "page"), qi(this, r.left, r.top); - }, - lineAtHeight: function (r, n) { - return r = Sl(this, { - top: r, - left: 0 - }, n || "page").top, at(this.doc, r + this.display.viewOffset); - }, - heightAtLine: function (r, n, l) { - var o = !1, - a; - if (typeof r == "number") { - var s = this.doc.first + this.doc.size - 1; - r < this.doc.first ? r = this.doc.first : r > s && (r = s, o = !0), a = S(this.doc, r); - } else a = r; - return _r(this, a, { - top: 0, - left: 0 - }, n || "page", l || o).top + (o ? this.doc.height - Ie(a) : 0); - }, - defaultTextHeight: function () { - return Tt(this.display); - }, - defaultCharWidth: function () { - return Mt(this.display); - }, - getViewport: function () { - return { - from: this.display.viewFrom, - to: this.display.viewTo - }; - }, - addWidget: function (r, n, l, o, a) { - var s = this.display; - r = Le(this, N(this.doc, r)); - var f = r.bottom, - h = r.left; - if (n.style.position = "absolute", n.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(n), s.sizer.appendChild(n), o == "over") f = r.top;else if (o == "above" || o == "near") { - var c = Math.max(s.wrapper.clientHeight, this.doc.height), - p = Math.max(s.sizer.clientWidth, s.lineSpace.clientWidth); - (o == "above" || r.bottom + n.offsetHeight > c) && r.top > n.offsetHeight ? f = r.top - n.offsetHeight : r.bottom + n.offsetHeight <= c && (f = r.bottom), h + n.offsetWidth > p && (h = p - n.offsetWidth); - } - n.style.top = f + "px", n.style.left = n.style.right = "", a == "right" ? (h = s.sizer.clientWidth - n.offsetWidth, n.style.right = "0px") : (a == "left" ? h = 0 : a == "middle" && (h = (s.sizer.clientWidth - n.offsetWidth) / 2), n.style.left = h + "px"), l && Va(this, { - left: h, - top: f, - right: h + n.offsetWidth, - bottom: f + n.offsetHeight - }); - }, - triggerOnKeyDown: le(Mo), - triggerOnKeyPress: le(No), - triggerOnKeyUp: Do, - triggerOnMouseDown: le(Ao), - execCommand: function (r) { - if (br.hasOwnProperty(r)) return br[r].call(null, this); - }, - triggerElectric: le(function (r) { - Io(this, r); - }), - findPosH: function (r, n, l, o) { - var a = 1; - n < 0 && (a = -1, n = -n); - for (var s = N(this.doc, r), f = 0; f < n && (s = Ln(this.doc, s, a, l, o), !s.hitSide); ++f); - return s; - }, - moveH: le(function (r, n) { - var l = this; - this.extendSelectionsBy(function (o) { - return l.display.shift || l.doc.extend || o.empty() ? Ln(l.doc, o.head, r, n, l.options.rtlMoveVisually) : r < 0 ? o.from() : o.to(); - }, Xt); - }), - deleteH: le(function (r, n) { - var l = this.doc.sel, - o = this.doc; - l.somethingSelected() ? o.replaceSelection("", null, "+delete") : It(this, function (a) { - var s = Ln(o, a.head, r, n, !1); - return r < 0 ? { - from: s, - to: a.head - } : { - from: a.head, - to: s - }; - }); - }), - findPosV: function (r, n, l, o) { - var a = 1, - s = o; - n < 0 && (a = -1, n = -n); - for (var f = N(this.doc, r), h = 0; h < n; ++h) { - var c = Le(this, f, "div"); - if (s == null ? s = c.left : c.left = s, f = Go(this, c, a, l), f.hitSide) break; - } - return f; - }, - moveV: le(function (r, n) { - var l = this, - o = this.doc, - a = [], - s = !this.display.shift && !o.extend && o.sel.somethingSelected(); - if (o.extendSelectionsBy(function (h) { - if (s) return r < 0 ? h.from() : h.to(); - var c = Le(l, h.head, "div"); - h.goalColumn != null && (c.left = h.goalColumn), a.push(c.left); - var p = Go(l, c, r, n); - return n == "page" && h == o.sel.primary() && nn(l, Xr(l, p, "div").top - c.top), p; - }, Xt), a.length) for (var f = 0; f < o.sel.ranges.length; f++) o.sel.ranges[f].goalColumn = a[f]; - }), - findWordAt: function (r) { - var n = this.doc, - l = S(n, r.line).text, - o = r.ch, - a = r.ch; - if (l) { - var s = this.getHelper(r, "wordChars"); - (r.sticky == "before" || a == l.length) && o ? --o : ++a; - for (var f = l.charAt(o), h = Wr(f, s) ? function (c) { - return Wr(c, s); - } : /\s/.test(f) ? function (c) { - return /\s/.test(c); - } : function (c) { - return !/\s/.test(c) && !Wr(c); - }; o > 0 && h(l.charAt(o - 1));) --o; - for (; a < l.length && h(l.charAt(a));) ++a; - } - return new W(y(r.line, o), y(r.line, a)); - }, - toggleOverwrite: function (r) { - r != null && r == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? it(this.display.cursorDiv, "CodeMirror-overwrite") : tt(this.display.cursorDiv, "CodeMirror-overwrite"), U(this, "overwriteToggle", this, this.state.overwrite)); - }, - hasFocus: function () { - return this.display.input.getField() == be(); - }, - isReadOnly: function () { - return !!(this.options.readOnly || this.doc.cantEdit); - }, - scrollTo: le(function (r, n) { - nr(this, r, n); - }), - getScrollInfo: function () { - var r = this.display.scroller; - return { - left: r.scrollLeft, - top: r.scrollTop, - height: r.scrollHeight - Ae(this) - this.display.barHeight, - width: r.scrollWidth - Ae(this) - this.display.barWidth, - clientHeight: Ki(this), - clientWidth: st(this) - }; - }, - scrollIntoView: le(function (r, n) { - r == null ? (r = { - from: this.doc.sel.primary().head, - to: null - }, n == null && (n = this.options.cursorScrollMargin)) : typeof r == "number" ? r = { - from: y(r, 0), - to: null - } : r.from == null && (r = { - from: r, - to: null - }), r.to || (r.to = r.from), r.margin = n || 0, r.from.line != null ? $a(this, r) : Wl(this, r.from, r.to, r.margin); - }), - setSize: le(function (r, n) { - var l = this, - o = u(function (s) { - return typeof s == "number" || /^\d+$/.test(String(s)) ? s + "px" : s; - }, "interpret"); - r != null && (this.display.wrapper.style.width = o(r)), n != null && (this.display.wrapper.style.height = o(n)), this.options.lineWrapping && xl(this); - var a = this.display.viewFrom; - this.doc.iter(a, this.display.viewTo, function (s) { - if (s.widgets) { - for (var f = 0; f < s.widgets.length; f++) if (s.widgets[f].noHScroll) { - Ye(l, a, "widget"); - break; - } - } - ++a; - }), this.curOp.forceUpdate = !0, U(this, "refresh", this); - }), - operation: function (r) { - return de(this, r); - }, - startOperation: function () { - return pt(this); - }, - endOperation: function () { - return vt(this); - }, - refresh: le(function () { - var r = this.display.cachedTextHeight; - se(this), this.curOp.forceUpdate = !0, rr(this), nr(this, this.doc.scrollLeft, this.doc.scrollTop), an(this.display), (r == null || Math.abs(r - Tt(this.display)) > .5 || this.options.lineWrapping) && ji(this), U(this, "refresh", this); - }), - swapDoc: le(function (r) { - var n = this.doc; - return n.cm = null, this.state.selectingText && this.state.selectingText(), Yl(this, r), rr(this), this.display.input.reset(), nr(this, r.scrollLeft, r.scrollTop), this.curOp.forceScroll = !0, Z(this, "swapDoc", this, n), n; - }), - phrase: function (r) { - var n = this.options.phrases; - return n && Object.prototype.hasOwnProperty.call(n, r) ? n[r] : r; - }, - 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; - } - }, xt(e), e.registerHelper = function (r, n, l) { - i.hasOwnProperty(r) || (i[r] = e[r] = { - _global: [] - }), i[r][n] = l; - }, e.registerGlobalHelper = function (r, n, l, o) { - e.registerHelper(r, n, o), i[r]._global.push({ - pred: l, - val: o - }); - }; + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/specifiedRules.mjs": +/*!*******************************************************************!*\ + !*** ../../../node_modules/graphql/validation/specifiedRules.mjs ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.specifiedSDLRules = exports.specifiedRules = exports.recommendedRules = void 0; +var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs"); +var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs"); +var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs"); +var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs"); +var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs"); +var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs"); +var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs"); +var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs"); +var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs"); +var _MaxIntrospectionDepthRule = __webpack_require__(/*! ./rules/MaxIntrospectionDepthRule.mjs */ "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs"); +var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs"); +var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs"); +var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs"); +var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs"); +var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs"); +var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs"); +var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs"); +var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs"); +var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs"); +var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs"); +var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs"); +var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs"); +var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs"); +var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs"); +var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs"); +var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs"); +var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs"); +var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs"); +var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs"); +var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs"); +var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs"); +var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs"); +var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs"); +var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs"); +var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs"); +// Spec Section: "Executable Definitions" +// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" + +// Spec Section: "Fragments on Composite Types" + +// Spec Section: "Argument Names" + +// Spec Section: "Directives Are Defined" + +// Spec Section: "Fragment spread target defined" + +// Spec Section: "Fragment Spread Type Existence" + +// Spec Section: "Lone Anonymous Operation" + +// SDL-specific validation rules + +// TODO: Spec Section + +// Spec Section: "Fragments must not form cycles" + +// Spec Section: "All Variable Used Defined" + +// Spec Section: "Fragments must be used" + +// Spec Section: "All Variables Used" + +// Spec Section: "Field Selection Merging" + +// Spec Section: "Fragment spread is possible" + +// Spec Section: "Argument Optionality" + +// Spec Section: "Leaf Field Selections" + +// Spec Section: "Subscriptions with Single Root Field" + +// Spec Section: "Argument Uniqueness" + +// Spec Section: "Directives Are Unique Per Location" + +// Spec Section: "Fragment Name Uniqueness" + +// Spec Section: "Input Object Field Uniqueness" + +// Spec Section: "Operation Name Uniqueness" + +// Spec Section: "Variable Uniqueness" + +// Spec Section: "Value Type Correctness" + +// Spec Section: "Variables are Input Types" + +// Spec Section: "All Variable Usages Are Allowed" + +/** + * Technically these aren't part of the spec but they are strongly encouraged + * validation rules. + */ +const recommendedRules = exports.recommendedRules = Object.freeze([_MaxIntrospectionDepthRule.MaxIntrospectionDepthRule]); +/** + * This set includes all validation rules defined by the GraphQL spec. + * + * The order of the rules in this list has been adjusted to lead to the + * most clear output when encountering multiple validation errors. + */ + +const specifiedRules = exports.specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, ...recommendedRules]); +/** + * @internal + */ + +const specifiedSDLRules = exports.specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]); + +/***/ }), + +/***/ "../../../node_modules/graphql/validation/validate.mjs": +/*!*************************************************************!*\ + !*** ../../../node_modules/graphql/validation/validate.mjs ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.assertValidSDL = assertValidSDL; +exports.assertValidSDLExtension = assertValidSDLExtension; +exports.validate = validate; +exports.validateSDL = validateSDL; +var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs"); +var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs"); +var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs"); +var _validate = __webpack_require__(/*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs"); +var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs"); +var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs"); +var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs"); +/** + * Implements the "Validation" section of the spec. + * + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the document is valid. + * + * A list of specific validation rules may be provided. If not provided, the + * default list of rules defined by the GraphQL specification will be used. + * + * Each validation rules is a function which returns a visitor + * (see the language/visitor API). Visitor methods are expected to return + * GraphQLErrors, or Arrays of GraphQLErrors when invalid. + * + * Validate will stop validation after a `maxErrors` limit has been reached. + * Attackers can send pathologically invalid queries to induce a DoS attack, + * so by default `maxErrors` set to 100 errors. + * + * Optionally a custom TypeInfo instance may be provided. If not provided, one + * will be created from the provided schema. + */ + +function validate(schema, documentAST, rules = _specifiedRules.specifiedRules, options, /** @deprecated will be removed in 17.0.0 */ +typeInfo = new _TypeInfo.TypeInfo(schema)) { + var _options$maxErrors; + const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100; + documentAST || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error. + + (0, _validate.assertValidSchema)(schema); + const abortObj = Object.freeze({}); + const errors = []; + const context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, error => { + if (errors.length >= maxErrors) { + errors.push(new _GraphQLError.GraphQLError('Too many validation errors, error limit reached. Validation aborted.')); // eslint-disable-next-line @typescript-eslint/no-throw-literal + + throw abortObj; + } + errors.push(error); + }); // This uses a specialized visitor which runs multiple visitors in parallel, + // while maintaining the visitor skip and break API. + + const visitor = (0, _visitor.visitInParallel)(rules.map(rule => rule(context))); // Visit the whole document with each instance of all provided rules. + + try { + (0, _visitor.visit)(documentAST, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor)); + } catch (e) { + if (e !== abortObj) { + throw e; + } + } + return errors; +} +/** + * @internal + */ + +function validateSDL(documentAST, schemaToExtend, rules = _specifiedRules.specifiedSDLRules) { + const errors = []; + const context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, error => { + errors.push(error); + }); + const visitors = rules.map(rule => rule(context)); + (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors)); + return errors; +} +/** + * Utility function which asserts a SDL document is valid by throwing an error + * if it is invalid. + * + * @internal + */ + +function assertValidSDL(documentAST) { + const errors = validateSDL(documentAST); + if (errors.length !== 0) { + throw new Error(errors.map(error => error.message).join('\n\n')); + } +} +/** + * Utility function which asserts a SDL document is valid by throwing an error + * if it is invalid. + * + * @internal + */ + +function assertValidSDLExtension(documentAST, schema) { + const errors = validateSDL(documentAST, schema); + if (errors.length !== 0) { + throw new Error(errors.map(error => error.message).join('\n\n')); + } +} + +/***/ }), + +/***/ "../../../node_modules/graphql/version.mjs": +/*!*************************************************!*\ + !*** ../../../node_modules/graphql/version.mjs ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.versionInfo = exports.version = void 0; +// Note: This file is autogenerated using "resources/gen-version.js" script and +// automatically updated by "npm version" command. + +/** + * A string containing the version of the GraphQL.js library + */ +const version = exports.version = '16.9.0'; +/** + * An object containing the components of the GraphQL.js version string + */ + +const versionInfo = exports.versionInfo = Object.freeze({ + major: 16, + minor: 9, + patch: 0, + preReleaseTag: null +}); + +/***/ }), + +/***/ "../../../node_modules/hey-listen/dist/hey-listen.es.js": +/*!**************************************************************!*\ + !*** ../../../node_modules/hey-listen/dist/hey-listen.es.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.warning = exports.invariant = void 0; +var warning = function () {}; +exports.warning = warning; +var invariant = function () {}; +exports.invariant = invariant; +if (true) { + exports.warning = warning = function (check, message) { + if (!check && typeof console !== 'undefined') { + console.warn(message); + } + }; + exports.invariant = invariant = function (check, message) { + if (!check) { + throw new Error(message); + } + }; +} + +/***/ }), + +/***/ "../../../node_modules/is-plain-object/index.js": +/*!******************************************************!*\ + !*** ../../../node_modules/is-plain-object/index.js ***! + \******************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(/*! isobject */ "../../../node_modules/isobject/index.js"); +function isObjectObject(o) { + return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; +} +module.exports = function isPlainObject(o) { + var ctor, prot; + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; + +/***/ }), + +/***/ "../../../node_modules/is-primitive/index.js": +/*!***************************************************!*\ + !*** ../../../node_modules/is-primitive/index.js ***! + \***************************************************/ +/***/ (function(module) { + +"use strict"; +/*! + * is-primitive + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function isPrimitive(val) { + if (typeof val === 'object') { + return val === null; + } + return typeof val !== 'function'; +}; + +/***/ }), + +/***/ "../../../node_modules/isarray/index.js": +/*!**********************************************!*\ + !*** ../../../node_modules/isarray/index.js ***! + \**********************************************/ +/***/ (function(module) { + +"use strict"; + + +var toString = {}.toString; +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +/***/ }), + +/***/ "../../../node_modules/isobject/index.js": +/*!***********************************************!*\ + !*** ../../../node_modules/isobject/index.js ***! + \***********************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var isArray = __webpack_require__(/*! isarray */ "../../../node_modules/isarray/index.js"); +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; + +/***/ }), + +/***/ "../../../node_modules/linkify-it/build/index.cjs.js": +/*!***********************************************************!*\ + !*** ../../../node_modules/linkify-it/build/index.cjs.js ***! + \***********************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var uc_micro = __webpack_require__(/*! uc.micro */ "../../../node_modules/uc.micro/build/index.cjs.js"); +function reFactory(opts) { + const re = {}; + opts = opts || {}; + re.src_Any = uc_micro.Any.source; + re.src_Cc = uc_micro.Cc.source; + re.src_Z = uc_micro.Z.source; + re.src_P = uc_micro.P.source; + + // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation) + re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|'); + + // \p{\Z\Cc} (white spaces + control) + re.src_ZCc = [re.src_Z, re.src_Cc].join('|'); + + // Experimental. List of chars, completely prohibited in links + // because can separate it from other part of text + const text_separators = '[><\uff5c]'; + + // All possible word characters (everything without punctuation, spaces & controls) + // Defined via punctuation & spaces to save space + // Should be something like \p{\L\N\S\M} (\w but without `_`) + re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'; + // The same as abothe but without [0-9] + // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')'; + + re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; + + // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch. + re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?'; + re.src_port = '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?'; + re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' + '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))'; + re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' + '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' + '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' + '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' + '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' + "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" + + // allow `I'm_king` if no pair found + "\\'(?=" + re.src_pseudo_letter + '|[-])|' + + // google has many dots in "google search" links (#66, #81). + // github has ... in commit range links, + // Restrict to + // - english + // - percent-encoded + // - parts of file path + // - params separator + // until more examples found. + '\\.{2,}[a-zA-Z0-9%/&]|' + '\\.(?!' + re.src_ZCc + '|[.]|$)|' + (opts['---'] ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate + : '\\-+|') + + // allow `,,,` in paths + ',(?!' + re.src_ZCc + '|$)|' + + // allow `;` if not followed by space-like char + ';(?!' + re.src_ZCc + '|$)|' + + // allow `!!!` in paths, but not at the end + '\\!+(?!' + re.src_ZCc + '|[!]|$)|' + '\\?(?!' + re.src_ZCc + '|[?]|$)' + ')+' + '|\\/' + ')?'; + + // Allow anything in markdown spec, forbid quote (") at the first position + // because emails enclosed in quotes are far more common + re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'; + re.src_xn = 'xn--[a-z0-9\\-]{1,59}'; + + // More to read about domain names + // http://serverfault.com/questions/638260/ + + re.src_domain_root = + // Allow letters & digits (http://test1) + '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')'; + re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')'; + re.src_host = '(?:' + + // Don't need IP check, because digits are already allowed in normal domain names + // src_ip4 + + // '|' + + '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain /* _root */ + ')' + ')'; + re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' + ')'; + re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))'; + re.src_host_strict = re.src_host + re.src_host_terminator; + re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator; + re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator; + re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator; + re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator; + + // + // Main rules + // + + // Rude test fuzzy links by host, for quick deny + re.tpl_host_fuzzy_test = 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))'; + re.tpl_email_fuzzy = '(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')'; + re.tpl_link_fuzzy = + // Fuzzy link can't be prepended with .:/\- and non punctuation. + // but can start with > (markdown blockquote) + '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'; + re.tpl_link_no_ip_fuzzy = + // Fuzzy link can't be prepended with .:/\- and non punctuation. + // but can start with > (markdown blockquote) + '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')'; + return re; +} + +// +// Helpers +// + +// Merge objects +// +function assign(obj /* from1, from2, from3, ... */) { + const sources = Array.prototype.slice.call(arguments, 1); + sources.forEach(function (source) { + if (!source) { + return; + } + Object.keys(source).forEach(function (key) { + obj[key] = source[key]; + }); + }); + return obj; +} +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function isString(obj) { + return _class(obj) === '[object String]'; +} +function isObject(obj) { + return _class(obj) === '[object Object]'; +} +function isRegExp(obj) { + return _class(obj) === '[object RegExp]'; +} +function isFunction(obj) { + return _class(obj) === '[object Function]'; +} +function escapeRE(str) { + return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); +} + +// + +const defaultOptions = { + fuzzyLink: true, + fuzzyEmail: true, + fuzzyIP: false +}; +function isOptionsObj(obj) { + return Object.keys(obj || {}).reduce(function (acc, k) { + /* eslint-disable-next-line no-prototype-builtins */ + return acc || defaultOptions.hasOwnProperty(k); + }, false); +} +const defaultSchemas = { + 'http:': { + validate: function (text, pos, self) { + const tail = text.slice(pos); + if (!self.re.http) { + // compile lazily, because "host"-containing variables can change on tlds update. + self.re.http = new RegExp('^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'); + } + if (self.re.http.test(tail)) { + return tail.match(self.re.http)[0].length; + } + return 0; + } + }, + 'https:': 'http:', + 'ftp:': 'http:', + '//': { + validate: function (text, pos, self) { + const tail = text.slice(pos); + if (!self.re.no_http) { + // compile lazily, because "host"-containing variables can change on tlds update. + self.re.no_http = new RegExp('^' + self.re.src_auth + + // Don't allow single-level domains, because of false positives like '//test' + // with code comments + '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i'); + } + if (self.re.no_http.test(tail)) { + // should not be `://` & `///`, that protects from errors in protocol name + if (pos >= 3 && text[pos - 3] === ':') { + return 0; + } + if (pos >= 3 && text[pos - 3] === '/') { + return 0; + } + return tail.match(self.re.no_http)[0].length; + } + return 0; + } + }, + 'mailto:': { + validate: function (text, pos, self) { + const tail = text.slice(pos); + if (!self.re.mailto) { + self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'); + } + if (self.re.mailto.test(tail)) { + return tail.match(self.re.mailto)[0].length; + } + return 0; + } + } +}; + +// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js) +/* eslint-disable-next-line max-len */ +const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'; + +// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead +const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|'); +function resetScanCache(self) { + self.__index__ = -1; + self.__text_cache__ = ''; +} +function createValidator(re) { + return function (text, pos) { + const tail = text.slice(pos); + if (re.test(tail)) { + return tail.match(re)[0].length; + } + return 0; + }; +} +function createNormalizer() { + return function (match, self) { + self.normalize(match); + }; +} + +// Schemas compiler. Build regexps. +// +function compile(self) { + // Load & clone RE patterns. + const re = self.re = reFactory(self.__opts__); + + // Define dynamic patterns + const tlds = self.__tlds__.slice(); + self.onCompile(); + if (!self.__tlds_replaced__) { + tlds.push(tlds_2ch_src_re); + } + tlds.push(re.src_xn); + re.src_tlds = tlds.join('|'); + function untpl(tpl) { + return tpl.replace('%TLDS%', re.src_tlds); + } + re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i'); + re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i'); + re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i'); + re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i'); + + // + // Compile each schema + // + + const aliases = []; + self.__compiled__ = {}; // Reset compiled data + + function schemaError(name, val) { + throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val); + } + Object.keys(self.__schemas__).forEach(function (name) { + const val = self.__schemas__[name]; + + // skip disabled methods + if (val === null) { + return; + } + const compiled = { + validate: null, + link: null + }; + self.__compiled__[name] = compiled; + if (isObject(val)) { + if (isRegExp(val.validate)) { + compiled.validate = createValidator(val.validate); + } else if (isFunction(val.validate)) { + compiled.validate = val.validate; + } else { + schemaError(name, val); + } + if (isFunction(val.normalize)) { + compiled.normalize = val.normalize; + } else if (!val.normalize) { + compiled.normalize = createNormalizer(); + } else { + schemaError(name, val); + } + return; + } + if (isString(val)) { + aliases.push(name); + return; + } + schemaError(name, val); + }); + + // + // Compile postponed aliases + // + + aliases.forEach(function (alias) { + if (!self.__compiled__[self.__schemas__[alias]]) { + // Silently fail on missed schemas to avoid errons on disable. + // schemaError(alias, self.__schemas__[alias]); + return; + } + self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate; + self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize; + }); + + // + // Fake record for guessed links + // + self.__compiled__[''] = { + validate: null, + normalize: createNormalizer() + }; + + // + // Build schema condition + // + const slist = Object.keys(self.__compiled__).filter(function (name) { + // Filter disabled & fake schemas + return name.length > 0 && self.__compiled__[name]; + }).map(escapeRE).join('|'); + // (?!_) cause 1.5x slowdown + self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i'); + self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); + self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i'); + self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i'); + + // + // Cleanup + // + + resetScanCache(self); +} + +/** + * class Match + * + * Match result. Single element of array, returned by [[LinkifyIt#match]] + **/ +function Match(self, shift) { + const start = self.__index__; + const end = self.__last_index__; + const text = self.__text_cache__.slice(start, end); + + /** + * Match#schema -> String + * + * Prefix (protocol) for matched string. + **/ + this.schema = self.__schema__.toLowerCase(); + /** + * Match#index -> Number + * + * First position of matched string. + **/ + this.index = start + shift; + /** + * Match#lastIndex -> Number + * + * Next position after matched string. + **/ + this.lastIndex = end + shift; + /** + * Match#raw -> String + * + * Matched string. + **/ + this.raw = text; + /** + * Match#text -> String + * + * Notmalized text of matched string. + **/ + this.text = text; + /** + * Match#url -> String + * + * Normalized url of matched string. + **/ + this.url = text; +} +function createMatch(self, shift) { + const match = new Match(self, shift); + self.__compiled__[match.schema].normalize(match, self); + return match; +} + +/** + * class LinkifyIt + **/ + +/** + * new LinkifyIt(schemas, options) + * - schemas (Object): Optional. Additional schemas to validate (prefix/validator) + * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false } + * + * Creates new linkifier instance with optional additional schemas. + * Can be called without `new` keyword for convenience. + * + * By default understands: + * + * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links + * - "fuzzy" links and emails (example.com, foo@bar.com). + * + * `schemas` is an object, where each key/value describes protocol/rule: + * + * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:` + * for example). `linkify-it` makes shure that prefix is not preceeded with + * alphanumeric char and symbols. Only whitespaces and punctuation allowed. + * - __value__ - rule to check tail after link prefix + * - _String_ - just alias to existing rule + * - _Object_ + * - _validate_ - validator function (should return matched length on success), + * or `RegExp`. + * - _normalize_ - optional function to normalize text & url of matched result + * (for example, for @twitter mentions). + * + * `options`: + * + * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`. + * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts + * like version numbers. Default `false`. + * - __fuzzyEmail__ - recognize emails without `mailto:` prefix. + * + **/ +function LinkifyIt(schemas, options) { + if (!(this instanceof LinkifyIt)) { + return new LinkifyIt(schemas, options); + } + if (!options) { + if (isOptionsObj(schemas)) { + options = schemas; + schemas = {}; + } + } + this.__opts__ = assign({}, defaultOptions, options); + + // Cache last tested result. Used to skip repeating steps on next `match` call. + this.__index__ = -1; + this.__last_index__ = -1; // Next scan position + this.__schema__ = ''; + this.__text_cache__ = ''; + this.__schemas__ = assign({}, defaultSchemas, schemas); + this.__compiled__ = {}; + this.__tlds__ = tlds_default; + this.__tlds_replaced__ = false; + this.re = {}; + compile(this); +} + +/** chainable + * LinkifyIt#add(schema, definition) + * - schema (String): rule name (fixed pattern prefix) + * - definition (String|RegExp|Object): schema definition + * + * Add new rule definition. See constructor description for details. + **/ +LinkifyIt.prototype.add = function add(schema, definition) { + this.__schemas__[schema] = definition; + compile(this); + return this; +}; + +/** chainable + * LinkifyIt#set(options) + * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false } + * + * Set recognition options for links without schema. + **/ +LinkifyIt.prototype.set = function set(options) { + this.__opts__ = assign(this.__opts__, options); + return this; +}; + +/** + * LinkifyIt#test(text) -> Boolean + * + * Searches linkifiable pattern and returns `true` on success or `false` on fail. + **/ +LinkifyIt.prototype.test = function test(text) { + // Reset scan cache + this.__text_cache__ = text; + this.__index__ = -1; + if (!text.length) { + return false; + } + let m, ml, me, len, shift, next, re, tld_pos, at_pos; + + // try to scan for link with schema - that's the most simple rule + if (this.re.schema_test.test(text)) { + re = this.re.schema_search; + re.lastIndex = 0; + while ((m = re.exec(text)) !== null) { + len = this.testSchemaAt(text, m[2], re.lastIndex); + if (len) { + this.__schema__ = m[2]; + this.__index__ = m.index + m[1].length; + this.__last_index__ = m.index + m[0].length + len; + break; + } + } + } + if (this.__opts__.fuzzyLink && this.__compiled__['http:']) { + // guess schemaless links + tld_pos = text.search(this.re.host_fuzzy_test); + if (tld_pos >= 0) { + // if tld is located after found link - no need to check fuzzy pattern + if (this.__index__ < 0 || tld_pos < this.__index__) { + if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) { + shift = ml.index + ml[1].length; + if (this.__index__ < 0 || shift < this.__index__) { + this.__schema__ = ''; + this.__index__ = shift; + this.__last_index__ = ml.index + ml[0].length; + } + } + } + } + } + if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) { + // guess schemaless emails + at_pos = text.indexOf('@'); + if (at_pos >= 0) { + // We can't skip this check, because this cases are possible: + // 192.168.1.1@gmail.com, my.in@example.com + if ((me = text.match(this.re.email_fuzzy)) !== null) { + shift = me.index + me[1].length; + next = me.index + me[0].length; + if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) { + this.__schema__ = 'mailto:'; + this.__index__ = shift; + this.__last_index__ = next; + } + } + } + } + return this.__index__ >= 0; +}; + +/** + * LinkifyIt#pretest(text) -> Boolean + * + * Very quick check, that can give false positives. Returns true if link MAY BE + * can exists. Can be used for speed optimization, when you need to check that + * link NOT exists. + **/ +LinkifyIt.prototype.pretest = function pretest(text) { + return this.re.pretest.test(text); +}; + +/** + * LinkifyIt#testSchemaAt(text, name, position) -> Number + * - text (String): text to scan + * - name (String): rule (schema) name + * - position (Number): text offset to check from + * + * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly + * at given position. Returns length of found pattern (0 on fail). + **/ +LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) { + // If not supported schema check requested - terminate + if (!this.__compiled__[schema.toLowerCase()]) { + return 0; + } + return this.__compiled__[schema.toLowerCase()].validate(text, pos, this); +}; + +/** + * LinkifyIt#match(text) -> Array|null + * + * Returns array of found link descriptions or `null` on fail. We strongly + * recommend to use [[LinkifyIt#test]] first, for best speed. + * + * ##### Result match description + * + * - __schema__ - link schema, can be empty for fuzzy links, or `//` for + * protocol-neutral links. + * - __index__ - offset of matched text + * - __lastIndex__ - index of next char after mathch end + * - __raw__ - matched text + * - __text__ - normalized text + * - __url__ - link, generated from matched text + **/ +LinkifyIt.prototype.match = function match(text) { + const result = []; + let shift = 0; + + // Try to take previous element from cache, if .test() called before + if (this.__index__ >= 0 && this.__text_cache__ === text) { + result.push(createMatch(this, shift)); + shift = this.__last_index__; + } + + // Cut head if cache was used + let tail = shift ? text.slice(shift) : text; + + // Scan string until end reached + while (this.test(tail)) { + result.push(createMatch(this, shift)); + tail = tail.slice(this.__last_index__); + shift += this.__last_index__; + } + if (result.length) { + return result; + } + return null; +}; + +/** + * LinkifyIt#matchAtStart(text) -> Match|null + * + * Returns fully-formed (not fuzzy) link if it starts at the beginning + * of the string, and null otherwise. + **/ +LinkifyIt.prototype.matchAtStart = function matchAtStart(text) { + // Reset scan cache + this.__text_cache__ = text; + this.__index__ = -1; + if (!text.length) return null; + const m = this.re.schema_at_start.exec(text); + if (!m) return null; + const len = this.testSchemaAt(text, m[2], m[0].length); + if (!len) return null; + this.__schema__ = m[2]; + this.__index__ = m.index + m[1].length; + this.__last_index__ = m.index + m[0].length + len; + return createMatch(this, 0); +}; + +/** chainable + * LinkifyIt#tlds(list [, keepOld]) -> this + * - list (Array): list of tlds + * - keepOld (Boolean): merge with current list if `true` (`false` by default) + * + * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix) + * to avoid false positives. By default this algorythm used: + * + * - hostname with any 2-letter root zones are ok. + * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф + * are ok. + * - encoded (`xn--...`) root zones are ok. + * + * If list is replaced, then exact match for 2-chars root zones will be checked. + **/ +LinkifyIt.prototype.tlds = function tlds(list, keepOld) { + list = Array.isArray(list) ? list : [list]; + if (!keepOld) { + this.__tlds__ = list.slice(); + this.__tlds_replaced__ = true; + compile(this); + return this; + } + this.__tlds__ = this.__tlds__.concat(list).sort().filter(function (el, idx, arr) { + return el !== arr[idx - 1]; + }).reverse(); + compile(this); + return this; +}; + +/** + * LinkifyIt#normalize(match) + * + * Default normalizer (if schema does not define it's own). + **/ +LinkifyIt.prototype.normalize = function normalize(match) { + // Do minimal possible changes by default. Need to collect feedback prior + // to move forward https://github.com/markdown-it/linkify-it/issues/1 + + if (!match.schema) { + match.url = 'http://' + match.url; + } + if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) { + match.url = 'mailto:' + match.url; + } +}; + +/** + * LinkifyIt#onCompile() + * + * Override to modify basic RegExp-s. + **/ +LinkifyIt.prototype.onCompile = function onCompile() {}; +module.exports = LinkifyIt; + +/***/ }), + +/***/ "../../../node_modules/markdown-it/dist/index.cjs.js": +/*!***********************************************************!*\ + !*** ../../../node_modules/markdown-it/dist/index.cjs.js ***! + \***********************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var mdurl = __webpack_require__(/*! mdurl */ "../../../node_modules/mdurl/build/index.cjs.js"); +var ucmicro = __webpack_require__(/*! uc.micro */ "../../../node_modules/uc.micro/build/index.cjs.js"); +var entities = __webpack_require__(/*! entities */ "../../../node_modules/entities/lib/index.js"); +var LinkifyIt = __webpack_require__(/*! linkify-it */ "../../../node_modules/linkify-it/build/index.cjs.js"); +var punycode = __webpack_require__(/*! punycode.js */ "../../../node_modules/punycode.js/punycode.es6.js"); +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { + return e[k]; + } + }); + } + }); + } + n.default = e; + return Object.freeze(n); +} +var mdurl__namespace = /*#__PURE__*/_interopNamespaceDefault(mdurl); +var ucmicro__namespace = /*#__PURE__*/_interopNamespaceDefault(ucmicro); + +// Utilities +// + +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function isString(obj) { + return _class(obj) === '[object String]'; +} +const _hasOwnProperty = Object.prototype.hasOwnProperty; +function has(object, key) { + return _hasOwnProperty.call(object, key); +} + +// Merge objects +// +function assign(obj /* from1, from2, from3, ... */) { + const sources = Array.prototype.slice.call(arguments, 1); + sources.forEach(function (source) { + if (!source) { + return; + } + if (typeof source !== 'object') { + throw new TypeError(source + 'must be object'); + } + Object.keys(source).forEach(function (key) { + obj[key] = source[key]; + }); + }); + return obj; +} + +// Remove element from array and put another array at those position. +// Useful for some operations with tokens +function arrayReplaceAt(src, pos, newElements) { + return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); +} +function isValidEntityCode(c) { + /* eslint no-bitwise:0 */ + // broken sequence + if (c >= 0xD800 && c <= 0xDFFF) { + return false; + } + // never used + if (c >= 0xFDD0 && c <= 0xFDEF) { + return false; + } + if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { + return false; + } + // control codes + if (c >= 0x00 && c <= 0x08) { + return false; + } + if (c === 0x0B) { + return false; + } + if (c >= 0x0E && c <= 0x1F) { + return false; + } + if (c >= 0x7F && c <= 0x9F) { + return false; + } + // out of range + if (c > 0x10FFFF) { + return false; + } + return true; +} +function fromCodePoint(c) { + /* eslint no-bitwise:0 */ + if (c > 0xffff) { + c -= 0x10000; + const surrogate1 = 0xd800 + (c >> 10); + const surrogate2 = 0xdc00 + (c & 0x3ff); + return String.fromCharCode(surrogate1, surrogate2); + } + return String.fromCharCode(c); +} +const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g; +const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; +const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi'); +const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i; +function replaceEntityPattern(match, name) { + if (name.charCodeAt(0) === 0x23 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { + const code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); + if (isValidEntityCode(code)) { + return fromCodePoint(code); + } + return match; + } + const decoded = entities.decodeHTML(match); + if (decoded !== match) { + return decoded; + } + return match; +} + +/* function replaceEntities(str) { + if (str.indexOf('&') < 0) { return str; } + + return str.replace(ENTITY_RE, replaceEntityPattern); +} */ + +function unescapeMd(str) { + if (str.indexOf('\\') < 0) { + return str; + } + return str.replace(UNESCAPE_MD_RE, '$1'); +} +function unescapeAll(str) { + if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { + return str; + } + return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) { + if (escaped) { + return escaped; + } + return replaceEntityPattern(match, entity); + }); +} +const HTML_ESCAPE_TEST_RE = /[&<>"]/; +const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g; +const HTML_REPLACEMENTS = { + '&': '&', + '<': '<', + '>': '>', + '"': '"' +}; +function replaceUnsafeChar(ch) { + return HTML_REPLACEMENTS[ch]; +} +function escapeHtml(str) { + if (HTML_ESCAPE_TEST_RE.test(str)) { + return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); + } + return str; +} +const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; +function escapeRE(str) { + return str.replace(REGEXP_ESCAPE_RE, '\\$&'); +} +function isSpace(code) { + switch (code) { + case 0x09: + case 0x20: + return true; + } + return false; +} + +// Zs (unicode class) || [\t\f\v\r\n] +function isWhiteSpace(code) { + if (code >= 0x2000 && code <= 0x200A) { + return true; + } + switch (code) { + case 0x09: // \t + case 0x0A: // \n + case 0x0B: // \v + case 0x0C: // \f + case 0x0D: // \r + case 0x20: + case 0xA0: + case 0x1680: + case 0x202F: + case 0x205F: + case 0x3000: + return true; + } + return false; +} + +/* eslint-disable max-len */ + +// Currently without astral characters support. +function isPunctChar(ch) { + return ucmicro__namespace.P.test(ch) || ucmicro__namespace.S.test(ch); +} + +// Markdown ASCII punctuation characters. +// +// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ +// http://spec.commonmark.org/0.15/#ascii-punctuation-character +// +// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. +// +function isMdAsciiPunct(ch) { + switch (ch) { + case 0x21 /* ! */: + case 0x22 /* " */: + case 0x23 /* # */: + case 0x24 /* $ */: + case 0x25 /* % */: + case 0x26 /* & */: + case 0x27 /* ' */: + case 0x28 /* ( */: + case 0x29 /* ) */: + case 0x2A /* * */: + case 0x2B /* + */: + case 0x2C /* , */: + case 0x2D /* - */: + case 0x2E /* . */: + case 0x2F /* / */: + case 0x3A /* : */: + case 0x3B /* ; */: + case 0x3C /* < */: + case 0x3D /* = */: + case 0x3E /* > */: + case 0x3F /* ? */: + case 0x40 /* @ */: + case 0x5B /* [ */: + case 0x5C /* \ */: + case 0x5D /* ] */: + case 0x5E /* ^ */: + case 0x5F /* _ */: + case 0x60 /* ` */: + case 0x7B /* { */: + case 0x7C /* | */: + case 0x7D /* } */: + case 0x7E /* ~ */: + return true; + default: + return false; + } +} + +// Hepler to unify [reference labels]. +// +function normalizeReference(str) { + // Trim and collapse whitespace + // + str = str.trim().replace(/\s+/g, ' '); + + // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug + // fixed in v12 (couldn't find any details). + // + // So treat this one as a special case + // (remove this when node v10 is no longer supported). + // + if ('ẞ'.toLowerCase() === 'Ṿ') { + str = str.replace(/ẞ/g, 'ß'); + } + + // .toLowerCase().toUpperCase() should get rid of all differences + // between letter variants. + // + // Simple .toLowerCase() doesn't normalize 125 code points correctly, + // and .toUpperCase doesn't normalize 6 of them (list of exceptions: + // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently + // uppercased versions). + // + // Here's an example showing how it happens. Lets take greek letter omega: + // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ) + // + // Unicode entries: + // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8; + // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 + // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 + // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8; + // + // Case-insensitive comparison should treat all of them as equivalent. + // + // But .toLowerCase() doesn't change ϑ (it's already lowercase), + // and .toUpperCase() doesn't change ϴ (already uppercase). + // + // Applying first lower then upper case normalizes any character: + // '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398' + // + // Note: this is equivalent to unicode case folding; unicode normalization + // is a different step that is not required here. + // + // Final result should be uppercased, because it's later stored in an object + // (this avoid a conflict with Object.prototype members, + // most notably, `__proto__`) + // + return str.toLowerCase().toUpperCase(); +} + +// Re-export libraries commonly used in both markdown-it and its plugins, +// so plugins won't have to depend on them explicitly, which reduces their +// bundled size (e.g. a browser build). +// +const lib = { + mdurl: mdurl__namespace, + ucmicro: ucmicro__namespace +}; +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + arrayReplaceAt: arrayReplaceAt, + assign: assign, + escapeHtml: escapeHtml, + escapeRE: escapeRE, + fromCodePoint: fromCodePoint, + has: has, + isMdAsciiPunct: isMdAsciiPunct, + isPunctChar: isPunctChar, + isSpace: isSpace, + isString: isString, + isValidEntityCode: isValidEntityCode, + isWhiteSpace: isWhiteSpace, + lib: lib, + normalizeReference: normalizeReference, + unescapeAll: unescapeAll, + unescapeMd: unescapeMd +}); + +// Parse link label +// +// this function assumes that first character ("[") already matches; +// returns the end of the label +// + +function parseLinkLabel(state, start, disableNested) { + let level, found, marker, prevPos; + const max = state.posMax; + const oldPos = state.pos; + state.pos = start + 1; + level = 1; + while (state.pos < max) { + marker = state.src.charCodeAt(state.pos); + if (marker === 0x5D /* ] */) { + level--; + if (level === 0) { + found = true; + break; + } + } + prevPos = state.pos; + state.md.inline.skipToken(state); + if (marker === 0x5B /* [ */) { + if (prevPos === state.pos - 1) { + // increase level if we find text `[`, which is not a part of any token + level++; + } else if (disableNested) { + state.pos = oldPos; + return -1; + } + } + } + let labelEnd = -1; + if (found) { + labelEnd = state.pos; + } + + // restore old state + state.pos = oldPos; + return labelEnd; +} + +// Parse link destination +// + +function parseLinkDestination(str, start, max) { + let code; + let pos = start; + const result = { + ok: false, + pos: 0, + str: '' + }; + if (str.charCodeAt(pos) === 0x3C /* < */) { + pos++; + while (pos < max) { + code = str.charCodeAt(pos); + if (code === 0x0A /* \n */) { + return result; + } + if (code === 0x3C /* < */) { + return result; + } + if (code === 0x3E /* > */) { + result.pos = pos + 1; + result.str = unescapeAll(str.slice(start + 1, pos)); + result.ok = true; + return result; + } + if (code === 0x5C /* \ */ && pos + 1 < max) { + pos += 2; + continue; + } + pos++; + } + + // no closing '>' + return result; + } + + // this should be ... } else { ... branch + + let level = 0; + while (pos < max) { + code = str.charCodeAt(pos); + if (code === 0x20) { + break; + } + + // ascii control characters + if (code < 0x20 || code === 0x7F) { + break; + } + if (code === 0x5C /* \ */ && pos + 1 < max) { + if (str.charCodeAt(pos + 1) === 0x20) { + break; + } + pos += 2; + continue; + } + if (code === 0x28 /* ( */) { + level++; + if (level > 32) { + return result; + } + } + if (code === 0x29 /* ) */) { + if (level === 0) { + break; + } + level--; + } + pos++; + } + if (start === pos) { + return result; + } + if (level !== 0) { + return result; + } + result.str = unescapeAll(str.slice(start, pos)); + result.pos = pos; + result.ok = true; + return result; +} + +// Parse link title +// + +// Parse link title within `str` in [start, max] range, +// or continue previous parsing if `prev_state` is defined (equal to result of last execution). +// +function parseLinkTitle(str, start, max, prev_state) { + let code; + let pos = start; + const state = { + // if `true`, this is a valid link title + ok: false, + // if `true`, this link can be continued on the next line + can_continue: false, + // if `ok`, it's the position of the first character after the closing marker + pos: 0, + // if `ok`, it's the unescaped title + str: '', + // expected closing marker character code + marker: 0 + }; + if (prev_state) { + // this is a continuation of a previous parseLinkTitle call on the next line, + // used in reference links only + state.str = prev_state.str; + state.marker = prev_state.marker; + } else { + if (pos >= max) { + return state; + } + let marker = str.charCodeAt(pos); + if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { + return state; + } + start++; + pos++; + + // if opening marker is "(", switch it to closing marker ")" + if (marker === 0x28) { + marker = 0x29; + } + state.marker = marker; + } + while (pos < max) { + code = str.charCodeAt(pos); + if (code === state.marker) { + state.pos = pos + 1; + state.str += unescapeAll(str.slice(start, pos)); + state.ok = true; + return state; + } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */) { + return state; + } else if (code === 0x5C /* \ */ && pos + 1 < max) { + pos++; + } + pos++; + } + + // no closing marker found, but this link title may continue on the next line (for references) + state.can_continue = true; + state.str += unescapeAll(str.slice(start, pos)); + return state; +} + +// Just a shortcut for bulk export + +var helpers = /*#__PURE__*/Object.freeze({ + __proto__: null, + parseLinkDestination: parseLinkDestination, + parseLinkLabel: parseLinkLabel, + parseLinkTitle: parseLinkTitle +}); + +/** + * class Renderer + * + * Generates HTML from parsed token stream. Each instance has independent + * copy of rules. Those can be rewritten with ease. Also, you can add new + * rules if you create plugin and adds new token types. + **/ + +const default_rules = {}; +default_rules.code_inline = function (tokens, idx, options, env, slf) { + const token = tokens[idx]; + return '' + escapeHtml(token.content) + ''; +}; +default_rules.code_block = function (tokens, idx, options, env, slf) { + const token = tokens[idx]; + return '' + escapeHtml(tokens[idx].content) + '\n'; +}; +default_rules.fence = function (tokens, idx, options, env, slf) { + const token = tokens[idx]; + const info = token.info ? unescapeAll(token.info).trim() : ''; + let langName = ''; + let langAttrs = ''; + if (info) { + const arr = info.split(/(\s+)/g); + langName = arr[0]; + langAttrs = arr.slice(2).join(''); + } + let highlighted; + if (options.highlight) { + highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content); + } else { + highlighted = escapeHtml(token.content); + } + if (highlighted.indexOf('${highlighted}\n`; + } + return `
${highlighted}
\n`; +}; +default_rules.image = function (tokens, idx, options, env, slf) { + const token = tokens[idx]; + + // "alt" attr MUST be set, even if empty. Because it's mandatory and + // should be placed on proper position for tests. + // + // Replace content with actual value + + token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env); + return slf.renderToken(tokens, idx, options); +}; +default_rules.hardbreak = function (tokens, idx, options /*, env */) { + return options.xhtmlOut ? '
\n' : '
\n'; +}; +default_rules.softbreak = function (tokens, idx, options /*, env */) { + return options.breaks ? options.xhtmlOut ? '
\n' : '
\n' : '\n'; +}; +default_rules.text = function (tokens, idx /*, options, env */) { + return escapeHtml(tokens[idx].content); +}; +default_rules.html_block = function (tokens, idx /*, options, env */) { + return tokens[idx].content; +}; +default_rules.html_inline = function (tokens, idx /*, options, env */) { + return tokens[idx].content; +}; + +/** + * new Renderer() + * + * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults. + **/ +function Renderer() { + /** + * Renderer#rules -> Object + * + * Contains render rules for tokens. Can be updated and extended. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')(); + * + * md.renderer.rules.strong_open = function () { return ''; }; + * md.renderer.rules.strong_close = function () { return ''; }; + * + * var result = md.renderInline(...); + * ``` + * + * Each rule is called as independent static function with fixed signature: + * + * ```javascript + * function my_token_render(tokens, idx, options, env, renderer) { + * // ... + * return renderedHTML; + * } + * ``` + * + * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs) + * for more details and examples. + **/ + this.rules = assign({}, default_rules); +} + +/** + * Renderer.renderAttrs(token) -> String + * + * Render token attributes to string. + **/ +Renderer.prototype.renderAttrs = function renderAttrs(token) { + let i, l, result; + if (!token.attrs) { + return ''; + } + result = ''; + for (i = 0, l = token.attrs.length; i < l; i++) { + result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"'; + } + return result; +}; + +/** + * Renderer.renderToken(tokens, idx, options) -> String + * - tokens (Array): list of tokens + * - idx (Numbed): token index to render + * - options (Object): params of parser instance + * + * Default token renderer. Can be overriden by custom function + * in [[Renderer#rules]]. + **/ +Renderer.prototype.renderToken = function renderToken(tokens, idx, options) { + const token = tokens[idx]; + let result = ''; + + // Tight list paragraphs + if (token.hidden) { + return ''; + } + + // Insert a newline between hidden paragraph and subsequent opening + // block-level tag. + // + // For example, here we should insert a newline before blockquote: + // - a + // > + // + if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) { + result += '\n'; + } + + // Add token name, e.g. ``. + // + needLf = false; + } + } + } + } + result += needLf ? '>\n' : '>'; + return result; +}; + +/** + * Renderer.renderInline(tokens, options, env) -> String + * - tokens (Array): list on block tokens to render + * - options (Object): params of parser instance + * - env (Object): additional data from parsed input (references, for example) + * + * The same as [[Renderer.render]], but for single token of `inline` type. + **/ +Renderer.prototype.renderInline = function (tokens, options, env) { + let result = ''; + const rules = this.rules; + for (let i = 0, len = tokens.length; i < len; i++) { + const type = tokens[i].type; + if (typeof rules[type] !== 'undefined') { + result += rules[type](tokens, i, options, env, this); + } else { + result += this.renderToken(tokens, i, options); + } + } + return result; +}; + +/** internal + * Renderer.renderInlineAsText(tokens, options, env) -> String + * - tokens (Array): list on block tokens to render + * - options (Object): params of parser instance + * - env (Object): additional data from parsed input (references, for example) + * + * Special kludge for image `alt` attributes to conform CommonMark spec. + * Don't try to use it! Spec requires to show `alt` content with stripped markup, + * instead of simple escaping. + **/ +Renderer.prototype.renderInlineAsText = function (tokens, options, env) { + let result = ''; + for (let i = 0, len = tokens.length; i < len; i++) { + switch (tokens[i].type) { + case 'text': + result += tokens[i].content; + break; + case 'image': + result += this.renderInlineAsText(tokens[i].children, options, env); + break; + case 'html_inline': + case 'html_block': + result += tokens[i].content; + break; + case 'softbreak': + case 'hardbreak': + result += '\n'; + break; + // all other tokens are skipped + } + } + return result; +}; + +/** + * Renderer.render(tokens, options, env) -> String + * - tokens (Array): list on block tokens to render + * - options (Object): params of parser instance + * - env (Object): additional data from parsed input (references, for example) + * + * Takes token stream and generates HTML. Probably, you will never need to call + * this method directly. + **/ +Renderer.prototype.render = function (tokens, options, env) { + let result = ''; + const rules = this.rules; + for (let i = 0, len = tokens.length; i < len; i++) { + const type = tokens[i].type; + if (type === 'inline') { + result += this.renderInline(tokens[i].children, options, env); + } else if (typeof rules[type] !== 'undefined') { + result += rules[type](tokens, i, options, env, this); + } else { + result += this.renderToken(tokens, i, options, env); + } + } + return result; +}; + +/** + * class Ruler + * + * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and + * [[MarkdownIt#inline]] to manage sequences of functions (rules): + * + * - keep rules in defined order + * - assign the name to each rule + * - enable/disable rules + * - add/replace rules + * - allow assign rules to additional named chains (in the same) + * - cacheing lists of active rules + * + * You will not need use this class directly until write plugins. For simple + * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and + * [[MarkdownIt.use]]. + **/ + +/** + * new Ruler() + **/ +function Ruler() { + // List of added rules. Each element is: + // + // { + // name: XXX, + // enabled: Boolean, + // fn: Function(), + // alt: [ name2, name3 ] + // } + // + this.__rules__ = []; + + // Cached rule chains. + // + // First level - chain name, '' for default. + // Second level - diginal anchor for fast filtering by charcodes. + // + this.__cache__ = null; +} + +// Helper methods, should not be used directly + +// Find rule index by name +// +Ruler.prototype.__find__ = function (name) { + for (let i = 0; i < this.__rules__.length; i++) { + if (this.__rules__[i].name === name) { + return i; + } + } + return -1; +}; + +// Build rules lookup cache +// +Ruler.prototype.__compile__ = function () { + const self = this; + const chains = ['']; + + // collect unique names + self.__rules__.forEach(function (rule) { + if (!rule.enabled) { + return; + } + rule.alt.forEach(function (altName) { + if (chains.indexOf(altName) < 0) { + chains.push(altName); + } + }); + }); + self.__cache__ = {}; + chains.forEach(function (chain) { + self.__cache__[chain] = []; + self.__rules__.forEach(function (rule) { + if (!rule.enabled) { + return; + } + if (chain && rule.alt.indexOf(chain) < 0) { + return; + } + self.__cache__[chain].push(rule.fn); + }); + }); +}; + +/** + * Ruler.at(name, fn [, options]) + * - name (String): rule name to replace. + * - fn (Function): new rule function. + * - options (Object): new rule options (not mandatory). + * + * Replace rule by name with new function & options. Throws error if name not + * found. + * + * ##### Options: + * + * - __alt__ - array with names of "alternate" chains. + * + * ##### Example + * + * Replace existing typographer replacement rule with new one: + * + * ```javascript + * var md = require('markdown-it')(); + * + * md.core.ruler.at('replacements', function replace(state) { + * //... + * }); + * ``` + **/ +Ruler.prototype.at = function (name, fn, options) { + const index = this.__find__(name); + const opt = options || {}; + if (index === -1) { + throw new Error('Parser rule not found: ' + name); + } + this.__rules__[index].fn = fn; + this.__rules__[index].alt = opt.alt || []; + this.__cache__ = null; +}; + +/** + * Ruler.before(beforeName, ruleName, fn [, options]) + * - beforeName (String): new rule will be added before this one. + * - ruleName (String): name of added rule. + * - fn (Function): rule function. + * - options (Object): rule options (not mandatory). + * + * Add new rule to chain before one with given name. See also + * [[Ruler.after]], [[Ruler.push]]. + * + * ##### Options: + * + * - __alt__ - array with names of "alternate" chains. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')(); + * + * md.block.ruler.before('paragraph', 'my_rule', function replace(state) { + * //... + * }); + * ``` + **/ +Ruler.prototype.before = function (beforeName, ruleName, fn, options) { + const index = this.__find__(beforeName); + const opt = options || {}; + if (index === -1) { + throw new Error('Parser rule not found: ' + beforeName); + } + this.__rules__.splice(index, 0, { + name: ruleName, + enabled: true, + fn, + alt: opt.alt || [] + }); + this.__cache__ = null; +}; + +/** + * Ruler.after(afterName, ruleName, fn [, options]) + * - afterName (String): new rule will be added after this one. + * - ruleName (String): name of added rule. + * - fn (Function): rule function. + * - options (Object): rule options (not mandatory). + * + * Add new rule to chain after one with given name. See also + * [[Ruler.before]], [[Ruler.push]]. + * + * ##### Options: + * + * - __alt__ - array with names of "alternate" chains. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')(); + * + * md.inline.ruler.after('text', 'my_rule', function replace(state) { + * //... + * }); + * ``` + **/ +Ruler.prototype.after = function (afterName, ruleName, fn, options) { + const index = this.__find__(afterName); + const opt = options || {}; + if (index === -1) { + throw new Error('Parser rule not found: ' + afterName); + } + this.__rules__.splice(index + 1, 0, { + name: ruleName, + enabled: true, + fn, + alt: opt.alt || [] + }); + this.__cache__ = null; +}; + +/** + * Ruler.push(ruleName, fn [, options]) + * - ruleName (String): name of added rule. + * - fn (Function): rule function. + * - options (Object): rule options (not mandatory). + * + * Push new rule to the end of chain. See also + * [[Ruler.before]], [[Ruler.after]]. + * + * ##### Options: + * + * - __alt__ - array with names of "alternate" chains. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')(); + * + * md.core.ruler.push('my_rule', function replace(state) { + * //... + * }); + * ``` + **/ +Ruler.prototype.push = function (ruleName, fn, options) { + const opt = options || {}; + this.__rules__.push({ + name: ruleName, + enabled: true, + fn, + alt: opt.alt || [] + }); + this.__cache__ = null; +}; + +/** + * Ruler.enable(list [, ignoreInvalid]) -> Array + * - list (String|Array): list of rule names to enable. + * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. + * + * Enable rules with given names. If any rule name not found - throw Error. + * Errors can be disabled by second param. + * + * Returns list of found rule names (if no exception happened). + * + * See also [[Ruler.disable]], [[Ruler.enableOnly]]. + **/ +Ruler.prototype.enable = function (list, ignoreInvalid) { + if (!Array.isArray(list)) { + list = [list]; + } + const result = []; + + // Search by name and enable + list.forEach(function (name) { + const idx = this.__find__(name); + if (idx < 0) { + if (ignoreInvalid) { + return; + } + throw new Error('Rules manager: invalid rule name ' + name); + } + this.__rules__[idx].enabled = true; + result.push(name); + }, this); + this.__cache__ = null; + return result; +}; + +/** + * Ruler.enableOnly(list [, ignoreInvalid]) + * - list (String|Array): list of rule names to enable (whitelist). + * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. + * + * Enable rules with given names, and disable everything else. If any rule name + * not found - throw Error. Errors can be disabled by second param. + * + * See also [[Ruler.disable]], [[Ruler.enable]]. + **/ +Ruler.prototype.enableOnly = function (list, ignoreInvalid) { + if (!Array.isArray(list)) { + list = [list]; + } + this.__rules__.forEach(function (rule) { + rule.enabled = false; + }); + this.enable(list, ignoreInvalid); +}; + +/** + * Ruler.disable(list [, ignoreInvalid]) -> Array + * - list (String|Array): list of rule names to disable. + * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. + * + * Disable rules with given names. If any rule name not found - throw Error. + * Errors can be disabled by second param. + * + * Returns list of found rule names (if no exception happened). + * + * See also [[Ruler.enable]], [[Ruler.enableOnly]]. + **/ +Ruler.prototype.disable = function (list, ignoreInvalid) { + if (!Array.isArray(list)) { + list = [list]; + } + const result = []; + + // Search by name and disable + list.forEach(function (name) { + const idx = this.__find__(name); + if (idx < 0) { + if (ignoreInvalid) { + return; + } + throw new Error('Rules manager: invalid rule name ' + name); + } + this.__rules__[idx].enabled = false; + result.push(name); + }, this); + this.__cache__ = null; + return result; +}; + +/** + * Ruler.getRules(chainName) -> Array + * + * Return array of active functions (rules) for given chain name. It analyzes + * rules configuration, compiles caches if not exists and returns result. + * + * Default chain name is `''` (empty string). It can't be skipped. That's + * done intentionally, to keep signature monomorphic for high speed. + **/ +Ruler.prototype.getRules = function (chainName) { + if (this.__cache__ === null) { + this.__compile__(); + } + + // Chain can be empty, if rules disabled. But we still have to return Array. + return this.__cache__[chainName] || []; +}; + +// Token class + +/** + * class Token + **/ + +/** + * new Token(type, tag, nesting) + * + * Create new token and fill passed properties. + **/ +function Token(type, tag, nesting) { + /** + * Token#type -> String + * + * Type of the token (string, e.g. "paragraph_open") + **/ + this.type = type; + + /** + * Token#tag -> String + * + * html tag name, e.g. "p" + **/ + this.tag = tag; + + /** + * Token#attrs -> Array + * + * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]` + **/ + this.attrs = null; + + /** + * Token#map -> Array + * + * Source map info. Format: `[ line_begin, line_end ]` + **/ + this.map = null; + + /** + * Token#nesting -> Number + * + * Level change (number in {-1, 0, 1} set), where: + * + * - `1` means the tag is opening + * - `0` means the tag is self-closing + * - `-1` means the tag is closing + **/ + this.nesting = nesting; + + /** + * Token#level -> Number + * + * nesting level, the same as `state.level` + **/ + this.level = 0; + + /** + * Token#children -> Array + * + * An array of child nodes (inline and img tokens) + **/ + this.children = null; + + /** + * Token#content -> String + * + * In a case of self-closing tag (code, html, fence, etc.), + * it has contents of this tag. + **/ + this.content = ''; + + /** + * Token#markup -> String + * + * '*' or '_' for emphasis, fence string for fence, etc. + **/ + this.markup = ''; + + /** + * Token#info -> String + * + * Additional information: + * + * - Info string for "fence" tokens + * - The value "auto" for autolink "link_open" and "link_close" tokens + * - The string value of the item marker for ordered-list "list_item_open" tokens + **/ + this.info = ''; + + /** + * Token#meta -> Object + * + * A place for plugins to store an arbitrary data + **/ + this.meta = null; + + /** + * Token#block -> Boolean + * + * True for block-level tokens, false for inline tokens. + * Used in renderer to calculate line breaks + **/ + this.block = false; + + /** + * Token#hidden -> Boolean + * + * If it's true, ignore this element when rendering. Used for tight lists + * to hide paragraphs. + **/ + this.hidden = false; +} + +/** + * Token.attrIndex(name) -> Number + * + * Search attribute index by name. + **/ +Token.prototype.attrIndex = function attrIndex(name) { + if (!this.attrs) { + return -1; + } + const attrs = this.attrs; + for (let i = 0, len = attrs.length; i < len; i++) { + if (attrs[i][0] === name) { + return i; + } + } + return -1; +}; + +/** + * Token.attrPush(attrData) + * + * Add `[ name, value ]` attribute to list. Init attrs if necessary + **/ +Token.prototype.attrPush = function attrPush(attrData) { + if (this.attrs) { + this.attrs.push(attrData); + } else { + this.attrs = [attrData]; + } +}; + +/** + * Token.attrSet(name, value) + * + * Set `name` attribute to `value`. Override old value if exists. + **/ +Token.prototype.attrSet = function attrSet(name, value) { + const idx = this.attrIndex(name); + const attrData = [name, value]; + if (idx < 0) { + this.attrPush(attrData); + } else { + this.attrs[idx] = attrData; + } +}; + +/** + * Token.attrGet(name) + * + * Get the value of attribute `name`, or null if it does not exist. + **/ +Token.prototype.attrGet = function attrGet(name) { + const idx = this.attrIndex(name); + let value = null; + if (idx >= 0) { + value = this.attrs[idx][1]; + } + return value; +}; + +/** + * Token.attrJoin(name, value) + * + * Join value to existing attribute via space. Or create new attribute if not + * exists. Useful to operate with token classes. + **/ +Token.prototype.attrJoin = function attrJoin(name, value) { + const idx = this.attrIndex(name); + if (idx < 0) { + this.attrPush([name, value]); + } else { + this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value; + } +}; + +// Core state object +// + +function StateCore(src, md, env) { + this.src = src; + this.env = env; + this.tokens = []; + this.inlineMode = false; + this.md = md; // link to parser instance +} + +// re-export Token class to use in core rules +StateCore.prototype.Token = Token; + +// Normalize input string + +// https://spec.commonmark.org/0.29/#line-ending +const NEWLINES_RE = /\r\n?|\n/g; +const NULL_RE = /\0/g; +function normalize(state) { + let str; + + // Normalize newlines + str = state.src.replace(NEWLINES_RE, '\n'); + + // Replace NULL characters + str = str.replace(NULL_RE, '\uFFFD'); + state.src = str; +} +function block(state) { + let token; + if (state.inlineMode) { + token = new state.Token('inline', '', 0); + token.content = state.src; + token.map = [0, 1]; + token.children = []; + state.tokens.push(token); + } else { + state.md.block.parse(state.src, state.md, state.env, state.tokens); + } +} +function inline(state) { + const tokens = state.tokens; + + // Parse inlines + for (let i = 0, l = tokens.length; i < l; i++) { + const tok = tokens[i]; + if (tok.type === 'inline') { + state.md.inline.parse(tok.content, state.md, state.env, tok.children); + } + } +} + +// Replace link-like texts with link nodes. +// +// Currently restricted by `md.validateLink()` to http/https/ftp +// + +function isLinkOpen$1(str) { + return /^\s]/i.test(str); +} +function isLinkClose$1(str) { + return /^<\/a\s*>/i.test(str); +} +function linkify$1(state) { + const blockTokens = state.tokens; + if (!state.md.options.linkify) { + return; + } + for (let j = 0, l = blockTokens.length; j < l; j++) { + if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) { + continue; + } + let tokens = blockTokens[j].children; + let htmlLinkLevel = 0; + + // We scan from the end, to keep position when new tags added. + // Use reversed logic in links start/end match + for (let i = tokens.length - 1; i >= 0; i--) { + const currentToken = tokens[i]; + + // Skip content of markdown links + if (currentToken.type === 'link_close') { + i--; + while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') { + i--; + } + continue; + } + + // Skip content of html tag links + if (currentToken.type === 'html_inline') { + if (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) { + htmlLinkLevel--; + } + if (isLinkClose$1(currentToken.content)) { + htmlLinkLevel++; + } + } + if (htmlLinkLevel > 0) { + continue; + } + if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) { + const text = currentToken.content; + let links = state.md.linkify.match(text); + + // Now split string to nodes + const nodes = []; + let level = currentToken.level; + let lastPos = 0; + + // forbid escape sequence at the start of the string, + // this avoids http\://example.com/ from being linkified as + // http://example.com/ + if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === 'text_special') { + links = links.slice(1); + } + for (let ln = 0; ln < links.length; ln++) { + const url = links[ln].url; + const fullUrl = state.md.normalizeLink(url); + if (!state.md.validateLink(fullUrl)) { + continue; + } + let urlText = links[ln].text; + + // Linkifier might send raw hostnames like "example.com", where url + // starts with domain name. So we prepend http:// in those cases, + // and remove it afterwards. + // + if (!links[ln].schema) { + urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, ''); + } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) { + urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, ''); + } else { + urlText = state.md.normalizeLinkText(urlText); + } + const pos = links[ln].index; + if (pos > lastPos) { + const token = new state.Token('text', '', 0); + token.content = text.slice(lastPos, pos); + token.level = level; + nodes.push(token); + } + const token_o = new state.Token('link_open', 'a', 1); + token_o.attrs = [['href', fullUrl]]; + token_o.level = level++; + token_o.markup = 'linkify'; + token_o.info = 'auto'; + nodes.push(token_o); + const token_t = new state.Token('text', '', 0); + token_t.content = urlText; + token_t.level = level; + nodes.push(token_t); + const token_c = new state.Token('link_close', 'a', -1); + token_c.level = --level; + token_c.markup = 'linkify'; + token_c.info = 'auto'; + nodes.push(token_c); + lastPos = links[ln].lastIndex; + } + if (lastPos < text.length) { + const token = new state.Token('text', '', 0); + token.content = text.slice(lastPos); + token.level = level; + nodes.push(token); + } + + // replace current node + blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes); + } + } + } +} + +// Simple typographic replacements +// +// (c) (C) → © +// (tm) (TM) → ™ +// (r) (R) → ® +// +- → ± +// ... → … (also ?.... → ?.., !.... → !..) +// ???????? → ???, !!!!! → !!!, `,,` → `,` +// -- → –, --- → — +// + +// TODO: +// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ +// - multiplications 2 x 4 -> 2 × 4 + +const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; + +// Workaround for phantomjs - need regex without /g flag, +// or root check will fail every second time +const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i; +const SCOPED_ABBR_RE = /\((c|tm|r)\)/ig; +const SCOPED_ABBR = { + c: '©', + r: '®', + tm: '™' +}; +function replaceFn(match, name) { + return SCOPED_ABBR[name.toLowerCase()]; +} +function replace_scoped(inlineTokens) { + let inside_autolink = 0; + for (let i = inlineTokens.length - 1; i >= 0; i--) { + const token = inlineTokens[i]; + if (token.type === 'text' && !inside_autolink) { + token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn); + } + if (token.type === 'link_open' && token.info === 'auto') { + inside_autolink--; + } + if (token.type === 'link_close' && token.info === 'auto') { + inside_autolink++; + } + } +} +function replace_rare(inlineTokens) { + let inside_autolink = 0; + for (let i = inlineTokens.length - 1; i >= 0; i--) { + const token = inlineTokens[i]; + if (token.type === 'text' && !inside_autolink) { + if (RARE_RE.test(token.content)) { + token.content = token.content.replace(/\+-/g, '±') + // .., ..., ....... -> … + // but ?..... & !..... -> ?.. & !.. + .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') + // em-dash + .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\u2014') + // en-dash + .replace(/(^|\s)--(?=\s|$)/mg, '$1\u2013').replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, '$1\u2013'); + } + } + if (token.type === 'link_open' && token.info === 'auto') { + inside_autolink--; + } + if (token.type === 'link_close' && token.info === 'auto') { + inside_autolink++; + } + } +} +function replace(state) { + let blkIdx; + if (!state.md.options.typographer) { + return; + } + for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { + if (state.tokens[blkIdx].type !== 'inline') { + continue; + } + if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) { + replace_scoped(state.tokens[blkIdx].children); + } + if (RARE_RE.test(state.tokens[blkIdx].content)) { + replace_rare(state.tokens[blkIdx].children); + } + } +} + +// Convert straight quotation marks to typographic ones +// + +const QUOTE_TEST_RE = /['"]/; +const QUOTE_RE = /['"]/g; +const APOSTROPHE = '\u2019'; /* ’ */ + +function replaceAt(str, index, ch) { + return str.slice(0, index) + ch + str.slice(index + 1); +} +function process_inlines(tokens, state) { + let j; + const stack = []; + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + const thisLevel = tokens[i].level; + for (j = stack.length - 1; j >= 0; j--) { + if (stack[j].level <= thisLevel) { + break; + } + } + stack.length = j + 1; + if (token.type !== 'text') { + continue; + } + let text = token.content; + let pos = 0; + let max = text.length; + + /* eslint no-labels:0,block-scoped-var:0 */ + OUTER: while (pos < max) { + QUOTE_RE.lastIndex = pos; + const t = QUOTE_RE.exec(text); + if (!t) { + break; + } + let canOpen = true; + let canClose = true; + pos = t.index + 1; + const isSingle = t[0] === "'"; + + // Find previous character, + // default to space if it's the beginning of the line + // + let lastChar = 0x20; + if (t.index - 1 >= 0) { + lastChar = text.charCodeAt(t.index - 1); + } else { + for (j = i - 1; j >= 0; j--) { + if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20 + if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline' + + lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1); + break; + } + } + + // Find next character, + // default to space if it's the end of the line + // + let nextChar = 0x20; + if (pos < max) { + nextChar = text.charCodeAt(pos); + } else { + for (j = i + 1; j < tokens.length; j++) { + if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20 + if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline' + + nextChar = tokens[j].content.charCodeAt(0); + break; + } + } + const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); + const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); + const isLastWhiteSpace = isWhiteSpace(lastChar); + const isNextWhiteSpace = isWhiteSpace(nextChar); + if (isNextWhiteSpace) { + canOpen = false; + } else if (isNextPunctChar) { + if (!(isLastWhiteSpace || isLastPunctChar)) { + canOpen = false; + } + } + if (isLastWhiteSpace) { + canClose = false; + } else if (isLastPunctChar) { + if (!(isNextWhiteSpace || isNextPunctChar)) { + canClose = false; + } + } + if (nextChar === 0x22 /* " */ && t[0] === '"') { + if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) { + // special case: 1"" - count first quote as an inch + canClose = canOpen = false; + } + } + if (canOpen && canClose) { + // Replace quotes in the middle of punctuation sequence, but not + // in the middle of the words, i.e.: + // + // 1. foo " bar " baz - not replaced + // 2. foo-"-bar-"-baz - replaced + // 3. foo"bar"baz - not replaced + // + canOpen = isLastPunctChar; + canClose = isNextPunctChar; + } + if (!canOpen && !canClose) { + // middle of word + if (isSingle) { + token.content = replaceAt(token.content, t.index, APOSTROPHE); + } + continue; + } + if (canClose) { + // this could be a closing quote, rewind the stack to get a match + for (j = stack.length - 1; j >= 0; j--) { + let item = stack[j]; + if (stack[j].level < thisLevel) { + break; + } + if (item.single === isSingle && stack[j].level === thisLevel) { + item = stack[j]; + let openQuote; + let closeQuote; + if (isSingle) { + openQuote = state.md.options.quotes[2]; + closeQuote = state.md.options.quotes[3]; + } else { + openQuote = state.md.options.quotes[0]; + closeQuote = state.md.options.quotes[1]; + } + + // replace token.content *before* tokens[item.token].content, + // because, if they are pointing at the same token, replaceAt + // could mess up indices when quote length != 1 + token.content = replaceAt(token.content, t.index, closeQuote); + tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote); + pos += closeQuote.length - 1; + if (item.token === i) { + pos += openQuote.length - 1; + } + text = token.content; + max = text.length; + stack.length = j; + continue OUTER; + } + } + } + if (canOpen) { + stack.push({ + token: i, + pos: t.index, + single: isSingle, + level: thisLevel + }); + } else if (canClose && isSingle) { + token.content = replaceAt(token.content, t.index, APOSTROPHE); + } + } + } +} +function smartquotes(state) { + /* eslint max-depth:0 */ + if (!state.md.options.typographer) { + return; + } + for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { + if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) { + continue; + } + process_inlines(state.tokens[blkIdx].children, state); + } +} + +// Join raw text tokens with the rest of the text +// +// This is set as a separate rule to provide an opportunity for plugins +// to run text replacements after text join, but before escape join. +// +// For example, `\:)` shouldn't be replaced with an emoji. +// + +function text_join(state) { + let curr, last; + const blockTokens = state.tokens; + const l = blockTokens.length; + for (let j = 0; j < l; j++) { + if (blockTokens[j].type !== 'inline') continue; + const tokens = blockTokens[j].children; + const max = tokens.length; + for (curr = 0; curr < max; curr++) { + if (tokens[curr].type === 'text_special') { + tokens[curr].type = 'text'; + } + } + for (curr = last = 0; curr < max; curr++) { + if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') { + // collapse two adjacent text nodes + tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; + } else { + if (curr !== last) { + tokens[last] = tokens[curr]; + } + last++; + } + } + if (curr !== last) { + tokens.length = last; + } + } +} + +/** internal + * class Core + * + * Top-level rules executor. Glues block/inline parsers and does intermediate + * transformations. + **/ + +const _rules$2 = [['normalize', normalize], ['block', block], ['inline', inline], ['linkify', linkify$1], ['replacements', replace], ['smartquotes', smartquotes], +// `text_join` finds `text_special` tokens (for escape sequences) +// and joins them with the rest of the text +['text_join', text_join]]; + +/** + * new Core() + **/ +function Core() { + /** + * Core#ruler -> Ruler + * + * [[Ruler]] instance. Keep configuration of core rules. + **/ + this.ruler = new Ruler(); + for (let i = 0; i < _rules$2.length; i++) { + this.ruler.push(_rules$2[i][0], _rules$2[i][1]); + } +} + +/** + * Core.process(state) + * + * Executes core chain rules. + **/ +Core.prototype.process = function (state) { + const rules = this.ruler.getRules(''); + for (let i = 0, l = rules.length; i < l; i++) { + rules[i](state); + } +}; +Core.prototype.State = StateCore; + +// Parser state class + +function StateBlock(src, md, env, tokens) { + this.src = src; + + // link to parser instance + this.md = md; + this.env = env; + + // + // Internal state vartiables + // + + this.tokens = tokens; + this.bMarks = []; // line begin offsets for fast jumps + this.eMarks = []; // line end offsets for fast jumps + this.tShift = []; // offsets of the first non-space characters (tabs not expanded) + this.sCount = []; // indents for each line (tabs expanded) + + // An amount of virtual spaces (tabs expanded) between beginning + // of each line (bMarks) and real beginning of that line. + // + // It exists only as a hack because blockquotes override bMarks + // losing information in the process. + // + // It's used only when expanding tabs, you can think about it as + // an initial tab length, e.g. bsCount=21 applied to string `\t123` + // means first tab should be expanded to 4-21%4 === 3 spaces. + // + this.bsCount = []; + + // block parser variables + + // required block content indent (for example, if we are + // inside a list, it would be positioned after list marker) + this.blkIndent = 0; + this.line = 0; // line index in src + this.lineMax = 0; // lines count + this.tight = false; // loose/tight mode for lists + this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any) + this.listIndent = -1; // indent of the current list block (-1 if there isn't any) + + // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference' + // used in lists to determine if they interrupt a paragraph + this.parentType = 'root'; + this.level = 0; + + // Create caches + // Generate markers. + const s = this.src; + for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) { + const ch = s.charCodeAt(pos); + if (!indent_found) { + if (isSpace(ch)) { + indent++; + if (ch === 0x09) { + offset += 4 - offset % 4; + } else { + offset++; + } + continue; + } else { + indent_found = true; + } + } + if (ch === 0x0A || pos === len - 1) { + if (ch !== 0x0A) { + pos++; + } + this.bMarks.push(start); + this.eMarks.push(pos); + this.tShift.push(indent); + this.sCount.push(offset); + this.bsCount.push(0); + indent_found = false; + indent = 0; + offset = 0; + start = pos + 1; + } + } + + // Push fake entry to simplify cache bounds checks + this.bMarks.push(s.length); + this.eMarks.push(s.length); + this.tShift.push(0); + this.sCount.push(0); + this.bsCount.push(0); + this.lineMax = this.bMarks.length - 1; // don't count last fake line +} + +// Push new token to "stream". +// +StateBlock.prototype.push = function (type, tag, nesting) { + const token = new Token(type, tag, nesting); + token.block = true; + if (nesting < 0) this.level--; // closing tag + token.level = this.level; + if (nesting > 0) this.level++; // opening tag + + this.tokens.push(token); + return token; +}; +StateBlock.prototype.isEmpty = function isEmpty(line) { + return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]; +}; +StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) { + for (let max = this.lineMax; from < max; from++) { + if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) { + break; + } + } + return from; +}; + +// Skip spaces from given position. +StateBlock.prototype.skipSpaces = function skipSpaces(pos) { + for (let max = this.src.length; pos < max; pos++) { + const ch = this.src.charCodeAt(pos); + if (!isSpace(ch)) { + break; + } + } + return pos; +}; + +// Skip spaces from given position in reverse. +StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) { + if (pos <= min) { + return pos; + } + while (pos > min) { + if (!isSpace(this.src.charCodeAt(--pos))) { + return pos + 1; + } + } + return pos; +}; + +// Skip char codes from given position +StateBlock.prototype.skipChars = function skipChars(pos, code) { + for (let max = this.src.length; pos < max; pos++) { + if (this.src.charCodeAt(pos) !== code) { + break; + } + } + return pos; +}; + +// Skip char codes reverse from given position - 1 +StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) { + if (pos <= min) { + return pos; + } + while (pos > min) { + if (code !== this.src.charCodeAt(--pos)) { + return pos + 1; + } + } + return pos; +}; + +// cut lines range from source. +StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) { + if (begin >= end) { + return ''; + } + const queue = new Array(end - begin); + for (let i = 0, line = begin; line < end; line++, i++) { + let lineIndent = 0; + const lineStart = this.bMarks[line]; + let first = lineStart; + let last; + if (line + 1 < end || keepLastLF) { + // No need for bounds check because we have fake entry on tail. + last = this.eMarks[line] + 1; + } else { + last = this.eMarks[line]; + } + while (first < last && lineIndent < indent) { + const ch = this.src.charCodeAt(first); + if (isSpace(ch)) { + if (ch === 0x09) { + lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4; + } else { + lineIndent++; + } + } else if (first - lineStart < this.tShift[line]) { + // patched tShift masked characters to look like spaces (blockquotes, list markers) + lineIndent++; + } else { + break; + } + first++; + } + if (lineIndent > indent) { + // partially expanding tabs in code blocks, e.g '\t\tfoobar' + // with indent=2 becomes ' \tfoobar' + queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last); + } else { + queue[i] = this.src.slice(first, last); + } + } + return queue.join(''); +}; + +// re-export Token class to use in block rules +StateBlock.prototype.Token = Token; + +// GFM table, https://github.github.com/gfm/#tables-extension- + +// Limit the amount of empty autocompleted cells in a table, +// see https://github.com/markdown-it/markdown-it/issues/1000, +// +// Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k. +// We set it to 65k, which can expand user input by a factor of x370 +// (256x256 square is 1.8kB expanded into 650kB). +const MAX_AUTOCOMPLETED_CELLS = 0x10000; +function getLine(state, line) { + const pos = state.bMarks[line] + state.tShift[line]; + const max = state.eMarks[line]; + return state.src.slice(pos, max); +} +function escapedSplit(str) { + const result = []; + const max = str.length; + let pos = 0; + let ch = str.charCodeAt(pos); + let isEscaped = false; + let lastPos = 0; + let current = ''; + while (pos < max) { + if (ch === 0x7c /* | */) { + if (!isEscaped) { + // pipe separating cells, '|' + result.push(current + str.substring(lastPos, pos)); + current = ''; + lastPos = pos + 1; + } else { + // escaped pipe, '\|' + current += str.substring(lastPos, pos - 1); + lastPos = pos; + } + } + isEscaped = ch === 0x5c /* \ */; + pos++; + ch = str.charCodeAt(pos); + } + result.push(current + str.substring(lastPos)); + return result; +} +function table(state, startLine, endLine, silent) { + // should have at least two lines + if (startLine + 2 > endLine) { + return false; + } + let nextLine = startLine + 1; + if (state.sCount[nextLine] < state.blkIndent) { + return false; + } + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[nextLine] - state.blkIndent >= 4) { + return false; + } + + // first character of the second line should be '|', '-', ':', + // and no other characters are allowed but spaces; + // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp + + let pos = state.bMarks[nextLine] + state.tShift[nextLine]; + if (pos >= state.eMarks[nextLine]) { + return false; + } + const firstCh = state.src.charCodeAt(pos++); + if (firstCh !== 0x7C /* | */ && firstCh !== 0x2D /* - */ && firstCh !== 0x3A /* : */) { + return false; + } + if (pos >= state.eMarks[nextLine]) { + return false; + } + const secondCh = state.src.charCodeAt(pos++); + if (secondCh !== 0x7C /* | */ && secondCh !== 0x2D /* - */ && secondCh !== 0x3A /* : */ && !isSpace(secondCh)) { + return false; + } + + // if first character is '-', then second character must not be a space + // (due to parsing ambiguity with list) + if (firstCh === 0x2D /* - */ && isSpace(secondCh)) { + return false; + } + while (pos < state.eMarks[nextLine]) { + const ch = state.src.charCodeAt(pos); + if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */ && !isSpace(ch)) { + return false; + } + pos++; + } + let lineText = getLine(state, startLine + 1); + let columns = lineText.split('|'); + const aligns = []; + for (let i = 0; i < columns.length; i++) { + const t = columns[i].trim(); + if (!t) { + // allow empty columns before and after table, but not in between columns; + // e.g. allow ` |---| `, disallow ` ---||--- ` + if (i === 0 || i === columns.length - 1) { + continue; + } else { + return false; + } + } + if (!/^:?-+:?$/.test(t)) { + return false; + } + if (t.charCodeAt(t.length - 1) === 0x3A /* : */) { + aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right'); + } else if (t.charCodeAt(0) === 0x3A /* : */) { + aligns.push('left'); + } else { + aligns.push(''); + } + } + lineText = getLine(state, startLine).trim(); + if (lineText.indexOf('|') === -1) { + return false; + } + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + columns = escapedSplit(lineText); + if (columns.length && columns[0] === '') columns.shift(); + if (columns.length && columns[columns.length - 1] === '') columns.pop(); + + // header row will define an amount of columns in the entire table, + // and align row should be exactly the same (the rest of the rows can differ) + const columnCount = columns.length; + if (columnCount === 0 || columnCount !== aligns.length) { + return false; + } + if (silent) { + return true; + } + const oldParentType = state.parentType; + state.parentType = 'table'; + + // use 'blockquote' lists for termination because it's + // the most similar to tables + const terminatorRules = state.md.block.ruler.getRules('blockquote'); + const token_to = state.push('table_open', 'table', 1); + const tableLines = [startLine, 0]; + token_to.map = tableLines; + const token_tho = state.push('thead_open', 'thead', 1); + token_tho.map = [startLine, startLine + 1]; + const token_htro = state.push('tr_open', 'tr', 1); + token_htro.map = [startLine, startLine + 1]; + for (let i = 0; i < columns.length; i++) { + const token_ho = state.push('th_open', 'th', 1); + if (aligns[i]) { + token_ho.attrs = [['style', 'text-align:' + aligns[i]]]; + } + const token_il = state.push('inline', '', 0); + token_il.content = columns[i].trim(); + token_il.children = []; + state.push('th_close', 'th', -1); + } + state.push('tr_close', 'tr', -1); + state.push('thead_close', 'thead', -1); + let tbodyLines; + let autocompletedCells = 0; + for (nextLine = startLine + 2; nextLine < endLine; nextLine++) { + if (state.sCount[nextLine] < state.blkIndent) { + break; + } + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + if (terminate) { + break; + } + lineText = getLine(state, nextLine).trim(); + if (!lineText) { + break; + } + if (state.sCount[nextLine] - state.blkIndent >= 4) { + break; + } + columns = escapedSplit(lineText); + if (columns.length && columns[0] === '') columns.shift(); + if (columns.length && columns[columns.length - 1] === '') columns.pop(); + + // note: autocomplete count can be negative if user specifies more columns than header, + // but that does not affect intended use (which is limiting expansion) + autocompletedCells += columnCount - columns.length; + if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) { + break; + } + if (nextLine === startLine + 2) { + const token_tbo = state.push('tbody_open', 'tbody', 1); + token_tbo.map = tbodyLines = [startLine + 2, 0]; + } + const token_tro = state.push('tr_open', 'tr', 1); + token_tro.map = [nextLine, nextLine + 1]; + for (let i = 0; i < columnCount; i++) { + const token_tdo = state.push('td_open', 'td', 1); + if (aligns[i]) { + token_tdo.attrs = [['style', 'text-align:' + aligns[i]]]; + } + const token_il = state.push('inline', '', 0); + token_il.content = columns[i] ? columns[i].trim() : ''; + token_il.children = []; + state.push('td_close', 'td', -1); + } + state.push('tr_close', 'tr', -1); + } + if (tbodyLines) { + state.push('tbody_close', 'tbody', -1); + tbodyLines[1] = nextLine; + } + state.push('table_close', 'table', -1); + tableLines[1] = nextLine; + state.parentType = oldParentType; + state.line = nextLine; + return true; +} + +// Code block (4 spaces padded) + +function code(state, startLine, endLine /*, silent */) { + if (state.sCount[startLine] - state.blkIndent < 4) { + return false; + } + let nextLine = startLine + 1; + let last = nextLine; + while (nextLine < endLine) { + if (state.isEmpty(nextLine)) { + nextLine++; + continue; + } + if (state.sCount[nextLine] - state.blkIndent >= 4) { + nextLine++; + last = nextLine; + continue; + } + break; + } + state.line = last; + const token = state.push('code_block', 'code', 0); + token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\n'; + token.map = [startLine, state.line]; + return true; +} + +// fences (``` lang, ~~~ lang) + +function fence(state, startLine, endLine, silent) { + let pos = state.bMarks[startLine] + state.tShift[startLine]; + let max = state.eMarks[startLine]; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + if (pos + 3 > max) { + return false; + } + const marker = state.src.charCodeAt(pos); + if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */) { + return false; + } + + // scan marker length + let mem = pos; + pos = state.skipChars(pos, marker); + let len = pos - mem; + if (len < 3) { + return false; + } + const markup = state.src.slice(mem, pos); + const params = state.src.slice(pos, max); + if (marker === 0x60 /* ` */) { + if (params.indexOf(String.fromCharCode(marker)) >= 0) { + return false; + } + } + + // Since start is found, we can report success here in validation mode + if (silent) { + return true; + } + + // search end of block + let nextLine = startLine; + let haveEndMarker = false; + for (;;) { + nextLine++; + if (nextLine >= endLine) { + // unclosed block should be autoclosed by end of document. + // also block seems to be autoclosed by end of parent + break; + } + pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]; + max = state.eMarks[nextLine]; + if (pos < max && state.sCount[nextLine] < state.blkIndent) { + // non-empty line with negative indent should stop the list: + // - ``` + // test + break; + } + if (state.src.charCodeAt(pos) !== marker) { + continue; + } + if (state.sCount[nextLine] - state.blkIndent >= 4) { + // closing fence should be indented less than 4 spaces + continue; + } + pos = state.skipChars(pos, marker); + + // closing code fence must be at least as long as the opening one + if (pos - mem < len) { + continue; + } + + // make sure tail has spaces only + pos = state.skipSpaces(pos); + if (pos < max) { + continue; + } + haveEndMarker = true; + // found! + break; + } + + // If a fence has heading spaces, they should be removed from its inner block + len = state.sCount[startLine]; + state.line = nextLine + (haveEndMarker ? 1 : 0); + const token = state.push('fence', 'code', 0); + token.info = params; + token.content = state.getLines(startLine + 1, nextLine, len, true); + token.markup = markup; + token.map = [startLine, state.line]; + return true; +} + +// Block quotes + +function blockquote(state, startLine, endLine, silent) { + let pos = state.bMarks[startLine] + state.tShift[startLine]; + let max = state.eMarks[startLine]; + const oldLineMax = state.lineMax; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + + // check the block quote marker + if (state.src.charCodeAt(pos) !== 0x3E /* > */) { + return false; + } + + // we know that it's going to be a valid blockquote, + // so no point trying to find the end of it in silent mode + if (silent) { + return true; + } + const oldBMarks = []; + const oldBSCount = []; + const oldSCount = []; + const oldTShift = []; + const terminatorRules = state.md.block.ruler.getRules('blockquote'); + const oldParentType = state.parentType; + state.parentType = 'blockquote'; + let lastLineEmpty = false; + let nextLine; + + // Search the end of the block + // + // Block ends with either: + // 1. an empty line outside: + // ``` + // > test + // + // ``` + // 2. an empty line inside: + // ``` + // > + // test + // ``` + // 3. another tag: + // ``` + // > test + // - - - + // ``` + for (nextLine = startLine; nextLine < endLine; nextLine++) { + // check if it's outdented, i.e. it's inside list item and indented + // less than said list item: + // + // ``` + // 1. anything + // > current blockquote + // 2. checking this line + // ``` + const isOutdented = state.sCount[nextLine] < state.blkIndent; + pos = state.bMarks[nextLine] + state.tShift[nextLine]; + max = state.eMarks[nextLine]; + if (pos >= max) { + // Case 1: line is not inside the blockquote, and this line is empty. + break; + } + if (state.src.charCodeAt(pos++) === 0x3E /* > */ && !isOutdented) { + // This line is inside the blockquote. + + // set offset past spaces and ">" + let initial = state.sCount[nextLine] + 1; + let spaceAfterMarker; + let adjustTab; + + // skip one optional space after '>' + if (state.src.charCodeAt(pos) === 0x20 /* space */) { + // ' > test ' + // ^ -- position start of line here: + pos++; + initial++; + adjustTab = false; + spaceAfterMarker = true; + } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) { + spaceAfterMarker = true; + if ((state.bsCount[nextLine] + initial) % 4 === 3) { + // ' >\t test ' + // ^ -- position start of line here (tab has width===1) + pos++; + initial++; + adjustTab = false; + } else { + // ' >\t test ' + // ^ -- position start of line here + shift bsCount slightly + // to make extra space appear + adjustTab = true; + } + } else { + spaceAfterMarker = false; + } + let offset = initial; + oldBMarks.push(state.bMarks[nextLine]); + state.bMarks[nextLine] = pos; + while (pos < max) { + const ch = state.src.charCodeAt(pos); + if (isSpace(ch)) { + if (ch === 0x09) { + offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4; + } else { + offset++; + } + } else { + break; + } + pos++; + } + lastLineEmpty = pos >= max; + oldBSCount.push(state.bsCount[nextLine]); + state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0); + oldSCount.push(state.sCount[nextLine]); + state.sCount[nextLine] = offset - initial; + oldTShift.push(state.tShift[nextLine]); + state.tShift[nextLine] = pos - state.bMarks[nextLine]; + continue; + } + + // Case 2: line is not inside the blockquote, and the last line was empty. + if (lastLineEmpty) { + break; + } + + // Case 3: another tag found. + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + if (terminate) { + // Quirk to enforce "hard termination mode" for paragraphs; + // normally if you call `tokenize(state, startLine, nextLine)`, + // paragraphs will look below nextLine for paragraph continuation, + // but if blockquote is terminated by another tag, they shouldn't + state.lineMax = nextLine; + if (state.blkIndent !== 0) { + // state.blkIndent was non-zero, we now set it to zero, + // so we need to re-calculate all offsets to appear as + // if indent wasn't changed + oldBMarks.push(state.bMarks[nextLine]); + oldBSCount.push(state.bsCount[nextLine]); + oldTShift.push(state.tShift[nextLine]); + oldSCount.push(state.sCount[nextLine]); + state.sCount[nextLine] -= state.blkIndent; + } + break; + } + oldBMarks.push(state.bMarks[nextLine]); + oldBSCount.push(state.bsCount[nextLine]); + oldTShift.push(state.tShift[nextLine]); + oldSCount.push(state.sCount[nextLine]); + + // A negative indentation means that this is a paragraph continuation + // + state.sCount[nextLine] = -1; + } + const oldIndent = state.blkIndent; + state.blkIndent = 0; + const token_o = state.push('blockquote_open', 'blockquote', 1); + token_o.markup = '>'; + const lines = [startLine, 0]; + token_o.map = lines; + state.md.block.tokenize(state, startLine, nextLine); + const token_c = state.push('blockquote_close', 'blockquote', -1); + token_c.markup = '>'; + state.lineMax = oldLineMax; + state.parentType = oldParentType; + lines[1] = state.line; + + // Restore original tShift; this might not be necessary since the parser + // has already been here, but just to make sure we can do that. + for (let i = 0; i < oldTShift.length; i++) { + state.bMarks[i + startLine] = oldBMarks[i]; + state.tShift[i + startLine] = oldTShift[i]; + state.sCount[i + startLine] = oldSCount[i]; + state.bsCount[i + startLine] = oldBSCount[i]; + } + state.blkIndent = oldIndent; + return true; +} + +// Horizontal rule + +function hr(state, startLine, endLine, silent) { + const max = state.eMarks[startLine]; + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + let pos = state.bMarks[startLine] + state.tShift[startLine]; + const marker = state.src.charCodeAt(pos++); + + // Check hr marker + if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x5F /* _ */) { + return false; + } + + // markers can be mixed with spaces, but there should be at least 3 of them + + let cnt = 1; + while (pos < max) { + const ch = state.src.charCodeAt(pos++); + if (ch !== marker && !isSpace(ch)) { + return false; + } + if (ch === marker) { + cnt++; + } + } + if (cnt < 3) { + return false; + } + if (silent) { + return true; + } + state.line = startLine + 1; + const token = state.push('hr', 'hr', 0); + token.map = [startLine, state.line]; + token.markup = Array(cnt + 1).join(String.fromCharCode(marker)); + return true; +} + +// Lists + +// Search `[-+*][\n ]`, returns next pos after marker on success +// or -1 on fail. +function skipBulletListMarker(state, startLine) { + const max = state.eMarks[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; + const marker = state.src.charCodeAt(pos++); + // Check bullet + if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x2B /* + */) { + return -1; + } + if (pos < max) { + const ch = state.src.charCodeAt(pos); + if (!isSpace(ch)) { + // " -test " - is not a list item + return -1; + } + } + return pos; +} + +// Search `\d+[.)][\n ]`, returns next pos after marker on success +// or -1 on fail. +function skipOrderedListMarker(state, startLine) { + const start = state.bMarks[startLine] + state.tShift[startLine]; + const max = state.eMarks[startLine]; + let pos = start; + + // List marker should have at least 2 chars (digit + dot) + if (pos + 1 >= max) { + return -1; + } + let ch = state.src.charCodeAt(pos++); + if (ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */) { + return -1; + } + for (;;) { + // EOL -> fail + if (pos >= max) { + return -1; + } + ch = state.src.charCodeAt(pos++); + if (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) { + // List marker should have no more than 9 digits + // (prevents integer overflow in browsers) + if (pos - start >= 10) { + return -1; + } + continue; + } + + // found valid marker + if (ch === 0x29 /* ) */ || ch === 0x2e /* . */) { + break; + } + return -1; + } + if (pos < max) { + ch = state.src.charCodeAt(pos); + if (!isSpace(ch)) { + // " 1.test " - is not a list item + return -1; + } + } + return pos; +} +function markTightParagraphs(state, idx) { + const level = state.level + 2; + for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) { + if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') { + state.tokens[i + 2].hidden = true; + state.tokens[i].hidden = true; + i += 2; + } + } +} +function list(state, startLine, endLine, silent) { + let max, pos, start, token; + let nextLine = startLine; + let tight = true; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[nextLine] - state.blkIndent >= 4) { + return false; + } + + // Special case: + // - item 1 + // - item 2 + // - item 3 + // - item 4 + // - this one is a paragraph continuation + if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) { + return false; + } + let isTerminatingParagraph = false; + + // limit conditions when list can interrupt + // a paragraph (validation mode only) + if (silent && state.parentType === 'paragraph') { + // Next list item should still terminate previous list item; + // + // This code can fail if plugins use blkIndent as well as lists, + // but I hope the spec gets fixed long before that happens. + // + if (state.sCount[nextLine] >= state.blkIndent) { + isTerminatingParagraph = true; + } + } + + // Detect list type and position after marker + let isOrdered; + let markerValue; + let posAfterMarker; + if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) { + isOrdered = true; + start = state.bMarks[nextLine] + state.tShift[nextLine]; + markerValue = Number(state.src.slice(start, posAfterMarker - 1)); + + // If we're starting a new ordered list right after + // a paragraph, it should start with 1. + if (isTerminatingParagraph && markerValue !== 1) return false; + } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) { + isOrdered = false; + } else { + return false; + } + + // If we're starting a new unordered list right after + // a paragraph, first line should not be empty. + if (isTerminatingParagraph) { + if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false; + } + + // For validation mode we can terminate immediately + if (silent) { + return true; + } + + // We should terminate list on style change. Remember first one to compare. + const markerCharCode = state.src.charCodeAt(posAfterMarker - 1); + + // Start list + const listTokIdx = state.tokens.length; + if (isOrdered) { + token = state.push('ordered_list_open', 'ol', 1); + if (markerValue !== 1) { + token.attrs = [['start', markerValue]]; + } + } else { + token = state.push('bullet_list_open', 'ul', 1); + } + const listLines = [nextLine, 0]; + token.map = listLines; + token.markup = String.fromCharCode(markerCharCode); + + // + // Iterate list items + // + + let prevEmptyEnd = false; + const terminatorRules = state.md.block.ruler.getRules('list'); + const oldParentType = state.parentType; + state.parentType = 'list'; + while (nextLine < endLine) { + pos = posAfterMarker; + max = state.eMarks[nextLine]; + const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]); + let offset = initial; + while (pos < max) { + const ch = state.src.charCodeAt(pos); + if (ch === 0x09) { + offset += 4 - (offset + state.bsCount[nextLine]) % 4; + } else if (ch === 0x20) { + offset++; + } else { + break; + } + pos++; + } + const contentStart = pos; + let indentAfterMarker; + if (contentStart >= max) { + // trimming space in "- \n 3" case, indent is 1 here + indentAfterMarker = 1; + } else { + indentAfterMarker = offset - initial; + } + + // If we have more than 4 spaces, the indent is 1 + // (the rest is just indented code block) + if (indentAfterMarker > 4) { + indentAfterMarker = 1; + } + + // " - test" + // ^^^^^ - calculating total length of this thing + const indent = initial + indentAfterMarker; + + // Run subparser & write tokens + token = state.push('list_item_open', 'li', 1); + token.markup = String.fromCharCode(markerCharCode); + const itemLines = [nextLine, 0]; + token.map = itemLines; + if (isOrdered) { + token.info = state.src.slice(start, posAfterMarker - 1); + } + + // change current state, then restore it after parser subcall + const oldTight = state.tight; + const oldTShift = state.tShift[nextLine]; + const oldSCount = state.sCount[nextLine]; + + // - example list + // ^ listIndent position will be here + // ^ blkIndent position will be here + // + const oldListIndent = state.listIndent; + state.listIndent = state.blkIndent; + state.blkIndent = indent; + state.tight = true; + state.tShift[nextLine] = contentStart - state.bMarks[nextLine]; + state.sCount[nextLine] = offset; + if (contentStart >= max && state.isEmpty(nextLine + 1)) { + // workaround for this case + // (list item is empty, list terminates before "foo"): + // ~~~~~~~~ + // - + // + // foo + // ~~~~~~~~ + state.line = Math.min(state.line + 2, endLine); + } else { + state.md.block.tokenize(state, nextLine, endLine, true); + } + + // If any of list item is tight, mark list as tight + if (!state.tight || prevEmptyEnd) { + tight = false; + } + // Item become loose if finish with empty line, + // but we should filter last element, because it means list finish + prevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1); + state.blkIndent = state.listIndent; + state.listIndent = oldListIndent; + state.tShift[nextLine] = oldTShift; + state.sCount[nextLine] = oldSCount; + state.tight = oldTight; + token = state.push('list_item_close', 'li', -1); + token.markup = String.fromCharCode(markerCharCode); + nextLine = state.line; + itemLines[1] = nextLine; + if (nextLine >= endLine) { + break; + } + + // + // Try to check if list is terminated or continued. + // + if (state.sCount[nextLine] < state.blkIndent) { + break; + } + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[nextLine] - state.blkIndent >= 4) { + break; + } + + // fail if terminating block found + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + if (terminate) { + break; + } + + // fail if list has another type + if (isOrdered) { + posAfterMarker = skipOrderedListMarker(state, nextLine); + if (posAfterMarker < 0) { + break; + } + start = state.bMarks[nextLine] + state.tShift[nextLine]; + } else { + posAfterMarker = skipBulletListMarker(state, nextLine); + if (posAfterMarker < 0) { + break; + } + } + if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { + break; + } + } + + // Finalize list + if (isOrdered) { + token = state.push('ordered_list_close', 'ol', -1); + } else { + token = state.push('bullet_list_close', 'ul', -1); + } + token.markup = String.fromCharCode(markerCharCode); + listLines[1] = nextLine; + state.line = nextLine; + state.parentType = oldParentType; + + // mark paragraphs tight if needed + if (tight) { + markTightParagraphs(state, listTokIdx); + } + return true; +} +function reference(state, startLine, _endLine, silent) { + let pos = state.bMarks[startLine] + state.tShift[startLine]; + let max = state.eMarks[startLine]; + let nextLine = startLine + 1; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + if (state.src.charCodeAt(pos) !== 0x5B /* [ */) { + return false; + } + function getNextLine(nextLine) { + const endLine = state.lineMax; + if (nextLine >= endLine || state.isEmpty(nextLine)) { + // empty line or end of input + return null; + } + let isContinuation = false; + + // this would be a code block normally, but after paragraph + // it's considered a lazy continuation regardless of what's there + if (state.sCount[nextLine] - state.blkIndent > 3) { + isContinuation = true; + } + + // quirk for blockquotes, this line should already be checked by that rule + if (state.sCount[nextLine] < 0) { + isContinuation = true; + } + if (!isContinuation) { + const terminatorRules = state.md.block.ruler.getRules('reference'); + const oldParentType = state.parentType; + state.parentType = 'reference'; + + // Some tags can terminate paragraph without empty line. + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + state.parentType = oldParentType; + if (terminate) { + // terminated by another block + return null; + } + } + const pos = state.bMarks[nextLine] + state.tShift[nextLine]; + const max = state.eMarks[nextLine]; + + // max + 1 explicitly includes the newline + return state.src.slice(pos, max + 1); + } + let str = state.src.slice(pos, max + 1); + max = str.length; + let labelEnd = -1; + for (pos = 1; pos < max; pos++) { + const ch = str.charCodeAt(pos); + if (ch === 0x5B /* [ */) { + return false; + } else if (ch === 0x5D /* ] */) { + labelEnd = pos; + break; + } else if (ch === 0x0A /* \n */) { + const lineContent = getNextLine(nextLine); + if (lineContent !== null) { + str += lineContent; + max = str.length; + nextLine++; + } + } else if (ch === 0x5C /* \ */) { + pos++; + if (pos < max && str.charCodeAt(pos) === 0x0A) { + const lineContent = getNextLine(nextLine); + if (lineContent !== null) { + str += lineContent; + max = str.length; + nextLine++; + } + } + } + } + if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */) { + return false; + } + + // [label]: destination 'title' + // ^^^ skip optional whitespace here + for (pos = labelEnd + 2; pos < max; pos++) { + const ch = str.charCodeAt(pos); + if (ch === 0x0A) { + const lineContent = getNextLine(nextLine); + if (lineContent !== null) { + str += lineContent; + max = str.length; + nextLine++; + } + } else if (isSpace(ch)) ;else { + break; + } + } + + // [label]: destination 'title' + // ^^^^^^^^^^^ parse this + const destRes = state.md.helpers.parseLinkDestination(str, pos, max); + if (!destRes.ok) { + return false; + } + const href = state.md.normalizeLink(destRes.str); + if (!state.md.validateLink(href)) { + return false; + } + pos = destRes.pos; + + // save cursor state, we could require to rollback later + const destEndPos = pos; + const destEndLineNo = nextLine; + + // [label]: destination 'title' + // ^^^ skipping those spaces + const start = pos; + for (; pos < max; pos++) { + const ch = str.charCodeAt(pos); + if (ch === 0x0A) { + const lineContent = getNextLine(nextLine); + if (lineContent !== null) { + str += lineContent; + max = str.length; + nextLine++; + } + } else if (isSpace(ch)) ;else { + break; + } + } + + // [label]: destination 'title' + // ^^^^^^^ parse this + let titleRes = state.md.helpers.parseLinkTitle(str, pos, max); + while (titleRes.can_continue) { + const lineContent = getNextLine(nextLine); + if (lineContent === null) break; + str += lineContent; + pos = max; + max = str.length; + nextLine++; + titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes); + } + let title; + if (pos < max && start !== pos && titleRes.ok) { + title = titleRes.str; + pos = titleRes.pos; + } else { + title = ''; + pos = destEndPos; + nextLine = destEndLineNo; + } + + // skip trailing spaces until the rest of the line + while (pos < max) { + const ch = str.charCodeAt(pos); + if (!isSpace(ch)) { + break; + } + pos++; + } + if (pos < max && str.charCodeAt(pos) !== 0x0A) { + if (title) { + // garbage at the end of the line after title, + // but it could still be a valid reference if we roll back + title = ''; + pos = destEndPos; + nextLine = destEndLineNo; + while (pos < max) { + const ch = str.charCodeAt(pos); + if (!isSpace(ch)) { + break; + } + pos++; + } + } + } + if (pos < max && str.charCodeAt(pos) !== 0x0A) { + // garbage at the end of the line + return false; + } + const label = normalizeReference(str.slice(1, labelEnd)); + if (!label) { + // CommonMark 0.20 disallows empty labels + return false; + } + + // Reference can not terminate anything. This check is for safety only. + /* istanbul ignore if */ + if (silent) { + return true; + } + if (typeof state.env.references === 'undefined') { + state.env.references = {}; + } + if (typeof state.env.references[label] === 'undefined') { + state.env.references[label] = { + title, + href + }; + } + state.line = nextLine; + return true; +} + +// List of valid html blocks names, according to commonmark spec +// https://spec.commonmark.org/0.30/#html-blocks + +var block_names = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'search', 'section', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul']; + +// Regexps to match html elements + +const attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; +const unquoted = '[^"\'=<>`\\x00-\\x20]+'; +const single_quoted = "'[^']*'"; +const double_quoted = '"[^"]*"'; +const attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')'; +const attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)'; +const open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>'; +const close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>'; +const comment = ''; +const processing = '<[?][\\s\\S]*?[?]>'; +const declaration = ']*>'; +const cdata = ''; +const HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')'); +const HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')'); + +// HTML block + +// An array of opening and corresponding closing sequences for html tags, +// last argument defines whether it can terminate a paragraph or not +// +const HTML_SEQUENCES = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true], [/^/, true], [/^<\?/, /\?>/, true], [/^/, true], [/^/, true], [new RegExp('^|$))', 'i'), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false]]; +function html_block(state, startLine, endLine, silent) { + let pos = state.bMarks[startLine] + state.tShift[startLine]; + let max = state.eMarks[startLine]; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + if (!state.md.options.html) { + return false; + } + if (state.src.charCodeAt(pos) !== 0x3C /* < */) { + return false; + } + let lineText = state.src.slice(pos, max); + let i = 0; + for (; i < HTML_SEQUENCES.length; i++) { + if (HTML_SEQUENCES[i][0].test(lineText)) { + break; + } + } + if (i === HTML_SEQUENCES.length) { + return false; + } + if (silent) { + // true if this sequence can be a terminator, false otherwise + return HTML_SEQUENCES[i][2]; + } + let nextLine = startLine + 1; + + // If we are here - we detected HTML block. + // Let's roll down till block end. + if (!HTML_SEQUENCES[i][1].test(lineText)) { + for (; nextLine < endLine; nextLine++) { + if (state.sCount[nextLine] < state.blkIndent) { + break; + } + pos = state.bMarks[nextLine] + state.tShift[nextLine]; + max = state.eMarks[nextLine]; + lineText = state.src.slice(pos, max); + if (HTML_SEQUENCES[i][1].test(lineText)) { + if (lineText.length !== 0) { + nextLine++; + } + break; + } + } + } + state.line = nextLine; + const token = state.push('html_block', '', 0); + token.map = [startLine, nextLine]; + token.content = state.getLines(startLine, nextLine, state.blkIndent, true); + return true; +} + +// heading (#, ##, ...) + +function heading(state, startLine, endLine, silent) { + let pos = state.bMarks[startLine] + state.tShift[startLine]; + let max = state.eMarks[startLine]; + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + let ch = state.src.charCodeAt(pos); + if (ch !== 0x23 /* # */ || pos >= max) { + return false; + } + + // count heading level + let level = 1; + ch = state.src.charCodeAt(++pos); + while (ch === 0x23 /* # */ && pos < max && level <= 6) { + level++; + ch = state.src.charCodeAt(++pos); + } + if (level > 6 || pos < max && !isSpace(ch)) { + return false; + } + if (silent) { + return true; + } + + // Let's cut tails like ' ### ' from the end of string + + max = state.skipSpacesBack(max, pos); + const tmp = state.skipCharsBack(max, 0x23, pos); // # + if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) { + max = tmp; + } + state.line = startLine + 1; + const token_o = state.push('heading_open', 'h' + String(level), 1); + token_o.markup = '########'.slice(0, level); + token_o.map = [startLine, state.line]; + const token_i = state.push('inline', '', 0); + token_i.content = state.src.slice(pos, max).trim(); + token_i.map = [startLine, state.line]; + token_i.children = []; + const token_c = state.push('heading_close', 'h' + String(level), -1); + token_c.markup = '########'.slice(0, level); + return true; +} + +// lheading (---, ===) + +function lheading(state, startLine, endLine /*, silent */) { + const terminatorRules = state.md.block.ruler.getRules('paragraph'); + + // if it's indented more than 3 spaces, it should be a code block + if (state.sCount[startLine] - state.blkIndent >= 4) { + return false; + } + const oldParentType = state.parentType; + state.parentType = 'paragraph'; // use paragraph to match terminatorRules + + // jump line-by-line until empty one or EOF + let level = 0; + let marker; + let nextLine = startLine + 1; + for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { + // this would be a code block normally, but after paragraph + // it's considered a lazy continuation regardless of what's there + if (state.sCount[nextLine] - state.blkIndent > 3) { + continue; + } + + // + // Check for underline in setext header + // + if (state.sCount[nextLine] >= state.blkIndent) { + let pos = state.bMarks[nextLine] + state.tShift[nextLine]; + const max = state.eMarks[nextLine]; + if (pos < max) { + marker = state.src.charCodeAt(pos); + if (marker === 0x2D /* - */ || marker === 0x3D /* = */) { + pos = state.skipChars(pos, marker); + pos = state.skipSpaces(pos); + if (pos >= max) { + level = marker === 0x3D /* = */ ? 1 : 2; + break; + } + } + } + } + + // quirk for blockquotes, this line should already be checked by that rule + if (state.sCount[nextLine] < 0) { + continue; + } + + // Some tags can terminate paragraph without empty line. + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + if (terminate) { + break; + } + } + if (!level) { + // Didn't find valid underline + return false; + } + const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); + state.line = nextLine + 1; + const token_o = state.push('heading_open', 'h' + String(level), 1); + token_o.markup = String.fromCharCode(marker); + token_o.map = [startLine, state.line]; + const token_i = state.push('inline', '', 0); + token_i.content = content; + token_i.map = [startLine, state.line - 1]; + token_i.children = []; + const token_c = state.push('heading_close', 'h' + String(level), -1); + token_c.markup = String.fromCharCode(marker); + state.parentType = oldParentType; + return true; +} + +// Paragraph + +function paragraph(state, startLine, endLine) { + const terminatorRules = state.md.block.ruler.getRules('paragraph'); + const oldParentType = state.parentType; + let nextLine = startLine + 1; + state.parentType = 'paragraph'; + + // jump line-by-line until empty one or EOF + for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { + // this would be a code block normally, but after paragraph + // it's considered a lazy continuation regardless of what's there + if (state.sCount[nextLine] - state.blkIndent > 3) { + continue; + } + + // quirk for blockquotes, this line should already be checked by that rule + if (state.sCount[nextLine] < 0) { + continue; + } + + // Some tags can terminate paragraph without empty line. + let terminate = false; + for (let i = 0, l = terminatorRules.length; i < l; i++) { + if (terminatorRules[i](state, nextLine, endLine, true)) { + terminate = true; + break; + } + } + if (terminate) { + break; + } + } + const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); + state.line = nextLine; + const token_o = state.push('paragraph_open', 'p', 1); + token_o.map = [startLine, state.line]; + const token_i = state.push('inline', '', 0); + token_i.content = content; + token_i.map = [startLine, state.line]; + token_i.children = []; + state.push('paragraph_close', 'p', -1); + state.parentType = oldParentType; + return true; +} + +/** internal + * class ParserBlock + * + * Block-level tokenizer. + **/ + +const _rules$1 = [ +// First 2 params - rule name & source. Secondary array - list of rules, +// which can be terminated by this one. +['table', table, ['paragraph', 'reference']], ['code', code], ['fence', fence, ['paragraph', 'reference', 'blockquote', 'list']], ['blockquote', blockquote, ['paragraph', 'reference', 'blockquote', 'list']], ['hr', hr, ['paragraph', 'reference', 'blockquote', 'list']], ['list', list, ['paragraph', 'reference', 'blockquote']], ['reference', reference], ['html_block', html_block, ['paragraph', 'reference', 'blockquote']], ['heading', heading, ['paragraph', 'reference', 'blockquote']], ['lheading', lheading], ['paragraph', paragraph]]; + +/** + * new ParserBlock() + **/ +function ParserBlock() { + /** + * ParserBlock#ruler -> Ruler + * + * [[Ruler]] instance. Keep configuration of block rules. + **/ + this.ruler = new Ruler(); + for (let i = 0; i < _rules$1.length; i++) { + this.ruler.push(_rules$1[i][0], _rules$1[i][1], { + alt: (_rules$1[i][2] || []).slice() + }); + } +} + +// Generate tokens for input range +// +ParserBlock.prototype.tokenize = function (state, startLine, endLine) { + const rules = this.ruler.getRules(''); + const len = rules.length; + const maxNesting = state.md.options.maxNesting; + let line = startLine; + let hasEmptyLines = false; + while (line < endLine) { + state.line = line = state.skipEmptyLines(line); + if (line >= endLine) { + break; + } + + // Termination condition for nested calls. + // Nested calls currently used for blockquotes & lists + if (state.sCount[line] < state.blkIndent) { + break; + } + + // If nesting level exceeded - skip tail to the end. That's not ordinary + // situation and we should not care about content. + if (state.level >= maxNesting) { + state.line = endLine; + break; + } + + // Try all possible rules. + // On success, rule should: + // + // - update `state.line` + // - update `state.tokens` + // - return true + const prevLine = state.line; + let ok = false; + for (let i = 0; i < len; i++) { + ok = rules[i](state, line, endLine, false); + if (ok) { + if (prevLine >= state.line) { + throw new Error("block rule didn't increment state.line"); + } + break; + } + } + + // this can only happen if user disables paragraph rule + if (!ok) throw new Error('none of the block rules matched'); + + // set state.tight if we had an empty line before current tag + // i.e. latest empty line should not count + state.tight = !hasEmptyLines; + + // paragraph might "eat" one newline after it in nested lists + if (state.isEmpty(state.line - 1)) { + hasEmptyLines = true; + } + line = state.line; + if (line < endLine && state.isEmpty(line)) { + hasEmptyLines = true; + line++; + state.line = line; + } + } +}; + +/** + * ParserBlock.parse(str, md, env, outTokens) + * + * Process input string and push block tokens into `outTokens` + **/ +ParserBlock.prototype.parse = function (src, md, env, outTokens) { + if (!src) { + return; + } + const state = new this.State(src, md, env, outTokens); + this.tokenize(state, state.line, state.lineMax); +}; +ParserBlock.prototype.State = StateBlock; + +// Inline parser state + +function StateInline(src, md, env, outTokens) { + this.src = src; + this.env = env; + this.md = md; + this.tokens = outTokens; + this.tokens_meta = Array(outTokens.length); + this.pos = 0; + this.posMax = this.src.length; + this.level = 0; + this.pending = ''; + this.pendingLevel = 0; + + // Stores { start: end } pairs. Useful for backtrack + // optimization of pairs parse (emphasis, strikes). + this.cache = {}; + + // List of emphasis-like delimiters for current tag + this.delimiters = []; + + // Stack of delimiter lists for upper level tags + this._prev_delimiters = []; + + // backtick length => last seen position + this.backticks = {}; + this.backticksScanned = false; + + // Counter used to disable inline linkify-it execution + // inside and markdown links + this.linkLevel = 0; +} + +// Flush pending text +// +StateInline.prototype.pushPending = function () { + const token = new Token('text', '', 0); + token.content = this.pending; + token.level = this.pendingLevel; + this.tokens.push(token); + this.pending = ''; + return token; +}; + +// Push new token to "stream". +// If pending text exists - flush it as text token +// +StateInline.prototype.push = function (type, tag, nesting) { + if (this.pending) { + this.pushPending(); + } + const token = new Token(type, tag, nesting); + let token_meta = null; + if (nesting < 0) { + // closing tag + this.level--; + this.delimiters = this._prev_delimiters.pop(); + } + token.level = this.level; + if (nesting > 0) { + // opening tag + this.level++; + this._prev_delimiters.push(this.delimiters); + this.delimiters = []; + token_meta = { + delimiters: this.delimiters + }; + } + this.pendingLevel = this.level; + this.tokens.push(token); + this.tokens_meta.push(token_meta); + return token; +}; + +// Scan a sequence of emphasis-like markers, and determine whether +// it can start an emphasis sequence or end an emphasis sequence. +// +// - start - position to scan from (it should point at a valid marker); +// - canSplitWord - determine if these markers can be found inside a word +// +StateInline.prototype.scanDelims = function (start, canSplitWord) { + const max = this.posMax; + const marker = this.src.charCodeAt(start); + + // treat beginning of the line as a whitespace + const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20; + let pos = start; + while (pos < max && this.src.charCodeAt(pos) === marker) { + pos++; + } + const count = pos - start; + + // treat end of the line as a whitespace + const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20; + const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); + const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); + const isLastWhiteSpace = isWhiteSpace(lastChar); + const isNextWhiteSpace = isWhiteSpace(nextChar); + const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar); + const right_flanking = !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar); + const can_open = left_flanking && (canSplitWord || !right_flanking || isLastPunctChar); + const can_close = right_flanking && (canSplitWord || !left_flanking || isNextPunctChar); + return { + can_open, + can_close, + length: count + }; +}; + +// re-export Token class to use in block rules +StateInline.prototype.Token = Token; + +// Skip text characters for text token, place those to pending buffer +// and increment current pos + +// Rule to skip pure text +// '{}$%@~+=:' reserved for extentions + +// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ + +// !!!! Don't confuse with "Markdown ASCII Punctuation" chars +// http://spec.commonmark.org/0.15/#ascii-punctuation-character +function isTerminatorChar(ch) { + switch (ch) { + case 0x0A /* \n */: + case 0x21 /* ! */: + case 0x23 /* # */: + case 0x24 /* $ */: + case 0x25 /* % */: + case 0x26 /* & */: + case 0x2A /* * */: + case 0x2B /* + */: + case 0x2D /* - */: + case 0x3A /* : */: + case 0x3C /* < */: + case 0x3D /* = */: + case 0x3E /* > */: + case 0x40 /* @ */: + case 0x5B /* [ */: + case 0x5C /* \ */: + case 0x5D /* ] */: + case 0x5E /* ^ */: + case 0x5F /* _ */: + case 0x60 /* ` */: + case 0x7B /* { */: + case 0x7D /* } */: + case 0x7E /* ~ */: + return true; + default: + return false; + } +} +function text(state, silent) { + let pos = state.pos; + while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) { + pos++; + } + if (pos === state.pos) { + return false; + } + if (!silent) { + state.pending += state.src.slice(state.pos, pos); + } + state.pos = pos; + return true; +} + +// Alternative implementation, for memory. +// +// It costs 10% of performance, but allows extend terminators list, if place it +// to `ParserInline` property. Probably, will switch to it sometime, such +// flexibility required. + +/* +var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/; + +module.exports = function text(state, silent) { + var pos = state.pos, + idx = state.src.slice(pos).search(TERMINATOR_RE); + + // first char is terminator -> empty text + if (idx === 0) { return false; } + + // no terminator -> text till end of string + if (idx < 0) { + if (!silent) { state.pending += state.src.slice(pos); } + state.pos = state.src.length; + return true; + } + + if (!silent) { state.pending += state.src.slice(pos, pos + idx); } + + state.pos += idx; + + return true; +}; */ + +// Process links like https://example.org/ + +// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) +const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i; +function linkify(state, silent) { + if (!state.md.options.linkify) return false; + if (state.linkLevel > 0) return false; + const pos = state.pos; + const max = state.posMax; + if (pos + 3 > max) return false; + if (state.src.charCodeAt(pos) !== 0x3A /* : */) return false; + if (state.src.charCodeAt(pos + 1) !== 0x2F /* / */) return false; + if (state.src.charCodeAt(pos + 2) !== 0x2F /* / */) return false; + const match = state.pending.match(SCHEME_RE); + if (!match) return false; + const proto = match[1]; + const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length)); + if (!link) return false; + let url = link.url; + + // invalid link, but still detected by linkify somehow; + // need to check to prevent infinite loop below + if (url.length <= proto.length) return false; + + // disallow '*' at the end of the link (conflicts with emphasis) + url = url.replace(/\*+$/, ''); + const fullUrl = state.md.normalizeLink(url); + if (!state.md.validateLink(fullUrl)) return false; + if (!silent) { + state.pending = state.pending.slice(0, -proto.length); + const token_o = state.push('link_open', 'a', 1); + token_o.attrs = [['href', fullUrl]]; + token_o.markup = 'linkify'; + token_o.info = 'auto'; + const token_t = state.push('text', '', 0); + token_t.content = state.md.normalizeLinkText(url); + const token_c = state.push('link_close', 'a', -1); + token_c.markup = 'linkify'; + token_c.info = 'auto'; + } + state.pos += url.length - proto.length; + return true; +} + +// Proceess '\n' + +function newline(state, silent) { + let pos = state.pos; + if (state.src.charCodeAt(pos) !== 0x0A /* \n */) { + return false; + } + const pmax = state.pending.length - 1; + const max = state.posMax; + + // ' \n' -> hardbreak + // Lookup in pending chars is bad practice! Don't copy to other rules! + // Pending string is stored in concat mode, indexed lookups will cause + // convertion to flat mode. + if (!silent) { + if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) { + if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) { + // Find whitespaces tail of pending chars. + let ws = pmax - 1; + while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--; + state.pending = state.pending.slice(0, ws); + state.push('hardbreak', 'br', 0); + } else { + state.pending = state.pending.slice(0, -1); + state.push('softbreak', 'br', 0); + } + } else { + state.push('softbreak', 'br', 0); + } + } + pos++; + + // skip heading spaces for next line + while (pos < max && isSpace(state.src.charCodeAt(pos))) { + pos++; + } + state.pos = pos; + return true; +} + +// Process escaped chars and hardbreaks + +const ESCAPED = []; +for (let i = 0; i < 256; i++) { + ESCAPED.push(0); +} +'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) { + ESCAPED[ch.charCodeAt(0)] = 1; +}); +function escape(state, silent) { + let pos = state.pos; + const max = state.posMax; + if (state.src.charCodeAt(pos) !== 0x5C /* \ */) return false; + pos++; + + // '\' at the end of the inline block + if (pos >= max) return false; + let ch1 = state.src.charCodeAt(pos); + if (ch1 === 0x0A) { + if (!silent) { + state.push('hardbreak', 'br', 0); + } + pos++; + // skip leading whitespaces from next line + while (pos < max) { + ch1 = state.src.charCodeAt(pos); + if (!isSpace(ch1)) break; + pos++; + } + state.pos = pos; + return true; + } + let escapedStr = state.src[pos]; + if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) { + const ch2 = state.src.charCodeAt(pos + 1); + if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { + escapedStr += state.src[pos + 1]; + pos++; + } + } + const origStr = '\\' + escapedStr; + if (!silent) { + const token = state.push('text_special', '', 0); + if (ch1 < 256 && ESCAPED[ch1] !== 0) { + token.content = escapedStr; + } else { + token.content = origStr; + } + token.markup = origStr; + token.info = 'escape'; + } + state.pos = pos + 1; + return true; +} + +// Parse backticks + +function backtick(state, silent) { + let pos = state.pos; + const ch = state.src.charCodeAt(pos); + if (ch !== 0x60 /* ` */) { + return false; + } + const start = pos; + pos++; + const max = state.posMax; + + // scan marker length + while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */) { + pos++; + } + const marker = state.src.slice(start, pos); + const openerLength = marker.length; + if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) { + if (!silent) state.pending += marker; + state.pos += openerLength; + return true; + } + let matchEnd = pos; + let matchStart; + + // Nothing found in the cache, scan until the end of the line (or until marker is found) + while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) { + matchEnd = matchStart + 1; + + // scan marker length + while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */) { + matchEnd++; + } + const closerLength = matchEnd - matchStart; + if (closerLength === openerLength) { + // Found matching closer length. + if (!silent) { + const token = state.push('code_inline', 'code', 0); + token.markup = marker; + token.content = state.src.slice(pos, matchStart).replace(/\n/g, ' ').replace(/^ (.+) $/, '$1'); + } + state.pos = matchEnd; + return true; + } + + // Some different length found, put it in cache as upper limit of where closer can be found + state.backticks[closerLength] = matchStart; + } + + // Scanned through the end, didn't find anything + state.backticksScanned = true; + if (!silent) state.pending += marker; + state.pos += openerLength; + return true; +} + +// ~~strike through~~ +// + +// Insert each marker as a separate text token, and add it to delimiter list +// +function strikethrough_tokenize(state, silent) { + const start = state.pos; + const marker = state.src.charCodeAt(start); + if (silent) { + return false; + } + if (marker !== 0x7E /* ~ */) { + return false; + } + const scanned = state.scanDelims(state.pos, true); + let len = scanned.length; + const ch = String.fromCharCode(marker); + if (len < 2) { + return false; + } + let token; + if (len % 2) { + token = state.push('text', '', 0); + token.content = ch; + len--; + } + for (let i = 0; i < len; i += 2) { + token = state.push('text', '', 0); + token.content = ch + ch; + state.delimiters.push({ + marker, + length: 0, + // disable "rule of 3" length checks meant for emphasis + token: state.tokens.length - 1, + end: -1, + open: scanned.can_open, + close: scanned.can_close + }); + } + state.pos += scanned.length; + return true; +} +function postProcess$1(state, delimiters) { + let token; + const loneMarkers = []; + const max = delimiters.length; + for (let i = 0; i < max; i++) { + const startDelim = delimiters[i]; + if (startDelim.marker !== 0x7E /* ~ */) { + continue; + } + if (startDelim.end === -1) { + continue; + } + const endDelim = delimiters[startDelim.end]; + token = state.tokens[startDelim.token]; + token.type = 's_open'; + token.tag = 's'; + token.nesting = 1; + token.markup = '~~'; + token.content = ''; + token = state.tokens[endDelim.token]; + token.type = 's_close'; + token.tag = 's'; + token.nesting = -1; + token.markup = '~~'; + token.content = ''; + if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') { + loneMarkers.push(endDelim.token - 1); + } + } + + // If a marker sequence has an odd number of characters, it's splitted + // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the + // start of the sequence. + // + // So, we have to move all those markers after subsequent s_close tags. + // + while (loneMarkers.length) { + const i = loneMarkers.pop(); + let j = i + 1; + while (j < state.tokens.length && state.tokens[j].type === 's_close') { + j++; + } + j--; + if (i !== j) { + token = state.tokens[j]; + state.tokens[j] = state.tokens[i]; + state.tokens[i] = token; + } + } +} + +// Walk through delimiter list and replace text tokens with tags +// +function strikethrough_postProcess(state) { + const tokens_meta = state.tokens_meta; + const max = state.tokens_meta.length; + postProcess$1(state, state.delimiters); + for (let curr = 0; curr < max; curr++) { + if (tokens_meta[curr] && tokens_meta[curr].delimiters) { + postProcess$1(state, tokens_meta[curr].delimiters); + } + } +} +var r_strikethrough = { + tokenize: strikethrough_tokenize, + postProcess: strikethrough_postProcess +}; + +// Process *this* and _that_ +// + +// Insert each marker as a separate text token, and add it to delimiter list +// +function emphasis_tokenize(state, silent) { + const start = state.pos; + const marker = state.src.charCodeAt(start); + if (silent) { + return false; + } + if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { + return false; + } + const scanned = state.scanDelims(state.pos, marker === 0x2A); + for (let i = 0; i < scanned.length; i++) { + const token = state.push('text', '', 0); + token.content = String.fromCharCode(marker); + state.delimiters.push({ + // Char code of the starting marker (number). + // + marker, + // Total length of these series of delimiters. + // + length: scanned.length, + // A position of the token this delimiter corresponds to. + // + token: state.tokens.length - 1, + // If this delimiter is matched as a valid opener, `end` will be + // equal to its position, otherwise it's `-1`. + // + end: -1, + // Boolean flags that determine if this delimiter could open or close + // an emphasis. + // + open: scanned.can_open, + close: scanned.can_close + }); + } + state.pos += scanned.length; + return true; +} +function postProcess(state, delimiters) { + const max = delimiters.length; + for (let i = max - 1; i >= 0; i--) { + const startDelim = delimiters[i]; + if (startDelim.marker !== 0x5F /* _ */ && startDelim.marker !== 0x2A /* * */) { + continue; + } + + // Process only opening markers + if (startDelim.end === -1) { + continue; + } + const endDelim = delimiters[startDelim.end]; + + // If the previous delimiter has the same marker and is adjacent to this one, + // merge those into one strong delimiter. + // + // `whatever` -> `whatever` + // + const isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && + // check that first two markers match and adjacent + delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 && + // check that last two markers are adjacent (we can safely assume they match) + delimiters[startDelim.end + 1].token === endDelim.token + 1; + const ch = String.fromCharCode(startDelim.marker); + const token_o = state.tokens[startDelim.token]; + token_o.type = isStrong ? 'strong_open' : 'em_open'; + token_o.tag = isStrong ? 'strong' : 'em'; + token_o.nesting = 1; + token_o.markup = isStrong ? ch + ch : ch; + token_o.content = ''; + const token_c = state.tokens[endDelim.token]; + token_c.type = isStrong ? 'strong_close' : 'em_close'; + token_c.tag = isStrong ? 'strong' : 'em'; + token_c.nesting = -1; + token_c.markup = isStrong ? ch + ch : ch; + token_c.content = ''; + if (isStrong) { + state.tokens[delimiters[i - 1].token].content = ''; + state.tokens[delimiters[startDelim.end + 1].token].content = ''; + i--; + } + } +} + +// Walk through delimiter list and replace text tokens with tags +// +function emphasis_post_process(state) { + const tokens_meta = state.tokens_meta; + const max = state.tokens_meta.length; + postProcess(state, state.delimiters); + for (let curr = 0; curr < max; curr++) { + if (tokens_meta[curr] && tokens_meta[curr].delimiters) { + postProcess(state, tokens_meta[curr].delimiters); + } + } +} +var r_emphasis = { + tokenize: emphasis_tokenize, + postProcess: emphasis_post_process +}; + +// Process [link]( "stuff") + +function link(state, silent) { + let code, label, res, ref; + let href = ''; + let title = ''; + let start = state.pos; + let parseReference = true; + if (state.src.charCodeAt(state.pos) !== 0x5B /* [ */) { + return false; + } + const oldPos = state.pos; + const max = state.posMax; + const labelStart = state.pos + 1; + const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true); + + // parser failed to find ']', so it's not a valid link + if (labelEnd < 0) { + return false; + } + let pos = labelEnd + 1; + if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) { + // + // Inline link + // + + // might have found a valid shortcut link, disable reference parsing + parseReference = false; + + // [link]( "title" ) + // ^^ skipping these spaces + pos++; + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + if (pos >= max) { + return false; + } + + // [link]( "title" ) + // ^^^^^^ parsing link destination + start = pos; + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); + if (res.ok) { + href = state.md.normalizeLink(res.str); + if (state.md.validateLink(href)) { + pos = res.pos; + } else { + href = ''; + } + + // [link]( "title" ) + // ^^ skipping these spaces + start = pos; + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + + // [link]( "title" ) + // ^^^^^^^ parsing link title + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); + if (pos < max && start !== pos && res.ok) { + title = res.str; + pos = res.pos; + + // [link]( "title" ) + // ^^ skipping these spaces + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + } + } + if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) { + // parsing a valid shortcut link failed, fallback to reference + parseReference = true; + } + pos++; + } + if (parseReference) { + // + // Link reference + // + if (typeof state.env.references === 'undefined') { + return false; + } + if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) { + start = pos + 1; + pos = state.md.helpers.parseLinkLabel(state, pos); + if (pos >= 0) { + label = state.src.slice(start, pos++); + } else { + pos = labelEnd + 1; + } + } else { + pos = labelEnd + 1; + } + + // covers label === '' and label === undefined + // (collapsed reference link and shortcut reference link respectively) + if (!label) { + label = state.src.slice(labelStart, labelEnd); + } + ref = state.env.references[normalizeReference(label)]; + if (!ref) { + state.pos = oldPos; + return false; + } + href = ref.href; + title = ref.title; + } + + // + // We found the end of the link, and know for a fact it's a valid link; + // so all that's left to do is to call tokenizer. + // + if (!silent) { + state.pos = labelStart; + state.posMax = labelEnd; + const token_o = state.push('link_open', 'a', 1); + const attrs = [['href', href]]; + token_o.attrs = attrs; + if (title) { + attrs.push(['title', title]); + } + state.linkLevel++; + state.md.inline.tokenize(state); + state.linkLevel--; + state.push('link_close', 'a', -1); + } + state.pos = pos; + state.posMax = max; + return true; +} + +// Process ![image]( "title") + +function image(state, silent) { + let code, content, label, pos, ref, res, title, start; + let href = ''; + const oldPos = state.pos; + const max = state.posMax; + if (state.src.charCodeAt(state.pos) !== 0x21 /* ! */) { + return false; + } + if (state.src.charCodeAt(state.pos + 1) !== 0x5B /* [ */) { + return false; + } + const labelStart = state.pos + 2; + const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false); + + // parser failed to find ']', so it's not a valid link + if (labelEnd < 0) { + return false; + } + pos = labelEnd + 1; + if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) { + // + // Inline link + // + + // [link]( "title" ) + // ^^ skipping these spaces + pos++; + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + if (pos >= max) { + return false; + } + + // [link]( "title" ) + // ^^^^^^ parsing link destination + start = pos; + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); + if (res.ok) { + href = state.md.normalizeLink(res.str); + if (state.md.validateLink(href)) { + pos = res.pos; + } else { + href = ''; + } + } + + // [link]( "title" ) + // ^^ skipping these spaces + start = pos; + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + + // [link]( "title" ) + // ^^^^^^^ parsing link title + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); + if (pos < max && start !== pos && res.ok) { + title = res.str; + pos = res.pos; + + // [link]( "title" ) + // ^^ skipping these spaces + for (; pos < max; pos++) { + code = state.src.charCodeAt(pos); + if (!isSpace(code) && code !== 0x0A) { + break; + } + } + } else { + title = ''; + } + if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) { + state.pos = oldPos; + return false; + } + pos++; + } else { + // + // Link reference + // + if (typeof state.env.references === 'undefined') { + return false; + } + if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) { + start = pos + 1; + pos = state.md.helpers.parseLinkLabel(state, pos); + if (pos >= 0) { + label = state.src.slice(start, pos++); + } else { + pos = labelEnd + 1; + } + } else { + pos = labelEnd + 1; + } + + // covers label === '' and label === undefined + // (collapsed reference link and shortcut reference link respectively) + if (!label) { + label = state.src.slice(labelStart, labelEnd); + } + ref = state.env.references[normalizeReference(label)]; + if (!ref) { + state.pos = oldPos; + return false; + } + href = ref.href; + title = ref.title; + } + + // + // We found the end of the link, and know for a fact it's a valid link; + // so all that's left to do is to call tokenizer. + // + if (!silent) { + content = state.src.slice(labelStart, labelEnd); + const tokens = []; + state.md.inline.parse(content, state.md, state.env, tokens); + const token = state.push('image', 'img', 0); + const attrs = [['src', href], ['alt', '']]; + token.attrs = attrs; + token.children = tokens; + token.content = content; + if (title) { + attrs.push(['title', title]); + } + } + state.pos = pos; + state.posMax = max; + return true; +} + +// Process autolinks '' + +/* eslint max-len:0 */ +const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/; +/* eslint-disable-next-line no-control-regex */ +const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/; +function autolink(state, silent) { + let pos = state.pos; + if (state.src.charCodeAt(pos) !== 0x3C /* < */) { + return false; + } + const start = state.pos; + const max = state.posMax; + for (;;) { + if (++pos >= max) return false; + const ch = state.src.charCodeAt(pos); + if (ch === 0x3C /* < */) return false; + if (ch === 0x3E /* > */) break; + } + const url = state.src.slice(start + 1, pos); + if (AUTOLINK_RE.test(url)) { + const fullUrl = state.md.normalizeLink(url); + if (!state.md.validateLink(fullUrl)) { + return false; + } + if (!silent) { + const token_o = state.push('link_open', 'a', 1); + token_o.attrs = [['href', fullUrl]]; + token_o.markup = 'autolink'; + token_o.info = 'auto'; + const token_t = state.push('text', '', 0); + token_t.content = state.md.normalizeLinkText(url); + const token_c = state.push('link_close', 'a', -1); + token_c.markup = 'autolink'; + token_c.info = 'auto'; + } + state.pos += url.length + 2; + return true; + } + if (EMAIL_RE.test(url)) { + const fullUrl = state.md.normalizeLink('mailto:' + url); + if (!state.md.validateLink(fullUrl)) { + return false; + } + if (!silent) { + const token_o = state.push('link_open', 'a', 1); + token_o.attrs = [['href', fullUrl]]; + token_o.markup = 'autolink'; + token_o.info = 'auto'; + const token_t = state.push('text', '', 0); + token_t.content = state.md.normalizeLinkText(url); + const token_c = state.push('link_close', 'a', -1); + token_c.markup = 'autolink'; + token_c.info = 'auto'; + } + state.pos += url.length + 2; + return true; + } + return false; +} + +// Process html tags + +function isLinkOpen(str) { + return /^\s]/i.test(str); +} +function isLinkClose(str) { + return /^<\/a\s*>/i.test(str); +} +function isLetter(ch) { + /* eslint no-bitwise:0 */ + const lc = ch | 0x20; // to lower case + return lc >= 0x61 /* a */ && lc <= 0x7a /* z */; +} +function html_inline(state, silent) { + if (!state.md.options.html) { + return false; + } + + // Check start + const max = state.posMax; + const pos = state.pos; + if (state.src.charCodeAt(pos) !== 0x3C /* < */ || pos + 2 >= max) { + return false; + } + + // Quick fail on second char + const ch = state.src.charCodeAt(pos + 1); + if (ch !== 0x21 /* ! */ && ch !== 0x3F /* ? */ && ch !== 0x2F /* / */ && !isLetter(ch)) { + return false; + } + const match = state.src.slice(pos).match(HTML_TAG_RE); + if (!match) { + return false; + } + if (!silent) { + const token = state.push('html_inline', '', 0); + token.content = match[0]; + if (isLinkOpen(token.content)) state.linkLevel++; + if (isLinkClose(token.content)) state.linkLevel--; + } + state.pos += match[0].length; + return true; +} + +// Process html entity - {, ¯, ", ... + +const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i; +const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i; +function entity(state, silent) { + const pos = state.pos; + const max = state.posMax; + if (state.src.charCodeAt(pos) !== 0x26 /* & */) return false; + if (pos + 1 >= max) return false; + const ch = state.src.charCodeAt(pos + 1); + if (ch === 0x23 /* # */) { + const match = state.src.slice(pos).match(DIGITAL_RE); + if (match) { + if (!silent) { + const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10); + const token = state.push('text_special', '', 0); + token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD); + token.markup = match[0]; + token.info = 'entity'; + } + state.pos += match[0].length; + return true; + } + } else { + const match = state.src.slice(pos).match(NAMED_RE); + if (match) { + const decoded = entities.decodeHTML(match[0]); + if (decoded !== match[0]) { + if (!silent) { + const token = state.push('text_special', '', 0); + token.content = decoded; + token.markup = match[0]; + token.info = 'entity'; + } + state.pos += match[0].length; + return true; + } + } + } + return false; +} + +// For each opening emphasis-like marker find a matching closing one +// + +function processDelimiters(delimiters) { + const openersBottom = {}; + const max = delimiters.length; + if (!max) return; + + // headerIdx is the first delimiter of the current (where closer is) delimiter run + let headerIdx = 0; + let lastTokenIdx = -2; // needs any value lower than -1 + const jumps = []; + for (let closerIdx = 0; closerIdx < max; closerIdx++) { + const closer = delimiters[closerIdx]; + jumps.push(0); + + // markers belong to same delimiter run if: + // - they have adjacent tokens + // - AND markers are the same + // + if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) { + headerIdx = closerIdx; + } + lastTokenIdx = closer.token; + + // Length is only used for emphasis-specific "rule of 3", + // if it's not defined (in strikethrough or 3rd party plugins), + // we can default it to 0 to disable those checks. + // + closer.length = closer.length || 0; + if (!closer.close) continue; + + // Previously calculated lower bounds (previous fails) + // for each marker, each delimiter length modulo 3, + // and for whether this closer can be an opener; + // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460 + /* eslint-disable-next-line no-prototype-builtins */ + if (!openersBottom.hasOwnProperty(closer.marker)) { + openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]; + } + const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3]; + let openerIdx = headerIdx - jumps[headerIdx] - 1; + let newMinOpenerIdx = openerIdx; + for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) { + const opener = delimiters[openerIdx]; + if (opener.marker !== closer.marker) continue; + if (opener.open && opener.end < 0) { + let isOddMatch = false; + + // from spec: + // + // If one of the delimiters can both open and close emphasis, then the + // sum of the lengths of the delimiter runs containing the opening and + // closing delimiters must not be a multiple of 3 unless both lengths + // are multiples of 3. + // + if (opener.close || closer.open) { + if ((opener.length + closer.length) % 3 === 0) { + if (opener.length % 3 !== 0 || closer.length % 3 !== 0) { + isOddMatch = true; + } + } + } + if (!isOddMatch) { + // If previous delimiter cannot be an opener, we can safely skip + // the entire sequence in future checks. This is required to make + // sure algorithm has linear complexity (see *_*_*_*_*_... case). + // + const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0; + jumps[closerIdx] = closerIdx - openerIdx + lastJump; + jumps[openerIdx] = lastJump; + closer.open = false; + opener.end = closerIdx; + opener.close = false; + newMinOpenerIdx = -1; + // treat next token as start of run, + // it optimizes skips in **<...>**a**<...>** pathological case + lastTokenIdx = -2; + break; + } + } + } + if (newMinOpenerIdx !== -1) { + // If match for this delimiter run failed, we want to set lower bound for + // future lookups. This is required to make sure algorithm has linear + // complexity. + // + // See details here: + // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442 + // + openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx; + } + } +} +function link_pairs(state) { + const tokens_meta = state.tokens_meta; + const max = state.tokens_meta.length; + processDelimiters(state.delimiters); + for (let curr = 0; curr < max; curr++) { + if (tokens_meta[curr] && tokens_meta[curr].delimiters) { + processDelimiters(tokens_meta[curr].delimiters); + } + } +} + +// Clean up tokens after emphasis and strikethrough postprocessing: +// merge adjacent text nodes into one and re-calculate all token levels +// +// This is necessary because initially emphasis delimiter markers (*, _, ~) +// are treated as their own separate text tokens. Then emphasis rule either +// leaves them as text (needed to merge with adjacent text) or turns them +// into opening/closing tags (which messes up levels inside). +// + +function fragments_join(state) { + let curr, last; + let level = 0; + const tokens = state.tokens; + const max = state.tokens.length; + for (curr = last = 0; curr < max; curr++) { + // re-calculate levels after emphasis/strikethrough turns some text nodes + // into opening/closing tags + if (tokens[curr].nesting < 0) level--; // closing tag + tokens[curr].level = level; + if (tokens[curr].nesting > 0) level++; // opening tag + + if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') { + // collapse two adjacent text nodes + tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; + } else { + if (curr !== last) { + tokens[last] = tokens[curr]; + } + last++; + } + } + if (curr !== last) { + tokens.length = last; + } +} + +/** internal + * class ParserInline + * + * Tokenizes paragraph content. + **/ + +// Parser rules + +const _rules = [['text', text], ['linkify', linkify], ['newline', newline], ['escape', escape], ['backticks', backtick], ['strikethrough', r_strikethrough.tokenize], ['emphasis', r_emphasis.tokenize], ['link', link], ['image', image], ['autolink', autolink], ['html_inline', html_inline], ['entity', entity]]; + +// `rule2` ruleset was created specifically for emphasis/strikethrough +// post-processing and may be changed in the future. +// +// Don't use this for anything except pairs (plugins working with `balance_pairs`). +// +const _rules2 = [['balance_pairs', link_pairs], ['strikethrough', r_strikethrough.postProcess], ['emphasis', r_emphasis.postProcess], +// rules for pairs separate '**' into its own text tokens, which may be left unused, +// rule below merges unused segments back with the rest of the text +['fragments_join', fragments_join]]; + +/** + * new ParserInline() + **/ +function ParserInline() { + /** + * ParserInline#ruler -> Ruler + * + * [[Ruler]] instance. Keep configuration of inline rules. + **/ + this.ruler = new Ruler(); + for (let i = 0; i < _rules.length; i++) { + this.ruler.push(_rules[i][0], _rules[i][1]); + } + + /** + * ParserInline#ruler2 -> Ruler + * + * [[Ruler]] instance. Second ruler used for post-processing + * (e.g. in emphasis-like rules). + **/ + this.ruler2 = new Ruler(); + for (let i = 0; i < _rules2.length; i++) { + this.ruler2.push(_rules2[i][0], _rules2[i][1]); + } +} + +// Skip single token by running all rules in validation mode; +// returns `true` if any rule reported success +// +ParserInline.prototype.skipToken = function (state) { + const pos = state.pos; + const rules = this.ruler.getRules(''); + const len = rules.length; + const maxNesting = state.md.options.maxNesting; + const cache = state.cache; + if (typeof cache[pos] !== 'undefined') { + state.pos = cache[pos]; + return; + } + let ok = false; + if (state.level < maxNesting) { + for (let i = 0; i < len; i++) { + // Increment state.level and decrement it later to limit recursion. + // It's harmless to do here, because no tokens are created. But ideally, + // we'd need a separate private state variable for this purpose. + // + state.level++; + ok = rules[i](state, true); + state.level--; + if (ok) { + if (pos >= state.pos) { + throw new Error("inline rule didn't increment state.pos"); + } + break; + } + } + } else { + // Too much nesting, just skip until the end of the paragraph. + // + // NOTE: this will cause links to behave incorrectly in the following case, + // when an amount of `[` is exactly equal to `maxNesting + 1`: + // + // [[[[[[[[[[[[[[[[[[[[[foo]() + // + // TODO: remove this workaround when CM standard will allow nested links + // (we can replace it by preventing links from being parsed in + // validation mode) + // + state.pos = state.posMax; + } + if (!ok) { + state.pos++; + } + cache[pos] = state.pos; +}; + +// Generate tokens for input range +// +ParserInline.prototype.tokenize = function (state) { + const rules = this.ruler.getRules(''); + const len = rules.length; + const end = state.posMax; + const maxNesting = state.md.options.maxNesting; + while (state.pos < end) { + // Try all possible rules. + // On success, rule should: + // + // - update `state.pos` + // - update `state.tokens` + // - return true + const prevPos = state.pos; + let ok = false; + if (state.level < maxNesting) { + for (let i = 0; i < len; i++) { + ok = rules[i](state, false); + if (ok) { + if (prevPos >= state.pos) { + throw new Error("inline rule didn't increment state.pos"); + } + break; + } + } + } + if (ok) { + if (state.pos >= end) { + break; + } + continue; + } + state.pending += state.src[state.pos++]; + } + if (state.pending) { + state.pushPending(); + } +}; + +/** + * ParserInline.parse(str, md, env, outTokens) + * + * Process input string and push inline tokens into `outTokens` + **/ +ParserInline.prototype.parse = function (str, md, env, outTokens) { + const state = new this.State(str, md, env, outTokens); + this.tokenize(state); + const rules = this.ruler2.getRules(''); + const len = rules.length; + for (let i = 0; i < len; i++) { + rules[i](state); + } +}; +ParserInline.prototype.State = StateInline; + +// markdown-it default options + +var cfg_default = { + options: { + // Enable HTML tags in source + html: false, + // Use '/' to close single tags (
) + xhtmlOut: false, + // Convert '\n' in paragraphs into
+ breaks: false, + // CSS language prefix for fenced blocks + langPrefix: 'language-', + // autoconvert URL-like texts to links + linkify: false, + // Enable some language-neutral replacements + quotes beautification + typographer: false, + // Double + single quotes replacement pairs, when typographer enabled, + // and smartquotes on. Could be either a String or an Array. + // + // For example, you can use '«»„“' for Russian, '„“‚‘' for German, + // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + quotes: '\u201c\u201d\u2018\u2019', + /* “”‘’ */ + + // Highlighter function. Should return escaped HTML, + // or '' if the source string is not changed and should be escaped externaly. + // If result starts with ) + xhtmlOut: false, + // Convert '\n' in paragraphs into
+ breaks: false, + // CSS language prefix for fenced blocks + langPrefix: 'language-', + // autoconvert URL-like texts to links + linkify: false, + // Enable some language-neutral replacements + quotes beautification + typographer: false, + // Double + single quotes replacement pairs, when typographer enabled, + // and smartquotes on. Could be either a String or an Array. + // + // For example, you can use '«»„“' for Russian, '„“‚‘' for German, + // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + quotes: '\u201c\u201d\u2018\u2019', + /* “”‘’ */ + + // Highlighter function. Should return escaped HTML, + // or '' if the source string is not changed and should be escaped externaly. + // If result starts with ) + xhtmlOut: true, + // Convert '\n' in paragraphs into
+ breaks: false, + // CSS language prefix for fenced blocks + langPrefix: 'language-', + // autoconvert URL-like texts to links + linkify: false, + // Enable some language-neutral replacements + quotes beautification + typographer: false, + // Double + single quotes replacement pairs, when typographer enabled, + // and smartquotes on. Could be either a String or an Array. + // + // For example, you can use '«»„“' for Russian, '„“‚‘' for German, + // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + quotes: '\u201c\u201d\u2018\u2019', + /* “”‘’ */ + + // Highlighter function. Should return escaped HTML, + // or '' if the source string is not changed and should be escaped externaly. + // If result starts with = 0) { + try { + parsed.hostname = punycode.toASCII(parsed.hostname); + } catch (er) {/**/} + } + } + return mdurl__namespace.encode(mdurl__namespace.format(parsed)); +} +function normalizeLinkText(url) { + const parsed = mdurl__namespace.parse(url, true); + if (parsed.hostname) { + // Encode hostnames in urls like: + // `http://host/`, `https://host/`, `mailto:user@host`, `//host/` + // + // We don't encode unknown schemas, because it's likely that we encode + // something we shouldn't (e.g. `skype:name` treated as `skype:host`) + // + if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) { + try { + parsed.hostname = punycode.toUnicode(parsed.hostname); + } catch (er) {/**/} + } + } + + // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720 + return mdurl__namespace.decode(mdurl__namespace.format(parsed), mdurl__namespace.decode.defaultChars + '%'); +} + +/** + * class MarkdownIt + * + * Main parser/renderer class. + * + * ##### Usage + * + * ```javascript + * // node.js, "classic" way: + * var MarkdownIt = require('markdown-it'), + * md = new MarkdownIt(); + * var result = md.render('# markdown-it rulezz!'); + * + * // node.js, the same, but with sugar: + * var md = require('markdown-it')(); + * var result = md.render('# markdown-it rulezz!'); + * + * // browser without AMD, added to "window" on script load + * // Note, there are no dash. + * var md = window.markdownit(); + * var result = md.render('# markdown-it rulezz!'); + * ``` + * + * Single line rendering, without paragraph wrap: + * + * ```javascript + * var md = require('markdown-it')(); + * var result = md.renderInline('__markdown-it__ rulezz!'); + * ``` + **/ + +/** + * new MarkdownIt([presetName, options]) + * - presetName (String): optional, `commonmark` / `zero` + * - options (Object) + * + * Creates parser instanse with given config. Can be called without `new`. + * + * ##### presetName + * + * MarkdownIt provides named presets as a convenience to quickly + * enable/disable active syntax rules and options for common use cases. + * + * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) - + * configures parser to strict [CommonMark](http://commonmark.org/) mode. + * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) - + * similar to GFM, used when no preset name given. Enables all available rules, + * but still without html, typographer & autolinker. + * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) - + * all rules disabled. Useful to quickly setup your config via `.enable()`. + * For example, when you need only `bold` and `italic` markup and nothing else. + * + * ##### options: + * + * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful! + * That's not safe! You may need external sanitizer to protect output from XSS. + * It's better to extend features via plugins, instead of enabling HTML. + * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags + * (`
`). This is needed only for full CommonMark compatibility. In real + * world you will need HTML output. + * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `
`. + * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks. + * Can be useful for external highlighters. + * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links. + * - __typographer__ - `false`. Set `true` to enable [some language-neutral + * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) + + * quotes beautification (smartquotes). + * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement + * pairs, when typographer enabled and smartquotes on. For example, you can + * use `'«»„“'` for Russian, `'„“‚‘'` for German, and + * `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp). + * - __highlight__ - `null`. Highlighter function for fenced code blocks. + * Highlighter `function (str, lang)` should return escaped HTML. It can also + * return empty string if the source was not changed and should be escaped + * externaly. If result starts with ` or ``): + * + * ```javascript + * var hljs = require('highlight.js') // https://highlightjs.org/ + * + * // Actual default values + * var md = require('markdown-it')({ + * highlight: function (str, lang) { + * if (lang && hljs.getLanguage(lang)) { + * try { + * return '
' +
+ *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
+ *                '
'; + * } catch (__) {} + * } + * + * return '
' + md.utils.escapeHtml(str) + '
'; + * } + * }); + * ``` + * + **/ +function MarkdownIt(presetName, options) { + if (!(this instanceof MarkdownIt)) { + return new MarkdownIt(presetName, options); + } + if (!options) { + if (!isString(presetName)) { + options = presetName || {}; + presetName = 'default'; + } + } + + /** + * MarkdownIt#inline -> ParserInline + * + * Instance of [[ParserInline]]. You may need it to add new rules when + * writing plugins. For simple rules control use [[MarkdownIt.disable]] and + * [[MarkdownIt.enable]]. + **/ + this.inline = new ParserInline(); + + /** + * MarkdownIt#block -> ParserBlock + * + * Instance of [[ParserBlock]]. You may need it to add new rules when + * writing plugins. For simple rules control use [[MarkdownIt.disable]] and + * [[MarkdownIt.enable]]. + **/ + this.block = new ParserBlock(); + + /** + * MarkdownIt#core -> Core + * + * Instance of [[Core]] chain executor. You may need it to add new rules when + * writing plugins. For simple rules control use [[MarkdownIt.disable]] and + * [[MarkdownIt.enable]]. + **/ + this.core = new Core(); + + /** + * MarkdownIt#renderer -> Renderer + * + * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering + * rules for new token types, generated by plugins. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')(); + * + * function myToken(tokens, idx, options, env, self) { + * //... + * return result; + * }; + * + * md.renderer.rules['my_token'] = myToken + * ``` + * + * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs). + **/ + this.renderer = new Renderer(); + + /** + * MarkdownIt#linkify -> LinkifyIt + * + * [linkify-it](https://github.com/markdown-it/linkify-it) instance. + * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs) + * rule. + **/ + this.linkify = new LinkifyIt(); + + /** + * MarkdownIt#validateLink(url) -> Boolean + * + * Link validation function. CommonMark allows too much in links. By default + * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas + * except some embedded image types. + * + * You can change this behaviour: + * + * ```javascript + * var md = require('markdown-it')(); + * // enable everything + * md.validateLink = function () { return true; } + * ``` + **/ + this.validateLink = validateLink; + + /** + * MarkdownIt#normalizeLink(url) -> String + * + * Function used to encode link url to a machine-readable format, + * which includes url-encoding, punycode, etc. + **/ + this.normalizeLink = normalizeLink; + + /** + * MarkdownIt#normalizeLinkText(url) -> String + * + * Function used to decode link url to a human-readable format` + **/ + this.normalizeLinkText = normalizeLinkText; + + // Expose utils & helpers for easy acces from plugins + + /** + * MarkdownIt#utils -> utils + * + * Assorted utility functions, useful to write plugins. See details + * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs). + **/ + this.utils = utils; + + /** + * MarkdownIt#helpers -> helpers + * + * Link components parser functions, useful to write plugins. See details + * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers). + **/ + this.helpers = assign({}, helpers); + this.options = {}; + this.configure(presetName); + if (options) { + this.set(options); + } +} + +/** chainable + * MarkdownIt.set(options) + * + * Set parser options (in the same format as in constructor). Probably, you + * will never need it, but you can change options after constructor call. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')() + * .set({ html: true, breaks: true }) + * .set({ typographer, true }); + * ``` + * + * __Note:__ To achieve the best possible performance, don't modify a + * `markdown-it` instance options on the fly. If you need multiple configurations + * it's best to create multiple instances and initialize each with separate + * config. + **/ +MarkdownIt.prototype.set = function (options) { + assign(this.options, options); + return this; +}; + +/** chainable, internal + * MarkdownIt.configure(presets) + * + * Batch load of all options and compenent settings. This is internal method, + * and you probably will not need it. But if you will - see available presets + * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets) + * + * We strongly recommend to use presets instead of direct config loads. That + * will give better compatibility with next versions. + **/ +MarkdownIt.prototype.configure = function (presets) { + const self = this; + if (isString(presets)) { + const presetName = presets; + presets = config[presetName]; + if (!presets) { + throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); + } + } + if (!presets) { + throw new Error('Wrong `markdown-it` preset, can\'t be empty'); + } + if (presets.options) { + self.set(presets.options); + } + if (presets.components) { + Object.keys(presets.components).forEach(function (name) { + if (presets.components[name].rules) { + self[name].ruler.enableOnly(presets.components[name].rules); + } + if (presets.components[name].rules2) { + self[name].ruler2.enableOnly(presets.components[name].rules2); + } + }); + } + return this; +}; + +/** chainable + * MarkdownIt.enable(list, ignoreInvalid) + * - list (String|Array): rule name or list of rule names to enable + * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. + * + * Enable list or rules. It will automatically find appropriate components, + * containing rules with given names. If rule not found, and `ignoreInvalid` + * not set - throws exception. + * + * ##### Example + * + * ```javascript + * var md = require('markdown-it')() + * .enable(['sub', 'sup']) + * .disable('smartquotes'); + * ``` + **/ +MarkdownIt.prototype.enable = function (list, ignoreInvalid) { + let result = []; + if (!Array.isArray(list)) { + list = [list]; + } + ['core', 'block', 'inline'].forEach(function (chain) { + result = result.concat(this[chain].ruler.enable(list, true)); + }, this); + result = result.concat(this.inline.ruler2.enable(list, true)); + const missed = list.filter(function (name) { + return result.indexOf(name) < 0; + }); + if (missed.length && !ignoreInvalid) { + throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed); + } + return this; +}; + +/** chainable + * MarkdownIt.disable(list, ignoreInvalid) + * - list (String|Array): rule name or list of rule names to disable. + * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. + * + * The same as [[MarkdownIt.enable]], but turn specified rules off. + **/ +MarkdownIt.prototype.disable = function (list, ignoreInvalid) { + let result = []; + if (!Array.isArray(list)) { + list = [list]; + } + ['core', 'block', 'inline'].forEach(function (chain) { + result = result.concat(this[chain].ruler.disable(list, true)); + }, this); + result = result.concat(this.inline.ruler2.disable(list, true)); + const missed = list.filter(function (name) { + return result.indexOf(name) < 0; + }); + if (missed.length && !ignoreInvalid) { + throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed); + } + return this; +}; + +/** chainable + * MarkdownIt.use(plugin, params) + * + * Load specified plugin with given params into current parser instance. + * It's just a sugar to call `plugin(md, params)` with curring. + * + * ##### Example + * + * ```javascript + * var iterator = require('markdown-it-for-inline'); + * var md = require('markdown-it')() + * .use(iterator, 'foo_replace', 'text', function (tokens, idx) { + * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar'); + * }); + * ``` + **/ +MarkdownIt.prototype.use = function (plugin /*, params, ... */) { + const args = [this].concat(Array.prototype.slice.call(arguments, 1)); + plugin.apply(plugin, args); + return this; +}; + +/** internal + * MarkdownIt.parse(src, env) -> Array + * - src (String): source string + * - env (Object): environment sandbox + * + * Parse input string and return list of block tokens (special token type + * "inline" will contain list of inline tokens). You should not call this + * method directly, until you write custom renderer (for example, to produce + * AST). + * + * `env` is used to pass data between "distributed" rules and return additional + * metadata like reference info, needed for the renderer. It also can be used to + * inject data in specific cases. Usually, you will be ok to pass `{}`, + * and then pass updated object to renderer. + **/ +MarkdownIt.prototype.parse = function (src, env) { + if (typeof src !== 'string') { + throw new Error('Input data should be a String'); + } + const state = new this.core.State(src, this, env); + this.core.process(state); + return state.tokens; +}; + +/** + * MarkdownIt.render(src [, env]) -> String + * - src (String): source string + * - env (Object): environment sandbox + * + * Render markdown string into html. It does all magic for you :). + * + * `env` can be used to inject additional metadata (`{}` by default). + * But you will not need it with high probability. See also comment + * in [[MarkdownIt.parse]]. + **/ +MarkdownIt.prototype.render = function (src, env) { + env = env || {}; + return this.renderer.render(this.parse(src, env), this.options, env); +}; + +/** internal + * MarkdownIt.parseInline(src, env) -> Array + * - src (String): source string + * - env (Object): environment sandbox + * + * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the + * block tokens list with the single `inline` element, containing parsed inline + * tokens in `children` property. Also updates `env` object. + **/ +MarkdownIt.prototype.parseInline = function (src, env) { + const state = new this.core.State(src, this, env); + state.inlineMode = true; + this.core.process(state); + return state.tokens; +}; + +/** + * MarkdownIt.renderInline(src [, env]) -> String + * - src (String): source string + * - env (Object): environment sandbox + * + * Similar to [[MarkdownIt.render]] but for single paragraph content. Result + * will NOT be wrapped into `

` tags. + **/ +MarkdownIt.prototype.renderInline = function (src, env) { + env = env || {}; + return this.renderer.render(this.parseInline(src, env), this.options, env); +}; +module.exports = MarkdownIt; + +/***/ }), + +/***/ "../../../node_modules/mdurl/build/index.cjs.js": +/*!******************************************************!*\ + !*** ../../../node_modules/mdurl/build/index.cjs.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +/* eslint-disable no-bitwise */ +const decodeCache = {}; +function getDecodeCache(exclude) { + let cache = decodeCache[exclude]; + if (cache) { + return cache; + } + cache = decodeCache[exclude] = []; + for (let i = 0; i < 128; i++) { + const ch = String.fromCharCode(i); + cache.push(ch); + } + for (let i = 0; i < exclude.length; i++) { + const ch = exclude.charCodeAt(i); + cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2); + } + return cache; +} + +// Decode percent-encoded string. +// +function decode(string, exclude) { + if (typeof exclude !== 'string') { + exclude = decode.defaultChars; + } + const cache = getDecodeCache(exclude); + return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) { + let result = ''; + for (let i = 0, l = seq.length; i < l; i += 3) { + const b1 = parseInt(seq.slice(i + 1, i + 3), 16); + if (b1 < 0x80) { + result += cache[b1]; + continue; + } + if ((b1 & 0xE0) === 0xC0 && i + 3 < l) { + // 110xxxxx 10xxxxxx + const b2 = parseInt(seq.slice(i + 4, i + 6), 16); + if ((b2 & 0xC0) === 0x80) { + const chr = b1 << 6 & 0x7C0 | b2 & 0x3F; + if (chr < 0x80) { + result += '\ufffd\ufffd'; + } else { + result += String.fromCharCode(chr); + } + i += 3; + continue; + } + } + if ((b1 & 0xF0) === 0xE0 && i + 6 < l) { + // 1110xxxx 10xxxxxx 10xxxxxx + const b2 = parseInt(seq.slice(i + 4, i + 6), 16); + const b3 = parseInt(seq.slice(i + 7, i + 9), 16); + if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) { + const chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F; + if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) { + result += '\ufffd\ufffd\ufffd'; + } else { + result += String.fromCharCode(chr); + } + i += 6; + continue; + } + } + if ((b1 & 0xF8) === 0xF0 && i + 9 < l) { + // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx + const b2 = parseInt(seq.slice(i + 4, i + 6), 16); + const b3 = parseInt(seq.slice(i + 7, i + 9), 16); + const b4 = parseInt(seq.slice(i + 10, i + 12), 16); + if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) { + let chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F; + if (chr < 0x10000 || chr > 0x10FFFF) { + result += '\ufffd\ufffd\ufffd\ufffd'; + } else { + chr -= 0x10000; + result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF)); + } + i += 9; + continue; + } + } + result += '\ufffd'; + } + return result; + }); +} +decode.defaultChars = ';/?:@&=+$,#'; +decode.componentChars = ''; +const encodeCache = {}; + +// Create a lookup array where anything but characters in `chars` string +// and alphanumeric chars is percent-encoded. +// +function getEncodeCache(exclude) { + let cache = encodeCache[exclude]; + if (cache) { + return cache; + } + cache = encodeCache[exclude] = []; + for (let i = 0; i < 128; i++) { + const ch = String.fromCharCode(i); + if (/^[0-9a-z]$/i.test(ch)) { + // always allow unencoded alphanumeric characters + cache.push(ch); + } else { + cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2)); + } + } + for (let i = 0; i < exclude.length; i++) { + cache[exclude.charCodeAt(i)] = exclude[i]; + } + return cache; +} + +// Encode unsafe characters with percent-encoding, skipping already +// encoded sequences. +// +// - string - string to encode +// - exclude - list of characters to ignore (in addition to a-zA-Z0-9) +// - keepEscaped - don't encode '%' in a correct escape sequence (default: true) +// +function encode(string, exclude, keepEscaped) { + if (typeof exclude !== 'string') { + // encode(string, keepEscaped) + keepEscaped = exclude; + exclude = encode.defaultChars; + } + if (typeof keepEscaped === 'undefined') { + keepEscaped = true; + } + const cache = getEncodeCache(exclude); + let result = ''; + for (let i = 0, l = string.length; i < l; i++) { + const code = string.charCodeAt(i); + if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) { + if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) { + result += string.slice(i, i + 3); + i += 2; + continue; + } + } + if (code < 128) { + result += cache[code]; + continue; + } + if (code >= 0xD800 && code <= 0xDFFF) { + if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) { + const nextCode = string.charCodeAt(i + 1); + if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) { + result += encodeURIComponent(string[i] + string[i + 1]); + i++; + continue; + } + } + result += '%EF%BF%BD'; + continue; + } + result += encodeURIComponent(string[i]); + } + return result; +} +encode.defaultChars = ";/?:@&=+$,-_.!~*'()#"; +encode.componentChars = "-_.!~*'()"; +function format(url) { + let result = ''; + result += url.protocol || ''; + result += url.slashes ? '//' : ''; + result += url.auth ? url.auth + '@' : ''; + if (url.hostname && url.hostname.indexOf(':') !== -1) { + // ipv6 address + result += '[' + url.hostname + ']'; + } else { + result += url.hostname || ''; + } + result += url.port ? ':' + url.port : ''; + result += url.pathname || ''; + result += url.search || ''; + result += url.hash || ''; + return result; +} + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// +// Changes from joyent/node: +// +// 1. No leading slash in paths, +// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/` +// +// 2. Backslashes are not replaced with slashes, +// so `http:\\example.org\` is treated like a relative path +// +// 3. Trailing colon is treated like a part of the path, +// i.e. in `http://example.org:foo` pathname is `:foo` +// +// 4. Nothing is URL-encoded in the resulting object, +// (in joyent/node some chars in auth and paths are encoded) +// +// 5. `url.parse()` does not have `parseQueryString` argument +// +// 6. Removed extraneous result properties: `host`, `path`, `query`, etc., +// which can be constructed using other parts of the url. +// + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.pathname = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +const protocolPattern = /^([a-z0-9.+-]+:)/i; +const portPattern = /:[0-9]*$/; + +// Special case for a simple path URL +/* eslint-disable-next-line no-useless-escape */ +const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/; + +// RFC 2396: characters reserved for delimiting URLs. +// We actually just auto-escape these. +const delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t']; + +// RFC 2396: characters not allowed for various reasons. +const unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims); + +// Allowed by RFCs, but cause of XSS attacks. Always escape these. +const autoEscape = ['\''].concat(unwise); +// Characters that are never ever allowed in a hostname. +// Note that any invalid chars are also handled, but these +// are the ones that are *expected* to be seen, so we fast-path +// them. +const nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape); +const hostEndingChars = ['/', '?', '#']; +const hostnameMaxLen = 255; +const hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/; +const hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/; +// protocols that can allow "unsafe" and "unwise" chars. +// protocols that never have a hostname. +const hostlessProtocol = { + javascript: true, + 'javascript:': true +}; +// protocols that always contain a // bit. +const slashedProtocol = { + http: true, + https: true, + ftp: true, + gopher: true, + file: true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true +}; +function urlParse(url, slashesDenoteHost) { + if (url && url instanceof Url) return url; + const u = new Url(); + u.parse(url, slashesDenoteHost); + return u; +} +Url.prototype.parse = function (url, slashesDenoteHost) { + let lowerProto, hec, slashes; + let rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + const simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + } + return this; + } + } + let proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + lowerProto = proto.toLowerCase(); + this.protocol = proto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + /* eslint-disable-next-line no-useless-escape */ + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + let hostEnd = -1; + for (let i = 0; i < hostEndingChars.length; i++) { + hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { + hostEnd = hec; + } + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + let auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = auth; + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (let i = 0; i < nonHostChars.length; i++) { + hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { + hostEnd = hec; + } + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) { + hostEnd = rest.length; + } + if (rest[hostEnd - 1] === ':') { + hostEnd--; + } + const host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(host); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + const ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + const hostparts = this.hostname.split(/\./); + for (let i = 0, l = hostparts.length; i < l; i++) { + const part = hostparts[i]; + if (!part) { + continue; + } + if (!part.match(hostnamePartPattern)) { + let newpart = ''; + for (let j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + const validParts = hostparts.slice(0, i); + const notHost = hostparts.slice(i + 1); + const bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + } + } + + // chop off from the tail first. + const hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + const qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + rest = rest.slice(0, qm); + } + if (rest) { + this.pathname = rest; + } + if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { + this.pathname = ''; + } + return this; +}; +Url.prototype.parseHost = function (host) { + let port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) { + this.hostname = host; + } +}; +exports.decode = decode; +exports.encode = encode; +exports.format = format; +exports.parse = urlParse; + +/***/ }), + +/***/ "../../../node_modules/meros/browser/index.js": +/*!****************************************************!*\ + !*** ../../../node_modules/meros/browser/index.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +var e = new TextDecoder(); +async function t(t, n) { + if (!t.ok || !t.body || t.bodyUsed) return t; + let i = t.headers.get("content-type"); + if (!i || !~i.indexOf("multipart/")) return t; + let l = i.indexOf("boundary="), + r = "-"; + if (~l) { + let e = l + 9, + t = i.indexOf(";", e); + r = i.slice(e, t > -1 ? t : void 0).trim().replace(/"/g, ""); + } + return async function* (t, n, i) { + let l, + r, + d, + o = t.getReader(), + a = !i || !i.multiple, + f = n.length, + s = "", + c = []; + try { + let t; + e: for (; !(t = await o.read()).done;) { + let i = e.decode(t.value); + l = s.length, s += i; + let o = i.indexOf(n); + for (~o ? l += o : l = s.indexOf(n), c = []; ~l;) { + let e = s.slice(0, l), + t = s.slice(l + f); + if (r) { + let n = e.indexOf("\r\n\r\n") + 4, + i = e.lastIndexOf("\r\n", n), + l = !1, + r = e.slice(n, i > -1 ? void 0 : i), + o = String(e.slice(0, n)).trim().split("\r\n"), + f = {}, + s = o.length; + for (; d = o[--s]; d = d.split(": "), f[d.shift().toLowerCase()] = d.join(": ")); + if (d = f["content-type"], d && ~d.indexOf("application/json")) try { + r = JSON.parse(r), l = !0; + } catch (e) {} + if (d = { + headers: f, + body: r, + json: l + }, a ? yield d : c.push(d), "--" === t.slice(0, 2)) break e; + } else n = "\r\n" + n, r = f += 2; + s = t, l = s.indexOf(n); + } + c.length && (yield c); + } + } finally { + c.length && (yield c), await o.cancel(); + } + }(t.body, `--${r}`, n); +} +exports.meros = t; + +/***/ }), + +/***/ "../../../node_modules/nullthrows/nullthrows.js": +/*!******************************************************!*\ + !*** ../../../node_modules/nullthrows/nullthrows.js ***! + \******************************************************/ +/***/ (function(module) { + +"use strict"; + + +function nullthrows(x, message) { + if (x != null) { + return x; + } + var error = new Error(message !== undefined ? message : 'Got unexpected ' + x); + error.framesToPop = 1; // Skip nullthrows's own stack frame. + throw error; +} +module.exports = nullthrows; +module.exports["default"] = nullthrows; +Object.defineProperty(module.exports, "__esModule", ({ + value: true +})); + +/***/ }), + +/***/ "../../../node_modules/popmotion/dist/popmotion.cjs.js": +/*!*************************************************************!*\ + !*** ../../../node_modules/popmotion/dist/popmotion.cjs.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js"); +var styleValueTypes = __webpack_require__(/*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js"); +var sync = __webpack_require__(/*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js"); +function _interopDefaultLegacy(e) { + return e && typeof e === 'object' && 'default' in e ? e : { + 'default': e + }; +} +var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync); +const clamp = (min, max, v) => Math.min(Math.max(v, min), max); +const safeMin = 0.001; +const minDuration = 0.01; +const maxDuration = 10.0; +const minDamping = 0.05; +const maxDamping = 1; +function findSpring({ + duration = 800, + bounce = 0.25, + velocity = 0, + mass = 1 +}) { + let envelope; + let derivative; + heyListen.warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less"); + let dampingRatio = 1 - bounce; + dampingRatio = clamp(minDamping, maxDamping, dampingRatio); + duration = clamp(minDuration, maxDuration, duration / 1000); + if (dampingRatio < 1) { + envelope = undampedFreq => { + const exponentialDecay = undampedFreq * dampingRatio; + const delta = exponentialDecay * duration; + const a = exponentialDecay - velocity; + const b = calcAngularFreq(undampedFreq, dampingRatio); + const c = Math.exp(-delta); + return safeMin - a / b * c; + }; + derivative = undampedFreq => { + const exponentialDecay = undampedFreq * dampingRatio; + const delta = exponentialDecay * duration; + const d = delta * velocity + velocity; + const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; + const f = Math.exp(-delta); + const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); + const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; + return factor * ((d - e) * f) / g; + }; + } else { + envelope = undampedFreq => { + const a = Math.exp(-undampedFreq * duration); + const b = (undampedFreq - velocity) * duration + 1; + return -safeMin + a * b; + }; + derivative = undampedFreq => { + const a = Math.exp(-undampedFreq * duration); + const b = (velocity - undampedFreq) * (duration * duration); + return a * b; + }; + } + const initialGuess = 5 / duration; + const undampedFreq = approximateRoot(envelope, derivative, initialGuess); + duration = duration * 1000; + if (isNaN(undampedFreq)) { + return { + stiffness: 100, + damping: 10, + duration + }; + } else { + const stiffness = Math.pow(undampedFreq, 2) * mass; + return { + stiffness, + damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), + duration + }; + } +} +const rootIterations = 12; +function approximateRoot(envelope, derivative, initialGuess) { + let result = initialGuess; + for (let i = 1; i < rootIterations; i++) { + result = result - envelope(result) / derivative(result); + } + return result; +} +function calcAngularFreq(undampedFreq, dampingRatio) { + return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); +} +const durationKeys = ["duration", "bounce"]; +const physicsKeys = ["stiffness", "damping", "mass"]; +function isSpringType(options, keys) { + return keys.some(key => options[key] !== undefined); +} +function getSpringOptions(options) { + let springOptions = Object.assign({ + velocity: 0.0, + stiffness: 100, + damping: 10, + mass: 1.0, + isResolvedFromDuration: false + }, options); + if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) { + const derived = findSpring(options); + springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { + velocity: 0.0, + mass: 1.0 + }); + springOptions.isResolvedFromDuration = true; + } + return springOptions; +} +function spring(_a) { + var { + from = 0.0, + to = 1.0, + restSpeed = 2, + restDelta + } = _a, + options = tslib.__rest(_a, ["from", "to", "restSpeed", "restDelta"]); + const state = { + done: false, + value: from + }; + let { + stiffness, + damping, + mass, + velocity, + duration, + isResolvedFromDuration + } = getSpringOptions(options); + let resolveSpring = zero; + let resolveVelocity = zero; + function createSpring() { + const initialVelocity = velocity ? -(velocity / 1000) : 0.0; + const initialDelta = to - from; + const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); + const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000; + if (restDelta === undefined) { + restDelta = Math.min(Math.abs(to - from) / 100, 0.4); + } + if (dampingRatio < 1) { + const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); + resolveSpring = t => { + const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t)); + }; + resolveVelocity = t => { + const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + return dampingRatio * undampedAngularFreq * envelope * (Math.sin(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq + initialDelta * Math.cos(angularFreq * t)) - envelope * (Math.cos(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq * initialDelta * Math.sin(angularFreq * t)); + }; + } else if (dampingRatio === 1) { + resolveSpring = t => to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t); + } else { + const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); + resolveSpring = t => { + const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + const freqForT = Math.min(dampedAngularFreq * t, 300); + return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq; + }; + } + } + createSpring(); + return { + next: t => { + const current = resolveSpring(t); + if (!isResolvedFromDuration) { + const currentVelocity = resolveVelocity(t) * 1000; + const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed; + const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta; + state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold; + } else { + state.done = t >= duration; + } + state.value = state.done ? to : current; + return state; + }, + flipTarget: () => { + velocity = -velocity; + [from, to] = [to, from]; + createSpring(); + } + }; +} +spring.needsInterpolation = (a, b) => typeof a === "string" || typeof b === "string"; +const zero = _t => 0; +const progress = (from, to, value) => { + const toFromDifference = to - from; + return toFromDifference === 0 ? 1 : (value - from) / toFromDifference; +}; +const mix = (from, to, progress) => -progress * from + progress * to + from; +function hueToRgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; +} +function hslaToRgba({ + hue, + saturation, + lightness, + alpha +}) { + hue /= 360; + saturation /= 100; + lightness /= 100; + let red = 0; + let green = 0; + let blue = 0; + if (!saturation) { + red = green = blue = lightness; + } else { + const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation; + const p = 2 * lightness - q; + red = hueToRgb(p, q, hue + 1 / 3); + green = hueToRgb(p, q, hue); + blue = hueToRgb(p, q, hue - 1 / 3); + } + return { + red: Math.round(red * 255), + green: Math.round(green * 255), + blue: Math.round(blue * 255), + alpha + }; +} +const mixLinearColor = (from, to, v) => { + const fromExpo = from * from; + const toExpo = to * to; + return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo)); +}; +const colorTypes = [styleValueTypes.hex, styleValueTypes.rgba, styleValueTypes.hsla]; +const getColorType = v => colorTypes.find(type => type.test(v)); +const notAnimatable = color => `'${color}' is not an animatable color. Use the equivalent color code instead.`; +const mixColor = (from, to) => { + let fromColorType = getColorType(from); + let toColorType = getColorType(to); + heyListen.invariant(!!fromColorType, notAnimatable(from)); + heyListen.invariant(!!toColorType, notAnimatable(to)); + let fromColor = fromColorType.parse(from); + let toColor = toColorType.parse(to); + if (fromColorType === styleValueTypes.hsla) { + fromColor = hslaToRgba(fromColor); + fromColorType = styleValueTypes.rgba; + } + if (toColorType === styleValueTypes.hsla) { + toColor = hslaToRgba(toColor); + toColorType = styleValueTypes.rgba; + } + const blended = Object.assign({}, fromColor); + return v => { + for (const key in blended) { + if (key !== "alpha") { + blended[key] = mixLinearColor(fromColor[key], toColor[key], v); + } + } + blended.alpha = mix(fromColor.alpha, toColor.alpha, v); + return fromColorType.transform(blended); + }; +}; +const zeroPoint = { + x: 0, + y: 0, + z: 0 +}; +const isNum = v => typeof v === 'number'; +const combineFunctions = (a, b) => v => b(a(v)); +const pipe = (...transformers) => transformers.reduce(combineFunctions); +function getMixer(origin, target) { + if (isNum(origin)) { + return v => mix(origin, target, v); + } else if (styleValueTypes.color.test(origin)) { + return mixColor(origin, target); + } else { + return mixComplex(origin, target); + } +} +const mixArray = (from, to) => { + const output = [...from]; + const numValues = output.length; + const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i])); + return v => { + for (let i = 0; i < numValues; i++) { + output[i] = blendValue[i](v); + } + return output; + }; +}; +const mixObject = (origin, target) => { + const output = Object.assign(Object.assign({}, origin), target); + const blendValue = {}; + for (const key in output) { + if (origin[key] !== undefined && target[key] !== undefined) { + blendValue[key] = getMixer(origin[key], target[key]); + } + } + return v => { + for (const key in blendValue) { + output[key] = blendValue[key](v); + } + return output; + }; +}; +function analyse(value) { + const parsed = styleValueTypes.complex.parse(value); + const numValues = parsed.length; + let numNumbers = 0; + let numRGB = 0; + let numHSL = 0; + for (let i = 0; i < numValues; i++) { + if (numNumbers || typeof parsed[i] === "number") { + numNumbers++; + } else { + if (parsed[i].hue !== undefined) { + numHSL++; + } else { + numRGB++; + } + } + } + return { + parsed, + numNumbers, + numRGB, + numHSL + }; +} +const mixComplex = (origin, target) => { + const template = styleValueTypes.complex.createTransformer(target); + const originStats = analyse(origin); + const targetStats = analyse(target); + const canInterpolate = originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers; + if (canInterpolate) { + return pipe(mixArray(originStats.parsed, targetStats.parsed), template); + } else { + heyListen.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`); + return p => `${p > 0 ? target : origin}`; + } +}; +const mixNumber = (from, to) => p => mix(from, to, p); +function detectMixerFactory(v) { + if (typeof v === 'number') { + return mixNumber; + } else if (typeof v === 'string') { + if (styleValueTypes.color.test(v)) { + return mixColor; + } else { + return mixComplex; + } + } else if (Array.isArray(v)) { + return mixArray; + } else if (typeof v === 'object') { + return mixObject; + } +} +function createMixers(output, ease, customMixer) { + const mixers = []; + const mixerFactory = customMixer || detectMixerFactory(output[0]); + const numMixers = output.length - 1; + for (let i = 0; i < numMixers; i++) { + let mixer = mixerFactory(output[i], output[i + 1]); + if (ease) { + const easingFunction = Array.isArray(ease) ? ease[i] : ease; + mixer = pipe(easingFunction, mixer); + } + mixers.push(mixer); + } + return mixers; +} +function fastInterpolate([from, to], [mixer]) { + return v => mixer(progress(from, to, v)); +} +function slowInterpolate(input, mixers) { + const inputLength = input.length; + const lastInputIndex = inputLength - 1; + return v => { + let mixerIndex = 0; + let foundMixerIndex = false; + if (v <= input[0]) { + foundMixerIndex = true; + } else if (v >= input[lastInputIndex]) { + mixerIndex = lastInputIndex - 1; + foundMixerIndex = true; + } + if (!foundMixerIndex) { + let i = 1; + for (; i < inputLength; i++) { + if (input[i] > v || i === lastInputIndex) { + break; + } + } + mixerIndex = i - 1; + } + const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v); + return mixers[mixerIndex](progressInRange); + }; +} +function interpolate(input, output, { + clamp: isClamp = true, + ease, + mixer +} = {}) { + const inputLength = input.length; + heyListen.invariant(inputLength === output.length, 'Both input and output ranges must be the same length'); + heyListen.invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.'); + if (input[0] > input[inputLength - 1]) { + input = [].concat(input); + output = [].concat(output); + input.reverse(); + output.reverse(); + } + const mixers = createMixers(output, ease, mixer); + const interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers); + return isClamp ? v => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator; +} +const reverseEasing = easing => p => 1 - easing(1 - p); +const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; +const createExpoIn = power => p => Math.pow(p, power); +const createBackIn = power => p => p * p * ((power + 1) * p - power); +const createAnticipate = power => { + const backEasing = createBackIn(power); + return p => (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); +}; +const DEFAULT_OVERSHOOT_STRENGTH = 1.525; +const BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0; +const BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0; +const BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0; +const linear = p => p; +const easeIn = createExpoIn(2); +const easeOut = reverseEasing(easeIn); +const easeInOut = mirrorEasing(easeIn); +const circIn = p => 1 - Math.sin(Math.acos(p)); +const circOut = reverseEasing(circIn); +const circInOut = mirrorEasing(circOut); +const backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH); +const backOut = reverseEasing(backIn); +const backInOut = mirrorEasing(backIn); +const anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH); +const ca = 4356.0 / 361.0; +const cb = 35442.0 / 1805.0; +const cc = 16061.0 / 1805.0; +const bounceOut = p => { + if (p === 1 || p === 0) return p; + const p2 = p * p; + return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72; +}; +const bounceIn = reverseEasing(bounceOut); +const bounceInOut = p => p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5; +function defaultEasing(values, easing) { + return values.map(() => easing || easeInOut).splice(0, values.length - 1); +} +function defaultOffset(values) { + const numValues = values.length; + return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0); +} +function convertOffsetToTimes(offset, duration) { + return offset.map(o => o * duration); +} +function keyframes({ + from = 0, + to = 1, + ease, + offset, + duration = 300 +}) { + const state = { + done: false, + value: from + }; + const values = Array.isArray(to) ? to : [from, to]; + const times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration); + function createInterpolator() { + return interpolate(times, values, { + ease: Array.isArray(ease) ? ease : defaultEasing(values, ease) + }); + } + let interpolator = createInterpolator(); + return { + next: t => { + state.value = interpolator(t); + state.done = t >= duration; + return state; + }, + flipTarget: () => { + values.reverse(); + interpolator = createInterpolator(); + } + }; +} +function decay({ + velocity = 0, + from = 0, + power = 0.8, + timeConstant = 350, + restDelta = 0.5, + modifyTarget +}) { + const state = { + done: false, + value: from + }; + let amplitude = power * velocity; + const ideal = from + amplitude; + const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); + if (target !== ideal) amplitude = target - from; + return { + next: t => { + const delta = -amplitude * Math.exp(-t / timeConstant); + state.done = !(delta > restDelta || delta < -restDelta); + state.value = state.done ? target : target + delta; + return state; + }, + flipTarget: () => {} + }; +} +const types = { + keyframes, + spring, + decay +}; +function detectAnimationFromOptions(config) { + if (Array.isArray(config.to)) { + return keyframes; + } else if (types[config.type]) { + return types[config.type]; + } + const keys = new Set(Object.keys(config)); + if (keys.has("ease") || keys.has("duration") && !keys.has("dampingRatio")) { + return keyframes; + } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) { + return spring; + } + return keyframes; +} +function loopElapsed(elapsed, duration, delay = 0) { + return elapsed - duration - delay; +} +function reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) { + return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay; +} +function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) { + return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay; +} +const framesync = update => { + const passTimestamp = ({ + delta + }) => update(delta); + return { + start: () => sync__default["default"].update(passTimestamp, true), + stop: () => sync.cancelSync.update(passTimestamp) + }; +}; +function animate(_a) { + var _b, _c; + var { + from, + autoplay = true, + driver = framesync, + elapsed = 0, + repeat: repeatMax = 0, + repeatType = "loop", + repeatDelay = 0, + onPlay, + onStop, + onComplete, + onRepeat, + onUpdate + } = _a, + options = tslib.__rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]); + let { + to + } = options; + let driverControls; + let repeatCount = 0; + let computedDuration = options.duration; + let latest; + let isComplete = false; + let isForwardPlayback = true; + let interpolateFromNumber; + const animator = detectAnimationFromOptions(options); + if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) { + interpolateFromNumber = interpolate([0, 100], [from, to], { + clamp: false + }); + from = 0; + to = 100; + } + const animation = animator(Object.assign(Object.assign({}, options), { + from, + to + })); + function repeat() { + repeatCount++; + if (repeatType === "reverse") { + isForwardPlayback = repeatCount % 2 === 0; + elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback); + } else { + elapsed = loopElapsed(elapsed, computedDuration, repeatDelay); + if (repeatType === "mirror") animation.flipTarget(); + } + isComplete = false; + onRepeat && onRepeat(); + } + function complete() { + driverControls.stop(); + onComplete && onComplete(); + } + function update(delta) { + if (!isForwardPlayback) delta = -delta; + elapsed += delta; + if (!isComplete) { + const state = animation.next(Math.max(0, elapsed)); + latest = state.value; + if (interpolateFromNumber) latest = interpolateFromNumber(latest); + isComplete = isForwardPlayback ? state.done : elapsed <= 0; + } + onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest); + if (isComplete) { + if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : computedDuration = elapsed; + if (repeatCount < repeatMax) { + hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat(); + } else { + complete(); + } + } + } + function play() { + onPlay === null || onPlay === void 0 ? void 0 : onPlay(); + driverControls = driver(update); + driverControls.start(); + } + autoplay && play(); + return { + stop: () => { + onStop === null || onStop === void 0 ? void 0 : onStop(); + driverControls.stop(); + } + }; +} +function velocityPerSecond(velocity, frameDuration) { + return frameDuration ? velocity * (1000 / frameDuration) : 0; +} +function inertia({ + from = 0, + velocity = 0, + min, + max, + power = 0.8, + timeConstant = 750, + bounceStiffness = 500, + bounceDamping = 10, + restDelta = 1, + modifyTarget, + driver, + onUpdate, + onComplete, + onStop +}) { + let currentAnimation; + function isOutOfBounds(v) { + return min !== undefined && v < min || max !== undefined && v > max; + } + function boundaryNearest(v) { + if (min === undefined) return max; + if (max === undefined) return min; + return Math.abs(min - v) < Math.abs(max - v) ? min : max; + } + function startAnimation(options) { + currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); + currentAnimation = animate(Object.assign(Object.assign({}, options), { + driver, + onUpdate: v => { + var _a; + onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v); + (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v); + }, + onComplete, + onStop + })); + } + function startSpring(options) { + startAnimation(Object.assign({ + type: "spring", + stiffness: bounceStiffness, + damping: bounceDamping, + restDelta + }, options)); + } + if (isOutOfBounds(from)) { + startSpring({ + from, + velocity, + to: boundaryNearest(from) + }); + } else { + let target = power * velocity + from; + if (typeof modifyTarget !== "undefined") target = modifyTarget(target); + const boundary = boundaryNearest(target); + const heading = boundary === min ? -1 : 1; + let prev; + let current; + const checkBoundary = v => { + prev = current; + current = v; + velocity = velocityPerSecond(v - prev, sync.getFrameData().delta); + if (heading === 1 && v > boundary || heading === -1 && v < boundary) { + startSpring({ + from: v, + to: boundary, + velocity + }); + } + }; + startAnimation({ + type: "decay", + from, + velocity, + timeConstant, + power, + restDelta, + modifyTarget, + onUpdate: isOutOfBounds(target) ? checkBoundary : undefined + }); + } + return { + stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop() + }; +} +const radiansToDegrees = radians => radians * 180 / Math.PI; +const angle = (a, b = zeroPoint) => radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x)); +const applyOffset = (from, to) => { + let hasReceivedFrom = true; + if (to === undefined) { + to = from; + hasReceivedFrom = false; + } + return v => { + if (hasReceivedFrom) { + return v - from + to; + } else { + from = v; + hasReceivedFrom = true; + return to; + } + }; +}; +const identity = v => v; +const createAttractor = (alterDisplacement = identity) => (constant, origin, v) => { + const displacement = origin - v; + const springModifiedDisplacement = -(0 - constant + 1) * (0 - alterDisplacement(Math.abs(displacement))); + return displacement <= 0 ? origin + springModifiedDisplacement : origin - springModifiedDisplacement; +}; +const attract = createAttractor(); +const attractExpo = createAttractor(Math.sqrt); +const degreesToRadians = degrees => degrees * Math.PI / 180; +const isPoint = point => point.hasOwnProperty('x') && point.hasOwnProperty('y'); +const isPoint3D = point => isPoint(point) && point.hasOwnProperty('z'); +const distance1D = (a, b) => Math.abs(a - b); +function distance(a, b) { + if (isNum(a) && isNum(b)) { + return distance1D(a, b); + } else if (isPoint(a) && isPoint(b)) { + const xDelta = distance1D(a.x, b.x); + const yDelta = distance1D(a.y, b.y); + const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0; + return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2)); + } +} +const pointFromVector = (origin, angle, distance) => { + angle = degreesToRadians(angle); + return { + x: distance * Math.cos(angle) + origin.x, + y: distance * Math.sin(angle) + origin.y + }; +}; +const toDecimal = (num, precision = 2) => { + precision = Math.pow(10, precision); + return Math.round(num * precision) / precision; +}; +const smoothFrame = (prevValue, nextValue, duration, smoothing = 0) => toDecimal(prevValue + duration * (nextValue - prevValue) / Math.max(smoothing, duration)); +const smooth = (strength = 50) => { + let previousValue = 0; + let lastUpdated = 0; + return v => { + const currentFramestamp = sync.getFrameData().timestamp; + const timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0; + const newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue; + lastUpdated = currentFramestamp; + previousValue = newValue; + return newValue; + }; +}; +const snap = points => { + if (typeof points === 'number') { + return v => Math.round(v / points) * points; + } else { + let i = 0; + const numPoints = points.length; + return v => { + let lastDistance = Math.abs(points[0] - v); + for (i = 1; i < numPoints; i++) { + const point = points[i]; + const distance = Math.abs(point - v); + if (distance === 0) return point; + if (distance > lastDistance) return points[i - 1]; + if (i === numPoints - 1) return point; + lastDistance = distance; + } + }; + } +}; +function velocityPerFrame(xps, frameDuration) { + return xps / (1000 / frameDuration); +} +const wrap = (min, max, v) => { + const rangeSize = max - min; + return ((v - min) % rangeSize + rangeSize) % rangeSize + min; +}; +const a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1; +const b = (a1, a2) => 3.0 * a2 - 6.0 * a1; +const c = a1 => 3.0 * a1; +const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t; +const getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1); +const subdivisionPrecision = 0.0000001; +const subdivisionMaxIterations = 10; +function binarySubdivide(aX, aA, aB, mX1, mX2) { + let currentX; + let currentT; + let i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations); + return currentT; +} +const newtonIterations = 8; +const newtonMinSlope = 0.001; +function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { + for (let i = 0; i < newtonIterations; ++i) { + const currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) { + return aGuessT; + } + const currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; +} +const kSplineTableSize = 11; +const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); +function cubicBezier(mX1, mY1, mX2, mY2) { + if (mX1 === mY1 && mX2 === mY2) return linear; + const sampleValues = new Float32Array(kSplineTableSize); + for (let i = 0; i < kSplineTableSize; ++i) { + sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); + } + function getTForX(aX) { + let intervalStart = 0.0; + let currentSample = 1; + const lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]); + const guessForT = intervalStart + dist * kSampleStepSize; + const initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= newtonMinSlope) { + return newtonRaphsonIterate(aX, guessForT, mX1, mX2); + } else if (initialSlope === 0.0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); + } + } + return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); +} +const steps = (steps, direction = 'end') => progress => { + progress = direction === 'end' ? Math.min(progress, 0.999) : Math.max(progress, 0.001); + const expanded = progress * steps; + const rounded = direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded); + return clamp(0, 1, rounded / steps); +}; +exports.angle = angle; +exports.animate = animate; +exports.anticipate = anticipate; +exports.applyOffset = applyOffset; +exports.attract = attract; +exports.attractExpo = attractExpo; +exports.backIn = backIn; +exports.backInOut = backInOut; +exports.backOut = backOut; +exports.bounceIn = bounceIn; +exports.bounceInOut = bounceInOut; +exports.bounceOut = bounceOut; +exports.circIn = circIn; +exports.circInOut = circInOut; +exports.circOut = circOut; +exports.clamp = clamp; +exports.createAnticipate = createAnticipate; +exports.createAttractor = createAttractor; +exports.createBackIn = createBackIn; +exports.createExpoIn = createExpoIn; +exports.cubicBezier = cubicBezier; +exports.decay = decay; +exports.degreesToRadians = degreesToRadians; +exports.distance = distance; +exports.easeIn = easeIn; +exports.easeInOut = easeInOut; +exports.easeOut = easeOut; +exports.inertia = inertia; +exports.interpolate = interpolate; +exports.isPoint = isPoint; +exports.isPoint3D = isPoint3D; +exports.keyframes = keyframes; +exports.linear = linear; +exports.mirrorEasing = mirrorEasing; +exports.mix = mix; +exports.mixColor = mixColor; +exports.mixComplex = mixComplex; +exports.pipe = pipe; +exports.pointFromVector = pointFromVector; +exports.progress = progress; +exports.radiansToDegrees = radiansToDegrees; +exports.reverseEasing = reverseEasing; +exports.smooth = smooth; +exports.smoothFrame = smoothFrame; +exports.snap = snap; +exports.spring = spring; +exports.steps = steps; +exports.toDecimal = toDecimal; +exports.velocityPerFrame = velocityPerFrame; +exports.velocityPerSecond = velocityPerSecond; +exports.wrap = wrap; + +/***/ }), + +/***/ "../../../node_modules/punycode.js/punycode.es6.js": +/*!*********************************************************!*\ + !*** ../../../node_modules/punycode.js/punycode.es6.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +/** Highest positive signed 32-bit float value */ +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.toUnicode = exports.toASCII = exports.encode = exports["default"] = exports.decode = void 0; +exports.ucs2decode = ucs2decode; +exports.ucs2encode = void 0; +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +exports.ucs2encode = ucs2encode; +const basicToDigit = function (codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function (digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function (delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for /* no initialization */ + (; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function (input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for /* no final expression */ + (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) { + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for /* no condition */ + (let w = 1, k = base;; k += base) { + if (index >= inputLength) { + error('invalid-input'); + } + const digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + i += digit * w; + const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + w *= baseMinusT; + } + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +exports.decode = decode; +const encode = function (input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for /* no condition */ + (let k = base;; k += base) { + const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +exports.encode = encode; +const toUnicode = function (input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +exports.toUnicode = toUnicode; +const toASCII = function (input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +exports.toASCII = toASCII; +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; +var _default = exports["default"] = punycode; + +/***/ }), + +/***/ "../../../node_modules/react-compiler-runtime/dist/index.js": +/*!******************************************************************!*\ + !*** ../../../node_modules/react-compiler-runtime/dist/index.js ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @lightSyntaxTransform + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */ + +"use no memo"; +'use strict'; + +var React = __webpack_require__(/*! react */ "react"); +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { + return e[k]; + } + }); + } + }); + } + n.default = e; + return Object.freeze(n); +} +var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React); +var _a, _b; +const { + useRef, + useEffect, + isValidElement +} = React__namespace; +const ReactSecretInternals = (_a = React__namespace.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) !== null && _a !== void 0 ? _a : React__namespace.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +const $empty = Symbol.for('react.memo_cache_sentinel'); +const c = typeof ((_b = React__namespace.__COMPILER_RUNTIME) === null || _b === void 0 ? void 0 : _b.c) === 'function' ? React__namespace.__COMPILER_RUNTIME.c : function c(size) { + return React__namespace.useMemo(() => { + const $ = new Array(size); + for (let ii = 0; ii < size; ii++) { + $[ii] = $empty; + } + $[$empty] = true; + return $; + }, []); +}; +const LazyGuardDispatcher = {}; +['readContext', 'useCallback', 'useContext', 'useEffect', 'useImperativeHandle', 'useInsertionEffect', 'useLayoutEffect', 'useMemo', 'useReducer', 'useRef', 'useState', 'useDebugValue', 'useDeferredValue', 'useTransition', 'useMutableSource', 'useSyncExternalStore', 'useId', 'unstable_isNewReconciler', 'getCacheSignal', 'getCacheForType', 'useCacheRefresh'].forEach(name => { + LazyGuardDispatcher[name] = () => { + throw new Error(`[React] Unexpected React hook call (${name}) from a React compiled function. ` + "Check that all hooks are called directly and named according to convention ('use[A-Z]') "); + }; +}); +let originalDispatcher = null; +LazyGuardDispatcher['useMemoCache'] = count => { + if (originalDispatcher == null) { + throw new Error('React Compiler internal invariant violation: unexpected null dispatcher'); + } else { + return originalDispatcher.useMemoCache(count); + } +}; +var GuardKind; +(function (GuardKind) { + GuardKind[GuardKind["PushGuardContext"] = 0] = "PushGuardContext"; + GuardKind[GuardKind["PopGuardContext"] = 1] = "PopGuardContext"; + GuardKind[GuardKind["PushExpectHook"] = 2] = "PushExpectHook"; + GuardKind[GuardKind["PopExpectHook"] = 3] = "PopExpectHook"; +})(GuardKind || (GuardKind = {})); +function setCurrent(newDispatcher) { + ReactSecretInternals.ReactCurrentDispatcher.current = newDispatcher; + return ReactSecretInternals.ReactCurrentDispatcher.current; +} +const guardFrames = []; +function $dispatcherGuard(kind) { + const curr = ReactSecretInternals.ReactCurrentDispatcher.current; + if (kind === GuardKind.PushGuardContext) { + guardFrames.push(curr); + if (guardFrames.length === 1) { + originalDispatcher = curr; + } + if (curr === LazyGuardDispatcher) { + throw new Error(`[React] Unexpected call to custom hook or component from a React compiled function. ` + "Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') " + 'and (2) components are returned as JSX instead of being directly invoked.'); + } + setCurrent(LazyGuardDispatcher); + } else if (kind === GuardKind.PopGuardContext) { + const lastFrame = guardFrames.pop(); + if (lastFrame == null) { + throw new Error('React Compiler internal error: unexpected null in guard stack'); + } + if (guardFrames.length === 0) { + originalDispatcher = null; + } + setCurrent(lastFrame); + } else if (kind === GuardKind.PushExpectHook) { + guardFrames.push(curr); + setCurrent(originalDispatcher); + } else if (kind === GuardKind.PopExpectHook) { + const lastFrame = guardFrames.pop(); + if (lastFrame == null) { + throw new Error('React Compiler internal error: unexpected null in guard stack'); + } + setCurrent(lastFrame); + } else { + throw new Error('React Compiler internal error: unreachable block' + kind); + } +} +function $reset($) { + for (let ii = 0; ii < $.length; ii++) { + $[ii] = $empty; + } +} +function $makeReadOnly() { + throw new Error('TODO: implement $makeReadOnly in react-compiler-runtime'); +} +const renderCounterRegistry = new Map(); +function clearRenderCounterRegistry() { + for (const counters of renderCounterRegistry.values()) { + counters.forEach(counter => { + counter.count = 0; + }); + } +} +function registerRenderCounter(name, val) { + let counters = renderCounterRegistry.get(name); + if (counters == null) { + counters = new Set(); + renderCounterRegistry.set(name, counters); + } + counters.add(val); +} +function removeRenderCounter(name, val) { + const counters = renderCounterRegistry.get(name); + if (counters == null) { + return; + } + counters.delete(val); +} +function useRenderCounter(name) { + const val = useRef(null); + if (val.current != null) { + val.current.count += 1; + } + useEffect(() => { + if (val.current == null) { + const counter = { + count: 0 + }; + registerRenderCounter(name, counter); + val.current = counter; + } + return () => { + if (val.current !== null) { + removeRenderCounter(name, val.current); + } + }; + }); +} +const seenErrors = new Set(); +function $structuralCheck(oldValue, newValue, variableName, fnName, kind, loc) { + function error(l, r, path, depth) { + const str = `${fnName}:${loc} [${kind}] ${variableName}${path} changed from ${l} to ${r} at depth ${depth}`; + if (seenErrors.has(str)) { + return; + } + seenErrors.add(str); + console.error(str); + } + const depthLimit = 2; + function recur(oldValue, newValue, path, depth) { + if (depth > depthLimit) { + return; + } else if (oldValue === newValue) { + return; + } else if (typeof oldValue !== typeof newValue) { + error(`type ${typeof oldValue}`, `type ${typeof newValue}`, path, depth); + } else if (typeof oldValue === 'object') { + const oldArray = Array.isArray(oldValue); + const newArray = Array.isArray(newValue); + if (oldValue === null && newValue !== null) { + error('null', `type ${typeof newValue}`, path, depth); + } else if (newValue === null) { + error(`type ${typeof oldValue}`, 'null', path, depth); + } else if (oldValue instanceof Map) { + if (!(newValue instanceof Map)) { + error(`Map instance`, `other value`, path, depth); + } else if (oldValue.size !== newValue.size) { + error(`Map instance with size ${oldValue.size}`, `Map instance with size ${newValue.size}`, path, depth); + } else { + for (const [k, v] of oldValue) { + if (!newValue.has(k)) { + error(`Map instance with key ${k}`, `Map instance without key ${k}`, path, depth); + } else { + recur(v, newValue.get(k), `${path}.get(${k})`, depth + 1); + } + } + } + } else if (newValue instanceof Map) { + error('other value', `Map instance`, path, depth); + } else if (oldValue instanceof Set) { + if (!(newValue instanceof Set)) { + error(`Set instance`, `other value`, path, depth); + } else if (oldValue.size !== newValue.size) { + error(`Set instance with size ${oldValue.size}`, `Set instance with size ${newValue.size}`, path, depth); + } else { + for (const v of newValue) { + if (!oldValue.has(v)) { + error(`Set instance without element ${v}`, `Set instance with element ${v}`, path, depth); + } + } + } + } else if (newValue instanceof Set) { + error('other value', `Set instance`, path, depth); + } else if (oldArray || newArray) { + if (oldArray !== newArray) { + error(`type ${oldArray ? 'array' : 'object'}`, `type ${newArray ? 'array' : 'object'}`, path, depth); + } else if (oldValue.length !== newValue.length) { + error(`array with length ${oldValue.length}`, `array with length ${newValue.length}`, path, depth); + } else { + for (let ii = 0; ii < oldValue.length; ii++) { + recur(oldValue[ii], newValue[ii], `${path}[${ii}]`, depth + 1); + } + } + } else if (isValidElement(oldValue) || isValidElement(newValue)) { + if (isValidElement(oldValue) !== isValidElement(newValue)) { + error(`type ${isValidElement(oldValue) ? 'React element' : 'object'}`, `type ${isValidElement(newValue) ? 'React element' : 'object'}`, path, depth); + } else if (oldValue.type !== newValue.type) { + error(`React element of type ${oldValue.type}`, `React element of type ${newValue.type}`, path, depth); + } else { + recur(oldValue.props, newValue.props, `[props of ${path}]`, depth + 1); + } + } else { + for (const key in newValue) { + if (!(key in oldValue)) { + error(`object without key ${key}`, `object with key ${key}`, path, depth); + } + } + for (const key in oldValue) { + if (!(key in newValue)) { + error(`object with key ${key}`, `object without key ${key}`, path, depth); + } else { + recur(oldValue[key], newValue[key], `${path}.${key}`, depth + 1); + } + } + } + } else if (typeof oldValue === 'function') { + return; + } else if (isNaN(oldValue) || isNaN(newValue)) { + if (isNaN(oldValue) !== isNaN(newValue)) { + error(`${isNaN(oldValue) ? 'NaN' : 'non-NaN value'}`, `${isNaN(newValue) ? 'NaN' : 'non-NaN value'}`, path, depth); + } + } else if (oldValue !== newValue) { + error(oldValue, newValue, path, depth); + } + } + recur(oldValue, newValue, '', 0); +} +exports.$dispatcherGuard = $dispatcherGuard; +exports.$makeReadOnly = $makeReadOnly; +exports.$reset = $reset; +exports.$structuralCheck = $structuralCheck; +exports.c = c; +exports.clearRenderCounterRegistry = clearRenderCounterRegistry; +exports.renderCounterRegistry = renderCounterRegistry; +exports.useRenderCounter = useRenderCounter; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js": +/*!******************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.RemoveScrollBar = void 0; +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js"); +var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); +var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var Style = (0, _reactStyleSingleton.styleSingleton)(); +// important tip - once we measure scrollBar width and remove them +// we could not repeat this operation +// thus we are using style-singleton - only the first "yet correct" style will be applied. +var getStyles = function (_a, allowRelative, gapMode, important) { + var left = _a.left, + top = _a.top, + right = _a.right, + gap = _a.gap; + if (gapMode === void 0) { + gapMode = 'margin'; + } + return "\n .".concat(_constants.noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";")].filter(Boolean).join(''), "\n }\n \n .").concat(_constants.zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants.fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants.zeroRightClassName, " .").concat(_constants.zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(_constants.fullWidthClassName, " .").concat(_constants.fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(_constants.removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); +}; +/** + * Removes page scrollbar and blocks page scroll when mounted + */ +var RemoveScrollBar = function (props) { + var noRelative = props.noRelative, + noImportant = props.noImportant, + _a = props.gapMode, + gapMode = _a === void 0 ? 'margin' : _a; + var gap = React.useMemo(function () { + return (0, _utils.getGapWidth)(gapMode); + }, [gapMode]); + return /*#__PURE__*/React.createElement(Style, { + styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') + }); +}; +exports.RemoveScrollBar = RemoveScrollBar; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js": +/*!******************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.zeroRightClassName = exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = void 0; +var zeroRightClassName = exports.zeroRightClassName = 'right-scroll-bar-position'; +var fullWidthClassName = exports.fullWidthClassName = 'width-before-scroll-bar'; +var noScrollbarsClassName = exports.noScrollbarsClassName = 'with-scroll-bars-hidden'; +/** + * Name of a CSS variable containing the amount of "hidden" scrollbar + * ! might be undefined ! use will fallback! + */ +var removedBarSizeVariable = exports.removedBarSizeVariable = '--removed-body-scroll-bar-size'; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js": +/*!**************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "RemoveScrollBar", ({ + enumerable: true, + get: function () { + return _component.RemoveScrollBar; + } +})); +Object.defineProperty(exports, "fullWidthClassName", ({ + enumerable: true, + get: function () { + return _constants.fullWidthClassName; + } +})); +Object.defineProperty(exports, "getGapWidth", ({ + enumerable: true, + get: function () { + return _utils.getGapWidth; + } +})); +Object.defineProperty(exports, "noScrollbarsClassName", ({ + enumerable: true, + get: function () { + return _constants.noScrollbarsClassName; + } +})); +Object.defineProperty(exports, "removedBarSizeVariable", ({ + enumerable: true, + get: function () { + return _constants.removedBarSizeVariable; + } +})); +Object.defineProperty(exports, "zeroRightClassName", ({ + enumerable: true, + get: function () { + return _constants.zeroRightClassName; + } +})); +var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js"); +var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); +var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js": +/*!**************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.zeroGap = exports.getGapWidth = void 0; +var zeroGap = exports.zeroGap = { + left: 0, + top: 0, + right: 0, + gap: 0 +}; +var parse = function (x) { + return parseInt(x || '', 10) || 0; +}; +var getOffset = function (gapMode) { + var cs = window.getComputedStyle(document.body); + if (true) { + if (cs.overflowY === 'hidden') { + console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body'); + } + } + var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft']; + var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop']; + var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight']; + return [parse(left), parse(top), parse(right)]; +}; +var getGapWidth = function (gapMode) { + if (gapMode === void 0) { + gapMode = 'margin'; + } + if (typeof window === 'undefined') { + return zeroGap; + } + var offsets = getOffset(gapMode); + var documentWidth = document.documentElement.clientWidth; + var windowWidth = window.innerWidth; + return { + left: offsets[0], + top: offsets[1], + right: offsets[2], + gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]) + }; +}; +exports.getGapWidth = getGapWidth; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js": +/*!****************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/Combination.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _UI = __webpack_require__(/*! ./UI */ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js"); +var _sidecar = _interopRequireDefault(__webpack_require__(/*! ./sidecar */ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var ReactRemoveScroll = /*#__PURE__*/React.forwardRef(function (props, ref) { + return /*#__PURE__*/React.createElement(_UI.RemoveScroll, (0, _tslib.__assign)({}, props, { + ref: ref, + sideCar: _sidecar.default + })); +}); +ReactRemoveScroll.classNames = _UI.RemoveScroll.classNames; +var _default = exports["default"] = ReactRemoveScroll; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js": +/*!***************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***! + \***************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.RemoveScrollSideCar = RemoveScrollSideCar; +exports.getTouchXY = exports.getDeltaXY = void 0; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _reactRemoveScrollBar = __webpack_require__(/*! react-remove-scroll-bar */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js"); +var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js"); +var _aggresiveCapture = __webpack_require__(/*! ./aggresiveCapture */ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"); +var _handleScroll = __webpack_require__(/*! ./handleScroll */ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var getTouchXY = function (event) { + return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0]; +}; +exports.getTouchXY = getTouchXY; +var getDeltaXY = function (event) { + return [event.deltaX, event.deltaY]; +}; +exports.getDeltaXY = getDeltaXY; +var extractRef = function (ref) { + return ref && 'current' in ref ? ref.current : ref; +}; +var deltaCompare = function (x, y) { + return x[0] === y[0] && x[1] === y[1]; +}; +var generateStyle = function (id) { + return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); +}; +var idCounter = 0; +var lockStack = []; +function RemoveScrollSideCar(props) { + var shouldPreventQueue = React.useRef([]); + var touchStartRef = React.useRef([0, 0]); + var activeAxis = React.useRef(); + var id = React.useState(idCounter++)[0]; + var Style = React.useState(function () { + return (0, _reactStyleSingleton.styleSingleton)(); + })[0]; + var lastProps = React.useRef(props); + React.useEffect(function () { + lastProps.current = props; + }, [props]); + React.useEffect(function () { + if (props.inert) { + document.body.classList.add("block-interactivity-".concat(id)); + var allow_1 = (0, _tslib.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); + allow_1.forEach(function (el) { + return el.classList.add("allow-interactivity-".concat(id)); + }); + return function () { + document.body.classList.remove("block-interactivity-".concat(id)); + allow_1.forEach(function (el) { + return el.classList.remove("allow-interactivity-".concat(id)); + }); + }; + } + return; + }, [props.inert, props.lockRef.current, props.shards]); + var shouldCancelEvent = React.useCallback(function (event, parent) { + if ('touches' in event && event.touches.length === 2) { + return !lastProps.current.allowPinchZoom; + } + var touch = getTouchXY(event); + var touchStart = touchStartRef.current; + var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0]; + var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1]; + var currentAxis; + var target = event.target; + var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v'; + // allow horizontal touch move on Range inputs. They will not cause any scroll + if ('touches' in event && moveDirection === 'h' && target.type === 'range') { + return false; + } + var canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target); + if (!canBeScrolledInMainDirection) { + return true; + } + if (canBeScrolledInMainDirection) { + currentAxis = moveDirection; + } else { + currentAxis = moveDirection === 'v' ? 'h' : 'v'; + canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target); + // other axis might be not scrollable + } + if (!canBeScrolledInMainDirection) { + return false; + } + if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) { + activeAxis.current = currentAxis; + } + if (!currentAxis) { + return true; + } + var cancelingAxis = activeAxis.current || currentAxis; + return (0, _handleScroll.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true); + }, []); + var shouldPrevent = React.useCallback(function (_event) { + var event = _event; + if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) { + // not the last active + return; + } + var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); + var sourceEvent = shouldPreventQueue.current.filter(function (e) { + return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); + })[0]; + // self event, and should be canceled + if (sourceEvent && sourceEvent.should) { + if (event.cancelable) { + event.preventDefault(); + } + return; + } + // outside or shard event + if (!sourceEvent) { + var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) { + return node.contains(event.target); + }); + var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; + if (shouldStop) { + if (event.cancelable) { + event.preventDefault(); + } + } + } + }, []); + var shouldCancel = React.useCallback(function (name, delta, target, should) { + var event = { + name: name, + delta: delta, + target: target, + should: should + }; + shouldPreventQueue.current.push(event); + setTimeout(function () { + shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { + return e !== event; + }); + }, 1); + }, []); + var scrollTouchStart = React.useCallback(function (event) { + touchStartRef.current = getTouchXY(event); + activeAxis.current = undefined; + }, []); + var scrollWheel = React.useCallback(function (event) { + shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); + }, []); + var scrollTouchMove = React.useCallback(function (event) { + shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); + }, []); + React.useEffect(function () { + lockStack.push(Style); + props.setCallbacks({ + onScrollCapture: scrollWheel, + onWheelCapture: scrollWheel, + onTouchMoveCapture: scrollTouchMove + }); + document.addEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive); + document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive); + document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive); + return function () { + lockStack = lockStack.filter(function (inst) { + return inst !== Style; + }); + document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive); + document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive); + document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive); + }; + }, []); + var removeScrollBar = props.removeScrollBar, + inert = props.inert; + return /*#__PURE__*/React.createElement(React.Fragment, null, inert ? /*#__PURE__*/React.createElement(Style, { + styles: generateStyle(id) + }) : null, removeScrollBar ? /*#__PURE__*/React.createElement(_reactRemoveScrollBar.RemoveScrollBar, { + gapMode: "margin" + }) : null); +} + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js": +/*!*******************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/UI.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.RemoveScroll = void 0; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _constants = __webpack_require__(/*! react-remove-scroll-bar/constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); +var _useCallbackRef = __webpack_require__(/*! use-callback-ref */ "../../../node_modules/use-callback-ref/dist/es2015/index.js"); +var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var nothing = function () { + return; +}; +/** + * Removes scrollbar from the page and contain the scroll within the Lock + */ +var RemoveScroll = exports.RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) { + var ref = React.useRef(null); + var _a = React.useState({ + onScrollCapture: nothing, + onWheelCapture: nothing, + onTouchMoveCapture: nothing + }), + callbacks = _a[0], + setCallbacks = _a[1]; + var forwardProps = props.forwardProps, + children = props.children, + className = props.className, + removeScrollBar = props.removeScrollBar, + enabled = props.enabled, + shards = props.shards, + sideCar = props.sideCar, + noIsolation = props.noIsolation, + inert = props.inert, + allowPinchZoom = props.allowPinchZoom, + _b = props.as, + Container = _b === void 0 ? 'div' : _b, + rest = (0, _tslib.__rest)(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]); + var SideCar = sideCar; + var containerRef = (0, _useCallbackRef.useMergeRefs)([ref, parentRef]); + var containerProps = (0, _tslib.__assign)((0, _tslib.__assign)({}, rest), callbacks); + return /*#__PURE__*/React.createElement(React.Fragment, null, enabled && ( /*#__PURE__*/React.createElement(SideCar, { + sideCar: _medium.effectCar, + removeScrollBar: removeScrollBar, + shards: shards, + noIsolation: noIsolation, + inert: inert, + setCallbacks: setCallbacks, + allowPinchZoom: !!allowPinchZoom, + lockRef: ref + })), forwardProps ? ( /*#__PURE__*/React.cloneElement(React.Children.only(children), (0, _tslib.__assign)((0, _tslib.__assign)({}, containerProps), { + ref: containerRef + }))) : ( /*#__PURE__*/React.createElement(Container, (0, _tslib.__assign)({}, containerProps, { + className: className, + ref: containerRef + }), children))); +}); +RemoveScroll.defaultProps = { + enabled: true, + removeScrollBar: true, + inert: false +}; +RemoveScroll.classNames = { + fullWidth: _constants.fullWidthClassName, + zeroRight: _constants.zeroRightClassName +}; + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js": +/*!*********************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***! + \*********************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.nonPassive = void 0; +var passiveSupported = false; +if (typeof window !== 'undefined') { + try { + var options = Object.defineProperty({}, 'passive', { + get: function () { + passiveSupported = true; + return true; } - u(tu, "addEditorMethods"); - function Ln(e, t, i, r, n) { - var l = t, - o = i, - a = S(e, t.line), - s = n && e.direction == "rtl" ? -i : i; - function f() { - var C = t.line + s; - return C < e.first || C >= e.first + e.size ? !1 : (t = new y(C, t.ch, t.sticky), a = S(e, C)); - } - u(f, "findNextLine"); - function h(C) { - var x; - if (r == "codepoint") { - var w = a.text.charCodeAt(t.ch + (i > 0 ? 0 : -1)); - if (isNaN(w)) x = null;else { - var k = i > 0 ? w >= 55296 && w < 56320 : w >= 56320 && w < 57343; - x = new y(t.line, Math.max(0, Math.min(a.text.length, t.ch + i * (k ? 2 : 1))), -i); - } - } else n ? x = Es(e.cm, a, t, i) : x = yn(a, t, i); - if (x == null) { - if (!C && f()) t = mn(n, e.cm, a, t.line, s);else return !1; - } else t = x; - return !0; - } - if (u(h, "moveOnce"), r == "char" || r == "codepoint") h();else if (r == "column") h(!0);else if (r == "word" || r == "group") for (var c = null, p = r == "group", d = e.cm && e.cm.getHelper(t, "wordChars"), v = !0; !(i < 0 && !h(!v)); v = !1) { - var g = a.text.charAt(t.ch) || ` -`, - m = Wr(g, d) ? "w" : p && g == ` -` ? "n" : !p || /\s/.test(g) ? null : "p"; - if (p && !v && !m && (m = "s"), c && c != m) { - i < 0 && (i = 1, h(), t.sticky = "after"); - break; - } - if (m && (c = m), i > 0 && !h(!v)) break; - } - var b = ii(e, t, l, o, !0); - return Wi(l, b) && (b.hitSide = !0), b; - } - u(Ln, "findPosH"); - function Go(e, t, i, r) { - var n = e.doc, - l = t.left, - o; - if (r == "page") { - var a = Math.min(e.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight), - s = Math.max(a - .5 * Tt(e.display), 3); - o = (i > 0 ? t.bottom : t.top) + i * s; - } else r == "line" && (o = i > 0 ? t.bottom + 3 : t.top - 3); - for (var f; f = qi(e, l, o), !!f.outside;) { - if (i < 0 ? o <= 0 : o >= n.height) { - f.hitSide = !0; - break; - } - o += i * 5; - } - return f; - } - u(Go, "findPosV"); - var P = u(function (e) { - this.cm = e, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new _e(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null; - }, "ContentEditableInput"); - P.prototype.init = function (e) { - var t = this, - i = this, - r = i.cm, - n = i.div = e.lineDiv; - n.contentEditable = !0, Bo(n, r.options.spellcheck, r.options.autocorrect, r.options.autocapitalize); - function l(a) { - for (var s = a.target; s; s = s.parentNode) { - if (s == n) return !0; - if (/\bCodeMirror-(?:line)?widget\b/.test(s.className)) break; - } - return !1; - } - u(l, "belongsToInput"), M(n, "paste", function (a) { - !l(a) || q(r, a) || Eo(a, r) || I <= 11 && setTimeout(Q(r, function () { - return t.updateFromDOM(); - }), 20); - }), M(n, "compositionstart", function (a) { - t.composing = { - data: a.data, - done: !1 - }; - }), M(n, "compositionupdate", function (a) { - t.composing || (t.composing = { - data: a.data, - done: !1 - }); - }), M(n, "compositionend", function (a) { - t.composing && (a.data != t.composing.data && t.readFromDOMSoon(), t.composing.done = !0); - }), M(n, "touchstart", function () { - return i.forceCompositionEnd(); - }), M(n, "input", function () { - t.composing || t.readFromDOMSoon(); - }); - function o(a) { - if (!(!l(a) || q(r, a))) { - if (r.somethingSelected()) ui({ - lineWise: !1, - text: r.getSelections() - }), a.type == "cut" && r.replaceSelection("", null, "cut");else if (r.options.lineWiseCopyCut) { - var s = Ro(r); - ui({ - lineWise: !0, - text: s.text - }), a.type == "cut" && r.operation(function () { - r.setSelections(s.ranges, 0, Me), r.replaceSelection("", null, "cut"); - }); - } else return; - if (a.clipboardData) { - a.clipboardData.clearData(); - var f = Te.text.join(` -`); - if (a.clipboardData.setData("Text", f), a.clipboardData.getData("Text") == f) { - a.preventDefault(); - return; - } - } - var h = zo(), - c = h.firstChild; - r.display.lineSpace.insertBefore(h, r.display.lineSpace.firstChild), c.value = Te.text.join(` -`); - var p = be(); - _t(c), setTimeout(function () { - r.display.lineSpace.removeChild(h), p.focus(), p == n && i.showPrimarySelection(); - }, 50); - } - } - u(o, "onCopyCut"), M(n, "copy", o), M(n, "cut", o); - }, P.prototype.screenReaderLabelChanged = function (e) { - e ? this.div.setAttribute("aria-label", e) : this.div.removeAttribute("aria-label"); - }, P.prototype.prepareSelection = function () { - var e = Nl(this.cm, !1); - return e.focus = be() == this.div, e; - }, P.prototype.showSelection = function (e, t) { - !e || !this.cm.display.view.length || ((e.focus || t) && this.showPrimarySelection(), this.showMultipleSelections(e)); - }, P.prototype.getSelection = function () { - return this.cm.display.wrapper.ownerDocument.getSelection(); - }, P.prototype.showPrimarySelection = function () { - var e = this.getSelection(), - t = this.cm, - i = t.doc.sel.primary(), - r = i.from(), - n = i.to(); - if (t.display.viewTo == t.display.viewFrom || r.line >= t.display.viewTo || n.line < t.display.viewFrom) { - e.removeAllRanges(); - return; - } - var l = fi(t, e.anchorNode, e.anchorOffset), - o = fi(t, e.focusNode, e.focusOffset); - if (!(l && !l.bad && o && !o.bad && D(Pr(l, o), r) == 0 && D(Fr(l, o), n) == 0)) { - var a = t.display.view, - s = r.line >= t.display.viewFrom && Uo(t, r) || { - node: a[0].measure.map[2], - offset: 0 - }, - f = n.line < t.display.viewTo && Uo(t, n); - if (!f) { - var h = a[a.length - 1].measure, - c = h.maps ? h.maps[h.maps.length - 1] : h.map; - f = { - node: c[c.length - 1], - offset: c[c.length - 2] - c[c.length - 3] - }; - } - if (!s || !f) { - e.removeAllRanges(); - return; - } - var p = e.rangeCount && e.getRangeAt(0), - d; - try { - d = rt(s.node, s.offset, f.offset, f.node); - } catch {} - d && (!Fe && t.state.focused ? (e.collapse(s.node, s.offset), d.collapsed || (e.removeAllRanges(), e.addRange(d))) : (e.removeAllRanges(), e.addRange(d)), p && e.anchorNode == null ? e.addRange(p) : Fe && this.startGracePeriod()), this.rememberSelection(); - } - }, P.prototype.startGracePeriod = function () { - var e = this; - clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function () { - e.gracePeriod = !1, e.selectionChanged() && e.cm.operation(function () { - return e.cm.curOp.selectionChanged = !0; - }); - }, 20); - }, P.prototype.showMultipleSelections = function (e) { - ve(this.cm.display.cursorDiv, e.cursors), ve(this.cm.display.selectionDiv, e.selection); - }, P.prototype.rememberSelection = function () { - var e = this.getSelection(); - this.lastAnchorNode = e.anchorNode, this.lastAnchorOffset = e.anchorOffset, this.lastFocusNode = e.focusNode, this.lastFocusOffset = e.focusOffset; - }, P.prototype.selectionInEditor = function () { - var e = this.getSelection(); - if (!e.rangeCount) return !1; - var t = e.getRangeAt(0).commonAncestorContainer; - return Ke(this.div, t); - }, P.prototype.focus = function () { - this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || be() != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus()); - }, P.prototype.blur = function () { - this.div.blur(); - }, P.prototype.getField = function () { - return this.div; - }, P.prototype.supportsTouch = function () { - return !0; - }, P.prototype.receivedFocus = function () { - var e = this, - t = this; - this.selectionInEditor() ? setTimeout(function () { - return e.pollSelection(); - }, 20) : de(this.cm, function () { - return t.cm.curOp.selectionChanged = !0; - }); - function i() { - t.cm.state.focused && (t.pollSelection(), t.polling.set(t.cm.options.pollInterval, i)); - } - u(i, "poll"), this.polling.set(this.cm.options.pollInterval, i); - }, P.prototype.selectionChanged = function () { - var e = this.getSelection(); - return e.anchorNode != this.lastAnchorNode || e.anchorOffset != this.lastAnchorOffset || e.focusNode != this.lastFocusNode || e.focusOffset != this.lastFocusOffset; - }, P.prototype.pollSelection = function () { - if (!(this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged())) { - var e = this.getSelection(), - t = this.cm; - if (Dr && Tr && this.cm.display.gutterSpecs.length && ru(e.anchorNode)) { - this.cm.triggerOnKeyDown({ - type: "keydown", - keyCode: 8, - preventDefault: Math.abs - }), this.blur(), this.focus(); - return; - } - if (!this.composing) { - this.rememberSelection(); - var i = fi(t, e.anchorNode, e.anchorOffset), - r = fi(t, e.focusNode, e.focusOffset); - i && r && de(t, function () { - te(t.doc, Ze(i, r), Me), (i.bad || r.bad) && (t.curOp.selectionChanged = !0); - }); - } - } - }, P.prototype.pollContent = function () { - this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null); - var e = this.cm, - t = e.display, - i = e.doc.sel.primary(), - r = i.from(), - n = i.to(); - if (r.ch == 0 && r.line > e.firstLine() && (r = y(r.line - 1, S(e.doc, r.line - 1).length)), n.ch == S(e.doc, n.line).text.length && n.line < e.lastLine() && (n = y(n.line + 1, 0)), r.line < t.viewFrom || n.line > t.viewTo - 1) return !1; - var l, o, a; - r.line == t.viewFrom || (l = ht(e, r.line)) == 0 ? (o = F(t.view[0].line), a = t.view[0].node) : (o = F(t.view[l].line), a = t.view[l - 1].node.nextSibling); - var s = ht(e, n.line), - f, - h; - if (s == t.view.length - 1 ? (f = t.viewTo - 1, h = t.lineDiv.lastChild) : (f = F(t.view[s + 1].line) - 1, h = t.view[s + 1].node.previousSibling), !a) return !1; - for (var c = e.doc.splitLines(iu(e, a, h, o, f)), p = ot(e.doc, y(o, 0), y(f, S(e.doc, f).text.length)); c.length > 1 && p.length > 1;) if (H(c) == H(p)) c.pop(), p.pop(), f--;else if (c[0] == p[0]) c.shift(), p.shift(), o++;else break; - for (var d = 0, v = 0, g = c[0], m = p[0], b = Math.min(g.length, m.length); d < b && g.charCodeAt(d) == m.charCodeAt(d);) ++d; - for (var C = H(c), x = H(p), w = Math.min(C.length - (c.length == 1 ? d : 0), x.length - (p.length == 1 ? d : 0)); v < w && C.charCodeAt(C.length - v - 1) == x.charCodeAt(x.length - v - 1);) ++v; - if (c.length == 1 && p.length == 1 && o == r.line) for (; d && d > r.ch && C.charCodeAt(C.length - v - 1) == x.charCodeAt(x.length - v - 1);) d--, v++; - c[c.length - 1] = C.slice(0, C.length - v).replace(/^\u200b+/, ""), c[0] = c[0].slice(d).replace(/\u200b+$/, ""); - var k = y(o, d), - L = y(f, p.length ? H(p).length - v : 0); - if (c.length > 1 || c[0] || D(k, L)) return Ft(e.doc, c, k, L, "+input"), !0; - }, P.prototype.ensurePolled = function () { - this.forceCompositionEnd(); - }, P.prototype.reset = function () { - this.forceCompositionEnd(); - }, P.prototype.forceCompositionEnd = function () { - this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus()); - }, P.prototype.readFromDOMSoon = function () { - var e = this; - this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function () { - if (e.readDOMTimeout = null, e.composing) if (e.composing.done) e.composing = null;else return; - e.updateFromDOM(); - }, 80)); - }, P.prototype.updateFromDOM = function () { - var e = this; - (this.cm.isReadOnly() || !this.pollContent()) && de(this.cm, function () { - return se(e.cm); - }); - }, P.prototype.setUneditable = function (e) { - e.contentEditable = "false"; - }, P.prototype.onKeyPress = function (e) { - e.charCode == 0 || this.composing || (e.preventDefault(), this.cm.isReadOnly() || Q(this.cm, Sn)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0)); - }, P.prototype.readOnlyChanged = function (e) { - this.div.contentEditable = String(e != "nocursor"); - }, P.prototype.onContextMenu = function () {}, P.prototype.resetPosition = function () {}, P.prototype.needsContentAttribute = !0; - function Uo(e, t) { - var i = _i(e, t.line); - if (!i || i.hidden) return null; - var r = S(e.doc, t.line), - n = vl(i, r, t.line), - l = Pe(r, e.doc.direction), - o = "left"; - if (l) { - var a = Zt(l, t.ch); - o = a % 2 ? "right" : "left"; - } - var s = ml(n.map, t.ch, o); - return s.offset = s.collapse == "right" ? s.end : s.start, s; - } - u(Uo, "posToDOM"); - function ru(e) { - for (var t = e; t; t = t.parentNode) if (/CodeMirror-gutter-wrapper/.test(t.className)) return !0; - return !1; - } - u(ru, "isInGutter"); - function Bt(e, t) { - return t && (e.bad = !0), e; - } - u(Bt, "badPos"); - function iu(e, t, i, r, n) { - var l = "", - o = !1, - a = e.doc.lineSeparator(), - s = !1; - function f(d) { - return function (v) { - return v.id == d; - }; - } - u(f, "recognizeMarker"); - function h() { - o && (l += a, s && (l += a), o = s = !1); - } - u(h, "close"); - function c(d) { - d && (h(), l += d); - } - u(c, "addText"); - function p(d) { - if (d.nodeType == 1) { - var v = d.getAttribute("cm-text"); - if (v) { - c(v); - return; - } - var g = d.getAttribute("cm-marker"), - m; - if (g) { - var b = e.findMarks(y(r, 0), y(n + 1, 0), f(+g)); - b.length && (m = b[0].find(0)) && c(ot(e.doc, m.from, m.to).join(a)); - return; - } - if (d.getAttribute("contenteditable") == "false") return; - var C = /^(pre|div|p|li|table|br)$/i.test(d.nodeName); - if (!/^br$/i.test(d.nodeName) && d.textContent.length == 0) return; - C && h(); - for (var x = 0; x < d.childNodes.length; x++) p(d.childNodes[x]); - /^(pre|p)$/i.test(d.nodeName) && (s = !0), C && (o = !0); - } else d.nodeType == 3 && c(d.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")); - } - for (u(p, "walk"); p(t), t != i;) t = t.nextSibling, s = !1; - return l; - } - u(iu, "domTextBetween"); - function fi(e, t, i) { - var r; - if (t == e.display.lineDiv) { - if (r = e.display.lineDiv.childNodes[i], !r) return Bt(e.clipPos(y(e.display.viewTo - 1)), !0); - t = null, i = 0; - } else for (r = t;; r = r.parentNode) { - if (!r || r == e.display.lineDiv) return null; - if (r.parentNode && r.parentNode == e.display.lineDiv) break; - } - for (var n = 0; n < e.display.view.length; n++) { - var l = e.display.view[n]; - if (l.node == r) return nu(l, t, i); - } - } - u(fi, "domToPos"); - function nu(e, t, i) { - var r = e.text.firstChild, - n = !1; - if (!t || !Ke(r, t)) return Bt(y(F(e.line), 0), !0); - if (t == r && (n = !0, t = r.childNodes[i], i = 0, !t)) { - var l = e.rest ? H(e.rest) : e.line; - return Bt(y(F(l), l.text.length), n); - } - var o = t.nodeType == 3 ? t : null, - a = t; - for (!o && t.childNodes.length == 1 && t.firstChild.nodeType == 3 && (o = t.firstChild, i && (i = o.nodeValue.length)); a.parentNode != r;) a = a.parentNode; - var s = e.measure, - f = s.maps; - function h(m, b, C) { - for (var x = -1; x < (f ? f.length : 0); x++) for (var w = x < 0 ? s.map : f[x], k = 0; k < w.length; k += 3) { - var L = w[k + 2]; - if (L == m || L == b) { - var A = F(x < 0 ? e.line : e.rest[x]), - E = w[k] + C; - return (C < 0 || L != m) && (E = w[k + (C ? 1 : 0)]), y(A, E); - } - } - } - u(h, "find"); - var c = h(o, a, i); - if (c) return Bt(c, n); - for (var p = a.nextSibling, d = o ? o.nodeValue.length - i : 0; p; p = p.nextSibling) { - if (c = h(p, p.firstChild, 0), c) return Bt(y(c.line, c.ch - d), n); - d += p.textContent.length; - } - for (var v = a.previousSibling, g = i; v; v = v.previousSibling) { - if (c = h(v, v.firstChild, -1), c) return Bt(y(c.line, c.ch + g), n); - g += v.textContent.length; - } - } - u(nu, "locateNodeInLineView"); - var G = u(function (e) { - this.cm = e, this.prevInput = "", this.pollingFast = !1, this.polling = new _e(), this.hasSelection = !1, this.composing = null; - }, "TextareaInput"); - G.prototype.init = function (e) { - var t = this, - i = this, - r = this.cm; - this.createField(e); - var n = this.textarea; - e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild), Ut && (n.style.width = "0px"), M(n, "input", function () { - O && I >= 9 && t.hasSelection && (t.hasSelection = null), i.poll(); - }), M(n, "paste", function (o) { - q(r, o) || Eo(o, r) || (r.state.pasteIncoming = +new Date(), i.fastPoll()); - }); - function l(o) { - if (!q(r, o)) { - if (r.somethingSelected()) ui({ - lineWise: !1, - text: r.getSelections() - });else if (r.options.lineWiseCopyCut) { - var a = Ro(r); - ui({ - lineWise: !0, - text: a.text - }), o.type == "cut" ? r.setSelections(a.ranges, null, Me) : (i.prevInput = "", n.value = a.text.join(` -`), _t(n)); - } else return; - o.type == "cut" && (r.state.cutIncoming = +new Date()); - } - } - u(l, "prepareCopyCut"), M(n, "cut", l), M(n, "copy", l), M(e.scroller, "paste", function (o) { - if (!(Re(e, o) || q(r, o))) { - if (!n.dispatchEvent) { - r.state.pasteIncoming = +new Date(), i.focus(); - return; - } - var a = new Event("paste"); - a.clipboardData = o.clipboardData, n.dispatchEvent(a); - } - }), M(e.lineSpace, "selectstart", function (o) { - Re(e, o) || ae(o); - }), M(n, "compositionstart", function () { - var o = r.getCursor("from"); - i.composing && i.composing.range.clear(), i.composing = { - start: o, - range: r.markText(o, r.getCursor("to"), { - className: "CodeMirror-composing" - }) - }; - }), M(n, "compositionend", function () { - i.composing && (i.poll(), i.composing.range.clear(), i.composing = null); - }); - }, G.prototype.createField = function (e) { - this.wrapper = zo(), this.textarea = this.wrapper.firstChild; - }, G.prototype.screenReaderLabelChanged = function (e) { - e ? this.textarea.setAttribute("aria-label", e) : this.textarea.removeAttribute("aria-label"); - }, G.prototype.prepareSelection = function () { - var e = this.cm, - t = e.display, - i = e.doc, - r = Nl(e); - if (e.options.moveInputWithCursor) { - var n = Le(e, i.sel.primary().head, "div"), - l = t.wrapper.getBoundingClientRect(), - o = t.lineDiv.getBoundingClientRect(); - r.teTop = Math.max(0, Math.min(t.wrapper.clientHeight - 10, n.top + o.top - l.top)), r.teLeft = Math.max(0, Math.min(t.wrapper.clientWidth - 10, n.left + o.left - l.left)); - } - return r; - }, G.prototype.showSelection = function (e) { - var t = this.cm, - i = t.display; - ve(i.cursorDiv, e.cursors), ve(i.selectionDiv, e.selection), e.teTop != null && (this.wrapper.style.top = e.teTop + "px", this.wrapper.style.left = e.teLeft + "px"); - }, G.prototype.reset = function (e) { - if (!(this.contextMenuPending || this.composing)) { - var t = this.cm; - if (t.somethingSelected()) { - this.prevInput = ""; - var i = t.getSelection(); - this.textarea.value = i, t.state.focused && _t(this.textarea), O && I >= 9 && (this.hasSelection = i); - } else e || (this.prevInput = this.textarea.value = "", O && I >= 9 && (this.hasSelection = null)); - } - }, G.prototype.getField = function () { - return this.textarea; - }, G.prototype.supportsTouch = function () { - return !1; - }, G.prototype.focus = function () { - if (this.cm.options.readOnly != "nocursor" && (!Kt || be() != this.textarea)) try { - this.textarea.focus(); - } catch {} - }, G.prototype.blur = function () { - this.textarea.blur(); - }, G.prototype.resetPosition = function () { - this.wrapper.style.top = this.wrapper.style.left = 0; - }, G.prototype.receivedFocus = function () { - this.slowPoll(); - }, G.prototype.slowPoll = function () { - var e = this; - this.pollingFast || this.polling.set(this.cm.options.pollInterval, function () { - e.poll(), e.cm.state.focused && e.slowPoll(); - }); - }, G.prototype.fastPoll = function () { - var e = !1, - t = this; - t.pollingFast = !0; - function i() { - var r = t.poll(); - !r && !e ? (e = !0, t.polling.set(60, i)) : (t.pollingFast = !1, t.slowPoll()); - } - u(i, "p"), t.polling.set(20, i); - }, G.prototype.poll = function () { - var e = this, - t = this.cm, - i = this.textarea, - r = this.prevInput; - if (this.contextMenuPending || !t.state.focused || ia(i) && !r && !this.composing || t.isReadOnly() || t.options.disableInput || t.state.keySeq) return !1; - var n = i.value; - if (n == r && !t.somethingSelected()) return !1; - if (O && I >= 9 && this.hasSelection === n || me && /[\uf700-\uf7ff]/.test(n)) return t.display.input.reset(), !1; - if (t.doc.sel == t.display.selForContextMenu) { - var l = n.charCodeAt(0); - if (l == 8203 && !r && (r = "​"), l == 8666) return this.reset(), this.cm.execCommand("undo"); - } - for (var o = 0, a = Math.min(r.length, n.length); o < a && r.charCodeAt(o) == n.charCodeAt(o);) ++o; - return de(t, function () { - Sn(t, n.slice(o), r.length - o, null, e.composing ? "*compose" : null), n.length > 1e3 || n.indexOf(` -`) > -1 ? i.value = e.prevInput = "" : e.prevInput = n, e.composing && (e.composing.range.clear(), e.composing.range = t.markText(e.composing.start, t.getCursor("to"), { - className: "CodeMirror-composing" - })); - }), !0; - }, G.prototype.ensurePolled = function () { - this.pollingFast && this.poll() && (this.pollingFast = !1); - }, G.prototype.onKeyPress = function () { - O && I >= 9 && (this.hasSelection = null), this.fastPoll(); - }, G.prototype.onContextMenu = function (e) { - var t = this, - i = t.cm, - r = i.display, - n = t.textarea; - t.contextMenuPending && t.contextMenuPending(); - var l = ft(i, e), - o = r.scroller.scrollTop; - if (!l || we) return; - var a = i.options.resetSelectionOnContextMenu; - a && i.doc.sel.contains(l) == -1 && Q(i, te)(i.doc, Ze(l), Me); - var s = n.style.cssText, - f = t.wrapper.style.cssText, - h = t.wrapper.offsetParent.getBoundingClientRect(); - t.wrapper.style.cssText = "position: static", n.style.cssText = `position: absolute; width: 30px; height: 30px; - top: ` + (e.clientY - h.top - 5) + "px; left: " + (e.clientX - h.left - 5) + `px; - z-index: 1000; background: ` + (O ? "rgba(255, 255, 255, .05)" : "transparent") + `; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`; - var c; - ne && (c = window.scrollY), r.input.focus(), ne && window.scrollTo(null, c), r.input.reset(), i.somethingSelected() || (n.value = t.prevInput = " "), t.contextMenuPending = d, r.selForContextMenu = i.doc.sel, clearTimeout(r.detectingSelectAll); - function p() { - if (n.selectionStart != null) { - var g = i.somethingSelected(), - m = "​" + (g ? n.value : ""); - n.value = "⇚", n.value = m, t.prevInput = g ? "" : "​", n.selectionStart = 1, n.selectionEnd = m.length, r.selForContextMenu = i.doc.sel; - } - } - u(p, "prepareSelectAllHack"); - function d() { - if (t.contextMenuPending == d && (t.contextMenuPending = !1, t.wrapper.style.cssText = f, n.style.cssText = s, O && I < 9 && r.scrollbars.setScrollTop(r.scroller.scrollTop = o), n.selectionStart != null)) { - (!O || O && I < 9) && p(); - var g = 0, - m = u(function () { - r.selForContextMenu == i.doc.sel && n.selectionStart == 0 && n.selectionEnd > 0 && t.prevInput == "​" ? Q(i, lo)(i) : g++ < 10 ? r.detectingSelectAll = setTimeout(m, 500) : (r.selForContextMenu = null, r.input.reset()); - }, "poll"); - r.detectingSelectAll = setTimeout(m, 200); - } - } - if (u(d, "rehide"), O && I >= 9 && p(), ci) { - Qt(e); - var v = u(function () { - ge(window, "mouseup", v), setTimeout(d, 20); - }, "mouseup"); - M(window, "mouseup", v); - } else setTimeout(d, 50); - }, G.prototype.readOnlyChanged = function (e) { - e || this.reset(), this.textarea.disabled = e == "nocursor", this.textarea.readOnly = !!e; - }, G.prototype.setUneditable = function () {}, G.prototype.needsContentAttribute = !1; - function lu(e, t) { - if (t = t ? nt(t) : {}, t.value = e.value, !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex), !t.placeholder && e.placeholder && (t.placeholder = e.placeholder), t.autofocus == null) { - var i = be(); - t.autofocus = i == e || e.getAttribute("autofocus") != null && i == document.body; - } - function r() { - e.value = a.getValue(); - } - u(r, "save"); - var n; - if (e.form && (M(e.form, "submit", r), !t.leaveSubmitMethodAlone)) { - var l = e.form; - n = l.submit; - try { - var o = l.submit = function () { - r(), l.submit = n, l.submit(), l.submit = o; - }; - } catch {} - } - t.finishInit = function (s) { - s.save = r, s.getTextArea = function () { - return e; - }, s.toTextArea = function () { - s.toTextArea = isNaN, r(), e.parentNode.removeChild(s.getWrapperElement()), e.style.display = "", e.form && (ge(e.form, "submit", r), !t.leaveSubmitMethodAlone && typeof e.form.submit == "function" && (e.form.submit = n)); - }; - }, e.style.display = "none"; - var a = R(function (s) { - return e.parentNode.insertBefore(s, e.nextSibling); - }, t); - return a; - } - u(lu, "fromTextArea"); - function ou(e) { - e.off = ge, e.on = M, e.wheelEventPixels = ds, e.Doc = ue, e.splitLines = ki, e.countColumn = xe, e.findColumn = gi, e.isWordChar = mi, e.Pass = Nr, e.signal = U, e.Line = St, e.changeEnd = Qe, e.scrollbarModel = Pl, e.Pos = y, e.cmpPos = D, e.modes = Mi, e.mimeModes = Ct, e.resolveMode = Hr, e.getMode = Di, e.modeExtensions = wt, e.extendMode = sa, e.copyState = lt, e.startState = Gn, e.innerMode = Ni, e.commands = br, e.keyMap = ze, e.keyName = wo, e.isModifierKey = xo, e.lookupKey = Et, e.normalizeKeyMap = Ps, e.StringStream = K, e.SharedTextMarker = gr, e.TextMarker = je, e.LineWidget = vr, e.e_preventDefault = ae, e.e_stopPropagation = Bn, e.e_stop = Qt, e.addClass = it, e.contains = Ke, e.rmClass = tt, e.keyNames = Ve; - } - u(ou, "addLegacyProps"), js(R), tu(R); - var au = "iter insert remove copy getEditor constructor".split(" "); - for (var hi in ue.prototype) ue.prototype.hasOwnProperty(hi) && ee(au, hi) < 0 && (R.prototype[hi] = function (e) { - return function () { - return e.apply(this.doc, arguments); - }; - }(ue.prototype[hi])); - return xt(ue), R.inputStyles = { - textarea: G, - contenteditable: P - }, R.defineMode = function (e) { - !R.defaults.mode && e != "null" && (R.defaults.mode = e), oa.apply(this, arguments); - }, R.defineMIME = aa, R.defineMode("null", function () { - return { - token: function (e) { - return e.skipToEnd(); - } - }; - }), R.defineMIME("text/plain", "null"), R.defineExtension = function (e, t) { - R.prototype[e] = t; - }, R.defineDocExtension = function (e, t) { - ue.prototype[e] = t; - }, R.fromTextArea = lu, ou(R), R.version = "5.65.3", R; }); - }(Mn)), Mn.exports; + // @ts-ignore + window.addEventListener('test', options, options); + // @ts-ignore + window.removeEventListener('test', options, options); + } catch (err) { + passiveSupported = false; + } } -u(hu, "requireCodemirror"); -exports.getDefaultExportFromCjs = fu; -exports.requireCodemirror = hu; +var nonPassive = exports.nonPassive = passiveSupported ? { + passive: false +} : false; /***/ }), -/***/ "../../graphiql-react/dist/comment.cjs.js": -/*!************************************************!*\ - !*** ../../graphiql-react/dist/comment.cjs.js ***! - \************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js": +/*!*****************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***! + \*****************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; -var G = Object.defineProperty; -var I = (p, E) => G(p, "name", { - value: E, - configurable: !0 -}); -const z = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function H(p, E) { - for (var u = 0; u < E.length; u++) { - const C = E[u]; - if (typeof C != "string" && !Array.isArray(C)) { - for (const s in C) if (s !== "default" && !(s in p)) { - const r = Object.getOwnPropertyDescriptor(C, s); - r && Object.defineProperty(p, s, r.get ? r : { - enumerable: !0, - get: () => C[s] - }); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.locationCouldBeScrolled = exports.handleScroll = void 0; +var alwaysContainsScroll = function (node) { + // textarea will always _contain_ scroll inside self. It only can be hidden + return node.tagName === 'TEXTAREA'; +}; +var elementCanBeScrolled = function (node, overflow) { + var styles = window.getComputedStyle(node); + return ( + // not-not-scrollable + styles[overflow] !== 'hidden' && + // contains scroll inside self + !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible') + ); +}; +var elementCouldBeVScrolled = function (node) { + return elementCanBeScrolled(node, 'overflowY'); +}; +var elementCouldBeHScrolled = function (node) { + return elementCanBeScrolled(node, 'overflowX'); +}; +var locationCouldBeScrolled = function (axis, node) { + var current = node; + do { + // Skip over shadow root + if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { + current = current.host; + } + var isScrollable = elementCouldBeScrolled(axis, current); + if (isScrollable) { + var _a = getScrollVariables(axis, current), + s = _a[1], + d = _a[2]; + if (s > d) { + return true; } } - } - return Object.freeze(Object.defineProperty(p, Symbol.toStringTag, { - value: "Module" - })); -} -I(H, "_mergeNamespaces"); -var J = { - exports: {} + current = current.parentNode; + } while (current && current !== document.body); + return false; }; -(function (p, E) { - (function (u) { - u(z.requireCodemirror()); - })(function (u) { - var C = {}, - s = /[^\s\u00a0]/, - r = u.Pos, - F = u.cmpPos; - function D(t) { - var l = t.search(s); - return l == -1 ? 0 : l; - } - I(D, "firstNonWS"), u.commands.toggleComment = function (t) { - t.toggleComment(); - }, u.defineExtension("toggleComment", function (t) { - t || (t = C); - for (var l = this, n = 1 / 0, e = this.listSelections(), f = null, m = e.length - 1; m >= 0; m--) { - var a = e[m].from(), - i = e[m].to(); - a.line >= n || (i.line >= n && (i = r(n, 0)), n = a.line, f == null ? l.uncomment(a, i, t) ? f = "un" : (l.lineComment(a, i, t), f = "line") : f == "un" ? l.uncomment(a, i, t) : l.lineComment(a, i, t)); - } - }); - function w(t, l, n) { - return /\bstring\b/.test(t.getTokenTypeAt(r(l.line, 0))) && !/^[\'\"\`]/.test(n); - } - I(w, "probablyInsideString"); - function P(t, l) { - var n = t.getMode(); - return n.useInnerComments === !1 || !n.innerMode ? n : t.getModeAt(l); - } - I(P, "getMode"), u.defineExtension("lineComment", function (t, l, n) { - n || (n = C); - var e = this, - f = P(e, t), - m = e.getLine(t.line); - if (!(m == null || w(e, t, m))) { - var a = n.lineComment || f.lineComment; - if (!a) { - (n.blockCommentStart || f.blockCommentStart) && (n.fullLines = !0, e.blockComment(t, l, n)); - return; - } - var i = Math.min(l.ch != 0 || l.line == t.line ? l.line + 1 : l.line, e.lastLine() + 1), - k = n.padding == null ? " " : n.padding, - g = n.commentBlankLines || t.line == l.line; - e.operation(function () { - if (n.indent) { - for (var d = null, c = t.line; c < i; ++c) { - var v = e.getLine(c), - h = v.slice(0, D(v)); - (d == null || d.length > h.length) && (d = h); - } - for (var c = t.line; c < i; ++c) { - var v = e.getLine(c), - o = d.length; - !g && !s.test(v) || (v.slice(0, o) != d && (o = D(v)), e.replaceRange(d + a + k, r(c, 0), r(c, o))); - } - } else for (var c = t.line; c < i; ++c) (g || s.test(e.getLine(c))) && e.replaceRange(a + k, r(c, 0)); - }); - } - }), u.defineExtension("blockComment", function (t, l, n) { - n || (n = C); - var e = this, - f = P(e, t), - m = n.blockCommentStart || f.blockCommentStart, - a = n.blockCommentEnd || f.blockCommentEnd; - if (!m || !a) { - (n.lineComment || f.lineComment) && n.fullLines != !1 && e.lineComment(t, l, n); - return; - } - if (!/\bcomment\b/.test(e.getTokenTypeAt(r(t.line, 0)))) { - var i = Math.min(l.line, e.lastLine()); - i != t.line && l.ch == 0 && s.test(e.getLine(i)) && --i; - var k = n.padding == null ? " " : n.padding; - t.line > i || e.operation(function () { - if (n.fullLines != !1) { - var g = s.test(e.getLine(i)); - e.replaceRange(k + a, r(i)), e.replaceRange(m + k, r(t.line, 0)); - var d = n.blockCommentLead || f.blockCommentLead; - if (d != null) for (var c = t.line + 1; c <= i; ++c) (c != i || g) && e.replaceRange(d + k, r(c, 0)); - } else { - var v = F(e.getCursor("to"), l) == 0, - h = !e.somethingSelected(); - e.replaceRange(a, l), v && e.setSelection(h ? l : e.getCursor("from"), l), e.replaceRange(m, t); - } - }); +exports.locationCouldBeScrolled = locationCouldBeScrolled; +var getVScrollVariables = function (_a) { + var scrollTop = _a.scrollTop, + scrollHeight = _a.scrollHeight, + clientHeight = _a.clientHeight; + return [scrollTop, scrollHeight, clientHeight]; +}; +var getHScrollVariables = function (_a) { + var scrollLeft = _a.scrollLeft, + scrollWidth = _a.scrollWidth, + clientWidth = _a.clientWidth; + return [scrollLeft, scrollWidth, clientWidth]; +}; +var elementCouldBeScrolled = function (axis, node) { + return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node); +}; +var getScrollVariables = function (axis, node) { + return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node); +}; +var getDirectionFactor = function (axis, direction) { + /** + * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position, + * and then increasingly negative as you scroll towards the end of the content. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft + */ + return axis === 'h' && direction === 'rtl' ? -1 : 1; +}; +var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) { + var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction); + var delta = directionFactor * sourceDelta; + // find scrollable target + var target = event.target; + var targetInLock = endTarget.contains(target); + var shouldCancelScroll = false; + var isDeltaPositive = delta > 0; + var availableScroll = 0; + var availableScrollTop = 0; + do { + var _a = getScrollVariables(axis, target), + position = _a[0], + scroll_1 = _a[1], + capacity = _a[2]; + var elementScroll = scroll_1 - capacity - directionFactor * position; + if (position || elementScroll) { + if (elementCouldBeScrolled(axis, target)) { + availableScroll += elementScroll; + availableScrollTop += position; } - }), u.defineExtension("uncomment", function (t, l, n) { - n || (n = C); - var e = this, - f = P(e, t), - m = Math.min(l.ch != 0 || l.line == t.line ? l.line : l.line - 1, e.lastLine()), - a = Math.min(t.line, m), - i = n.lineComment || f.lineComment, - k = [], - g = n.padding == null ? " " : n.padding, - d; - e: { - if (!i) break e; - for (var c = a; c <= m; ++c) { - var v = e.getLine(c), - h = v.indexOf(i); - if (h > -1 && !/comment/.test(e.getTokenTypeAt(r(c, h + 1))) && (h = -1), h == -1 && s.test(v) || h > -1 && s.test(v.slice(0, h))) break e; - k.push(v); - } - if (e.operation(function () { - for (var b = a; b <= m; ++b) { - var x = k[b - a], - O = x.indexOf(i), - L = O + i.length; - O < 0 || (x.slice(L, L + g.length) == g && (L += g.length), d = !0, e.replaceRange("", r(b, O), r(b, L))); - } - }), d) return !0; - } - var o = n.blockCommentStart || f.blockCommentStart, - S = n.blockCommentEnd || f.blockCommentEnd; - if (!o || !S) return !1; - var q = n.blockCommentLead || f.blockCommentLead, - A = e.getLine(a), - j = A.indexOf(o); - if (j == -1) return !1; - var _ = m == a ? A : e.getLine(m), - y = _.indexOf(S, m == a ? j + o.length : 0), - N = r(a, j + 1), - W = r(m, y + 1); - if (y == -1 || !/comment/.test(e.getTokenTypeAt(N)) || !/comment/.test(e.getTokenTypeAt(W)) || e.getRange(N, W, ` -`).indexOf(S) > -1) return !1; - var R = A.lastIndexOf(o, t.ch), - T = R == -1 ? -1 : A.slice(0, t.ch).indexOf(S, R + o.length); - if (R != -1 && T != -1 && T + S.length != t.ch) return !1; - T = _.indexOf(S, l.ch); - var $ = _.slice(l.ch).lastIndexOf(o, T - l.ch); - return R = T == -1 || $ == -1 ? -1 : l.ch + $, T != -1 && R != -1 && R != l.ch ? !1 : (e.operation(function () { - e.replaceRange("", r(m, y - (g && _.slice(y - g.length, y) == g ? g.length : 0)), r(m, y + S.length)); - var b = j + o.length; - if (g && A.slice(b, b + g.length) == g && (b += g.length), e.replaceRange("", r(a, j), r(a, b)), q) for (var x = a + 1; x <= m; ++x) { - var O = e.getLine(x), - L = O.indexOf(q); - if (!(L == -1 || s.test(O.slice(0, L)))) { - var M = L + q.length; - g && O.slice(M, M + g.length) == g && (M += g.length), e.replaceRange("", r(x, L), r(x, M)); - } - } - }), !0); - }); - }); -})(); -var B = J.exports; -const K = z.getDefaultExportFromCjs(B), - Q = H({ - __proto__: null, - default: K - }, [B]); -exports.comment = Q; + } + target = target.parentNode; + } while ( + // portaled content + !targetInLock && target !== document.body || + // self content + targetInLock && (endTarget.contains(target) || endTarget === target)); + if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) { + shouldCancelScroll = true; + } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) { + shouldCancelScroll = true; + } + return shouldCancelScroll; +}; +exports.handleScroll = handleScroll; /***/ }), -/***/ "../../graphiql-react/dist/dialog.cjs.js": -/*!***********************************************!*\ - !*** ../../graphiql-react/dist/dialog.cjs.js ***! - \***********************************************/ +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/index.js": +/*!**********************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/index.js ***! + \**********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var E = Object.defineProperty; -var g = (v, m) => E(v, "name", { - value: m, - configurable: !0 -}); -const b = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function O(v, m) { - for (var n = 0; n < m.length; n++) { - const r = m[n]; - if (typeof r != "string" && !Array.isArray(r)) { - for (const c in r) if (c !== "default" && !(c in v)) { - const u = Object.getOwnPropertyDescriptor(r, c); - u && Object.defineProperty(v, c, u.get ? u : { - enumerable: !0, - get: () => r[c] - }); - } - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "RemoveScroll", ({ + enumerable: true, + get: function () { + return _Combination.default; } - return Object.freeze(Object.defineProperty(v, Symbol.toStringTag, { - value: "Module" - })); -} -g(O, "_mergeNamespaces"); -var T = { - exports: {} +})); +var _Combination = _interopRequireDefault(__webpack_require__(/*! ./Combination */ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js": +/*!***********************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/medium.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.effectCar = void 0; +var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js"); +var effectCar = exports.effectCar = (0, _useSidecar.createSidecarMedium)(); + +/***/ }), + +/***/ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js": +/*!************************************************************************!*\ + !*** ../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js ***! + \************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js"); +var _SideEffect = __webpack_require__(/*! ./SideEffect */ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js"); +var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js"); +var _default = exports["default"] = (0, _useSidecar.exportSidecar)(_medium.effectCar, _SideEffect.RemoveScrollSideCar); + +/***/ }), + +/***/ "../../../node_modules/react-style-singleton/dist/es2015/component.js": +/*!****************************************************************************!*\ + !*** ../../../node_modules/react-style-singleton/dist/es2015/component.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.styleSingleton = void 0; +var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js"); +/** + * create a Component to add styles on demand + * - styles are added when first instance is mounted + * - styles are removed when the last instance is unmounted + * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior + */ +var styleSingleton = function () { + var useStyle = (0, _hook.styleHookSingleton)(); + var Sheet = function (_a) { + var styles = _a.styles, + dynamic = _a.dynamic; + useStyle(styles, dynamic); + return null; + }; + return Sheet; }; -(function (v, m) { - (function (n) { - n(b.requireCodemirror()); - })(function (n) { - function r(u, f, e) { - var a = u.getWrapperElement(), - l; - return l = a.appendChild(document.createElement("div")), e ? l.className = "CodeMirror-dialog CodeMirror-dialog-bottom" : l.className = "CodeMirror-dialog CodeMirror-dialog-top", typeof f == "string" ? l.innerHTML = f : l.appendChild(f), n.addClass(a, "dialog-opened"), l; - } - g(r, "dialogDiv"); - function c(u, f) { - u.state.currentNotificationClose && u.state.currentNotificationClose(), u.state.currentNotificationClose = f; - } - g(c, "closeNotification"), n.defineExtension("openDialog", function (u, f, e) { - e || (e = {}), c(this, null); - var a = r(this, u, e.bottom), - l = !1, - s = this; - function i(t) { - if (typeof t == "string") o.value = t;else { - if (l) return; - l = !0, n.rmClass(a.parentNode, "dialog-opened"), a.parentNode.removeChild(a), s.focus(), e.onClose && e.onClose(a); - } - } - g(i, "close"); - var o = a.getElementsByTagName("input")[0], - d; - return o ? (o.focus(), e.value && (o.value = e.value, e.selectValueOnOpen !== !1 && o.select()), e.onInput && n.on(o, "input", function (t) { - e.onInput(t, o.value, i); - }), e.onKeyUp && n.on(o, "keyup", function (t) { - e.onKeyUp(t, o.value, i); - }), n.on(o, "keydown", function (t) { - e && e.onKeyDown && e.onKeyDown(t, o.value, i) || ((t.keyCode == 27 || e.closeOnEnter !== !1 && t.keyCode == 13) && (o.blur(), n.e_stop(t), i()), t.keyCode == 13 && f(o.value, t)); - }), e.closeOnBlur !== !1 && n.on(a, "focusout", function (t) { - t.relatedTarget !== null && i(); - })) : (d = a.getElementsByTagName("button")[0]) && (n.on(d, "click", function () { - i(), s.focus(); - }), e.closeOnBlur !== !1 && n.on(d, "blur", i), d.focus()), i; - }), n.defineExtension("openConfirm", function (u, f, e) { - c(this, null); - var a = r(this, u, e && e.bottom), - l = a.getElementsByTagName("button"), - s = !1, - i = this, - o = 1; - function d() { - s || (s = !0, n.rmClass(a.parentNode, "dialog-opened"), a.parentNode.removeChild(a), i.focus()); - } - g(d, "close"), l[0].focus(); - for (var t = 0; t < l.length; ++t) { - var p = l[t]; - (function (N) { - n.on(p, "click", function (h) { - n.e_preventDefault(h), d(), N && N(i); - }); - })(f[t]), n.on(p, "blur", function () { - --o, setTimeout(function () { - o <= 0 && d(); - }, 200); - }), n.on(p, "focus", function () { - ++o; - }); - } - }), n.defineExtension("openNotification", function (u, f) { - c(this, i); - var e = r(this, u, f && f.bottom), - a = !1, - l, - s = f && typeof f.duration < "u" ? f.duration : 5e3; - function i() { - a || (a = !0, clearTimeout(l), n.rmClass(e.parentNode, "dialog-opened"), e.parentNode.removeChild(e)); - } - return g(i, "close"), n.on(e, "click", function (o) { - n.e_preventDefault(o), i(); - }), s && (l = setTimeout(i, s)), i; - }); - }); -})(); -var y = T.exports; -const x = b.getDefaultExportFromCjs(y), - k = O({ - __proto__: null, - default: x - }, [y]); -exports.dialog = k; -exports.dialogExports = y; +exports.styleSingleton = styleSingleton; /***/ }), -/***/ "../../graphiql-react/dist/foldgutter.cjs.js": -/*!***************************************************!*\ - !*** ../../graphiql-react/dist/foldgutter.cjs.js ***! - \***************************************************/ +/***/ "../../../node_modules/react-style-singleton/dist/es2015/hook.js": +/*!***********************************************************************!*\ + !*** ../../../node_modules/react-style-singleton/dist/es2015/hook.js ***! + \***********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var z = Object.defineProperty; -var u = (O, k) => z(O, "name", { - value: k, - configurable: !0 -}); -const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function L(O, k) { - for (var i = 0; i < k.length; i++) { - const s = k[i]; - if (typeof s != "string" && !Array.isArray(s)) { - for (const p in s) if (p !== "default" && !(p in O)) { - const w = Object.getOwnPropertyDescriptor(s, p); - w && Object.defineProperty(O, p, w.get ? w : { - enumerable: !0, - get: () => s[p] - }); - } - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.styleHookSingleton = void 0; +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +/** + * creates a hook to control style singleton + * @see {@link styleSingleton} for a safer component version + * @example + * ```tsx + * const useStyle = styleHookSingleton(); + * /// + * useStyle('body { overflow: hidden}'); + */ +var styleHookSingleton = function () { + var sheet = (0, _singleton.stylesheetSingleton)(); + return function (styles, isDynamic) { + React.useEffect(function () { + sheet.add(styles); + return function () { + sheet.remove(); + }; + }, [styles && isDynamic]); + }; +}; +exports.styleHookSingleton = styleHookSingleton; + +/***/ }), + +/***/ "../../../node_modules/react-style-singleton/dist/es2015/index.js": +/*!************************************************************************!*\ + !*** ../../../node_modules/react-style-singleton/dist/es2015/index.js ***! + \************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "styleHookSingleton", ({ + enumerable: true, + get: function () { + return _hook.styleHookSingleton; } - return Object.freeze(Object.defineProperty(O, Symbol.toStringTag, { - value: "Module" - })); +})); +Object.defineProperty(exports, "styleSingleton", ({ + enumerable: true, + get: function () { + return _component.styleSingleton; + } +})); +Object.defineProperty(exports, "stylesheetSingleton", ({ + enumerable: true, + get: function () { + return _singleton.stylesheetSingleton; + } +})); +var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-style-singleton/dist/es2015/component.js"); +var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js"); +var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js"); + +/***/ }), + +/***/ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js": +/*!****************************************************************************!*\ + !*** ../../../node_modules/react-style-singleton/dist/es2015/singleton.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.stylesheetSingleton = void 0; +var _getNonce = __webpack_require__(/*! get-nonce */ "../../../node_modules/get-nonce/dist/es2015/index.js"); +function makeStyleTag() { + if (!document) return null; + var tag = document.createElement('style'); + tag.type = 'text/css'; + var nonce = (0, _getNonce.getNonce)(); + if (nonce) { + tag.setAttribute('nonce', nonce); + } + return tag; } -u(L, "_mergeNamespaces"); -var j = { - exports: {} - }, - U = { - exports: {} - }, - N; -function q() { - return N || (N = 1, function (O, k) { - (function (i) { - i(G.requireCodemirror()); - })(function (i) { - function s(t, o, f, a) { - if (f && f.call) { - var g = f; - f = null; - } else var g = v(t, f, "rangeFinder"); - typeof o == "number" && (o = i.Pos(o, 0)); - var y = v(t, f, "minFoldSize"); - function x(l) { - var r = g(t, o); - if (!r || r.to.line - r.from.line < y) return null; - if (a === "fold") return r; - for (var c = t.findMarksAt(r.from), h = 0; h < c.length; ++h) if (c[h].__isFold) { - if (!l) return null; - r.cleared = !0, c[h].clear(); - } - return r; - } - u(x, "getRange"); - var d = x(!0); - if (v(t, f, "scanUp")) for (; !d && o.line > t.firstLine();) o = i.Pos(o.line - 1, 0), d = x(!1); - if (!(!d || d.cleared || a === "unfold")) { - var e = p(t, f, d); - i.on(e, "mousedown", function (l) { - n.clear(), i.e_preventDefault(l); - }); - var n = t.markText(d.from, d.to, { - replacedWith: e, - clearOnEnter: v(t, f, "clearOnEnter"), - __isFold: !0 - }); - n.on("clear", function (l, r) { - i.signal(t, "unfold", t, l, r); - }), i.signal(t, "fold", t, d.from, d.to); - } - } - u(s, "doFold"); - function p(t, o, f) { - var a = v(t, o, "widget"); - if (typeof a == "function" && (a = a(f.from, f.to)), typeof a == "string") { - var g = document.createTextNode(a); - a = document.createElement("span"), a.appendChild(g), a.className = "CodeMirror-foldmarker"; - } else a && (a = a.cloneNode(!0)); - return a; - } - u(p, "makeWidget"), i.newFoldFunction = function (t, o) { - return function (f, a) { - s(f, a, { - rangeFinder: t, - widget: o - }); - }; - }, i.defineExtension("foldCode", function (t, o, f) { - s(this, t, o, f); - }), i.defineExtension("isFolded", function (t) { - for (var o = this.findMarksAt(t), f = 0; f < o.length; ++f) if (o[f].__isFold) return !0; - }), i.commands.toggleFold = function (t) { - t.foldCode(t.getCursor()); - }, i.commands.fold = function (t) { - t.foldCode(t.getCursor(), null, "fold"); - }, i.commands.unfold = function (t) { - t.foldCode(t.getCursor(), { - scanUp: !1 - }, "unfold"); - }, i.commands.foldAll = function (t) { - t.operation(function () { - for (var o = t.firstLine(), f = t.lastLine(); o <= f; o++) t.foldCode(i.Pos(o, 0), { - scanUp: !1 - }, "fold"); - }); - }, i.commands.unfoldAll = function (t) { - t.operation(function () { - for (var o = t.firstLine(), f = t.lastLine(); o <= f; o++) t.foldCode(i.Pos(o, 0), { - scanUp: !1 - }, "unfold"); - }); - }, i.registerHelper("fold", "combine", function () { - var t = Array.prototype.slice.call(arguments, 0); - return function (o, f) { - for (var a = 0; a < t.length; ++a) { - var g = t[a](o, f); - if (g) return g; - } - }; - }), i.registerHelper("fold", "auto", function (t, o) { - for (var f = t.getHelpers(o, "fold"), a = 0; a < f.length; a++) { - var g = f[a](t, o); - if (g) return g; - } - }); - var w = { - rangeFinder: i.fold.auto, - widget: "↔", - minFoldSize: 0, - scanUp: !1, - clearOnEnter: !0 - }; - i.defineOption("foldOptions", null); - function v(t, o, f) { - if (o && o[f] !== void 0) return o[f]; - var a = t.options.foldOptions; - return a && a[f] !== void 0 ? a[f] : w[f]; - } - u(v, "getOption"), i.defineExtension("foldOption", function (t, o) { - return v(this, t, o); - }); - }); - }()), U.exports; -} -u(q, "requireFoldcode"); -(function (O, k) { - (function (i) { - i(G.requireCodemirror(), q()); - })(function (i) { - i.defineOption("foldGutter", !1, function (e, n, l) { - l && l != i.Init && (e.clearGutter(e.state.foldGutter.options.gutter), e.state.foldGutter = null, e.off("gutterClick", g), e.off("changes", y), e.off("viewportChange", x), e.off("fold", d), e.off("unfold", d), e.off("swapDoc", y)), n && (e.state.foldGutter = new p(w(n)), a(e), e.on("gutterClick", g), e.on("changes", y), e.on("viewportChange", x), e.on("fold", d), e.on("unfold", d), e.on("swapDoc", y)); - }); - var s = i.Pos; - function p(e) { - this.options = e, this.from = this.to = 0; - } - u(p, "State"); - function w(e) { - return e === !0 && (e = {}), e.gutter == null && (e.gutter = "CodeMirror-foldgutter"), e.indicatorOpen == null && (e.indicatorOpen = "CodeMirror-foldgutter-open"), e.indicatorFolded == null && (e.indicatorFolded = "CodeMirror-foldgutter-folded"), e; - } - u(w, "parseOptions"); - function v(e, n) { - for (var l = e.findMarks(s(n, 0), s(n + 1, 0)), r = 0; r < l.length; ++r) if (l[r].__isFold) { - var c = l[r].find(-1); - if (c && c.line === n) return l[r]; - } - } - u(v, "isFolded"); - function t(e) { - if (typeof e == "string") { - var n = document.createElement("div"); - return n.className = e + " CodeMirror-guttermarker-subtle", n; - } else return e.cloneNode(!0); - } - u(t, "marker"); - function o(e, n, l) { - var r = e.state.foldGutter.options, - c = n - 1, - h = e.foldOption(r, "minFoldSize"), - E = e.foldOption(r, "rangeFinder"), - S = typeof r.indicatorFolded == "string" && f(r.indicatorFolded), - T = typeof r.indicatorOpen == "string" && f(r.indicatorOpen); - e.eachLine(n, l, function (b) { - ++c; - var _ = null, - F = b.gutterMarkers; - if (F && (F = F[r.gutter]), v(e, c)) { - if (S && F && S.test(F.className)) return; - _ = t(r.indicatorFolded); - } else { - var A = s(c, 0), - m = E && E(e, A); - if (m && m.to.line - m.from.line >= h) { - if (T && F && T.test(F.className)) return; - _ = t(r.indicatorOpen); - } +function injectStyles(tag, css) { + // @ts-ignore + if (tag.styleSheet) { + // @ts-ignore + tag.styleSheet.cssText = css; + } else { + tag.appendChild(document.createTextNode(css)); + } +} +function insertStyleTag(tag) { + var head = document.head || document.getElementsByTagName('head')[0]; + head.appendChild(tag); +} +var stylesheetSingleton = function () { + var counter = 0; + var stylesheet = null; + return { + add: function (style) { + if (counter == 0) { + if (stylesheet = makeStyleTag()) { + injectStyles(stylesheet, style); + insertStyleTag(stylesheet); } - !_ && !F || e.setGutterMarker(b, r.gutter, _); - }); + } + counter++; + }, + remove: function () { + counter--; + if (!counter && stylesheet) { + stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet); + stylesheet = null; + } } - u(o, "updateFoldInfo"); - function f(e) { - return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*"); - } - u(f, "classTest"); - function a(e) { - var n = e.getViewport(), - l = e.state.foldGutter; - l && (e.operation(function () { - o(e, n.from, n.to); - }), l.from = n.from, l.to = n.to); - } - u(a, "updateInViewport"); - function g(e, n, l) { - var r = e.state.foldGutter; - if (r) { - var c = r.options; - if (l == c.gutter) { - var h = v(e, n); - h ? h.clear() : e.foldCode(s(n, 0), c); - } - } - } - u(g, "onGutterClick"); - function y(e) { - var n = e.state.foldGutter; - if (n) { - var l = n.options; - n.from = n.to = 0, clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function () { - a(e); - }, l.foldOnChangeTimeSpan || 600); - } - } - u(y, "onChange"); - function x(e) { - var n = e.state.foldGutter; - if (n) { - var l = n.options; - clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function () { - var r = e.getViewport(); - n.from == n.to || r.from - n.to > 20 || n.from - r.to > 20 ? a(e) : e.operation(function () { - r.from < n.from && (o(e, r.from, n.from), n.from = r.from), r.to > n.to && (o(e, n.to, r.to), n.to = r.to); - }); - }, l.updateViewportTimeSpan || 400); + }; +}; +exports.stylesheetSingleton = stylesheetSingleton; + +/***/ }), + +/***/ "../../../node_modules/react/cjs/react-jsx-runtime.development.js": +/*!************************************************************************!*\ + !*** ../../../node_modules/react/cjs/react-jsx-runtime.development.js ***! + \************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react-jsx-runtime.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +if (true) { + (function () { + 'use strict'; + + var React = __webpack_require__(/*! react */ "react"); + + // ATTENTION + // When adding new symbols to this file, + // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' + // The Symbol used to tag the ReactElement-like types. + var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + var REACT_PORTAL_TYPE = Symbol.for('react.portal'); + var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); + var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); + var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); + var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); + var REACT_CONTEXT_TYPE = Symbol.for('react.context'); + var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); + var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); + var REACT_MEMO_TYPE = Symbol.for('react.memo'); + var REACT_LAZY_TYPE = Symbol.for('react.lazy'); + var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === 'function') { + return maybeIterator; } + return null; } - u(x, "onViewportChange"); - function d(e, n) { - var l = e.state.foldGutter; - if (l) { - var r = n.line; - r >= l.from && r < l.to && o(e, r, r + 1); + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning('error', format, args); + } } } - u(d, "onFold"); - }); -})(); -var P = j.exports; -const C = G.getDefaultExportFromCjs(P), - D = L({ - __proto__: null, - default: C - }, [P]); -exports.foldgutter = D; - -/***/ }), - -/***/ "../../graphiql-react/dist/forEachState.cjs.js": -/*!*****************************************************!*\ - !*** ../../graphiql-react/dist/forEachState.cjs.js ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -var c = Object.defineProperty; -var r = (e, a) => c(e, "name", { - value: a, - configurable: !0 -}); -function l(e, a) { - const i = []; - let t = e; - for (; t != null && t.kind;) i.push(t), t = t.prevState; - for (let o = i.length - 1; o >= 0; o--) a(i[o]); -} -r(l, "forEachState"); -exports.forEachState = l; - -/***/ }), - -/***/ "../../graphiql-react/dist/hint.cjs.js": -/*!*********************************************!*\ - !*** ../../graphiql-react/dist/hint.cjs.js ***! - \*********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging -const s = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"); -__webpack_require__(/*! ./show-hint.cjs.js */ "../../graphiql-react/dist/show-hint.cjs.js"); -const c = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -s.CodeMirror.registerHelper("hint", "graphql", (r, a) => { - const { - schema: i, - externalFragments: u - } = a; - if (!i) return; - const n = r.getCursor(), - t = r.getTokenAt(n), - l = t.type !== null && /"|\w/.test(t.string[0]) ? t.start : t.end, - g = new c.Position(n.line, l), - e = { - list: c.getAutocompleteSuggestions(i, r.getValue(), g, t, u).map(o => ({ - text: o.label, - type: o.type, - description: o.documentation, - isDeprecated: o.isDeprecated, - deprecationReason: o.deprecationReason - })), - from: { - line: n.line, - ch: l - }, - to: { - line: n.line, - ch: t.end + Function.prototype.apply.call(console[level], console, argsWithFormat); } - }; - return e != null && e.list && e.list.length > 0 && (e.from = s.CodeMirror.Pos(e.from.line, e.from.ch), e.to = s.CodeMirror.Pos(e.to.line, e.to.ch), s.CodeMirror.signal(r, "hasCompletion", r, e, t)), e; -}); + } -/***/ }), + // ----------------------------------------------------------------------------- -/***/ "../../graphiql-react/dist/hint.cjs2.js": -/*!**********************************************!*\ - !*** ../../graphiql-react/dist/hint.cjs2.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + var enableScopeAPI = false; // Experimental Create Event Handle API. + var enableCacheElement = false; + var enableTransitionTracing = false; // No known bugs, but needs performance testing + var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber + // stuff. Intended to enable React core members to more easily debug scheduling + // issues in DEV builds. + var enableDebugTracing = false; // Track which Fiber(s) schedule render work. -var g = Object.defineProperty; -var p = (i, n) => g(i, "name", { - value: n, - configurable: !0 -}); -const d = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - a = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"), - b = __webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function f(i, n, t) { - const r = x(t, m(n.string)); - if (!r) return; - const e = n.type !== null && /"|\w/.test(n.string[0]) ? n.start : n.end; - return { - list: r, - from: { - line: i.line, - ch: e - }, - to: { - line: i.line, - ch: n.end - } - }; -} -p(f, "hintList"); -function x(i, n) { - if (!n) return y(i, o => !o.isDeprecated); - const t = i.map(o => ({ - proximity: L(m(o.text), n), - entry: o - })); - return y(y(t, o => o.proximity <= 2), o => !o.entry.isDeprecated).sort((o, l) => (o.entry.isDeprecated ? 1 : 0) - (l.entry.isDeprecated ? 1 : 0) || o.proximity - l.proximity || o.entry.text.length - l.entry.text.length).map(o => o.entry); -} -p(x, "filterAndSortList"); -function y(i, n) { - const t = i.filter(n); - return t.length === 0 ? i : t; -} -p(y, "filterNonEmpty"); -function m(i) { - return i.toLowerCase().replaceAll(/\W/g, ""); -} -p(m, "normalizeText"); -function L(i, n) { - let t = T(n, i); - return i.length > n.length && (t -= i.length - n.length - 1, t += i.indexOf(n) === 0 ? 0 : .5), t; -} -p(L, "getProximity"); -function T(i, n) { - let t, r; - const e = [], - o = i.length, - l = n.length; - for (t = 0; t <= o; t++) e[t] = [t]; - for (r = 1; r <= l; r++) e[0][r] = r; - for (t = 1; t <= o; t++) for (r = 1; r <= l; r++) { - const u = i[t - 1] === n[r - 1] ? 0 : 1; - e[t][r] = Math.min(e[t - 1][r] + 1, e[t][r - 1] + 1, e[t - 1][r - 1] + u), t > 1 && r > 1 && i[t - 1] === n[r - 2] && i[t - 2] === n[r - 1] && (e[t][r] = Math.min(e[t][r], e[t - 2][r - 2] + u)); - } - return e[o][l]; -} -p(T, "lexicalDistance"); -d.CodeMirror.registerHelper("hint", "graphql-variables", (i, n) => { - const t = i.getCursor(), - r = i.getTokenAt(t), - e = V(t, r, n); - return e != null && e.list && e.list.length > 0 && (e.from = d.CodeMirror.Pos(e.from.line, e.from.ch), e.to = d.CodeMirror.Pos(e.to.line, e.to.ch), d.CodeMirror.signal(i, "hasCompletion", i, e, r)), e; -}); -function V(i, n, t) { - const r = n.state.kind === "Invalid" ? n.state.prevState : n.state, + var REACT_MODULE_REFERENCE; { - kind: e, - step: o - } = r; - if (e === "Document" && o === 0) return f(i, n, [{ - text: "{" - }]); - const { - variableToType: l - } = t; - if (!l) return; - const u = j(l, n.state); - if (e === "Document" || e === "Variable" && o === 0) { - const c = Object.keys(l); - return f(i, n, c.map(s => ({ - text: `"${s}": `, - type: l[s] - }))); - } - if ((e === "ObjectValue" || e === "ObjectField" && o === 0) && u.fields) { - const c = Object.keys(u.fields).map(s => u.fields[s]); - return f(i, n, c.map(s => ({ - text: `"${s.name}": `, - type: s.type, - description: s.description - }))); - } - if (e === "StringValue" || e === "NumberValue" || e === "BooleanValue" || e === "NullValue" || e === "ListValue" && o === 1 || e === "ObjectField" && o === 2 || e === "Variable" && o === 2) { - const c = u.type ? a.getNamedType(u.type) : void 0; - if (c instanceof a.GraphQLInputObjectType) return f(i, n, [{ - text: "{" - }]); - if (c instanceof a.GraphQLEnumType) { - const s = c.getValues(); - return f(i, n, s.map(h => ({ - text: `"${h.name}"`, - type: c, - description: h.description - }))); + REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); } - if (c === a.GraphQLBoolean) return f(i, n, [{ - text: "true", - type: a.GraphQLBoolean, - description: "Not false." - }, { - text: "false", - type: a.GraphQLBoolean, - description: "Not true." - }]); - } -} -p(V, "getVariablesHint"); -function j(i, n) { - const t = { - type: null, - fields: null - }; - return b.forEachState(n, r => { - switch (r.kind) { - case "Variable": - { - t.type = i[r.name]; - break; - } - case "ListValue": - { - const e = t.type ? a.getNullableType(t.type) : void 0; - t.type = e instanceof a.GraphQLList ? e.ofType : null; - break; - } - case "ObjectValue": - { - const e = t.type ? a.getNamedType(t.type) : void 0; - t.fields = e instanceof a.GraphQLInputObjectType ? e.getFields() : null; - break; - } - case "ObjectField": - { - const e = r.name && t.fields ? t.fields[r.name] : null; - t.type = e == null ? void 0 : e.type; - break; + function isValidElementType(type) { + if (typeof type === 'string' || typeof type === 'function') { + return true; + } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). + + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === 'object' && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || + // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { + return true; } + } + return false; } - }), t; -} -p(j, "getTypeInfo"); + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ''; + return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; + } // Keep in sync with react-reconciler/getComponentNameFromFiber -/***/ }), + function getContextName(type) { + return type.displayName || 'Context'; + } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. -/***/ "../../graphiql-react/dist/index.js": -/*!******************************************!*\ - !*** ../../graphiql-react/dist/index.js ***! - \******************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + function getComponentNameFromType(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + { + if (typeof type.tag === 'number') { + error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + if (typeof type === 'string') { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + case REACT_PORTAL_TYPE: + return 'Portal'; + case REACT_PROFILER_TYPE: + return 'Profiler'; + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + '.Consumer'; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + '.Provider'; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || 'Memo'; + case REACT_LAZY_TYPE: + { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + + // eslint-disable-next-line no-fallthrough + } + } + return null; + } + var assign = Object.assign; + // Helpers to patch console.logs to avoid logging during side-effect free + // replaying on render function. This currently only patches the object + // lazily which won't cover if the log function was extracted eagerly. + // We could also eagerly patch the method. + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() {} + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + /* eslint-disable react-internal/no-production-logging */ + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; // $FlowFixMe Flow thinks console is immutable. -var Nn = Object.defineProperty; -var a = (e, t) => Nn(e, "name", { - value: t, - configurable: !0 -}); -Object.defineProperty(exports, Symbol.toStringTag, { - value: "Module" -}); -const s = __webpack_require__(/*! react/jsx-runtime */ "../../../node_modules/react/jsx-runtime.js"), - l = __webpack_require__(/*! react */ "react"), - _ = __webpack_require__(/*! clsx */ "../../../node_modules/clsx/dist/clsx.m.js"), - M = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"), - B = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/esm/index.js"), - jt = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"), - $e = __webpack_require__(/*! set-value */ "../../../node_modules/set-value/index.js"), - Tn = __webpack_require__(/*! copy-to-clipboard */ "../../../node_modules/copy-to-clipboard/index.js"), - Mn = __webpack_require__(/*! @radix-ui/react-dialog */ "../../../node_modules/@radix-ui/react-dialog/dist/index.js"), - Pn = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js"), - xe = __webpack_require__(/*! @radix-ui/react-dropdown-menu */ "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js"), - qn = __webpack_require__(/*! markdown-it */ "../node_modules/markdown-it/dist/index.cjs.js"), - kt = __webpack_require__(/*! framer-motion */ "../../../node_modules/framer-motion/dist/cjs/index.js"), - Rn = __webpack_require__(/*! @radix-ui/react-tooltip */ "../../../node_modules/@radix-ui/react-tooltip/dist/index.js"), - ae = __webpack_require__(/*! @headlessui/react */ "../../../node_modules/@headlessui/react/dist/index.cjs"), - vt = __webpack_require__(/*! react-dom */ "react-dom"); -function nt(e) { - const t = Object.create(null, { - [Symbol.toStringTag]: { - value: "Module" - } - }); - if (e) { - for (const n in e) if (n !== "default") { - const r = Object.getOwnPropertyDescriptor(e, n); - Object.defineProperty(t, n, r.get ? r : { - enumerable: !0, - get: () => e[n] - }); + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + /* eslint-enable react-internal/no-production-logging */ + } + disabledDepth++; + } } - } - return t.default = e, Object.freeze(t); -} -a(nt, "_interopNamespaceDefault"); -const u = nt(l), - ne = nt(Mn), - pe = nt(Rn); -function oe(e) { - const t = l.createContext(null); - return t.displayName = e, t; -} -a(oe, "createNullableContext"); -function le(e) { - function t(n) { - var o; - const r = l.useContext(e); - if (r === null && n != null && n.nonNull) throw new Error(`Tried to use \`${((o = n.caller) == null ? void 0 : o.name) || t.caller.name}\` without the necessary context. Make sure to render the \`${e.displayName}Provider\` component higher up the tree.`); - return r; - } - return a(t, "useGivenContext"), Object.defineProperty(t, "name", { - value: `use${e.displayName}` - }), t; -} -a(le, "createContextHook"); -const rt = oe("StorageContext"); -function Nt(e) { - const t = l.useRef(!0), - [n, r] = l.useState(new B.StorageAPI(e.storage)); - return l.useEffect(() => { - t.current ? t.current = !1 : r(new B.StorageAPI(e.storage)); - }, [e.storage]), s.jsx(rt.Provider, { - value: n, - children: e.children - }); -} -a(Nt, "StorageContextProvider"); -const re = le(rt), - Vn = a(_ref => { - let { - title: e, - titleId: t, - ...n - } = _ref; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("rect", { - x: 6, - y: 6, - width: 2, - height: 2, - rx: 1, - fill: "currentColor" - })); - }, "SvgArgument"), - In = a(_ref2 => { - let { - title: e, - titleId: t, - ...n - } = _ref2; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 9", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M1 1L7 7L13 1", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgChevronDown"), - Hn = a(_ref3 => { - let { - title: e, - titleId: t, - ...n - } = _ref3; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 7 10", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M6 1.04819L2 5.04819L6 9.04819", - stroke: "currentColor", - strokeWidth: 1.75 - })); - }, "SvgChevronLeft"), - Dn = a(_ref4 => { - let { - title: e, - titleId: t, - ...n - } = _ref4; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 9", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M13 8L7 2L1 8", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgChevronUp"), - An = a(_ref5 => { - let { - title: e, - titleId: t, - ...n - } = _ref5; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M1 1L12.9998 12.9997", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - d: "M13 1L1.00079 13.0003", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgClose"), - On = a(_ref6 => { - let { - title: e, - titleId: t, - ...n - } = _ref6; - return u.createElement("svg", { - height: "1em", - viewBox: "-2 -2 22 22", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("rect", { - x: 6.75, - y: .75, - width: 10.5, - height: 10.5, - rx: 2.2069, - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgCopy"), - Fn = a(_ref7 => { - let { - title: e, - titleId: t, - ...n - } = _ref7; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M5 9L9 5", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M5 5L9 9", - stroke: "currentColor", - strokeWidth: 1.2 - })); - }, "SvgDeprecatedArgument"), - Bn = a(_ref8 => { - let { - title: e, - titleId: t, - ...n - } = _ref8; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 12 12", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M4 8L8 4", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M4 4L8 8", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", - fill: "currentColor" - })); - }, "SvgDeprecatedEnumValue"), - Wn = a(_ref9 => { - let { - title: e, - titleId: t, - ...n - } = _ref9; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 12 12", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: .6, - y: .6, - width: 10.8, - height: 10.8, - rx: 3.4, - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M4 8L8 4", - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M4 4L8 8", - stroke: "currentColor", - strokeWidth: 1.2 - })); - }, "SvgDeprecatedField"), - _n = a(_ref10 => { - let { - title: e, - titleId: t, - ...n - } = _ref10; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0.5 12 12", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: 7, - y: 5.5, - width: 2, - height: 2, - rx: 1, - transform: "rotate(90 7 5.5)", - fill: "currentColor" - }), u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z", - fill: "currentColor" - })); - }, "SvgDirective"), - Zn = a(_ref11 => { - let { - title: e, - titleId: t, - ...n - } = _ref11; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 20 24", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z", - fill: "currentColor" - })); - }, "SvgDocsFilled"), - Gn = a(_ref12 => { - let { - title: e, - titleId: t, - ...n - } = _ref12; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 20 24", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("line", { - x1: 13, - y1: 11.75, - x2: 6, - y2: 11.75, - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgDocs"), - $n = a(_ref13 => { - let { - title: e, - titleId: t, - ...n - } = _ref13; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 12 12", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: 5, - y: 5, - width: 2, - height: 2, - rx: 1, - fill: "currentColor" - }), u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", - fill: "currentColor" - })); - }, "SvgEnumValue"), - Qn = a(_ref14 => { - let { - title: e, - titleId: t, - ...n - } = _ref14; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 12 13", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: .6, - y: 1.1, - width: 10.8, - height: 10.8, - rx: 2.4, - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("rect", { - x: 5, - y: 5.5, - width: 2, - height: 2, - rx: 1, - fill: "currentColor" - })); - }, "SvgField"), - zn = a(_ref15 => { - let { - title: e, - titleId: t, - ...n - } = _ref15; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 24 20", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249", - stroke: "currentColor", - strokeWidth: 1.5, - strokeLinecap: "square" - }), u.createElement("path", { - d: "M13.75 5.25V10.75H18.75", - stroke: "currentColor", - strokeWidth: 1.5, - strokeLinecap: "square" - }), u.createElement("path", { - d: "M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgHistory"), - Un = a(_ref16 => { - let { - title: e, - titleId: t, - ...n - } = _ref16; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 12 12", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("circle", { - cx: 6, - cy: 6, - r: 5.4, - stroke: "currentColor", - strokeWidth: 1.2, - strokeDasharray: "4.241025 4.241025", - transform: "rotate(22.5)", - "transform-origin": "center" - }), u.createElement("circle", { - cx: 6, - cy: 6, - r: 1, - fill: "currentColor" - })); - }, "SvgImplements"), - Kn = a(_ref17 => { - let { - title: e, - titleId: t, - ...n - } = _ref17; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 19 18", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z", - stroke: "currentColor", - strokeWidth: 1.125, - strokeLinecap: "round", - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z", - stroke: "currentColor", - strokeWidth: 1.125, - strokeLinecap: "round", - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z", - stroke: "currentColor", - strokeWidth: 1.125, - strokeLinecap: "round", - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z", - stroke: "currentColor", - strokeWidth: 1.125, - strokeLinecap: "round", - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z", - stroke: "currentColor", - strokeWidth: 1.125, - strokeLinecap: "round", - strokeLinejoin: "round" - })); - }, "SvgKeyboardShortcut"), - Jn = a(_ref18 => { - let { - title: e, - titleId: t, - ...n - } = _ref18; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 13 13", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("circle", { - cx: 5, - cy: 5, - r: 4.35, - stroke: "currentColor", - strokeWidth: 1.3 - }), u.createElement("line", { - x1: 8.45962, - y1: 8.54038, - x2: 11.7525, - y2: 11.8333, - stroke: "currentColor", - strokeWidth: 1.3 - })); - }, "SvgMagnifyingGlass"), - Yn = a(_ref19 => { - let { - title: e, - titleId: t, - ...n - } = _ref19; - return u.createElement("svg", { - height: "1em", - viewBox: "-2 -2 22 22", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - d: "M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - d: "M6 4.5L9 7.5L12 4.5", - stroke: "currentColor", - strokeWidth: 1.5 - }), u.createElement("path", { - d: "M12 13.5L9 10.5L6 13.5", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgMerge"), - Xn = a(_ref20 => { - let { - title: e, - titleId: t, - ...n - } = _ref20; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z", - fill: "currentColor" - }), u.createElement("path", { - d: "M11.5 4.5L9.5 2.5", - stroke: "currentColor", - strokeWidth: 1.4026, - strokeLinecap: "round", - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M5.5 10.5L3.5 8.5", - stroke: "currentColor", - strokeWidth: 1.4026, - strokeLinecap: "round", - strokeLinejoin: "round" - })); - }, "SvgPen"), - er = a(_ref21 => { - let { - title: e, - titleId: t, - ...n - } = _ref21; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 16 18", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z", - fill: "currentColor" - })); - }, "SvgPlay"), - tr = a(_ref22 => { - let { - title: e, - titleId: t, - ...n - } = _ref22; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 10 16", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z", - fill: "currentColor" - })); - }, "SvgPlus"), - nr = a(_ref23 => { - let { - title: e, - titleId: t, - ...n - } = _ref23; - return u.createElement("svg", { - width: 25, - height: 25, - viewBox: "0 0 25 25", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M10.2852 24.0745L13.7139 18.0742", - stroke: "currentColor", - strokeWidth: 1.5625 - }), u.createElement("path", { - d: "M14.5742 24.0749L17.1457 19.7891", - stroke: "currentColor", - strokeWidth: 1.5625 - }), u.createElement("path", { - d: "M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735", - stroke: "currentColor", - strokeWidth: 1.5625 - }), u.createElement("path", { - d: "M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z", - stroke: "currentColor", - strokeWidth: 1.5625, - strokeLinejoin: "round" - }), u.createElement("path", { - d: "M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z", - stroke: "currentColor", - strokeWidth: 1.5625, - strokeLinejoin: "round" - })); - }, "SvgPrettify"), - rr = a(_ref24 => { - let { - title: e, - titleId: t, - ...n - } = _ref24; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 16 16", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M4.75 9.25H1.25V12.75", - stroke: "currentColor", - strokeWidth: 1, - strokeLinecap: "square" - }), u.createElement("path", { - d: "M11.25 6.75H14.75V3.25", - stroke: "currentColor", - strokeWidth: 1, - strokeLinecap: "square" - }), u.createElement("path", { - d: "M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513", - stroke: "currentColor", - strokeWidth: 1 - }), u.createElement("path", { - d: "M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487", - stroke: "currentColor", - strokeWidth: 1 - })); - }, "SvgReload"), - sr = a(_ref25 => { - let { - title: e, - titleId: t, - ...n - } = _ref25; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 13 13", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: .6, - y: .6, - width: 11.8, - height: 11.8, - rx: 5.9, - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("path", { - d: "M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5", - stroke: "currentColor", - strokeWidth: 1.2 - })); - }, "SvgRootType"), - or = a(_ref26 => { - let { - title: e, - titleId: t, - ...n - } = _ref26; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 21 20", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z", - fill: "currentColor" - })); - }, "SvgSettings"), - lr = a(_ref27 => { - let { - title: e, - titleId: t, - ...n - } = _ref27; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", - fill: "currentColor", - stroke: "currentColor" - })); - }, "SvgStarFilled"), - ir = a(_ref28 => { - let { - title: e, - titleId: t, - ...n - } = _ref28; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", - stroke: "currentColor", - strokeWidth: 1.5 - })); - }, "SvgStar"), - ar = a(_ref29 => { - let { - title: e, - titleId: t, - ...n - } = _ref29; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 16 16", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - width: 16, - height: 16, - rx: 2, - fill: "currentColor" - })); - }, "SvgStop"), - cr = a(_ref30 => { - let { - title: e, - titleId: t, - ...n - } = _ref30; - return u.createElement("svg", { - width: "1em", - height: "5em", - xmlns: "http://www.w3.org/2000/svg", - fillRule: "evenodd", - "aria-hidden": "true", - viewBox: "0 0 23 23", - style: { - height: "1.5em" - }, - clipRule: "evenodd", - "aria-labelledby": t, - ...n - }, e === void 0 ? u.createElement("title", { - id: t - }, "trash icon") : e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("path", { - d: "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z", - fill: "currentColor", - strokeWidth: .25, - stroke: "currentColor" - })); - }, "SvgTrash"), - ur = a(_ref31 => { - let { - title: e, - titleId: t, - ...n - } = _ref31; - return u.createElement("svg", { - height: "1em", - viewBox: "0 0 13 13", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": t, - ...n - }, e ? u.createElement("title", { - id: t - }, e) : null, u.createElement("rect", { - x: .6, - y: .6, - width: 11.8, - height: 11.8, - rx: 5.9, - stroke: "currentColor", - strokeWidth: 1.2 - }), u.createElement("rect", { - x: 5.5, - y: 5.5, - width: 2, - height: 2, - rx: 1, - fill: "currentColor" - })); - }, "SvgType"), - Tt = V(Vn), - dr = V(In), - Mt = V(Hn), - hr = V(Dn), - Oe = V(An), - mr = V(On), - Pt = V(Fn), - qt = V(Bn), - Rt = V(Wn), - Vt = V(_n), - It = V(Zn, "filled docs icon"), - Ht = V(Gn), - Dt = V($n), - At = V(Qn), - Ot = V(zn), - Ft = V(Un), - fr = V(Kn), - Bt = V(Jn), - pr = V(Yn), - Wt = V(Xn), - _t = V(er), - gr = V(tr), - xr = V(nr), - Cr = V(rr), - Zt = V(sr), - vr = V(or), - Gt = V(lr, "filled star icon"), - $t = V(ir), - Qt = V(ar), - zt = V(cr, "trash icon"), - ge = V(ur); -function V(e) { - let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : e.name.replace("Svg", "").replaceAll(/([A-Z])/g, " $1").trimStart().toLowerCase() + " icon"; - return e.defaultProps = { - title: t - }, e; -} -a(V, "generateIcon"); -const $ = l.forwardRef((e, t) => s.jsx("button", { - ...e, - ref: t, - className: _.clsx("graphiql-un-styled", e.className) -})); -$.displayName = "UnStyledButton"; -const me = l.forwardRef((e, t) => s.jsx("button", { - ...e, - ref: t, - className: _.clsx("graphiql-button", { - success: "graphiql-button-success", - error: "graphiql-button-error" - }[e.state], e.className) -})); -me.displayName = "Button"; -const Ut = l.forwardRef((e, t) => s.jsx("div", { - ...e, - ref: t, - className: _.clsx("graphiql-button-group", e.className) -})); -Ut.displayName = "ButtonGroup"; -const ye = a((e, t) => Object.entries(t).reduce((n, _ref32) => { - let [r, o] = _ref32; - return n[r] = o, n; -}, e), "createComponentGroup"); -const Kt = l.forwardRef((e, t) => s.jsx(ne.Close, { - asChild: !0, - children: s.jsxs($, { - ...e, - ref: t, - type: "button", - className: _.clsx("graphiql-dialog-close", e.className), - children: [s.jsx(Pn.Root, { - children: "Close dialog" - }), s.jsx(Oe, {})] - }) -})); -Kt.displayName = "Dialog.Close"; -function Jt(_ref33) { - let { - children: e, - ...t - } = _ref33; - return s.jsx(ne.Root, { - ...t, - children: s.jsxs(ne.Portal, { - children: [s.jsx(ne.Overlay, { - className: "graphiql-dialog-overlay" - }), s.jsx(ne.Content, { - className: "graphiql-dialog", - children: e - })] - }) - }); -} -a(Jt, "DialogRoot"); -const yr = ye(Jt, { - Close: Kt, - Title: ne.Title, - Trigger: ne.Trigger, - Description: ne.Description -}); -const Yt = l.forwardRef((e, t) => s.jsx(xe.Trigger, { - asChild: !0, - children: s.jsx("button", { - ...e, - ref: t, - className: _.clsx("graphiql-un-styled", e.className) - }) -})); -Yt.displayName = "DropdownMenuButton"; -function br(_ref34) { - let { - children: e, - align: t = "start", - sideOffset: n = 5, - className: r, - ...o - } = _ref34; - return s.jsx(xe.Portal, { - children: s.jsx(xe.Content, { - align: t, - sideOffset: n, - className: _.clsx("graphiql-dropdown-content", r), - ...o, - children: e - }) - }); -} -a(br, "Content"); -const wr = a(_ref35 => { - let { - className: e, - children: t, - ...n - } = _ref35; - return s.jsx(xe.Item, { - className: _.clsx("graphiql-dropdown-item", e), - ...n, - children: t - }); - }, "Item"), - X = ye(xe.Root, { - Button: Yt, - Item: wr, - Content: br - }), - Me = new qn({ - breaks: !0, - linkify: !0 - }); -const z = l.forwardRef((_ref36, o) => { - let { - children: e, - onlyShowFirstChild: t, - type: n, - ...r - } = _ref36; - return s.jsx("div", { - ...r, - ref: o, - className: _.clsx(`graphiql-markdown-${n}`, t && "graphiql-markdown-preview", r.className), - dangerouslySetInnerHTML: { - __html: Me.render(e) + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + /* eslint-disable react-internal/no-production-logging */ + var props = { + configurable: true, + enumerable: true, + writable: true + }; // $FlowFixMe Flow thinks console is immutable. + + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + /* eslint-enable react-internal/no-production-logging */ + } + if (disabledDepth < 0) { + error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); + } + } } - }); -}); -z.displayName = "MarkdownContent"; -const st = l.forwardRef((e, t) => s.jsx("div", { - ...e, - ref: t, - className: _.clsx("graphiql-spinner", e.className) -})); -st.displayName = "Spinner"; -function Xt(_ref37) { - let { - children: e, - align: t = "start", - side: n = "bottom", - sideOffset: r = 5, - label: o - } = _ref37; - return s.jsxs(pe.Root, { - children: [s.jsx(pe.Trigger, { - asChild: !0, - children: e - }), s.jsx(pe.Portal, { - children: s.jsx(pe.Content, { - className: "graphiql-tooltip", - align: t, - side: n, - sideOffset: r, - children: o - }) - })] - }); -} -a(Xt, "TooltipRoot"); -const K = ye(Xt, { - Provider: pe.Provider -}); -const en = l.forwardRef((_ref38, c) => { - let { - isActive: e, - value: t, - children: n, - className: r, - ...o - } = _ref38; - return s.jsx(kt.Reorder.Item, { - ...o, - ref: c, - value: t, - "aria-selected": e ? "true" : void 0, - role: "tab", - className: _.clsx("graphiql-tab", e && "graphiql-tab-active", r), - children: n - }); -}); -en.displayName = "Tab"; -const tn = l.forwardRef((e, t) => s.jsx($, { - ...e, - ref: t, - type: "button", - className: _.clsx("graphiql-tab-button", e.className), - children: e.children -})); -tn.displayName = "Tab.Button"; -const nn = l.forwardRef((e, t) => s.jsx(K, { - label: "Close Tab", - children: s.jsx($, { - "aria-label": "Close Tab", - ...e, - ref: t, - type: "button", - className: _.clsx("graphiql-tab-close", e.className), - children: s.jsx(Oe, {}) - }) -})); -nn.displayName = "Tab.Close"; -const Er = ye(en, { - Button: tn, - Close: nn - }), - rn = l.forwardRef((_ref39, c) => { - let { - values: e, - onReorder: t, - children: n, - className: r, - ...o - } = _ref39; - return s.jsx(kt.Reorder.Group, { - ...o, - ref: c, - values: e, - onReorder: t, - axis: "x", - role: "tablist", - className: _.clsx("graphiql-tabs", r), - children: n - }); - }); -rn.displayName = "Tabs"; -const ot = oe("HistoryContext"); -function sn(e) { - var y; - const t = re(), - n = l.useRef(new B.HistoryStore(t || new B.StorageAPI(null), e.maxHistoryLength || Sr)), - [r, o] = l.useState(((y = n.current) == null ? void 0 : y.queries) || []), - c = l.useCallback(h => { - var x; - (x = n.current) == null || x.updateHistory(h), o(n.current.queries); - }, []), - i = l.useCallback((h, x) => { - n.current.editLabel(h, x), o(n.current.queries); - }, []), - d = l.useCallback(h => { - n.current.toggleFavorite(h), o(n.current.queries); - }, []), - g = l.useCallback(h => h, []), - m = l.useCallback(function (h) { - let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1; - n.current.deleteHistory(h, x), o(n.current.queries); - }, []), - p = l.useMemo(() => ({ - addToHistory: c, - editLabel: i, - items: r, - toggleFavorite: d, - setActive: g, - deleteFromHistory: m - }), [c, i, r, d, g, m]); - return s.jsx(ot.Provider, { - value: p, - children: e.children - }); -} -a(sn, "HistoryContextProvider"); -const be = le(ot), - Sr = 20; -function on() { - const { - items: e, - deleteFromHistory: t - } = be({ - nonNull: !0 - }); - let n = e.slice().map((d, g) => ({ - ...d, - index: g - })).reverse(); - const r = n.filter(d => d.favorite); - r.length && (n = n.filter(d => !d.favorite)); - const [o, c] = l.useState(null); - l.useEffect(() => { - o && setTimeout(() => { - c(null); - }, 2e3); - }, [o]); - const i = l.useCallback(() => { - try { - for (const d of n) t(d, !0); - c("success"); - } catch { - c("error"); + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === undefined) { + // Extract the VM specific prefix used by each line. + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ''; + } + } // We use the prefix to ensure our stacks line up with native stack frames. + + return '\n' + prefix + name; + } } - }, [t, n]); - return s.jsxs("section", { - "aria-label": "History", - className: "graphiql-history", - children: [s.jsxs("div", { - className: "graphiql-history-header", - children: ["History", (o || n.length > 0) && s.jsx(me, { - type: "button", - state: o || void 0, - disabled: !n.length, - onClick: i, - children: { - success: "Cleared", - error: "Failed to Clear" - }[o] || "Clear" - })] - }), !!r.length && s.jsx("ul", { - className: "graphiql-history-items", - children: r.map(d => s.jsx(Pe, { - item: d - }, d.index)) - }), !!r.length && !!n.length && s.jsx("div", { - className: "graphiql-history-item-spacer" - }), !!n.length && s.jsx("ul", { - className: "graphiql-history-items", - children: n.map(d => s.jsx(Pe, { - item: d - }, d.index)) - })] - }); -} -a(on, "History"); -function Pe(e) { - const { - editLabel: t, - toggleFavorite: n, - deleteFromHistory: r, - setActive: o - } = be({ - nonNull: !0, - caller: Pe - }), + var reentry = false; + var componentFrameCache; { - headerEditor: c, - queryEditor: i, - variableEditor: d - } = Z({ - nonNull: !0, - caller: Pe - }), - g = l.useRef(null), - m = l.useRef(null), - [p, y] = l.useState(!1); - l.useEffect(() => { - var b; - p && ((b = g.current) == null || b.focus()); - }, [p]); - const h = e.item.label || e.item.operationName || Lr(e.item.query), - x = l.useCallback(() => { - var T; - y(!1); - const { - index: b, - ...w - } = e.item; - t({ - ...w, - label: (T = g.current) == null ? void 0 : T.value - }, b); - }, [t, e.item]), - f = l.useCallback(() => { - y(!1); - }, []), - C = l.useCallback(b => { - b.stopPropagation(), y(!0); - }, []), - E = l.useCallback(() => { - const { - query: b, - variables: w, - headers: T - } = e.item; - i == null || i.setValue(b !== null && b !== void 0 ? b : ""), d == null || d.setValue(w !== null && w !== void 0 ? w : ""), c == null || c.setValue(T !== null && T !== void 0 ? T : ""), o(e.item); - }, [c, e.item, i, o, d]), - k = l.useCallback(b => { - b.stopPropagation(), r(e.item); - }, [e.item, r]), - L = l.useCallback(b => { - b.stopPropagation(), n(e.item); - }, [e.item, n]); - return s.jsx("li", { - className: _.clsx("graphiql-history-item", p && "editable"), - children: p ? s.jsxs(s.Fragment, { - children: [s.jsx("input", { - type: "text", - defaultValue: e.item.label, - ref: g, - onKeyDown: b => { - b.key === "Esc" ? y(!1) : b.key === "Enter" && (y(!1), t({ - ...e.item, - label: b.currentTarget.value - })); - }, - placeholder: "Type a label" - }), s.jsx($, { - type: "button", - ref: m, - onClick: x, - children: "Save" - }), s.jsx($, { - type: "button", - ref: m, - onClick: f, - children: s.jsx(Oe, {}) - })] - }) : s.jsxs(s.Fragment, { - children: [s.jsx(K, { - label: "Set active", - children: s.jsx($, { - type: "button", - className: "graphiql-history-item-label", - onClick: E, - "aria-label": "Set active", - children: h - }) - }), s.jsx(K, { - label: "Edit label", - children: s.jsx($, { - type: "button", - className: "graphiql-history-item-action", - onClick: C, - "aria-label": "Edit label", - children: s.jsx(Wt, { - "aria-hidden": "true" - }) - }) - }), s.jsx(K, { - label: e.item.favorite ? "Remove favorite" : "Add favorite", - children: s.jsx($, { - type: "button", - className: "graphiql-history-item-action", - onClick: L, - "aria-label": e.item.favorite ? "Remove favorite" : "Add favorite", - children: e.item.favorite ? s.jsx(Gt, { - "aria-hidden": "true" - }) : s.jsx($t, { - "aria-hidden": "true" - }) - }) - }), s.jsx(K, { - label: "Delete from history", - children: s.jsx($, { - type: "button", - className: "graphiql-history-item-action", - onClick: k, - "aria-label": "Delete from history", - children: s.jsx(zt, { - "aria-hidden": "true" - }) - }) - })] - }) - }); -} -a(Pe, "HistoryItem"); -function Lr(e) { - return e == null ? void 0 : e.split(` -`).map(t => t.replace(/#(.*)/, "")).join(" ").replaceAll("{", " { ").replaceAll("}", " } ").replaceAll(/[\s]{2,}/g, " "); -} -a(Lr, "formatQuery"); -const lt = oe("ExecutionContext"); -function qe(_ref40) { - let { - fetcher: e, - getDefaultFieldNames: t, - children: n, - operationName: r - } = _ref40; - if (!e) throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop."); - const { - externalFragments: o, - headerEditor: c, - queryEditor: i, - responseEditor: d, - variableEditor: g, - updateActiveTabValues: m - } = Z({ - nonNull: !0, - caller: qe - }), - p = be(), - y = Ie({ - getDefaultFieldNames: t, - caller: qe - }), - [h, x] = l.useState(!1), - [f, C] = l.useState(null), - E = l.useRef(0), - k = l.useCallback(() => { - f == null || f.unsubscribe(), x(!1), C(null); - }, [f]), - L = l.useCallback(async () => { - var _ref41; - if (!i || !d) return; - if (f) { - k(); - return; + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + // If something asked for a stack inside a fake render, it should get ignored. + if (!fn || reentry) { + return ''; } - const T = a(N => { - d.setValue(N), m({ - response: N - }); - }, "setResponse"); - E.current += 1; - const A = E.current; - let F = y() || i.getValue(); - const I = g == null ? void 0 : g.getValue(); - let H; - try { - H = yt({ - json: I, - errorMessageParse: "Variables are invalid JSON", - errorMessageType: "Variables are not a JSON object." - }); - } catch (N) { - T(N instanceof Error ? N.message : `${N}`); - return; + { + var frame = componentFrameCache.get(fn); + if (frame !== undefined) { + return frame; + } } - const O = c == null ? void 0 : c.getValue(); - let D; - try { - D = yt({ - json: O, - errorMessageParse: "Headers are invalid JSON", - errorMessageType: "Headers are not a JSON object." - }); - } catch (N) { - T(N instanceof Error ? N.message : `${N}`); - return; + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. + + Error.prepareStackTrace = undefined; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + // for warnings. + + ReactCurrentDispatcher.current = null; + disableLogs(); } - if (o) { - const N = i.documentAST ? jt.getFragmentDependenciesForAST(i.documentAST, o) : []; - N.length > 0 && (F += ` -` + N.map(P => M.print(P)).join(` -`)); - } - T(""), x(!0); - const q = (_ref41 = r !== null && r !== void 0 ? r : i.operationName) !== null && _ref41 !== void 0 ? _ref41 : void 0; - p == null || p.addToHistory({ - query: F, - variables: I, - headers: O, - operationName: q - }); try { - var _D, _i$documentAST; - const N = {}, - P = a(v => { - if (A !== E.current) return; - let j = Array.isArray(v) ? v : !1; - if (!j && typeof v == "object" && v !== null && "hasNext" in v && (j = [v]), j) { - for (const R of j) ln(N, R); - x(!1), T(B.formatResult(N)); - } else { - const R = B.formatResult(v); - x(!1), T(R); + // This should throw. + if (construct) { + // Something should be setting the props in the constructor. + var Fake = function () { + throw Error(); + }; // $FlowFixMe + + Object.defineProperty(Fake.prototype, 'props', { + set: function () { + // We use a throwing setter instead of frozen or non-writable props + // because that won't throw in a non-strict mode function. + throw Error(); } - }, "handleResponse"), - S = e({ - query: F, - variables: H, - operationName: q - }, { - headers: (_D = D) !== null && _D !== void 0 ? _D : void 0, - documentAST: (_i$documentAST = i.documentAST) !== null && _i$documentAST !== void 0 ? _i$documentAST : void 0 - }), - W = await Promise.resolve(S); - if (B.isObservable(W)) C(W.subscribe({ - next(v) { - P(v); - }, - error(v) { - x(!1), v && T(B.formatError(v)), C(null); - }, - complete() { - x(!1), C(null); + }); + if (typeof Reflect === 'object' && Reflect.construct) { + // We construct a different control for this case to include any extra + // frames added by the construct call. + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + // This is inlined manually because closure doesn't do it for us. + if (sample && control && typeof sample.stack === 'string') { + // This extracts the first frame from the sample that isn't also in the control. + // Skipping one frame that we assume is the frame that calls the two. + var sampleLines = sample.stack.split('\n'); + var controlLines = control.stack.split('\n'); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + // We expect at least one stack frame to be shared. + // Typically this will be the root most one. However, stack frames may be + // cut off due to maximum stack limits. In this case, one maybe cut off + // earlier than the other. We assume that the sample is longer or the same + // and there for cut off earlier. So we should find the root most frame in + // the sample somewhere in the control. + c--; } - }));else if (B.isAsyncIterable(W)) { - C({ - unsubscribe: () => { - var v, j; - return (j = (v = W[Symbol.asyncIterator]()).return) == null ? void 0 : j.call(v); + for (; s >= 1 && c >= 0; s--, c--) { + // Next we find the first one that isn't the same which should be the + // frame that called our sample function and the control. + if (sampleLines[s] !== controlLines[c]) { + // In V8, the first line is describing the message but other VMs don't. + // If we're about to return the first line, and the control is also on the same + // line, that's a pretty good indicator that our sample threw at same line as + // the control. I.e. before we entered the sample frame. So we ignore this result. + // This can happen if you passed a class to function component, or non-function. + if (s !== 1 || c !== 1) { + do { + s--; + c--; // We may still have similar intermediate frames from the construct call. + // The next one that isn't the same should be our match though. + + if (c < 0 || sampleLines[s] !== controlLines[c]) { + // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. + var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "" + // but we have a user-provided "displayName" + // splice it in to make the stack more readable. + + if (fn.displayName && _frame.includes('')) { + _frame = _frame.replace('', fn.displayName); + } + { + if (typeof fn === 'function') { + componentFrameCache.set(fn, _frame); + } + } // Return the line we found. + + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; } - }); - for await (const v of W) P(v); - x(!1), C(null); - } else P(W); - } catch (N) { - x(!1), T(B.formatError(N)), C(null); - } - }, [y, o, e, c, p, r, i, d, k, f, m, g]), - b = !!f, - w = l.useMemo(() => ({ - isFetching: h, - isSubscribed: b, - operationName: r !== null && r !== void 0 ? r : null, - run: L, - stop: k - }), [h, b, r, L, k]); - return s.jsx(lt.Provider, { - value: w, - children: n - }); -} -a(qe, "ExecutionContextProvider"); -const we = le(lt); -function yt(_ref42) { - let { - json: e, - errorMessageParse: t, - errorMessageType: n - } = _ref42; - let r; - try { - r = e && e.trim() !== "" ? JSON.parse(e) : void 0; - } catch (c) { - throw new Error(`${t}: ${c instanceof Error ? c.message : c}.`); - } - const o = typeof r == "object" && r !== null && !Array.isArray(r); - if (r !== void 0 && !o) throw new Error(n); - return r; -} -a(yt, "tryParseJsonObject"); -function ln(e, t) { - var _t$path; - const n = ["data", ...((_t$path = t.path) !== null && _t$path !== void 0 ? _t$path : [])]; - if (t.items) for (const r of t.items) $e(e, n.join("."), r), n[n.length - 1]++; - if (t.data && $e(e, n.join("."), t.data, { - merge: !0 - }), t.errors && (e.errors || (e.errors = []), e.errors.push(...t.errors)), t.extensions && $e(e, "extensions", t.extensions, { - merge: !0 - }), t.incremental) for (const r of t.incremental) ln(e, r); -} -a(ln, "mergeIncrementalResult"); -const Fe = "graphiql", - Be = "sublime"; -let an = !1; -typeof window == "object" && (an = window.navigator.platform.toLowerCase().indexOf("mac") === 0); -const We = { - [an ? "Cmd-F" : "Ctrl-F"]: "findPersistent", - "Cmd-G": "findPersistent", - "Ctrl-G": "findPersistent", - "Ctrl-Left": "goSubwordLeft", - "Ctrl-Right": "goSubwordRight", - "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight" -}; -async function Ee(e, t) { - const n = await Promise.resolve().then(() => __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js")).then(r => r.codemirror).then(r => typeof r == "function" ? r : r.default); - return await Promise.all((t == null ? void 0 : t.useCommonAddons) === !1 ? e : [Promise.resolve().then(() => __webpack_require__(/*! ./show-hint.cjs.js */ "../../graphiql-react/dist/show-hint.cjs.js")).then(r => r.showHint), Promise.resolve().then(() => __webpack_require__(/*! ./matchbrackets.cjs.js */ "../../graphiql-react/dist/matchbrackets.cjs.js")).then(r => r.matchbrackets), Promise.resolve().then(() => __webpack_require__(/*! ./closebrackets.cjs.js */ "../../graphiql-react/dist/closebrackets.cjs.js")).then(r => r.closebrackets), Promise.resolve().then(() => __webpack_require__(/*! ./brace-fold.cjs.js */ "../../graphiql-react/dist/brace-fold.cjs.js")).then(r => r.braceFold), Promise.resolve().then(() => __webpack_require__(/*! ./foldgutter.cjs.js */ "../../graphiql-react/dist/foldgutter.cjs.js")).then(r => r.foldgutter), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs.js */ "../../graphiql-react/dist/lint.cjs.js")).then(r => r.lint), Promise.resolve().then(() => __webpack_require__(/*! ./searchcursor.cjs.js */ "../../graphiql-react/dist/searchcursor.cjs.js")).then(r => r.searchcursor), Promise.resolve().then(() => __webpack_require__(/*! ./jump-to-line.cjs.js */ "../../graphiql-react/dist/jump-to-line.cjs.js")).then(r => r.jumpToLine), Promise.resolve().then(() => __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js")).then(r => r.dialog), Promise.resolve().then(() => __webpack_require__(/*! ./sublime.cjs.js */ "../../graphiql-react/dist/sublime.cjs.js")).then(r => r.sublime), ...e]), n; -} -a(Ee, "importCodeMirror"); -const jr = a(e => e ? M.print(e) : "", "printDefault"); -function it(_ref43) { - let { - field: e - } = _ref43; - if (!("defaultValue" in e) || e.defaultValue === void 0) return null; - const t = M.astFromValue(e.defaultValue, e.type); - return t ? s.jsxs(s.Fragment, { - children: [" = ", s.jsx("span", { - className: "graphiql-doc-explorer-default-value", - children: jr(t) - })] - }) : null; -} -a(it, "DefaultValue"); -const at = oe("SchemaContext"); -function ct(e) { - if (!e.fetcher) throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop."); - const { - initialHeaders: t, - headerEditor: n - } = Z({ - nonNull: !0, - caller: ct - }), - [r, o] = l.useState(), - [c, i] = l.useState(!1), - [d, g] = l.useState(null), - m = l.useRef(0); - l.useEffect(() => { - o(M.isSchema(e.schema) || e.schema === null || e.schema === void 0 ? e.schema : void 0), m.current++; - }, [e.schema]); - const p = l.useRef(t); - l.useEffect(() => { - n && (p.current = n.getValue()); - }); - const { - introspectionQuery: y, - introspectionQueryName: h, - introspectionQuerySansSubscriptions: x - } = kr({ - inputValueDeprecation: e.inputValueDeprecation, - introspectionQueryName: e.introspectionQueryName, - schemaDescription: e.schemaDescription - }), - { - fetcher: f, - onSchemaChange: C, - dangerouslyAssumeSchemaIsValid: E, - children: k - } = e, - L = l.useCallback(() => { - if (M.isSchema(e.schema) || e.schema === null) return; - const T = ++m.current, - A = e.schema; - async function F() { - if (A) return A; - const I = Nr(p.current); - if (!I.isValidJSON) { - g("Introspection failed as headers are invalid."); - return; + } } - const H = I.headers ? { - headers: I.headers - } : {}, - O = B.fetcherReturnToPromise(f({ - query: y, - operationName: h - }, H)); - if (!B.isPromise(O)) { - g("Fetcher did not return a Promise for introspection."); - return; + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); } - i(!0), g(null); - let D = await O; - if (typeof D != "object" || D === null || !("data" in D)) { - const N = B.fetcherReturnToPromise(f({ - query: x, - operationName: h - }, H)); - if (!B.isPromise(N)) throw new Error("Fetcher did not return a Promise for introspection."); - D = await N; - } - if (i(!1), D != null && D.data && "__schema" in D.data) return D.data; - const q = typeof D == "string" ? D : B.formatResult(D); - g(q); - } - a(F, "fetchIntrospectionData"), F().then(I => { - if (!(T !== m.current || !I)) try { - const H = M.buildClientSchema(I); - o(H), C == null || C(H); - } catch (H) { - g(B.formatError(H)); - } - }).catch(I => { - T === m.current && (g(B.formatError(I)), i(!1)); - }); - }, [f, h, y, x, C, e.schema]); - l.useEffect(() => { - L(); - }, [L]), l.useEffect(() => { - function T(A) { - A.ctrlKey && A.key === "R" && L(); - } - return a(T, "triggerIntrospection"), window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T); - }); - const b = l.useMemo(() => !r || E ? [] : M.validateSchema(r), [r, E]), - w = l.useMemo(() => ({ - fetchError: d, - introspect: L, - isFetching: c, - schema: r, - validationErrors: b - }), [d, L, c, r, b]); - return s.jsx(at.Provider, { - value: w, - children: k - }); -} -a(ct, "SchemaContextProvider"); -const Y = le(at); -function kr(_ref44) { - let { - inputValueDeprecation: e, - introspectionQueryName: t, - schemaDescription: n - } = _ref44; - return l.useMemo(() => { - const r = t || "IntrospectionQuery"; - let o = M.getIntrospectionQuery({ - inputValueDeprecation: e, - schemaDescription: n - }); - t && (o = o.replace("query IntrospectionQuery", `query ${r}`)); - const c = o.replace("subscriptionType { name }", ""); - return { - introspectionQueryName: r, - introspectionQuery: o, - introspectionQuerySansSubscriptions: c - }; - }, [e, t, n]); -} -a(kr, "useIntrospectionQuery"); -function Nr(e) { - let t = null, - n = !0; - try { - e && (t = JSON.parse(e)); - } catch { - n = !1; - } - return { - headers: t, - isValidJSON: n - }; -} -a(Nr, "parseHeaderString"); -const Le = { - name: "Docs" - }, - ut = oe("ExplorerContext"); -function dt(e) { - const { - schema: t, - validationErrors: n - } = Y({ - nonNull: !0, - caller: dt - }), - [r, o] = l.useState([Le]), - c = l.useCallback(m => { - o(p => p.at(-1).def === m.def ? p : [...p, m]); - }, []), - i = l.useCallback(() => { - o(m => m.length > 1 ? m.slice(0, -1) : m); - }, []), - d = l.useCallback(() => { - o(m => m.length === 1 ? m : [Le]); - }, []); - l.useEffect(() => { - t == null || n.length > 0 ? d() : o(m => { - if (m.length === 1) return m; - const p = [Le]; - let y = null; - for (const h of m) if (h !== Le) if (h.def) { - if (M.isNamedType(h.def)) { - const x = t.getType(h.def.name); - if (x) p.push({ - name: h.name, - def: x - }), y = x;else break; - } else { - if (y === null) break; - if (M.isObjectType(y) || M.isInputObjectType(y)) { - const x = y.getFields()[h.name]; - if (x) p.push({ - name: h.name, - def: x - });else break; - } else { - if (M.isScalarType(y) || M.isEnumType(y) || M.isInterfaceType(y) || M.isUnionType(y)) break; + Error.prepareStackTrace = previousPrepareStackTrace; + } // Fallback to just using the name if we couldn't make it throw. + + var name = fn ? fn.displayName || fn.name : ''; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; + { + if (typeof fn === 'function') { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ''; + } + if (typeof type === 'function') { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === 'string') { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame('Suspense'); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame('SuspenseList'); + } + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + // Memo may contain any component type so we recursively resolve it. + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { - const x = y; - if (x.args.find(C => C.name === h.name)) p.push({ - name: h.name, - def: x - });else break; + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + // Lazy may contain any component type so we recursively resolve it. + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) {} + } + } + } + return ''; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + // $FlowFixMe This is okay but Flow doesn't know it. + var has = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + // eslint-disable-next-line react-internal/prod-error-codes + var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); + err.name = 'Invariant Violation'; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error('Failed %s type: %s', location, error$1.message); + setCurrentlyValidatingElement(null); } } } - } else y = null, p.push(h); - return p; - }); - }, [d, t, n]); - const g = l.useMemo(() => ({ - explorerNavStack: r, - push: c, - pop: i, - reset: d - }), [r, c, i, d]); - return s.jsx(ut.Provider, { - value: g, - children: e.children - }); -} -a(dt, "ExplorerContextProvider"); -const ee = le(ut); -function Re(e, t) { - return M.isNonNullType(e) ? s.jsxs(s.Fragment, { - children: [Re(e.ofType, t), "!"] - }) : M.isListType(e) ? s.jsxs(s.Fragment, { - children: ["[", Re(e.ofType, t), "]"] - }) : t(e); -} -a(Re, "renderType"); -function Q(e) { - const { - push: t - } = ee({ - nonNull: !0, - caller: Q - }); - return e.type ? Re(e.type, n => s.jsx("a", { - className: "graphiql-doc-explorer-type-name", - onClick: r => { - r.preventDefault(), t({ - name: n.name, - def: n - }); - }, - href: "#", - children: n.name - })) : null; -} -a(Q, "TypeLink"); -function Ce(_ref45) { - let { - arg: e, - showDefaultValue: t, - inline: n - } = _ref45; - const r = s.jsxs("span", { - children: [s.jsx("span", { - className: "graphiql-doc-explorer-argument-name", - children: e.name - }), ": ", s.jsx(Q, { - type: e.type - }), t !== !1 && s.jsx(it, { - field: e - })] - }); - return n ? r : s.jsxs("div", { - className: "graphiql-doc-explorer-argument", - children: [r, e.description ? s.jsx(z, { - type: "description", - children: e.description - }) : null, e.deprecationReason ? s.jsxs("div", { - className: "graphiql-doc-explorer-argument-deprecation", - children: [s.jsx("div", { - className: "graphiql-doc-explorer-argument-deprecation-label", - children: "Deprecated" - }), s.jsx(z, { - type: "deprecation", - children: e.deprecationReason - })] - }) : null] - }); -} -a(Ce, "Argument"); -function ht(e) { - var _e$preview; - return e.children ? s.jsxs("div", { - className: "graphiql-doc-explorer-deprecation", - children: [s.jsx("div", { - className: "graphiql-doc-explorer-deprecation-label", - children: "Deprecated" - }), s.jsx(z, { - type: "deprecation", - onlyShowFirstChild: (_e$preview = e.preview) !== null && _e$preview !== void 0 ? _e$preview : !0, - children: e.children - })] - }) : null; -} -a(ht, "DeprecationReason"); -function cn(_ref46) { - let { - directive: e - } = _ref46; - return s.jsxs("span", { - className: "graphiql-doc-explorer-directive", - children: ["@", e.name.value] - }); -} -a(cn, "Directive"); -function G(e) { - const t = Tr[e.title]; - return s.jsxs("div", { - children: [s.jsxs("div", { - className: "graphiql-doc-explorer-section-title", - children: [s.jsx(t, {}), e.title] - }), s.jsx("div", { - className: "graphiql-doc-explorer-section-content", - children: e.children - })] - }); -} -a(G, "ExplorerSection"); -const Tr = { - Arguments: Tt, - "Deprecated Arguments": Pt, - "Deprecated Enum Values": qt, - "Deprecated Fields": Rt, - Directives: Vt, - "Enum Values": Dt, - Fields: At, - Implements: Ft, - Implementations: ge, - "Possible Types": ge, - "Root Types": Zt, - Type: ge, - "All Schema Types": ge -}; -function un(e) { - return s.jsxs(s.Fragment, { - children: [e.field.description ? s.jsx(z, { - type: "description", - children: e.field.description - }) : null, s.jsx(ht, { - preview: !1, - children: e.field.deprecationReason - }), s.jsx(G, { - title: "Type", - children: s.jsx(Q, { - type: e.field.type - }) - }), s.jsx(Mr, { - field: e.field - }), s.jsx(Pr, { - field: e.field - })] - }); -} -a(un, "FieldDocumentation"); -function Mr(_ref47) { - let { - field: e - } = _ref47; - const [t, n] = l.useState(!1), - r = l.useCallback(() => { - n(!0); - }, []); - if (!("args" in e)) return null; - const o = [], - c = []; - for (const i of e.args) i.deprecationReason ? c.push(i) : o.push(i); - return s.jsxs(s.Fragment, { - children: [o.length > 0 ? s.jsx(G, { - title: "Arguments", - children: o.map(i => s.jsx(Ce, { - arg: i - }, i.name)) - }) : null, c.length > 0 ? t || o.length === 0 ? s.jsx(G, { - title: "Deprecated Arguments", - children: c.map(i => s.jsx(Ce, { - arg: i - }, i.name)) - }) : s.jsx(me, { - type: "button", - onClick: r, - children: "Show Deprecated Arguments" - }) : null] - }); -} -a(Mr, "Arguments"); -function Pr(_ref48) { - let { - field: e - } = _ref48; - var n; - const t = ((n = e.astNode) == null ? void 0 : n.directives) || []; - return !t || t.length === 0 ? null : s.jsx(G, { - title: "Directives", - children: t.map(r => s.jsx("div", { - children: s.jsx(cn, { - directive: r - }) - }, r.name.value)) - }); -} -a(Pr, "Directives"); -function dn(e) { - var i, d, g, m; - const t = e.schema.getQueryType(), - n = (d = (i = e.schema).getMutationType) == null ? void 0 : d.call(i), - r = (m = (g = e.schema).getSubscriptionType) == null ? void 0 : m.call(g), - o = e.schema.getTypeMap(), - c = [t == null ? void 0 : t.name, n == null ? void 0 : n.name, r == null ? void 0 : r.name]; - return s.jsxs(s.Fragment, { - children: [s.jsx(z, { - type: "description", - children: e.schema.description || "A GraphQL schema provides a root type for each kind of operation." - }), s.jsxs(G, { - title: "Root Types", - children: [t ? s.jsxs("div", { - children: [s.jsx("span", { - className: "graphiql-doc-explorer-root-type", - children: "query" - }), ": ", s.jsx(Q, { - type: t - })] - }) : null, n && s.jsxs("div", { - children: [s.jsx("span", { - className: "graphiql-doc-explorer-root-type", - children: "mutation" - }), ": ", s.jsx(Q, { - type: n - })] - }), r && s.jsxs("div", { - children: [s.jsx("span", { - className: "graphiql-doc-explorer-root-type", - children: "subscription" - }), ": ", s.jsx(Q, { - type: r - })] - })] - }), s.jsx(G, { - title: "All Schema Types", - children: o && s.jsx("div", { - children: Object.values(o).map(p => c.includes(p.name) || p.name.startsWith("__") ? null : s.jsx("div", { - children: s.jsx(Q, { - type: p - }) - }, p.name)) - }) - })] - }); -} -a(dn, "SchemaDocumentation"); -function ue(e, t) { - let n; - return function () { - for (var _len = arguments.length, r = new Array(_len), _key = 0; _key < _len; _key++) { - r[_key] = arguments[_key]; + } } - n && window.clearTimeout(n), n = window.setTimeout(() => { - n = null, t(...r); - }, e); - }; -} -a(ue, "debounce"); -function mt() { - const { - explorerNavStack: e, - push: t - } = ee({ - nonNull: !0, - caller: mt - }), - n = l.useRef(null), - r = Ke(), - [o, c] = l.useState(""), - [i, d] = l.useState(r(o)), - g = l.useMemo(() => ue(200, f => { - d(r(f)); - }), [r]); - l.useEffect(() => { - g(o); - }, [g, o]), l.useEffect(() => { - function f(C) { - var E; - C.metaKey && C.key === "k" && ((E = n.current) == null || E.focus()); - } - return a(f, "handleKeyDown"), window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f); - }, []); - const m = e.at(-1), - p = l.useCallback(f => { - t("field" in f ? { - name: f.field.name, - def: f.field - } : { - name: f.type.name, - def: f.type - }); - }, [t]), - y = l.useRef(!1), - h = l.useCallback(f => { - y.current = f.type === "focus"; - }, []); - return e.length === 1 || M.isObjectType(m.def) || M.isInterfaceType(m.def) || M.isInputObjectType(m.def) ? s.jsxs(ae.Combobox, { - as: "div", - className: "graphiql-doc-explorer-search", - onChange: p, - "data-state": y ? void 0 : "idle", - "aria-label": `Search ${m.name}...`, - children: [s.jsxs("div", { - className: "graphiql-doc-explorer-search-input", - onClick: () => { - var f; - (f = n.current) == null || f.focus(); - }, - children: [s.jsx(Bt, {}), s.jsx(ae.Combobox.Input, { - autoComplete: "off", - onFocus: h, - onBlur: h, - onChange: f => c(f.target.value), - placeholder: "⌘ K", - ref: n, - value: o, - "data-cy": "doc-explorer-input" - })] - }), y.current && s.jsxs(ae.Combobox.Options, { - "data-cy": "doc-explorer-list", - children: [i.within.length + i.types.length + i.fields.length === 0 ? s.jsx("li", { - className: "graphiql-doc-explorer-search-empty", - children: "No results found" - }) : i.within.map((f, C) => s.jsx(ae.Combobox.Option, { - value: f, - "data-cy": "doc-explorer-option", - children: s.jsx(bt, { - field: f.field, - argument: f.argument - }) - }, `within-${C}`)), i.within.length > 0 && i.types.length + i.fields.length > 0 ? s.jsx("div", { - className: "graphiql-doc-explorer-search-divider", - children: "Other results" - }) : null, i.types.map((f, C) => s.jsx(ae.Combobox.Option, { - value: f, - "data-cy": "doc-explorer-option", - children: s.jsx(Je, { - type: f.type - }) - }, `type-${C}`)), i.fields.map((f, C) => s.jsxs(ae.Combobox.Option, { - value: f, - "data-cy": "doc-explorer-option", - children: [s.jsx(Je, { - type: f.type - }), ".", s.jsx(bt, { - field: f.field, - argument: f.argument - })] - }, `field-${C}`))] - })] - }) : null; -} -a(mt, "Search"); -function Ke(e) { - const { - explorerNavStack: t - } = ee({ - nonNull: !0, - caller: e || Ke - }), - { - schema: n - } = Y({ - nonNull: !0, - caller: e || Ke - }), - r = t.at(-1); - return l.useCallback(o => { - const c = { - within: [], - types: [], - fields: [] - }; - if (!n) return c; - const i = r.def, - d = n.getTypeMap(); - let g = Object.keys(d); - i && (g = g.filter(m => m !== i.name), g.unshift(i.name)); - for (const m of g) { - if (c.within.length + c.types.length + c.fields.length >= 100) break; - const p = d[m]; - if (i !== p && Qe(m, o) && c.types.push({ - type: p - }), !M.isObjectType(p) && !M.isInterfaceType(p) && !M.isInputObjectType(p)) continue; - const y = p.getFields(); - for (const h in y) { - const x = y[h]; - let f; - if (!Qe(h, o)) if ("args" in x) { - if (f = x.args.filter(C => Qe(C.name, o)), f.length === 0) continue; - } else continue; - c[i === p ? "within" : "fields"].push(...(f ? f.map(C => ({ - type: p, - field: x, - argument: C - })) : [{ - type: p, - field: x - }])); - } - } - return c; - }, [r.def, n]); -} -a(Ke, "useSearchResults"); -function Qe(e, t) { - try { - const n = t.replaceAll(/[^_0-9A-Za-z]/g, r => "\\" + r); - return e.search(new RegExp(n, "i")) !== -1; - } catch { - return e.toLowerCase().includes(t.toLowerCase()); - } -} -a(Qe, "isMatch"); -function Je(e) { - return s.jsx("span", { - className: "graphiql-doc-explorer-search-type", - children: e.type.name - }); -} -a(Je, "Type"); -function bt(_ref49) { - let { - field: e, - argument: t - } = _ref49; - return s.jsxs(s.Fragment, { - children: [s.jsx("span", { - className: "graphiql-doc-explorer-search-field", - children: e.name - }), t ? s.jsxs(s.Fragment, { - children: ["(", s.jsx("span", { - className: "graphiql-doc-explorer-search-argument", - children: t.name - }), ":", " ", Re(t.type, n => s.jsx(Je, { - type: n - })), ")"] - }) : null] - }); -} -a(bt, "Field$1"); -function hn(e) { - const { - push: t - } = ee({ - nonNull: !0 - }); - return s.jsx("a", { - className: "graphiql-doc-explorer-field-name", - onClick: n => { - n.preventDefault(), t({ - name: e.field.name, - def: e.field - }); - }, - href: "#", - children: e.field.name - }); -} -a(hn, "FieldLink"); -function mn(e) { - return M.isNamedType(e.type) ? s.jsxs(s.Fragment, { - children: [e.type.description ? s.jsx(z, { - type: "description", - children: e.type.description - }) : null, s.jsx(qr, { - type: e.type - }), s.jsx(Rr, { - type: e.type - }), s.jsx(Vr, { - type: e.type - }), s.jsx(Ir, { - type: e.type - })] - }) : null; -} -a(mn, "TypeDocumentation"); -function qr(_ref50) { - let { - type: e - } = _ref50; - return M.isObjectType(e) && e.getInterfaces().length > 0 ? s.jsx(G, { - title: "Implements", - children: e.getInterfaces().map(n => s.jsx("div", { - children: s.jsx(Q, { - type: n - }) - }, n.name)) - }) : null; -} -a(qr, "ImplementsInterfaces"); -function Rr(_ref51) { - let { - type: e - } = _ref51; - const [t, n] = l.useState(!1), - r = l.useCallback(() => { - n(!0); - }, []); - if (!M.isObjectType(e) && !M.isInterfaceType(e) && !M.isInputObjectType(e)) return null; - const o = e.getFields(), - c = [], - i = []; - for (const d of Object.keys(o).map(g => o[g])) d.deprecationReason ? i.push(d) : c.push(d); - return s.jsxs(s.Fragment, { - children: [c.length > 0 ? s.jsx(G, { - title: "Fields", - children: c.map(d => s.jsx(wt, { - field: d - }, d.name)) - }) : null, i.length > 0 ? t || c.length === 0 ? s.jsx(G, { - title: "Deprecated Fields", - children: i.map(d => s.jsx(wt, { - field: d - }, d.name)) - }) : s.jsx(me, { - type: "button", - onClick: r, - children: "Show Deprecated Fields" - }) : null] - }); -} -a(Rr, "Fields"); -function wt(_ref52) { - let { - field: e - } = _ref52; - const t = "args" in e ? e.args.filter(n => !n.deprecationReason) : []; - return s.jsxs("div", { - className: "graphiql-doc-explorer-item", - children: [s.jsxs("div", { - children: [s.jsx(hn, { - field: e - }), t.length > 0 ? s.jsxs(s.Fragment, { - children: ["(", s.jsx("span", { - children: t.map(n => t.length === 1 ? s.jsx(Ce, { - arg: n, - inline: !0 - }, n.name) : s.jsx("div", { - className: "graphiql-doc-explorer-argument-multiple", - children: s.jsx(Ce, { - arg: n, - inline: !0 - }) - }, n.name)) - }), ")"] - }) : null, ": ", s.jsx(Q, { - type: e.type - }), s.jsx(it, { - field: e - })] - }), e.description ? s.jsx(z, { - type: "description", - onlyShowFirstChild: !0, - children: e.description - }) : null, s.jsx(ht, { - children: e.deprecationReason - })] - }); -} -a(wt, "Field"); -function Vr(_ref53) { - let { - type: e - } = _ref53; - const [t, n] = l.useState(!1), - r = l.useCallback(() => { - n(!0); - }, []); - if (!M.isEnumType(e)) return null; - const o = [], - c = []; - for (const i of e.getValues()) i.deprecationReason ? c.push(i) : o.push(i); - return s.jsxs(s.Fragment, { - children: [o.length > 0 ? s.jsx(G, { - title: "Enum Values", - children: o.map(i => s.jsx(Et, { - value: i - }, i.name)) - }) : null, c.length > 0 ? t || o.length === 0 ? s.jsx(G, { - title: "Deprecated Enum Values", - children: c.map(i => s.jsx(Et, { - value: i - }, i.name)) - }) : s.jsx(me, { - type: "button", - onClick: r, - children: "Show Deprecated Values" - }) : null] - }); -} -a(Vr, "EnumValues"); -function Et(_ref54) { - let { - value: e - } = _ref54; - return s.jsxs("div", { - className: "graphiql-doc-explorer-item", - children: [s.jsx("div", { - className: "graphiql-doc-explorer-enum-value", - children: e.name - }), e.description ? s.jsx(z, { - type: "description", - children: e.description - }) : null, e.deprecationReason ? s.jsx(z, { - type: "deprecation", - children: e.deprecationReason - }) : null] - }); -} -a(Et, "EnumValue"); -function Ir(_ref55) { - let { - type: e - } = _ref55; - const { - schema: t - } = Y({ - nonNull: !0 - }); - return !t || !M.isAbstractType(e) ? null : s.jsx(G, { - title: M.isInterfaceType(e) ? "Implementations" : "Possible Types", - children: t.getPossibleTypes(e).map(n => s.jsx("div", { - children: s.jsx(Q, { - type: n - }) - }, n.name)) - }); -} -a(Ir, "PossibleTypes"); -function Ve() { - const { - fetchError: e, - isFetching: t, - schema: n, - validationErrors: r - } = Y({ - nonNull: !0, - caller: Ve - }), - { - explorerNavStack: o, - pop: c - } = ee({ - nonNull: !0, - caller: Ve - }), - i = o.at(-1); - let d = null; - e ? d = s.jsx("div", { - className: "graphiql-doc-explorer-error", - children: "Error fetching schema" - }) : r.length > 0 ? d = s.jsxs("div", { - className: "graphiql-doc-explorer-error", - children: ["Schema is invalid: ", r[0].message] - }) : t ? d = s.jsx(st, {}) : n ? o.length === 1 ? d = s.jsx(dn, { - schema: n - }) : M.isType(i.def) ? d = s.jsx(mn, { - type: i.def - }) : i.def && (d = s.jsx(un, { - field: i.def - })) : d = s.jsx("div", { - className: "graphiql-doc-explorer-error", - children: "No GraphQL schema available" - }); - let g; - return o.length > 1 && (g = o.at(-2).name), s.jsxs("section", { - className: "graphiql-doc-explorer", - "aria-label": "Documentation Explorer", - children: [s.jsxs("div", { - className: "graphiql-doc-explorer-header", - children: [s.jsxs("div", { - className: "graphiql-doc-explorer-header-content", - children: [g && s.jsxs("a", { - href: "#", - className: "graphiql-doc-explorer-back", - onClick: m => { - m.preventDefault(), c(); - }, - "aria-label": `Go back to ${g}`, - children: [s.jsx(Mt, {}), g] - }), s.jsx("div", { - className: "graphiql-doc-explorer-title", - children: i.name - })] - }), s.jsx(mt, {}, i.name)] - }), s.jsx("div", { - className: "graphiql-doc-explorer-content", - children: d - })] - }); -} -a(Ve, "DocExplorer"); -const de = { - title: "Documentation Explorer", - icon: a(function () { - const t = _e(); - return (t == null ? void 0 : t.visiblePlugin) === de ? s.jsx(It, {}) : s.jsx(Ht, {}); - }, "Icon"), - content: Ve - }, - Ye = { - title: "History", - icon: Ot, - content: on - }, - ft = oe("PluginContext"); -function fn(e) { - const t = re(), - n = ee(), - r = be(), - o = !!n, - c = !!r, - i = l.useMemo(() => { - const x = [], - f = {}; - o && (x.push(de), f[de.title] = !0), c && (x.push(Ye), f[Ye.title] = !0); - for (const C of e.plugins || []) { - if (typeof C.title != "string" || !C.title) throw new Error("All GraphiQL plugins must have a unique title"); - if (f[C.title]) throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${C.title}'`); - x.push(C), f[C.title] = !0; - } - return x; - }, [o, c, e.plugins]), - [d, g] = l.useState(() => { - const x = t == null ? void 0 : t.get(St), - f = i.find(C => C.title === x); - return f || (x && (t == null || t.set(St, "")), e.visiblePlugin && i.find(C => (typeof e.visiblePlugin == "string" ? C.title : C) === e.visiblePlugin) || null); - }), - { - onTogglePluginVisibility: m, - children: p - } = e, - y = l.useCallback(x => { - const f = x && i.find(C => (typeof x == "string" ? C.title : C) === x) || null; - g(C => f === C ? C : (m == null || m(f), f)); - }, [m, i]); - l.useEffect(() => { - e.visiblePlugin && y(e.visiblePlugin); - }, [i, e.visiblePlugin, y]); - const h = l.useMemo(() => ({ - plugins: i, - setVisiblePlugin: y, - visiblePlugin: d - }), [i, y, d]); - return s.jsx(ft.Provider, { - value: h, - children: p - }); -} -a(fn, "PluginContextProvider"); -const _e = le(ft), - St = "visiblePlugin"; -function Hr(e, t, n, r, o, c) { - Ee([], { - useCommonAddons: !1 - }).then(d => { - let g, m, p, y, h, x, f, C, E; - d.on(t, "select", (k, L) => { - if (!g) { - const b = L.parentNode; - g = document.createElement("div"), g.className = "CodeMirror-hint-information", b.append(g); - const w = document.createElement("header"); - w.className = "CodeMirror-hint-information-header", g.append(w), m = document.createElement("span"), m.className = "CodeMirror-hint-information-field-name", w.append(m), p = document.createElement("span"), p.className = "CodeMirror-hint-information-type-name-pill", w.append(p), y = document.createElement("span"), p.append(y), h = document.createElement("a"), h.className = "CodeMirror-hint-information-type-name", h.href = "javascript:void 0", h.addEventListener("click", i), p.append(h), x = document.createElement("span"), p.append(x), f = document.createElement("div"), f.className = "CodeMirror-hint-information-description", g.append(f), C = document.createElement("div"), C.className = "CodeMirror-hint-information-deprecation", g.append(C); - const T = document.createElement("span"); - T.className = "CodeMirror-hint-information-deprecation-label", T.textContent = "Deprecated", C.append(T), E = document.createElement("div"), E.className = "CodeMirror-hint-information-deprecation-reason", C.append(E); - const A = parseInt(window.getComputedStyle(g).paddingBottom.replace(/px$/, ""), 10) || 0, - F = parseInt(window.getComputedStyle(g).maxHeight.replace(/px$/, ""), 10) || 0, - I = a(() => { - g && (g.style.paddingTop = b.scrollTop + A + "px", g.style.maxHeight = b.scrollTop + F + "px"); - }, "handleScroll"); - b.addEventListener("scroll", I); - let H; - b.addEventListener("DOMNodeRemoved", H = a(O => { - O.target === b && (b.removeEventListener("scroll", I), b.removeEventListener("DOMNodeRemoved", H), g && g.removeEventListener("click", i), g = null, m = null, p = null, y = null, h = null, x = null, f = null, C = null, E = null, H = null); - }, "onRemoveFn")); - } - if (m && (m.textContent = k.text), p && y && h && x) if (k.type) { - p.style.display = "inline"; - const b = a(w => { - M.isNonNullType(w) ? (x.textContent = "!" + x.textContent, b(w.ofType)) : M.isListType(w) ? (y.textContent += "[", x.textContent = "]" + x.textContent, b(w.ofType)) : h.textContent = w.name; - }, "renderType"); - y.textContent = "", x.textContent = "", b(k.type); - } else y.textContent = "", h.textContent = "", x.textContent = "", p.style.display = "none"; - f && (k.description ? (f.style.display = "block", f.innerHTML = Me.render(k.description)) : (f.style.display = "none", f.innerHTML = "")), C && E && (k.deprecationReason ? (C.style.display = "block", E.innerHTML = Me.render(k.deprecationReason)) : (C.style.display = "none", E.innerHTML = "")); - }); - }); - function i(d) { - if (!n || !r || !o || !(d.currentTarget instanceof HTMLElement)) return; - const g = d.currentTarget.textContent || "", - m = n.getType(g); - m && (o.setVisiblePlugin(de), r.push({ - name: m.name, - def: m - }), c == null || c(m)); - } - a(i, "onClickHintInformation"); -} -a(Hr, "onHasCompletion"); -function je(e, t) { - l.useEffect(() => { - e && typeof t == "string" && t !== e.getValue() && e.setValue(t); - }, [e, t]); -} -a(je, "useSynchronizeValue"); -function Ze(e, t, n) { - l.useEffect(() => { - e && e.setOption(t, n); - }, [e, t, n]); -} -a(Ze, "useSynchronizeOption"); -function pn(e, t, n, r, o) { - const { - updateActiveTabValues: c - } = Z({ - nonNull: !0, - caller: o - }), - i = re(); - l.useEffect(() => { - if (!e) return; - const d = ue(500, p => { - !i || n === null || i.set(n, p); - }), - g = ue(100, p => { - c({ - [r]: p - }); - }), - m = a((p, y) => { - if (!y) return; - const h = p.getValue(); - d(h), g(h), t == null || t(h); - }, "handleChange"); - return e.on("change", m), () => e.off("change", m); - }, [t, e, i, n, r, c]); -} -a(pn, "useChangeHandler"); -function gn(e, t, n) { - const { - schema: r - } = Y({ - nonNull: !0, - caller: n - }), - o = ee(), - c = _e(); - l.useEffect(() => { - if (!e) return; - const i = a((d, g) => { - Hr(d, g, r, o, c, m => { - t == null || t({ - kind: "Type", - type: m, - schema: r || void 0 - }); - }); - }, "handleCompletion"); - return e.on("hasCompletion", i), () => e.off("hasCompletion", i); - }, [t, e, o, c, r]); -} -a(gn, "useCompletion"); -function J(e, t, n) { - l.useEffect(() => { - if (e) { - for (const r of t) e.removeKeyMap(r); - if (n) { - const r = {}; - for (const o of t) r[o] = () => n(); - e.addKeyMap(r); + var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare + + function isArray(a) { + return isArrayImpl(a); + } + + /* + * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ + // $FlowFixMe only called in DEV, so void return is not possible. + function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; + return type; + } + } // $FlowFixMe only called in DEV, so void return is not possible. + + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } } } - }, [e, t, n]); -} -a(J, "useKeyMap"); -function pt() { - let { - caller: e, - onCopyQuery: t - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const { - queryEditor: n - } = Z({ - nonNull: !0, - caller: e || pt - }); - return l.useCallback(() => { - if (!n) return; - const r = n.getValue(); - Tn(r), t == null || t(r); - }, [n, t]); -} -a(pt, "useCopyQuery"); -function he() { - let { - caller: e - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const { - queryEditor: t - } = Z({ - nonNull: !0, - caller: e || he - }), - { - schema: n - } = Y({ - nonNull: !0, - caller: he - }); - return l.useCallback(() => { - const r = t == null ? void 0 : t.documentAST, - o = t == null ? void 0 : t.getValue(); - !r || !o || t.setValue(M.print(B.mergeAst(r, n))); - }, [t, n]); -} -a(he, "useMergeQuery"); -function Se() { - let { - caller: e - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const { - queryEditor: t, - headerEditor: n, - variableEditor: r - } = Z({ - nonNull: !0, - caller: e || Se - }); - return l.useCallback(() => { - if (r) { - const o = r.getValue(); - try { - const c = JSON.stringify(JSON.parse(o), null, 2); - c !== o && r.setValue(c); - } catch {} - } - if (n) { - const o = n.getValue(); - try { - const c = JSON.stringify(JSON.parse(o), null, 2); - c !== o && n.setValue(c); - } catch {} - } - if (t) { - const o = t.getValue(), - c = M.print(M.parse(o)); - c !== o && t.setValue(c); + function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return '' + value; } - }, [t, r, n]); -} -a(Se, "usePrettifyEditors"); -function Ie() { - let { - getDefaultFieldNames: e, - caller: t - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const { - schema: n - } = Y({ - nonNull: !0, - caller: t || Ie - }), - { - queryEditor: r - } = Z({ - nonNull: !0, - caller: t || Ie - }); - return l.useCallback(() => { - if (!r) return; - const o = r.getValue(), + function checkKeyStringCoercion(value) { { - insertions: c, - result: i - } = B.fillLeafs(n, o, e); - return c && c.length > 0 && r.operation(() => { - const d = r.getCursor(), - g = r.indexFromPos(d); - r.setValue(i || ""); - let m = 0; - const p = c.map(_ref56 => { - let { - index: h, - string: x - } = _ref56; - return r.markText(r.posFromIndex(h + m), r.posFromIndex(h + (m += x.length)), { - className: "auto-inserted-leaf", - clearOnEnter: !0, - title: "Automatically added leaf fields" - }); - }); - setTimeout(() => { - for (const h of p) h.clear(); - }, 7e3); - let y = g; - for (const { - index: h, - string: x - } of c) h < g && (y += x.length); - r.setCursor(r.posFromIndex(y)); - }), i; - }, [e, r, n]); -} -a(Ie, "useAutoCompleteLeafs"); -const Ge = a(e => { - var _ref57; - const n = Z({ - nonNull: !0 - })[`${e}Editor`]; - let r = ""; - const o = (_ref57 = n == null ? void 0 : n.getValue()) !== null && _ref57 !== void 0 ? _ref57 : !1; - o && o.length > 0 && (r = o); - const c = l.useCallback(i => n == null ? void 0 : n.setValue(i), [n]); - return l.useMemo(() => [r, c], [r, c]); - }, "useEditorState"), - Dr = a(() => Ge("query"), "useOperationsEditorState"), - Ar = a(() => Ge("variable"), "useVariablesEditorState"), - Or = a(() => Ge("header"), "useHeadersEditorState"); -function Fr(_ref58) { - let [e, t] = _ref58; - const n = l.useRef({ - pending: null, - last: e - }), - [r, o] = l.useState(e); - l.useEffect(() => { - n.current.last === e || (n.current.last = e, n.current.pending === null ? o(e) : n.current.pending === e ? (n.current.pending = null, e !== r && (n.current.pending = r, t(r))) : (n.current.pending = null, o(e))); - }, [e, r, t]); - const c = l.useCallback(i => { - o(i), n.current.pending === null && n.current.last !== i && (n.current.pending = i, t(i)); - }, [t]); - return l.useMemo(() => [r, c], [r, c]); -} -a(Fr, "useOptimisticState"); -function ce() { - let { - editorTheme: e = Fe, - keyMap: t = Be, - onEdit: n, - readOnly: r = !1 - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let o = arguments.length > 1 ? arguments[1] : undefined; - const { - initialHeaders: c, - headerEditor: i, - setHeaderEditor: d, - shouldPersistHeaders: g - } = Z({ - nonNull: !0, - caller: o || ce - }), - m = we(), - p = he({ - caller: o || ce - }), - y = Se({ - caller: o || ce - }), - h = l.useRef(null); - return l.useEffect(() => { - let x = !0; - return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./javascript.cjs.js */ "../../graphiql-react/dist/javascript.cjs.js")).then(f => f.javascript)]).then(f => { - if (!x) return; - const C = h.current; - if (!C) return; - const E = f(C, { - value: c, - lineNumbers: !0, - tabSize: 2, - mode: { - name: "javascript", - json: !0 - }, - theme: e, - autoCloseBrackets: !0, - matchBrackets: !0, - showCursorWhenSelecting: !0, - readOnly: r ? "nocursor" : !1, - foldGutter: !0, - gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], - extraKeys: We - }); - E.addKeyMap({ - "Cmd-Space"() { - E.showHint({ - completeSingle: !1, - container: C - }); - }, - "Ctrl-Space"() { - E.showHint({ - completeSingle: !1, - container: C - }); - }, - "Alt-Space"() { - E.showHint({ - completeSingle: !1, - container: C - }); - }, - "Shift-Space"() { - E.showHint({ - completeSingle: !1, - container: C - }); + if (willCoercionThrow(value)) { + error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } - }), E.on("keyup", (k, L) => { - const { - code: b, - key: w, - shiftKey: T - } = L, - A = b.startsWith("Key"), - F = !T && b.startsWith("Digit"); - (A || F || w === "_" || w === '"') && k.execCommand("autocomplete"); - }), d(E); - }), () => { - x = !1; - }; - }, [e, c, r, d]), Ze(i, "keyMap", t), pn(i, n, g ? Te : null, "headers", ce), J(i, ["Cmd-Enter", "Ctrl-Enter"], m == null ? void 0 : m.run), J(i, ["Shift-Ctrl-P"], y), J(i, ["Shift-Ctrl-M"], p), h; -} -a(ce, "useHeaderEditor"); -const Te = "headers", - Br = Array.from({ - length: 11 - }, (e, t) => String.fromCharCode(8192 + t)).concat(["\u2028", "\u2029", " ", " "]), - Wr = new RegExp("[" + Br.join("") + "]", "g"); -function _r(e) { - return e.replace(Wr, " "); -} -a(_r, "normalizeWhitespace"); -function te() { - let { - editorTheme: e = Fe, - keyMap: t = Be, - onClickReference: n, - onCopyQuery: r, - onEdit: o, - readOnly: c = !1 - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let i = arguments.length > 1 ? arguments[1] : undefined; - const { - schema: d - } = Y({ - nonNull: !0, - caller: i || te - }), + } + } + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; { - externalFragments: g, - initialQuery: m, - queryEditor: p, - setOperationName: y, - setQueryEditor: h, - validationRules: x, - variableEditor: f, - updateActiveTabValues: C - } = Z({ - nonNull: !0, - caller: i || te - }), - E = we(), - k = re(), - L = ee(), - b = _e(), - w = pt({ - caller: i || te, - onCopyQuery: r - }), - T = he({ - caller: i || te - }), - A = Se({ - caller: i || te - }), - F = l.useRef(null), - I = l.useRef(), - H = l.useRef(() => {}); - l.useEffect(() => { - H.current = q => { - if (!(!L || !b)) { - switch (b.setVisiblePlugin(de), q.kind) { - case "Type": - { - L.push({ - name: q.type.name, - def: q.type - }); - break; - } - case "Field": - { - L.push({ - name: q.field.name, - def: q.field - }); - break; - } - case "Argument": - { - q.field && L.push({ - name: q.field.name, - def: q.field - }); - break; - } - case "EnumValue": - { - q.type && L.push({ - name: q.type.name, - def: q.type - }); - break; - } - } - n == null || n(q); - } - }; - }, [L, n, b]), l.useEffect(() => { - let q = !0; - return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./comment.cjs.js */ "../../graphiql-react/dist/comment.cjs.js")).then(N => N.comment), Promise.resolve().then(() => __webpack_require__(/*! ./search.cjs.js */ "../../graphiql-react/dist/search.cjs.js")).then(N => N.search), Promise.resolve().then(() => __webpack_require__(/*! ./hint.cjs.js */ "../../graphiql-react/dist/hint.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs2.js */ "../../graphiql-react/dist/lint.cjs2.js")), Promise.resolve().then(() => __webpack_require__(/*! ./info.cjs.js */ "../../graphiql-react/dist/info.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./jump.cjs.js */ "../../graphiql-react/dist/jump.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs.js */ "../../graphiql-react/dist/mode.cjs.js"))]).then(N => { - if (!q) return; - I.current = N; - const P = F.current; - if (!P) return; - const S = N(P, { - value: m, - lineNumbers: !0, - tabSize: 2, - foldGutter: !0, - mode: "graphql", - theme: e, - autoCloseBrackets: !0, - matchBrackets: !0, - showCursorWhenSelecting: !0, - readOnly: c ? "nocursor" : !1, - lint: { - schema: void 0, - validationRules: null, - externalFragments: void 0 - }, - hintOptions: { - schema: void 0, - closeOnUnfocus: !1, - completeSingle: !1, - container: P, - externalFragments: void 0 - }, - info: { - schema: void 0, - renderDescription: v => Me.render(v), - onClick(v) { - H.current(v); - } - }, - jump: { - schema: void 0, - onClick(v) { - H.current(v); + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; } - }, - gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], - extraKeys: { - ...We, - "Cmd-S"() {}, - "Ctrl-S"() {} - } - }); - S.addKeyMap({ - "Cmd-Space"() { - S.showHint({ - completeSingle: !0, - container: P - }); - }, - "Ctrl-Space"() { - S.showHint({ - completeSingle: !0, - container: P - }); - }, - "Alt-Space"() { - S.showHint({ - completeSingle: !0, - container: P - }); - }, - "Shift-Space"() { - S.showHint({ - completeSingle: !0, - container: P - }); - }, - "Shift-Alt-Space"() { - S.showHint({ - completeSingle: !0, - container: P - }); } - }), S.on("keyup", (v, j) => { - Qr.test(j.key) && v.execCommand("autocomplete"); - }); - let W = !1; - S.on("startCompletion", () => { - W = !0; - }), S.on("endCompletion", () => { - W = !1; - }), S.on("keydown", (v, j) => { - j.key === "Escape" && W && j.stopPropagation(); - }), S.on("beforeChange", (v, j) => { - var R; - if (j.origin === "paste") { - const U = j.text.map(_r); - (R = j.update) == null || R.call(j, j.from, j.to, U); - } - }), S.documentAST = null, S.operationName = null, S.operations = null, S.variableToType = null, h(S); - }), () => { - q = !1; - }; - }, [e, m, c, h]), Ze(p, "keyMap", t), l.useEffect(() => { - if (!p) return; - function q(P) { - var _P$operations, _P$operationName, _ref59, _ref60; - var v; - const S = jt.getOperationFacts(d, P.getValue()), - W = B.getSelectedOperationName((_P$operations = P.operations) !== null && _P$operations !== void 0 ? _P$operations : void 0, (_P$operationName = P.operationName) !== null && _P$operationName !== void 0 ? _P$operationName : void 0, S == null ? void 0 : S.operations); - return P.documentAST = (_ref59 = S == null ? void 0 : S.documentAST) !== null && _ref59 !== void 0 ? _ref59 : null, P.operationName = W !== null && W !== void 0 ? W : null, P.operations = (_ref60 = S == null ? void 0 : S.operations) !== null && _ref60 !== void 0 ? _ref60 : null, f && (f.state.lint.linterOptions.variableToType = S == null ? void 0 : S.variableToType, f.options.lint.variableToType = S == null ? void 0 : S.variableToType, f.options.hintOptions.variableToType = S == null ? void 0 : S.variableToType, (v = I.current) == null || v.signal(f, "change", f)), S ? { - ...S, - operationName: W - } : null; - } - a(q, "getAndUpdateOperationFacts"); - const N = ue(100, P => { - var _ref61; - const S = P.getValue(); - k == null || k.set(xn, S); - const W = P.operationName, - v = q(P); - (v == null ? void 0 : v.operationName) !== void 0 && (k == null || k.set(zr, v.operationName)), o == null || o(S, v == null ? void 0 : v.documentAST), v != null && v.operationName && W !== v.operationName && y(v.operationName), C({ - query: S, - operationName: (_ref61 = v == null ? void 0 : v.operationName) !== null && _ref61 !== void 0 ? _ref61 : null - }); - }); - return q(p), p.on("change", N), () => p.off("change", N); - }, [o, p, d, y, k, f, C]), Zr(p, d !== null && d !== void 0 ? d : null, I), Gr(p, x !== null && x !== void 0 ? x : null, I), $r(p, g, I), gn(p, n || null, te); - const O = E == null ? void 0 : E.run, - D = l.useCallback(() => { - var P; - if (!O || !p || !p.operations || !p.hasFocus()) { - O == null || O(); - return; } - const q = p.indexFromPos(p.getCursor()); - let N; - for (const S of p.operations) S.loc && S.loc.start <= q && S.loc.end >= q && (N = (P = S.name) == null ? void 0 : P.value); - N && N !== p.operationName && y(N), O(); - }, [p, O, y]); - return J(p, ["Cmd-Enter", "Ctrl-Enter"], D), J(p, ["Shift-Ctrl-C"], w), J(p, ["Shift-Ctrl-P", "Shift-Ctrl-F"], A), J(p, ["Shift-Ctrl-M"], T), F; -} -a(te, "useQueryEditor"); -function Zr(e, t, n) { - l.useEffect(() => { - if (!e) return; - const r = e.options.lint.schema !== t; - e.state.lint.linterOptions.schema = t, e.options.lint.schema = t, e.options.hintOptions.schema = t, e.options.info.schema = t, e.options.jump.schema = t, r && n.current && n.current.signal(e, "change", e); - }, [e, t, n]); -} -a(Zr, "useSynchronizeSchema"); -function Gr(e, t, n) { - l.useEffect(() => { - if (!e) return; - const r = e.options.lint.validationRules !== t; - e.state.lint.linterOptions.validationRules = t, e.options.lint.validationRules = t, r && n.current && n.current.signal(e, "change", e); - }, [e, t, n]); -} -a(Gr, "useSynchronizeValidationRules"); -function $r(e, t, n) { - const r = l.useMemo(() => [...t.values()], [t]); - l.useEffect(() => { - if (!e) return; - const o = e.options.lint.externalFragments !== r; - e.state.lint.linterOptions.externalFragments = r, e.options.lint.externalFragments = r, e.options.hintOptions.externalFragments = r, o && n.current && n.current.signal(e, "change", e); - }, [e, r, n]); -} -a($r, "useSynchronizeExternalFragments"); -const Qr = /^[a-zA-Z0-9_@(]$/, - xn = "query", - zr = "operationName"; -function Ur(_ref62) { - let { - defaultQuery: e, - defaultHeaders: t, - headers: n, - defaultTabs: r, - query: o, - variables: c, - storage: i, - shouldPersistHeaders: d - } = _ref62; - const g = i == null ? void 0 : i.get(ve); - try { - if (!g) throw new Error("Storage for tabs is empty"); - const m = JSON.parse(g), - p = d ? n : void 0; - if (Kr(m)) { - const y = He({ - query: o, - variables: c, - headers: p - }); - let h = -1; - for (let x = 0; x < m.tabs.length; x++) { - const f = m.tabs[x]; - f.hash = He({ - query: f.query, - variables: f.variables, - headers: f.headers - }), f.hash === y && (h = x); - } - if (h >= 0) m.activeTabIndex = h;else { - const x = o ? gt(o) : null; - m.tabs.push({ - id: bn(), - hash: y, - title: x || xt, - query: o, - variables: c, - headers: n, - operationName: x, - response: null - }), m.activeTabIndex = m.tabs.length - 1; + return config.ref !== undefined; + } + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } } - return m; + return config.key !== undefined; } - throw new Error("Storage for tabs is invalid"); - } catch { - return { - activeTabIndex: 0, - tabs: (r || [{ - query: o !== null && o !== void 0 ? o : e, - variables: c, - headers: n !== null && n !== void 0 ? n : t - }]).map(vn) - }; - } -} -a(Ur, "getDefaultTabState"); -function Kr(e) { - return e && typeof e == "object" && !Array.isArray(e) && Yr(e, "activeTabIndex") && "tabs" in e && Array.isArray(e.tabs) && e.tabs.every(Jr); -} -a(Kr, "isTabsState"); -function Jr(e) { - return e && typeof e == "object" && !Array.isArray(e) && Lt(e, "id") && Lt(e, "title") && fe(e, "query") && fe(e, "variables") && fe(e, "headers") && fe(e, "operationName") && fe(e, "response"); -} -a(Jr, "isTabState"); -function Yr(e, t) { - return t in e && typeof e[t] == "number"; -} -a(Yr, "hasNumberKey"); -function Lt(e, t) { - return t in e && typeof e[t] == "string"; -} -a(Lt, "hasStringKey"); -function fe(e, t) { - return t in e && (typeof e[t] == "string" || e[t] === null); -} -a(fe, "hasStringOrNullKey"); -function Xr(_ref63) { - let { - queryEditor: e, - variableEditor: t, - headerEditor: n, - responseEditor: r - } = _ref63; - return l.useCallback(o => { - var _ref64, _ref65, _ref66, _ref67, _ref68; - const c = (_ref64 = e == null ? void 0 : e.getValue()) !== null && _ref64 !== void 0 ? _ref64 : null, - i = (_ref65 = t == null ? void 0 : t.getValue()) !== null && _ref65 !== void 0 ? _ref65 : null, - d = (_ref66 = n == null ? void 0 : n.getValue()) !== null && _ref66 !== void 0 ? _ref66 : null, - g = (_ref67 = e == null ? void 0 : e.operationName) !== null && _ref67 !== void 0 ? _ref67 : null, - m = (_ref68 = r == null ? void 0 : r.getValue()) !== null && _ref68 !== void 0 ? _ref68 : null; - return yn(o, { - query: c, - variables: i, - headers: d, - response: m, - operationName: g - }); - }, [e, t, n, r]); -} -a(Xr, "useSynchronizeActiveTabValues"); -function Cn(e) { - let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1; - return JSON.stringify(e, (n, r) => n === "hash" || n === "response" || !t && n === "headers" ? null : r); -} -a(Cn, "serializeTabState"); -function es(_ref69) { - let { - storage: e, - shouldPersistHeaders: t - } = _ref69; - const n = l.useMemo(() => ue(500, r => { - e == null || e.set(ve, r); - }), [e]); - return l.useCallback(r => { - n(Cn(r, t)); - }, [t, n]); -} -a(es, "useStoreTabs"); -function ts(_ref70) { - let { - queryEditor: e, - variableEditor: t, - headerEditor: n, - responseEditor: r - } = _ref70; - return l.useCallback(_ref71 => { - let { - query: o, - variables: c, - headers: i, - response: d - } = _ref71; - e == null || e.setValue(o !== null && o !== void 0 ? o : ""), t == null || t.setValue(c !== null && c !== void 0 ? c : ""), n == null || n.setValue(i !== null && i !== void 0 ? i : ""), r == null || r.setValue(d !== null && d !== void 0 ? d : ""); - }, [n, e, r, t]); -} -a(ts, "useSetEditorValues"); -function vn() { - let { - query: e = null, - variables: t = null, - headers: n = null - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return { - id: bn(), - hash: He({ - query: e, - variables: t, - headers: n - }), - title: e && gt(e) || xt, - query: e, - variables: t, - headers: n, - operationName: null, - response: null - }; -} -a(vn, "createTab"); -function yn(e, t) { - return { - ...e, - tabs: e.tabs.map((n, r) => { - if (r !== e.activeTabIndex) return n; - const o = { - ...n, - ...t - }; - return { - ...o, - hash: He(o), - title: o.operationName || (o.query ? gt(o.query) : void 0) || xt - }; - }) - }; -} -a(yn, "setPropertiesInActiveTab"); -function bn() { - const e = a(() => Math.floor((1 + Math.random()) * 65536).toString(16).slice(1), "s4"); - return `${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`; -} -a(bn, "guid"); -function He(e) { - var _e$query, _e$variables, _e$headers; - return [(_e$query = e.query) !== null && _e$query !== void 0 ? _e$query : "", (_e$variables = e.variables) !== null && _e$variables !== void 0 ? _e$variables : "", (_e$headers = e.headers) !== null && _e$headers !== void 0 ? _e$headers : ""].join("|"); -} -a(He, "hashFromTabContents"); -function gt(e) { - var _ref72; - const n = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e); - return (_ref72 = n == null ? void 0 : n[2]) !== null && _ref72 !== void 0 ? _ref72 : null; -} -a(gt, "fuzzyExtractOperationName"); -function ns(e) { - const t = e == null ? void 0 : e.get(ve); - if (t) { - const n = JSON.parse(t); - e == null || e.set(ve, JSON.stringify(n, (r, o) => r === "headers" ? null : o)); - } -} -a(ns, "clearHeadersFromTabs"); -const xt = "", - ve = "tabState"; -function se() { - let { - editorTheme: e = Fe, - keyMap: t = Be, - onClickReference: n, - onEdit: r, - readOnly: o = !1 - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let c = arguments.length > 1 ? arguments[1] : undefined; - const { - initialVariables: i, - variableEditor: d, - setVariableEditor: g - } = Z({ - nonNull: !0, - caller: c || se - }), - m = we(), - p = he({ - caller: c || se - }), - y = Se({ - caller: c || se - }), - h = l.useRef(null), - x = l.useRef(); - return l.useEffect(() => { - let f = !0; - return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./hint.cjs2.js */ "../../graphiql-react/dist/hint.cjs2.js")), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs3.js */ "../../graphiql-react/dist/lint.cjs3.js")), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs2.js */ "../../graphiql-react/dist/mode.cjs2.js"))]).then(C => { - if (!f) return; - x.current = C; - const E = h.current; - if (!E) return; - const k = C(E, { - value: i, - lineNumbers: !0, - tabSize: 2, - mode: "graphql-variables", - theme: e, - autoCloseBrackets: !0, - matchBrackets: !0, - showCursorWhenSelecting: !0, - readOnly: o ? "nocursor" : !1, - foldGutter: !0, - lint: { - variableToType: void 0 - }, - hintOptions: { - closeOnUnfocus: !1, - completeSingle: !1, - container: E, - variableToType: void 0 - }, - gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], - extraKeys: We - }); - k.addKeyMap({ - "Cmd-Space"() { - k.showHint({ - completeSingle: !1, - container: E - }); - }, - "Ctrl-Space"() { - k.showHint({ - completeSingle: !1, - container: E - }); - }, - "Alt-Space"() { - k.showHint({ - completeSingle: !1, - container: E - }); - }, - "Shift-Space"() { - k.showHint({ - completeSingle: !1, - container: E - }); + function warnIfStringRefCannotBeAutoConverted(config, self) { + { + if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); + didWarnAboutStringRefs[componentName] = true; + } } - }), k.on("keyup", (L, b) => { - const { - code: w, - key: T, - shiftKey: A - } = b, - F = w.startsWith("Key"), - I = !A && w.startsWith("Digit"); - (F || I || T === "_" || T === '"') && L.execCommand("autocomplete"); - }), g(k); - }), () => { - f = !1; - }; - }, [e, i, o, g]), Ze(d, "keyMap", t), pn(d, r, wn, "variables", se), gn(d, n || null, se), J(d, ["Cmd-Enter", "Ctrl-Enter"], m == null ? void 0 : m.run), J(d, ["Shift-Ctrl-P"], y), J(d, ["Shift-Ctrl-M"], p), h; -} -a(se, "useVariableEditor"); -const wn = "variables", - Ct = oe("EditorContext"); -function En(e) { - const t = re(), - [n, r] = l.useState(null), - [o, c] = l.useState(null), - [i, d] = l.useState(null), - [g, m] = l.useState(null), - [p, y] = l.useState(() => { - const v = (t == null ? void 0 : t.get(ze)) !== null; - return e.shouldPersistHeaders !== !1 && v ? (t == null ? void 0 : t.get(ze)) === "true" : !!e.shouldPersistHeaders; - }); - je(n, e.headers), je(o, e.query), je(i, e.response), je(g, e.variables); - const h = es({ - storage: t, - shouldPersistHeaders: p - }), - [x] = l.useState(() => { - var _ref73, _e$query2, _ref74, _e$variables2, _ref75, _e$headers2, _e$response, _ref76, _ref77; - const v = (_ref73 = (_e$query2 = e.query) !== null && _e$query2 !== void 0 ? _e$query2 : t == null ? void 0 : t.get(xn)) !== null && _ref73 !== void 0 ? _ref73 : null, - j = (_ref74 = (_e$variables2 = e.variables) !== null && _e$variables2 !== void 0 ? _e$variables2 : t == null ? void 0 : t.get(wn)) !== null && _ref74 !== void 0 ? _ref74 : null, - R = (_ref75 = (_e$headers2 = e.headers) !== null && _e$headers2 !== void 0 ? _e$headers2 : t == null ? void 0 : t.get(Te)) !== null && _ref75 !== void 0 ? _ref75 : null, - U = (_e$response = e.response) !== null && _e$response !== void 0 ? _e$response : "", - ie = Ur({ - query: v, - variables: j, - headers: R, - defaultTabs: e.defaultTabs, - defaultQuery: e.defaultQuery || rs, - defaultHeaders: e.defaultHeaders, - storage: t, - shouldPersistHeaders: p - }); - return h(ie), { - query: (_ref76 = v !== null && v !== void 0 ? v : ie.activeTabIndex === 0 ? ie.tabs[0].query : null) !== null && _ref76 !== void 0 ? _ref76 : "", - variables: j !== null && j !== void 0 ? j : "", - headers: (_ref77 = R !== null && R !== void 0 ? R : e.defaultHeaders) !== null && _ref77 !== void 0 ? _ref77 : "", - response: U, - tabState: ie - }; - }), - [f, C] = l.useState(x.tabState), - E = l.useCallback(v => { - if (v) { - var _ref78; - t == null || t.set(Te, (_ref78 = n == null ? void 0 : n.getValue()) !== null && _ref78 !== void 0 ? _ref78 : ""); - const j = Cn(f, !0); - t == null || t.set(ve, j); - } else t == null || t.set(Te, ""), ns(t); - y(v), t == null || t.set(ze, v.toString()); - }, [t, f, n]), - k = l.useRef(); - l.useEffect(() => { - const v = !!e.shouldPersistHeaders; - (k == null ? void 0 : k.current) !== v && (E(v), k.current = v); - }, [e.shouldPersistHeaders, E]); - const L = Xr({ - queryEditor: o, - variableEditor: g, - headerEditor: n, - responseEditor: i - }), - b = ts({ - queryEditor: o, - variableEditor: g, - headerEditor: n, - responseEditor: i - }), - { - onTabChange: w, - defaultHeaders: T, - children: A - } = e, - F = l.useCallback(() => { - C(v => { - const j = L(v), - R = { - tabs: [...j.tabs, vn({ - headers: T - })], - activeTabIndex: j.tabs.length - }; - return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R; - }); - }, [T, w, b, h, L]), - I = l.useCallback(v => { - C(j => { - const R = { - ...j, - activeTabIndex: v - }; - return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R; - }); - }, [w, b, h]), - H = l.useCallback(v => { - C(j => { - const R = j.tabs[j.activeTabIndex], - U = { - tabs: v, - activeTabIndex: v.indexOf(R) - }; - return h(U), b(U.tabs[U.activeTabIndex]), w == null || w(U), U; - }); - }, [w, b, h]), - O = l.useCallback(v => { - C(j => { - const R = { - tabs: j.tabs.filter((U, ie) => v !== ie), - activeTabIndex: Math.max(j.activeTabIndex - 1, 0) - }; - return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R; - }); - }, [w, b, h]), - D = l.useCallback(v => { - C(j => { - const R = yn(j, v); - return h(R), w == null || w(R), R; - }); - }, [w, h]), - { - onEditOperationName: q - } = e, - N = l.useCallback(v => { - o && (o.operationName = v, D({ - operationName: v - }), q == null || q(v)); - }, [q, o, D]), - P = l.useMemo(() => { - const v = new Map(); - if (Array.isArray(e.externalFragments)) for (const j of e.externalFragments) v.set(j.name.value, j);else if (typeof e.externalFragments == "string") M.visit(M.parse(e.externalFragments, {}), { - FragmentDefinition(j) { - v.set(j.name.value, j); - } - });else if (e.externalFragments) throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects."); - return v; - }, [e.externalFragments]), - S = l.useMemo(() => e.validationRules || [], [e.validationRules]), - W = l.useMemo(() => ({ - ...f, - addTab: F, - changeTab: I, - moveTab: H, - closeTab: O, - updateActiveTabValues: D, - headerEditor: n, - queryEditor: o, - responseEditor: i, - variableEditor: g, - setHeaderEditor: r, - setQueryEditor: c, - setResponseEditor: d, - setVariableEditor: m, - setOperationName: N, - initialQuery: x.query, - initialVariables: x.variables, - initialHeaders: x.headers, - initialResponse: x.response, - externalFragments: P, - validationRules: S, - shouldPersistHeaders: p, - setShouldPersistHeaders: E - }), [f, F, I, H, O, D, n, o, i, g, N, x, P, S, p, E]); - return s.jsx(Ct.Provider, { - value: W, - children: A - }); -} -a(En, "EditorContextProvider"); -const Z = le(Ct), - ze = "shouldPersistHeaders", - rs = `# Welcome to GraphiQL -# -# GraphiQL is an in-browser tool for writing, validating, and -# testing GraphQL queries. -# -# Type queries into this side of the screen, and you will see intelligent -# typeaheads aware of the current GraphQL type schema and live syntax and -# validation errors highlighted within the text. -# -# GraphQL queries typically start with a "{" character. Lines that start -# with a # are ignored. -# -# An example GraphQL query might look like: -# -# { -# field(arg: "value") { -# subField -# } -# } -# -# Keyboard shortcuts: -# -# Prettify query: Shift-Ctrl-P (or press the prettify button) -# -# Merge fragments: Shift-Ctrl-M (or press the merge button) -# -# Run Query: Ctrl-Enter (or press the play button) -# -# Auto Complete: Ctrl-Space (or just start typing) -# - -`; -function Xe(_ref79) { - let { - isHidden: e, - ...t - } = _ref79; - const { - headerEditor: n - } = Z({ - nonNull: !0, - caller: Xe - }), - r = ce(t, Xe); - return l.useEffect(() => { - e || n == null || n.refresh(); - }, [n, e]), s.jsx("div", { - className: _.clsx("graphiql-editor", e && "hidden"), - ref: r - }); -} -a(Xe, "HeaderEditor"); -function De(e) { - var g; - const [t, n] = l.useState({ - width: null, - height: null - }), - [r, o] = l.useState(null), - c = l.useRef(null), - i = (g = Sn(e.token)) == null ? void 0 : g.href; - l.useEffect(() => { - if (c.current) { - if (!i) { - n({ - width: null, - height: null - }), o(null); - return; } - fetch(i, { - method: "HEAD" - }).then(m => { - o(m.headers.get("Content-Type")); - }).catch(() => { - o(null); - }); } - }, [i]); - const d = t.width !== null && t.height !== null ? s.jsxs("div", { - children: [t.width, "x", t.height, r === null ? null : " " + r] - }) : null; - return s.jsxs("div", { - children: [s.jsx("img", { - onLoad: () => { - var _ref80, _ref81; - var m, p; - n({ - width: (_ref80 = (m = c.current) == null ? void 0 : m.naturalWidth) !== null && _ref80 !== void 0 ? _ref80 : null, - height: (_ref81 = (p = c.current) == null ? void 0 : p.naturalHeight) !== null && _ref81 !== void 0 ? _ref81 : null + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true }); - }, - ref: c, - src: i - }), d] - }); -} -a(De, "ImagePreview"); -De.shouldRender = a(function (t) { - const n = Sn(t); - return n ? ss(n) : !1; -}, "shouldRender"); -function Sn(e) { - if (e.type !== "string") return; - const t = e.string.slice(1).slice(0, -1).trim(); - try { - const { - location: n - } = window; - return new URL(t, n.protocol + "//" + n.host); - } catch { - return; - } -} -a(Sn, "tokenToURL"); -function ss(e) { - return /(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname); -} -a(ss, "isImageURL"); -function Ln(e) { - const t = te(e, Ln); - return s.jsx("div", { - className: "graphiql-editor", - ref: t - }); -} -a(Ln, "QueryEditor"); -function Ae() { - let { - responseTooltip: e, - editorTheme: t = Fe, - keyMap: n = Be - } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let r = arguments.length > 1 ? arguments[1] : undefined; - const { - fetchError: o, - validationErrors: c - } = Y({ - nonNull: !0, - caller: r || Ae - }), - { - initialResponse: i, - responseEditor: d, - setResponseEditor: g - } = Z({ - nonNull: !0, - caller: r || Ae - }), - m = l.useRef(null), - p = l.useRef(e); - return l.useEffect(() => { - p.current = e; - }, [e]), l.useEffect(() => { - let y = !0; - return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./foldgutter.cjs.js */ "../../graphiql-react/dist/foldgutter.cjs.js")).then(h => h.foldgutter), Promise.resolve().then(() => __webpack_require__(/*! ./brace-fold.cjs.js */ "../../graphiql-react/dist/brace-fold.cjs.js")).then(h => h.braceFold), Promise.resolve().then(() => __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js")).then(h => h.dialog), Promise.resolve().then(() => __webpack_require__(/*! ./search.cjs.js */ "../../graphiql-react/dist/search.cjs.js")).then(h => h.search), Promise.resolve().then(() => __webpack_require__(/*! ./searchcursor.cjs.js */ "../../graphiql-react/dist/searchcursor.cjs.js")).then(h => h.searchcursor), Promise.resolve().then(() => __webpack_require__(/*! ./jump-to-line.cjs.js */ "../../graphiql-react/dist/jump-to-line.cjs.js")).then(h => h.jumpToLine), Promise.resolve().then(() => __webpack_require__(/*! ./sublime.cjs.js */ "../../graphiql-react/dist/sublime.cjs.js")).then(h => h.sublime), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs3.js */ "../../graphiql-react/dist/mode.cjs3.js")), Promise.resolve().then(() => __webpack_require__(/*! ./info-addon.cjs.js */ "../../graphiql-react/dist/info-addon.cjs.js"))], { - useCommonAddons: !1 - }).then(h => { - if (!y) return; - const x = document.createElement("div"); - h.registerHelper("info", "graphql-results", (E, k, L, b) => { - const w = [], - T = p.current; - return T && w.push(s.jsx(T, { - pos: b, - token: E - })), De.shouldRender(E) && w.push(s.jsx(De, { - token: E - }, "image-preview")), w.length ? (vt.render(w, x), x) : (vt.unmountComponentAtNode(x), null); - }); - const f = m.current; - if (!f) return; - const C = h(f, { - value: i, - lineWrapping: !0, - readOnly: !0, - theme: t, - mode: "graphql-results", - foldGutter: !0, - gutters: ["CodeMirror-foldgutter"], - info: !0, - extraKeys: We - }); - g(C); - }), () => { - y = !1; - }; - }, [t, i, g]), Ze(d, "keyMap", n), l.useEffect(() => { - o && (d == null || d.setValue(o)), c.length > 0 && (d == null || d.setValue(B.formatError(c))); - }, [d, o, c]), m; -} -a(Ae, "useResponseEditor"); -function jn(e) { - const t = Ae(e, jn); - return s.jsx("section", { - className: "result-window", - "aria-label": "Result Window", - "aria-live": "polite", - "aria-atomic": "true", - ref: t - }); -} -a(jn, "ResponseEditor"); -function et(_ref82) { - let { - isHidden: e, - ...t - } = _ref82; - const { - variableEditor: n - } = Z({ - nonNull: !0, - caller: et - }), - r = se(t, et); - return l.useEffect(() => { - n && !e && n.refresh(); - }, [n, e]), s.jsx("div", { - className: _.clsx("graphiql-editor", e && "hidden"), - ref: r - }); -} -a(et, "VariableEditor"); -function os(_ref83) { - let { - children: e, - dangerouslyAssumeSchemaIsValid: t, - defaultQuery: n, - defaultHeaders: r, - defaultTabs: o, - externalFragments: c, - fetcher: i, - getDefaultFieldNames: d, - headers: g, - inputValueDeprecation: m, - introspectionQueryName: p, - maxHistoryLength: y, - onEditOperationName: h, - onSchemaChange: x, - onTabChange: f, - onTogglePluginVisibility: C, - operationName: E, - plugins: k, - query: L, - response: b, - schema: w, - schemaDescription: T, - shouldPersistHeaders: A, - storage: F, - validationRules: I, - variables: H, - visiblePlugin: O - } = _ref83; - return s.jsx(Nt, { - storage: F, - children: s.jsx(sn, { - maxHistoryLength: y, - children: s.jsx(En, { - defaultQuery: n, - defaultHeaders: r, - defaultTabs: o, - externalFragments: c, - headers: g, - onEditOperationName: h, - onTabChange: f, - query: L, - response: b, - shouldPersistHeaders: A, - validationRules: I, - variables: H, - children: s.jsx(ct, { - dangerouslyAssumeSchemaIsValid: t, - fetcher: i, - inputValueDeprecation: m, - introspectionQueryName: p, - onSchemaChange: x, - schema: w, - schemaDescription: T, - children: s.jsx(qe, { - getDefaultFieldNames: d, - fetcher: i, - operationName: E, - children: s.jsx(dt, { - children: s.jsx(fn, { - onTogglePluginVisibility: C, - plugins: k, - visiblePlugin: O, - children: e - }) - }) - }) - }) - }) - }) - }); -} -a(os, "GraphiQLProvider"); -function ls() { - const e = re(), - [t, n] = l.useState(() => { - if (!e) return null; - const o = e.get(Ue); - switch (o) { - case "light": - return "light"; - case "dark": - return "dark"; - default: - return typeof o == "string" && e.set(Ue, ""), null; - } - }); - l.useLayoutEffect(() => { - typeof window > "u" || (document.body.classList.remove("graphiql-light", "graphiql-dark"), t && document.body.classList.add(`graphiql-${t}`)); - }, [t]); - const r = l.useCallback(o => { - e == null || e.set(Ue, o || ""), n(o); - }, [e]); - return l.useMemo(() => ({ - theme: t, - setTheme: r - }), [t, r]); -} -a(ls, "useTheme"); -const Ue = "theme"; -function is(_ref84) { - let { - defaultSizeRelation: e = as, - direction: t, - initiallyHidden: n, - onHiddenElementChange: r, - sizeThresholdFirst: o = 100, - sizeThresholdSecond: c = 100, - storageKey: i - } = _ref84; - const d = re(), - g = l.useMemo(() => ue(500, L => { - i && (d == null || d.set(i, L)); - }), [d, i]), - [m, p] = l.useState(() => { - const L = i && (d == null ? void 0 : d.get(i)); - return L === ke || n === "first" ? "first" : L === Ne || n === "second" ? "second" : null; - }), - y = l.useCallback(L => { - L !== m && (p(L), r == null || r(L)); - }, [m, r]), - h = l.useRef(null), - x = l.useRef(null), - f = l.useRef(null), - C = l.useRef(`${e}`); - l.useLayoutEffect(() => { - const L = i && (d == null ? void 0 : d.get(i)) || C.current; - h.current && (h.current.style.display = "flex", h.current.style.flex = L === ke || L === Ne ? C.current : L), f.current && (f.current.style.display = "flex", f.current.style.flex = "1"), x.current && (x.current.style.display = "flex"); - }, [t, d, i]); - const E = l.useCallback(L => { - const b = L === "first" ? h.current : f.current; - if (b && (b.style.left = "-1000px", b.style.position = "absolute", b.style.opacity = "0", b.style.height = "500px", b.style.width = "500px", h.current)) { - const w = parseFloat(h.current.style.flex); - (!Number.isFinite(w) || w < 1) && (h.current.style.flex = "1"); } - }, []), - k = l.useCallback(L => { - const b = L === "first" ? h.current : f.current; - if (b && (b.style.width = "", b.style.height = "", b.style.opacity = "", b.style.position = "", b.style.left = "", d && i)) { - const w = d.get(i); - h.current && w !== ke && w !== Ne && (h.current.style.flex = w || C.current); - } - }, [d, i]); - return l.useLayoutEffect(() => { - m === "first" ? E("first") : k("first"), m === "second" ? E("second") : k("second"); - }, [m, E, k]), l.useEffect(() => { - if (!x.current || !h.current || !f.current) return; - const L = x.current, - b = h.current, - w = b.parentElement, - T = t === "horizontal" ? "clientX" : "clientY", - A = t === "horizontal" ? "left" : "top", - F = t === "horizontal" ? "right" : "bottom", - I = t === "horizontal" ? "clientWidth" : "clientHeight"; - function H(D) { - D.preventDefault(); - const q = D[T] - L.getBoundingClientRect()[A]; - function N(S) { - if (S.buttons === 0) return P(); - const W = S[T] - w.getBoundingClientRect()[A] - q, - v = w.getBoundingClientRect()[F] - S[T] + q - L[I]; - if (W < o) y("first"), g(ke);else if (v < c) y("second"), g(Ne);else { - y(null); - const j = `${W / v}`; - b.style.flex = j, g(j); - } - } - a(N, "handleMouseMove"); - function P() { - document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", P); - } - a(P, "handleMouseUp"), document.addEventListener("mousemove", N), document.addEventListener("mouseup", P); - } - a(H, "handleMouseDown"), L.addEventListener("mousedown", H); - function O() { - h.current && (h.current.style.flex = C.current), g(C.current), y(null); - } - return a(O, "reset"), L.addEventListener("dblclick", O), () => { - L.removeEventListener("mousedown", H), L.removeEventListener("dblclick", O); - }; - }, [t, y, o, c, g]), l.useMemo(() => ({ - dragBarRef: x, - hiddenElement: m, - firstRef: h, - setHiddenElement: p, - secondRef: f - }), [m, p]); -} -a(is, "useDragResize"); -const as = 1, - ke = "hide-first", - Ne = "hide-second"; -const kn = l.forwardRef((_ref85, r) => { - let { - label: e, - onClick: t, - ...n - } = _ref85; - const [o, c] = l.useState(null), - i = l.useCallback(d => { - try { - t == null || t(d), c(null); - } catch (g) { - c(g instanceof Error ? g : new Error(`Toolbar button click failed: ${g}`)); - } - }, [t]); - return s.jsx(K, { - label: e, - children: s.jsx($, { - ...n, - ref: r, - type: "button", - className: _.clsx("graphiql-toolbar-button", o && "error", n.className), - onClick: i, - "aria-label": o ? o.message : e, - "aria-invalid": o ? "true" : n["aria-invalid"] - }) - }); -}); -kn.displayName = "ToolbarButton"; -function tt() { - const { - queryEditor: e, - setOperationName: t - } = Z({ - nonNull: !0, - caller: tt - }), - { - isFetching: n, - isSubscribed: r, - operationName: o, - run: c, - stop: i - } = we({ - nonNull: !0, - caller: tt - }), - d = (e == null ? void 0 : e.operations) || [], - g = d.length > 1 && typeof o != "string", - m = n || r, - p = `${m ? "Stop" : "Execute"} query (Ctrl-Enter)`, - y = { - type: "button", - className: "graphiql-execute-button", - children: m ? s.jsx(Qt, {}) : s.jsx(_t, {}), - "aria-label": p - }; - return g && !m ? s.jsxs(X, { - children: [s.jsx(K, { - label: p, - children: s.jsx(X.Button, { - ...y - }) - }), s.jsx(X.Content, { - children: d.map((h, x) => { - const f = h.name ? h.name.value : ``; - return s.jsx(X.Item, { - onSelect: () => { - var E; - const C = (E = h.name) == null ? void 0 : E.value; - e && C && C !== e.operationName && t(C), c(); - }, - children: f - }, `${f}-${x}`); - }) - })] - }) : s.jsx(K, { - label: p, - children: s.jsx("button", { - ...y, - onClick: () => { - m ? i() : c(); + } + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); } - }) - }); -} -a(tt, "ExecuteButton"); -const cs = a(_ref86 => { - let { - button: e, - children: t, - label: n, - ...r - } = _ref86; - return s.jsxs(X, { - ...r, - children: [s.jsx(K, { - label: n, - children: s.jsx(X.Button, { - className: _.clsx("graphiql-un-styled graphiql-toolbar-menu", r.className), - "aria-label": n, - children: e - }) - }), s.jsx(X.Content, { - children: t - })] - }); - }, "ToolbarMenuRoot"), - us = ye(cs, { - Item: X.Item - }); -exports.Argument = Ce; -exports.ArgumentIcon = Tt; -exports.Button = me; -exports.ButtonGroup = Ut; -exports.ChevronDownIcon = dr; -exports.ChevronLeftIcon = Mt; -exports.ChevronUpIcon = hr; -exports.CloseIcon = Oe; -exports.CopyIcon = mr; -exports.DOC_EXPLORER_PLUGIN = de; -exports.DefaultValue = it; -exports.DeprecatedArgumentIcon = Pt; -exports.DeprecatedEnumValueIcon = qt; -exports.DeprecatedFieldIcon = Rt; -exports.DeprecationReason = ht; -exports.Dialog = yr; -exports.DialogRoot = Jt; -exports.Directive = cn; -exports.DirectiveIcon = Vt; -exports.DocExplorer = Ve; -exports.DocsFilledIcon = It; -exports.DocsIcon = Ht; -exports.DropdownMenu = X; -exports.EditorContext = Ct; -exports.EditorContextProvider = En; -exports.EnumValueIcon = Dt; -exports.ExecuteButton = tt; -exports.ExecutionContext = lt; -exports.ExecutionContextProvider = qe; -exports.ExplorerContext = ut; -exports.ExplorerContextProvider = dt; -exports.ExplorerSection = G; -exports.FieldDocumentation = un; -exports.FieldIcon = At; -exports.FieldLink = hn; -exports.GraphiQLProvider = os; -exports.HISTORY_PLUGIN = Ye; -exports.HeaderEditor = Xe; -exports.History = on; -exports.HistoryContext = ot; -exports.HistoryContextProvider = sn; -exports.HistoryIcon = Ot; -exports.ImagePreview = De; -exports.ImplementsIcon = Ft; -exports.KeyboardShortcutIcon = fr; -exports.MagnifyingGlassIcon = Bt; -exports.MarkdownContent = z; -exports.MergeIcon = pr; -exports.PenIcon = Wt; -exports.PlayIcon = _t; -exports.PluginContext = ft; -exports.PluginContextProvider = fn; -exports.PlusIcon = gr; -exports.PrettifyIcon = xr; -exports.QueryEditor = Ln; -exports.ReloadIcon = Cr; -exports.ResponseEditor = jn; -exports.RootTypeIcon = Zt; -exports.SchemaContext = at; -exports.SchemaContextProvider = ct; -exports.SchemaDocumentation = dn; -exports.Search = mt; -exports.SettingsIcon = vr; -exports.Spinner = st; -exports.StarFilledIcon = Gt; -exports.StarIcon = $t; -exports.StopIcon = Qt; -exports.StorageContext = rt; -exports.StorageContextProvider = Nt; -exports.Tab = Er; -exports.Tabs = rn; -exports.ToolbarButton = kn; -exports.ToolbarMenu = us; -exports.Tooltip = K; -exports.TooltipRoot = Xt; -exports.TrashIcon = zt; -exports.TypeDocumentation = mn; -exports.TypeIcon = ge; -exports.TypeLink = Q; -exports.UnStyledButton = $; -exports.VariableEditor = et; -exports.useAutoCompleteLeafs = Ie; -exports.useCopyQuery = pt; -exports.useDragResize = is; -exports.useEditorContext = Z; -exports.useEditorState = Ge; -exports.useExecutionContext = we; -exports.useExplorerContext = ee; -exports.useHeaderEditor = ce; -exports.useHeadersEditorState = Or; -exports.useHistoryContext = be; -exports.useMergeQuery = he; -exports.useOperationsEditorState = Dr; -exports.useOptimisticState = Fr; -exports.usePluginContext = _e; -exports.usePrettifyEditors = Se; -exports.useQueryEditor = te; -exports.useResponseEditor = Ae; -exports.useSchemaContext = Y; -exports.useStorageContext = re; -exports.useTheme = ls; -exports.useVariableEditor = se; -exports.useVariablesEditorState = Ar; - -/***/ }), - -/***/ "../../graphiql-react/dist/info-addon.cjs.js": -/*!***************************************************!*\ - !*** ../../graphiql-react/dist/info-addon.cjs.js ***! - \***************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -var M = Object.defineProperty; -var i = (e, t) => M(e, "name", { - value: t, - configurable: !0 -}); -const r = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -r.CodeMirror.defineOption("info", !1, (e, t, n) => { - if (n && n !== r.CodeMirror.Init) { - const o = e.state.info.onMouseOver; - r.CodeMirror.off(e.getWrapperElement(), "mouseover", o), clearTimeout(e.state.info.hoverTimeout), delete e.state.info; - } - if (t) { - const o = e.state.info = g(t); - o.onMouseOver = h.bind(null, e), r.CodeMirror.on(e.getWrapperElement(), "mouseover", o.onMouseOver); - } -}); -function g(e) { - return { - options: e instanceof Function ? { - render: e - } : e === !0 ? {} : e - }; -} -i(g, "createState"); -function T(e) { - const { - options: t - } = e.state.info; - return (t == null ? void 0 : t.hoverTime) || 500; -} -i(T, "getHoverTime"); -function h(e, t) { - const n = e.state.info, - o = t.target || t.srcElement; - if (!(o instanceof HTMLElement) || o.nodeName !== "SPAN" || n.hoverTimeout !== void 0) return; - const s = o.getBoundingClientRect(), - u = i(function () { - clearTimeout(n.hoverTimeout), n.hoverTimeout = setTimeout(p, d); - }, "onMouseMove"), - f = i(function () { - r.CodeMirror.off(document, "mousemove", u), r.CodeMirror.off(e.getWrapperElement(), "mouseout", f), clearTimeout(n.hoverTimeout), n.hoverTimeout = void 0; - }, "onMouseOut"), - p = i(function () { - r.CodeMirror.off(document, "mousemove", u), r.CodeMirror.off(e.getWrapperElement(), "mouseout", f), n.hoverTimeout = void 0, C(e, s); - }, "onHover"), - d = T(e); - n.hoverTimeout = setTimeout(p, d), r.CodeMirror.on(document, "mousemove", u), r.CodeMirror.on(e.getWrapperElement(), "mouseout", f); -} -i(h, "onMouseOver"); -function C(e, t) { - const n = e.coordsChar({ - left: (t.left + t.right) / 2, - top: (t.top + t.bottom) / 2 - }, "window"), - o = e.state.info, - { - options: s - } = o, - u = s.render || e.getHelper(n, "info"); - if (u) { - const f = e.getTokenAt(n, !0); - if (f) { - const p = u(f, s, e, n); - p && w(e, t, p); - } - } -} -i(C, "onMouseHover"); -function w(e, t, n) { - const o = document.createElement("div"); - o.className = "CodeMirror-info", o.append(n), document.body.append(o); - const s = o.getBoundingClientRect(), - u = window.getComputedStyle(o), - f = s.right - s.left + parseFloat(u.marginLeft) + parseFloat(u.marginRight), - p = s.bottom - s.top + parseFloat(u.marginTop) + parseFloat(u.marginBottom); - let d = t.bottom; - p > window.innerHeight - t.bottom - 15 && t.top > window.innerHeight - t.bottom && (d = t.top - p), d < 0 && (d = t.bottom); - let m = Math.max(0, window.innerWidth - f - 15); - m > t.left && (m = t.left), o.style.opacity = "1", o.style.top = d + "px", o.style.left = m + "px"; - let l; - const c = i(function () { - clearTimeout(l); - }, "onMouseOverPopup"), - a = i(function () { - clearTimeout(l), l = setTimeout(v, 200); - }, "onMouseOut"), - v = i(function () { - r.CodeMirror.off(o, "mouseover", c), r.CodeMirror.off(o, "mouseout", a), r.CodeMirror.off(e.getWrapperElement(), "mouseout", a), o.style.opacity ? (o.style.opacity = "0", setTimeout(() => { - o.parentNode && o.remove(); - }, 600)) : o.parentNode && o.remove(); - }, "hidePopup"); - r.CodeMirror.on(o, "mouseover", c), r.CodeMirror.on(o, "mouseout", a), r.CodeMirror.on(e.getWrapperElement(), "mouseout", a); -} -i(w, "showPopup"); - -/***/ }), - -/***/ "../../graphiql-react/dist/info.cjs.js": -/*!*********************************************!*\ - !*** ../../graphiql-react/dist/info.cjs.js ***! - \*********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -var v = Object.defineProperty; -var l = (a, e) => v(a, "name", { - value: e, - configurable: !0 -}); -const s = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"), - D = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - m = __webpack_require__(/*! ./SchemaReference.cjs.js */ "../../graphiql-react/dist/SchemaReference.cjs.js"); -__webpack_require__(/*! ./info-addon.cjs.js */ "../../graphiql-react/dist/info-addon.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -__webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js"); -D.CodeMirror.registerHelper("info", "graphql", (a, e) => { - if (!e.schema || !a.state) return; - const { - kind: c, - step: n - } = a.state, - r = m.getTypeInfo(e.schema, a.state); - if (c === "Field" && n === 0 && r.fieldDef || c === "AliasedField" && n === 2 && r.fieldDef) { - const i = document.createElement("div"); - i.className = "CodeMirror-info-header", E(i, r, e); - const d = document.createElement("div"); - return d.append(i), o(d, e, r.fieldDef), d; - } - if (c === "Directive" && n === 1 && r.directiveDef) { - const i = document.createElement("div"); - i.className = "CodeMirror-info-header", h(i, r, e); - const d = document.createElement("div"); - return d.append(i), o(d, e, r.directiveDef), d; - } - if (c === "Argument" && n === 0 && r.argDef) { - const i = document.createElement("div"); - i.className = "CodeMirror-info-header", T(i, r, e); - const d = document.createElement("div"); - return d.append(i), o(d, e, r.argDef), d; - } - if (c === "EnumValue" && r.enumValue && r.enumValue.description) { - const i = document.createElement("div"); - i.className = "CodeMirror-info-header", g(i, r, e); - const d = document.createElement("div"); - return d.append(i), o(d, e, r.enumValue), d; - } - if (c === "NamedType" && r.type && r.type.description) { - const i = document.createElement("div"); - i.className = "CodeMirror-info-header", u(i, r, e, r.type); - const d = document.createElement("div"); - return d.append(i), o(d, e, r.type), d; - } -}); -function E(a, e, c) { - N(a, e, c), p(a, e, c, e.type); -} -l(E, "renderField"); -function N(a, e, c) { - var n; - const r = ((n = e.fieldDef) === null || n === void 0 ? void 0 : n.name) || ""; - t(a, r, "field-name", c, m.getFieldReference(e)); -} -l(N, "renderQualifiedField"); -function h(a, e, c) { - var n; - const r = "@" + (((n = e.directiveDef) === null || n === void 0 ? void 0 : n.name) || ""); - t(a, r, "directive-name", c, m.getDirectiveReference(e)); -} -l(h, "renderDirective"); -function T(a, e, c) { - var n; - const r = ((n = e.argDef) === null || n === void 0 ? void 0 : n.name) || ""; - t(a, r, "arg-name", c, m.getArgumentReference(e)), p(a, e, c, e.inputType); -} -l(T, "renderArg"); -function g(a, e, c) { - var n; - const r = ((n = e.enumValue) === null || n === void 0 ? void 0 : n.name) || ""; - u(a, e, c, e.inputType), t(a, "."), t(a, r, "enum-value", c, m.getEnumValueReference(e)); -} -l(g, "renderEnumValue"); -function p(a, e, c, n) { - const r = document.createElement("span"); - r.className = "type-name-pill", n instanceof s.GraphQLNonNull ? (u(r, e, c, n.ofType), t(r, "!")) : n instanceof s.GraphQLList ? (t(r, "["), u(r, e, c, n.ofType), t(r, "]")) : t(r, (n == null ? void 0 : n.name) || "", "type-name", c, m.getTypeReference(e, n)), a.append(r); -} -l(p, "renderTypeAnnotation"); -function u(a, e, c, n) { - n instanceof s.GraphQLNonNull ? (u(a, e, c, n.ofType), t(a, "!")) : n instanceof s.GraphQLList ? (t(a, "["), u(a, e, c, n.ofType), t(a, "]")) : t(a, (n == null ? void 0 : n.name) || "", "type-name", c, m.getTypeReference(e, n)); -} -l(u, "renderType"); -function o(a, e, c) { - const { - description: n - } = c; - if (n) { - const r = document.createElement("div"); - r.className = "info-description", e.renderDescription ? r.innerHTML = e.renderDescription(n) : r.append(document.createTextNode(n)), a.append(r); - } - L(a, e, c); -} -l(o, "renderDescription"); -function L(a, e, c) { - const n = c.deprecationReason; - if (n) { - const r = document.createElement("div"); - r.className = "info-deprecation", a.append(r); - const i = document.createElement("span"); - i.className = "info-deprecation-label", i.append(document.createTextNode("Deprecated")), r.append(i); - const d = document.createElement("div"); - d.className = "info-deprecation-reason", e.renderDescription ? d.innerHTML = e.renderDescription(n) : d.append(document.createTextNode(n)), r.append(d); - } -} -l(L, "renderDeprecation"); -function t(a, e) { - let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - let n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { - onClick: null - }; - let r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; - if (c) { - const { - onClick: i - } = n; - let d; - i ? (d = document.createElement("a"), d.href = "javascript:void 0", d.addEventListener("click", f => { - f.preventDefault(), i(r, f); - })) : d = document.createElement("span"), d.className = c, d.append(document.createTextNode(e)), a.append(d); - } else a.append(document.createTextNode(e)); -} -l(t, "text"); - -/***/ }), + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, instanceof check + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} props + * @param {*} key + * @param {string|object} ref + * @param {*} owner + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @internal + */ -/***/ "../../graphiql-react/dist/javascript.cjs.js": -/*!***************************************************!*\ - !*** ../../graphiql-react/dist/javascript.cjs.js ***! - \***************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. -var ve = Object.defineProperty; -var f = (F, W) => ve(F, "name", { - value: W, - configurable: !0 -}); -const Dr = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function ge(F, W) { - for (var w = 0; w < W.length; w++) { - const M = W[w]; - if (typeof M != "string" && !Array.isArray(M)) { - for (const h in M) if (h !== "default" && !(h in F)) { - const A = Object.getOwnPropertyDescriptor(M, h); - A && Object.defineProperty(F, h, A.get ? A : { - enumerable: !0, - get: () => M[h] + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } } - } - } - return Object.freeze(Object.defineProperty(F, Symbol.toStringTag, { - value: "Module" - })); -} -f(ge, "_mergeNamespaces"); -var ye = { - exports: {} -}; -(function (F, W) { - (function (w) { - w(Dr.requireCodemirror()); - })(function (w) { - w.defineMode("javascript", function (M, h) { - var A = M.indentUnit, - vr = h.statementIndent, - rr = h.jsonld, - O = h.json || rr, - gr = h.trackScope !== !1, - k = h.typescript, - er = h.wordCharacters || /[\w$\xa1-\uffff]/, - yr = function () { - function r(y) { - return { - type: y, - style: "keyword" - }; - } - f(r, "kw"); - var e = r("keyword a"), - t = r("keyword b"), - a = r("keyword c"), - o = r("keyword d"), - d = r("operator"), - p = { - type: "atom", - style: "atom" - }; - return { - if: r("if"), - while: e, - with: e, - else: t, - do: t, - try: t, - finally: t, - return: o, - break: o, - continue: o, - new: r("new"), - delete: a, - void: a, - throw: a, - debugger: r("debugger"), - var: r("var"), - const: r("var"), - let: r("var"), - function: r("function"), - catch: r("catch"), - for: r("for"), - switch: r("switch"), - case: r("case"), - default: r("default"), - in: d, - typeof: d, - instanceof: d, - true: p, - false: p, - null: p, - undefined: p, - NaN: p, - Infinity: p, - this: r("this"), - class: r("class"), - super: r("atom"), - yield: a, - export: r("export"), - import: r("import"), - extends: a, - await: a - }; - }(), - jr = /[+\-*&%=<>!?|~^@]/, - Lr = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; - function Qr(r) { - for (var e = !1, t, a = !1; (t = r.next()) != null;) { - if (!e) { - if (t == "/" && !a) return; - t == "[" ? a = !0 : a && t == "]" && (a = !1); - } - e = !e && t == "\\"; - } - } - f(Qr, "readRegexp"); - var K, nr; - function x(r, e, t) { - return K = r, nr = t, e; - } - f(x, "ret"); - function $(r, e) { - var t = r.next(); - if (t == '"' || t == "'") return e.tokenize = Rr(t), e.tokenize(r, e); - if (t == "." && r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) return x("number", "number"); - if (t == "." && r.match("..")) return x("spread", "meta"); - if (/[\[\]{}\(\),;\:\.]/.test(t)) return x(t); - if (t == "=" && r.eat(">")) return x("=>", "operator"); - if (t == "0" && r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) return x("number", "number"); - if (/\d/.test(t)) return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), x("number", "number"); - if (t == "/") return r.eat("*") ? (e.tokenize = tr, tr(r, e)) : r.eat("/") ? (r.skipToEnd(), x("comment", "comment")) : Fr(r, e, 1) ? (Qr(r), r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), x("regexp", "string-2")) : (r.eat("="), x("operator", "operator", r.current())); - if (t == "`") return e.tokenize = H, H(r, e); - if (t == "#" && r.peek() == "!") return r.skipToEnd(), x("meta", "meta"); - if (t == "#" && r.eatWhile(er)) return x("variable", "property"); - if (t == "<" && r.match("!--") || t == "-" && r.match("->") && !/\S/.test(r.string.slice(0, r.start))) return r.skipToEnd(), x("comment", "comment"); - if (jr.test(t)) return (t != ">" || !e.lexical || e.lexical.type != ">") && (r.eat("=") ? (t == "!" || t == "=") && r.eat("=") : /[<>*+\-|&?]/.test(t) && (r.eat(t), t == ">" && r.eat(t))), t == "?" && r.eat(".") ? x(".") : x("operator", "operator", r.current()); - if (er.test(t)) { - r.eatWhile(er); - var a = r.current(); - if (e.lastType != ".") { - if (yr.propertyIsEnumerable(a)) { - var o = yr[a]; - return x(o.type, o.style, a); - } - if (a == "async" && r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1)) return x("async", "keyword", a); + return element; + }; + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + function jsxDEV(type, config, maybeKey, source, self) { + { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; // Currently, key can be spread in as a prop. This causes a potential + // issue if key is also explicitly declared (ie.

+ // or
). We want to deprecate key spread, + // but as an intermediary step, we will use jsxDEV for everything except + //
, because we aren't currently able to tell if + // key is explicitly declared to be undefined or not. + + if (maybeKey !== undefined) { + { + checkKeyStringCoercion(maybeKey); } - return x("variable", "variable", a); + key = '' + maybeKey; } - } - f($, "tokenBase"); - function Rr(r) { - return function (e, t) { - var a = !1, - o; - if (rr && e.peek() == "@" && e.match(Lr)) return t.tokenize = $, x("jsonld-keyword", "meta"); - for (; (o = e.next()) != null && !(o == r && !a);) a = !a && o == "\\"; - return a || (t.tokenize = $), x("string", "string"); - }; - } - f(Rr, "tokenString"); - function tr(r, e) { - for (var t = !1, a; a = r.next();) { - if (a == "/" && t) { - e.tokenize = $; - break; + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); } - t = a == "*"; + key = '' + config.key; } - return x("comment", "comment"); - } - f(tr, "tokenComment"); - function H(r, e) { - for (var t = !1, a; (a = r.next()) != null;) { - if (!t && (a == "`" || a == "$" && r.eat("{"))) { - e.tokenize = $; - break; - } - t = !t && a == "\\"; - } - return x("quasi", "string-2", r.current()); - } - f(H, "tokenQuasi"); - var Ur = "([{}])"; - function dr(r, e) { - e.fatArrowAt && (e.fatArrowAt = null); - var t = r.string.indexOf("=>", r.start); - if (!(t < 0)) { - if (k) { - var a = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start, t)); - a && (t = a.index); + if (hasValidRef(config)) { + ref = config.ref; + warnIfStringRefCannotBeAutoConverted(config, self); + } // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; } - for (var o = 0, d = !1, p = t - 1; p >= 0; --p) { - var y = r.string.charAt(p), - V = Ur.indexOf(y); - if (V >= 0 && V < 3) { - if (!o) { - ++p; - break; - } - if (--o == 0) { - y == "(" && (d = !0); - break; - } - } else if (V >= 3 && V < 6) ++o;else if (er.test(y)) d = !0;else if (/["'\/`]/.test(y)) for (;; --p) { - if (p == 0) return; - var he = r.string.charAt(p - 1); - if (he == y && r.string.charAt(p - 2) != "\\") { - p--; - break; - } - } else if (d && !o) { - ++p; - break; + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; } } - d && !o && (e.fatArrowAt = p); - } - } - f(dr, "findFatArrow"); - var Wr = { - atom: !0, - number: !0, - variable: !0, - string: !0, - regexp: !0, - this: !0, - import: !0, - "jsonld-keyword": !0 - }; - function Er(r, e, t, a, o, d) { - this.indented = r, this.column = e, this.type = t, this.prev = o, this.info = d, a != null && (this.align = a); - } - f(Er, "JSLexical"); - function Kr(r, e) { - if (!gr) return !1; - for (var t = r.localVars; t; t = t.next) if (t.name == e) return !0; - for (var a = r.context; a; a = a.prev) for (var t = a.vars; t; t = t.next) if (t.name == e) return !0; - } - f(Kr, "inScope"); - function Tr(r, e, t, a, o) { - var d = r.cc; - for (i.state = r, i.stream = o, i.marked = null, i.cc = d, i.style = e, r.lexical.hasOwnProperty("align") || (r.lexical.align = !0);;) { - var p = d.length ? d.pop() : O ? b : v; - if (p(t, a)) { - for (; d.length && d[d.length - 1].lex;) d.pop()(); - return i.marked ? i.marked : t == "variable" && Kr(r, a) ? "variable-2" : e; - } } - } - f(Tr, "parseJS"); - var i = { - state: null, - column: null, - marked: null, - cc: null - }; - function s() { - for (var r = arguments.length - 1; r >= 0; r--) i.cc.push(arguments[r]); - } - f(s, "pass"); - function n() { - return s.apply(null, arguments), !0; - } - f(n, "cont"); - function mr(r, e) { - for (var t = e; t; t = t.next) if (t.name == r) return !0; - return !1; - } - f(mr, "inList"); - function D(r) { - var e = i.state; - if (i.marked = "def", !!gr) { - if (e.context) { - if (e.lexical.info == "var" && e.context && e.context.block) { - var t = Ar(r, e.context); - if (t != null) { - e.context = t; - return; - } - } else if (!mr(r, e.localVars)) { - e.localVars = new X(r, e.localVars); - return; - } - } - h.globalVars && !mr(r, e.globalVars) && (e.globalVars = new X(r, e.globalVars)); - } - } - f(D, "register"); - function Ar(r, e) { - if (e) { - if (e.block) { - var t = Ar(r, e.prev); - return t ? t == e.prev ? e : new G(t, e.vars, !0) : null; - } else return mr(r, e.vars) ? e : new G(e.prev, new X(r, e.vars), !1); - } else return null; - } - f(Ar, "registerVarScoped"); - function ir(r) { - return r == "public" || r == "private" || r == "protected" || r == "abstract" || r == "readonly"; - } - f(ir, "isModifier"); - function G(r, e, t) { - this.prev = r, this.vars = e, this.block = t; - } - f(G, "Context"); - function X(r, e) { - this.name = r, this.next = e; - } - f(X, "Var"); - var Hr = new X("this", new X("arguments", null)); - function q() { - i.state.context = new G(i.state.context, i.state.localVars, !1), i.state.localVars = Hr; - } - f(q, "pushcontext"); - function fr() { - i.state.context = new G(i.state.context, i.state.localVars, !0), i.state.localVars = null; - } - f(fr, "pushblockcontext"), q.lex = fr.lex = !0; - function E() { - i.state.localVars = i.state.context.vars, i.state.context = i.state.context.prev; - } - f(E, "popcontext"), E.lex = !0; - function c(r, e) { - var t = f(function () { - var a = i.state, - o = a.indented; - if (a.lexical.type == "stat") o = a.lexical.indented;else for (var d = a.lexical; d && d.type == ")" && d.align; d = d.prev) o = d.indented; - a.lexical = new Er(o, i.stream.column(), r, null, a.lexical, e); - }, "result"); - return t.lex = !0, t; - } - f(c, "pushlex"); - function u() { - var r = i.state; - r.lexical.prev && (r.lexical.type == ")" && (r.indented = r.lexical.indented), r.lexical = r.lexical.prev); - } - f(u, "poplex"), u.lex = !0; - function l(r) { - function e(t) { - return t == r ? n() : r == ";" || t == "}" || t == ")" || t == "]" ? s() : n(e); - } - return f(e, "exp"), e; - } - f(l, "expect"); - function v(r, e) { - return r == "var" ? n(c("vardef", e), xr, l(";"), u) : r == "keyword a" ? n(c("form"), pr, v, u) : r == "keyword b" ? n(c("form"), v, u) : r == "keyword d" ? i.stream.match(/^\s*$/, !1) ? n() : n(c("stat"), J, l(";"), u) : r == "debugger" ? n(l(";")) : r == "{" ? n(c("}"), fr, or, u, E) : r == ";" ? n() : r == "if" ? (i.state.lexical.info == "else" && i.state.cc[i.state.cc.length - 1] == u && i.state.cc.pop()(), n(c("form"), pr, v, u, Mr)) : r == "function" ? n(z) : r == "for" ? n(c("form"), fr, Or, v, E, u) : r == "class" || k && e == "interface" ? (i.marked = "keyword", n(c("form", r == "class" ? r : e), qr, u)) : r == "variable" ? k && e == "declare" ? (i.marked = "keyword", n(v)) : k && (e == "module" || e == "enum" || e == "type") && i.stream.match(/^\s*\w/, !1) ? (i.marked = "keyword", e == "enum" ? n(Pr) : e == "type" ? n($r, l("operator"), m, l(";")) : n(c("form"), T, l("{"), c("}"), or, u, u)) : k && e == "namespace" ? (i.marked = "keyword", n(c("form"), b, v, u)) : k && e == "abstract" ? (i.marked = "keyword", n(v)) : n(c("stat"), re) : r == "switch" ? n(c("form"), pr, l("{"), c("}", "switch"), fr, or, u, u, E) : r == "case" ? n(b, l(":")) : r == "default" ? n(l(":")) : r == "catch" ? n(c("form"), q, Gr, v, u, E) : r == "export" ? n(c("stat"), me, u) : r == "import" ? n(c("stat"), pe, u) : r == "async" ? n(v) : e == "@" ? n(b, v) : s(c("stat"), b, l(";"), u); - } - f(v, "statement"); - function Gr(r) { - if (r == "(") return n(P, l(")")); - } - f(Gr, "maybeCatchBinding"); - function b(r, e) { - return Vr(r, e, !1); - } - f(b, "expression"); - function j(r, e) { - return Vr(r, e, !0); - } - f(j, "expressionNoComma"); - function pr(r) { - return r != "(" ? s() : n(c(")"), J, l(")"), u); - } - f(pr, "parenExpr"); - function Vr(r, e, t) { - if (i.state.fatArrowAt == i.stream.start) { - var a = t ? Sr : Ir; - if (r == "(") return n(q, c(")"), g(P, ")"), u, l("=>"), a, E); - if (r == "variable") return s(q, T, l("=>"), a, E); - } - var o = t ? L : N; - return Wr.hasOwnProperty(r) ? n(o) : r == "function" ? n(z, o) : r == "class" || k && e == "interface" ? (i.marked = "keyword", n(c("form"), de, u)) : r == "keyword c" || r == "async" ? n(t ? j : b) : r == "(" ? n(c(")"), J, l(")"), u, o) : r == "operator" || r == "spread" ? n(t ? j : b) : r == "[" ? n(c("]"), be, u, o) : r == "{" ? Y(ur, "}", null, o) : r == "quasi" ? s(ar, o) : r == "new" ? n(Yr(t)) : n(); - } - f(Vr, "expressionInner"); - function J(r) { - return r.match(/[;\}\)\],]/) ? s() : s(b); - } - f(J, "maybeexpression"); - function N(r, e) { - return r == "," ? n(J) : L(r, e, !1); - } - f(N, "maybeoperatorComma"); - function L(r, e, t) { - var a = t == !1 ? N : L, - o = t == !1 ? b : j; - if (r == "=>") return n(q, t ? Sr : Ir, E); - if (r == "operator") return /\+\+|--/.test(e) || k && e == "!" ? n(a) : k && e == "<" && i.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) ? n(c(">"), g(m, ">"), u, a) : e == "?" ? n(b, l(":"), o) : n(o); - if (r == "quasi") return s(ar, a); - if (r != ";") { - if (r == "(") return Y(j, ")", "call", a); - if (r == ".") return n(ee, a); - if (r == "[") return n(c("]"), J, l("]"), u, a); - if (k && e == "as") return i.marked = "keyword", n(m, a); - if (r == "regexp") return i.state.lastType = i.marked = "operator", i.stream.backUp(i.stream.pos - i.stream.start - 1), n(o); - } - } - f(L, "maybeoperatorNoComma"); - function ar(r, e) { - return r != "quasi" ? s() : e.slice(e.length - 2) != "${" ? n(ar) : n(J, Xr); - } - f(ar, "quasi"); - function Xr(r) { - if (r == "}") return i.marked = "string-2", i.state.tokenize = H, n(ar); - } - f(Xr, "continueQuasi"); - function Ir(r) { - return dr(i.stream, i.state), s(r == "{" ? v : b); - } - f(Ir, "arrowBody"); - function Sr(r) { - return dr(i.stream, i.state), s(r == "{" ? v : j); - } - f(Sr, "arrowBodyNoComma"); - function Yr(r) { - return function (e) { - return e == "." ? n(r ? Cr : Zr) : e == "variable" && k ? n(ue, r ? L : N) : s(r ? j : b); - }; - } - f(Yr, "maybeTarget"); - function Zr(r, e) { - if (e == "target") return i.marked = "keyword", n(N); - } - f(Zr, "target"); - function Cr(r, e) { - if (e == "target") return i.marked = "keyword", n(L); - } - f(Cr, "targetNoComma"); - function re(r) { - return r == ":" ? n(u, v) : s(N, l(";"), u); - } - f(re, "maybelabel"); - function ee(r) { - if (r == "variable") return i.marked = "property", n(); - } - f(ee, "property"); - function ur(r, e) { - if (r == "async") return i.marked = "property", n(ur); - if (r == "variable" || i.style == "keyword") { - if (i.marked = "property", e == "get" || e == "set") return n(ne); - var t; - return k && i.state.fatArrowAt == i.stream.start && (t = i.stream.match(/^\s*:\s*/, !1)) && (i.state.fatArrowAt = i.stream.pos + t[0].length), n(B); - } else { - if (r == "number" || r == "string") return i.marked = rr ? "property" : i.style + " property", n(B); - if (r == "jsonld-keyword") return n(B); - if (k && ir(e)) return i.marked = "keyword", n(ur); - if (r == "[") return n(b, Q, l("]"), B); - if (r == "spread") return n(j, B); - if (e == "*") return i.marked = "keyword", n(ur); - if (r == ":") return s(B); - } - } - f(ur, "objprop"); - function ne(r) { - return r != "variable" ? s(B) : (i.marked = "property", n(z)); - } - f(ne, "getterSetter"); - function B(r) { - if (r == ":") return n(j); - if (r == "(") return s(z); - } - f(B, "afterprop"); - function g(r, e, t) { - function a(o, d) { - if (t ? t.indexOf(o) > -1 : o == ",") { - var p = i.state.lexical; - return p.info == "call" && (p.pos = (p.pos || 0) + 1), n(function (y, V) { - return y == e || V == e ? s() : s(r); - }, a); + if (key || ref) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); } - return o == e || d == e ? n() : t && t.indexOf(";") > -1 ? s(r) : n(l(e)); - } - return f(a, "proceed"), function (o, d) { - return o == e || d == e ? n() : s(r, a); - }; - } - f(g, "commasep"); - function Y(r, e, t) { - for (var a = 3; a < arguments.length; a++) i.cc.push(arguments[a]); - return n(c(e, t), g(r, e), u); - } - f(Y, "contCommasep"); - function or(r) { - return r == "}" ? n() : s(v, or); - } - f(or, "block"); - function Q(r, e) { - if (k) { - if (r == ":") return n(m); - if (e == "?") return n(Q); - } - } - f(Q, "maybetype"); - function te(r, e) { - if (k && (r == ":" || e == "in")) return n(m); - } - f(te, "maybetypeOrIn"); - function _r(r) { - if (k && r == ":") return i.stream.match(/^\s*\w+\s+is\b/, !1) ? n(b, ie, m) : n(m); - } - f(_r, "mayberettype"); - function ie(r, e) { - if (e == "is") return i.marked = "keyword", n(); - } - f(ie, "isKW"); - function m(r, e) { - if (e == "keyof" || e == "typeof" || e == "infer" || e == "readonly") return i.marked = "keyword", n(e == "typeof" ? j : m); - if (r == "variable" || e == "void") return i.marked = "type", n(I); - if (e == "|" || e == "&") return n(m); - if (r == "string" || r == "number" || r == "atom") return n(I); - if (r == "[") return n(c("]"), g(m, "]", ","), u, I); - if (r == "{") return n(c("}"), kr, u, I); - if (r == "(") return n(g(wr, ")"), fe, I); - if (r == "<") return n(g(m, ">"), m); - if (r == "quasi") return s(br, I); - } - f(m, "typeexpr"); - function fe(r) { - if (r == "=>") return n(m); - } - f(fe, "maybeReturnType"); - function kr(r) { - return r.match(/[\}\)\]]/) ? n() : r == "," || r == ";" ? n(kr) : s(Z, kr); - } - f(kr, "typeprops"); - function Z(r, e) { - if (r == "variable" || i.style == "keyword") return i.marked = "property", n(Z); - if (e == "?" || r == "number" || r == "string") return n(Z); - if (r == ":") return n(m); - if (r == "[") return n(l("variable"), te, l("]"), Z); - if (r == "(") return s(U, Z); - if (!r.match(/[;\}\)\],]/)) return n(); - } - f(Z, "typeprop"); - function br(r, e) { - return r != "quasi" ? s() : e.slice(e.length - 2) != "${" ? n(br) : n(m, ae); - } - f(br, "quasiType"); - function ae(r) { - if (r == "}") return i.marked = "string-2", i.state.tokenize = H, n(br); - } - f(ae, "continueQuasiType"); - function wr(r, e) { - return r == "variable" && i.stream.match(/^\s*[?:]/, !1) || e == "?" ? n(wr) : r == ":" ? n(m) : r == "spread" ? n(wr) : s(m); - } - f(wr, "typearg"); - function I(r, e) { - if (e == "<") return n(c(">"), g(m, ">"), u, I); - if (e == "|" || r == "." || e == "&") return n(m); - if (r == "[") return n(m, l("]"), I); - if (e == "extends" || e == "implements") return i.marked = "keyword", n(m); - if (e == "?") return n(m, l(":"), m); - } - f(I, "afterType"); - function ue(r, e) { - if (e == "<") return n(c(">"), g(m, ">"), u, I); - } - f(ue, "maybeTypeArgs"); - function sr() { - return s(m, oe); - } - f(sr, "typeparam"); - function oe(r, e) { - if (e == "=") return n(m); - } - f(oe, "maybeTypeDefault"); - function xr(r, e) { - return e == "enum" ? (i.marked = "keyword", n(Pr)) : s(T, Q, _, ce); - } - f(xr, "vardef"); - function T(r, e) { - if (k && ir(e)) return i.marked = "keyword", n(T); - if (r == "variable") return D(e), n(); - if (r == "spread") return n(T); - if (r == "[") return Y(se, "]"); - if (r == "{") return Y(zr, "}"); - } - f(T, "pattern"); - function zr(r, e) { - return r == "variable" && !i.stream.match(/^\s*:/, !1) ? (D(e), n(_)) : (r == "variable" && (i.marked = "property"), r == "spread" ? n(T) : r == "}" ? s() : r == "[" ? n(b, l("]"), l(":"), zr) : n(l(":"), T, _)); - } - f(zr, "proppattern"); - function se() { - return s(T, _); - } - f(se, "eltpattern"); - function _(r, e) { - if (e == "=") return n(j); - } - f(_, "maybeAssign"); - function ce(r) { - if (r == ",") return n(xr); - } - f(ce, "vardefCont"); - function Mr(r, e) { - if (r == "keyword b" && e == "else") return n(c("form", "else"), v, u); - } - f(Mr, "maybeelse"); - function Or(r, e) { - if (e == "await") return n(Or); - if (r == "(") return n(c(")"), le, u); - } - f(Or, "forspec"); - function le(r) { - return r == "var" ? n(xr, R) : r == "variable" ? n(R) : s(R); - } - f(le, "forspec1"); - function R(r, e) { - return r == ")" ? n() : r == ";" ? n(R) : e == "in" || e == "of" ? (i.marked = "keyword", n(b, R)) : s(b, R); - } - f(R, "forspec2"); - function z(r, e) { - if (e == "*") return i.marked = "keyword", n(z); - if (r == "variable") return D(e), n(z); - if (r == "(") return n(q, c(")"), g(P, ")"), u, _r, v, E); - if (k && e == "<") return n(c(">"), g(sr, ">"), u, z); - } - f(z, "functiondef"); - function U(r, e) { - if (e == "*") return i.marked = "keyword", n(U); - if (r == "variable") return D(e), n(U); - if (r == "(") return n(q, c(")"), g(P, ")"), u, _r, E); - if (k && e == "<") return n(c(">"), g(sr, ">"), u, U); - } - f(U, "functiondecl"); - function $r(r, e) { - if (r == "keyword" || r == "variable") return i.marked = "type", n($r); - if (e == "<") return n(c(">"), g(sr, ">"), u); - } - f($r, "typename"); - function P(r, e) { - return e == "@" && n(b, P), r == "spread" ? n(P) : k && ir(e) ? (i.marked = "keyword", n(P)) : k && r == "this" ? n(Q, _) : s(T, Q, _); - } - f(P, "funarg"); - function de(r, e) { - return r == "variable" ? qr(r, e) : cr(r, e); - } - f(de, "classExpression"); - function qr(r, e) { - if (r == "variable") return D(e), n(cr); - } - f(qr, "className"); - function cr(r, e) { - if (e == "<") return n(c(">"), g(sr, ">"), u, cr); - if (e == "extends" || e == "implements" || k && r == ",") return e == "implements" && (i.marked = "keyword"), n(k ? m : b, cr); - if (r == "{") return n(c("}"), S, u); - } - f(cr, "classNameAfter"); - function S(r, e) { - if (r == "async" || r == "variable" && (e == "static" || e == "get" || e == "set" || k && ir(e)) && i.stream.match(/^\s+[\w$\xa1-\uffff]/, !1)) return i.marked = "keyword", n(S); - if (r == "variable" || i.style == "keyword") return i.marked = "property", n(C, S); - if (r == "number" || r == "string") return n(C, S); - if (r == "[") return n(b, Q, l("]"), C, S); - if (e == "*") return i.marked = "keyword", n(S); - if (k && r == "(") return s(U, S); - if (r == ";" || r == ",") return n(S); - if (r == "}") return n(); - if (e == "@") return n(b, S); - } - f(S, "classBody"); - function C(r, e) { - if (e == "!" || e == "?") return n(C); - if (r == ":") return n(m, _); - if (e == "=") return n(j); - var t = i.state.lexical.prev, - a = t && t.info == "interface"; - return s(a ? U : z); - } - f(C, "classfield"); - function me(r, e) { - return e == "*" ? (i.marked = "keyword", n(hr, l(";"))) : e == "default" ? (i.marked = "keyword", n(b, l(";"))) : r == "{" ? n(g(Nr, "}"), hr, l(";")) : s(v); - } - f(me, "afterExport"); - function Nr(r, e) { - if (e == "as") return i.marked = "keyword", n(l("variable")); - if (r == "variable") return s(j, Nr); - } - f(Nr, "exportField"); - function pe(r) { - return r == "string" ? n() : r == "(" ? s(b) : r == "." ? s(N) : s(lr, Br, hr); - } - f(pe, "afterImport"); - function lr(r, e) { - return r == "{" ? Y(lr, "}") : (r == "variable" && D(e), e == "*" && (i.marked = "keyword"), n(ke)); - } - f(lr, "importSpec"); - function Br(r) { - if (r == ",") return n(lr, Br); - } - f(Br, "maybeMoreImports"); - function ke(r, e) { - if (e == "as") return i.marked = "keyword", n(lr); - } - f(ke, "maybeAs"); - function hr(r, e) { - if (e == "from") return i.marked = "keyword", n(b); - } - f(hr, "maybeFrom"); - function be(r) { - return r == "]" ? n() : s(g(j, "]")); - } - f(be, "arrayLiteral"); - function Pr() { - return s(c("form"), T, l("{"), c("}"), g(we, "}"), u, u); - } - f(Pr, "enumdef"); - function we() { - return s(T, _); - } - f(we, "enummember"); - function xe(r, e) { - return r.lastType == "operator" || r.lastType == "," || jr.test(e.charAt(0)) || /[,.]/.test(e.charAt(0)); - } - f(xe, "isContinuedStatement"); - function Fr(r, e, t) { - return e.tokenize == $ && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType) || e.lastType == "quasi" && /\{\s*$/.test(r.string.slice(0, r.pos - (t || 0))); - } - return f(Fr, "expressionAllowed"), { - startState: function (r) { - var e = { - tokenize: $, - lastType: "sof", - cc: [], - lexical: new Er((r || 0) - A, 0, "block", !1), - localVars: h.localVars, - context: h.localVars && new G(null, null, !1), - indented: r || 0 - }; - return h.globalVars && typeof h.globalVars == "object" && (e.globalVars = h.globalVars), e; - }, - token: function (r, e) { - if (r.sol() && (e.lexical.hasOwnProperty("align") || (e.lexical.align = !1), e.indented = r.indentation(), dr(r, e)), e.tokenize != tr && r.eatSpace()) return null; - var t = e.tokenize(r, e); - return K == "comment" ? t : (e.lastType = K == "operator" && (nr == "++" || nr == "--") ? "incdec" : K, Tr(e, t, K, nr, r)); - }, - indent: function (r, e) { - if (r.tokenize == tr || r.tokenize == H) return w.Pass; - if (r.tokenize != $) return 0; - var t = e && e.charAt(0), - a = r.lexical, - o; - if (!/^\s*else\b/.test(e)) for (var d = r.cc.length - 1; d >= 0; --d) { - var p = r.cc[d]; - if (p == u) a = a.prev;else if (p != Mr && p != E) break; + if (ref) { + defineRefPropWarningGetter(props, displayName); } - for (; (a.type == "stat" || a.type == "form") && (t == "}" || (o = r.cc[r.cc.length - 1]) && (o == N || o == L) && !/^[,\.=+\-*:?[\(]/.test(e));) a = a.prev; - vr && a.type == ")" && a.prev.type == "stat" && (a = a.prev); - var y = a.type, - V = t == y; - return y == "vardef" ? a.indented + (r.lastType == "operator" || r.lastType == "," ? a.info.length + 1 : 0) : y == "form" && t == "{" ? a.indented : y == "form" ? a.indented + A : y == "stat" ? a.indented + (xe(r, e) ? vr || A : 0) : a.info == "switch" && !V && h.doubleIndentSwitch != !1 ? a.indented + (/^(?:case|default)\b/.test(e) ? A : 2 * A) : a.align ? a.column + (V ? 0 : 1) : a.indented + (V ? 0 : A); - }, - electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, - blockCommentStart: O ? null : "/*", - blockCommentEnd: O ? null : "*/", - blockCommentContinue: O ? null : " * ", - lineComment: O ? null : "//", - fold: "brace", - closeBrackets: "()[]{}''\"\"``", - helperType: O ? "json" : "javascript", - jsonldMode: rr, - jsonMode: O, - expressionAllowed: Fr, - skipExpression: function (r) { - Tr(r, "atom", "atom", "true", new w.StringStream("", 2, null)); } - }; - }), w.registerHelper("wordChars", "javascript", /[\w$]/), w.defineMIME("text/javascript", "javascript"), w.defineMIME("text/ecmascript", "javascript"), w.defineMIME("application/javascript", "javascript"), w.defineMIME("application/x-javascript", "javascript"), w.defineMIME("application/ecmascript", "javascript"), w.defineMIME("application/json", { - name: "javascript", - json: !0 - }), w.defineMIME("application/x-json", { - name: "javascript", - json: !0 - }), w.defineMIME("application/manifest+json", { - name: "javascript", - json: !0 - }), w.defineMIME("application/ld+json", { - name: "javascript", - jsonld: !0 - }), w.defineMIME("text/typescript", { - name: "javascript", - typescript: !0 - }), w.defineMIME("application/typescript", { - name: "javascript", - typescript: !0 - }); - }); -})(); -var Jr = ye.exports; -const je = Dr.getDefaultExportFromCjs(Jr), - Ee = ge({ - __proto__: null, - default: je - }, [Jr]); -exports.javascript = Ee; - -/***/ }), - -/***/ "../../graphiql-react/dist/jump-to-line.cjs.js": -/*!*****************************************************!*\ - !*** ../../graphiql-react/dist/jump-to-line.cjs.js ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -var m = Object.defineProperty; -var c = (u, p) => m(u, "name", { - value: p, - configurable: !0 -}); -const f = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"), - g = __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js"); -function h(u, p) { - for (var o = 0; o < p.length; o++) { - const s = p[o]; - if (typeof s != "string" && !Array.isArray(s)) { - for (const i in s) if (i !== "default" && !(i in u)) { - const a = Object.getOwnPropertyDescriptor(s, i); - a && Object.defineProperty(u, i, a.get ? a : { - enumerable: !0, - get: () => s[i] - }); + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); } } - } - return Object.freeze(Object.defineProperty(u, Symbol.toStringTag, { - value: "Module" - })); -} -c(h, "_mergeNamespaces"); -var b = { - exports: {} -}; -(function (u, p) { - (function (o) { - o(f.requireCodemirror(), g.dialogExports); - })(function (o) { - o.defineOption("search", { - bottom: !1 - }); - function s(e, r, n, t, l) { - e.openDialog ? e.openDialog(r, l, { - value: t, - selectValueOnOpen: !0, - bottom: e.options.search.bottom - }) : l(prompt(n, t)); - } - c(s, "dialog"); - function i(e) { - return e.phrase("Jump to line:") + ' ' + e.phrase("(Use line:column or scroll% syntax)") + ""; - } - c(i, "getJumpDialog"); - function a(e, r) { - var n = Number(r); - return /^[-+]/.test(r) ? e.getCursor().line + n : n - 1; - } - c(a, "interpretLine"), o.commands.jumpToLine = function (e) { - var r = e.getCursor(); - s(e, i(e), e.phrase("Jump to line:"), r.line + 1 + ":" + r.ch, function (n) { - if (n) { - var t; - if (t = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(n)) e.setCursor(a(e, t[1]), Number(t[2]));else if (t = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(n)) { - var l = Math.round(e.lineCount() * Number(t[1]) / 100); - /^[-+]/.test(t[1]) && (l = r.line + l + 1), e.setCursor(l - 1, r.ch); - } else (t = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(n)) && e.setCursor(a(e, t[1]), r.ch); + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); } - }); - }, o.keyMap.default["Alt-G"] = "jumpToLine"; - }); -})(); -var d = b.exports; -const j = f.getDefaultExportFromCjs(d), - y = h({ - __proto__: null, - default: j - }, [d]); -exports.jumpToLine = y; - -/***/ }), - -/***/ "../../graphiql-react/dist/jump.cjs.js": -/*!*********************************************!*\ - !*** ../../graphiql-react/dist/jump.cjs.js ***! - \*********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -var c = Object.defineProperty; -var s = (e, r) => c(e, "name", { - value: r, - configurable: !0 -}); -const u = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - d = __webpack_require__(/*! ./SchemaReference.cjs.js */ "../../graphiql-react/dist/SchemaReference.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -__webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -__webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js"); -u.CodeMirror.defineOption("jump", !1, (e, r, n) => { - if (n && n !== u.CodeMirror.Init) { - const t = e.state.jump.onMouseOver; - u.CodeMirror.off(e.getWrapperElement(), "mouseover", t); - const i = e.state.jump.onMouseOut; - u.CodeMirror.off(e.getWrapperElement(), "mouseout", i), u.CodeMirror.off(document, "keydown", e.state.jump.onKeyDown), delete e.state.jump; - } - if (r) { - const t = e.state.jump = { - options: r, - onMouseOver: M.bind(null, e), - onMouseOut: m.bind(null, e), - onKeyDown: g.bind(null, e) - }; - u.CodeMirror.on(e.getWrapperElement(), "mouseover", t.onMouseOver), u.CodeMirror.on(e.getWrapperElement(), "mouseout", t.onMouseOut), u.CodeMirror.on(document, "keydown", t.onKeyDown); - } -}); -function M(e, r) { - const n = r.target || r.srcElement; - if (!(n instanceof HTMLElement) || (n == null ? void 0 : n.nodeName) !== "SPAN") return; - const t = n.getBoundingClientRect(), - i = { - left: (t.left + t.right) / 2, - top: (t.top + t.bottom) / 2 - }; - e.state.jump.cursor = i, e.state.jump.isHoldingModifier && l(e); -} -s(M, "onMouseOver"); -function m(e) { - if (!e.state.jump.isHoldingModifier && e.state.jump.cursor) { - e.state.jump.cursor = null; - return; - } - e.state.jump.isHoldingModifier && e.state.jump.marker && p(e); -} -s(m, "onMouseOut"); -function g(e, r) { - if (e.state.jump.isHoldingModifier || !k(r.key)) return; - e.state.jump.isHoldingModifier = !0, e.state.jump.cursor && l(e); - const n = s(o => { - o.code === r.code && (e.state.jump.isHoldingModifier = !1, e.state.jump.marker && p(e), u.CodeMirror.off(document, "keyup", n), u.CodeMirror.off(document, "click", t), e.off("mousedown", i)); - }, "onKeyUp"), - t = s(o => { - const { - destination: a, - options: f - } = e.state.jump; - a && f.onClick(a, o); - }, "onClick"), - i = s((o, a) => { - e.state.jump.destination && (a.codemirrorIgnore = !0); - }, "onMouseDown"); - u.CodeMirror.on(document, "keyup", n), u.CodeMirror.on(document, "click", t), e.on("mousedown", i); -} -s(g, "onKeyDown"); -const j = typeof navigator < "u" && navigator && navigator.appVersion.includes("Mac"); -function k(e) { - return e === (j ? "Meta" : "Control"); -} -s(k, "isJumpModifier"); -function l(e) { - if (e.state.jump.marker) return; - const { - cursor: r, - options: n - } = e.state.jump, - t = e.coordsChar(r), - i = e.getTokenAt(t, !0), - o = n.getDestination || e.getHelper(t, "jump"); - if (o) { - const a = o(i, n, e); - if (a) { - const f = e.markText({ - line: t.line, - ch: i.start - }, { - line: t.line, - ch: i.end - }, { - className: "CodeMirror-jump-token" - }); - e.state.jump.marker = f, e.state.jump.destination = a; + } } - } -} -s(l, "enableJumpMode"); -function p(e) { - const { - marker: r - } = e.state.jump; - e.state.jump.marker = null, e.state.jump.destination = null, r.clear(); -} -s(p, "disableJumpMode"); -u.CodeMirror.registerHelper("jump", "graphql", (e, r) => { - if (!r.schema || !r.onClick || !e.state) return; - const { - state: n - } = e, + var propTypesMisspellWarningShown; { - kind: t, - step: i - } = n, - o = d.getTypeInfo(r.schema, n); - if (t === "Field" && i === 0 && o.fieldDef || t === "AliasedField" && i === 2 && o.fieldDef) return d.getFieldReference(o); - if (t === "Directive" && i === 1 && o.directiveDef) return d.getDirectiveReference(o); - if (t === "Argument" && i === 0 && o.argDef) return d.getArgumentReference(o); - if (t === "EnumValue" && o.enumValue) return d.getEnumValueReference(o); - if (t === "NamedType" && o.type) return d.getTypeReference(o); -}); - -/***/ }), - -/***/ "../../graphiql-react/dist/lint.cjs.js": -/*!*********************************************!*\ - !*** ../../graphiql-react/dist/lint.cjs.js ***! - \*********************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - + propTypesMisspellWarningShown = false; + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ -var W = Object.defineProperty; -var s = (h, v) => W(h, "name", { - value: v, - configurable: !0 -}); -const x = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function q(h, v) { - for (var l = 0; l < v.length; l++) { - const u = v[l]; - if (typeof u != "string" && !Array.isArray(u)) { - for (const g in u) if (g !== "default" && !(g in h)) { - const c = Object.getOwnPropertyDescriptor(u, g); - c && Object.defineProperty(h, g, c.get ? c : { - enumerable: !0, - get: () => u[g] - }); + function isValidElement(object) { + { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } } - } - return Object.freeze(Object.defineProperty(h, Symbol.toStringTag, { - value: "Module" - })); -} -s(q, "_mergeNamespaces"); -var B = { - exports: {} -}; -(function (h, v) { - (function (l) { - l(x.requireCodemirror()); - })(function (l) { - var u = "CodeMirror-lint-markers", - g = "CodeMirror-lint-line-"; - function c(t, e, r) { - var n = document.createElement("div"); - n.className = "CodeMirror-lint-tooltip cm-s-" + t.options.theme, n.appendChild(r.cloneNode(!0)), t.state.lint.options.selfContain ? t.getWrapperElement().appendChild(n) : document.body.appendChild(n); - function i(o) { - if (!n.parentNode) return l.off(document, "mousemove", i); - n.style.top = Math.max(0, o.clientY - n.offsetHeight - 5) + "px", n.style.left = o.clientX + 5 + "px"; - } - return s(i, "position"), l.on(document, "mousemove", i), i(e), n.style.opacity != null && (n.style.opacity = 1), n; - } - s(c, "showTooltip"); - function L(t) { - t.parentNode && t.parentNode.removeChild(t); - } - s(L, "rm"); - function A(t) { - t.parentNode && (t.style.opacity == null && L(t), t.style.opacity = 0, setTimeout(function () { - L(t); - }, 600)); - } - s(A, "hideTooltip"); - function M(t, e, r, n) { - var i = c(t, e, r); - function o() { - l.off(n, "mouseout", o), i && (A(i), i = null); - } - s(o, "hide"); - var a = setInterval(function () { - if (i) for (var f = n;; f = f.parentNode) { - if (f && f.nodeType == 11 && (f = f.host), f == document.body) return; - if (!f) { - o(); - break; + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; } } - if (!i) return clearInterval(a); - }, 400); - l.on(n, "mouseout", o); - } - s(M, "showTooltipFor"); - function F(t, e, r) { - this.marked = [], e instanceof Function && (e = { - getAnnotations: e - }), (!e || e === !0) && (e = {}), this.options = {}, this.linterOptions = e.options || {}; - for (var n in C) this.options[n] = C[n]; - for (var n in e) C.hasOwnProperty(n) ? e[n] != null && (this.options[n] = e[n]) : e.options || (this.linterOptions[n] = e[n]); - this.timeout = null, this.hasGutter = r, this.onMouseOver = function (i) { - U(t, i); - }, this.waitingFor = 0; - } - s(F, "LintState"); - var C = { - highlightLines: !1, - tooltips: !0, - delay: 500, - lintOnChange: !0, - getAnnotations: null, - async: !1, - selfContain: null, - formatAnnotation: null, - onUpdateLinting: null - }; - function E(t) { - var e = t.state.lint; - e.hasGutter && t.clearGutter(u), e.options.highlightLines && G(t); - for (var r = 0; r < e.marked.length; ++r) e.marked[r].clear(); - e.marked.length = 0; - } - s(E, "clearMarks"); - function G(t) { - t.eachLine(function (e) { - var r = e.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass); - r && t.removeLineClass(e, "wrap", r[0]); - }); - } - s(G, "clearErrorLines"); - function I(t, e, r, n, i) { - var o = document.createElement("div"), - a = o; - return o.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + r, n && (a = o.appendChild(document.createElement("div")), a.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple"), i != !1 && l.on(a, "mouseover", function (f) { - M(t, f, e, a); - }), o; - } - s(I, "makeMarker"); - function D(t, e) { - return t == "error" ? t : e; - } - s(D, "getMaxSeverity"); - function j(t) { - for (var e = [], r = 0; r < t.length; ++r) { - var n = t[r], - i = n.from.line; - (e[i] || (e[i] = [])).push(n); - } - return e; - } - s(j, "groupByLine"); - function N(t) { - var e = t.severity; - e || (e = "error"); - var r = document.createElement("div"); - return r.className = "CodeMirror-lint-message CodeMirror-lint-message-" + e, typeof t.messageHTML < "u" ? r.innerHTML = t.messageHTML : r.appendChild(document.createTextNode(t.message)), r; - } - s(N, "annotationTooltip"); - function H(t, e) { - var r = t.state.lint, - n = ++r.waitingFor; - function i() { - n = -1, t.off("change", i); - } - s(i, "abort"), t.on("change", i), e(t.getValue(), function (o, a) { - t.off("change", i), r.waitingFor == n && (a && o instanceof l && (o = a), t.operation(function () { - O(t, o); - })); - }, r.linterOptions, t); + return ''; + } } - s(H, "lintAsync"); - function k(t) { - var e = t.state.lint; - if (e) { - var r = e.options, - n = r.getAnnotations || t.getHelper(l.Pos(0, 0), "lint"); - if (n) if (r.async || n.async) H(t, n);else { - var i = n(t.getValue(), e.linterOptions, t); - if (!i) return; - i.then ? i.then(function (o) { - t.operation(function () { - O(t, o); - }); - }) : t.operation(function () { - O(t, i); - }); + function getSourceInfoErrorAddendum(source) { + { + if (source !== undefined) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } + return ''; } } - s(k, "startLinting"); - function O(t, e) { - var r = t.state.lint; - if (r) { - var n = r.options; - E(t); - for (var i = j(e), o = 0; o < i.length; ++o) { - var a = i[o]; - if (a) { - var f = []; - a = a.filter(function (w) { - return f.indexOf(w.message) > -1 ? !1 : f.push(w.message); - }); - for (var p = null, m = r.hasGutter && document.createDocumentFragment(), T = 0; T < a.length; ++T) { - var d = a[T], - y = d.severity; - y || (y = "error"), p = D(p, y), n.formatAnnotation && (d = n.formatAnnotation(d)), r.hasGutter && m.appendChild(N(d)), d.to && r.marked.push(t.markText(d.from, d.to, { - className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + y, - __annotation: d - })); - } - r.hasGutter && t.setGutterMarker(o, u, I(t, m, p, i[o].length > 1, n.tooltips)), n.highlightLines && t.addLineClass(o, "wrap", g + p); + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } - n.onUpdateLinting && n.onUpdateLinting(e, i, t); + return info; } } - s(O, "updateLinting"); - function b(t) { - var e = t.state.lint; - e && (clearTimeout(e.timeout), e.timeout = setTimeout(function () { - k(t); - }, e.options.delay)); - } - s(b, "onChange"); - function P(t, e, r) { - for (var n = r.target || r.srcElement, i = document.createDocumentFragment(), o = 0; o < e.length; o++) { - var a = e[o]; - i.appendChild(N(a)); + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + // Give the component that originally created this child. + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); } - M(t, r, i, n); } - s(P, "popupTooltips"); - function U(t, e) { - var r = e.target || e.srcElement; - if (/\bCodeMirror-lint-mark-/.test(r.className)) { - for (var n = r.getBoundingClientRect(), i = (n.left + n.right) / 2, o = (n.top + n.bottom) / 2, a = t.findMarksAt(t.coordsChar({ - left: i, - top: o - }, "client")), f = [], p = 0; p < a.length; ++p) { - var m = a[p].__annotation; - m && f.push(m); + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + function validateChildKeys(node, parentType) { + { + if (typeof node !== 'object') { + return; + } + if (isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } } - f.length && P(t, f, e); } } - s(U, "onMouseOver"), l.defineOption("lint", !1, function (t, e, r) { - if (r && r != l.Init && (E(t), t.state.lint.options.lintOnChange !== !1 && t.off("change", b), l.off(t.getWrapperElement(), "mouseover", t.state.lint.onMouseOver), clearTimeout(t.state.lint.timeout), delete t.state.lint), e) { - for (var n = t.getOption("gutters"), i = !1, o = 0; o < n.length; ++o) n[o] == u && (i = !0); - var a = t.state.lint = new F(t, e, i); - a.options.lintOnChange && t.on("change", b), a.options.tooltips != !1 && a.options.tooltips != "gutter" && l.on(t.getWrapperElement(), "mouseover", a.onMouseOver), k(t); - } - }), l.defineExtension("performLint", function () { - k(this); - }); - }); -})(); -var _ = B.exports; -const R = x.getDefaultExportFromCjs(_), - V = q({ - __proto__: null, - default: R - }, [_]); -exports.lint = V; - -/***/ }), - -/***/ "../../graphiql-react/dist/lint.cjs2.js": -/*!**********************************************!*\ - !*** ../../graphiql-react/dist/lint.cjs2.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -const t = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - c = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -const a = ["error", "warning", "information", "hint"], - g = { - "GraphQL: Validation": "validation", - "GraphQL: Deprecation": "deprecation", - "GraphQL: Syntax": "syntax" - }; -t.CodeMirror.registerHelper("lint", "graphql", (n, s) => { - const { - schema: r, - validationRules: i, - externalFragments: o - } = s; - return c.getDiagnostics(n, r, i, void 0, o).map(e => ({ - message: e.message, - severity: e.severity ? a[e.severity - 1] : a[0], - type: e.source ? g[e.source] : void 0, - from: t.CodeMirror.Pos(e.range.start.line, e.range.start.character), - to: t.CodeMirror.Pos(e.range.end.line, e.range.end.character) - })); -}); - -/***/ }), - -/***/ "../../graphiql-react/dist/lint.cjs3.js": -/*!**********************************************!*\ - !*** ../../graphiql-react/dist/lint.cjs3.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === undefined || typeof type === 'string') { + return; + } + var propTypes; + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || + // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + // Intentionally inside to avoid triggering lazy initializers: + var name = getComponentNameFromType(type); + checkPropTypes(propTypes, element.props, 'prop', name, element); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: -var V = Object.defineProperty; -var t = (e, n) => V(e, "name", { - value: n, - configurable: !0 -}); -const I = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - b = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function C(e) { - d = e, E = e.length, s = u = N = -1, o(), y(); - const n = q(); - return p("EOF"), n; -} -t(C, "jsonParse"); -let d, E, s, u, N, r, l; -function q() { - const e = s, - n = []; - if (p("{"), !x("}")) { - do n.push(M()); while (x(",")); - p("}"); - } - return { - kind: "Object", - start: e, - end: N, - members: n - }; -} -t(q, "parseObj"); -function M() { - const e = s, - n = l === "String" ? G() : null; - p("String"), p(":"); - const i = B(); - return { - kind: "Member", - start: e, - end: N, - key: n, - value: i - }; -} -t(M, "parseMember"); -function v() { - const e = s, - n = []; - if (p("["), !x("]")) { - do n.push(B()); while (x(",")); - p("]"); - } - return { - kind: "Array", - start: e, - end: N, - values: n - }; -} -t(v, "parseArr"); -function B() { - switch (l) { - case "[": - return v(); - case "{": - return q(); - case "String": - case "Number": - case "Boolean": - case "Null": - const e = G(); - return y(), e; - } - p("Value"); -} -t(B, "parseVal"); -function G() { - return { - kind: l, - start: s, - end: u, - value: JSON.parse(d.slice(s, u)) - }; -} -t(G, "curToken"); -function p(e) { - if (l === e) { - y(); - return; - } - let n; - if (l === "EOF") n = "[end of file]";else if (u - s > 1) n = "`" + d.slice(s, u) + "`";else { - const i = d.slice(s).match(/^.+?\b/); - n = "`" + (i ? i[0] : d[s]) + "`"; - } - throw k(`Expected ${e} but found ${n}.`); -} -t(p, "expect"); -class j extends Error { - constructor(n, i) { - super(n), this.position = i; - } -} -t(j, "JSONSyntaxError"); -function k(e) { - return new j(e, { - start: s, - end: u - }); -} -t(k, "syntaxError"); -function x(e) { - if (l === e) return y(), !0; -} -t(x, "skip"); -function o() { - return u < E && (u++, r = u === E ? 0 : d.charCodeAt(u)), r; -} -t(o, "ch"); -function y() { - for (N = u; r === 9 || r === 10 || r === 13 || r === 32;) o(); - if (r === 0) { - l = "EOF"; - return; - } - switch (s = u, r) { - case 34: - return l = "String", D(); - case 45: - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - return l = "Number", H(); - case 102: - if (d.slice(s, s + 5) !== "false") break; - u += 4, o(), l = "Boolean"; - return; - case 110: - if (d.slice(s, s + 4) !== "null") break; - u += 3, o(), l = "Null"; - return; - case 116: - if (d.slice(s, s + 4) !== "true") break; - u += 3, o(), l = "Boolean"; - return; - } - l = d[s], o(); -} -t(y, "lex"); -function D() { - for (o(); r !== 34 && r > 31;) if (r === 92) switch (r = o(), r) { - case 34: - case 47: - case 92: - case 98: - case 102: - case 110: - case 114: - case 116: - o(); - break; - case 117: - o(), w(), w(), w(), w(); - break; - default: - throw k("Bad character escape sequence."); - } else { - if (u === E) throw k("Unterminated string."); - o(); - } - if (r === 34) { - o(); - return; - } - throw k("Unterminated string."); -} -t(D, "readString"); -function w() { - if (r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102) return o(); - throw k("Expected hexadecimal digit."); -} -t(w, "readHex"); -function H() { - r === 45 && o(), r === 48 ? o() : $(), r === 46 && (o(), $()), (r === 69 || r === 101) && (r = o(), (r === 43 || r === 45) && o(), $()); -} -t(H, "readNumber"); -function $() { - if (r < 48 || r > 57) throw k("Expected decimal digit."); - do o(); while (r >= 48 && r <= 57); -} -t($, "readDigits"); -I.CodeMirror.registerHelper("lint", "graphql-variables", (e, n, i) => { - if (!e) return []; - let f; - try { - f = C(e); - } catch (c) { - if (c instanceof j) return [F(i, c.position, c.message)]; - throw c; - } - const { - variableToType: a - } = n; - return a ? U(i, a, f) : []; -}); -function U(e, n, i) { - var f; - const a = []; - for (const c of i.members) if (c) { - const h = (f = c.key) === null || f === void 0 ? void 0 : f.value, - m = n[h]; - if (m) for (const [O, Q] of g(m, c.value)) a.push(F(e, O, Q));else a.push(F(e, c.key, `Variable "$${h}" does not appear in any GraphQL query.`)); - } - return a; -} -t(U, "validateVariables"); -function g(e, n) { - if (!e || !n) return []; - if (e instanceof b.GraphQLNonNull) return n.kind === "Null" ? [[n, `Type "${e}" is non-nullable and cannot be null.`]] : g(e.ofType, n); - if (n.kind === "Null") return []; - if (e instanceof b.GraphQLList) { - const i = e.ofType; - if (n.kind === "Array") { - const f = n.values || []; - return L(f, a => g(i, a)); - } - return g(i, n); - } - if (e instanceof b.GraphQLInputObjectType) { - if (n.kind !== "Object") return [[n, `Type "${e}" must be an Object.`]]; - const i = Object.create(null), - f = L(n.members, a => { - var c; - const h = (c = a == null ? void 0 : a.key) === null || c === void 0 ? void 0 : c.value; - i[h] = !0; - const m = e.getFields()[h]; - if (!m) return [[a.key, `Type "${e}" does not have a field "${h}".`]]; - const O = m ? m.type : void 0; - return g(O, a.value); - }); - for (const a of Object.keys(e.getFields())) { - const c = e.getFields()[a]; - !i[a] && c.type instanceof b.GraphQLNonNull && !c.defaultValue && f.push([n, `Object of type "${e}" is missing required field "${a}".`]); + var _name = getComponentNameFromType(type); + error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); + } + if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { + error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); + } + } } - return f; - } - return e.name === "Boolean" && n.kind !== "Boolean" || e.name === "String" && n.kind !== "String" || e.name === "ID" && n.kind !== "Number" && n.kind !== "String" || e.name === "Float" && n.kind !== "Number" || e.name === "Int" && (n.kind !== "Number" || (n.value | 0) !== n.value) ? [[n, `Expected value of type "${e}".`]] : (e instanceof b.GraphQLEnumType || e instanceof b.GraphQLScalarType) && (n.kind !== "String" && n.kind !== "Number" && n.kind !== "Boolean" && n.kind !== "Null" || _(e.parseValue(n.value))) ? [[n, `Expected value of type "${e}".`]] : []; -} -t(g, "validateValue"); -function F(e, n, i) { - return { - message: i, - severity: "error", - type: "validation", - from: e.posFromIndex(n.start), - to: e.posFromIndex(n.end) - }; -} -t(F, "lintError"); -function _(e) { - return e == null || e !== e; -} -t(_, "isNullish"); -function L(e, n) { - return Array.prototype.concat.apply([], e.map(n)); -} -t(L, "mapCat"); - -/***/ }), - -/***/ "../../graphiql-react/dist/matchbrackets.cjs.js": -/*!******************************************************!*\ - !*** ../../graphiql-react/dist/matchbrackets.cjs.js ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ -var i = Object.defineProperty; -var s = (e, c) => i(e, "name", { - value: c, - configurable: !0 -}); -const u = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"), - f = __webpack_require__(/*! ./matchbrackets.cjs2.js */ "../../graphiql-react/dist/matchbrackets.cjs2.js"); -function b(e, c) { - for (var o = 0; o < c.length; o++) { - const t = c[o]; - if (typeof t != "string" && !Array.isArray(t)) { - for (const r in t) if (r !== "default" && !(r in e)) { - const a = Object.getOwnPropertyDescriptor(t, r); - a && Object.defineProperty(e, r, a.get ? a : { - enumerable: !0, - get: () => t[r] - }); + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== 'children' && key !== 'key') { + setCurrentlyValidatingElement$1(fragment); + error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error('Invalid attribute `ref` supplied to `React.Fragment`.'); + setCurrentlyValidatingElement$1(null); + } } } - } - return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { - value: "Module" - })); -} -s(b, "_mergeNamespaces"); -var n = f.requireMatchbrackets(); -const l = u.getDefaultExportFromCjs(n), - m = b({ - __proto__: null, - default: l - }, [n]); -exports.matchbrackets = m; - -/***/ }), - -/***/ "../../graphiql-react/dist/matchbrackets.cjs2.js": -/*!*******************************************************!*\ - !*** ../../graphiql-react/dist/matchbrackets.cjs2.js ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + function jsxWithValidation(type, props, key, isStaticChildren, source, self) { + { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + var info = ''; + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = 'null'; + } else if (isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); + } + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) -var R = Object.defineProperty; -var f = (L, y) => R(L, "name", { - value: y, - configurable: !0 -}); -const F = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -var T = { - exports: {} - }, - E; -function I() { - return E || (E = 1, function (L, y) { - (function (o) { - o(F.requireCodemirror()); - })(function (o) { - var S = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8), - g = o.Pos, - B = { - "(": ")>", - ")": "(<", - "[": "]>", - "]": "[<", - "{": "}>", - "}": "{<", - "<": ">>", - ">": "<<" - }; - function A(t) { - return t && t.bracketRegex || /[(){}[\]]/; - } - f(A, "bracketRegex"); - function b(t, r, e) { - var s = t.getLineHandle(r.line), - n = r.ch - 1, - h = e && e.afterCursor; - h == null && (h = /(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className)); - var l = A(e), - u = !h && n >= 0 && l.test(s.text.charAt(n)) && B[s.text.charAt(n)] || l.test(s.text.charAt(n + 1)) && B[s.text.charAt(++n)]; - if (!u) return null; - var a = u.charAt(1) == ">" ? 1 : -1; - if (e && e.strict && a > 0 != (n == r.ch)) return null; - var k = t.getTokenTypeAt(g(r.line, n + 1)), - i = H(t, g(r.line, n + (a > 0 ? 1 : 0)), a, k, e); - return i == null ? null : { - from: g(r.line, n), - to: i && i.pos, - match: i && i.ch == u.charAt(0), - forward: a > 0 - }; - } - f(b, "findMatchingBracket"); - function H(t, r, e, s, n) { - for (var h = n && n.maxScanLineLength || 1e4, l = n && n.maxScanLines || 1e3, u = [], a = A(n), k = e > 0 ? Math.min(r.line + l, t.lastLine() + 1) : Math.max(t.firstLine() - 1, r.line - l), i = r.line; i != k; i += e) { - var c = t.getLine(i); - if (c) { - var v = e > 0 ? 0 : c.length - 1, - q = e > 0 ? c.length : -1; - if (!(c.length > h)) for (i == r.line && (v = r.ch - (e < 0 ? 1 : 0)); v != q; v += e) { - var d = c.charAt(v); - if (a.test(d) && (s === void 0 || (t.getTokenTypeAt(g(i, v + 1)) || "") == (s || ""))) { - var m = B[d]; - if (m && m.charAt(1) == ">" == e > 0) u.push(d);else if (u.length) u.pop();else return { - pos: g(i, v), - ch: d - }; + if (validType) { + var children = props.children; + if (children !== undefined) { + if (isStaticChildren) { + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + if (Object.freeze) { + Object.freeze(children); + } + } else { + error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); } + } else { + validateChildKeys(children, type); } } } - return i - e == (e > 0 ? t.lastLine() : t.firstLine()) ? !1 : null; - } - f(H, "scanForBracket"); - function M(t, r, e) { - for (var s = t.state.matchBrackets.maxHighlightLineLength || 1e3, n = e && e.highlightNonMatching, h = [], l = t.listSelections(), u = 0; u < l.length; u++) { - var a = l[u].empty() && b(t, l[u].head, e); - if (a && (a.match || n !== !1) && t.getLine(a.from.line).length <= s) { - var k = a.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; - h.push(t.markText(a.from, g(a.from.line, a.from.ch + 1), { - className: k - })), a.to && t.getLine(a.to.line).length <= s && h.push(t.markText(a.to, g(a.to.line, a.to.ch + 1), { - className: k - })); - } - } - if (h.length) { - S && t.state.focused && t.focus(); - var i = f(function () { - t.operation(function () { - for (var c = 0; c < h.length; c++) h[c].clear(); - }); - }, "clear"); - if (r) setTimeout(i, 800);else return i; + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); } + return element; + } + } // These two functions exist to still get child warnings in dev + // even with the prod transform. This means that jsxDEV is purely + // opt-in behavior for better messages but that we won't stop + // giving you warnings if you use production apis. + + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); } - f(M, "matchBrackets"); - function x(t) { - t.operation(function () { - t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null), t.state.matchBrackets.currentlyHighlighted = M(t, !1, t.state.matchBrackets); - }); + } + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); } - f(x, "doMatchBrackets"); - function p(t) { - t.state.matchBrackets && t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null); - } - f(p, "clearHighlighted"), o.defineOption("matchBrackets", !1, function (t, r, e) { - e && e != o.Init && (t.off("cursorActivity", x), t.off("focus", x), t.off("blur", p), p(t)), r && (t.state.matchBrackets = typeof r == "object" ? r : {}, t.on("cursorActivity", x), t.on("focus", x), t.on("blur", p)); - }), o.defineExtension("matchBrackets", function () { - M(this, !0); - }), o.defineExtension("findMatchingBracket", function (t, r, e) { - return (e || typeof r == "boolean") && (e ? (e.strict = r, r = e) : r = r ? { - strict: !0 - } : null), b(this, t, r); - }), o.defineExtension("scanForBracket", function (t, r, e, s) { - return H(this, t, r, e, s); - }); - }); - }()), T.exports; + } + var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children. + // for now we can ship identical prod functions + + var jsxs = jsxWithValidationStatic; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.jsx = jsx; + exports.jsxs = jsxs; + })(); } -f(I, "requireMatchbrackets"); -exports.requireMatchbrackets = I; /***/ }), -/***/ "../../graphiql-react/dist/mode-indent.cjs.js": -/*!****************************************************!*\ - !*** ../../graphiql-react/dist/mode-indent.cjs.js ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/react/jsx-runtime.js": +/*!**************************************************!*\ + !*** ../../../node_modules/react/jsx-runtime.js ***! + \**************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; -var o = Object.defineProperty; -var v = (n, t) => o(n, "name", { - value: t, - configurable: !0 -}); -function s(n, t) { - var e, i; - const { - levels: l, - indentLevel: d - } = n; - return ((!l || l.length === 0 ? d : l.at(-1) - (!((e = this.electricInput) === null || e === void 0) && e.test(t) ? 1 : 0)) || 0) * (((i = this.config) === null || i === void 0 ? void 0 : i.indentUnit) || 0); +if (false) {} else { + module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../../../node_modules/react/cjs/react-jsx-runtime.development.js"); } -v(s, "indent"); -exports.indent = s; /***/ }), -/***/ "../../graphiql-react/dist/mode.cjs.js": -/*!*********************************************!*\ - !*** ../../graphiql-react/dist/mode.cjs.js ***! - \*********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -var n = Object.defineProperty; -var s = (e, r) => n(e, "name", { - value: r, - configurable: !0 -}); -const o = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - t = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"), - i = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -const l = s(e => { - const r = t.onlineParser({ - eatWhitespace: a => a.eatWhile(t.isIgnored), - lexRules: t.LexRules, - parseRules: t.ParseRules, - editorConfig: { - tabSize: e.tabSize - } - }); - return { - config: e, - startState: r.startState, - token: r.token, - indent: i.indent, - electricInput: /^\s*[})\]]/, - fold: "brace", - lineComment: "#", - closeBrackets: { - pairs: '()[]{}""', - explode: "()[]{}" - } - }; -}, "graphqlModeFactory"); -o.CodeMirror.defineMode("graphql", l); - -/***/ }), +/***/ "../../../node_modules/set-value/index.js": +/*!************************************************!*\ + !*** ../../../node_modules/set-value/index.js ***! + \************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -/***/ "../../graphiql-react/dist/mode.cjs2.js": -/*!**********************************************!*\ - !*** ../../graphiql-react/dist/mode.cjs2.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +"use strict"; +/*! + * set-value + * + * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert). + * Released under the MIT License. + */ -var n = Object.defineProperty; -var u = (t, r) => n(t, "name", { - value: r, - configurable: !0 -}); -const i = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - e = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"), - s = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -i.CodeMirror.defineMode("graphql-variables", t => { - const r = e.onlineParser({ - eatWhitespace: a => a.eatSpace(), - lexRules: c, - parseRules: o, - editorConfig: { - tabSize: t.tabSize - } - }); - return { - config: t, - startState: r.startState, - token: r.token, - indent: s.indent, - electricInput: /^\s*[}\]]/, - fold: "brace", - closeBrackets: { - pairs: '[]{}""', - explode: "[]{}" - } - }; -}); -const c = { - Punctuation: /^\[|]|\{|\}|:|,/, - Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, - String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/, - Keyword: /^true|false|null/ - }, - o = { - Document: [e.p("{"), e.list("Variable", e.opt(e.p(","))), e.p("}")], - Variable: [l("variable"), e.p(":"), "Value"], - Value(t) { - switch (t.kind) { - case "Number": - return "NumberValue"; - case "String": - return "StringValue"; - case "Punctuation": - switch (t.value) { - case "[": - return "ListValue"; - case "{": - return "ObjectValue"; - } - return null; - case "Keyword": - switch (t.value) { - case "true": - case "false": - return "BooleanValue"; - case "null": - return "NullValue"; - } - return null; - } - }, - NumberValue: [e.t("Number", "number")], - StringValue: [e.t("String", "string")], - BooleanValue: [e.t("Keyword", "builtin")], - NullValue: [e.t("Keyword", "keyword")], - ListValue: [e.p("["), e.list("Value", e.opt(e.p(","))), e.p("]")], - ObjectValue: [e.p("{"), e.list("ObjectField", e.opt(e.p(","))), e.p("}")], - ObjectField: [l("attribute"), e.p(":"), "Value"] - }; -function l(t) { - return { - style: t, - match: r => r.kind === "String", - update(r, a) { - r.name = a.value.slice(1, -1); +const { + deleteProperty +} = Reflect; +const isPrimitive = __webpack_require__(/*! is-primitive */ "../../../node_modules/is-primitive/index.js"); +const isPlainObject = __webpack_require__(/*! is-plain-object */ "../../../node_modules/is-plain-object/index.js"); +const isObject = value => { + return typeof value === 'object' && value !== null || typeof value === 'function'; +}; +const isUnsafeKey = key => { + return key === '__proto__' || key === 'constructor' || key === 'prototype'; +}; +const validateKey = key => { + if (!isPrimitive(key)) { + throw new TypeError('Object keys must be strings or symbols'); + } + if (isUnsafeKey(key)) { + throw new Error(`Cannot set unsafe key: "${key}"`); + } +}; +const toStringKey = input => { + return Array.isArray(input) ? input.flat().map(String).join(',') : input; +}; +const createMemoKey = (input, options) => { + if (typeof input !== 'string' || !options) return input; + let key = input + ';'; + if (options.arrays !== undefined) key += `arrays=${options.arrays};`; + if (options.separator !== undefined) key += `separator=${options.separator};`; + if (options.split !== undefined) key += `split=${options.split};`; + if (options.merge !== undefined) key += `merge=${options.merge};`; + if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`; + return key; +}; +const memoize = (input, options, fn) => { + const key = toStringKey(options ? createMemoKey(input, options) : input); + validateKey(key); + const value = setValue.cache.get(key) || fn(); + setValue.cache.set(key, value); + return value; +}; +const splitString = (input, options = {}) => { + const sep = options.separator || '.'; + const preserve = sep === '/' ? false : options.preservePaths; + if (typeof input === 'string' && preserve !== false && /\//.test(input)) { + return [input]; + } + const parts = []; + let part = ''; + const push = part => { + let number; + if (part.trim() !== '' && Number.isInteger(number = Number(part))) { + parts.push(number); + } else { + parts.push(part); } }; -} -u(l, "namedKey"); - -/***/ }), - -/***/ "../../graphiql-react/dist/mode.cjs3.js": -/*!**********************************************!*\ - !*** ../../graphiql-react/dist/mode.cjs3.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - - - -const a = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"), - e = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"), - l = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js"); -__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -a.CodeMirror.defineMode("graphql-results", r => { - const t = e.onlineParser({ - eatWhitespace: u => u.eatSpace(), - lexRules: n, - parseRules: s, - editorConfig: { - tabSize: r.tabSize + for (let i = 0; i < input.length; i++) { + const value = input[i]; + if (value === '\\') { + part += input[++i]; + continue; } - }); - return { - config: r, - startState: t.startState, - token: t.token, - indent: l.indent, - electricInput: /^\s*[}\]]/, - fold: "brace", - closeBrackets: { - pairs: '[]{}""', - explode: "[]{}" + if (value === sep) { + push(part); + part = ''; + continue; } - }; -}); -const n = { - Punctuation: /^\[|]|\{|\}|:|,/, - Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, - String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/, - Keyword: /^true|false|null/ - }, - s = { - Document: [e.p("{"), e.list("Entry", e.p(",")), e.p("}")], - Entry: [e.t("String", "def"), e.p(":"), "Value"], - Value(r) { - switch (r.kind) { - case "Number": - return "NumberValue"; - case "String": - return "StringValue"; - case "Punctuation": - switch (r.value) { - case "[": - return "ListValue"; - case "{": - return "ObjectValue"; - } - return null; - case "Keyword": - switch (r.value) { - case "true": - case "false": - return "BooleanValue"; - case "null": - return "NullValue"; - } - return null; - } - }, - NumberValue: [e.t("Number", "number")], - StringValue: [e.t("String", "string")], - BooleanValue: [e.t("Keyword", "builtin")], - NullValue: [e.t("Keyword", "keyword")], - ListValue: [e.p("["), e.list("Value", e.p(",")), e.p("]")], - ObjectValue: [e.p("{"), e.list("ObjectField", e.p(",")), e.p("}")], - ObjectField: [e.t("String", "property"), e.p(":"), "Value"] - }; - -/***/ }), - -/***/ "../../graphiql-react/dist/search.cjs.js": -/*!***********************************************!*\ - !*** ../../graphiql-react/dist/search.cjs.js ***! - \***********************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - + part += value; + } + if (part) { + push(part); + } + return parts; +}; +const split = (input, options) => { + if (options && typeof options.split === 'function') return options.split(input); + if (typeof input === 'symbol') return [input]; + if (Array.isArray(input)) return input; + return memoize(input, options, () => splitString(input, options)); +}; +const assignProp = (obj, prop, value, options) => { + validateKey(prop); + // Delete property when "value" is undefined + if (value === undefined) { + deleteProperty(obj, prop); + } else if (options && options.merge) { + const merge = options.merge === 'function' ? options.merge : Object.assign; -var K = Object.defineProperty; -var a = (S, O) => K(S, "name", { - value: O, - configurable: !0 -}); -const Q = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"), - L = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js"), - z = __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js"); -function U(S, O) { - for (var i = 0; i < O.length; i++) { - const y = O[i]; - if (typeof y != "string" && !Array.isArray(y)) { - for (const v in y) if (v !== "default" && !(v in S)) { - const h = Object.getOwnPropertyDescriptor(y, v); - h && Object.defineProperty(S, v, h.get ? h : { - enumerable: !0, - get: () => y[v] - }); - } + // Only merge plain objects + if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) { + obj[prop] = merge(obj[prop], value); + } else { + obj[prop] = value; } + } else { + obj[prop] = value; } - return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { - value: "Module" - })); -} -a(U, "_mergeNamespaces"); -var B = { - exports: {} + return obj; }; -(function (S, O) { - (function (i) { - i(Q.requireCodemirror(), L.requireSearchcursor(), z.dialogExports); - })(function (i) { - i.defineOption("search", { - bottom: !1 - }); - function y(e, n) { - return typeof e == "string" ? e = new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), n ? "gi" : "g") : e.global || (e = new RegExp(e.source, e.ignoreCase ? "gi" : "g")), { - token: function (t) { - e.lastIndex = t.pos; - var o = e.exec(t.string); - if (o && o.index == t.pos) return t.pos += o[0].length || 1, "searching"; - o ? t.pos = o.index : t.skipToEnd(); - } - }; - } - a(y, "searchOverlay"); - function v() { - this.posFrom = this.posTo = this.lastQuery = this.query = null, this.overlay = null; - } - a(v, "SearchState"); - function h(e) { - return e.state.search || (e.state.search = new v()); - } - a(h, "getSearchState"); - function m(e) { - return typeof e == "string" && e == e.toLowerCase(); - } - a(m, "queryCaseInsensitive"); - function N(e, n, t) { - return e.getSearchCursor(n, t, { - caseFold: m(n), - multiline: !0 - }); - } - a(N, "getSearchCursor"); - function j(e, n, t, o, r) { - e.openDialog(n, o, { - value: t, - selectValueOnOpen: !0, - closeOnEnter: !1, - onClose: function () { - w(e); - }, - onKeyDown: r, - bottom: e.options.search.bottom - }); - } - a(j, "persistentDialog"); - function D(e, n, t, o, r) { - e.openDialog ? e.openDialog(n, r, { - value: o, - selectValueOnOpen: !0, - bottom: e.options.search.bottom - }) : r(prompt(t, o)); - } - a(D, "dialog"); - function k(e, n, t, o) { - e.openConfirm ? e.openConfirm(n, o) : confirm(t) && o[0](); - } - a(k, "confirmDialog"); - function C(e) { - return e.replace(/\\([nrt\\])/g, function (n, t) { - return t == "n" ? ` -` : t == "r" ? "\r" : t == "t" ? " " : t == "\\" ? "\\" : n; - }); - } - a(C, "parseString"); - function T(e) { - var n = e.match(/^\/(.*)\/([a-z]*)$/); - if (n) try { - e = new RegExp(n[1], n[2].indexOf("i") == -1 ? "" : "i"); - } catch {} else e = C(e); - return (typeof e == "string" ? e == "" : e.test("")) && (e = /x^/), e; - } - a(T, "parseQuery"); - function P(e, n, t) { - n.queryText = t, n.query = T(t), e.removeOverlay(n.overlay, m(n.query)), n.overlay = y(n.query, m(n.query)), e.addOverlay(n.overlay), e.showMatchesOnScrollbar && (n.annotate && (n.annotate.clear(), n.annotate = null), n.annotate = e.showMatchesOnScrollbar(n.query, m(n.query))); - } - a(P, "startSearch"); - function b(e, n, t, o) { - var r = h(e); - if (r.query) return R(e, n); - var s = e.getSelection() || r.lastQuery; - if (s instanceof RegExp && s.source == "x^" && (s = null), t && e.openDialog) { - var c = null, - u = a(function (f, x) { - i.e_stop(x), f && (f != r.queryText && (P(e, r, f), r.posFrom = r.posTo = e.getCursor()), c && (c.style.opacity = 1), R(e, x.shiftKey, function (d, g) { - var p; - g.line < 3 && document.querySelector && (p = e.display.wrapper.querySelector(".CodeMirror-dialog")) && p.getBoundingClientRect().bottom - 4 > e.cursorCoords(g, "window").top && ((c = p).style.opacity = .4); - })); - }, "searchNext"); - j(e, E(e), s, u, function (f, x) { - var d = i.keyName(f), - g = e.getOption("extraKeys"), - p = g && g[d] || i.keyMap[e.getOption("keyMap")][d]; - p == "findNext" || p == "findPrev" || p == "findPersistentNext" || p == "findPersistentPrev" ? (i.e_stop(f), P(e, h(e), x), e.execCommand(p)) : (p == "find" || p == "findPersistent") && (i.e_stop(f), u(x, f)); - }), o && s && (P(e, r, s), R(e, n)); - } else D(e, E(e), "Search for:", s, function (f) { - f && !r.query && e.operation(function () { - P(e, r, f), r.posFrom = r.posTo = e.getCursor(), R(e, n); - }); - }); - } - a(b, "doSearch"); - function R(e, n, t) { - e.operation(function () { - var o = h(e), - r = N(e, o.query, n ? o.posFrom : o.posTo); - !r.find(n) && (r = N(e, o.query, n ? i.Pos(e.lastLine()) : i.Pos(e.firstLine(), 0)), !r.find(n)) || (e.setSelection(r.from(), r.to()), e.scrollIntoView({ - from: r.from(), - to: r.to() - }, 20), o.posFrom = r.from(), o.posTo = r.to(), t && t(r.from(), r.to())); - }); - } - a(R, "findNext"); - function w(e) { - e.operation(function () { - var n = h(e); - n.lastQuery = n.query, n.query && (n.query = n.queryText = null, e.removeOverlay(n.overlay), n.annotate && (n.annotate.clear(), n.annotate = null)); - }); - } - a(w, "clearSearch"); - function l(e, n) { - var t = e ? document.createElement(e) : document.createDocumentFragment(); - for (var o in n) t[o] = n[o]; - for (var r = 2; r < arguments.length; r++) { - var s = arguments[r]; - t.appendChild(typeof s == "string" ? document.createTextNode(s) : s); - } - return t; - } - a(l, "el"); - function E(e) { - return l("", null, l("span", { - className: "CodeMirror-search-label" - }, e.phrase("Search:")), " ", l("input", { - type: "text", - style: "width: 10em", - className: "CodeMirror-search-field" - }), " ", l("span", { - style: "color: #888", - className: "CodeMirror-search-hint" - }, e.phrase("(Use /re/ syntax for regexp search)"))); - } - a(E, "getQueryDialog"); - function A(e) { - return l("", null, " ", l("input", { - type: "text", - style: "width: 10em", - className: "CodeMirror-search-field" - }), " ", l("span", { - style: "color: #888", - className: "CodeMirror-search-hint" - }, e.phrase("(Use /re/ syntax for regexp search)"))); - } - a(A, "getReplaceQueryDialog"); - function I(e) { - return l("", null, l("span", { - className: "CodeMirror-search-label" - }, e.phrase("With:")), " ", l("input", { - type: "text", - style: "width: 10em", - className: "CodeMirror-search-field" - })); +const setValue = (target, path, value, options) => { + if (!path || !isObject(target)) return target; + const keys = split(path, options); + let obj = target; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const next = keys[i + 1]; + validateKey(key); + if (next === undefined) { + assignProp(obj, key, value, options); + break; } - a(I, "getReplacementQueryDialog"); - function V(e) { - return l("", null, l("span", { - className: "CodeMirror-search-label" - }, e.phrase("Replace?")), " ", l("button", {}, e.phrase("Yes")), " ", l("button", {}, e.phrase("No")), " ", l("button", {}, e.phrase("All")), " ", l("button", {}, e.phrase("Stop"))); - } - a(V, "getDoReplaceConfirm"); - function _(e, n, t) { - e.operation(function () { - for (var o = N(e, n); o.findNext();) if (typeof n != "string") { - var r = e.getRange(o.from(), o.to()).match(n); - o.replace(t.replace(/\$(\d)/g, function (s, c) { - return r[c]; - })); - } else o.replace(t); - }); + if (typeof next === 'number' && !Array.isArray(obj[key])) { + obj = obj[key] = []; + continue; } - a(_, "replaceAll"); - function F(e, n) { - if (!e.getOption("readOnly")) { - var t = e.getSelection() || h(e).lastQuery, - o = n ? e.phrase("Replace all:") : e.phrase("Replace:"), - r = l("", null, l("span", { - className: "CodeMirror-search-label" - }, o), A(e)); - D(e, r, o, t, function (s) { - s && (s = T(s), D(e, I(e), e.phrase("Replace with:"), "", function (c) { - if (c = C(c), n) _(e, s, c);else { - w(e); - var u = N(e, s, e.getCursor("from")), - f = a(function () { - var d = u.from(), - g; - !(g = u.findNext()) && (u = N(e, s), !(g = u.findNext()) || d && u.from().line == d.line && u.from().ch == d.ch) || (e.setSelection(u.from(), u.to()), e.scrollIntoView({ - from: u.from(), - to: u.to() - }), k(e, V(e), e.phrase("Replace?"), [function () { - x(g); - }, f, function () { - _(e, s, c); - }])); - }, "advance"), - x = a(function (d) { - u.replace(typeof s == "string" ? c : c.replace(/\$(\d)/g, function (g, p) { - return d[p]; - })), f(); - }, "doReplace"); - f(); - } - })); - }); - } + if (!isObject(obj[key])) { + obj[key] = {}; } - a(F, "replace"), i.commands.find = function (e) { - w(e), b(e); - }, i.commands.findPersistent = function (e) { - w(e), b(e, !1, !0); - }, i.commands.findPersistentNext = function (e) { - b(e, !1, !0, !0); - }, i.commands.findPersistentPrev = function (e) { - b(e, !0, !0, !0); - }, i.commands.findNext = b, i.commands.findPrev = function (e) { - b(e, !0); - }, i.commands.clearSearch = w, i.commands.replace = F, i.commands.replaceAll = function (e) { - F(e, !0); - }; - }); -})(); -var $ = B.exports; -const W = Q.getDefaultExportFromCjs($), - Y = U({ - __proto__: null, - default: W - }, [$]); -exports.search = Y; + obj = obj[key]; + } + return target; +}; +setValue.split = split; +setValue.cache = new Map(); +setValue.clear = () => { + setValue.cache = new Map(); +}; +module.exports = setValue; /***/ }), -/***/ "../../graphiql-react/dist/searchcursor.cjs.js": -/*!*****************************************************!*\ - !*** ../../graphiql-react/dist/searchcursor.cjs.js ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js": +/*!**********************************************************************!*\ + !*** ../../../node_modules/style-value-types/dist/valueTypes.cjs.js ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; -var n = Object.defineProperty; -var u = (r, o) => n(r, "name", { - value: o, - configurable: !0 +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +const clamp = (min, max) => v => Math.max(Math.min(v, max), min); +const sanitize = v => v % 1 ? Number(v.toFixed(5)) : v; +const floatRegex = /(-)?([\d]*\.?[\d])+/g; +const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi; +const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i; +function isString(v) { + return typeof v === 'string'; +} +const number = { + test: v => typeof v === 'number', + parse: parseFloat, + transform: v => v +}; +const alpha = Object.assign(Object.assign({}, number), { + transform: clamp(0, 1) }); -const i = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"), - f = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js"); -function l(r, o) { - for (var c = 0; c < o.length; c++) { - const e = o[c]; - if (typeof e != "string" && !Array.isArray(e)) { - for (const t in e) if (t !== "default" && !(t in r)) { - const s = Object.getOwnPropertyDescriptor(e, t); - s && Object.defineProperty(r, t, s.get ? s : { - enumerable: !0, - get: () => e[t] - }); - } - } +const scale = Object.assign(Object.assign({}, number), { + default: 1 +}); +const createUnitType = unit => ({ + test: v => isString(v) && v.endsWith(unit) && v.split(' ').length === 1, + parse: parseFloat, + transform: v => `${v}${unit}` +}); +const degrees = createUnitType('deg'); +const percent = createUnitType('%'); +const px = createUnitType('px'); +const vh = createUnitType('vh'); +const vw = createUnitType('vw'); +const progressPercentage = Object.assign(Object.assign({}, percent), { + parse: v => percent.parse(v) / 100, + transform: v => percent.transform(v * 100) +}); +const isColorString = (type, testProp) => v => { + return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp)); +}; +const splitColor = (aName, bName, cName) => v => { + if (!isString(v)) return v; + const [a, b, c, alpha] = v.match(floatRegex); + return { + [aName]: parseFloat(a), + [bName]: parseFloat(b), + [cName]: parseFloat(c), + alpha: alpha !== undefined ? parseFloat(alpha) : 1 + }; +}; +const hsla = { + test: isColorString('hsl', 'hue'), + parse: splitColor('hue', 'saturation', 'lightness'), + transform: ({ + hue, + saturation, + lightness, + alpha: alpha$1 = 1 + }) => { + return 'hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')'; } - return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { - value: "Module" - })); -} -u(l, "_mergeNamespaces"); -var a = f.requireSearchcursor(); -const g = i.getDefaultExportFromCjs(a), - p = l({ - __proto__: null, - default: g - }, [a]); -exports.searchcursor = p; - -/***/ }), - -/***/ "../../graphiql-react/dist/searchcursor.cjs2.js": -/*!******************************************************!*\ - !*** ../../graphiql-react/dist/searchcursor.cjs2.js ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -var W = Object.defineProperty; -var o = (d, E) => W(d, "name", { - value: E, - configurable: !0 +}; +const clampRgbUnit = clamp(0, 255); +const rgbUnit = Object.assign(Object.assign({}, number), { + transform: v => Math.round(clampRgbUnit(v)) }); -const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -var N = { - exports: {} - }, - b; -function H() { - return b || (b = 1, function (d, E) { - (function (m) { - m(G.requireCodemirror()); - })(function (m) { - var a = m.Pos; - function B(e) { - var t = e.flags; - return t !== null && t !== void 0 ? t : (e.ignoreCase ? "i" : "") + (e.global ? "g" : "") + (e.multiline ? "m" : ""); - } - o(B, "regexpFlags"); - function F(e, t) { - for (var n = B(e), r = n, l = 0; l < t.length; l++) r.indexOf(t.charAt(l)) == -1 && (r += t.charAt(l)); - return n == r ? e : new RegExp(e.source, r); - } - o(F, "ensureFlags"); - function R(e) { - return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source); - } - o(R, "maybeMultiline"); - function I(e, t, n) { - t = F(t, "g"); - for (var r = n.line, l = n.ch, i = e.lastLine(); r <= i; r++, l = 0) { - t.lastIndex = l; - var h = e.getLine(r), - f = t.exec(h); - if (f) return { - from: a(r, f.index), - to: a(r, f.index + f[0].length), - match: f - }; - } - } - o(I, "searchRegexpForward"); - function j(e, t, n) { - if (!R(t)) return I(e, t, n); - t = F(t, "gm"); - for (var r, l = 1, i = n.line, h = e.lastLine(); i <= h;) { - for (var f = 0; f < l && !(i > h); f++) { - var p = e.getLine(i++); - r = r == null ? p : r + ` -` + p; - } - l = l * 2, t.lastIndex = n.ch; - var u = t.exec(r); - if (u) { - var s = r.slice(0, u.index).split(` -`), - c = u[0].split(` -`), - g = n.line + s.length - 1, - v = s[s.length - 1].length; - return { - from: a(g, v), - to: a(g + c.length - 1, c.length == 1 ? v + c[0].length : c[c.length - 1].length), - match: u - }; - } - } - } - o(j, "searchRegexpForwardMultiline"); - function z(e, t, n) { - for (var r, l = 0; l <= e.length;) { - t.lastIndex = l; - var i = t.exec(e); - if (!i) break; - var h = i.index + i[0].length; - if (h > e.length - n) break; - (!r || h > r.index + r[0].length) && (r = i), l = i.index + 1; - } - return r; - } - o(z, "lastMatchIn"); - function D(e, t, n) { - t = F(t, "g"); - for (var r = n.line, l = n.ch, i = e.firstLine(); r >= i; r--, l = -1) { - var h = e.getLine(r), - f = z(h, t, l < 0 ? 0 : h.length - l); - if (f) return { - from: a(r, f.index), - to: a(r, f.index + f[0].length), - match: f - }; - } - } - o(D, "searchRegexpBackward"); - function A(e, t, n) { - if (!R(t)) return D(e, t, n); - t = F(t, "gm"); - for (var r, l = 1, i = e.getLine(n.line).length - n.ch, h = n.line, f = e.firstLine(); h >= f;) { - for (var p = 0; p < l && h >= f; p++) { - var u = e.getLine(h--); - r = r == null ? u : u + ` -` + r; - } - l *= 2; - var s = z(r, t, i); - if (s) { - var c = r.slice(0, s.index).split(` -`), - g = s[0].split(` -`), - v = h + c.length, - x = c[c.length - 1].length; - return { - from: a(v, x), - to: a(v + g.length - 1, g.length == 1 ? x + g[0].length : g[g.length - 1].length), - match: s - }; - } - } - } - o(A, "searchRegexpBackwardMultiline"); - var P, k; - String.prototype.normalize ? (P = o(function (e) { - return e.normalize("NFD").toLowerCase(); - }, "doFold"), k = o(function (e) { - return e.normalize("NFD"); - }, "noFold")) : (P = o(function (e) { - return e.toLowerCase(); - }, "doFold"), k = o(function (e) { - return e; - }, "noFold")); - function L(e, t, n, r) { - if (e.length == t.length) return n; - for (var l = 0, i = n + Math.max(0, e.length - t.length);;) { - if (l == i) return l; - var h = l + i >> 1, - f = r(e.slice(0, h)).length; - if (f == n) return h; - f > n ? i = h : l = h + 1; - } - } - o(L, "adjustPos"); - function y(e, t, n, r) { - if (!t.length) return null; - var l = r ? P : k, - i = l(t).split(/\r|\n\r?/); - t: for (var h = n.line, f = n.ch, p = e.lastLine() + 1 - i.length; h <= p; h++, f = 0) { - var u = e.getLine(h).slice(f), - s = l(u); - if (i.length == 1) { - var c = s.indexOf(i[0]); - if (c == -1) continue t; - var n = L(u, s, c, l) + f; - return { - from: a(h, L(u, s, c, l) + f), - to: a(h, L(u, s, c + i[0].length, l) + f) - }; - } else { - var g = s.length - i[0].length; - if (s.slice(g) != i[0]) continue t; - for (var v = 1; v < i.length - 1; v++) if (l(e.getLine(h + v)) != i[v]) continue t; - var x = e.getLine(h + i.length - 1), - O = l(x), - S = i[i.length - 1]; - if (O.slice(0, S.length) != S) continue t; - return { - from: a(h, L(u, s, g, l) + f), - to: a(h + i.length - 1, L(x, O, S.length, l)) - }; - } - } - } - o(y, "searchStringForward"); - function C(e, t, n, r) { - if (!t.length) return null; - var l = r ? P : k, - i = l(t).split(/\r|\n\r?/); - t: for (var h = n.line, f = n.ch, p = e.firstLine() - 1 + i.length; h >= p; h--, f = -1) { - var u = e.getLine(h); - f > -1 && (u = u.slice(0, f)); - var s = l(u); - if (i.length == 1) { - var c = s.lastIndexOf(i[0]); - if (c == -1) continue t; - return { - from: a(h, L(u, s, c, l)), - to: a(h, L(u, s, c + i[0].length, l)) - }; - } else { - var g = i[i.length - 1]; - if (s.slice(0, g.length) != g) continue t; - for (var v = 1, n = h - i.length + 1; v < i.length - 1; v++) if (l(e.getLine(n + v)) != i[v]) continue t; - var x = e.getLine(h + 1 - i.length), - O = l(x); - if (O.slice(O.length - i[0].length) != i[0]) continue t; - return { - from: a(h + 1 - i.length, L(x, O, x.length - i[0].length, l)), - to: a(h, L(u, s, g.length, l)) - }; - } - } - } - o(C, "searchStringBackward"); - function w(e, t, n, r) { - this.atOccurrence = !1, this.afterEmptyMatch = !1, this.doc = e, n = n ? e.clipPos(n) : a(0, 0), this.pos = { - from: n, - to: n - }; - var l; - typeof r == "object" ? l = r.caseFold : (l = r, r = null), typeof t == "string" ? (l == null && (l = !1), this.matches = function (i, h) { - return (i ? C : y)(e, t, h, l); - }) : (t = F(t, "gm"), !r || r.multiline !== !1 ? this.matches = function (i, h) { - return (i ? A : j)(e, t, h); - } : this.matches = function (i, h) { - return (i ? D : I)(e, t, h); - }); - } - o(w, "SearchCursor"), w.prototype = { - findNext: function () { - return this.find(!1); - }, - findPrevious: function () { - return this.find(!0); - }, - find: function (e) { - var t = this.doc.clipPos(e ? this.pos.from : this.pos.to); - if (this.afterEmptyMatch && this.atOccurrence && (t = a(t.line, t.ch), e ? (t.ch--, t.ch < 0 && (t.line--, t.ch = (this.doc.getLine(t.line) || "").length)) : (t.ch++, t.ch > (this.doc.getLine(t.line) || "").length && (t.ch = 0, t.line++)), m.cmpPos(t, this.doc.clipPos(t)) != 0)) return this.atOccurrence = !1; - var n = this.matches(e, t); - if (this.afterEmptyMatch = n && m.cmpPos(n.from, n.to) == 0, n) return this.pos = n, this.atOccurrence = !0, this.pos.match || !0; - var r = a(e ? this.doc.firstLine() : this.doc.lastLine() + 1, 0); - return this.pos = { - from: r, - to: r - }, this.atOccurrence = !1; - }, - from: function () { - if (this.atOccurrence) return this.pos.from; - }, - to: function () { - if (this.atOccurrence) return this.pos.to; - }, - replace: function (e, t) { - if (this.atOccurrence) { - var n = m.splitLines(e); - this.doc.replaceRange(n, this.pos.from, this.pos.to, t), this.pos.to = a(this.pos.from.line + n.length - 1, n[n.length - 1].length + (n.length == 1 ? this.pos.from.ch : 0)); - } - } - }, m.defineExtension("getSearchCursor", function (e, t, n) { - return new w(this.doc, e, t, n); - }), m.defineDocExtension("getSearchCursor", function (e, t, n) { - return new w(this, e, t, n); - }), m.defineExtension("selectMatches", function (e, t) { - for (var n = [], r = this.getSearchCursor(e, this.getCursor("from"), t); r.findNext() && !(m.cmpPos(r.to(), this.getCursor("to")) > 0);) n.push({ - anchor: r.from(), - head: r.to() - }); - n.length && this.setSelections(n, 0); - }); - }); - }()), N.exports; +const rgba = { + test: isColorString('rgb', 'red'), + parse: splitColor('red', 'green', 'blue'), + transform: ({ + red, + green, + blue, + alpha: alpha$1 = 1 + }) => 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')' +}; +function parseHex(v) { + let r = ''; + let g = ''; + let b = ''; + let a = ''; + if (v.length > 5) { + r = v.substr(1, 2); + g = v.substr(3, 2); + b = v.substr(5, 2); + a = v.substr(7, 2); + } else { + r = v.substr(1, 1); + g = v.substr(2, 1); + b = v.substr(3, 1); + a = v.substr(4, 1); + r += r; + g += g; + b += b; + a += a; + } + return { + red: parseInt(r, 16), + green: parseInt(g, 16), + blue: parseInt(b, 16), + alpha: a ? parseInt(a, 16) / 255 : 1 + }; } -o(H, "requireSearchcursor"); -exports.requireSearchcursor = H; - -/***/ }), - -/***/ "../../graphiql-react/dist/show-hint.cjs.js": -/*!**************************************************!*\ - !*** ../../graphiql-react/dist/show-hint.cjs.js ***! - \**************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -var ct = Object.defineProperty; -var p = (H, A) => ct(H, "name", { - value: A, - configurable: !0 -}); -const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"); -function lt(H, A) { - for (var r = 0; r < A.length; r++) { - const w = A[r]; - if (typeof w != "string" && !Array.isArray(w)) { - for (const v in w) if (v !== "default" && !(v in H)) { - const b = Object.getOwnPropertyDescriptor(w, v); - b && Object.defineProperty(H, v, b.get ? b : { - enumerable: !0, - get: () => w[v] - }); - } +const hex = { + test: isColorString('#'), + parse: parseHex, + transform: rgba.transform +}; +const color = { + test: v => rgba.test(v) || hex.test(v) || hsla.test(v), + parse: v => { + if (rgba.test(v)) { + return rgba.parse(v); + } else if (hsla.test(v)) { + return hsla.parse(v); + } else { + return hex.parse(v); } + }, + transform: v => { + return isString(v) ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v); } - return Object.freeze(Object.defineProperty(H, Symbol.toStringTag, { - value: "Module" - })); +}; +const colorToken = '${c}'; +const numberToken = '${n}'; +function test(v) { + var _a, _b, _c, _d; + return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0; +} +function analyse(v) { + if (typeof v === 'number') v = `${v}`; + const values = []; + let numColors = 0; + const colors = v.match(colorRegex); + if (colors) { + numColors = colors.length; + v = v.replace(colorRegex, colorToken); + values.push(...colors.map(color.parse)); + } + const numbers = v.match(floatRegex); + if (numbers) { + v = v.replace(floatRegex, numberToken); + values.push(...numbers.map(number.parse)); + } + return { + values, + numColors, + tokenised: v + }; +} +function parse(v) { + return analyse(v).values; +} +function createTransformer(v) { + const { + values, + numColors, + tokenised + } = analyse(v); + const numValues = values.length; + return v => { + let output = tokenised; + for (let i = 0; i < numValues; i++) { + output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i])); + } + return output; + }; +} +const convertNumbersToZero = v => typeof v === 'number' ? 0 : v; +function getAnimatableNone(v) { + const parsed = parse(v); + const transformer = createTransformer(v); + return transformer(parsed.map(convertNumbersToZero)); } -p(lt, "_mergeNamespaces"); -var ht = { - exports: {} +const complex = { + test, + parse, + createTransformer, + getAnimatableNone }; -(function (H, A) { - (function (r) { - r(G.requireCodemirror()); - })(function (r) { - var w = "CodeMirror-hint", - v = "CodeMirror-hint-active"; - r.showHint = function (t, e, i) { - if (!e) return t.showHint(i); - i && i.async && (e.async = !0); - var n = { - hint: e - }; - if (i) for (var s in i) n[s] = i[s]; - return t.showHint(n); - }, r.defineExtension("showHint", function (t) { - t = tt(this, this.getCursor("start"), t); - var e = this.listSelections(); - if (!(e.length > 1)) { - if (this.somethingSelected()) { - if (!t.hint.supportsSelection) return; - for (var i = 0; i < e.length; i++) if (e[i].head.line != e[i].anchor.line) return; - } - this.state.completionActive && this.state.completionActive.close(); - var n = this.state.completionActive = new b(this, t); - n.options.hint && (r.signal(this, "startCompletion", this), n.update(!0)); - } - }), r.defineExtension("closeHint", function () { - this.state.completionActive && this.state.completionActive.close(); - }); - function b(t, e) { - if (this.cm = t, this.options = e, this.widget = null, this.debounce = 0, this.tick = 0, this.startPos = this.cm.getCursor("start"), this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length, this.options.updateOnCursorActivity) { - var i = this; - t.on("cursorActivity", this.activityFunc = function () { - i.cursorActivity(); - }); - } - } - p(b, "Completion"); - var Q = window.requestAnimationFrame || function (t) { - return setTimeout(t, 1e3 / 60); - }, - Z = window.cancelAnimationFrame || clearTimeout; - b.prototype = { - close: function () { - this.active() && (this.cm.state.completionActive = null, this.tick = null, this.options.updateOnCursorActivity && this.cm.off("cursorActivity", this.activityFunc), this.widget && this.data && r.signal(this.data, "close"), this.widget && this.widget.close(), r.signal(this.cm, "endCompletion", this.cm)); - }, - active: function () { - return this.cm.state.completionActive == this; - }, - pick: function (t, e) { - var i = t.list[e], - n = this; - this.cm.operation(function () { - i.hint ? i.hint(n.cm, t, i) : n.cm.replaceRange(_(i), i.from || t.from, i.to || t.to, "complete"), r.signal(t, "pick", i), n.cm.scrollIntoView(); - }), this.options.closeOnPick && this.close(); - }, - cursorActivity: function () { - this.debounce && (Z(this.debounce), this.debounce = 0); - var t = this.startPos; - this.data && (t = this.data.from); - var e = this.cm.getCursor(), - i = this.cm.getLine(e.line); - if (e.line != this.startPos.line || i.length - e.ch != this.startLen - this.startPos.ch || e.ch < t.ch || this.cm.somethingSelected() || !e.ch || this.options.closeCharacters.test(i.charAt(e.ch - 1))) this.close();else { - var n = this; - this.debounce = Q(function () { - n.update(); - }), this.widget && this.widget.disable(); - } - }, - update: function (t) { - if (this.tick != null) { - var e = this, - i = ++this.tick; - U(this.options.hint, this.cm, this.options, function (n) { - e.tick == i && e.finishUpdate(n, t); - }); - } - }, - finishUpdate: function (t, e) { - this.data && r.signal(this.data, "update"); - var i = this.widget && this.widget.picked || e && this.options.completeSingle; - this.widget && this.widget.close(), this.data = t, t && t.list.length && (i && t.list.length == 1 ? this.pick(t, 0) : (this.widget = new K(this, t), r.signal(t, "shown"))); - } - }; - function tt(t, e, i) { - var n = t.options.hintOptions, - s = {}; - for (var c in D) s[c] = D[c]; - if (n) for (var c in n) n[c] !== void 0 && (s[c] = n[c]); - if (i) for (var c in i) i[c] !== void 0 && (s[c] = i[c]); - return s.hint.resolve && (s.hint = s.hint.resolve(t, e)), s; - } - p(tt, "parseOptions"); - function _(t) { - return typeof t == "string" ? t : t.text; - } - p(_, "getText"); - function et(t, e) { - var i = { - Up: function () { - e.moveFocus(-1); - }, - Down: function () { - e.moveFocus(1); - }, - PageUp: function () { - e.moveFocus(-e.menuSize() + 1, !0); - }, - PageDown: function () { - e.moveFocus(e.menuSize() - 1, !0); - }, - Home: function () { - e.setFocus(0); - }, - End: function () { - e.setFocus(e.length - 1); - }, - Enter: e.pick, - Tab: e.pick, - Esc: e.close - }, - n = /Mac/.test(navigator.platform); - n && (i["Ctrl-P"] = function () { - e.moveFocus(-1); - }, i["Ctrl-N"] = function () { - e.moveFocus(1); - }); - var s = t.options.customKeys, - c = s ? {} : i; - function o(u, l) { - var a; - typeof l != "string" ? a = p(function (S) { - return l(S, e); - }, "bound") : i.hasOwnProperty(l) ? a = i[l] : a = l, c[u] = a; - } - if (p(o, "addBinding"), s) for (var f in s) s.hasOwnProperty(f) && o(f, s[f]); - var h = t.options.extraKeys; - if (h) for (var f in h) h.hasOwnProperty(f) && o(f, h[f]); - return c; - } - p(et, "buildKeyMap"); - function B(t, e) { - for (; e && e != t;) { - if (e.nodeName.toUpperCase() === "LI" && e.parentNode == t) return e; - e = e.parentNode; - } - } - p(B, "getHintElement"); - function K(t, e) { - this.id = "cm-complete-" + Math.floor(Math.random(1e6)), this.completion = t, this.data = e, this.picked = !1; - var i = this, - n = t.cm, - s = n.getInputField().ownerDocument, - c = s.defaultView || s.parentWindow, - o = this.hints = s.createElement("ul"); - o.setAttribute("role", "listbox"), o.setAttribute("aria-expanded", "true"), o.id = this.id; - var f = t.cm.options.theme; - o.className = "CodeMirror-hints " + f, this.selectedHint = e.selectedHint || 0; - for (var h = e.list, u = 0; u < h.length; ++u) { - var l = o.appendChild(s.createElement("li")), - a = h[u], - S = w + (u != this.selectedHint ? "" : " " + v); - a.className != null && (S = a.className + " " + S), l.className = S, u == this.selectedHint && l.setAttribute("aria-selected", "true"), l.id = this.id + "-" + u, l.setAttribute("role", "option"), a.render ? a.render(l, e, a) : l.appendChild(s.createTextNode(a.displayText || _(a))), l.hintId = u; - } - var T = t.options.container || s.body, - y = n.cursorCoords(t.options.alignWithWord ? e.from : null), - k = y.left, - O = y.bottom, - j = !0, - F = 0, - E = 0; - if (T !== s.body) { - var st = ["absolute", "relative", "fixed"].indexOf(c.getComputedStyle(T).position) !== -1, - W = st ? T : T.offsetParent, - M = W.getBoundingClientRect(), - q = s.body.getBoundingClientRect(); - F = M.left - q.left - W.scrollLeft, E = M.top - q.top - W.scrollTop; - } - o.style.left = k - F + "px", o.style.top = O - E + "px"; - var N = c.innerWidth || Math.max(s.body.offsetWidth, s.documentElement.offsetWidth), - L = c.innerHeight || Math.max(s.body.offsetHeight, s.documentElement.offsetHeight); - T.appendChild(o), n.getInputField().setAttribute("aria-autocomplete", "list"), n.getInputField().setAttribute("aria-owns", this.id), n.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint); - var m = t.options.moveOnOverlap ? o.getBoundingClientRect() : new DOMRect(), - z = t.options.paddingForScrollbar ? o.scrollHeight > o.clientHeight + 1 : !1, - x; - setTimeout(function () { - x = n.getScrollInfo(); - }); - var ot = m.bottom - L; - if (ot > 0) { - var P = m.bottom - m.top, - rt = y.top - (y.bottom - m.top); - if (rt - P > 0) o.style.top = (O = y.top - P - E) + "px", j = !1;else if (P > L) { - o.style.height = L - 5 + "px", o.style.top = (O = y.bottom - m.top - E) + "px"; - var V = n.getCursor(); - e.from.ch != V.ch && (y = n.cursorCoords(V), o.style.left = (k = y.left - F) + "px", m = o.getBoundingClientRect()); - } - } - var C = m.right - N; - if (z && (C += n.display.nativeBarWidth), C > 0 && (m.right - m.left > N && (o.style.width = N - 5 + "px", C -= m.right - m.left - N), o.style.left = (k = y.left - C - F) + "px"), z) for (var I = o.firstChild; I; I = I.nextSibling) I.style.paddingRight = n.display.nativeBarWidth + "px"; - if (n.addKeyMap(this.keyMap = et(t, { - moveFocus: function (d, g) { - i.changeActive(i.selectedHint + d, g); - }, - setFocus: function (d) { - i.changeActive(d); - }, - menuSize: function () { - return i.screenAmount(); - }, - length: h.length, - close: function () { - t.close(); - }, - pick: function () { - i.pick(); - }, - data: e - })), t.options.closeOnUnfocus) { - var Y; - n.on("blur", this.onBlur = function () { - Y = setTimeout(function () { - t.close(); - }, 100); - }), n.on("focus", this.onFocus = function () { - clearTimeout(Y); - }); - } - n.on("scroll", this.onScroll = function () { - var d = n.getScrollInfo(), - g = n.getWrapperElement().getBoundingClientRect(); - x || (x = n.getScrollInfo()); - var X = O + x.top - d.top, - R = X - (c.pageYOffset || (s.documentElement || s.body).scrollTop); - if (j || (R += o.offsetHeight), R <= g.top || R >= g.bottom) return t.close(); - o.style.top = X + "px", o.style.left = k + x.left - d.left + "px"; - }), r.on(o, "dblclick", function (d) { - var g = B(o, d.target || d.srcElement); - g && g.hintId != null && (i.changeActive(g.hintId), i.pick()); - }), r.on(o, "click", function (d) { - var g = B(o, d.target || d.srcElement); - g && g.hintId != null && (i.changeActive(g.hintId), t.options.completeOnSingleClick && i.pick()); - }), r.on(o, "mousedown", function () { - setTimeout(function () { - n.focus(); - }, 20); - }); - var $ = this.getSelectedHintRange(); - return ($.from !== 0 || $.to !== 0) && this.scrollToActive(), r.signal(e, "select", h[this.selectedHint], o.childNodes[this.selectedHint]), !0; - } - p(K, "Widget"), K.prototype = { - close: function () { - if (this.completion.widget == this) { - this.completion.widget = null, this.hints.parentNode && this.hints.parentNode.removeChild(this.hints), this.completion.cm.removeKeyMap(this.keyMap); - var t = this.completion.cm.getInputField(); - t.removeAttribute("aria-activedescendant"), t.removeAttribute("aria-owns"); - var e = this.completion.cm; - this.completion.options.closeOnUnfocus && (e.off("blur", this.onBlur), e.off("focus", this.onFocus)), e.off("scroll", this.onScroll); - } - }, - disable: function () { - this.completion.cm.removeKeyMap(this.keyMap); - var t = this; - this.keyMap = { - Enter: function () { - t.picked = !0; - } - }, this.completion.cm.addKeyMap(this.keyMap); - }, - pick: function () { - this.completion.pick(this.data, this.selectedHint); - }, - changeActive: function (t, e) { - if (t >= this.data.list.length ? t = e ? this.data.list.length - 1 : 0 : t < 0 && (t = e ? 0 : this.data.list.length - 1), this.selectedHint != t) { - var i = this.hints.childNodes[this.selectedHint]; - i && (i.className = i.className.replace(" " + v, ""), i.removeAttribute("aria-selected")), i = this.hints.childNodes[this.selectedHint = t], i.className += " " + v, i.setAttribute("aria-selected", "true"), this.completion.cm.getInputField().setAttribute("aria-activedescendant", i.id), this.scrollToActive(), r.signal(this.data, "select", this.data.list[this.selectedHint], i); - } - }, - scrollToActive: function () { - var t = this.getSelectedHintRange(), - e = this.hints.childNodes[t.from], - i = this.hints.childNodes[t.to], - n = this.hints.firstChild; - e.offsetTop < this.hints.scrollTop ? this.hints.scrollTop = e.offsetTop - n.offsetTop : i.offsetTop + i.offsetHeight > this.hints.scrollTop + this.hints.clientHeight && (this.hints.scrollTop = i.offsetTop + i.offsetHeight - this.hints.clientHeight + n.offsetTop); - }, - screenAmount: function () { - return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; - }, - getSelectedHintRange: function () { - var t = this.completion.options.scrollMargin || 0; - return { - from: Math.max(0, this.selectedHint - t), - to: Math.min(this.data.list.length - 1, this.selectedHint + t) - }; - } - }; - function it(t, e) { - if (!t.somethingSelected()) return e; - for (var i = [], n = 0; n < e.length; n++) e[n].supportsSelection && i.push(e[n]); - return i; - } - p(it, "applicableHelpers"); - function U(t, e, i, n) { - if (t.async) t(e, n, i);else { - var s = t(e, i); - s && s.then ? s.then(n) : n(s); - } - } - p(U, "fetchHints"); - function nt(t, e) { - var i = t.getHelpers(e, "hint"), - n; - if (i.length) { - var s = p(function (c, o, f) { - var h = it(c, i); - function u(l) { - if (l == h.length) return o(null); - U(h[l], c, f, function (a) { - a && a.list.length > 0 ? o(a) : u(l + 1); - }); - } - p(u, "run"), u(0); - }, "resolved"); - return s.async = !0, s.supportsSelection = !0, s; - } else return (n = t.getHelper(t.getCursor(), "hintWords")) ? function (c) { - return r.hint.fromList(c, { - words: n - }); - } : r.hint.anyword ? function (c, o) { - return r.hint.anyword(c, o); - } : function () {}; - } - p(nt, "resolveAutoHints"), r.registerHelper("hint", "auto", { - resolve: nt - }), r.registerHelper("hint", "fromList", function (t, e) { - var i = t.getCursor(), - n = t.getTokenAt(i), - s, - c = r.Pos(i.line, n.start), - o = i; - n.start < i.ch && /\w/.test(n.string.charAt(i.ch - n.start - 1)) ? s = n.string.substr(0, i.ch - n.start) : (s = "", c = i); - for (var f = [], h = 0; h < e.words.length; h++) { - var u = e.words[h]; - u.slice(0, s.length) == s && f.push(u); - } - if (f.length) return { - list: f, - from: c, - to: o - }; - }), r.commands.autocomplete = r.showHint; - var D = { - hint: r.hint.auto, - completeSingle: !0, - alignWithWord: !0, - closeCharacters: /[\s()\[\]{};:>,]/, - closeOnPick: !0, - closeOnUnfocus: !0, - updateOnCursorActivity: !0, - completeOnSingleClick: !0, - container: null, - customKeys: null, - extraKeys: null, - paddingForScrollbar: !0, - moveOnOverlap: !0 - }; - r.defineOption("hintOptions", null); - }); -})(); -var J = ht.exports; -const at = G.getDefaultExportFromCjs(J), - ft = lt({ - __proto__: null, - default: at - }, [J]); -exports.showHint = ft; +const maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']); +function applyDefaultFilter(v) { + let [name, value] = v.slice(0, -1).split('('); + if (name === 'drop-shadow') return v; + const [number] = value.match(floatRegex) || []; + if (!number) return v; + const unit = value.replace(number, ''); + let defaultValue = maxDefaults.has(name) ? 1 : 0; + if (number !== value) defaultValue *= 100; + return name + '(' + defaultValue + unit + ')'; +} +const functionRegex = /([a-z-]*)\(.*?\)/g; +const filter = Object.assign(Object.assign({}, complex), { + getAnimatableNone: v => { + const functions = v.match(functionRegex); + return functions ? functions.map(applyDefaultFilter).join(' ') : v; + } +}); +exports.alpha = alpha; +exports.color = color; +exports.complex = complex; +exports.degrees = degrees; +exports.filter = filter; +exports.hex = hex; +exports.hsla = hsla; +exports.number = number; +exports.percent = percent; +exports.progressPercentage = progressPercentage; +exports.px = px; +exports.rgbUnit = rgbUnit; +exports.rgba = rgba; +exports.scale = scale; +exports.vh = vh; +exports.vw = vw; /***/ }), -/***/ "../../graphiql-react/dist/sublime.cjs.js": -/*!************************************************!*\ - !*** ../../graphiql-react/dist/sublime.cjs.js ***! - \************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/toggle-selection/index.js": +/*!*******************************************************!*\ + !*** ../../../node_modules/toggle-selection/index.js ***! + \*******************************************************/ +/***/ (function(module) { +"use strict"; -var _ = Object.defineProperty; -var v = (m, B) => _(m, "name", { - value: B, - configurable: !0 -}); -const E = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"), - Y = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js"), - z = __webpack_require__(/*! ./matchbrackets.cjs2.js */ "../../graphiql-react/dist/matchbrackets.cjs2.js"); -function J(m, B) { - for (var h = 0; h < B.length; h++) { - const a = B[h]; - if (typeof a != "string" && !Array.isArray(a)) { - for (const f in a) if (f !== "default" && !(f in m)) { - const A = Object.getOwnPropertyDescriptor(a, f); - A && Object.defineProperty(m, f, A.get ? A : { - enumerable: !0, - get: () => a[f] - }); - } - } +module.exports = function () { + var selection = document.getSelection(); + if (!selection.rangeCount) { + return function () {}; } - return Object.freeze(Object.defineProperty(m, Symbol.toStringTag, { - value: "Module" - })); -} -v(J, "_mergeNamespaces"); -var G = { - exports: {} -}; -(function (m, B) { - (function (h) { - h(E.requireCodemirror(), Y.requireSearchcursor(), z.requireMatchbrackets()); - })(function (h) { - var a = h.commands, - f = h.Pos; - function A(e, t, n) { - if (n < 0 && t.ch == 0) return e.clipPos(f(t.line - 1)); - var r = e.getLine(t.line); - if (n > 0 && t.ch >= r.length) return e.clipPos(f(t.line + 1, 0)); - for (var l = "start", i, o = t.ch, s = o, u = n < 0 ? 0 : r.length, d = 0; s != u; s += n, d++) { - var p = r.charAt(n < 0 ? s - 1 : s), - c = p != "_" && h.isWordChar(p) ? "w" : "o"; - if (c == "w" && p.toUpperCase() == p && (c = "W"), l == "start") c != "o" ? (l = "in", i = c) : o = s + n;else if (l == "in" && i != c) { - if (i == "w" && c == "W" && n < 0 && s--, i == "W" && c == "w" && n > 0) if (s == o + 1) { - i = "w"; - continue; - } else s--; - break; - } - } - return f(t.line, s); - } - v(A, "findPosSubword"); - function T(e, t) { - e.extendSelectionsBy(function (n) { - return e.display.shift || e.doc.extend || n.empty() ? A(e.doc, n.head, t) : t < 0 ? n.from() : n.to(); - }); - } - v(T, "moveSubword"), a.goSubwordLeft = function (e) { - T(e, -1); - }, a.goSubwordRight = function (e) { - T(e, 1); - }, a.scrollLineUp = function (e) { - var t = e.getScrollInfo(); - if (!e.somethingSelected()) { - var n = e.lineAtHeight(t.top + t.clientHeight, "local"); - e.getCursor().line >= n && e.execCommand("goLineUp"); - } - e.scrollTo(null, t.top - e.defaultTextHeight()); - }, a.scrollLineDown = function (e) { - var t = e.getScrollInfo(); - if (!e.somethingSelected()) { - var n = e.lineAtHeight(t.top, "local") + 1; - e.getCursor().line <= n && e.execCommand("goLineDown"); - } - e.scrollTo(null, t.top + e.defaultTextHeight()); - }, a.splitSelectionByLine = function (e) { - for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) for (var l = t[r].from(), i = t[r].to(), o = l.line; o <= i.line; ++o) i.line > l.line && o == i.line && i.ch == 0 || n.push({ - anchor: o == l.line ? l : f(o, 0), - head: o == i.line ? i : f(o) - }); - e.setSelections(n, 0); - }, a.singleSelectionTop = function (e) { - var t = e.listSelections()[0]; - e.setSelection(t.anchor, t.head, { - scroll: !1 - }); - }, a.selectLine = function (e) { - for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) { - var l = t[r]; - n.push({ - anchor: f(l.from().line, 0), - head: f(l.to().line + 1, 0) - }); - } - e.setSelections(n); - }; - function x(e, t) { - if (e.isReadOnly()) return h.Pass; - e.operation(function () { - for (var n = e.listSelections().length, r = [], l = -1, i = 0; i < n; i++) { - var o = e.listSelections()[i].head; - if (!(o.line <= l)) { - var s = f(o.line + (t ? 0 : 1), 0); - e.replaceRange(` -`, s, null, "+insertLine"), e.indentLine(s.line, null, !0), r.push({ - head: s, - anchor: s - }), l = o.line + 1; - } - } - e.setSelections(r); - }), e.execCommand("indentAuto"); - } - v(x, "insertLine"), a.insertLineAfter = function (e) { - return x(e, !1); - }, a.insertLineBefore = function (e) { - return x(e, !0); - }; - function K(e, t) { - for (var n = t.ch, r = n, l = e.getLine(t.line); n && h.isWordChar(l.charAt(n - 1));) --n; - for (; r < l.length && h.isWordChar(l.charAt(r));) ++r; - return { - from: f(t.line, n), - to: f(t.line, r), - word: l.slice(n, r) - }; - } - v(K, "wordAt"), a.selectNextOccurrence = function (e) { - var t = e.getCursor("from"), - n = e.getCursor("to"), - r = e.state.sublimeFindFullWord == e.doc.sel; - if (h.cmpPos(t, n) == 0) { - var l = K(e, t); - if (!l.word) return; - e.setSelection(l.from, l.to), r = !0; - } else { - var i = e.getRange(t, n), - o = r ? new RegExp("\\b" + i + "\\b") : i, - s = e.getSearchCursor(o, n), - u = s.findNext(); - if (u || (s = e.getSearchCursor(o, f(e.firstLine(), 0)), u = s.findNext()), !u || H(e.listSelections(), s.from(), s.to())) return; - e.addSelection(s.from(), s.to()); - } - r && (e.state.sublimeFindFullWord = e.doc.sel); - }, a.skipAndSelectNextOccurrence = function (e) { - var t = e.getCursor("anchor"), - n = e.getCursor("head"); - a.selectNextOccurrence(e), h.cmpPos(t, n) != 0 && e.doc.setSelections(e.doc.listSelections().filter(function (r) { - return r.anchor != t || r.head != n; - })); - }; - function y(e, t) { - for (var n = e.listSelections(), r = [], l = 0; l < n.length; l++) { - var i = n[l], - o = e.findPosV(i.anchor, t, "line", i.anchor.goalColumn), - s = e.findPosV(i.head, t, "line", i.head.goalColumn); - o.goalColumn = i.anchor.goalColumn != null ? i.anchor.goalColumn : e.cursorCoords(i.anchor, "div").left, s.goalColumn = i.head.goalColumn != null ? i.head.goalColumn : e.cursorCoords(i.head, "div").left; - var u = { - anchor: o, - head: s - }; - r.push(i), r.push(u); - } - e.setSelections(r); - } - v(y, "addCursorToSelection"), a.addCursorToPrevLine = function (e) { - y(e, -1); - }, a.addCursorToNextLine = function (e) { - y(e, 1); - }; - function H(e, t, n) { - for (var r = 0; r < e.length; r++) if (h.cmpPos(e[r].from(), t) == 0 && h.cmpPos(e[r].to(), n) == 0) return !0; - return !1; - } - v(H, "isSelectedRange"); - var P = "(){}[]"; - function U(e) { - for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) { - var l = t[r], - i = l.head, - o = e.scanForBracket(i, -1); - if (!o) return !1; - for (;;) { - var s = e.scanForBracket(i, 1); - if (!s) return !1; - if (s.ch == P.charAt(P.indexOf(o.ch) + 1)) { - var u = f(o.pos.line, o.pos.ch + 1); - if (h.cmpPos(u, l.from()) == 0 && h.cmpPos(s.pos, l.to()) == 0) { - if (o = e.scanForBracket(o.pos, -1), !o) return !1; - } else { - n.push({ - anchor: u, - head: s.pos - }); - break; - } - } - i = f(s.pos.line, s.pos.ch + 1); - } - } - return e.setSelections(n), !0; - } - v(U, "selectBetweenBrackets"), a.selectScope = function (e) { - U(e) || e.execCommand("selectAll"); - }, a.selectBetweenBrackets = function (e) { - if (!U(e)) return h.Pass; - }; - function I(e) { - return e ? /\bpunctuation\b/.test(e) ? e : void 0 : null; - } - v(I, "puncType"), a.goToBracket = function (e) { - e.extendSelectionsBy(function (t) { - var n = e.scanForBracket(t.head, 1, I(e.getTokenTypeAt(t.head))); - if (n && h.cmpPos(n.pos, t.head) != 0) return n.pos; - var r = e.scanForBracket(t.head, -1, I(e.getTokenTypeAt(f(t.head.line, t.head.ch + 1)))); - return r && f(r.pos.line, r.pos.ch + 1) || t.head; - }); - }, a.swapLineUp = function (e) { - if (e.isReadOnly()) return h.Pass; - for (var t = e.listSelections(), n = [], r = e.firstLine() - 1, l = [], i = 0; i < t.length; i++) { - var o = t[i], - s = o.from().line - 1, - u = o.to().line; - l.push({ - anchor: f(o.anchor.line - 1, o.anchor.ch), - head: f(o.head.line - 1, o.head.ch) - }), o.to().ch == 0 && !o.empty() && --u, s > r ? n.push(s, u) : n.length && (n[n.length - 1] = u), r = u; - } - e.operation(function () { - for (var d = 0; d < n.length; d += 2) { - var p = n[d], - c = n[d + 1], - b = e.getLine(p); - e.replaceRange("", f(p, 0), f(p + 1, 0), "+swapLine"), c > e.lastLine() ? e.replaceRange(` -` + b, f(e.lastLine()), null, "+swapLine") : e.replaceRange(b + ` -`, f(c, 0), null, "+swapLine"); - } - e.setSelections(l), e.scrollIntoView(); - }); - }, a.swapLineDown = function (e) { - if (e.isReadOnly()) return h.Pass; - for (var t = e.listSelections(), n = [], r = e.lastLine() + 1, l = t.length - 1; l >= 0; l--) { - var i = t[l], - o = i.to().line + 1, - s = i.from().line; - i.to().ch == 0 && !i.empty() && o--, o < r ? n.push(o, s) : n.length && (n[n.length - 1] = s), r = s; - } - e.operation(function () { - for (var u = n.length - 2; u >= 0; u -= 2) { - var d = n[u], - p = n[u + 1], - c = e.getLine(d); - d == e.lastLine() ? e.replaceRange("", f(d - 1), f(d), "+swapLine") : e.replaceRange("", f(d, 0), f(d + 1, 0), "+swapLine"), e.replaceRange(c + ` -`, f(p, 0), null, "+swapLine"); - } - e.scrollIntoView(); - }); - }, a.toggleCommentIndented = function (e) { - e.toggleComment({ - indent: !0 - }); - }, a.joinLines = function (e) { - for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) { - for (var l = t[r], i = l.from(), o = i.line, s = l.to().line; r < t.length - 1 && t[r + 1].from().line == s;) s = t[++r].to().line; - n.push({ - start: o, - end: s, - anchor: !l.empty() && i - }); - } - e.operation(function () { - for (var u = 0, d = [], p = 0; p < n.length; p++) { - for (var c = n[p], b = c.anchor && f(c.anchor.line - u, c.anchor.ch), w, g = c.start; g <= c.end; g++) { - var S = g - u; - g == c.end && (w = f(S, e.getLine(S).length + 1)), S < e.lastLine() && (e.replaceRange(" ", f(S), f(S + 1, /^\s*/.exec(e.getLine(S + 1))[0].length)), ++u); - } - d.push({ - anchor: b || w, - head: w - }); - } - e.setSelections(d, 0); - }); - }, a.duplicateLine = function (e) { - e.operation(function () { - for (var t = e.listSelections().length, n = 0; n < t; n++) { - var r = e.listSelections()[n]; - r.empty() ? e.replaceRange(e.getLine(r.head.line) + ` -`, f(r.head.line, 0)) : e.replaceRange(e.getRange(r.from(), r.to()), r.from()); - } - e.scrollIntoView(); - }); - }; - function R(e, t, n) { - if (e.isReadOnly()) return h.Pass; - for (var r = e.listSelections(), l = [], i, o = 0; o < r.length; o++) { - var s = r[o]; - if (!s.empty()) { - for (var u = s.from().line, d = s.to().line; o < r.length - 1 && r[o + 1].from().line == d;) d = r[++o].to().line; - r[o].to().ch || d--, l.push(u, d); - } - } - l.length ? i = !0 : l.push(e.firstLine(), e.lastLine()), e.operation(function () { - for (var p = [], c = 0; c < l.length; c += 2) { - var b = l[c], - w = l[c + 1], - g = f(b, 0), - S = f(w), - F = e.getRange(g, S, !1); - t ? F.sort(function (k, L) { - return k < L ? -n : k == L ? 0 : n; - }) : F.sort(function (k, L) { - var W = k.toUpperCase(), - M = L.toUpperCase(); - return W != M && (k = W, L = M), k < L ? -n : k == L ? 0 : n; - }), e.replaceRange(F, g, S), i && p.push({ - anchor: g, - head: f(w + 1, 0) - }); - } - i && e.setSelections(p, 0); - }); - } - v(R, "sortLines"), a.sortLines = function (e) { - R(e, !0, 1); - }, a.reverseSortLines = function (e) { - R(e, !0, -1); - }, a.sortLinesInsensitive = function (e) { - R(e, !1, 1); - }, a.reverseSortLinesInsensitive = function (e) { - R(e, !1, -1); - }, a.nextBookmark = function (e) { - var t = e.state.sublimeBookmarks; - if (t) for (; t.length;) { - var n = t.shift(), - r = n.find(); - if (r) return t.push(n), e.setSelection(r.from, r.to); - } - }, a.prevBookmark = function (e) { - var t = e.state.sublimeBookmarks; - if (t) for (; t.length;) { - t.unshift(t.pop()); - var n = t[t.length - 1].find(); - if (!n) t.pop();else return e.setSelection(n.from, n.to); - } - }, a.toggleBookmark = function (e) { - for (var t = e.listSelections(), n = e.state.sublimeBookmarks || (e.state.sublimeBookmarks = []), r = 0; r < t.length; r++) { - for (var l = t[r].from(), i = t[r].to(), o = t[r].empty() ? e.findMarksAt(l) : e.findMarks(l, i), s = 0; s < o.length; s++) if (o[s].sublimeBookmark) { - o[s].clear(); - for (var u = 0; u < n.length; u++) n[u] == o[s] && n.splice(u--, 1); - break; - } - s == o.length && n.push(e.markText(l, i, { - sublimeBookmark: !0, - clearWhenEmpty: !1 - })); - } - }, a.clearBookmarks = function (e) { - var t = e.state.sublimeBookmarks; - if (t) for (var n = 0; n < t.length; n++) t[n].clear(); - t.length = 0; - }, a.selectBookmarks = function (e) { - var t = e.state.sublimeBookmarks, - n = []; - if (t) for (var r = 0; r < t.length; r++) { - var l = t[r].find(); - l ? n.push({ - anchor: l.from, - head: l.to - }) : t.splice(r--, 0); - } - n.length && e.setSelections(n, 0); - }; - function D(e, t) { - e.operation(function () { - for (var n = e.listSelections(), r = [], l = [], i = 0; i < n.length; i++) { - var o = n[i]; - o.empty() ? (r.push(i), l.push("")) : l.push(t(e.getRange(o.from(), o.to()))); - } - e.replaceSelections(l, "around", "case"); - for (var i = r.length - 1, s; i >= 0; i--) { - var o = n[r[i]]; - if (!(s && h.cmpPos(o.head, s) > 0)) { - var u = K(e, o.head); - s = u.from, e.replaceRange(t(u.word), u.from, u.to); - } - } - }); - } - v(D, "modifyWordOrSelection"), a.smartBackspace = function (e) { - if (e.somethingSelected()) return h.Pass; - e.operation(function () { - for (var t = e.listSelections(), n = e.getOption("indentUnit"), r = t.length - 1; r >= 0; r--) { - var l = t[r].head, - i = e.getRange({ - line: l.line, - ch: 0 - }, l), - o = h.countColumn(i, null, e.getOption("tabSize")), - s = e.findPosH(l, -1, "char", !1); - if (i && !/\S/.test(i) && o % n == 0) { - var u = new f(l.line, h.findColumn(i, o - n, n)); - u.ch != l.ch && (s = u); - } - e.replaceRange("", s, l, "+delete"); - } - }); - }, a.delLineRight = function (e) { - e.operation(function () { - for (var t = e.listSelections(), n = t.length - 1; n >= 0; n--) e.replaceRange("", t[n].anchor, f(t[n].to().line), "+delete"); - e.scrollIntoView(); - }); - }, a.upcaseAtCursor = function (e) { - D(e, function (t) { - return t.toUpperCase(); - }); - }, a.downcaseAtCursor = function (e) { - D(e, function (t) { - return t.toLowerCase(); + var active = document.activeElement; + var ranges = []; + for (var i = 0; i < selection.rangeCount; i++) { + ranges.push(selection.getRangeAt(i)); + } + switch (active.tagName.toUpperCase()) { + // .toUpperCase handles XHTML + case 'INPUT': + case 'TEXTAREA': + active.blur(); + break; + default: + active = null; + break; + } + selection.removeAllRanges(); + return function () { + selection.type === 'Caret' && selection.removeAllRanges(); + if (!selection.rangeCount) { + ranges.forEach(function (range) { + selection.addRange(range); }); - }, a.setSublimeMark = function (e) { - e.state.sublimeMark && e.state.sublimeMark.clear(), e.state.sublimeMark = e.setBookmark(e.getCursor()); - }, a.selectToSublimeMark = function (e) { - var t = e.state.sublimeMark && e.state.sublimeMark.find(); - t && e.setSelection(e.getCursor(), t); - }, a.deleteToSublimeMark = function (e) { - var t = e.state.sublimeMark && e.state.sublimeMark.find(); - if (t) { - var n = e.getCursor(), - r = t; - if (h.cmpPos(n, r) > 0) { - var l = r; - r = n, n = l; - } - e.state.sublimeKilled = e.getRange(n, r), e.replaceRange("", n, r); - } - }, a.swapWithSublimeMark = function (e) { - var t = e.state.sublimeMark && e.state.sublimeMark.find(); - t && (e.state.sublimeMark.clear(), e.state.sublimeMark = e.setBookmark(e.getCursor()), e.setCursor(t)); - }, a.sublimeYank = function (e) { - e.state.sublimeKilled != null && e.replaceSelection(e.state.sublimeKilled, null, "paste"); - }, a.showInCenter = function (e) { - var t = e.cursorCoords(null, "local"); - e.scrollTo(null, (t.top + t.bottom) / 2 - e.getScrollInfo().clientHeight / 2); - }; - function N(e) { - var t = e.getCursor("from"), - n = e.getCursor("to"); - if (h.cmpPos(t, n) == 0) { - var r = K(e, t); - if (!r.word) return; - t = r.from, n = r.to; - } - return { - from: t, - to: n, - query: e.getRange(t, n), - word: r - }; } - v(N, "getTarget"); - function O(e, t) { - var n = N(e); - if (n) { - var r = n.query, - l = e.getSearchCursor(r, t ? n.to : n.from); - (t ? l.findNext() : l.findPrevious()) ? e.setSelection(l.from(), l.to()) : (l = e.getSearchCursor(r, t ? f(e.firstLine(), 0) : e.clipPos(f(e.lastLine()))), (t ? l.findNext() : l.findPrevious()) ? e.setSelection(l.from(), l.to()) : n.word && e.setSelection(n.from, n.to)); - } - } - v(O, "findAndGoTo"), a.findUnder = function (e) { - O(e, !0); - }, a.findUnderPrevious = function (e) { - O(e, !1); - }, a.findAllUnder = function (e) { - var t = N(e); - if (t) { - for (var n = e.getSearchCursor(t.query), r = [], l = -1; n.findNext();) r.push({ - anchor: n.from(), - head: n.to() - }), n.from().line <= t.from.line && n.from().ch <= t.from.ch && l++; - e.setSelections(r, l); - } - }; - var C = h.keyMap; - C.macSublime = { - "Cmd-Left": "goLineStartSmart", - "Shift-Tab": "indentLess", - "Shift-Ctrl-K": "deleteLine", - "Alt-Q": "wrapLines", - "Ctrl-Left": "goSubwordLeft", - "Ctrl-Right": "goSubwordRight", - "Ctrl-Alt-Up": "scrollLineUp", - "Ctrl-Alt-Down": "scrollLineDown", - "Cmd-L": "selectLine", - "Shift-Cmd-L": "splitSelectionByLine", - Esc: "singleSelectionTop", - "Cmd-Enter": "insertLineAfter", - "Shift-Cmd-Enter": "insertLineBefore", - "Cmd-D": "selectNextOccurrence", - "Shift-Cmd-Space": "selectScope", - "Shift-Cmd-M": "selectBetweenBrackets", - "Cmd-M": "goToBracket", - "Cmd-Ctrl-Up": "swapLineUp", - "Cmd-Ctrl-Down": "swapLineDown", - "Cmd-/": "toggleCommentIndented", - "Cmd-J": "joinLines", - "Shift-Cmd-D": "duplicateLine", - F5: "sortLines", - "Shift-F5": "reverseSortLines", - "Cmd-F5": "sortLinesInsensitive", - "Shift-Cmd-F5": "reverseSortLinesInsensitive", - F2: "nextBookmark", - "Shift-F2": "prevBookmark", - "Cmd-F2": "toggleBookmark", - "Shift-Cmd-F2": "clearBookmarks", - "Alt-F2": "selectBookmarks", - Backspace: "smartBackspace", - "Cmd-K Cmd-D": "skipAndSelectNextOccurrence", - "Cmd-K Cmd-K": "delLineRight", - "Cmd-K Cmd-U": "upcaseAtCursor", - "Cmd-K Cmd-L": "downcaseAtCursor", - "Cmd-K Cmd-Space": "setSublimeMark", - "Cmd-K Cmd-A": "selectToSublimeMark", - "Cmd-K Cmd-W": "deleteToSublimeMark", - "Cmd-K Cmd-X": "swapWithSublimeMark", - "Cmd-K Cmd-Y": "sublimeYank", - "Cmd-K Cmd-C": "showInCenter", - "Cmd-K Cmd-G": "clearBookmarks", - "Cmd-K Cmd-Backspace": "delLineLeft", - "Cmd-K Cmd-1": "foldAll", - "Cmd-K Cmd-0": "unfoldAll", - "Cmd-K Cmd-J": "unfoldAll", - "Ctrl-Shift-Up": "addCursorToPrevLine", - "Ctrl-Shift-Down": "addCursorToNextLine", - "Cmd-F3": "findUnder", - "Shift-Cmd-F3": "findUnderPrevious", - "Alt-F3": "findAllUnder", - "Shift-Cmd-[": "fold", - "Shift-Cmd-]": "unfold", - "Cmd-I": "findIncremental", - "Shift-Cmd-I": "findIncrementalReverse", - "Cmd-H": "replace", - F3: "findNext", - "Shift-F3": "findPrev", - fallthrough: "macDefault" - }, h.normalizeKeyMap(C.macSublime), C.pcSublime = { - "Shift-Tab": "indentLess", - "Shift-Ctrl-K": "deleteLine", - "Alt-Q": "wrapLines", - "Ctrl-T": "transposeChars", - "Alt-Left": "goSubwordLeft", - "Alt-Right": "goSubwordRight", - "Ctrl-Up": "scrollLineUp", - "Ctrl-Down": "scrollLineDown", - "Ctrl-L": "selectLine", - "Shift-Ctrl-L": "splitSelectionByLine", - Esc: "singleSelectionTop", - "Ctrl-Enter": "insertLineAfter", - "Shift-Ctrl-Enter": "insertLineBefore", - "Ctrl-D": "selectNextOccurrence", - "Shift-Ctrl-Space": "selectScope", - "Shift-Ctrl-M": "selectBetweenBrackets", - "Ctrl-M": "goToBracket", - "Shift-Ctrl-Up": "swapLineUp", - "Shift-Ctrl-Down": "swapLineDown", - "Ctrl-/": "toggleCommentIndented", - "Ctrl-J": "joinLines", - "Shift-Ctrl-D": "duplicateLine", - F9: "sortLines", - "Shift-F9": "reverseSortLines", - "Ctrl-F9": "sortLinesInsensitive", - "Shift-Ctrl-F9": "reverseSortLinesInsensitive", - F2: "nextBookmark", - "Shift-F2": "prevBookmark", - "Ctrl-F2": "toggleBookmark", - "Shift-Ctrl-F2": "clearBookmarks", - "Alt-F2": "selectBookmarks", - Backspace: "smartBackspace", - "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence", - "Ctrl-K Ctrl-K": "delLineRight", - "Ctrl-K Ctrl-U": "upcaseAtCursor", - "Ctrl-K Ctrl-L": "downcaseAtCursor", - "Ctrl-K Ctrl-Space": "setSublimeMark", - "Ctrl-K Ctrl-A": "selectToSublimeMark", - "Ctrl-K Ctrl-W": "deleteToSublimeMark", - "Ctrl-K Ctrl-X": "swapWithSublimeMark", - "Ctrl-K Ctrl-Y": "sublimeYank", - "Ctrl-K Ctrl-C": "showInCenter", - "Ctrl-K Ctrl-G": "clearBookmarks", - "Ctrl-K Ctrl-Backspace": "delLineLeft", - "Ctrl-K Ctrl-1": "foldAll", - "Ctrl-K Ctrl-0": "unfoldAll", - "Ctrl-K Ctrl-J": "unfoldAll", - "Ctrl-Alt-Up": "addCursorToPrevLine", - "Ctrl-Alt-Down": "addCursorToNextLine", - "Ctrl-F3": "findUnder", - "Shift-Ctrl-F3": "findUnderPrevious", - "Alt-F3": "findAllUnder", - "Shift-Ctrl-[": "fold", - "Shift-Ctrl-]": "unfold", - "Ctrl-I": "findIncremental", - "Shift-Ctrl-I": "findIncrementalReverse", - "Ctrl-H": "replace", - F3: "findNext", - "Shift-F3": "findPrev", - fallthrough: "pcDefault" - }, h.normalizeKeyMap(C.pcSublime); - var V = C.default == C.macDefault; - C.sublime = V ? C.macSublime : C.pcSublime; - }); -})(); -var q = G.exports; -const Q = E.getDefaultExportFromCjs(q), - X = J({ - __proto__: null, - default: Q - }, [q]); -exports.sublime = X; + active && active.focus(); + }; +}; /***/ }), -/***/ "../../graphiql-toolkit/esm/async-helpers/index.js": -/*!*********************************************************!*\ - !*** ../../graphiql-toolkit/esm/async-helpers/index.js ***! - \*********************************************************/ +/***/ "../../../node_modules/tslib/tslib.es6.mjs": +/*!*************************************************!*\ + !*** ../../../node_modules/tslib/tslib.es6.mjs ***! + \*************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fetcherReturnToPromise = fetcherReturnToPromise; -exports.isAsyncIterable = isAsyncIterable; -exports.isObservable = isObservable; -exports.isPromise = isPromise; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { +exports.__addDisposableResource = __addDisposableResource; +exports.__assign = void 0; +exports.__asyncDelegator = __asyncDelegator; +exports.__asyncGenerator = __asyncGenerator; +exports.__asyncValues = __asyncValues; +exports.__await = __await; +exports.__awaiter = __awaiter; +exports.__classPrivateFieldGet = __classPrivateFieldGet; +exports.__classPrivateFieldIn = __classPrivateFieldIn; +exports.__classPrivateFieldSet = __classPrivateFieldSet; +exports.__createBinding = void 0; +exports.__decorate = __decorate; +exports.__disposeResources = __disposeResources; +exports.__esDecorate = __esDecorate; +exports.__exportStar = __exportStar; +exports.__extends = __extends; +exports.__generator = __generator; +exports.__importDefault = __importDefault; +exports.__importStar = __importStar; +exports.__makeTemplateObject = __makeTemplateObject; +exports.__metadata = __metadata; +exports.__param = __param; +exports.__propKey = __propKey; +exports.__read = __read; +exports.__rest = __rest; +exports.__runInitializers = __runInitializers; +exports.__setFunctionName = __setFunctionName; +exports.__spread = __spread; +exports.__spreadArray = __spreadArray; +exports.__spreadArrays = __spreadArrays; +exports.__values = __values; +exports["default"] = void 0; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol */ + +var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + }; + return extendStatics(d, b); +}; +function __extends(d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +var __assign = function () { + exports.__assign = __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +exports.__assign = __assign; +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function (target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, + key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, + done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); + }; + var result = (0, decorators[i])(kind === "accessor" ? { + get: descriptor.get, + set: descriptor.set + } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_);else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +; +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +} +; +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +; +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { + configurable: true, + value: prefix ? "".concat(prefix, " ", name) : name + }); +} +; +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); @@ -64872,207 +69739,178 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); -}; -function isPromise(value) { - return typeof value === 'object' && value !== null && typeof value.then === 'function'; } -function observableToPromise(observable) { - return new Promise((resolve, reject) => { - const subscription = observable.subscribe({ - next(v) { - resolve(v); - subscription.unsubscribe(); +function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function () { + if (t[0] & 1) throw t[1]; + return t[1]; }, - error: reject, - complete() { - reject(new Error('no value resolved')); + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { + value: op[1], + done: false + }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; } - }); - }); -} -function isObservable(value) { - return typeof value === 'object' && value !== null && 'subscribe' in value && typeof value.subscribe === 'function'; -} -function isAsyncIterable(input) { - return typeof input === 'object' && input !== null && (input[Symbol.toStringTag] === 'AsyncGenerator' || Symbol.asyncIterator in input); -} -function asyncIterableToPromise(input) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const iteratorReturn = (_a = ('return' in input ? input : input[Symbol.asyncIterator]()).return) === null || _a === void 0 ? void 0 : _a.bind(input); - const iteratorNext = ('next' in input ? input : input[Symbol.asyncIterator]()).next.bind(input); - const result = yield iteratorNext(); - void (iteratorReturn === null || iteratorReturn === void 0 ? void 0 : iteratorReturn()); - return result.value; - }); -} -function fetcherReturnToPromise(fetcherResult) { - return __awaiter(this, void 0, void 0, function* () { - const result = yield fetcherResult; - if (isAsyncIterable(result)) { - return asyncIterableToPromise(result); - } - if (isObservable(result)) { - return observableToPromise(result); + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; } - return result; - }); -} - -/***/ }), - -/***/ "../../graphiql-toolkit/esm/create-fetcher/createFetcher.js": -/*!******************************************************************!*\ - !*** ../../graphiql-toolkit/esm/create-fetcher/createFetcher.js ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.createGraphiQLFetcher = createGraphiQLFetcher; -var _lib = __webpack_require__(/*! ./lib */ "../../graphiql-toolkit/esm/create-fetcher/lib.js"); -function createGraphiQLFetcher(options) { - let httpFetch; - if (typeof window !== 'undefined' && window.fetch) { - httpFetch = window.fetch; - } - if ((options === null || options === void 0 ? void 0 : options.enableIncrementalDelivery) === null || options.enableIncrementalDelivery !== false) { - options.enableIncrementalDelivery = true; - } - if (options.fetch) { - httpFetch = options.fetch; - } - if (!httpFetch) { - throw new Error('No valid fetcher implementation available'); + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; } - const simpleFetcher = (0, _lib.createSimpleFetcher)(options, httpFetch); - const httpFetcher = options.enableIncrementalDelivery ? (0, _lib.createMultipartFetcher)(options, httpFetch) : simpleFetcher; - return (graphQLParams, fetcherOpts) => { - if (graphQLParams.operationName === 'IntrospectionQuery') { - return (options.schemaFetcher || simpleFetcher)(graphQLParams, fetcherOpts); - } - const isSubscription = (fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST) ? (0, _lib.isSubscriptionWithName)(fetcherOpts.documentAST, graphQLParams.operationName || undefined) : false; - if (isSubscription) { - const wsFetcher = (0, _lib.getWsFetcher)(options, fetcherOpts); - if (!wsFetcher) { - throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${options.subscriptionUrl ? `Provided URL ${options.subscriptionUrl} failed` : 'Please provide subscriptionUrl, wsClient or legacyClient option first.'}`); +} +var __createBinding = exports.__createBinding = Object.create ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k]; } - return wsFetcher(graphQLParams); + }; + } + Object.defineProperty(o, k2, desc); +} : function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}; +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o + }; } - return httpFetcher(graphQLParams, fetcherOpts); }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } - -/***/ }), - -/***/ "../../graphiql-toolkit/esm/create-fetcher/index.js": -/*!**********************************************************!*\ - !*** ../../graphiql-toolkit/esm/create-fetcher/index.js ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var _exportNames = { - createGraphiQLFetcher: true -}; -Object.defineProperty(exports, "createGraphiQLFetcher", ({ - enumerable: true, - get: function () { - return _createFetcher.createGraphiQLFetcher; - } -})); -var _types = __webpack_require__(/*! ./types */ "../../graphiql-toolkit/esm/create-fetcher/types.js"); -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _types[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; } - }); -}); -var _createFetcher = __webpack_require__(/*! ./createFetcher */ "../../graphiql-toolkit/esm/create-fetcher/createFetcher.js"); - -/***/ }), - -/***/ "../../graphiql-toolkit/esm/create-fetcher/lib.js": -/*!********************************************************!*\ - !*** ../../graphiql-toolkit/esm/create-fetcher/lib.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - + } + return ar; +} +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isSubscriptionWithName = exports.getWsFetcher = exports.createWebsocketsFetcherFromUrl = exports.createWebsocketsFetcherFromClient = exports.createSimpleFetcher = exports.createMultipartFetcher = exports.createLegacyWebsocketsFetcher = void 0; -var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -var _meros = __webpack_require__(/*! meros */ "../../../node_modules/meros/browser/index.mjs"); -var _pushPullAsyncIterableIterator = __webpack_require__(/*! @n1ru4l/push-pull-async-iterable-iterator */ "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js"); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __await = void 0 && (void 0).__await || function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -}; -var __asyncValues = void 0 && (void 0).__asyncValues || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], - i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function (v) { - return new Promise(function (resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function (v) { - resolve({ - value: v, - done: d - }); - }, reject); } -}; -var __asyncGenerator = void 0 && (void 0).__asyncGenerator || function (thisArg, _arguments, generator) { + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, @@ -65106,7790 +69944,14557 @@ var __asyncGenerator = void 0 && (void 0).__asyncGenerator || function (thisArg, function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -const errorHasCode = err => { - return typeof err === 'object' && err !== null && 'code' in err; -}; -const isSubscriptionWithName = (document, name) => { - let isSubscription = false; - (0, _graphql.visit)(document, { - OperationDefinition(node) { - var _a; - if (name === ((_a = node.name) === null || _a === void 0 ? void 0 : _a.value) && node.operation === 'subscription') { - isSubscription = true; - } - } - }); - return isSubscription; -}; -exports.isSubscriptionWithName = isSubscriptionWithName; -const createSimpleFetcher = (options, httpFetch) => (graphQLParams, fetcherOpts) => __awaiter(void 0, void 0, void 0, function* () { - const data = yield httpFetch(options.url, { - method: 'POST', - body: JSON.stringify(graphQLParams), - headers: Object.assign(Object.assign({ - 'content-type': 'application/json' - }, options.headers), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers) - }); - return data.json(); -}); -exports.createSimpleFetcher = createSimpleFetcher; -const createWebsocketsFetcherFromUrl = (url, connectionParams) => { - let wsClient; - try { - const { - createClient - } = __webpack_require__(/*! graphql-ws */ "../../../node_modules/graphql-ws/lib/index.js"); - wsClient = createClient({ - url, - connectionParams +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function () { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function (v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: false + } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], + i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function (v) { + return new Promise(function (resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ + value: v, + done: d + }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { + value: raw }); - return createWebsocketsFetcherFromClient(wsClient); - } catch (err) { - if (errorHasCode(err) && err.code === 'MODULE_NOT_FOUND') { - throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'"); - } - console.error(`Error creating websocket client for ${url}`, err); + } else { + cooked.raw = raw; } + return cooked; +} +; +var __setModuleDefault = Object.create ? function (o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); +} : function (o, v) { + o["default"] = v; }; -exports.createWebsocketsFetcherFromUrl = createWebsocketsFetcherFromUrl; -const createWebsocketsFetcherFromClient = wsClient => graphQLParams => (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => wsClient.subscribe(graphQLParams, Object.assign(Object.assign({}, sink), { - error(err) { - if (err instanceof CloseEvent) { - sink.error(new Error(`Socket closed with event ${err.code} ${err.reason || ''}`.trim())); - } else { - sink.error(err); - } +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ + value: value, + dispose: dispose, + async: async + }); + } else if (async) { + env.stack.push({ + async: true + }); } -}))); -exports.createWebsocketsFetcherFromClient = createWebsocketsFetcherFromClient; -const createLegacyWebsocketsFetcher = legacyWsClient => graphQLParams => { - const observable = legacyWsClient.request(graphQLParams); - return (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => observable.subscribe(sink).unsubscribe); + return value; +} +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; -exports.createLegacyWebsocketsFetcher = createLegacyWebsocketsFetcher; -const createMultipartFetcher = (options, httpFetch) => function (graphQLParams, fetcherOpts) { - return __asyncGenerator(this, arguments, function* () { - var e_1, _a; - const response = yield __await(httpFetch(options.url, { - method: 'POST', - body: JSON.stringify(graphQLParams), - headers: Object.assign(Object.assign({ - 'content-type': 'application/json', - accept: 'application/json, multipart/mixed' - }, options.headers), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers) - }).then(r => (0, _meros.meros)(r, { - multiple: true - }))); - if (!(0, _pushPullAsyncIterableIterator.isAsyncIterable)(response)) { - return yield __await(yield yield __await(response.json())); - } - try { - for (var response_1 = __asyncValues(response), response_1_1; response_1_1 = yield __await(response_1.next()), !response_1_1.done;) { - const chunk = response_1_1.value; - if (chunk.some(part => !part.json)) { - const message = chunk.map(part => `Headers::\n${part.headers}\n\nBody::\n${part.body}`); - throw new Error(`Expected multipart chunks to be of json type. got:\n${message}`); - } - yield yield __await(chunk.map(part => part.body)); - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); try { - if (response_1_1 && !response_1_1.done && (_a = response_1.return)) yield __await(_a.call(response_1)); - } finally { - if (e_1) throw e_1.error; - } - } - }); -}; -exports.createMultipartFetcher = createMultipartFetcher; -const getWsFetcher = (options, fetcherOpts) => { - if (options.wsClient) { - return createWebsocketsFetcherFromClient(options.wsClient); - } - if (options.subscriptionUrl) { - return createWebsocketsFetcherFromUrl(options.subscriptionUrl, Object.assign(Object.assign({}, options.wsConnectionParams), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers)); - } - const legacyWebsocketsClient = options.legacyClient || options.legacyWsClient; - if (legacyWebsocketsClient) { - return createLegacyWebsocketsFetcher(legacyWebsocketsClient); - } + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function (e) { + fail(e); + return next(); + }); + } catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); +} +var _default = exports["default"] = { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources }; -exports.getWsFetcher = getWsFetcher; /***/ }), -/***/ "../../graphiql-toolkit/esm/create-fetcher/types.js": -/*!**********************************************************!*\ - !*** ../../graphiql-toolkit/esm/create-fetcher/types.js ***! - \**********************************************************/ +/***/ "../../../node_modules/uc.micro/build/index.cjs.js": +/*!*********************************************************!*\ + !*** ../../../node_modules/uc.micro/build/index.cjs.js ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); +var regex$5 = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var regex$4 = /[\0-\x1F\x7F-\x9F]/; +var regex$3 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/; +var regex$2 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/; +var regex$1 = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/; +var regex = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; +exports.Any = regex$5; +exports.Cc = regex$4; +exports.Cf = regex$3; +exports.P = regex$2; +exports.S = regex$1; +exports.Z = regex; /***/ }), -/***/ "../../graphiql-toolkit/esm/format/index.js": -/*!**************************************************!*\ - !*** ../../graphiql-toolkit/esm/format/index.js ***! - \**************************************************/ +/***/ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js": +/*!***********************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/assignRef.js ***! + \***********************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.formatError = formatError; -exports.formatResult = formatResult; -function stringify(obj) { - return JSON.stringify(obj, null, 2); -} -function formatSingleError(error) { - return Object.assign(Object.assign({}, error), { - message: error.message, - stack: error.stack - }); -} -function handleSingleError(error) { - if (error instanceof Error) { - return formatSingleError(error); - } - return error; -} -function formatError(error) { - if (Array.isArray(error)) { - return stringify({ - errors: error.map(e => handleSingleError(e)) - }); +exports.assignRef = assignRef; +/** + * Assigns a value for a given ref, no matter of the ref format + * @param {RefObject} ref - a callback function or ref object + * @param value - a new value + * + * @see https://github.com/theKashey/use-callback-ref#assignref + * @example + * const refObject = useRef(); + * const refFn = (ref) => {....} + * + * assignRef(refObject, "refValue"); + * assignRef(refFn, "refValue"); + */ +function assignRef(ref, value) { + if (typeof ref === 'function') { + ref(value); + } else if (ref) { + ref.current = value; } - return stringify({ - errors: [handleSingleError(error)] - }); -} -function formatResult(result) { - return stringify(result); + return ref; } /***/ }), -/***/ "../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js": -/*!*******************************************************************!*\ - !*** ../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js": +/*!***********************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/createRef.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fillLeafs = fillLeafs; -var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -function fillLeafs(schema, docString, getDefaultFieldNames) { - const insertions = []; - if (!schema || !docString) { - return { - insertions, - result: docString - }; - } - let ast; - try { - ast = (0, _graphql.parse)(docString); - } catch (_a) { - return { - insertions, - result: docString - }; - } - const fieldNameFn = getDefaultFieldNames || defaultGetDefaultFieldNames; - const typeInfo = new _graphql.TypeInfo(schema); - (0, _graphql.visit)(ast, { - leave(node) { - typeInfo.leave(node); +exports.createCallbackRef = createCallbackRef; +/** + * creates a Ref object with on change callback + * @param callback + * @returns {RefObject} + * + * @see {@link useCallbackRef} + * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs + */ +function createCallbackRef(callback) { + var current = null; + return { + get current() { + return current; }, - enter(node) { - typeInfo.enter(node); - if (node.kind === 'Field' && !node.selectionSet) { - const fieldType = typeInfo.getType(); - const selectionSet = buildSelectionSet(isFieldType(fieldType), fieldNameFn); - if (selectionSet && node.loc) { - const indent = getIndentation(docString, node.loc.start); - insertions.push({ - index: node.loc.end, - string: ' ' + (0, _graphql.print)(selectionSet).replaceAll('\n', '\n' + indent) - }); - } + set current(value) { + var last = current; + if (last !== value) { + current = value; + callback(value, last); } } - }); - return { - insertions, - result: withInsertions(docString, insertions) }; } -function defaultGetDefaultFieldNames(type) { - if (!('getFields' in type)) { - return []; + +/***/ }), + +/***/ "../../../node_modules/use-callback-ref/dist/es2015/index.js": +/*!*******************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/index.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "assignRef", ({ + enumerable: true, + get: function () { + return _assignRef.assignRef; } - const fields = type.getFields(); - if (fields.id) { - return ['id']; +})); +Object.defineProperty(exports, "createCallbackRef", ({ + enumerable: true, + get: function () { + return _createRef.createCallbackRef; } - if (fields.edges) { - return ['edges']; +})); +Object.defineProperty(exports, "mergeRefs", ({ + enumerable: true, + get: function () { + return _mergeRef.mergeRefs; } - if (fields.node) { - return ['node']; +})); +Object.defineProperty(exports, "refToCallback", ({ + enumerable: true, + get: function () { + return _refToCallback.refToCallback; } - const leafFieldNames = []; - for (const fieldName of Object.keys(fields)) { - if ((0, _graphql.isLeafType)(fields[fieldName].type)) { - leafFieldNames.push(fieldName); - } +})); +Object.defineProperty(exports, "transformRef", ({ + enumerable: true, + get: function () { + return _transformRef.transformRef; } - return leafFieldNames; -} -function buildSelectionSet(type, getDefaultFieldNames) { - const namedType = (0, _graphql.getNamedType)(type); - if (!type || (0, _graphql.isLeafType)(type)) { - return; +})); +Object.defineProperty(exports, "useCallbackRef", ({ + enumerable: true, + get: function () { + return _useRef.useCallbackRef; } - const fieldNames = getDefaultFieldNames(namedType); - if (!Array.isArray(fieldNames) || fieldNames.length === 0 || !('getFields' in namedType)) { - return; +})); +Object.defineProperty(exports, "useMergeRefs", ({ + enumerable: true, + get: function () { + return _useMergeRef.useMergeRefs; } - return { - kind: _graphql.Kind.SELECTION_SET, - selections: fieldNames.map(fieldName => { - const fieldDef = namedType.getFields()[fieldName]; - const fieldType = fieldDef ? fieldDef.type : null; - return { - kind: _graphql.Kind.FIELD, - name: { - kind: _graphql.Kind.NAME, - value: fieldName - }, - selectionSet: buildSelectionSet(fieldType, getDefaultFieldNames) - }; - }) - }; -} -function withInsertions(initial, insertions) { - if (insertions.length === 0) { - return initial; +})); +Object.defineProperty(exports, "useRefToCallback", ({ + enumerable: true, + get: function () { + return _refToCallback.useRefToCallback; } - let edited = ''; - let prevIndex = 0; - for (const { - index, - string - } of insertions) { - edited += initial.slice(prevIndex, index) + string; - prevIndex = index; +})); +Object.defineProperty(exports, "useTransformRef", ({ + enumerable: true, + get: function () { + return _useTransformRef.useTransformRef; } - edited += initial.slice(prevIndex); - return edited; +})); +var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); +var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); +var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); +var _mergeRef = __webpack_require__(/*! ./mergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js"); +var _useMergeRef = __webpack_require__(/*! ./useMergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js"); +var _useTransformRef = __webpack_require__(/*! ./useTransformRef */ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js"); +var _transformRef = __webpack_require__(/*! ./transformRef */ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js"); +var _refToCallback = __webpack_require__(/*! ./refToCallback */ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js"); + +/***/ }), + +/***/ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js": +/*!**********************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.mergeRefs = mergeRefs; +var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); +var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); +/** + * Merges two or more refs together providing a single interface to set their value + * @param {RefObject|Ref} refs + * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} + * + * @see {@link useMergeRefs} to be used in ReactComponents + * @example + * const Component = React.forwardRef((props, ref) => { + * const ownRef = useRef(); + * const domRef = mergeRefs([ref, ownRef]); // 👈 merge together + * return
...
+ * } + */ +function mergeRefs(refs) { + return (0, _createRef.createCallbackRef)(function (newValue) { + return refs.forEach(function (ref) { + return (0, _assignRef.assignRef)(ref, newValue); + }); + }); } -function getIndentation(str, index) { - let indentStart = index; - let indentEnd = index; - while (indentStart) { - const c = str.charCodeAt(indentStart - 1); - if (c === 10 || c === 13 || c === 0x2028 || c === 0x2029) { - break; - } - indentStart--; - if (c !== 9 && c !== 11 && c !== 12 && c !== 32 && c !== 160) { - indentEnd = indentStart; + +/***/ }), + +/***/ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js": +/*!***************************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js ***! + \***************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.refToCallback = refToCallback; +exports.useRefToCallback = useRefToCallback; +/** + * Unmemoized version of {@link useRefToCallback} + * @see {@link useRefToCallback} + * @param ref + */ +function refToCallback(ref) { + return function (newValue) { + if (typeof ref === 'function') { + ref(newValue); + } else if (ref) { + ref.current = newValue; } - } - return str.slice(indentStart, indentEnd); + }; } -function isFieldType(fieldType) { - if (fieldType) { - return fieldType; +var nullCallback = function () { + return null; +}; +// lets maintain a weak ref to, well, ref :) +// not using `kashe` to keep this package small +var weakMem = new WeakMap(); +var weakMemoize = function (ref) { + var usedRef = ref || nullCallback; + var storedRef = weakMem.get(usedRef); + if (storedRef) { + return storedRef; } + var cb = refToCallback(usedRef); + weakMem.set(usedRef, cb); + return cb; +}; +/** + * Transforms a given `ref` into `callback`. + * + * To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)} + * + * @param {ReactRef} ref + * @returns {Function} + * + * @see https://github.com/theKashey/use-callback-ref#reftocallback + * + * @example + * const ref = useRef(0); + * const setRef = useRefToCallback(ref); + * 👉 setRef(10); + * ✅ ref.current === 10 + */ +function useRefToCallback(ref) { + return weakMemoize(ref); } /***/ }), -/***/ "../../graphiql-toolkit/esm/graphql-helpers/index.js": -/*!***********************************************************!*\ - !*** ../../graphiql-toolkit/esm/graphql-helpers/index.js ***! - \***********************************************************/ +/***/ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js": +/*!**************************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/transformRef.js ***! + \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var _autoComplete = __webpack_require__(/*! ./auto-complete */ "../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js"); -Object.keys(_autoComplete).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _autoComplete[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _autoComplete[key]; - } - }); -}); -var _mergeAst = __webpack_require__(/*! ./merge-ast */ "../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js"); -Object.keys(_mergeAst).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _mergeAst[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _mergeAst[key]; - } - }); -}); -var _operationName = __webpack_require__(/*! ./operation-name */ "../../graphiql-toolkit/esm/graphql-helpers/operation-name.js"); -Object.keys(_operationName).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _operationName[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _operationName[key]; - } +exports.transformRef = transformRef; +var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); +var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js"); +/** + * Transforms one ref to another + * @example + * ```tsx + * const ResizableWithRef = forwardRef((props, ref) => + * i ? i.resizable : null)}/> + * ); + * ``` + */ +function transformRef(ref, transformer) { + return (0, _createRef.createCallbackRef)(function (value) { + return (0, _assignRef.assignRef)(ref, transformer(value)); }); -}); +} /***/ }), -/***/ "../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js": -/*!***************************************************************!*\ - !*** ../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js ***! - \***************************************************************/ +/***/ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js": +/*!*************************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js ***! + \*************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.mergeAst = mergeAst; -var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -function uniqueBy(array, iteratee) { - var _a; - const FilteredMap = new Map(); - const result = []; - for (const item of array) { - if (item.kind === 'Field') { - const uniqueValue = iteratee(item); - const existing = FilteredMap.get(uniqueValue); - if ((_a = item.directives) === null || _a === void 0 ? void 0 : _a.length) { - const itemClone = Object.assign({}, item); - result.push(itemClone); - } else if ((existing === null || existing === void 0 ? void 0 : existing.selectionSet) && item.selectionSet) { - existing.selectionSet.selections = [...existing.selectionSet.selections, ...item.selectionSet.selections]; - } else if (!existing) { - const itemClone = Object.assign({}, item); - FilteredMap.set(uniqueValue, itemClone); - result.push(itemClone); - } - } else { - result.push(item); - } - } - return result; -} -function inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType) { - var _a; - const selectionSetTypeName = selectionSetType ? (0, _graphql.getNamedType)(selectionSetType).name : null; - const outputSelections = []; - const seenSpreads = []; - for (let selection of selections) { - if (selection.kind === 'FragmentSpread') { - const fragmentName = selection.name.value; - if (!selection.directives || selection.directives.length === 0) { - if (seenSpreads.includes(fragmentName)) { - continue; - } else { - seenSpreads.push(fragmentName); - } - } - const fragmentDefinition = fragmentDefinitions[selection.name.value]; - if (fragmentDefinition) { - const { - typeCondition, - directives, - selectionSet - } = fragmentDefinition; - selection = { - kind: _graphql.Kind.INLINE_FRAGMENT, - typeCondition, - directives, - selectionSet - }; - } - } - if (selection.kind === _graphql.Kind.INLINE_FRAGMENT && (!selection.directives || ((_a = selection.directives) === null || _a === void 0 ? void 0 : _a.length) === 0)) { - const fragmentTypeName = selection.typeCondition ? selection.typeCondition.name.value : null; - if (!fragmentTypeName || fragmentTypeName === selectionSetTypeName) { - outputSelections.push(...inlineRelevantFragmentSpreads(fragmentDefinitions, selection.selectionSet.selections, selectionSetType)); - continue; - } - } - outputSelections.push(selection); - } - return outputSelections; -} -function mergeAst(documentAST, schema) { - const typeInfo = schema ? new _graphql.TypeInfo(schema) : null; - const fragmentDefinitions = Object.create(null); - for (const definition of documentAST.definitions) { - if (definition.kind === _graphql.Kind.FRAGMENT_DEFINITION) { - fragmentDefinitions[definition.name.value] = definition; - } - } - const flattenVisitors = { - SelectionSet(node) { - const selectionSetType = typeInfo ? typeInfo.getParentType() : null; - let { - selections - } = node; - selections = inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType); - return Object.assign(Object.assign({}, node), { - selections - }); - }, - FragmentDefinition() { - return null; - } - }; - const flattenedAST = (0, _graphql.visit)(documentAST, typeInfo ? (0, _graphql.visitWithTypeInfo)(typeInfo, flattenVisitors) : flattenVisitors); - const deduplicateVisitors = { - SelectionSet(node) { - let { - selections - } = node; - selections = uniqueBy(selections, selection => selection.alias ? selection.alias.value : selection.name.value); - return Object.assign(Object.assign({}, node), { - selections - }); - }, - FragmentDefinition() { - return null; - } - }; - return (0, _graphql.visit)(flattenedAST, deduplicateVisitors); +exports.useMergeRefs = useMergeRefs; +var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); +var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); +/** + * Merges two or more refs together providing a single interface to set their value + * @param {RefObject|Ref} refs + * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} + * + * @see {@link mergeRefs} a version without buit-in memoization + * @see https://github.com/theKashey/use-callback-ref#usemergerefs + * @example + * const Component = React.forwardRef((props, ref) => { + * const ownRef = useRef(); + * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together + * return
...
+ * } + */ +function useMergeRefs(refs, defaultValue) { + return (0, _useRef.useCallbackRef)(defaultValue || null, function (newValue) { + return refs.forEach(function (ref) { + return (0, _assignRef.assignRef)(ref, newValue); + }); + }); } /***/ }), -/***/ "../../graphiql-toolkit/esm/graphql-helpers/operation-name.js": +/***/ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js": /*!********************************************************************!*\ - !*** ../../graphiql-toolkit/esm/graphql-helpers/operation-name.js ***! + !*** ../../../node_modules/use-callback-ref/dist/es2015/useRef.js ***! \********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSelectedOperationName = getSelectedOperationName; -function getSelectedOperationName(prevOperations, prevSelectedOperationName, operations) { - if (!operations || operations.length < 1) { - return; - } - const names = operations.map(op => { - var _a; - return (_a = op.name) === null || _a === void 0 ? void 0 : _a.value; - }); - if (prevSelectedOperationName && names.includes(prevSelectedOperationName)) { - return prevSelectedOperationName; - } - if (prevSelectedOperationName && prevOperations) { - const prevNames = prevOperations.map(op => { - var _a; - return (_a = op.name) === null || _a === void 0 ? void 0 : _a.value; - }); - const prevIndex = prevNames.indexOf(prevSelectedOperationName); - if (prevIndex !== -1 && prevIndex < names.length) { - return names[prevIndex]; - } - } - return names[0]; +exports.useCallbackRef = useCallbackRef; +var _react = __webpack_require__(/*! react */ "react"); +/** + * creates a MutableRef with ref change callback + * @param initialValue - initial ref value + * @param {Function} callback - a callback to run when value changes + * + * @example + * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); + * ref.current = 1; + * // prints 0 -> 1 + * + * @see https://reactjs.org/docs/hooks-reference.html#useref + * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref + * @returns {MutableRefObject} + */ +function useCallbackRef(initialValue, callback) { + var ref = (0, _react.useState)(function () { + return { + // value + value: initialValue, + // last callback + callback: callback, + // "memoized" public interface + facade: { + get current() { + return ref.value; + }, + set current(value) { + var last = ref.value; + if (last !== value) { + ref.value = value; + ref.callback(value, last); + } + } + } + }; + })[0]; + // update callback + ref.callback = callback; + return ref.facade; } /***/ }), -/***/ "../../graphiql-toolkit/esm/index.js": -/*!*******************************************!*\ - !*** ../../graphiql-toolkit/esm/index.js ***! - \*******************************************/ +/***/ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js": +/*!*****************************************************************************!*\ + !*** ../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js ***! + \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var _asyncHelpers = __webpack_require__(/*! ./async-helpers */ "../../graphiql-toolkit/esm/async-helpers/index.js"); -Object.keys(_asyncHelpers).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _asyncHelpers[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _asyncHelpers[key]; - } - }); -}); -var _createFetcher = __webpack_require__(/*! ./create-fetcher */ "../../graphiql-toolkit/esm/create-fetcher/index.js"); -Object.keys(_createFetcher).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _createFetcher[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _createFetcher[key]; - } - }); -}); -var _format = __webpack_require__(/*! ./format */ "../../graphiql-toolkit/esm/format/index.js"); -Object.keys(_format).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _format[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _format[key]; - } - }); -}); -var _graphqlHelpers = __webpack_require__(/*! ./graphql-helpers */ "../../graphiql-toolkit/esm/graphql-helpers/index.js"); -Object.keys(_graphqlHelpers).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _graphqlHelpers[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _graphqlHelpers[key]; - } - }); -}); -var _storage = __webpack_require__(/*! ./storage */ "../../graphiql-toolkit/esm/storage/index.js"); -Object.keys(_storage).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _storage[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _storage[key]; - } +exports.useTransformRef = useTransformRef; +var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"); +var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js"); +/** + * Create a _lense_ on Ref, making it possible to transform ref value + * @param {ReactRef} ref + * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update. + * @returns {RefObject} + * + * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle + * @example + * + * const ResizableWithRef = forwardRef((props, ref) => + * i ? i.resizable : null)}/> + * ); + */ +function useTransformRef(ref, transformer) { + return (0, _useRef.useCallbackRef)(null, function (value) { + return (0, _assignRef.assignRef)(ref, transformer(value)); }); -}); +} /***/ }), -/***/ "../../graphiql-toolkit/esm/storage/base.js": -/*!**************************************************!*\ - !*** ../../graphiql-toolkit/esm/storage/base.js ***! - \**************************************************/ +/***/ "../../../node_modules/use-sidecar/dist/es2015/config.js": +/*!***************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/config.js ***! + \***************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageAPI = void 0; -function isQuotaError(storage, e) { - return e instanceof DOMException && (e.code === 22 || e.code === 1014 || e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && storage.length !== 0; -} -class StorageAPI { - constructor(storage) { - if (storage) { - this.storage = storage; - } else if (storage === null) { - this.storage = null; - } else if (typeof window === 'undefined') { - this.storage = null; - } else { - this.storage = { - getItem: window.localStorage.getItem.bind(window.localStorage), - setItem: window.localStorage.setItem.bind(window.localStorage), - removeItem: window.localStorage.removeItem.bind(window.localStorage), - get length() { - let keys = 0; - for (const key in window.localStorage) { - if (key.indexOf(`${STORAGE_NAMESPACE}:`) === 0) { - keys += 1; - } - } - return keys; - }, - clear() { - for (const key in window.localStorage) { - if (key.indexOf(`${STORAGE_NAMESPACE}:`) === 0) { - window.localStorage.removeItem(key); - } - } - } - }; - } - } - get(name) { - if (!this.storage) { - return null; - } - const key = `${STORAGE_NAMESPACE}:${name}`; - const value = this.storage.getItem(key); - if (value === 'null' || value === 'undefined') { - this.storage.removeItem(key); - return null; - } - return value || null; - } - set(name, value) { - let quotaError = false; - let error = null; - if (this.storage) { - const key = `${STORAGE_NAMESPACE}:${name}`; - if (value) { - try { - this.storage.setItem(key, value); - } catch (e) { - error = e instanceof Error ? e : new Error(`${e}`); - quotaError = isQuotaError(this.storage, e); - } - } else { - this.storage.removeItem(key); - } - } - return { - isQuotaError: quotaError, - error - }; - } - clear() { - if (this.storage) { - this.storage.clear(); - } +exports.setConfig = exports.config = void 0; +var config = exports.config = { + onError: function (e) { + return console.error(e); } -} -exports.StorageAPI = StorageAPI; -const STORAGE_NAMESPACE = 'graphiql'; +}; +var setConfig = function (conf) { + Object.assign(config, conf); +}; +exports.setConfig = setConfig; /***/ }), -/***/ "../../graphiql-toolkit/esm/storage/custom.js": -/*!****************************************************!*\ - !*** ../../graphiql-toolkit/esm/storage/custom.js ***! - \****************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/use-sidecar/dist/es2015/env.js": +/*!************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/env.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createLocalStorage = createLocalStorage; -function createLocalStorage(_ref) { - let { - namespace - } = _ref; - const storageKeyPrefix = `${namespace}:`; - const getStorageKey = key => `${storageKeyPrefix}${key}`; - const storage = { - setItem: (key, value) => localStorage.setItem(getStorageKey(key), value), - getItem: key => localStorage.getItem(getStorageKey(key)), - removeItem: key => localStorage.removeItem(getStorageKey(key)), - get length() { - let keys = 0; - for (const key in window.localStorage) { - if (key.indexOf(storageKeyPrefix) === 0) { - keys += 1; - } - } - return keys; - }, - clear() { - for (const key in window.localStorage) { - if (key.indexOf(storageKeyPrefix) === 0) { - window.localStorage.removeItem(key); - } - } - } - }; - return storage; -} +exports.env = void 0; +var _detectNodeEs = __webpack_require__(/*! detect-node-es */ "../../../node_modules/detect-node-es/esm/browser.js"); +var env = exports.env = { + isNode: _detectNodeEs.isNode, + forceCache: false +}; /***/ }), -/***/ "../../graphiql-toolkit/esm/storage/history.js": -/*!*****************************************************!*\ - !*** ../../graphiql-toolkit/esm/storage/history.js ***! - \*****************************************************/ +/***/ "../../../node_modules/use-sidecar/dist/es2015/exports.js": +/*!****************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/exports.js ***! + \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HistoryStore = void 0; -var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/esm/storage/query.js"); -const MAX_QUERY_SIZE = 100000; -class HistoryStore { - constructor(storage, maxHistoryLength) { - var _this = this; - this.storage = storage; - this.maxHistoryLength = maxHistoryLength; - this.updateHistory = _ref => { - let { - query, - variables, - headers, - operationName - } = _ref; - if (!this.shouldSaveQuery(query, variables, headers, this.history.fetchRecent())) { - return; - } - this.history.push({ - query, - variables, - headers, - operationName - }); - const historyQueries = this.history.items; - const favoriteQueries = this.favorite.items; - this.queries = historyQueries.concat(favoriteQueries); - }; - this.deleteHistory = function (_ref2) { - let { - query, - variables, - headers, - operationName, - favorite - } = _ref2; - let clearFavorites = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - function deleteFromStore(store) { - const found = store.items.find(x => x.query === query && x.variables === variables && x.headers === headers && x.operationName === operationName); - if (found) { - store.delete(found); - } - } - if (favorite || clearFavorites) { - deleteFromStore(_this.favorite); - } - if (!favorite || clearFavorites) { - deleteFromStore(_this.history); - } - _this.queries = [..._this.history.items, ..._this.favorite.items]; - }; - this.history = new _query.QueryStore('queries', this.storage, this.maxHistoryLength); - this.favorite = new _query.QueryStore('favorites', this.storage, null); - this.queries = [...this.history.fetchAll(), ...this.favorite.fetchAll()]; - } - shouldSaveQuery(query, variables, headers, lastQuerySaved) { - if (!query) { - return false; - } - try { - (0, _graphql.parse)(query); - } catch (_a) { - return false; - } - if (query.length > MAX_QUERY_SIZE) { - return false; - } - if (!lastQuerySaved) { - return true; - } - if (JSON.stringify(query) === JSON.stringify(lastQuerySaved.query)) { - if (JSON.stringify(variables) === JSON.stringify(lastQuerySaved.variables)) { - if (JSON.stringify(headers) === JSON.stringify(lastQuerySaved.headers)) { - return false; - } - if (headers && !lastQuerySaved.headers) { - return false; - } - } - if (variables && !lastQuerySaved.variables) { - return false; - } - } - return true; - } - toggleFavorite(_ref3) { - let { - query, - variables, - headers, - operationName, - label, - favorite - } = _ref3; - const item = { - query, - variables, - headers, - operationName, - label - }; - if (favorite) { - item.favorite = false; - this.favorite.delete(item); - this.history.push(item); - } else { - item.favorite = true; - this.favorite.push(item); - this.history.delete(item); - } - this.queries = [...this.history.items, ...this.favorite.items]; - } - editLabel(_ref4, index) { - let { - query, - variables, - headers, - operationName, - label, - favorite - } = _ref4; - const item = { - query, - variables, - headers, - operationName, - label - }; - if (favorite) { - this.favorite.edit(Object.assign(Object.assign({}, item), { - favorite - }), index); - } else { - this.history.edit(item, index); - } - this.queries = [...this.history.items, ...this.favorite.items]; +exports.exportSidecar = exportSidecar; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var SideCar = function (_a) { + var sideCar = _a.sideCar, + rest = (0, _tslib.__rest)(_a, ["sideCar"]); + if (!sideCar) { + throw new Error('Sidecar: please provide `sideCar` property to import the right car'); + } + var Target = sideCar.read(); + if (!Target) { + throw new Error('Sidecar medium not found'); } + return /*#__PURE__*/React.createElement(Target, (0, _tslib.__assign)({}, rest)); +}; +SideCar.isSideCarExport = true; +function exportSidecar(medium, exported) { + medium.useMedium(exported); + return SideCar; } -exports.HistoryStore = HistoryStore; /***/ }), -/***/ "../../graphiql-toolkit/esm/storage/index.js": -/*!***************************************************!*\ - !*** ../../graphiql-toolkit/esm/storage/index.js ***! - \***************************************************/ +/***/ "../../../node_modules/use-sidecar/dist/es2015/hoc.js": +/*!************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/hoc.js ***! + \************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var _base = __webpack_require__(/*! ./base */ "../../graphiql-toolkit/esm/storage/base.js"); -Object.keys(_base).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _base[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _base[key]; - } - }); -}); -var _history = __webpack_require__(/*! ./history */ "../../graphiql-toolkit/esm/storage/history.js"); -Object.keys(_history).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _history[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _history[key]; - } - }); -}); -var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/esm/storage/query.js"); -Object.keys(_query).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _query[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _query[key]; - } - }); -}); -var _custom = __webpack_require__(/*! ./custom */ "../../graphiql-toolkit/esm/storage/custom.js"); -Object.keys(_custom).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _custom[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _custom[key]; +exports.sidecar = sidecar; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// eslint-disable-next-line @typescript-eslint/ban-types +function sidecar(importer, errorComponent) { + var ErrorCase = function () { + return errorComponent; + }; + return function Sidecar(props) { + var _a = (0, _hook.useSidecar)(importer, props.sideCar), + Car = _a[0], + error = _a[1]; + if (error && errorComponent) { + return ErrorCase; } - }); -}); + // @ts-expect-error type shenanigans + return Car ? /*#__PURE__*/React.createElement(Car, (0, _tslib.__assign)({}, props)) : null; + }; +} /***/ }), -/***/ "../../graphiql-toolkit/esm/storage/query.js": -/*!***************************************************!*\ - !*** ../../graphiql-toolkit/esm/storage/query.js ***! - \***************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../../node_modules/use-sidecar/dist/es2015/hook.js": +/*!*************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/hook.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.QueryStore = void 0; -class QueryStore { - constructor(key, storage) { - let maxSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - this.key = key; - this.storage = storage; - this.maxSize = maxSize; - this.items = this.fetchAll(); - } - get length() { - return this.items.length; - } - contains(item) { - return this.items.some(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); - } - edit(item, index) { - if (typeof index === 'number' && this.items[index]) { - const found = this.items[index]; - if (found.query === item.query && found.variables === item.variables && found.headers === item.headers && found.operationName === item.operationName) { - this.items.splice(index, 1, item); - this.save(); - return; - } - } - const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); - if (itemIndex !== -1) { - this.items.splice(itemIndex, 1, item); - this.save(); - } - } - delete(item) { - const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); - if (itemIndex !== -1) { - this.items.splice(itemIndex, 1); - this.save(); - } - } - fetchRecent() { - return this.items.at(-1); - } - fetchAll() { - const raw = this.storage.get(this.key); - if (raw) { - return JSON.parse(raw)[this.key]; - } - return []; +exports.useSidecar = useSidecar; +var _react = __webpack_require__(/*! react */ "react"); +var _env = __webpack_require__(/*! ./env */ "../../../node_modules/use-sidecar/dist/es2015/env.js"); +var cache = new WeakMap(); +var NO_OPTIONS = {}; +function useSidecar(importer, effect) { + var options = effect && effect.options || NO_OPTIONS; + if (_env.env.isNode && !options.ssr) { + return [null, null]; } - push(item) { - const items = [...this.items, item]; - if (this.maxSize && items.length > this.maxSize) { - items.shift(); - } - for (let attempts = 0; attempts < 5; attempts++) { - const response = this.storage.set(this.key, JSON.stringify({ - [this.key]: items - })); - if (!(response === null || response === void 0 ? void 0 : response.error)) { - this.items = items; - } else if (response.isQuotaError && this.maxSize) { - items.shift(); - } else { - return; - } + // eslint-disable-next-line react-hooks/rules-of-hooks + return useRealSidecar(importer, effect); +} +function useRealSidecar(importer, effect) { + var options = effect && effect.options || NO_OPTIONS; + var couldUseCache = _env.env.forceCache || _env.env.isNode && !!options.ssr || !options.async; + var _a = (0, _react.useState)(couldUseCache ? function () { + return cache.get(importer); + } : undefined), + Car = _a[0], + setCar = _a[1]; + var _b = (0, _react.useState)(null), + error = _b[0], + setError = _b[1]; + (0, _react.useEffect)(function () { + if (!Car) { + importer().then(function (car) { + var resolved = effect ? effect.read() : car.default || car; + if (!resolved) { + console.error('Sidecar error: with importer', importer); + var error_1; + if (effect) { + console.error('Sidecar error: with medium', effect); + error_1 = new Error('Sidecar medium was not found'); + } else { + error_1 = new Error('Sidecar was not found in exports'); + } + setError(function () { + return error_1; + }); + throw error_1; + } + cache.set(importer, resolved); + setCar(function () { + return resolved; + }); + }, function (e) { + return setError(function () { + return e; + }); + }); } - } - save() { - this.storage.set(this.key, JSON.stringify({ - [this.key]: this.items - })); - } + }, []); + return [Car, error]; } -exports.QueryStore = QueryStore; /***/ }), -/***/ "../node_modules/linkify-it/build/index.cjs.js": -/*!*****************************************************!*\ - !*** ../node_modules/linkify-it/build/index.cjs.js ***! - \*****************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - - - -var uc_micro = __webpack_require__(/*! uc.micro */ "../node_modules/uc.micro/build/index.cjs.js"); -function reFactory(opts) { - const re = {}; - opts = opts || {}; - re.src_Any = uc_micro.Any.source; - re.src_Cc = uc_micro.Cc.source; - re.src_Z = uc_micro.Z.source; - re.src_P = uc_micro.P.source; - - // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation) - re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|'); - - // \p{\Z\Cc} (white spaces + control) - re.src_ZCc = [re.src_Z, re.src_Cc].join('|'); - - // Experimental. List of chars, completely prohibited in links - // because can separate it from other part of text - const text_separators = '[><\uff5c]'; - - // All possible word characters (everything without punctuation, spaces & controls) - // Defined via punctuation & spaces to save space - // Should be something like \p{\L\N\S\M} (\w but without `_`) - re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'; - // The same as abothe but without [0-9] - // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')'; - - re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; - - // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch. - re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?'; - re.src_port = '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?'; - re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' + '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))'; - re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' + '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' + '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' + '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' + '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' + "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" + - // allow `I'm_king` if no pair found - "\\'(?=" + re.src_pseudo_letter + '|[-])|' + - // google has many dots in "google search" links (#66, #81). - // github has ... in commit range links, - // Restrict to - // - english - // - percent-encoded - // - parts of file path - // - params separator - // until more examples found. - '\\.{2,}[a-zA-Z0-9%/&]|' + '\\.(?!' + re.src_ZCc + '|[.]|$)|' + (opts['---'] ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate - : '\\-+|') + - // allow `,,,` in paths - ',(?!' + re.src_ZCc + '|$)|' + - // allow `;` if not followed by space-like char - ';(?!' + re.src_ZCc + '|$)|' + - // allow `!!!` in paths, but not at the end - '\\!+(?!' + re.src_ZCc + '|[!]|$)|' + '\\?(?!' + re.src_ZCc + '|[?]|$)' + ')+' + '|\\/' + ')?'; - - // Allow anything in markdown spec, forbid quote (") at the first position - // because emails enclosed in quotes are far more common - re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'; - re.src_xn = 'xn--[a-z0-9\\-]{1,59}'; +/***/ "../../../node_modules/use-sidecar/dist/es2015/index.js": +/*!**************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/index.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // More to read about domain names - // http://serverfault.com/questions/638260/ +"use strict"; - re.src_domain_root = - // Allow letters & digits (http://test1) - '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')'; - re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')'; - re.src_host = '(?:' + - // Don't need IP check, because digits are already allowed in normal domain names - // src_ip4 + - // '|' + - '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain /* _root */ + ')' + ')'; - re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' + ')'; - re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))'; - re.src_host_strict = re.src_host + re.src_host_terminator; - re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator; - re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator; - re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator; - re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator; - // - // Main rules - // +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "createMedium", ({ + enumerable: true, + get: function () { + return _medium.createMedium; + } +})); +Object.defineProperty(exports, "createSidecarMedium", ({ + enumerable: true, + get: function () { + return _medium.createSidecarMedium; + } +})); +Object.defineProperty(exports, "exportSidecar", ({ + enumerable: true, + get: function () { + return _exports.exportSidecar; + } +})); +Object.defineProperty(exports, "renderCar", ({ + enumerable: true, + get: function () { + return _renderProp.renderCar; + } +})); +Object.defineProperty(exports, "setConfig", ({ + enumerable: true, + get: function () { + return _config.setConfig; + } +})); +Object.defineProperty(exports, "sidecar", ({ + enumerable: true, + get: function () { + return _hoc.sidecar; + } +})); +Object.defineProperty(exports, "useSidecar", ({ + enumerable: true, + get: function () { + return _hook.useSidecar; + } +})); +var _hoc = __webpack_require__(/*! ./hoc */ "../../../node_modules/use-sidecar/dist/es2015/hoc.js"); +var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js"); +var _config = __webpack_require__(/*! ./config */ "../../../node_modules/use-sidecar/dist/es2015/config.js"); +var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/use-sidecar/dist/es2015/medium.js"); +var _renderProp = __webpack_require__(/*! ./renderProp */ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js"); +var _exports = __webpack_require__(/*! ./exports */ "../../../node_modules/use-sidecar/dist/es2015/exports.js"); - // Rude test fuzzy links by host, for quick deny - re.tpl_host_fuzzy_test = 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))'; - re.tpl_email_fuzzy = '(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')'; - re.tpl_link_fuzzy = - // Fuzzy link can't be prepended with .:/\- and non punctuation. - // but can start with > (markdown blockquote) - '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'; - re.tpl_link_no_ip_fuzzy = - // Fuzzy link can't be prepended with .:/\- and non punctuation. - // but can start with > (markdown blockquote) - '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')'; - return re; -} +/***/ }), -// -// Helpers -// +/***/ "../../../node_modules/use-sidecar/dist/es2015/medium.js": +/*!***************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/medium.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -// Merge objects -// -function assign(obj /* from1, from2, from3, ... */) { - const sources = Array.prototype.slice.call(arguments, 1); - sources.forEach(function (source) { - if (!source) { - return; - } - Object.keys(source).forEach(function (key) { - obj[key] = source[key]; - }); - }); - return obj; -} -function _class(obj) { - return Object.prototype.toString.call(obj); -} -function isString(obj) { - return _class(obj) === '[object String]'; -} -function isObject(obj) { - return _class(obj) === '[object Object]'; -} -function isRegExp(obj) { - return _class(obj) === '[object RegExp]'; -} -function isFunction(obj) { - return _class(obj) === '[object Function]'; -} -function escapeRE(str) { - return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); -} +"use strict"; -// -const defaultOptions = { - fuzzyLink: true, - fuzzyEmail: true, - fuzzyIP: false -}; -function isOptionsObj(obj) { - return Object.keys(obj || {}).reduce(function (acc, k) { - /* eslint-disable-next-line no-prototype-builtins */ - return acc || defaultOptions.hasOwnProperty(k); - }, false); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createMedium = createMedium; +exports.createSidecarMedium = createSidecarMedium; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +function ItoI(a) { + return a; } -const defaultSchemas = { - 'http:': { - validate: function (text, pos, self) { - const tail = text.slice(pos); - if (!self.re.http) { - // compile lazily, because "host"-containing variables can change on tlds update. - self.re.http = new RegExp('^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'); +function innerCreateMedium(defaults, middleware) { + if (middleware === void 0) { + middleware = ItoI; + } + var buffer = []; + var assigned = false; + var medium = { + read: function () { + if (assigned) { + throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.'); } - if (self.re.http.test(tail)) { - return tail.match(self.re.http)[0].length; + if (buffer.length) { + return buffer[buffer.length - 1]; } - return 0; - } - }, - 'https:': 'http:', - 'ftp:': 'http:', - '//': { - validate: function (text, pos, self) { - const tail = text.slice(pos); - if (!self.re.no_http) { - // compile lazily, because "host"-containing variables can change on tlds update. - self.re.no_http = new RegExp('^' + self.re.src_auth + - // Don't allow single-level domains, because of false positives like '//test' - // with code comments - '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i'); + return defaults; + }, + useMedium: function (data) { + var item = middleware(data, assigned); + buffer.push(item); + return function () { + buffer = buffer.filter(function (x) { + return x !== item; + }); + }; + }, + assignSyncMedium: function (cb) { + assigned = true; + while (buffer.length) { + var cbs = buffer; + buffer = []; + cbs.forEach(cb); } - if (self.re.no_http.test(tail)) { - // should not be `://` & `///`, that protects from errors in protocol name - if (pos >= 3 && text[pos - 3] === ':') { - return 0; - } - if (pos >= 3 && text[pos - 3] === '/') { - return 0; + buffer = { + push: function (x) { + return cb(x); + }, + filter: function () { + return buffer; } - return tail.match(self.re.no_http)[0].length; - } - return 0; - } - }, - 'mailto:': { - validate: function (text, pos, self) { - const tail = text.slice(pos); - if (!self.re.mailto) { - self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'); - } - if (self.re.mailto.test(tail)) { - return tail.match(self.re.mailto)[0].length; + }; + }, + assignMedium: function (cb) { + assigned = true; + var pendingQueue = []; + if (buffer.length) { + var cbs = buffer; + buffer = []; + cbs.forEach(cb); + pendingQueue = buffer; } - return 0; - } - } -}; - -// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js) -/* eslint-disable-next-line max-len */ -const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'; - -// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead -const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|'); -function resetScanCache(self) { - self.__index__ = -1; - self.__text_cache__ = ''; -} -function createValidator(re) { - return function (text, pos) { - const tail = text.slice(pos); - if (re.test(tail)) { - return tail.match(re)[0].length; + var executeQueue = function () { + var cbs = pendingQueue; + pendingQueue = []; + cbs.forEach(cb); + }; + var cycle = function () { + return Promise.resolve().then(executeQueue); + }; + cycle(); + buffer = { + push: function (x) { + pendingQueue.push(x); + cycle(); + }, + filter: function (filter) { + pendingQueue = pendingQueue.filter(filter); + return buffer; + } + }; } - return 0; - }; -} -function createNormalizer() { - return function (match, self) { - self.normalize(match); }; + return medium; } - -// Schemas compiler. Build regexps. -// -function compile(self) { - // Load & clone RE patterns. - const re = self.re = reFactory(self.__opts__); - - // Define dynamic patterns - const tlds = self.__tlds__.slice(); - self.onCompile(); - if (!self.__tlds_replaced__) { - tlds.push(tlds_2ch_src_re); +function createMedium(defaults, middleware) { + if (middleware === void 0) { + middleware = ItoI; } - tlds.push(re.src_xn); - re.src_tlds = tlds.join('|'); - function untpl(tpl) { - return tpl.replace('%TLDS%', re.src_tlds); + return innerCreateMedium(defaults, middleware); +} +// eslint-disable-next-line @typescript-eslint/ban-types +function createSidecarMedium(options) { + if (options === void 0) { + options = {}; } - re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i'); - re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i'); - re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i'); - re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i'); - - // - // Compile each schema - // + var medium = innerCreateMedium(null); + medium.options = (0, _tslib.__assign)({ + async: true, + ssr: false + }, options); + return medium; +} - const aliases = []; - self.__compiled__ = {}; // Reset compiled data +/***/ }), - function schemaError(name, val) { - throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val); - } - Object.keys(self.__schemas__).forEach(function (name) { - const val = self.__schemas__[name]; +/***/ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js": +/*!*******************************************************************!*\ + !*** ../../../node_modules/use-sidecar/dist/es2015/renderProp.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // skip disabled methods - if (val === null) { - return; - } - const compiled = { - validate: null, - link: null - }; - self.__compiled__[name] = compiled; - if (isObject(val)) { - if (isRegExp(val.validate)) { - compiled.validate = createValidator(val.validate); - } else if (isFunction(val.validate)) { - compiled.validate = val.validate; - } else { - schemaError(name, val); - } - if (isFunction(val.normalize)) { - compiled.normalize = val.normalize; - } else if (!val.normalize) { - compiled.normalize = createNormalizer(); - } else { - schemaError(name, val); - } - return; - } - if (isString(val)) { - aliases.push(name); - return; - } - schemaError(name, val); - }); +"use strict"; - // - // Compile postponed aliases - // - aliases.forEach(function (alias) { - if (!self.__compiled__[self.__schemas__[alias]]) { - // Silently fail on missed schemas to avoid errons on disable. - // schemaError(alias, self.__schemas__[alias]); - return; - } - self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate; - self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.renderCar = renderCar; +var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs"); +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); +var React = _react; +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function renderCar(WrappedComponent, defaults) { + function State(_a) { + var stateRef = _a.stateRef, + props = _a.props; + var renderTarget = (0, _react.useCallback)(function SideTarget() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + (0, _react.useLayoutEffect)(function () { + stateRef.current(args); + }); + return null; + }, []); + // @ts-ignore + return /*#__PURE__*/React.createElement(WrappedComponent, (0, _tslib.__assign)({}, props, { + children: renderTarget + })); + } + var Children = /*#__PURE__*/React.memo(function (_a) { + var stateRef = _a.stateRef, + defaultState = _a.defaultState, + children = _a.children; + var _b = (0, _react.useState)(defaultState.current), + state = _b[0], + setState = _b[1]; + (0, _react.useEffect)(function () { + stateRef.current = setState; + }, []); + return children.apply(void 0, state); + }, function () { + return true; }); - - // - // Fake record for guessed links - // - self.__compiled__[''] = { - validate: null, - normalize: createNormalizer() + return function Combiner(props) { + var defaultState = React.useRef(defaults(props)); + var ref = React.useRef(function (state) { + return defaultState.current = state; + }); + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(State, { + stateRef: ref, + props: props + }), /*#__PURE__*/React.createElement(Children, { + stateRef: ref, + defaultState: defaultState, + children: props.children + })); }; +} - // - // Build schema condition - // - const slist = Object.keys(self.__compiled__).filter(function (name) { - // Filter disabled & fake schemas - return name.length > 0 && self.__compiled__[name]; - }).map(escapeRE).join('|'); - // (?!_) cause 1.5x slowdown - self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i'); - self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); - self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i'); - self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i'); +/***/ }), - // - // Cleanup - // +/***/ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js": +/*!*************************************************************************!*\ + !*** ../../../node_modules/vscode-languageserver-types/lib/esm/main.js ***! + \*************************************************************************/ +/***/ (function(__unused_webpack_module, exports) { - resetScanCache(self); -} +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ -/** - * class Match - * - * Match result. Single element of array, returned by [[LinkifyIt#match]] - **/ -function Match(self, shift) { - const start = self.__index__; - const end = self.__last_index__; - const text = self.__text_cache__.slice(start, end); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.uinteger = exports.integer = exports.WorkspaceSymbol = exports.WorkspaceFolder = exports.WorkspaceEdit = exports.WorkspaceChange = exports.VersionedTextDocumentIdentifier = exports.URI = exports.TextEdit = exports.TextDocumentItem = exports.TextDocumentIdentifier = exports.TextDocumentEdit = exports.TextDocument = exports.SymbolTag = exports.SymbolKind = exports.SymbolInformation = exports.SignatureInformation = exports.SemanticTokens = exports.SemanticTokenTypes = exports.SemanticTokenModifiers = exports.SelectionRange = exports.RenameFile = exports.Range = exports.Position = exports.ParameterInformation = exports.OptionalVersionedTextDocumentIdentifier = exports.MarkupKind = exports.MarkupContent = exports.MarkedString = exports.LocationLink = exports.Location = exports.InsertTextMode = exports.InsertTextFormat = exports.InsertReplaceEdit = exports.InlineValueVariableLookup = exports.InlineValueText = exports.InlineValueEvaluatableExpression = exports.InlineValueContext = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlayHint = exports.Hover = exports.FormattingOptions = exports.FoldingRangeKind = exports.FoldingRange = exports.EOL = exports.DocumentUri = exports.DocumentSymbol = exports.DocumentLink = exports.DocumentHighlightKind = exports.DocumentHighlight = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.Diagnostic = exports.DeleteFile = exports.CreateFile = exports.CompletionList = exports.CompletionItemTag = exports.CompletionItemLabelDetails = exports.CompletionItemKind = exports.CompletionItem = exports.Command = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.CodeLens = exports.CodeDescription = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.CodeActionContext = exports.CodeAction = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.AnnotatedTextEdit = void 0; +var DocumentUri; +(function (DocumentUri) { + function is(value) { + return typeof value === 'string'; + } + DocumentUri.is = is; +})(DocumentUri || (exports.DocumentUri = DocumentUri = {})); +var URI; +(function (URI) { + function is(value) { + return typeof value === 'string'; + } + URI.is = is; +})(URI || (exports.URI = URI = {})); +var integer; +(function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; + } + integer.is = is; +})(integer || (exports.integer = integer = {})); +var uinteger; +(function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; + } + uinteger.is = is; +})(uinteger || (exports.uinteger = uinteger = {})); +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +var Position; +(function (Position) { /** - * Match#schema -> String - * - * Prefix (protocol) for matched string. - **/ - this.schema = self.__schema__.toLowerCase(); + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { + line: line, + character: character + }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; +})(Position || (exports.Position = Position = {})); +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +var Range; +(function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { + start: Position.create(one, two), + end: Position.create(three, four) + }; + } else if (Position.is(one) && Position.is(two)) { + return { + start: one, + end: two + }; + } else { + throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; +})(Range || (exports.Range = Range = {})); +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +var Location; +(function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { + uri: uri, + range: range + }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; +})(Location || (exports.Location = Location = {})); +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +var LocationLink; +(function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { + targetUri: targetUri, + targetRange: targetRange, + targetSelectionRange: targetSelectionRange, + originSelectionRange: originSelectionRange + }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range.is(candidate.targetSelectionRange) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; +})(LocationLink || (exports.LocationLink = LocationLink = {})); +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +var Color; +(function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red: red, + green: green, + blue: blue, + alpha: alpha + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; +})(Color || (exports.Color = Color = {})); +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +var ColorInformation; +(function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range: range, + color: color + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; +})(ColorInformation || (exports.ColorInformation = ColorInformation = {})); +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +var ColorPresentation; +(function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label: label, + textEdit: textEdit, + additionalTextEdits: additionalTextEdits + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; +})(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {})); +/** + * A set of predefined range kinds. + */ +var FoldingRangeKind; +(function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind.Comment = 'comment'; + /** + * Folding range for an import or include + */ + FoldingRangeKind.Imports = 'imports'; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind.Region = 'region'; +})(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {})); +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +var FoldingRange; +(function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + var result = { + startLine: startLine, + endLine: endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; +})(FoldingRange || (exports.FoldingRange = FoldingRange = {})); +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +var DiagnosticRelatedInformation; +(function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location: location, + message: message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; +})(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {})); +/** + * The diagnostic's severity. + */ +var DiagnosticSeverity; +(function (DiagnosticSeverity) { /** - * Match#index -> Number - * - * First position of matched string. - **/ - this.index = start + shift; + * Reports an error. + */ + DiagnosticSeverity.Error = 1; /** - * Match#lastIndex -> Number - * - * Next position after matched string. - **/ - this.lastIndex = end + shift; + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; /** - * Match#raw -> String - * - * Matched string. - **/ - this.raw = text; + * Reports an information. + */ + DiagnosticSeverity.Information = 3; /** - * Match#text -> String + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; +})(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {})); +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +var DiagnosticTag; +(function (DiagnosticTag) { + /** + * Unused or unnecessary code. * - * Notmalized text of matched string. - **/ - this.text = text; + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; /** - * Match#url -> String + * Deprecated or obsolete code. * - * Normalized url of matched string. - **/ - this.url = text; -} -function createMatch(self, shift) { - const match = new Match(self, shift); - self.__compiled__[match.schema].normalize(match, self); - return match; -} - -/** - * class LinkifyIt - **/ - + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; +})(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {})); /** - * new LinkifyIt(schemas, options) - * - schemas (Object): Optional. Additional schemas to validate (prefix/validator) - * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false } - * - * Creates new linkifier instance with optional additional schemas. - * Can be called without `new` keyword for convenience. - * - * By default understands: - * - * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links - * - "fuzzy" links and emails (example.com, foo@bar.com). - * - * `schemas` is an object, where each key/value describes protocol/rule: - * - * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:` - * for example). `linkify-it` makes shure that prefix is not preceeded with - * alphanumeric char and symbols. Only whitespaces and punctuation allowed. - * - __value__ - rule to check tail after link prefix - * - _String_ - just alias to existing rule - * - _Object_ - * - _validate_ - validator function (should return matched length on success), - * or `RegExp`. - * - _normalize_ - optional function to normalize text & url of matched result - * (for example, for @twitter mentions). - * - * `options`: - * - * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`. - * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts - * like version numbers. Default `false`. - * - __fuzzyEmail__ - recognize emails without `mailto:` prefix. + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. * - **/ -function LinkifyIt(schemas, options) { - if (!(this instanceof LinkifyIt)) { - return new LinkifyIt(schemas, options); + * @since 3.16.0 + */ +var CodeDescription; +(function (CodeDescription) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); } - if (!options) { - if (isOptionsObj(schemas)) { - options = schemas; - schemas = {}; + CodeDescription.is = is; +})(CodeDescription || (exports.CodeDescription = CodeDescription = {})); +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +var Diagnostic; +(function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + var result = { + range: range, + message: message + }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; } + return result; } - this.__opts__ = assign({}, defaultOptions, options); - - // Cache last tested result. Used to skip repeating steps on next `match` call. - this.__index__ = -1; - this.__last_index__ = -1; // Next scan position - this.__schema__ = ''; - this.__text_cache__ = ''; - this.__schemas__ = assign({}, defaultSchemas, schemas); - this.__compiled__ = {}; - this.__tlds__ = tlds_default; - this.__tlds_replaced__ = false; - this.re = {}; - compile(this); -} - -/** chainable - * LinkifyIt#add(schema, definition) - * - schema (String): rule name (fixed pattern prefix) - * - definition (String|RegExp|Object): schema definition - * - * Add new rule definition. See constructor description for details. - **/ -LinkifyIt.prototype.add = function add(schema, definition) { - this.__schemas__[schema] = definition; - compile(this); - return this; -}; - -/** chainable - * LinkifyIt#set(options) - * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false } - * - * Set recognition options for links without schema. - **/ -LinkifyIt.prototype.set = function set(options) { - this.__opts__ = assign(this.__opts__, options); - return this; -}; - -/** - * LinkifyIt#test(text) -> Boolean - * - * Searches linkifiable pattern and returns `true` on success or `false` on fail. - **/ -LinkifyIt.prototype.test = function test(text) { - // Reset scan cache - this.__text_cache__ = text; - this.__index__ = -1; - if (!text.length) { - return false; + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value) { + var _a; + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); } - let m, ml, me, len, shift, next, re, tld_pos, at_pos; - - // try to scan for link with schema - that's the most simple rule - if (this.re.schema_test.test(text)) { - re = this.re.schema_search; - re.lastIndex = 0; - while ((m = re.exec(text)) !== null) { - len = this.testSchemaAt(text, m[2], re.lastIndex); - if (len) { - this.__schema__ = m[2]; - this.__index__ = m.index + m[1].length; - this.__last_index__ = m.index + m[0].length + len; - break; - } + Diagnostic.is = is; +})(Diagnostic || (exports.Diagnostic = Diagnostic = {})); +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +var Command; +(function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; } - } - if (this.__opts__.fuzzyLink && this.__compiled__['http:']) { - // guess schemaless links - tld_pos = text.search(this.re.host_fuzzy_test); - if (tld_pos >= 0) { - // if tld is located after found link - no need to check fuzzy pattern - if (this.__index__ < 0 || tld_pos < this.__index__) { - if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) { - shift = ml.index + ml[1].length; - if (this.__index__ < 0 || shift < this.__index__) { - this.__schema__ = ''; - this.__index__ = shift; - this.__last_index__ = ml.index + ml[0].length; - } - } - } + var result = { + title: title, + command: command + }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; } + return result; } - if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) { - // guess schemaless emails - at_pos = text.indexOf('@'); - if (at_pos >= 0) { - // We can't skip this check, because this cases are possible: - // 192.168.1.1@gmail.com, my.in@example.com - if ((me = text.match(this.re.email_fuzzy)) !== null) { - shift = me.index + me[1].length; - next = me.index + me[0].length; - if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) { - this.__schema__ = 'mailto:'; - this.__index__ = shift; - this.__last_index__ = next; - } - } - } + Command.create = create; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); } - return this.__index__ >= 0; -}; - -/** - * LinkifyIt#pretest(text) -> Boolean - * - * Very quick check, that can give false positives. Returns true if link MAY BE - * can exists. Can be used for speed optimization, when you need to check that - * link NOT exists. - **/ -LinkifyIt.prototype.pretest = function pretest(text) { - return this.re.pretest.test(text); -}; - + Command.is = is; +})(Command || (exports.Command = Command = {})); /** - * LinkifyIt#testSchemaAt(text, name, position) -> Number - * - text (String): text to scan - * - name (String): rule (schema) name - * - position (Number): text offset to check from - * - * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly - * at given position. Returns length of found pattern (0 on fail). - **/ -LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) { - // If not supported schema check requested - terminate - if (!this.__compiled__[schema.toLowerCase()]) { - return 0; + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +var TextEdit; +(function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { + range: range, + newText: newText + }; } - return this.__compiled__[schema.toLowerCase()].validate(text, pos, this); -}; - -/** - * LinkifyIt#match(text) -> Array|null - * - * Returns array of found link descriptions or `null` on fail. We strongly - * recommend to use [[LinkifyIt#test]] first, for best speed. - * - * ##### Result match description - * - * - __schema__ - link schema, can be empty for fuzzy links, or `//` for - * protocol-neutral links. - * - __index__ - offset of matched text - * - __lastIndex__ - index of next char after mathch end - * - __raw__ - matched text - * - __text__ - normalized text - * - __url__ - link, generated from matched text - **/ -LinkifyIt.prototype.match = function match(text) { - const result = []; - let shift = 0; - - // Try to take previous element from cache, if .test() called before - if (this.__index__ >= 0 && this.__text_cache__ === text) { - result.push(createMatch(this, shift)); - shift = this.__last_index__; + TextEdit.replace = replace; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { + range: { + start: position, + end: position + }, + newText: newText + }; } - - // Cut head if cache was used - let tail = shift ? text.slice(shift) : text; - - // Scan string until end reached - while (this.test(tail)) { - result.push(createMatch(this, shift)); - tail = tail.slice(this.__last_index__); - shift += this.__last_index__; + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { + range: range, + newText: '' + }; } - if (result.length) { + TextEdit.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range); + } + TextEdit.is = is; +})(TextEdit || (exports.TextEdit = TextEdit = {})); +var ChangeAnnotation; +(function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + var result = { + label: label + }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } return result; } - return null; -}; - -/** - * LinkifyIt#matchAtStart(text) -> Match|null - * - * Returns fully-formed (not fuzzy) link if it starts at the beginning - * of the string, and null otherwise. - **/ -LinkifyIt.prototype.matchAtStart = function matchAtStart(text) { - // Reset scan cache - this.__text_cache__ = text; - this.__index__ = -1; - if (!text.length) return null; - const m = this.re.schema_at_start.exec(text); - if (!m) return null; - const len = this.testSchemaAt(text, m[2], m[0].length); - if (!len) return null; - this.__schema__ = m[2]; - this.__index__ = m.index + m[1].length; - this.__last_index__ = m.index + m[0].length + len; - return createMatch(this, 0); -}; - -/** chainable - * LinkifyIt#tlds(list [, keepOld]) -> this - * - list (Array): list of tlds - * - keepOld (Boolean): merge with current list if `true` (`false` by default) - * - * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix) - * to avoid false positives. By default this algorythm used: - * - * - hostname with any 2-letter root zones are ok. - * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф - * are ok. - * - encoded (`xn--...`) root zones are ok. - * - * If list is replaced, then exact match for 2-chars root zones will be checked. - **/ -LinkifyIt.prototype.tlds = function tlds(list, keepOld) { - list = Array.isArray(list) ? list : [list]; - if (!keepOld) { - this.__tlds__ = list.slice(); - this.__tlds_replaced__ = true; - compile(this); - return this; + ChangeAnnotation.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && (Is.string(candidate.description) || candidate.description === undefined); } - this.__tlds__ = this.__tlds__.concat(list).sort().filter(function (el, idx, arr) { - return el !== arr[idx - 1]; - }).reverse(); - compile(this); - return this; -}; - -/** - * LinkifyIt#normalize(match) - * - * Default normalizer (if schema does not define it's own). - **/ -LinkifyIt.prototype.normalize = function normalize(match) { - // Do minimal possible changes by default. Need to collect feedback prior - // to move forward https://github.com/markdown-it/linkify-it/issues/1 - - if (!match.schema) { - match.url = 'http://' + match.url; + ChangeAnnotation.is = is; +})(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {})); +var ChangeAnnotationIdentifier; +(function (ChangeAnnotationIdentifier) { + function is(value) { + var candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier.is = is; +})(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {})); +var AnnotatedTextEdit; +(function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { + range: range, + newText: newText, + annotationId: annotation + }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { + range: { + start: position, + end: position + }, + newText: newText, + annotationId: annotation + }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { + range: range, + newText: '', + annotationId: annotation + }; } - if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) { - match.url = 'mailto:' + match.url; + AnnotatedTextEdit.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); } -}; - + AnnotatedTextEdit.is = is; +})(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {})); /** - * LinkifyIt#onCompile() - * - * Override to modify basic RegExp-s. - **/ -LinkifyIt.prototype.onCompile = function onCompile() {}; -module.exports = LinkifyIt; - -/***/ }), - -/***/ "../node_modules/markdown-it/dist/index.cjs.js": -/*!*****************************************************!*\ - !*** ../node_modules/markdown-it/dist/index.cjs.js ***! - \*****************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - - - -var mdurl = __webpack_require__(/*! mdurl */ "../node_modules/mdurl/build/index.cjs.js"); -var ucmicro = __webpack_require__(/*! uc.micro */ "../node_modules/uc.micro/build/index.cjs.js"); -var entities = __webpack_require__(/*! entities */ "../../../node_modules/entities/lib/index.js"); -var LinkifyIt = __webpack_require__(/*! linkify-it */ "../node_modules/linkify-it/build/index.cjs.js"); -var punycode = __webpack_require__(/*! punycode.js */ "../../../node_modules/punycode.js/punycode.es6.js"); -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { - return e[k]; - } - }); - } - }); + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +var TextDocumentEdit; +(function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { + textDocument: textDocument, + edits: edits + }; } - n.default = e; - return Object.freeze(n); -} -var mdurl__namespace = /*#__PURE__*/_interopNamespaceDefault(mdurl); -var ucmicro__namespace = /*#__PURE__*/_interopNamespaceDefault(ucmicro); - -// Utilities -// - -function _class(obj) { - return Object.prototype.toString.call(obj); -} -function isString(obj) { - return _class(obj) === '[object String]'; -} -const _hasOwnProperty = Object.prototype.hasOwnProperty; -function has(object, key) { - return _hasOwnProperty.call(object, key); -} - -// Merge objects -// -function assign(obj /* from1, from2, from3, ... */) { - const sources = Array.prototype.slice.call(arguments, 1); - sources.forEach(function (source) { - if (!source) { - return; + TextDocumentEdit.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; +})(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {})); +var CreateFile; +(function (CreateFile) { + function create(uri, options, annotation) { + var result = { + kind: 'create', + uri: uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; } - if (typeof source !== 'object') { - throw new TypeError(source + 'must be object'); + if (annotation !== undefined) { + result.annotationId = annotation; } - Object.keys(source).forEach(function (key) { - obj[key] = source[key]; - }); - }); - return obj; -} - -// Remove element from array and put another array at those position. -// Useful for some operations with tokens -function arrayReplaceAt(src, pos, newElements) { - return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); -} -function isValidEntityCode(c) { - /* eslint no-bitwise:0 */ - // broken sequence - if (c >= 0xD800 && c <= 0xDFFF) { - return false; + return result; } - // never used - if (c >= 0xFDD0 && c <= 0xFDEF) { - return false; + CreateFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); } - if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { - return false; + CreateFile.is = is; +})(CreateFile || (exports.CreateFile = CreateFile = {})); +var RenameFile; +(function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: 'rename', + oldUri: oldUri, + newUri: newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; } - // control codes - if (c >= 0x00 && c <= 0x08) { - return false; + RenameFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); } - if (c === 0x0B) { - return false; + RenameFile.is = is; +})(RenameFile || (exports.RenameFile = RenameFile = {})); +var DeleteFile; +(function (DeleteFile) { + function create(uri, options, annotation) { + var result = { + kind: 'delete', + uri: uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; } - if (c >= 0x0E && c <= 0x1F) { - return false; + DeleteFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); } - if (c >= 0x7F && c <= 0x9F) { - return false; + DeleteFile.is = is; +})(DeleteFile || (exports.DeleteFile = DeleteFile = {})); +var WorkspaceEdit; +(function (WorkspaceEdit) { + function is(value) { + var candidate = value; + return candidate && (candidate.changes !== undefined || candidate.documentChanges !== undefined) && (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } else { + return TextDocumentEdit.is(change); + } + })); } - // out of range - if (c > 0x10FFFF) { - return false; + WorkspaceEdit.is = is; +})(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {})); +var TextEditChangeImpl = /** @class */function () { + function TextEditChangeImpl(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; } - return true; -} -function fromCodePoint(c) { - /* eslint no-bitwise:0 */ - if (c > 0xffff) { - c -= 0x10000; - const surrogate1 = 0xd800 + (c >> 10); - const surrogate2 = 0xdc00 + (c & 0x3ff); - return String.fromCharCode(surrogate1, surrogate2); + TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.delete = function (range, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.add = function (edit) { + this.edits.push(edit); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { + if (value === undefined) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl; +}(); +/** + * A helper class + */ +var ChangeAnnotations = /** @class */function () { + function ChangeAnnotations(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations.prototype.all = function () { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations.prototype, "size", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { + var id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error("Id ".concat(id, " is already in use.")); + } + if (annotation === undefined) { + throw new Error("No annotation provided for id ".concat(id)); + } + this._annotations[id] = annotation; + this._size++; + return id; + }; + ChangeAnnotations.prototype.nextId = function () { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations; +}(); +/** + * A workspace change helps constructing changes to a workspace. + */ +var WorkspaceChange = exports.WorkspaceChange = /** @class */function () { + function WorkspaceChange(workspaceEdit) { + var _this = this; + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function (change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function (key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange.prototype.getTextEditChange = function (key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var textDocument = { + uri: key.uri, + version: key.version + }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument: textDocument, + edits: edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange.prototype.initDocumentChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange.prototype.initChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + }; + WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + return WorkspaceChange; +}(); +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +var TextDocumentIdentifier; +(function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { + uri: uri + }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); } - return String.fromCharCode(c); -} -const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g; -const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; -const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi'); -const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i; -function replaceEntityPattern(match, name) { - if (name.charCodeAt(0) === 0x23 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { - const code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); - if (isValidEntityCode(code)) { - return fromCodePoint(code); - } - return match; + TextDocumentIdentifier.is = is; +})(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {})); +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +var VersionedTextDocumentIdentifier; +(function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { + uri: uri, + version: version + }; } - const decoded = entities.decodeHTML(match); - if (decoded !== match) { - return decoded; + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); } - return match; -} - -/* function replaceEntities(str) { - if (str.indexOf('&') < 0) { return str; } - - return str.replace(ENTITY_RE, replaceEntityPattern); -} */ - -function unescapeMd(str) { - if (str.indexOf('\\') < 0) { - return str; + VersionedTextDocumentIdentifier.is = is; +})(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {})); +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +var OptionalVersionedTextDocumentIdentifier; +(function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { + uri: uri, + version: version + }; } - return str.replace(UNESCAPE_MD_RE, '$1'); -} -function unescapeAll(str) { - if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { - return str; + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); } - return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) { - if (escaped) { - return escaped; - } - return replaceEntityPattern(match, entity); - }); -} -const HTML_ESCAPE_TEST_RE = /[&<>"]/; -const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g; -const HTML_REPLACEMENTS = { - '&': '&', - '<': '<', - '>': '>', - '"': '"' -}; -function replaceUnsafeChar(ch) { - return HTML_REPLACEMENTS[ch]; -} -function escapeHtml(str) { - if (HTML_ESCAPE_TEST_RE.test(str)) { - return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); + OptionalVersionedTextDocumentIdentifier.is = is; +})(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {})); +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +var TextDocumentItem; +(function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { + uri: uri, + languageId: languageId, + version: version, + text: text + }; } - return str; -} -const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; -function escapeRE(str) { - return str.replace(REGEXP_ESCAPE_RE, '\\$&'); -} -function isSpace(code) { - switch (code) { - case 0x09: - case 0x20: - return true; + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); } - return false; -} - -// Zs (unicode class) || [\t\f\v\r\n] -function isWhiteSpace(code) { - if (code >= 0x2000 && code <= 0x200A) { - return true; + TextDocumentItem.is = is; +})(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {})); +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +var MarkupKind; +(function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value) { + var candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; } - switch (code) { - case 0x09: // \t - case 0x0A: // \n - case 0x0B: // \v - case 0x0C: // \f - case 0x0D: // \r - case 0x20: - case 0xA0: - case 0x1680: - case 0x202F: - case 0x205F: - case 0x3000: - return true; + MarkupKind.is = is; +})(MarkupKind || (exports.MarkupKind = MarkupKind = {})); +var MarkupContent; +(function (MarkupContent) { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); } - return false; -} - -/* eslint-disable max-len */ - -// Currently without astral characters support. -function isPunctChar(ch) { - return ucmicro__namespace.P.test(ch) || ucmicro__namespace.S.test(ch); -} - -// Markdown ASCII punctuation characters. -// -// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ -// http://spec.commonmark.org/0.15/#ascii-punctuation-character -// -// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. -// -function isMdAsciiPunct(ch) { - switch (ch) { - case 0x21 /* ! */: - case 0x22 /* " */: - case 0x23 /* # */: - case 0x24 /* $ */: - case 0x25 /* % */: - case 0x26 /* & */: - case 0x27 /* ' */: - case 0x28 /* ( */: - case 0x29 /* ) */: - case 0x2A /* * */: - case 0x2B /* + */: - case 0x2C /* , */: - case 0x2D /* - */: - case 0x2E /* . */: - case 0x2F /* / */: - case 0x3A /* : */: - case 0x3B /* ; */: - case 0x3C /* < */: - case 0x3D /* = */: - case 0x3E /* > */: - case 0x3F /* ? */: - case 0x40 /* @ */: - case 0x5B /* [ */: - case 0x5C /* \ */: - case 0x5D /* ] */: - case 0x5E /* ^ */: - case 0x5F /* _ */: - case 0x60 /* ` */: - case 0x7B /* { */: - case 0x7C /* | */: - case 0x7D /* } */: - case 0x7E /* ~ */: - return true; - default: - return false; + MarkupContent.is = is; +})(MarkupContent || (exports.MarkupContent = MarkupContent = {})); +/** + * The kind of a completion entry. + */ +var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; +})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {})); +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +var InsertTextFormat; +(function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; +})(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {})); +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +var CompletionItemTag; +(function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; +})(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {})); +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +var InsertReplaceEdit; +(function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { + newText: newText, + insert: insert, + replace: replace + }; } -} - -// Hepler to unify [reference labels]. -// -function normalizeReference(str) { - // Trim and collapse whitespace - // - str = str.trim().replace(/\s+/g, ' '); - - // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug - // fixed in v12 (couldn't find any details). - // - // So treat this one as a special case - // (remove this when node v10 is no longer supported). - // - if ('ẞ'.toLowerCase() === 'Ṿ') { - str = str.replace(/ẞ/g, 'ß'); + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); } - - // .toLowerCase().toUpperCase() should get rid of all differences - // between letter variants. - // - // Simple .toLowerCase() doesn't normalize 125 code points correctly, - // and .toUpperCase doesn't normalize 6 of them (list of exceptions: - // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently - // uppercased versions). - // - // Here's an example showing how it happens. Lets take greek letter omega: - // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ) - // - // Unicode entries: - // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8; - // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 - // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 - // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8; - // - // Case-insensitive comparison should treat all of them as equivalent. - // - // But .toLowerCase() doesn't change ϑ (it's already lowercase), - // and .toUpperCase() doesn't change ϴ (already uppercase). - // - // Applying first lower then upper case normalizes any character: - // '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398' - // - // Note: this is equivalent to unicode case folding; unicode normalization - // is a different step that is not required here. - // - // Final result should be uppercased, because it's later stored in an object - // (this avoid a conflict with Object.prototype members, - // most notably, `__proto__`) - // - return str.toLowerCase().toUpperCase(); -} - -// Re-export libraries commonly used in both markdown-it and its plugins, -// so plugins won't have to depend on them explicitly, which reduces their -// bundled size (e.g. a browser build). -// -const lib = { - mdurl: mdurl__namespace, - ucmicro: ucmicro__namespace -}; -var utils = /*#__PURE__*/Object.freeze({ - __proto__: null, - arrayReplaceAt: arrayReplaceAt, - assign: assign, - escapeHtml: escapeHtml, - escapeRE: escapeRE, - fromCodePoint: fromCodePoint, - has: has, - isMdAsciiPunct: isMdAsciiPunct, - isPunctChar: isPunctChar, - isSpace: isSpace, - isString: isString, - isValidEntityCode: isValidEntityCode, - isWhiteSpace: isWhiteSpace, - lib: lib, - normalizeReference: normalizeReference, - unescapeAll: unescapeAll, - unescapeMd: unescapeMd -}); - -// Parse link label -// -// this function assumes that first character ("[") already matches; -// returns the end of the label -// - -function parseLinkLabel(state, start, disableNested) { - let level, found, marker, prevPos; - const max = state.posMax; - const oldPos = state.pos; - state.pos = start + 1; - level = 1; - while (state.pos < max) { - marker = state.src.charCodeAt(state.pos); - if (marker === 0x5D /* ] */) { - level--; - if (level === 0) { - found = true; - break; - } - } - prevPos = state.pos; - state.md.inline.skipToken(state); - if (marker === 0x5B /* [ */) { - if (prevPos === state.pos - 1) { - // increase level if we find text `[`, which is not a part of any token - level++; - } else if (disableNested) { - state.pos = oldPos; - return -1; - } - } + InsertReplaceEdit.is = is; +})(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {})); +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +var InsertTextMode; +(function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; +})(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {})); +var CompletionItemLabelDetails; +(function (CompletionItemLabelDetails) { + function is(value) { + var candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && (Is.string(candidate.description) || candidate.description === undefined); } - let labelEnd = -1; - if (found) { - labelEnd = state.pos; + CompletionItemLabelDetails.is = is; +})(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {})); +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +var CompletionItem; +(function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { + label: label + }; + } + CompletionItem.create = create; +})(CompletionItem || (exports.CompletionItem = CompletionItem = {})); +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +var CompletionList; +(function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { + items: items ? items : [], + isIncomplete: !!isIncomplete + }; } - - // restore old state - state.pos = oldPos; - return labelEnd; -} - -// Parse link destination -// - -function parseLinkDestination(str, start, max) { - let code; - let pos = start; - const result = { - ok: false, - pos: 0, - str: '' - }; - if (str.charCodeAt(pos) === 0x3C /* < */) { - pos++; - while (pos < max) { - code = str.charCodeAt(pos); - if (code === 0x0A /* \n */) { - return result; - } - if (code === 0x3C /* < */) { - return result; - } - if (code === 0x3E /* > */) { - result.pos = pos + 1; - result.str = unescapeAll(str.slice(start + 1, pos)); - result.ok = true; - return result; - } - if (code === 0x5C /* \ */ && pos + 1 < max) { - pos += 2; - continue; - } - pos++; - } - - // no closing '>' - return result; + CompletionList.create = create; +})(CompletionList || (exports.CompletionList = CompletionList = {})); +var MarkedString; +(function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash } - - // this should be ... } else { ... branch - - let level = 0; - while (pos < max) { - code = str.charCodeAt(pos); - if (code === 0x20) { - break; - } - - // ascii control characters - if (code < 0x20 || code === 0x7F) { - break; - } - if (code === 0x5C /* \ */ && pos + 1 < max) { - if (str.charCodeAt(pos + 1) === 0x20) { - break; - } - pos += 2; - continue; - } - if (code === 0x28 /* ( */) { - level++; - if (level > 32) { - return result; - } - } - if (code === 0x29 /* ) */) { - if (level === 0) { - break; - } - level--; - } - pos++; + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value) { + var candidate = value; + return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value); } - if (start === pos) { - return result; + MarkedString.is = is; +})(MarkedString || (exports.MarkedString = MarkedString = {})); +var Hover; +(function (Hover) { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); } - if (level !== 0) { - return result; + Hover.is = is; +})(Hover || (exports.Hover = Hover = {})); +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +var ParameterInformation; +(function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { + label: label, + documentation: documentation + } : { + label: label + }; } - result.str = unescapeAll(str.slice(start, pos)); - result.pos = pos; - result.ok = true; - return result; -} - -// Parse link title -// - -// Parse link title within `str` in [start, max] range, -// or continue previous parsing if `prev_state` is defined (equal to result of last execution). -// -function parseLinkTitle(str, start, max, prev_state) { - let code; - let pos = start; - const state = { - // if `true`, this is a valid link title - ok: false, - // if `true`, this link can be continued on the next line - can_continue: false, - // if `ok`, it's the position of the first character after the closing marker - pos: 0, - // if `ok`, it's the unescaped title - str: '', - // expected closing marker character code - marker: 0 - }; - if (prev_state) { - // this is a continuation of a previous parseLinkTitle call on the next line, - // used in reference links only - state.str = prev_state.str; - state.marker = prev_state.marker; - } else { - if (pos >= max) { - return state; + ParameterInformation.create = create; +})(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {})); +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +var SignatureInformation; +(function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; } - let marker = str.charCodeAt(pos); - if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { - return state; + var result = { + label: label + }; + if (Is.defined(documentation)) { + result.documentation = documentation; } - start++; - pos++; - - // if opening marker is "(", switch it to closing marker ")" - if (marker === 0x28) { - marker = 0x29; + if (Is.defined(parameters)) { + result.parameters = parameters; + } else { + result.parameters = []; } - state.marker = marker; + return result; } - while (pos < max) { - code = str.charCodeAt(pos); - if (code === state.marker) { - state.pos = pos + 1; - state.str += unescapeAll(str.slice(start, pos)); - state.ok = true; - return state; - } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */) { - return state; - } else if (code === 0x5C /* \ */ && pos + 1 < max) { - pos++; + SignatureInformation.create = create; +})(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {})); +/** + * A document highlight kind. + */ +var DocumentHighlightKind; +(function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; +})(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {})); +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +var DocumentHighlight; +(function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range, kind) { + var result = { + range: range + }; + if (Is.number(kind)) { + result.kind = kind; } - pos++; + return result; } - - // no closing marker found, but this link title may continue on the next line (for references) - state.can_continue = true; - state.str += unescapeAll(str.slice(start, pos)); - return state; -} - -// Just a shortcut for bulk export - -var helpers = /*#__PURE__*/Object.freeze({ - __proto__: null, - parseLinkDestination: parseLinkDestination, - parseLinkLabel: parseLinkLabel, - parseLinkTitle: parseLinkTitle -}); - + DocumentHighlight.create = create; +})(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {})); /** - * class Renderer + * A symbol kind. + */ +var SymbolKind; +(function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; +})(SymbolKind || (exports.SymbolKind = SymbolKind = {})); +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. * - * Generates HTML from parsed token stream. Each instance has independent - * copy of rules. Those can be rewritten with ease. Also, you can add new - * rules if you create plugin and adds new token types. - **/ - -const default_rules = {}; -default_rules.code_inline = function (tokens, idx, options, env, slf) { - const token = tokens[idx]; - return '' + escapeHtml(token.content) + '
'; -}; -default_rules.code_block = function (tokens, idx, options, env, slf) { - const token = tokens[idx]; - return '' + escapeHtml(tokens[idx].content) + '\n'; -}; -default_rules.fence = function (tokens, idx, options, env, slf) { - const token = tokens[idx]; - const info = token.info ? unescapeAll(token.info).trim() : ''; - let langName = ''; - let langAttrs = ''; - if (info) { - const arr = info.split(/(\s+)/g); - langName = arr[0]; - langAttrs = arr.slice(2).join(''); - } - let highlighted; - if (options.highlight) { - highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content); - } else { - highlighted = escapeHtml(token.content); + * @since 3.16 + */ +var SymbolTag; +(function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; +})(SymbolTag || (exports.SymbolTag = SymbolTag = {})); +var SymbolInformation; +(function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { + uri: uri, + range: range + } + }; + if (containerName) { + result.containerName = containerName; + } + return result; } - if (highlighted.indexOf('${highlighted}\n`; + if (children !== undefined) { + result.children = children; + } + return result; } - return `
${highlighted}
\n`; -}; -default_rules.image = function (tokens, idx, options, env, slf) { - const token = tokens[idx]; - - // "alt" attr MUST be set, even if empty. Because it's mandatory and - // should be placed on proper position for tests. - // - // Replace content with actual value - - token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env); - return slf.renderToken(tokens, idx, options); -}; -default_rules.hardbreak = function (tokens, idx, options /*, env */) { - return options.xhtmlOut ? '
\n' : '
\n'; -}; -default_rules.softbreak = function (tokens, idx, options /*, env */) { - return options.breaks ? options.xhtmlOut ? '
\n' : '
\n' : '\n'; -}; -default_rules.text = function (tokens, idx /*, options, env */) { - return escapeHtml(tokens[idx].content); -}; -default_rules.html_block = function (tokens, idx /*, options, env */) { - return tokens[idx].content; -}; -default_rules.html_inline = function (tokens, idx /*, options, env */) { - return tokens[idx].content; -}; - + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === undefined || Is.string(candidate.detail)) && (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && (candidate.children === undefined || Array.isArray(candidate.children)) && (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; +})(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {})); /** - * new Renderer() - * - * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults. - **/ -function Renderer() { + * A set of predefined code action kinds + */ +var CodeActionKind; +(function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; /** - * Renderer#rules -> Object - * - * Contains render rules for tokens. Can be updated and extended. + * Base kind for refactoring inline actions: 'refactor.inline' * - * ##### Example + * Example inline actions: * - * ```javascript - * var md = require('markdown-it')(); + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' * - * md.renderer.rules.strong_open = function () { return ''; }; - * md.renderer.rules.strong_close = function () { return ''; }; + * Example rewrite actions: * - * var result = md.renderInline(...); - * ``` + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` * - * Each rule is called as independent static function with fixed signature: + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. * - * ```javascript - * function my_token_render(tokens, idx, options, env, renderer) { - * // ... - * return renderedHTML; - * } - * ``` + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. * - * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs) - * for more details and examples. - **/ - this.rules = assign({}, default_rules); -} - + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; +})(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {})); /** - * Renderer.renderAttrs(token) -> String + * The reason why code actions were requested. * - * Render token attributes to string. - **/ -Renderer.prototype.renderAttrs = function renderAttrs(token) { - let i, l, result; - if (!token.attrs) { - return ''; + * @since 3.17.0 + */ +var CodeActionTriggerKind; +(function (CodeActionTriggerKind) { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + CodeActionTriggerKind.Invoked = 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + CodeActionTriggerKind.Automatic = 2; +})(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {})); +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +var CodeActionContext; +(function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only, triggerKind) { + var result = { + diagnostics: diagnostics + }; + if (only !== undefined && only !== null) { + result.only = only; + } + if (triggerKind !== undefined && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; } - result = ''; - for (i = 0, l = token.attrs.length; i < l; i++) { - result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"'; + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); } - return result; -}; - + CodeActionContext.is = is; +})(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {})); +var CodeAction; +(function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { + title: title + }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === undefined || Is.string(candidate.kind)) && (candidate.edit !== undefined || candidate.command !== undefined) && (candidate.command === undefined || Command.is(candidate.command)) && (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; +})(CodeAction || (exports.CodeAction = CodeAction = {})); /** - * Renderer.renderToken(tokens, idx, options) -> String - * - tokens (Array): list of tokens - * - idx (Numbed): token index to render - * - options (Object): params of parser instance - * - * Default token renderer. Can be overriden by custom function - * in [[Renderer#rules]]. - **/ -Renderer.prototype.renderToken = function renderToken(tokens, idx, options) { - const token = tokens[idx]; - let result = ''; - - // Tight list paragraphs - if (token.hidden) { - return ''; + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +var CodeLens; +(function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { + range: range + }; + if (Is.defined(data)) { + result.data = data; + } + return result; } - - // Insert a newline between hidden paragraph and subsequent opening - // block-level tag. - // - // For example, here we should insert a newline before blockquote: - // - a - // > - // - if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) { - result += '\n'; + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); } - - // Add token name, e.g. ``. - // - needLf = false; - } - } - } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); } - result += needLf ? '>\n' : '>'; - return result; -}; - + FormattingOptions.is = is; +})(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {})); /** - * Renderer.renderInline(tokens, options, env) -> String - * - tokens (Array): list on block tokens to render - * - options (Object): params of parser instance - * - env (Object): additional data from parsed input (references, for example) - * - * The same as [[Renderer.render]], but for single token of `inline` type. - **/ -Renderer.prototype.renderInline = function (tokens, options, env) { - let result = ''; - const rules = this.rules; - for (let i = 0, len = tokens.length; i < len; i++) { - const type = tokens[i].type; - if (typeof rules[type] !== 'undefined') { - result += rules[type](tokens, i, options, env, this); - } else { - result += this.renderToken(tokens, i, options); - } + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +var DocumentLink; +(function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { + range: range, + target: target, + data: data + }; } - return result; -}; - -/** internal - * Renderer.renderInlineAsText(tokens, options, env) -> String - * - tokens (Array): list on block tokens to render - * - options (Object): params of parser instance - * - env (Object): additional data from parsed input (references, for example) - * - * Special kludge for image `alt` attributes to conform CommonMark spec. - * Don't try to use it! Spec requires to show `alt` content with stripped markup, - * instead of simple escaping. - **/ -Renderer.prototype.renderInlineAsText = function (tokens, options, env) { - let result = ''; - for (let i = 0, len = tokens.length; i < len; i++) { - switch (tokens[i].type) { - case 'text': - result += tokens[i].content; - break; - case 'image': - result += this.renderInlineAsText(tokens[i].children, options, env); - break; - case 'html_inline': - case 'html_block': - result += tokens[i].content; - break; - case 'softbreak': - case 'hardbreak': - result += '\n'; - break; - // all other tokens are skipped - } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); } - - return result; -}; - + DocumentLink.is = is; +})(DocumentLink || (exports.DocumentLink = DocumentLink = {})); /** - * Renderer.render(tokens, options, env) -> String - * - tokens (Array): list on block tokens to render - * - options (Object): params of parser instance - * - env (Object): additional data from parsed input (references, for example) - * - * Takes token stream and generates HTML. Probably, you will never need to call - * this method directly. - **/ -Renderer.prototype.render = function (tokens, options, env) { - let result = ''; - const rules = this.rules; - for (let i = 0, len = tokens.length; i < len; i++) { - const type = tokens[i].type; - if (type === 'inline') { - result += this.renderInline(tokens[i].children, options, env); - } else if (typeof rules[type] !== 'undefined') { - result += rules[type](tokens, i, options, env, this); - } else { - result += this.renderToken(tokens, i, options, env); - } + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +var SelectionRange; +(function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { + range: range, + parent: parent + }; } - return result; -}; - + SelectionRange.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; +})(SelectionRange || (exports.SelectionRange = SelectionRange = {})); /** - * class Ruler - * - * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and - * [[MarkdownIt#inline]] to manage sequences of functions (rules): + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. * - * - keep rules in defined order - * - assign the name to each rule - * - enable/disable rules - * - add/replace rules - * - allow assign rules to additional named chains (in the same) - * - cacheing lists of active rules + * @since 3.16.0 + */ +var SemanticTokenTypes; +(function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; + /** + * @since 3.17.0 + */ + SemanticTokenTypes["decorator"] = "decorator"; +})(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {})); +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. * - * You will not need use this class directly until write plugins. For simple - * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and - * [[MarkdownIt.use]]. - **/ - + * @since 3.16.0 + */ +var SemanticTokenModifiers; +(function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; +})(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {})); /** - * new Ruler() - **/ -function Ruler() { - // List of added rules. Each element is: - // - // { - // name: XXX, - // enabled: Boolean, - // fn: Function(), - // alt: [ name2, name3 ] - // } - // - this.__rules__ = []; - - // Cached rule chains. - // - // First level - chain name, '' for default. - // Second level - diginal anchor for fast filtering by charcodes. - // - this.__cache__ = null; -} - -// Helper methods, should not be used directly - -// Find rule index by name -// -Ruler.prototype.__find__ = function (name) { - for (let i = 0; i < this.__rules__.length; i++) { - if (this.__rules__[i].name === name) { - return i; - } + * @since 3.16.0 + */ +var SemanticTokens; +(function (SemanticTokens) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); } - return -1; -}; - -// Build rules lookup cache -// -Ruler.prototype.__compile__ = function () { - const self = this; - const chains = ['']; - - // collect unique names - self.__rules__.forEach(function (rule) { - if (!rule.enabled) { - return; - } - rule.alt.forEach(function (altName) { - if (chains.indexOf(altName) < 0) { - chains.push(altName); - } - }); - }); - self.__cache__ = {}; - chains.forEach(function (chain) { - self.__cache__[chain] = []; - self.__rules__.forEach(function (rule) { - if (!rule.enabled) { - return; - } - if (chain && rule.alt.indexOf(chain) < 0) { - return; - } - self.__cache__[chain].push(rule.fn); - }); - }); -}; - + SemanticTokens.is = is; +})(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {})); /** - * Ruler.at(name, fn [, options]) - * - name (String): rule name to replace. - * - fn (Function): new rule function. - * - options (Object): new rule options (not mandatory). - * - * Replace rule by name with new function & options. Throws error if name not - * found. - * - * ##### Options: - * - * - __alt__ - array with names of "alternate" chains. - * - * ##### Example - * - * Replace existing typographer replacement rule with new one: - * - * ```javascript - * var md = require('markdown-it')(); + * The InlineValueText namespace provides functions to deal with InlineValueTexts. * - * md.core.ruler.at('replacements', function replace(state) { - * //... - * }); - * ``` - **/ -Ruler.prototype.at = function (name, fn, options) { - const index = this.__find__(name); - const opt = options || {}; - if (index === -1) { - throw new Error('Parser rule not found: ' + name); + * @since 3.17.0 + */ +var InlineValueText; +(function (InlineValueText) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, text) { + return { + range: range, + text: text + }; } - this.__rules__[index].fn = fn; - this.__rules__[index].alt = opt.alt || []; - this.__cache__ = null; -}; - + InlineValueText.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText.is = is; +})(InlineValueText || (exports.InlineValueText = InlineValueText = {})); /** - * Ruler.before(beforeName, ruleName, fn [, options]) - * - beforeName (String): new rule will be added before this one. - * - ruleName (String): name of added rule. - * - fn (Function): rule function. - * - options (Object): rule options (not mandatory). - * - * Add new rule to chain before one with given name. See also - * [[Ruler.after]], [[Ruler.push]]. - * - * ##### Options: - * - * - __alt__ - array with names of "alternate" chains. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')(); + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. * - * md.block.ruler.before('paragraph', 'my_rule', function replace(state) { - * //... - * }); - * ``` - **/ -Ruler.prototype.before = function (beforeName, ruleName, fn, options) { - const index = this.__find__(beforeName); - const opt = options || {}; - if (index === -1) { - throw new Error('Parser rule not found: ' + beforeName); + * @since 3.17.0 + */ +var InlineValueVariableLookup; +(function (InlineValueVariableLookup) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, variableName, caseSensitiveLookup) { + return { + range: range, + variableName: variableName, + caseSensitiveLookup: caseSensitiveLookup + }; } - this.__rules__.splice(index, 0, { - name: ruleName, - enabled: true, - fn, - alt: opt.alt || [] - }); - this.__cache__ = null; -}; - + InlineValueVariableLookup.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === undefined); + } + InlineValueVariableLookup.is = is; +})(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {})); /** - * Ruler.after(afterName, ruleName, fn [, options]) - * - afterName (String): new rule will be added after this one. - * - ruleName (String): name of added rule. - * - fn (Function): rule function. - * - options (Object): rule options (not mandatory). - * - * Add new rule to chain after one with given name. See also - * [[Ruler.before]], [[Ruler.push]]. - * - * ##### Options: - * - * - __alt__ - array with names of "alternate" chains. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')(); + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. * - * md.inline.ruler.after('text', 'my_rule', function replace(state) { - * //... - * }); - * ``` - **/ -Ruler.prototype.after = function (afterName, ruleName, fn, options) { - const index = this.__find__(afterName); - const opt = options || {}; - if (index === -1) { - throw new Error('Parser rule not found: ' + afterName); + * @since 3.17.0 + */ +var InlineValueEvaluatableExpression; +(function (InlineValueEvaluatableExpression) { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range, expression) { + return { + range: range, + expression: expression + }; } - this.__rules__.splice(index + 1, 0, { - name: ruleName, - enabled: true, - fn, - alt: opt.alt || [] - }); - this.__cache__ = null; -}; - + InlineValueEvaluatableExpression.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === undefined); + } + InlineValueEvaluatableExpression.is = is; +})(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {})); /** - * Ruler.push(ruleName, fn [, options]) - * - ruleName (String): name of added rule. - * - fn (Function): rule function. - * - options (Object): rule options (not mandatory). - * - * Push new rule to the end of chain. See also - * [[Ruler.before]], [[Ruler.after]]. - * - * ##### Options: - * - * - __alt__ - array with names of "alternate" chains. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')(); + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. * - * md.core.ruler.push('my_rule', function replace(state) { - * //... - * }); - * ``` - **/ -Ruler.prototype.push = function (ruleName, fn, options) { - const opt = options || {}; - this.__rules__.push({ - name: ruleName, - enabled: true, - fn, - alt: opt.alt || [] - }); - this.__cache__ = null; -}; - + * @since 3.17.0 + */ +var InlineValueContext; +(function (InlineValueContext) { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId, stoppedLocation) { + return { + frameId: frameId, + stoppedLocation: stoppedLocation + }; + } + InlineValueContext.create = create; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(value.stoppedLocation); + } + InlineValueContext.is = is; +})(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {})); /** - * Ruler.enable(list [, ignoreInvalid]) -> Array - * - list (String|Array): list of rule names to enable. - * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. - * - * Enable rules with given names. If any rule name not found - throw Error. - * Errors can be disabled by second param. - * - * Returns list of found rule names (if no exception happened). + * Inlay hint kinds. * - * See also [[Ruler.disable]], [[Ruler.enableOnly]]. - **/ -Ruler.prototype.enable = function (list, ignoreInvalid) { - if (!Array.isArray(list)) { - list = [list]; + * @since 3.17.0 + */ +var InlayHintKind; +(function (InlayHintKind) { + /** + * An inlay hint that for a type annotation. + */ + InlayHintKind.Type = 1; + /** + * An inlay hint that is for a parameter. + */ + InlayHintKind.Parameter = 2; + function is(value) { + return value === 1 || value === 2; } - const result = []; - - // Search by name and enable - list.forEach(function (name) { - const idx = this.__find__(name); - if (idx < 0) { - if (ignoreInvalid) { - return; + InlayHintKind.is = is; +})(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {})); +var InlayHintLabelPart; +(function (InlayHintLabelPart) { + function create(value) { + return { + value: value + }; + } + InlayHintLabelPart.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === undefined || Location.is(candidate.location)) && (candidate.command === undefined || Command.is(candidate.command)); + } + InlayHintLabelPart.is = is; +})(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {})); +var InlayHint; +(function (InlayHint) { + function create(position, label, kind) { + var result = { + position: position, + label: label + }; + if (kind !== undefined) { + result.kind = kind; + } + return result; + } + InlayHint.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) && candidate.textEdits === undefined || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); + } + InlayHint.is = is; +})(InlayHint || (exports.InlayHint = InlayHint = {})); +var WorkspaceFolder; +(function (WorkspaceFolder) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder.is = is; +})(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {})); +var EOL = exports.EOL = ['\n', '\r\n', '\r']; +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +var TextDocument; +(function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits, function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; } - throw new Error('Rules manager: invalid rule name ' + name); + return diff; + }); + var lastModifiedOffset = text.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document.offsetAt(e.range.start); + var endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; } - this.__rules__[idx].enabled = true; - result.push(name); - }, this); - this.__cache__ = null; - return result; -}; - + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = data.length / 2 | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } +})(TextDocument || (exports.TextDocument = TextDocument = {})); /** - * Ruler.enableOnly(list [, ignoreInvalid]) - * - list (String|Array): list of rule names to enable (whitelist). - * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. - * - * Enable rules with given names, and disable everything else. If any rule name - * not found - throw Error. Errors can be disabled by second param. - * - * See also [[Ruler.disable]], [[Ruler.enable]]. - **/ -Ruler.prototype.enableOnly = function (list, ignoreInvalid) { - if (!Array.isArray(list)) { - list = [list]; + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +var FullTextDocument = /** @class */function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = ch === '\r' || ch === '\n'; + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, + high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument; +}(); +var Is; +(function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; } - this.__rules__.forEach(function (rule) { - rule.enabled = false; - }); - this.enable(list, ignoreInvalid); -}; - -/** - * Ruler.disable(list [, ignoreInvalid]) -> Array - * - list (String|Array): list of rule names to disable. - * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. - * - * Disable rules with given names. If any rule name not found - throw Error. - * Errors can be disabled by second param. - * - * Returns list of found rule names (if no exception happened). - * - * See also [[Ruler.enable]], [[Ruler.enableOnly]]. - **/ -Ruler.prototype.disable = function (list, ignoreInvalid) { - if (!Array.isArray(list)) { - list = [list]; + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; } - const result = []; - - // Search by name and disable - list.forEach(function (name) { - const idx = this.__find__(name); - if (idx < 0) { - if (ignoreInvalid) { - return; - } - throw new Error('Rules manager: invalid rule name ' + name); - } - this.__rules__[idx].enabled = false; - result.push(name); - }, this); - this.__cache__ = null; - return result; -}; - -/** - * Ruler.getRules(chainName) -> Array - * - * Return array of active functions (rules) for given chain name. It analyzes - * rules configuration, compiles caches if not exists and returns result. - * - * Default chain name is `''` (empty string). It can't be skipped. That's - * done intentionally, to keep signature monomorphic for high speed. - **/ -Ruler.prototype.getRules = function (chainName) { - if (this.__cache__ === null) { - this.__compile__(); + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; +})(Is || (Is = {})); - // Chain can be empty, if rules disabled. But we still have to return Array. - return this.__cache__[chainName] || []; -}; - -// Token class - -/** - * class Token - **/ - -/** - * new Token(type, tag, nesting) - * - * Create new token and fill passed properties. - **/ -function Token(type, tag, nesting) { - /** - * Token#type -> String - * - * Type of the token (string, e.g. "paragraph_open") - **/ - this.type = type; - - /** - * Token#tag -> String - * - * html tag name, e.g. "p" - **/ - this.tag = tag; - - /** - * Token#attrs -> Array - * - * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]` - **/ - this.attrs = null; - - /** - * Token#map -> Array - * - * Source map info. Format: `[ line_begin, line_end ]` - **/ - this.map = null; - - /** - * Token#nesting -> Number - * - * Level change (number in {-1, 0, 1} set), where: - * - * - `1` means the tag is opening - * - `0` means the tag is self-closing - * - `-1` means the tag is closing - **/ - this.nesting = nesting; - - /** - * Token#level -> Number - * - * nesting level, the same as `state.level` - **/ - this.level = 0; +/***/ }), - /** - * Token#children -> Array - * - * An array of child nodes (inline and img tokens) - **/ - this.children = null; +/***/ "../../codemirror-graphql/esm/hint.js": +/*!********************************************!*\ + !*** ../../codemirror-graphql/esm/hint.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - /** - * Token#content -> String - * - * In a case of self-closing tag (code, html, fence, etc.), - * it has contents of this tag. - **/ - this.content = ''; +"use strict"; - /** - * Token#markup -> String - * - * '*' or '_' for emphasis, fence string for fence, etc. - **/ - this.markup = ''; - /** - * Token#info -> String - * - * Additional information: - * - * - Info string for "fence" tokens - * - The value "auto" for autolink "link_open" and "link_close" tokens - * - The string value of the item marker for ordered-list "list_item_open" tokens - **/ - this.info = ''; +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +__webpack_require__(/*! codemirror/addon/hint/show-hint.js */ "../../../node_modules/codemirror/addon/hint/show-hint.js"); +var _graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.registerHelper('hint', 'graphql', (editor, options) => { + const { + schema, + externalFragments, + autocompleteOptions + } = options; + if (!schema) { + return; + } + const cur = editor.getCursor(); + const token = editor.getTokenAt(cur); + const tokenStart = token.type !== null && /"|\w/.test(token.string[0]) ? token.start : token.end; + const position = new _graphqlLanguageService.Position(cur.line, tokenStart); + const rawResults = (0, _graphqlLanguageService.getAutocompleteSuggestions)(schema, editor.getValue(), position, token, externalFragments, autocompleteOptions); + const results = { + list: rawResults.map(item => { + var _a; + return { + text: (_a = item === null || item === void 0 ? void 0 : item.rawInsert) !== null && _a !== void 0 ? _a : item.label, + type: item.type, + description: item.documentation, + isDeprecated: item.isDeprecated, + deprecationReason: item.deprecationReason + }; + }), + from: { + line: cur.line, + ch: tokenStart + }, + to: { + line: cur.line, + ch: token.end + } + }; + if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) { + results.from = _codemirror.default.Pos(results.from.line, results.from.ch); + results.to = _codemirror.default.Pos(results.to.line, results.to.ch); + _codemirror.default.signal(editor, 'hasCompletion', editor, results, token); + } + return results; +}); - /** - * Token#meta -> Object - * - * A place for plugins to store an arbitrary data - **/ - this.meta = null; +/***/ }), - /** - * Token#block -> Boolean - * - * True for block-level tokens, false for inline tokens. - * Used in renderer to calculate line breaks - **/ - this.block = false; +/***/ "../../codemirror-graphql/esm/info.js": +/*!********************************************!*\ + !*** ../../codemirror-graphql/esm/info.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - /** - * Token#hidden -> Boolean - * - * If it's true, ignore this element when rendering. Used for tight lists - * to hide paragraphs. - **/ - this.hidden = false; -} +"use strict"; -/** - * Token.attrIndex(name) -> Number - * - * Search attribute index by name. - **/ -Token.prototype.attrIndex = function attrIndex(name) { - if (!this.attrs) { - return -1; - } - const attrs = this.attrs; - for (let i = 0, len = attrs.length; i < len; i++) { - if (attrs[i][0] === name) { - return i; - } - } - return -1; -}; -/** - * Token.attrPush(attrData) - * - * Add `[ name, value ]` attribute to list. Init attrs if necessary - **/ -Token.prototype.attrPush = function attrPush(attrData) { - if (this.attrs) { - this.attrs.push(attrData); - } else { - this.attrs = [attrData]; +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _getTypeInfo = _interopRequireDefault(__webpack_require__(/*! ./utils/getTypeInfo */ "../../codemirror-graphql/esm/utils/getTypeInfo.js")); +var _SchemaReference = __webpack_require__(/*! ./utils/SchemaReference */ "../../codemirror-graphql/esm/utils/SchemaReference.js"); +__webpack_require__(/*! ./utils/info-addon */ "../../codemirror-graphql/esm/utils/info-addon.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.registerHelper('info', 'graphql', (token, options) => { + var _a; + if (!options.schema || !token.state) { + return; } -}; - -/** - * Token.attrSet(name, value) - * - * Set `name` attribute to `value`. Override old value if exists. - **/ -Token.prototype.attrSet = function attrSet(name, value) { - const idx = this.attrIndex(name); - const attrData = [name, value]; - if (idx < 0) { - this.attrPush(attrData); - } else { - this.attrs[idx] = attrData; + const { + kind, + step + } = token.state; + const typeInfo = (0, _getTypeInfo.default)(options.schema, token.state); + if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef || kind === 'ObjectField' && step === 0 && typeInfo.fieldDef) { + const header = document.createElement('div'); + header.className = 'CodeMirror-info-header'; + renderField(header, typeInfo, options); + const into = document.createElement('div'); + into.append(header); + renderDescription(into, options, typeInfo.fieldDef); + return into; } -}; - -/** - * Token.attrGet(name) - * - * Get the value of attribute `name`, or null if it does not exist. - **/ -Token.prototype.attrGet = function attrGet(name) { - const idx = this.attrIndex(name); - let value = null; - if (idx >= 0) { - value = this.attrs[idx][1]; + if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) { + const header = document.createElement('div'); + header.className = 'CodeMirror-info-header'; + renderDirective(header, typeInfo, options); + const into = document.createElement('div'); + into.append(header); + renderDescription(into, options, typeInfo.directiveDef); + return into; } - return value; -}; - -/** - * Token.attrJoin(name, value) - * - * Join value to existing attribute via space. Or create new attribute if not - * exists. Useful to operate with token classes. - **/ -Token.prototype.attrJoin = function attrJoin(name, value) { - const idx = this.attrIndex(name); - if (idx < 0) { - this.attrPush([name, value]); - } else { - this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value; + if (kind === 'Argument' && step === 0 && typeInfo.argDef) { + const header = document.createElement('div'); + header.className = 'CodeMirror-info-header'; + renderArg(header, typeInfo, options); + const into = document.createElement('div'); + into.append(header); + renderDescription(into, options, typeInfo.argDef); + return into; + } + if (kind === 'EnumValue' && ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.description)) { + const header = document.createElement('div'); + header.className = 'CodeMirror-info-header'; + renderEnumValue(header, typeInfo, options); + const into = document.createElement('div'); + into.append(header); + renderDescription(into, options, typeInfo.enumValue); + return into; + } + if (kind === 'NamedType' && typeInfo.type && typeInfo.type.description) { + const header = document.createElement('div'); + header.className = 'CodeMirror-info-header'; + renderType(header, typeInfo, options, typeInfo.type); + const into = document.createElement('div'); + into.append(header); + renderDescription(into, options, typeInfo.type); + return into; } -}; - -// Core state object -// - -function StateCore(src, md, env) { - this.src = src; - this.env = env; - this.tokens = []; - this.inlineMode = false; - this.md = md; // link to parser instance +}); +function renderField(into, typeInfo, options) { + renderQualifiedField(into, typeInfo, options); + renderTypeAnnotation(into, typeInfo, options, typeInfo.type); } - -// re-export Token class to use in core rules -StateCore.prototype.Token = Token; - -// Normalize input string - -// https://spec.commonmark.org/0.29/#line-ending -const NEWLINES_RE = /\r\n?|\n/g; -const NULL_RE = /\0/g; -function normalize(state) { - let str; - - // Normalize newlines - str = state.src.replace(NEWLINES_RE, '\n'); - - // Replace NULL characters - str = str.replace(NULL_RE, '\uFFFD'); - state.src = str; +function renderQualifiedField(into, typeInfo, options) { + var _a; + const fieldName = ((_a = typeInfo.fieldDef) === null || _a === void 0 ? void 0 : _a.name) || ''; + text(into, fieldName, 'field-name', options, (0, _SchemaReference.getFieldReference)(typeInfo)); } -function block(state) { - let token; - if (state.inlineMode) { - token = new state.Token('inline', '', 0); - token.content = state.src; - token.map = [0, 1]; - token.children = []; - state.tokens.push(token); - } else { - state.md.block.parse(state.src, state.md, state.env, state.tokens); - } +function renderDirective(into, typeInfo, options) { + var _a; + const name = '@' + (((_a = typeInfo.directiveDef) === null || _a === void 0 ? void 0 : _a.name) || ''); + text(into, name, 'directive-name', options, (0, _SchemaReference.getDirectiveReference)(typeInfo)); } -function inline(state) { - const tokens = state.tokens; - - // Parse inlines - for (let i = 0, l = tokens.length; i < l; i++) { - const tok = tokens[i]; - if (tok.type === 'inline') { - state.md.inline.parse(tok.content, state.md, state.env, tok.children); - } - } +function renderArg(into, typeInfo, options) { + var _a; + const name = ((_a = typeInfo.argDef) === null || _a === void 0 ? void 0 : _a.name) || ''; + text(into, name, 'arg-name', options, (0, _SchemaReference.getArgumentReference)(typeInfo)); + renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType); } - -// Replace link-like texts with link nodes. -// -// Currently restricted by `md.validateLink()` to http/https/ftp -// - -function isLinkOpen$1(str) { - return /^\s]/i.test(str); +function renderEnumValue(into, typeInfo, options) { + var _a; + const name = ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.name) || ''; + renderType(into, typeInfo, options, typeInfo.inputType); + text(into, '.'); + text(into, name, 'enum-value', options, (0, _SchemaReference.getEnumValueReference)(typeInfo)); } -function isLinkClose$1(str) { - return /^<\/a\s*>/i.test(str); +function renderTypeAnnotation(into, typeInfo, options, t) { + const typeSpan = document.createElement('span'); + typeSpan.className = 'type-name-pill'; + if (t instanceof _graphql.GraphQLNonNull) { + renderType(typeSpan, typeInfo, options, t.ofType); + text(typeSpan, '!'); + } else if (t instanceof _graphql.GraphQLList) { + text(typeSpan, '['); + renderType(typeSpan, typeInfo, options, t.ofType); + text(typeSpan, ']'); + } else { + text(typeSpan, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, _SchemaReference.getTypeReference)(typeInfo, t)); + } + into.append(typeSpan); } -function linkify$1(state) { - const blockTokens = state.tokens; - if (!state.md.options.linkify) { - return; +function renderType(into, typeInfo, options, t) { + if (t instanceof _graphql.GraphQLNonNull) { + renderType(into, typeInfo, options, t.ofType); + text(into, '!'); + } else if (t instanceof _graphql.GraphQLList) { + text(into, '['); + renderType(into, typeInfo, options, t.ofType); + text(into, ']'); + } else { + text(into, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, _SchemaReference.getTypeReference)(typeInfo, t)); } - for (let j = 0, l = blockTokens.length; j < l; j++) { - if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) { - continue; - } - let tokens = blockTokens[j].children; - let htmlLinkLevel = 0; - - // We scan from the end, to keep position when new tags added. - // Use reversed logic in links start/end match - for (let i = tokens.length - 1; i >= 0; i--) { - const currentToken = tokens[i]; - - // Skip content of markdown links - if (currentToken.type === 'link_close') { - i--; - while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') { - i--; - } - continue; - } - - // Skip content of html tag links - if (currentToken.type === 'html_inline') { - if (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) { - htmlLinkLevel--; - } - if (isLinkClose$1(currentToken.content)) { - htmlLinkLevel++; - } - } - if (htmlLinkLevel > 0) { - continue; - } - if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) { - const text = currentToken.content; - let links = state.md.linkify.match(text); - - // Now split string to nodes - const nodes = []; - let level = currentToken.level; - let lastPos = 0; - - // forbid escape sequence at the start of the string, - // this avoids http\://example.com/ from being linkified as - // http:
//example.com/ - if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === 'text_special') { - links = links.slice(1); - } - for (let ln = 0; ln < links.length; ln++) { - const url = links[ln].url; - const fullUrl = state.md.normalizeLink(url); - if (!state.md.validateLink(fullUrl)) { - continue; - } - let urlText = links[ln].text; - - // Linkifier might send raw hostnames like "example.com", where url - // starts with domain name. So we prepend http:// in those cases, - // and remove it afterwards. - // - if (!links[ln].schema) { - urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, ''); - } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) { - urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, ''); - } else { - urlText = state.md.normalizeLinkText(urlText); - } - const pos = links[ln].index; - if (pos > lastPos) { - const token = new state.Token('text', '', 0); - token.content = text.slice(lastPos, pos); - token.level = level; - nodes.push(token); - } - const token_o = new state.Token('link_open', 'a', 1); - token_o.attrs = [['href', fullUrl]]; - token_o.level = level++; - token_o.markup = 'linkify'; - token_o.info = 'auto'; - nodes.push(token_o); - const token_t = new state.Token('text', '', 0); - token_t.content = urlText; - token_t.level = level; - nodes.push(token_t); - const token_c = new state.Token('link_close', 'a', -1); - token_c.level = --level; - token_c.markup = 'linkify'; - token_c.info = 'auto'; - nodes.push(token_c); - lastPos = links[ln].lastIndex; - } - if (lastPos < text.length) { - const token = new state.Token('text', '', 0); - token.content = text.slice(lastPos); - token.level = level; - nodes.push(token); - } - - // replace current node - blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes); - } +} +function renderDescription(into, options, def) { + const { + description + } = def; + if (description) { + const descriptionDiv = document.createElement('div'); + descriptionDiv.className = 'info-description'; + if (options.renderDescription) { + descriptionDiv.innerHTML = options.renderDescription(description); + } else { + descriptionDiv.append(document.createTextNode(description)); } + into.append(descriptionDiv); } + renderDeprecation(into, options, def); } - -// Simple typographic replacements -// -// (c) (C) → © -// (tm) (TM) → ™ -// (r) (R) → ® -// +- → ± -// ... → … (also ?.... → ?.., !.... → !..) -// ???????? → ???, !!!!! → !!!, `,,` → `,` -// -- → –, --- → — -// - -// TODO: -// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ -// - multiplications 2 x 4 -> 2 × 4 - -const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; - -// Workaround for phantomjs - need regex without /g flag, -// or root check will fail every second time -const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i; -const SCOPED_ABBR_RE = /\((c|tm|r)\)/ig; -const SCOPED_ABBR = { - c: '©', - r: '®', - tm: '™' -}; -function replaceFn(match, name) { - return SCOPED_ABBR[name.toLowerCase()]; -} -function replace_scoped(inlineTokens) { - let inside_autolink = 0; - for (let i = inlineTokens.length - 1; i >= 0; i--) { - const token = inlineTokens[i]; - if (token.type === 'text' && !inside_autolink) { - token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn); - } - if (token.type === 'link_open' && token.info === 'auto') { - inside_autolink--; - } - if (token.type === 'link_close' && token.info === 'auto') { - inside_autolink++; +function renderDeprecation(into, options, def) { + const reason = def.deprecationReason; + if (reason) { + const deprecationDiv = document.createElement('div'); + deprecationDiv.className = 'info-deprecation'; + into.append(deprecationDiv); + const label = document.createElement('span'); + label.className = 'info-deprecation-label'; + label.append(document.createTextNode('Deprecated')); + deprecationDiv.append(label); + const reasonDiv = document.createElement('div'); + reasonDiv.className = 'info-deprecation-reason'; + if (options.renderDescription) { + reasonDiv.innerHTML = options.renderDescription(reason); + } else { + reasonDiv.append(document.createTextNode(reason)); } + deprecationDiv.append(reasonDiv); } } -function replace_rare(inlineTokens) { - let inside_autolink = 0; - for (let i = inlineTokens.length - 1; i >= 0; i--) { - const token = inlineTokens[i]; - if (token.type === 'text' && !inside_autolink) { - if (RARE_RE.test(token.content)) { - token.content = token.content.replace(/\+-/g, '±') - // .., ..., ....... -> … - // but ?..... & !..... -> ?.. & !.. - .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') - // em-dash - .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\u2014') - // en-dash - .replace(/(^|\s)--(?=\s|$)/mg, '$1\u2013').replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, '$1\u2013'); - } - } - if (token.type === 'link_open' && token.info === 'auto') { - inside_autolink--; - } - if (token.type === 'link_close' && token.info === 'auto') { - inside_autolink++; +function text(into, content, className = '', options = { + onClick: null +}, ref = null) { + if (className) { + const { + onClick + } = options; + let node; + if (onClick) { + node = document.createElement('a'); + node.href = 'javascript:void 0'; + node.addEventListener('click', e => { + e.preventDefault(); + onClick(ref, e); + }); + } else { + node = document.createElement('span'); } + node.className = className; + node.append(document.createTextNode(content)); + into.append(node); + } else { + into.append(document.createTextNode(content)); } } -function replace(state) { - let blkIdx; - if (!state.md.options.typographer) { + +/***/ }), + +/***/ "../../codemirror-graphql/esm/jump.js": +/*!********************************************!*\ + !*** ../../codemirror-graphql/esm/jump.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _getTypeInfo = _interopRequireDefault(__webpack_require__(/*! ./utils/getTypeInfo */ "../../codemirror-graphql/esm/utils/getTypeInfo.js")); +var _SchemaReference = __webpack_require__(/*! ./utils/SchemaReference */ "../../codemirror-graphql/esm/utils/SchemaReference.js"); +__webpack_require__(/*! ./utils/jump-addon */ "../../codemirror-graphql/esm/utils/jump-addon.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.registerHelper('jump', 'graphql', (token, options) => { + if (!options.schema || !options.onClick || !token.state) { return; } - for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { - if (state.tokens[blkIdx].type !== 'inline') { - continue; - } - if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) { - replace_scoped(state.tokens[blkIdx].children); - } - if (RARE_RE.test(state.tokens[blkIdx].content)) { - replace_rare(state.tokens[blkIdx].children); - } + const { + state + } = token; + const { + kind, + step + } = state; + const typeInfo = (0, _getTypeInfo.default)(options.schema, state); + if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef) { + return (0, _SchemaReference.getFieldReference)(typeInfo); } -} + if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) { + return (0, _SchemaReference.getDirectiveReference)(typeInfo); + } + if (kind === 'Argument' && step === 0 && typeInfo.argDef) { + return (0, _SchemaReference.getArgumentReference)(typeInfo); + } + if (kind === 'EnumValue' && typeInfo.enumValue) { + return (0, _SchemaReference.getEnumValueReference)(typeInfo); + } + if (kind === 'NamedType' && typeInfo.type) { + return (0, _SchemaReference.getTypeReference)(typeInfo); + } +}); -// Convert straight quotation marks to typographic ones -// +/***/ }), -const QUOTE_TEST_RE = /['"]/; -const QUOTE_RE = /['"]/g; -const APOSTROPHE = '\u2019'; /* ’ */ +/***/ "../../codemirror-graphql/esm/lint.js": +/*!********************************************!*\ + !*** ../../codemirror-graphql/esm/lint.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -function replaceAt(str, index, ch) { - return str.slice(0, index) + ch + str.slice(index + 1); -} -function process_inlines(tokens, state) { - let j; - const stack = []; - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - const thisLevel = tokens[i].level; - for (j = stack.length - 1; j >= 0; j--) { - if (stack[j].level <= thisLevel) { - break; - } - } - stack.length = j + 1; - if (token.type !== 'text') { - continue; - } - let text = token.content; - let pos = 0; - let max = text.length; +"use strict"; - /* eslint no-labels:0,block-scoped-var:0 */ - OUTER: while (pos < max) { - QUOTE_RE.lastIndex = pos; - const t = QUOTE_RE.exec(text); - if (!t) { - break; - } - let canOpen = true; - let canClose = true; - pos = t.index + 1; - const isSingle = t[0] === "'"; - // Find previous character, - // default to space if it's the beginning of the line - // - let lastChar = 0x20; - if (t.index - 1 >= 0) { - lastChar = text.charCodeAt(t.index - 1); - } else { - for (j = i - 1; j >= 0; j--) { - if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20 - if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline' +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const SEVERITY = ['error', 'warning', 'information', 'hint']; +const TYPE = { + 'GraphQL: Validation': 'validation', + 'GraphQL: Deprecation': 'deprecation', + 'GraphQL: Syntax': 'syntax' +}; +_codemirror.default.registerHelper('lint', 'graphql', (text, options) => { + const { + schema, + validationRules, + externalFragments + } = options; + const rawResults = (0, _graphqlLanguageService.getDiagnostics)(text, schema, validationRules, undefined, externalFragments); + const results = rawResults.map(error => ({ + message: error.message, + severity: error.severity ? SEVERITY[error.severity - 1] : SEVERITY[0], + type: error.source ? TYPE[error.source] : undefined, + from: _codemirror.default.Pos(error.range.start.line, error.range.start.character), + to: _codemirror.default.Pos(error.range.end.line, error.range.end.character) + })); + return results; +}); - lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1); - break; - } - } +/***/ }), - // Find next character, - // default to space if it's the end of the line - // - let nextChar = 0x20; - if (pos < max) { - nextChar = text.charCodeAt(pos); - } else { - for (j = i + 1; j < tokens.length; j++) { - if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20 - if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline' +/***/ "../../codemirror-graphql/esm/mode.js": +/*!********************************************!*\ + !*** ../../codemirror-graphql/esm/mode.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - nextChar = tokens[j].content.charCodeAt(0); - break; - } - } - const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); - const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); - const isLastWhiteSpace = isWhiteSpace(lastChar); - const isNextWhiteSpace = isWhiteSpace(nextChar); - if (isNextWhiteSpace) { - canOpen = false; - } else if (isNextPunctChar) { - if (!(isLastWhiteSpace || isLastPunctChar)) { - canOpen = false; - } - } - if (isLastWhiteSpace) { - canClose = false; - } else if (isLastPunctChar) { - if (!(isNextWhiteSpace || isNextPunctChar)) { - canClose = false; - } - } - if (nextChar === 0x22 /* " */ && t[0] === '"') { - if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) { - // special case: 1"" - count first quote as an inch - canClose = canOpen = false; - } - } - if (canOpen && canClose) { - // Replace quotes in the middle of punctuation sequence, but not - // in the middle of the words, i.e.: - // - // 1. foo " bar " baz - not replaced - // 2. foo-"-bar-"-baz - replaced - // 3. foo"bar"baz - not replaced - // - canOpen = isLastPunctChar; - canClose = isNextPunctChar; - } - if (!canOpen && !canClose) { - // middle of word - if (isSingle) { - token.content = replaceAt(token.content, t.index, APOSTROPHE); - } - continue; - } - if (canClose) { - // this could be a closing quote, rewind the stack to get a match - for (j = stack.length - 1; j >= 0; j--) { - let item = stack[j]; - if (stack[j].level < thisLevel) { - break; - } - if (item.single === isSingle && stack[j].level === thisLevel) { - item = stack[j]; - let openQuote; - let closeQuote; - if (isSingle) { - openQuote = state.md.options.quotes[2]; - closeQuote = state.md.options.quotes[3]; - } else { - openQuote = state.md.options.quotes[0]; - closeQuote = state.md.options.quotes[1]; - } +"use strict"; - // replace token.content *before* tokens[item.token].content, - // because, if they are pointing at the same token, replaceAt - // could mess up indices when quote length != 1 - token.content = replaceAt(token.content, t.index, closeQuote); - tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote); - pos += closeQuote.length - 1; - if (item.token === i) { - pos += openQuote.length - 1; - } - text = token.content; - max = text.length; - stack.length = j; - continue OUTER; - } - } - } - if (canOpen) { - stack.push({ - token: i, - pos: t.index, - single: isSingle, - level: thisLevel - }); - } else if (canClose && isSingle) { - token.content = replaceAt(token.content, t.index, APOSTROPHE); - } - } - } -} -function smartquotes(state) { - /* eslint max-depth:0 */ - if (!state.md.options.typographer) { - return; - } - for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { - if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) { - continue; - } - process_inlines(state.tokens[blkIdx].children, state); - } -} -// Join raw text tokens with the rest of the text -// -// This is set as a separate rule to provide an opportunity for plugins -// to run text replacements after text join, but before escape join. -// -// For example, `\:)` shouldn't be replaced with an emoji. -// +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _modeFactory = _interopRequireDefault(__webpack_require__(/*! ./utils/mode-factory */ "../../codemirror-graphql/esm/utils/mode-factory.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.defineMode('graphql', _modeFactory.default); -function text_join(state) { - let curr, last; - const blockTokens = state.tokens; - const l = blockTokens.length; - for (let j = 0; j < l; j++) { - if (blockTokens[j].type !== 'inline') continue; - const tokens = blockTokens[j].children; - const max = tokens.length; - for (curr = 0; curr < max; curr++) { - if (tokens[curr].type === 'text_special') { - tokens[curr].type = 'text'; - } - } - for (curr = last = 0; curr < max; curr++) { - if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') { - // collapse two adjacent text nodes - tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; - } else { - if (curr !== last) { - tokens[last] = tokens[curr]; - } - last++; - } - } - if (curr !== last) { - tokens.length = last; - } - } -} +/***/ }), -/** internal - * class Core - * - * Top-level rules executor. Glues block/inline parsers and does intermediate - * transformations. - **/ +/***/ "../../codemirror-graphql/esm/results/mode.js": +/*!****************************************************!*\ + !*** ../../codemirror-graphql/esm/results/mode.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -const _rules$2 = [['normalize', normalize], ['block', block], ['inline', inline], ['linkify', linkify$1], ['replacements', replace], ['smartquotes', smartquotes], -// `text_join` finds `text_special` tokens (for escape sequences) -// and joins them with the rest of the text -['text_join', text_join]]; +"use strict"; -/** - * new Core() - **/ -function Core() { - /** - * Core#ruler -> Ruler - * - * [[Ruler]] instance. Keep configuration of core rules. - **/ - this.ruler = new Ruler(); - for (let i = 0; i < _rules$2.length; i++) { - this.ruler.push(_rules$2[i][0], _rules$2[i][1]); - } -} -/** - * Core.process(state) - * - * Executes core chain rules. - **/ -Core.prototype.process = function (state) { - const rules = this.ruler.getRules(''); - for (let i = 0, l = rules.length; i < l; i++) { - rules[i](state); - } +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +var _modeIndent = _interopRequireDefault(__webpack_require__(/*! ../utils/mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.defineMode('graphql-results', config => { + const parser = (0, _graphqlLanguageService.onlineParser)({ + eatWhitespace: stream => stream.eatSpace(), + lexRules: LexRules, + parseRules: ParseRules, + editorConfig: { + tabSize: config.tabSize + } + }); + return { + config, + startState: parser.startState, + token: parser.token, + indent: _modeIndent.default, + electricInput: /^\s*[}\]]/, + fold: 'brace', + closeBrackets: { + pairs: '[]{}""', + explode: '[]{}' + } + }; +}); +const LexRules = { + Punctuation: /^\[|]|\{|\}|:|,/, + Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, + String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/, + Keyword: /^true|false|null/ +}; +const ParseRules = { + Document: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('Entry', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)('}')], + Entry: [(0, _graphqlLanguageService.t)('String', 'def'), (0, _graphqlLanguageService.p)(':'), 'Value'], + Value(token) { + switch (token.kind) { + case 'Number': + return 'NumberValue'; + case 'String': + return 'StringValue'; + case 'Punctuation': + switch (token.value) { + case '[': + return 'ListValue'; + case '{': + return 'ObjectValue'; + } + return null; + case 'Keyword': + switch (token.value) { + case 'true': + case 'false': + return 'BooleanValue'; + case 'null': + return 'NullValue'; + } + return null; + } + }, + NumberValue: [(0, _graphqlLanguageService.t)('Number', 'number')], + StringValue: [(0, _graphqlLanguageService.t)('String', 'string')], + BooleanValue: [(0, _graphqlLanguageService.t)('Keyword', 'builtin')], + NullValue: [(0, _graphqlLanguageService.t)('Keyword', 'keyword')], + ListValue: [(0, _graphqlLanguageService.p)('['), (0, _graphqlLanguageService.list)('Value', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)(']')], + ObjectValue: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('ObjectField', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)('}')], + ObjectField: [(0, _graphqlLanguageService.t)('String', 'property'), (0, _graphqlLanguageService.p)(':'), 'Value'] }; -Core.prototype.State = StateCore; -// Parser state class +/***/ }), -function StateBlock(src, md, env, tokens) { - this.src = src; +/***/ "../../codemirror-graphql/esm/utils/SchemaReference.js": +/*!*************************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/SchemaReference.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // link to parser instance - this.md = md; - this.env = env; +"use strict"; - // - // Internal state vartiables - // - this.tokens = tokens; - this.bMarks = []; // line begin offsets for fast jumps - this.eMarks = []; // line end offsets for fast jumps - this.tShift = []; // offsets of the first non-space characters (tabs not expanded) - this.sCount = []; // indents for each line (tabs expanded) +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getArgumentReference = getArgumentReference; +exports.getDirectiveReference = getDirectiveReference; +exports.getEnumValueReference = getEnumValueReference; +exports.getFieldReference = getFieldReference; +exports.getTypeReference = getTypeReference; +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +function getFieldReference(typeInfo) { + return { + kind: 'Field', + schema: typeInfo.schema, + field: typeInfo.fieldDef, + type: isMetaField(typeInfo.fieldDef) ? null : typeInfo.parentType + }; +} +function getDirectiveReference(typeInfo) { + return { + kind: 'Directive', + schema: typeInfo.schema, + directive: typeInfo.directiveDef + }; +} +function getArgumentReference(typeInfo) { + return typeInfo.directiveDef ? { + kind: 'Argument', + schema: typeInfo.schema, + argument: typeInfo.argDef, + directive: typeInfo.directiveDef + } : { + kind: 'Argument', + schema: typeInfo.schema, + argument: typeInfo.argDef, + field: typeInfo.fieldDef, + type: isMetaField(typeInfo.fieldDef) ? null : typeInfo.parentType + }; +} +function getEnumValueReference(typeInfo) { + return { + kind: 'EnumValue', + value: typeInfo.enumValue || undefined, + type: typeInfo.inputType ? (0, _graphql.getNamedType)(typeInfo.inputType) : undefined + }; +} +function getTypeReference(typeInfo, type) { + return { + kind: 'Type', + schema: typeInfo.schema, + type: type || typeInfo.type + }; +} +function isMetaField(fieldDef) { + return fieldDef.name.slice(0, 2) === '__'; +} - // An amount of virtual spaces (tabs expanded) between beginning - // of each line (bMarks) and real beginning of that line. - // - // It exists only as a hack because blockquotes override bMarks - // losing information in the process. - // - // It's used only when expanding tabs, you can think about it as - // an initial tab length, e.g. bsCount=21 applied to string `\t123` - // means first tab should be expanded to 4-21%4 === 3 spaces. - // - this.bsCount = []; +/***/ }), - // block parser variables +/***/ "../../codemirror-graphql/esm/utils/forEachState.js": +/*!**********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/forEachState.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports) { - // required block content indent (for example, if we are - // inside a list, it would be positioned after list marker) - this.blkIndent = 0; - this.line = 0; // line index in src - this.lineMax = 0; // lines count - this.tight = false; // loose/tight mode for lists - this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any) - this.listIndent = -1; // indent of the current list block (-1 if there isn't any) +"use strict"; - // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference' - // used in lists to determine if they interrupt a paragraph - this.parentType = 'root'; - this.level = 0; - // Create caches - // Generate markers. - const s = this.src; - for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) { - const ch = s.charCodeAt(pos); - if (!indent_found) { - if (isSpace(ch)) { - indent++; - if (ch === 0x09) { - offset += 4 - offset % 4; - } else { - offset++; - } - continue; - } else { - indent_found = true; - } - } - if (ch === 0x0A || pos === len - 1) { - if (ch !== 0x0A) { - pos++; - } - this.bMarks.push(start); - this.eMarks.push(pos); - this.tShift.push(indent); - this.sCount.push(offset); - this.bsCount.push(0); - indent_found = false; - indent = 0; - offset = 0; - start = pos + 1; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = forEachState; +function forEachState(stack, fn) { + const reverseStateStack = []; + let state = stack; + while (state === null || state === void 0 ? void 0 : state.kind) { + reverseStateStack.push(state); + state = state.prevState; + } + for (let i = reverseStateStack.length - 1; i >= 0; i--) { + fn(reverseStateStack[i]); } - - // Push fake entry to simplify cache bounds checks - this.bMarks.push(s.length); - this.eMarks.push(s.length); - this.tShift.push(0); - this.sCount.push(0); - this.bsCount.push(0); - this.lineMax = this.bMarks.length - 1; // don't count last fake line } -// Push new token to "stream". -// -StateBlock.prototype.push = function (type, tag, nesting) { - const token = new Token(type, tag, nesting); - token.block = true; - if (nesting < 0) this.level--; // closing tag - token.level = this.level; - if (nesting > 0) this.level++; // opening tag +/***/ }), - this.tokens.push(token); - return token; -}; -StateBlock.prototype.isEmpty = function isEmpty(line) { - return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]; -}; -StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) { - for (let max = this.lineMax; from < max; from++) { - if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) { - break; - } - } - return from; -}; +/***/ "../../codemirror-graphql/esm/utils/getTypeInfo.js": +/*!*********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/getTypeInfo.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -// Skip spaces from given position. -StateBlock.prototype.skipSpaces = function skipSpaces(pos) { - for (let max = this.src.length; pos < max; pos++) { - const ch = this.src.charCodeAt(pos); - if (!isSpace(ch)) { - break; - } - } - return pos; -}; +"use strict"; -// Skip spaces from given position in reverse. -StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) { - if (pos <= min) { - return pos; - } - while (pos > min) { - if (!isSpace(this.src.charCodeAt(--pos))) { - return pos + 1; - } - } - return pos; -}; -// Skip char codes from given position -StateBlock.prototype.skipChars = function skipChars(pos, code) { - for (let max = this.src.length; pos < max; pos++) { - if (this.src.charCodeAt(pos) !== code) { - break; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getTypeInfo; +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _forEachState = _interopRequireDefault(__webpack_require__(/*! ./forEachState */ "../../codemirror-graphql/esm/utils/forEachState.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function getTypeInfo(schema, tokenState) { + const info = { + schema, + type: null, + parentType: null, + inputType: null, + directiveDef: null, + fieldDef: null, + argDef: null, + argDefs: null, + objectFieldDefs: null + }; + (0, _forEachState.default)(tokenState, state => { + var _a, _b; + switch (state.kind) { + case 'Query': + case 'ShortQuery': + info.type = schema.getQueryType(); + break; + case 'Mutation': + info.type = schema.getMutationType(); + break; + case 'Subscription': + info.type = schema.getSubscriptionType(); + break; + case 'InlineFragment': + case 'FragmentDefinition': + if (state.type) { + info.type = schema.getType(state.type); + } + break; + case 'Field': + case 'AliasedField': + info.fieldDef = info.type && state.name ? getFieldDef(schema, info.parentType, state.name) : null; + info.type = (_a = info.fieldDef) === null || _a === void 0 ? void 0 : _a.type; + break; + case 'SelectionSet': + info.parentType = info.type ? (0, _graphql.getNamedType)(info.type) : null; + break; + case 'Directive': + info.directiveDef = state.name ? schema.getDirective(state.name) : null; + break; + case 'Arguments': + const parentDef = state.prevState ? state.prevState.kind === 'Field' ? info.fieldDef : state.prevState.kind === 'Directive' ? info.directiveDef : state.prevState.kind === 'AliasedField' ? state.prevState.name && getFieldDef(schema, info.parentType, state.prevState.name) : null : null; + info.argDefs = parentDef ? parentDef.args : null; + break; + case 'Argument': + info.argDef = null; + if (info.argDefs) { + for (let i = 0; i < info.argDefs.length; i++) { + if (info.argDefs[i].name === state.name) { + info.argDef = info.argDefs[i]; + break; + } + } + } + info.inputType = (_b = info.argDef) === null || _b === void 0 ? void 0 : _b.type; + break; + case 'EnumValue': + const enumType = info.inputType ? (0, _graphql.getNamedType)(info.inputType) : null; + info.enumValue = enumType instanceof _graphql.GraphQLEnumType ? find(enumType.getValues(), val => val.value === state.name) : null; + break; + case 'ListValue': + const nullableType = info.inputType ? (0, _graphql.getNullableType)(info.inputType) : null; + info.inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null; + break; + case 'ObjectValue': + const objectType = info.inputType ? (0, _graphql.getNamedType)(info.inputType) : null; + info.objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null; + break; + case 'ObjectField': + const objectField = state.name && info.objectFieldDefs ? info.objectFieldDefs[state.name] : null; + info.inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type; + info.fieldDef = objectField; + break; + case 'NamedType': + info.type = state.name ? schema.getType(state.name) : null; + break; } + }); + return info; +} +function getFieldDef(schema, type, fieldName) { + if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) { + return _graphql.SchemaMetaFieldDef; } - return pos; -}; - -// Skip char codes reverse from given position - 1 -StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) { - if (pos <= min) { - return pos; + if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) { + return _graphql.TypeMetaFieldDef; } - while (pos > min) { - if (code !== this.src.charCodeAt(--pos)) { - return pos + 1; - } + if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) { + return _graphql.TypeNameMetaFieldDef; } - return pos; -}; - -// cut lines range from source. -StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) { - if (begin >= end) { - return ''; + if (type && type.getFields) { + return type.getFields()[fieldName]; } - const queue = new Array(end - begin); - for (let i = 0, line = begin; line < end; line++, i++) { - let lineIndent = 0; - const lineStart = this.bMarks[line]; - let first = lineStart; - let last; - if (line + 1 < end || keepLastLF) { - // No need for bounds check because we have fake entry on tail. - last = this.eMarks[line] + 1; - } else { - last = this.eMarks[line]; - } - while (first < last && lineIndent < indent) { - const ch = this.src.charCodeAt(first); - if (isSpace(ch)) { - if (ch === 0x09) { - lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4; - } else { - lineIndent++; - } - } else if (first - lineStart < this.tShift[line]) { - // patched tShift masked characters to look like spaces (blockquotes, list markers) - lineIndent++; - } else { - break; - } - first++; - } - if (lineIndent > indent) { - // partially expanding tabs in code blocks, e.g '\t\tfoobar' - // with indent=2 becomes ' \tfoobar' - queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last); - } else { - queue[i] = this.src.slice(first, last); +} +function find(array, predicate) { + for (let i = 0; i < array.length; i++) { + if (predicate(array[i])) { + return array[i]; } } - return queue.join(''); -}; +} -// re-export Token class to use in block rules -StateBlock.prototype.Token = Token; +/***/ }), -// GFM table, https://github.github.com/gfm/#tables-extension- +/***/ "../../codemirror-graphql/esm/utils/hintList.js": +/*!******************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/hintList.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports) { -// Limit the amount of empty autocompleted cells in a table, -// see https://github.com/markdown-it/markdown-it/issues/1000, -// -// Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k. -// We set it to 65k, which can expand user input by a factor of x370 -// (256x256 square is 1.8kB expanded into 650kB). -const MAX_AUTOCOMPLETED_CELLS = 0x10000; -function getLine(state, line) { - const pos = state.bMarks[line] + state.tShift[line]; - const max = state.eMarks[line]; - return state.src.slice(pos, max); -} -function escapedSplit(str) { - const result = []; - const max = str.length; - let pos = 0; - let ch = str.charCodeAt(pos); - let isEscaped = false; - let lastPos = 0; - let current = ''; - while (pos < max) { - if (ch === 0x7c /* | */) { - if (!isEscaped) { - // pipe separating cells, '|' - result.push(current + str.substring(lastPos, pos)); - current = ''; - lastPos = pos + 1; - } else { - // escaped pipe, '\|' - current += str.substring(lastPos, pos - 1); - lastPos = pos; - } +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = hintList; +function hintList(cursor, token, list) { + const hints = filterAndSortList(list, normalizeText(token.string)); + if (!hints) { + return; + } + const tokenStart = token.type !== null && /"|\w/.test(token.string[0]) ? token.start : token.end; + return { + list: hints, + from: { + line: cursor.line, + ch: tokenStart + }, + to: { + line: cursor.line, + ch: token.end } - isEscaped = ch === 0x5c /* \ */; - pos++; - ch = str.charCodeAt(pos); + }; +} +function filterAndSortList(list, text) { + if (!text) { + return filterNonEmpty(list, entry => !entry.isDeprecated); } - result.push(current + str.substring(lastPos)); - return result; + const byProximity = list.map(entry => ({ + proximity: getProximity(normalizeText(entry.text), text), + entry + })); + const conciseMatches = filterNonEmpty(filterNonEmpty(byProximity, pair => pair.proximity <= 2), pair => !pair.entry.isDeprecated); + const sortedMatches = conciseMatches.sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.text.length - b.entry.text.length); + return sortedMatches.map(pair => pair.entry); } -function table(state, startLine, endLine, silent) { - // should have at least two lines - if (startLine + 2 > endLine) { - return false; +function filterNonEmpty(array, predicate) { + const filtered = array.filter(predicate); + return filtered.length === 0 ? array : filtered; +} +function normalizeText(text) { + return text.toLowerCase().replaceAll(/\W/g, ''); +} +function getProximity(suggestion, text) { + let proximity = lexicalDistance(text, suggestion); + if (suggestion.length > text.length) { + proximity -= suggestion.length - text.length - 1; + proximity += suggestion.indexOf(text) === 0 ? 0 : 0.5; } - let nextLine = startLine + 1; - if (state.sCount[nextLine] < state.blkIndent) { - return false; + return proximity; +} +function lexicalDistance(a, b) { + let i; + let j; + const d = []; + const aLength = a.length; + const bLength = b.length; + for (i = 0; i <= aLength; i++) { + d[i] = [i]; } - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[nextLine] - state.blkIndent >= 4) { - return false; + for (j = 1; j <= bLength; j++) { + d[0][j] = j; + } + for (i = 1; i <= aLength; i++) { + for (j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost); + } + } } + return d[aLength][bLength]; +} - // first character of the second line should be '|', '-', ':', - // and no other characters are allowed but spaces; - // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp +/***/ }), - let pos = state.bMarks[nextLine] + state.tShift[nextLine]; - if (pos >= state.eMarks[nextLine]) { - return false; +/***/ "../../codemirror-graphql/esm/utils/info-addon.js": +/*!********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/info-addon.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.defineOption('info', false, (cm, options, old) => { + if (old && old !== _codemirror.default.Init) { + const oldOnMouseOver = cm.state.info.onMouseOver; + _codemirror.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver); + clearTimeout(cm.state.info.hoverTimeout); + delete cm.state.info; } - const firstCh = state.src.charCodeAt(pos++); - if (firstCh !== 0x7C /* | */ && firstCh !== 0x2D /* - */ && firstCh !== 0x3A /* : */) { - return false; + if (options) { + const state = cm.state.info = createState(options); + state.onMouseOver = onMouseOver.bind(null, cm); + _codemirror.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver); } - if (pos >= state.eMarks[nextLine]) { - return false; +}); +function createState(options) { + return { + options: options instanceof Function ? { + render: options + } : options === true ? {} : options + }; +} +function getHoverTime(cm) { + const { + options + } = cm.state.info; + return (options === null || options === void 0 ? void 0 : options.hoverTime) || 500; +} +function onMouseOver(cm, e) { + const state = cm.state.info; + const target = e.target || e.srcElement; + if (!(target instanceof HTMLElement)) { + return; } - const secondCh = state.src.charCodeAt(pos++); - if (secondCh !== 0x7C /* | */ && secondCh !== 0x2D /* - */ && secondCh !== 0x3A /* : */ && !isSpace(secondCh)) { - return false; + if (target.nodeName !== 'SPAN' || state.hoverTimeout !== undefined) { + return; } + const box = target.getBoundingClientRect(); + const onMouseMove = function () { + clearTimeout(state.hoverTimeout); + state.hoverTimeout = setTimeout(onHover, hoverTime); + }; + const onMouseOut = function () { + _codemirror.default.off(document, 'mousemove', onMouseMove); + _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut); + clearTimeout(state.hoverTimeout); + state.hoverTimeout = undefined; + }; + const onHover = function () { + _codemirror.default.off(document, 'mousemove', onMouseMove); + _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut); + state.hoverTimeout = undefined; + onMouseHover(cm, box); + }; + const hoverTime = getHoverTime(cm); + state.hoverTimeout = setTimeout(onHover, hoverTime); + _codemirror.default.on(document, 'mousemove', onMouseMove); + _codemirror.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut); +} +function onMouseHover(cm, box) { + const pos = cm.coordsChar({ + left: (box.left + box.right) / 2, + top: (box.top + box.bottom) / 2 + }, 'window'); + const state = cm.state.info; + const { + options + } = state; + const render = options.render || cm.getHelper(pos, 'info'); + if (render) { + const token = cm.getTokenAt(pos, true); + if (token) { + const info = render(token, options, cm, pos); + if (info) { + showPopup(cm, box, info); + } + } + } +} +function showPopup(cm, box, info) { + const popup = document.createElement('div'); + popup.className = 'CodeMirror-info'; + popup.append(info); + document.body.append(popup); + const popupBox = popup.getBoundingClientRect(); + const popupStyle = window.getComputedStyle(popup); + const popupWidth = popupBox.right - popupBox.left + parseFloat(popupStyle.marginLeft) + parseFloat(popupStyle.marginRight); + const popupHeight = popupBox.bottom - popupBox.top + parseFloat(popupStyle.marginTop) + parseFloat(popupStyle.marginBottom); + let topPos = box.bottom; + if (popupHeight > window.innerHeight - box.bottom - 15 && box.top > window.innerHeight - box.bottom) { + topPos = box.top - popupHeight; + } + if (topPos < 0) { + topPos = box.bottom; + } + let leftPos = Math.max(0, window.innerWidth - popupWidth - 15); + if (leftPos > box.left) { + leftPos = box.left; + } + popup.style.opacity = '1'; + popup.style.top = topPos + 'px'; + popup.style.left = leftPos + 'px'; + let popupTimeout; + const onMouseOverPopup = function () { + clearTimeout(popupTimeout); + }; + const onMouseOut = function () { + clearTimeout(popupTimeout); + popupTimeout = setTimeout(hidePopup, 200); + }; + const hidePopup = function () { + _codemirror.default.off(popup, 'mouseover', onMouseOverPopup); + _codemirror.default.off(popup, 'mouseout', onMouseOut); + _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut); + if (popup.style.opacity) { + popup.style.opacity = '0'; + setTimeout(() => { + if (popup.parentNode) { + popup.remove(); + } + }, 600); + } else if (popup.parentNode) { + popup.remove(); + } + }; + _codemirror.default.on(popup, 'mouseover', onMouseOverPopup); + _codemirror.default.on(popup, 'mouseout', onMouseOut); + _codemirror.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut); +} - // if first character is '-', then second character must not be a space - // (due to parsing ambiguity with list) - if (firstCh === 0x2D /* - */ && isSpace(secondCh)) { - return false; +/***/ }), + +/***/ "../../codemirror-graphql/esm/utils/jsonParse.js": +/*!*******************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/jsonParse.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.JSONSyntaxError = void 0; +exports["default"] = jsonParse; +function jsonParse(str) { + string = str; + strLen = str.length; + start = end = lastEnd = -1; + ch(); + lex(); + const ast = parseObj(); + expect('EOF'); + return ast; +} +let string; +let strLen; +let start; +let end; +let lastEnd; +let code; +let kind; +function parseObj() { + const nodeStart = start; + const members = []; + expect('{'); + if (!skip('}')) { + do { + members.push(parseMember()); + } while (skip(',')); + expect('}'); } - while (pos < state.eMarks[nextLine]) { - const ch = state.src.charCodeAt(pos); - if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */ && !isSpace(ch)) { - return false; - } - pos++; + return { + kind: 'Object', + start: nodeStart, + end: lastEnd, + members + }; +} +function parseMember() { + const nodeStart = start; + const key = kind === 'String' ? curToken() : null; + expect('String'); + expect(':'); + const value = parseVal(); + return { + kind: 'Member', + start: nodeStart, + end: lastEnd, + key, + value + }; +} +function parseArr() { + const nodeStart = start; + const values = []; + expect('['); + if (!skip(']')) { + do { + values.push(parseVal()); + } while (skip(',')); + expect(']'); } - let lineText = getLine(state, startLine + 1); - let columns = lineText.split('|'); - const aligns = []; - for (let i = 0; i < columns.length; i++) { - const t = columns[i].trim(); - if (!t) { - // allow empty columns before and after table, but not in between columns; - // e.g. allow ` |---| `, disallow ` ---||--- ` - if (i === 0 || i === columns.length - 1) { - continue; - } else { - return false; - } - } - if (!/^:?-+:?$/.test(t)) { - return false; - } - if (t.charCodeAt(t.length - 1) === 0x3A /* : */) { - aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right'); - } else if (t.charCodeAt(0) === 0x3A /* : */) { - aligns.push('left'); - } else { - aligns.push(''); - } + return { + kind: 'Array', + start: nodeStart, + end: lastEnd, + values + }; +} +function parseVal() { + switch (kind) { + case '[': + return parseArr(); + case '{': + return parseObj(); + case 'String': + case 'Number': + case 'Boolean': + case 'Null': + const token = curToken(); + lex(); + return token; } - lineText = getLine(state, startLine).trim(); - if (lineText.indexOf('|') === -1) { - return false; + expect('Value'); +} +function curToken() { + return { + kind, + start, + end, + value: JSON.parse(string.slice(start, end)) + }; +} +function expect(str) { + if (kind === str) { + lex(); + return; } - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; + let found; + if (kind === 'EOF') { + found = '[end of file]'; + } else if (end - start > 1) { + found = '`' + string.slice(start, end) + '`'; + } else { + const match = string.slice(start).match(/^.+?\b/); + found = '`' + (match ? match[0] : string[start]) + '`'; } - columns = escapedSplit(lineText); - if (columns.length && columns[0] === '') columns.shift(); - if (columns.length && columns[columns.length - 1] === '') columns.pop(); - - // header row will define an amount of columns in the entire table, - // and align row should be exactly the same (the rest of the rows can differ) - const columnCount = columns.length; - if (columnCount === 0 || columnCount !== aligns.length) { - return false; + throw syntaxError(`Expected ${str} but found ${found}.`); +} +class JSONSyntaxError extends Error { + constructor(message, position) { + super(message); + this.position = position; } - if (silent) { +} +exports.JSONSyntaxError = JSONSyntaxError; +function syntaxError(message) { + return new JSONSyntaxError(message, { + start, + end + }); +} +function skip(k) { + if (kind === k) { + lex(); return true; } - const oldParentType = state.parentType; - state.parentType = 'table'; - - // use 'blockquote' lists for termination because it's - // the most similar to tables - const terminatorRules = state.md.block.ruler.getRules('blockquote'); - const token_to = state.push('table_open', 'table', 1); - const tableLines = [startLine, 0]; - token_to.map = tableLines; - const token_tho = state.push('thead_open', 'thead', 1); - token_tho.map = [startLine, startLine + 1]; - const token_htro = state.push('tr_open', 'tr', 1); - token_htro.map = [startLine, startLine + 1]; - for (let i = 0; i < columns.length; i++) { - const token_ho = state.push('th_open', 'th', 1); - if (aligns[i]) { - token_ho.attrs = [['style', 'text-align:' + aligns[i]]]; - } - const token_il = state.push('inline', '', 0); - token_il.content = columns[i].trim(); - token_il.children = []; - state.push('th_close', 'th', -1); +} +function ch() { + if (end < strLen) { + end++; + code = end === strLen ? 0 : string.charCodeAt(end); } - state.push('tr_close', 'tr', -1); - state.push('thead_close', 'thead', -1); - let tbodyLines; - let autocompletedCells = 0; - for (nextLine = startLine + 2; nextLine < endLine; nextLine++) { - if (state.sCount[nextLine] < state.blkIndent) { - break; - } - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; + return code; +} +function lex() { + lastEnd = end; + while (code === 9 || code === 10 || code === 13 || code === 32) { + ch(); + } + if (code === 0) { + kind = 'EOF'; + return; + } + start = end; + switch (code) { + case 34: + kind = 'String'; + return readString(); + case 45: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + kind = 'Number'; + return readNumber(); + case 102: + if (string.slice(start, start + 5) !== 'false') { break; } - } - if (terminate) { - break; - } - lineText = getLine(state, nextLine).trim(); - if (!lineText) { - break; - } - if (state.sCount[nextLine] - state.blkIndent >= 4) { - break; - } - columns = escapedSplit(lineText); - if (columns.length && columns[0] === '') columns.shift(); - if (columns.length && columns[columns.length - 1] === '') columns.pop(); - - // note: autocomplete count can be negative if user specifies more columns than header, - // but that does not affect intended use (which is limiting expansion) - autocompletedCells += columnCount - columns.length; - if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) { - break; - } - if (nextLine === startLine + 2) { - const token_tbo = state.push('tbody_open', 'tbody', 1); - token_tbo.map = tbodyLines = [startLine + 2, 0]; - } - const token_tro = state.push('tr_open', 'tr', 1); - token_tro.map = [nextLine, nextLine + 1]; - for (let i = 0; i < columnCount; i++) { - const token_tdo = state.push('td_open', 'td', 1); - if (aligns[i]) { - token_tdo.attrs = [['style', 'text-align:' + aligns[i]]]; + end += 4; + ch(); + kind = 'Boolean'; + return; + case 110: + if (string.slice(start, start + 4) !== 'null') { + break; + } + end += 3; + ch(); + kind = 'Null'; + return; + case 116: + if (string.slice(start, start + 4) !== 'true') { + break; + } + end += 3; + ch(); + kind = 'Boolean'; + return; + } + kind = string[start]; + ch(); +} +function readString() { + ch(); + while (code !== 34 && code > 31) { + if (code === 92) { + code = ch(); + switch (code) { + case 34: + case 47: + case 92: + case 98: + case 102: + case 110: + case 114: + case 116: + ch(); + break; + case 117: + ch(); + readHex(); + readHex(); + readHex(); + readHex(); + break; + default: + throw syntaxError('Bad character escape sequence.'); } - const token_il = state.push('inline', '', 0); - token_il.content = columns[i] ? columns[i].trim() : ''; - token_il.children = []; - state.push('td_close', 'td', -1); + } else if (end === strLen) { + throw syntaxError('Unterminated string.'); + } else { + ch(); } - state.push('tr_close', 'tr', -1); } - if (tbodyLines) { - state.push('tbody_close', 'tbody', -1); - tbodyLines[1] = nextLine; + if (code === 34) { + ch(); + return; } - state.push('table_close', 'table', -1); - tableLines[1] = nextLine; - state.parentType = oldParentType; - state.line = nextLine; - return true; + throw syntaxError('Unterminated string.'); } - -// Code block (4 spaces padded) - -function code(state, startLine, endLine /*, silent */) { - if (state.sCount[startLine] - state.blkIndent < 4) { - return false; +function readHex() { + if (code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102) { + return ch(); } - let nextLine = startLine + 1; - let last = nextLine; - while (nextLine < endLine) { - if (state.isEmpty(nextLine)) { - nextLine++; - continue; - } - if (state.sCount[nextLine] - state.blkIndent >= 4) { - nextLine++; - last = nextLine; - continue; + throw syntaxError('Expected hexadecimal digit.'); +} +function readNumber() { + if (code === 45) { + ch(); + } + if (code === 48) { + ch(); + } else { + readDigits(); + } + if (code === 46) { + ch(); + readDigits(); + } + if (code === 69 || code === 101) { + code = ch(); + if (code === 43 || code === 45) { + ch(); } - break; + readDigits(); } - state.line = last; - const token = state.push('code_block', 'code', 0); - token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\n'; - token.map = [startLine, state.line]; - return true; +} +function readDigits() { + if (code < 48 || code > 57) { + throw syntaxError('Expected decimal digit.'); + } + do { + ch(); + } while (code >= 48 && code <= 57); } -// fences (``` lang, ~~~ lang) +/***/ }), -function fence(state, startLine, endLine, silent) { - let pos = state.bMarks[startLine] + state.tShift[startLine]; - let max = state.eMarks[startLine]; +/***/ "../../codemirror-graphql/esm/utils/jump-addon.js": +/*!********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/jump-addon.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; +"use strict"; + + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.defineOption('jump', false, (cm, options, old) => { + if (old && old !== _codemirror.default.Init) { + const oldOnMouseOver = cm.state.jump.onMouseOver; + _codemirror.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver); + const oldOnMouseOut = cm.state.jump.onMouseOut; + _codemirror.default.off(cm.getWrapperElement(), 'mouseout', oldOnMouseOut); + _codemirror.default.off(document, 'keydown', cm.state.jump.onKeyDown); + delete cm.state.jump; } - if (pos + 3 > max) { - return false; + if (options) { + const state = cm.state.jump = { + options, + onMouseOver: onMouseOver.bind(null, cm), + onMouseOut: onMouseOut.bind(null, cm), + onKeyDown: onKeyDown.bind(null, cm) + }; + _codemirror.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver); + _codemirror.default.on(cm.getWrapperElement(), 'mouseout', state.onMouseOut); + _codemirror.default.on(document, 'keydown', state.onKeyDown); } - const marker = state.src.charCodeAt(pos); - if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */) { - return false; +}); +function onMouseOver(cm, event) { + const target = event.target || event.srcElement; + if (!(target instanceof HTMLElement)) { + return; } - - // scan marker length - let mem = pos; - pos = state.skipChars(pos, marker); - let len = pos - mem; - if (len < 3) { - return false; + if ((target === null || target === void 0 ? void 0 : target.nodeName) !== 'SPAN') { + return; } - const markup = state.src.slice(mem, pos); - const params = state.src.slice(pos, max); - if (marker === 0x60 /* ` */) { - if (params.indexOf(String.fromCharCode(marker)) >= 0) { - return false; - } + const box = target.getBoundingClientRect(); + const cursor = { + left: (box.left + box.right) / 2, + top: (box.top + box.bottom) / 2 + }; + cm.state.jump.cursor = cursor; + if (cm.state.jump.isHoldingModifier) { + enableJumpMode(cm); } - - // Since start is found, we can report success here in validation mode - if (silent) { - return true; +} +function onMouseOut(cm) { + if (!cm.state.jump.isHoldingModifier && cm.state.jump.cursor) { + cm.state.jump.cursor = null; + return; } - - // search end of block - let nextLine = startLine; - let haveEndMarker = false; - for (;;) { - nextLine++; - if (nextLine >= endLine) { - // unclosed block should be autoclosed by end of document. - // also block seems to be autoclosed by end of parent - break; + if (cm.state.jump.isHoldingModifier && cm.state.jump.marker) { + disableJumpMode(cm); + } +} +function onKeyDown(cm, event) { + if (cm.state.jump.isHoldingModifier || !isJumpModifier(event.key)) { + return; + } + cm.state.jump.isHoldingModifier = true; + if (cm.state.jump.cursor) { + enableJumpMode(cm); + } + const onKeyUp = upEvent => { + if (upEvent.code !== event.code) { + return; } - pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]; - max = state.eMarks[nextLine]; - if (pos < max && state.sCount[nextLine] < state.blkIndent) { - // non-empty line with negative indent should stop the list: - // - ``` - // test - break; + cm.state.jump.isHoldingModifier = false; + if (cm.state.jump.marker) { + disableJumpMode(cm); } - if (state.src.charCodeAt(pos) !== marker) { - continue; + _codemirror.default.off(document, 'keyup', onKeyUp); + _codemirror.default.off(document, 'click', onClick); + cm.off('mousedown', onMouseDown); + }; + const onClick = clickEvent => { + const { + destination, + options + } = cm.state.jump; + if (destination) { + options.onClick(destination, clickEvent); } - if (state.sCount[nextLine] - state.blkIndent >= 4) { - // closing fence should be indented less than 4 spaces - continue; + }; + const onMouseDown = (_, downEvent) => { + if (cm.state.jump.destination) { + downEvent.codemirrorIgnore = true; } - pos = state.skipChars(pos, marker); - - // closing code fence must be at least as long as the opening one - if (pos - mem < len) { - continue; + }; + _codemirror.default.on(document, 'keyup', onKeyUp); + _codemirror.default.on(document, 'click', onClick); + cm.on('mousedown', onMouseDown); +} +const isMac = typeof navigator !== 'undefined' && navigator.userAgent.includes('Mac'); +function isJumpModifier(key) { + return key === (isMac ? 'Meta' : 'Control'); +} +function enableJumpMode(cm) { + if (cm.state.jump.marker) { + return; + } + const { + cursor, + options + } = cm.state.jump; + const pos = cm.coordsChar(cursor); + const token = cm.getTokenAt(pos, true); + const getDestination = options.getDestination || cm.getHelper(pos, 'jump'); + if (getDestination) { + const destination = getDestination(token, options, cm); + if (destination) { + const marker = cm.markText({ + line: pos.line, + ch: token.start + }, { + line: pos.line, + ch: token.end + }, { + className: 'CodeMirror-jump-token' + }); + cm.state.jump.marker = marker; + cm.state.jump.destination = destination; } + } +} +function disableJumpMode(cm) { + const { + marker + } = cm.state.jump; + cm.state.jump.marker = null; + cm.state.jump.destination = null; + marker.clear(); +} - // make sure tail has spaces only - pos = state.skipSpaces(pos); - if (pos < max) { - continue; +/***/ }), + +/***/ "../../codemirror-graphql/esm/utils/mode-factory.js": +/*!**********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/mode-factory.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +var _modeIndent = _interopRequireDefault(__webpack_require__(/*! ./mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const graphqlModeFactory = config => { + const parser = (0, _graphqlLanguageService.onlineParser)({ + eatWhitespace: stream => stream.eatWhile(_graphqlLanguageService.isIgnored), + lexRules: _graphqlLanguageService.LexRules, + parseRules: _graphqlLanguageService.ParseRules, + editorConfig: { + tabSize: config.tabSize } - haveEndMarker = true; - // found! - break; - } + }); + return { + config, + startState: parser.startState, + token: parser.token, + indent: _modeIndent.default, + electricInput: /^\s*[})\]]/, + fold: 'brace', + lineComment: '#', + closeBrackets: { + pairs: '()[]{}""', + explode: '()[]{}' + } + }; +}; +var _default = exports["default"] = graphqlModeFactory; - // If a fence has heading spaces, they should be removed from its inner block - len = state.sCount[startLine]; - state.line = nextLine + (haveEndMarker ? 1 : 0); - const token = state.push('fence', 'code', 0); - token.info = params; - token.content = state.getLines(startLine + 1, nextLine, len, true); - token.markup = markup; - token.map = [startLine, state.line]; - return true; -} +/***/ }), -// Block quotes +/***/ "../../codemirror-graphql/esm/utils/mode-indent.js": +/*!*********************************************************!*\ + !*** ../../codemirror-graphql/esm/utils/mode-indent.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { -function blockquote(state, startLine, endLine, silent) { - let pos = state.bMarks[startLine] + state.tShift[startLine]; - let max = state.eMarks[startLine]; - const oldLineMax = state.lineMax; +"use strict"; - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; - } - // check the block quote marker - if (state.src.charCodeAt(pos) !== 0x3E /* > */) { - return false; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = indent; +function indent(state, textAfter) { + var _a, _b; + const { + levels, + indentLevel + } = state; + const level = !levels || levels.length === 0 ? indentLevel : levels.at(-1) - (((_a = this.electricInput) === null || _a === void 0 ? void 0 : _a.test(textAfter)) ? 1 : 0); + return (level || 0) * (((_b = this.config) === null || _b === void 0 ? void 0 : _b.indentUnit) || 0); +} - // we know that it's going to be a valid blockquote, - // so no point trying to find the end of it in silent mode - if (silent) { - return true; - } - const oldBMarks = []; - const oldBSCount = []; - const oldSCount = []; - const oldTShift = []; - const terminatorRules = state.md.block.ruler.getRules('blockquote'); - const oldParentType = state.parentType; - state.parentType = 'blockquote'; - let lastLineEmpty = false; - let nextLine; +/***/ }), - // Search the end of the block - // - // Block ends with either: - // 1. an empty line outside: - // ``` - // > test - // - // ``` - // 2. an empty line inside: - // ``` - // > - // test - // ``` - // 3. another tag: - // ``` - // > test - // - - - - // ``` - for (nextLine = startLine; nextLine < endLine; nextLine++) { - // check if it's outdented, i.e. it's inside list item and indented - // less than said list item: - // - // ``` - // 1. anything - // > current blockquote - // 2. checking this line - // ``` - const isOutdented = state.sCount[nextLine] < state.blkIndent; - pos = state.bMarks[nextLine] + state.tShift[nextLine]; - max = state.eMarks[nextLine]; - if (pos >= max) { - // Case 1: line is not inside the blockquote, and this line is empty. - break; - } - if (state.src.charCodeAt(pos++) === 0x3E /* > */ && !isOutdented) { - // This line is inside the blockquote. +/***/ "../../codemirror-graphql/esm/variables/hint.js": +/*!******************************************************!*\ + !*** ../../codemirror-graphql/esm/variables/hint.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - // set offset past spaces and ">" - let initial = state.sCount[nextLine] + 1; - let spaceAfterMarker; - let adjustTab; +"use strict"; - // skip one optional space after '>' - if (state.src.charCodeAt(pos) === 0x20 /* space */) { - // ' > test ' - // ^ -- position start of line here: - pos++; - initial++; - adjustTab = false; - spaceAfterMarker = true; - } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) { - spaceAfterMarker = true; - if ((state.bsCount[nextLine] + initial) % 4 === 3) { - // ' >\t test ' - // ^ -- position start of line here (tab has width===1) - pos++; - initial++; - adjustTab = false; - } else { - // ' >\t test ' - // ^ -- position start of line here + shift bsCount slightly - // to make extra space appear - adjustTab = true; + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _forEachState = _interopRequireDefault(__webpack_require__(/*! ../utils/forEachState */ "../../codemirror-graphql/esm/utils/forEachState.js")); +var _hintList = _interopRequireDefault(__webpack_require__(/*! ../utils/hintList */ "../../codemirror-graphql/esm/utils/hintList.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.registerHelper('hint', 'graphql-variables', (editor, options) => { + const cur = editor.getCursor(); + const token = editor.getTokenAt(cur); + const results = getVariablesHint(cur, token, options); + if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) { + results.from = _codemirror.default.Pos(results.from.line, results.from.ch); + results.to = _codemirror.default.Pos(results.to.line, results.to.ch); + _codemirror.default.signal(editor, 'hasCompletion', editor, results, token); + } + return results; +}); +function getVariablesHint(cur, token, options) { + const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state; + const { + kind, + step + } = state; + if (kind === 'Document' && step === 0) { + return (0, _hintList.default)(cur, token, [{ + text: '{' + }]); + } + const { + variableToType + } = options; + if (!variableToType) { + return; + } + const typeInfo = getTypeInfo(variableToType, token.state); + if (kind === 'Document' || kind === 'Variable' && step === 0) { + const variableNames = Object.keys(variableToType); + return (0, _hintList.default)(cur, token, variableNames.map(name => ({ + text: `"${name}": `, + type: variableToType[name] + }))); + } + if ((kind === 'ObjectValue' || kind === 'ObjectField' && step === 0) && typeInfo.fields) { + const inputFields = Object.keys(typeInfo.fields).map(fieldName => typeInfo.fields[fieldName]); + return (0, _hintList.default)(cur, token, inputFields.map(field => ({ + text: `"${field.name}": `, + type: field.type, + description: field.description + }))); + } + if (kind === 'StringValue' || kind === 'NumberValue' || kind === 'BooleanValue' || kind === 'NullValue' || kind === 'ListValue' && step === 1 || kind === 'ObjectField' && step === 2 || kind === 'Variable' && step === 2) { + const namedInputType = typeInfo.type ? (0, _graphql.getNamedType)(typeInfo.type) : undefined; + if (namedInputType instanceof _graphql.GraphQLInputObjectType) { + return (0, _hintList.default)(cur, token, [{ + text: '{' + }]); + } + if (namedInputType instanceof _graphql.GraphQLEnumType) { + const values = namedInputType.getValues(); + return (0, _hintList.default)(cur, token, values.map(value => ({ + text: `"${value.name}"`, + type: namedInputType, + description: value.description + }))); + } + if (namedInputType === _graphql.GraphQLBoolean) { + return (0, _hintList.default)(cur, token, [{ + text: 'true', + type: _graphql.GraphQLBoolean, + description: 'Not false.' + }, { + text: 'false', + type: _graphql.GraphQLBoolean, + description: 'Not true.' + }]); + } + } +} +function getTypeInfo(variableToType, tokenState) { + const info = { + type: null, + fields: null + }; + (0, _forEachState.default)(tokenState, state => { + switch (state.kind) { + case 'Variable': + { + info.type = variableToType[state.name]; + break; } - } else { - spaceAfterMarker = false; - } - let offset = initial; - oldBMarks.push(state.bMarks[nextLine]); - state.bMarks[nextLine] = pos; - while (pos < max) { - const ch = state.src.charCodeAt(pos); - if (isSpace(ch)) { - if (ch === 0x09) { - offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4; - } else { - offset++; - } - } else { + case 'ListValue': + { + const nullableType = info.type ? (0, _graphql.getNullableType)(info.type) : undefined; + info.type = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null; + break; + } + case 'ObjectValue': + { + const objectType = info.type ? (0, _graphql.getNamedType)(info.type) : undefined; + info.fields = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null; + break; + } + case 'ObjectField': + { + const objectField = state.name && info.fields ? info.fields[state.name] : null; + info.type = objectField === null || objectField === void 0 ? void 0 : objectField.type; break; } - pos++; - } - lastLineEmpty = pos >= max; - oldBSCount.push(state.bsCount[nextLine]); - state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0); - oldSCount.push(state.sCount[nextLine]); - state.sCount[nextLine] = offset - initial; - oldTShift.push(state.tShift[nextLine]); - state.tShift[nextLine] = pos - state.bMarks[nextLine]; - continue; } + }); + return info; +} - // Case 2: line is not inside the blockquote, and the last line was empty. - if (lastLineEmpty) { - break; - } +/***/ }), - // Case 3: another tag found. - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; - break; +/***/ "../../codemirror-graphql/esm/variables/lint.js": +/*!******************************************************!*\ + !*** ../../codemirror-graphql/esm/variables/lint.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _jsonParse = _interopRequireWildcard(__webpack_require__(/*! ../utils/jsonParse */ "../../codemirror-graphql/esm/utils/jsonParse.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.registerHelper('lint', 'graphql-variables', (text, options, editor) => { + if (!text) { + return []; + } + let ast; + try { + ast = (0, _jsonParse.default)(text); + } catch (error) { + if (error instanceof _jsonParse.JSONSyntaxError) { + return [lintError(editor, error.position, error.message)]; + } + throw error; + } + const { + variableToType + } = options; + if (!variableToType) { + return []; + } + return validateVariables(editor, variableToType, ast); +}); +function validateVariables(editor, variableToType, variablesAST) { + var _a; + const errors = []; + for (const member of variablesAST.members) { + if (member) { + const variableName = (_a = member.key) === null || _a === void 0 ? void 0 : _a.value; + const type = variableToType[variableName]; + if (type) { + for (const [node, message] of validateValue(type, member.value)) { + errors.push(lintError(editor, node, message)); + } + } else { + errors.push(lintError(editor, member.key, `Variable "$${variableName}" does not appear in any GraphQL query.`)); } } - if (terminate) { - // Quirk to enforce "hard termination mode" for paragraphs; - // normally if you call `tokenize(state, startLine, nextLine)`, - // paragraphs will look below nextLine for paragraph continuation, - // but if blockquote is terminated by another tag, they shouldn't - state.lineMax = nextLine; - if (state.blkIndent !== 0) { - // state.blkIndent was non-zero, we now set it to zero, - // so we need to re-calculate all offsets to appear as - // if indent wasn't changed - oldBMarks.push(state.bMarks[nextLine]); - oldBSCount.push(state.bsCount[nextLine]); - oldTShift.push(state.tShift[nextLine]); - oldSCount.push(state.sCount[nextLine]); - state.sCount[nextLine] -= state.blkIndent; + } + return errors; +} +function validateValue(type, valueAST) { + if (!type || !valueAST) { + return []; + } + if (type instanceof _graphql.GraphQLNonNull) { + if (valueAST.kind === 'Null') { + return [[valueAST, `Type "${type}" is non-nullable and cannot be null.`]]; + } + return validateValue(type.ofType, valueAST); + } + if (valueAST.kind === 'Null') { + return []; + } + if (type instanceof _graphql.GraphQLList) { + const itemType = type.ofType; + if (valueAST.kind === 'Array') { + const values = valueAST.values || []; + return mapCat(values, item => validateValue(itemType, item)); + } + return validateValue(itemType, valueAST); + } + if (type instanceof _graphql.GraphQLInputObjectType) { + if (valueAST.kind !== 'Object') { + return [[valueAST, `Type "${type}" must be an Object.`]]; + } + const providedFields = Object.create(null); + const fieldErrors = mapCat(valueAST.members, member => { + var _a; + const fieldName = (_a = member === null || member === void 0 ? void 0 : member.key) === null || _a === void 0 ? void 0 : _a.value; + providedFields[fieldName] = true; + const inputField = type.getFields()[fieldName]; + if (!inputField) { + return [[member.key, `Type "${type}" does not have a field "${fieldName}".`]]; + } + const fieldType = inputField ? inputField.type : undefined; + return validateValue(fieldType, member.value); + }); + for (const fieldName of Object.keys(type.getFields())) { + const field = type.getFields()[fieldName]; + if (!providedFields[fieldName] && field.type instanceof _graphql.GraphQLNonNull && !field.defaultValue) { + fieldErrors.push([valueAST, `Object of type "${type}" is missing required field "${fieldName}".`]); } - break; } - oldBMarks.push(state.bMarks[nextLine]); - oldBSCount.push(state.bsCount[nextLine]); - oldTShift.push(state.tShift[nextLine]); - oldSCount.push(state.sCount[nextLine]); - - // A negative indentation means that this is a paragraph continuation - // - state.sCount[nextLine] = -1; + return fieldErrors; } - const oldIndent = state.blkIndent; - state.blkIndent = 0; - const token_o = state.push('blockquote_open', 'blockquote', 1); - token_o.markup = '>'; - const lines = [startLine, 0]; - token_o.map = lines; - state.md.block.tokenize(state, startLine, nextLine); - const token_c = state.push('blockquote_close', 'blockquote', -1); - token_c.markup = '>'; - state.lineMax = oldLineMax; - state.parentType = oldParentType; - lines[1] = state.line; - - // Restore original tShift; this might not be necessary since the parser - // has already been here, but just to make sure we can do that. - for (let i = 0; i < oldTShift.length; i++) { - state.bMarks[i + startLine] = oldBMarks[i]; - state.tShift[i + startLine] = oldTShift[i]; - state.sCount[i + startLine] = oldSCount[i]; - state.bsCount[i + startLine] = oldBSCount[i]; + if (type.name === 'Boolean' && valueAST.kind !== 'Boolean' || type.name === 'String' && valueAST.kind !== 'String' || type.name === 'ID' && valueAST.kind !== 'Number' && valueAST.kind !== 'String' || type.name === 'Float' && valueAST.kind !== 'Number' || type.name === 'Int' && (valueAST.kind !== 'Number' || (valueAST.value | 0) !== valueAST.value)) { + return [[valueAST, `Expected value of type "${type}".`]]; } - state.blkIndent = oldIndent; - return true; + if ((type instanceof _graphql.GraphQLEnumType || type instanceof _graphql.GraphQLScalarType) && (valueAST.kind !== 'String' && valueAST.kind !== 'Number' && valueAST.kind !== 'Boolean' && valueAST.kind !== 'Null' || isNullish(type.parseValue(valueAST.value)))) { + return [[valueAST, `Expected value of type "${type}".`]]; + } + return []; +} +function lintError(editor, node, message) { + return { + message, + severity: 'error', + type: 'validation', + from: editor.posFromIndex(node.start), + to: editor.posFromIndex(node.end) + }; +} +function isNullish(value) { + return value === null || value === undefined || value !== value; +} +function mapCat(array, mapper) { + return Array.prototype.concat.apply([], array.map(mapper)); } -// Horizontal rule +/***/ }), + +/***/ "../../codemirror-graphql/esm/variables/mode.js": +/*!******************************************************!*\ + !*** ../../codemirror-graphql/esm/variables/mode.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var _codemirror = _interopRequireDefault(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js")); +var _graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +var _modeIndent = _interopRequireDefault(__webpack_require__(/*! ../utils/mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +_codemirror.default.defineMode('graphql-variables', config => { + const parser = (0, _graphqlLanguageService.onlineParser)({ + eatWhitespace: stream => stream.eatSpace(), + lexRules: LexRules, + parseRules: ParseRules, + editorConfig: { + tabSize: config.tabSize + } + }); + return { + config, + startState: parser.startState, + token: parser.token, + indent: _modeIndent.default, + electricInput: /^\s*[}\]]/, + fold: 'brace', + closeBrackets: { + pairs: '[]{}""', + explode: '[]{}' + } + }; +}); +const LexRules = { + Punctuation: /^\[|]|\{|\}|:|,/, + Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, + String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/, + Keyword: /^true|false|null/ +}; +const ParseRules = { + Document: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('Variable', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)('}')], + Variable: [namedKey('variable'), (0, _graphqlLanguageService.p)(':'), 'Value'], + Value(token) { + switch (token.kind) { + case 'Number': + return 'NumberValue'; + case 'String': + return 'StringValue'; + case 'Punctuation': + switch (token.value) { + case '[': + return 'ListValue'; + case '{': + return 'ObjectValue'; + } + return null; + case 'Keyword': + switch (token.value) { + case 'true': + case 'false': + return 'BooleanValue'; + case 'null': + return 'NullValue'; + } + return null; + } + }, + NumberValue: [(0, _graphqlLanguageService.t)('Number', 'number')], + StringValue: [(0, _graphqlLanguageService.t)('String', 'string')], + BooleanValue: [(0, _graphqlLanguageService.t)('Keyword', 'builtin')], + NullValue: [(0, _graphqlLanguageService.t)('Keyword', 'keyword')], + ListValue: [(0, _graphqlLanguageService.p)('['), (0, _graphqlLanguageService.list)('Value', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)(']')], + ObjectValue: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('ObjectField', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)('}')], + ObjectField: [namedKey('attribute'), (0, _graphqlLanguageService.p)(':'), 'Value'] +}; +function namedKey(style) { + return { + style, + match: token => token.kind === 'String', + update(state, token) { + state.name = token.value.slice(1, -1); + } + }; +} + +/***/ }), -function hr(state, startLine, endLine, silent) { - const max = state.eMarks[startLine]; - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; - } - let pos = state.bMarks[startLine] + state.tShift[startLine]; - const marker = state.src.charCodeAt(pos++); +/***/ "../../graphiql-react/dist/index.js": +/*!******************************************!*\ + !*** ../../graphiql-react/dist/index.js ***! + \******************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // Check hr marker - if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x5F /* _ */) { - return false; - } +"use strict"; - // markers can be mixed with spaces, but there should be at least 3 of them - let cnt = 1; - while (pos < max) { - const ch = state.src.charCodeAt(pos++); - if (ch !== marker && !isSpace(ch)) { - return false; +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: () => from[key], + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( +// If the importer is in node compatibility mode or this is not an ESM +// file that has been converted to a CommonJS file using a Babel- +// compatible transform (i.e. "__esModule" has not been set), then set +// "default" to the CommonJS "module.exports" for node compatibility. +isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" +}); +const jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../../../node_modules/react/jsx-runtime.js"); +const reactCompilerRuntime = __webpack_require__(/*! react-compiler-runtime */ "../../../node_modules/react-compiler-runtime/dist/index.js"); +const React = __webpack_require__(/*! react */ "react"); +const clsx = __webpack_require__(/*! clsx */ "../../../node_modules/clsx/dist/clsx.m.js"); +const graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +const toolkit = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/dist/esm/index.js"); +const graphqlLanguageService = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"); +const setValue = __webpack_require__(/*! set-value */ "../../../node_modules/set-value/index.js"); +const getValue = __webpack_require__(/*! get-value */ "../../../node_modules/get-value/index.js"); +const copyToClipboard = __webpack_require__(/*! copy-to-clipboard */ "../../../node_modules/copy-to-clipboard/index.js"); +const D = __webpack_require__(/*! @radix-ui/react-dialog */ "../../../node_modules/@radix-ui/react-dialog/dist/index.js"); +const reactVisuallyHidden = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js"); +const reactDropdownMenu = __webpack_require__(/*! @radix-ui/react-dropdown-menu */ "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js"); +const MarkdownIt = __webpack_require__(/*! markdown-it */ "../../../node_modules/markdown-it/dist/index.cjs.js"); +const framerMotion = __webpack_require__(/*! framer-motion */ "../../../node_modules/framer-motion/dist/cjs/index.js"); +const T = __webpack_require__(/*! @radix-ui/react-tooltip */ "../../../node_modules/@radix-ui/react-tooltip/dist/index.js"); +const react = __webpack_require__(/*! @headlessui/react */ "../../../node_modules/@headlessui/react/dist/index.cjs"); +const ReactDOM = __webpack_require__(/*! react-dom */ "react-dom"); +function _interopNamespaceDefault(e) { + const n = Object.create(null, { + [Symbol.toStringTag]: { + value: "Module" } - if (ch === marker) { - cnt++; + }); + if (e) { + for (const k in e) { + if (k !== "default") { + const d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: () => e[k] + }); + } } } - if (cnt < 3) { - return false; + n.default = e; + return Object.freeze(n); +} +const React__namespace = /* @__PURE__ */_interopNamespaceDefault(React); +const D__namespace = /* @__PURE__ */_interopNamespaceDefault(D); +const T__namespace = /* @__PURE__ */_interopNamespaceDefault(T); +function createNullableContext(name) { + const context = React.createContext(null); + context.displayName = name; + return context; +} +function createContextHook(context) { + function useGivenContext(options) { + var _a; + const value = React.useContext(context); + if (value === null && (options == null ? void 0 : options.nonNull)) { + throw new Error(`Tried to use \`${((_a = options.caller) == null ? void 0 : _a.name) || "a component"}\` without the necessary context. Make sure to render the \`${context.displayName}Provider\` component higher up the tree.`); + } + return value; } - if (silent) { - return true; + Object.defineProperty(useGivenContext, "name", { + value: `use${context.displayName}` + }); + return useGivenContext; +} +const StorageContext = createNullableContext("StorageContext"); +function StorageContextProvider(props) { + const $ = reactCompilerRuntime.c(8); + const isInitialRender = React.useRef(true); + let t0; + if ($[0] !== props.storage) { + t0 = () => new toolkit.StorageAPI(props.storage); + $[0] = props.storage; + $[1] = t0; + } else { + t0 = $[1]; + } + const [storage, setStorage] = React.useState(t0); + let t1; + let t2; + if ($[2] !== props.storage) { + t1 = () => { + if (isInitialRender.current) { + isInitialRender.current = false; + } else { + setStorage(new toolkit.StorageAPI(props.storage)); + } + }; + t2 = [props.storage]; + $[2] = props.storage; + $[3] = t1; + $[4] = t2; + } else { + t1 = $[3]; + t2 = $[4]; + } + React.useEffect(t1, t2); + let t3; + if ($[5] !== props.children || $[6] !== storage) { + t3 = /* @__PURE__ */jsxRuntime.jsx(StorageContext.Provider, { + value: storage, + children: props.children + }); + $[5] = props.children; + $[6] = storage; + $[7] = t3; + } else { + t3 = $[7]; + } + return t3; +} +const useStorageContext = createContextHook(StorageContext); +const SvgArgument = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("rect", { + x: 6, + y: 6, + width: 2, + height: 2, + rx: 1, + fill: "currentColor" +})); +const SvgChevronDown = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 9", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M1 1L7 7L13 1", + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgChevronLeft = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 7 10", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M6 1.04819L2 5.04819L6 9.04819", + stroke: "currentColor", + strokeWidth: 1.75 +})); +const SvgChevronUp = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 9", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M13 8L7 2L1 8", + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgClose = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + stroke: "currentColor", + strokeWidth: 3, + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M1 1L12.9998 12.9997" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M13 1L1.00079 13.0003" +})); +const SvgCopy = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "-2 -2 22 22", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("rect", { + x: 6.75, + y: 0.75, + width: 10.5, + height: 10.5, + rx: 2.2069, + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgDeprecatedArgument = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M5 9L9 5", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M5 5L9 9", + stroke: "currentColor", + strokeWidth: 1.2 +})); +const SvgDeprecatedEnumValue = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 12 12", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M4 8L8 4", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4 4L8 8", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", + fill: "currentColor" +})); +const SvgDeprecatedField = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 12 12", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 0.6, + y: 0.6, + width: 10.8, + height: 10.8, + rx: 3.4, + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4 8L8 4", + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4 4L8 8", + stroke: "currentColor", + strokeWidth: 1.2 +})); +const SvgDirective = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0.5 12 12", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 7, + y: 5.5, + width: 2, + height: 2, + rx: 1, + transform: "rotate(90 7 5.5)", + fill: "currentColor" +}), /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z", + fill: "currentColor" +})); +const SvgDocsFilled = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 20 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z", + fill: "currentColor" +})); +const SvgDocs = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 20 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("line", { + x1: 13, + y1: 11.75, + x2: 6, + y2: 11.75, + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgEnumValue = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 12 12", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 5, + y: 5, + width: 2, + height: 2, + rx: 1, + fill: "currentColor" +}), /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", + fill: "currentColor" +})); +const SvgField = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 12 13", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 0.6, + y: 1.1, + width: 10.8, + height: 10.8, + rx: 2.4, + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("rect", { + x: 5, + y: 5.5, + width: 2, + height: 2, + rx: 1, + fill: "currentColor" +})); +const SvgHistory = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 24 20", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249", + stroke: "currentColor", + strokeWidth: 1.5, + strokeLinecap: "square" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M13.75 5.25V10.75H18.75", + stroke: "currentColor", + strokeWidth: 1.5, + strokeLinecap: "square" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25", + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgImplements = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 12 12", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("circle", { + cx: 6, + cy: 6, + r: 5.4, + stroke: "currentColor", + strokeWidth: 1.2, + strokeDasharray: "4.241025 4.241025", + transform: "rotate(22.5)", + "transform-origin": "center" +}), /* @__PURE__ */React__namespace.createElement("circle", { + cx: 6, + cy: 6, + r: 1, + fill: "currentColor" +})); +const SvgKeyboardShortcut = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 19 18", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z", + stroke: "currentColor", + strokeWidth: 1.125, + strokeLinecap: "round", + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z", + stroke: "currentColor", + strokeWidth: 1.125, + strokeLinecap: "round", + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z", + stroke: "currentColor", + strokeWidth: 1.125, + strokeLinecap: "round", + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z", + stroke: "currentColor", + strokeWidth: 1.125, + strokeLinecap: "round", + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z", + stroke: "currentColor", + strokeWidth: 1.125, + strokeLinecap: "round", + strokeLinejoin: "round" +})); +const SvgMagnifyingGlass = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 13 13", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("circle", { + cx: 5, + cy: 5, + r: 4.35, + stroke: "currentColor", + strokeWidth: 1.3 +}), /* @__PURE__ */React__namespace.createElement("line", { + x1: 8.45962, + y1: 8.54038, + x2: 11.7525, + y2: 11.8333, + stroke: "currentColor", + strokeWidth: 1.3 +})); +const SvgMerge = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "-2 -2 22 22", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M6 4.5L9 7.5L12 4.5", + stroke: "currentColor", + strokeWidth: 1.5 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M12 13.5L9 10.5L6 13.5", + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgPen = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z", + fill: "currentColor" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M11.5 4.5L9.5 2.5", + stroke: "currentColor", + strokeWidth: 1.4026, + strokeLinecap: "round", + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M5.5 10.5L3.5 8.5", + stroke: "currentColor", + strokeWidth: 1.4026, + strokeLinecap: "round", + strokeLinejoin: "round" +})); +const SvgPlay = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 16 18", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z", + fill: "currentColor" +})); +const SvgPlus = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 10 16", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z" +})); +const SvgPrettify = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + width: 25, + height: 25, + viewBox: "0 0 25 25", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M10.2852 24.0745L13.7139 18.0742", + stroke: "currentColor", + strokeWidth: 1.5625 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M14.5742 24.0749L17.1457 19.7891", + stroke: "currentColor", + strokeWidth: 1.5625 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735", + stroke: "currentColor", + strokeWidth: 1.5625 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z", + stroke: "currentColor", + strokeWidth: 1.5625, + strokeLinejoin: "round" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z", + stroke: "currentColor", + strokeWidth: 1.5625, + strokeLinejoin: "round" +})); +const SvgReload = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 16 16", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M4.75 9.25H1.25V12.75", + stroke: "currentColor", + strokeWidth: 1, + strokeLinecap: "square" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M11.25 6.75H14.75V3.25", + stroke: "currentColor", + strokeWidth: 1, + strokeLinecap: "square" +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513", + stroke: "currentColor", + strokeWidth: 1 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487", + stroke: "currentColor", + strokeWidth: 1 +})); +const SvgRootType = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 13 13", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 0.6, + y: 0.6, + width: 11.8, + height: 11.8, + rx: 5.9, + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("path", { + d: "M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5", + stroke: "currentColor", + strokeWidth: 1.2 +})); +const SvgSettings = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 21 20", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z", + fill: "currentColor" +})); +const SvgStarFilled = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", + fill: "currentColor", + stroke: "currentColor" +})); +const SvgStar = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", + stroke: "currentColor", + strokeWidth: 1.5 +})); +const SvgStop = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 16 16", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + width: 16, + height: 16, + rx: 2, + fill: "currentColor" +})); +const SvgTrash = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + width: "1em", + height: "5em", + xmlns: "http://www.w3.org/2000/svg", + fillRule: "evenodd", + "aria-hidden": "true", + viewBox: "0 0 23 23", + style: { + height: "1.5em" + }, + clipRule: "evenodd", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("path", { + d: "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z", + fill: "currentColor", + strokeWidth: 0.25, + stroke: "currentColor" +})); +const SvgType = ({ + title, + titleId, + ...props +}) => /* @__PURE__ */React__namespace.createElement("svg", { + height: "1em", + viewBox: "0 0 13 13", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-labelledby": titleId, + ...props +}, title ? /* @__PURE__ */React__namespace.createElement("title", { + id: titleId +}, title) : null, /* @__PURE__ */React__namespace.createElement("rect", { + x: 0.6, + y: 0.6, + width: 11.8, + height: 11.8, + rx: 5.9, + stroke: "currentColor", + strokeWidth: 1.2 +}), /* @__PURE__ */React__namespace.createElement("rect", { + x: 5.5, + y: 5.5, + width: 2, + height: 2, + rx: 1, + fill: "currentColor" +})); +const ArgumentIcon = generateIcon(SvgArgument); +const ChevronDownIcon = generateIcon(SvgChevronDown); +const ChevronLeftIcon = generateIcon(SvgChevronLeft); +const ChevronUpIcon = generateIcon(SvgChevronUp); +const CloseIcon = generateIcon(SvgClose); +const CopyIcon = generateIcon(SvgCopy); +const DeprecatedArgumentIcon = generateIcon(SvgDeprecatedArgument); +const DeprecatedEnumValueIcon = generateIcon(SvgDeprecatedEnumValue); +const DeprecatedFieldIcon = generateIcon(SvgDeprecatedField); +const DirectiveIcon = generateIcon(SvgDirective); +const DocsFilledIcon = generateIcon(SvgDocsFilled); +const DocsIcon = generateIcon(SvgDocs); +const EnumValueIcon = generateIcon(SvgEnumValue); +const FieldIcon = generateIcon(SvgField); +const HistoryIcon = generateIcon(SvgHistory); +const ImplementsIcon = generateIcon(SvgImplements); +const KeyboardShortcutIcon = generateIcon(SvgKeyboardShortcut); +const MagnifyingGlassIcon = generateIcon(SvgMagnifyingGlass); +const MergeIcon = generateIcon(SvgMerge); +const PenIcon = generateIcon(SvgPen); +const PlayIcon = generateIcon(SvgPlay); +const PlusIcon = generateIcon(SvgPlus); +const PrettifyIcon = generateIcon(SvgPrettify); +const ReloadIcon = generateIcon(SvgReload); +const RootTypeIcon = generateIcon(SvgRootType); +const SettingsIcon = generateIcon(SvgSettings); +const StarFilledIcon = generateIcon(SvgStarFilled); +const StarIcon = generateIcon(SvgStar); +const StopIcon = generateIcon(SvgStop); +const TrashIcon = generateIcon(SvgTrash); +const TypeIcon = generateIcon(SvgType); +function generateIcon(RawComponent) { + const title = RawComponent.name.replace("Svg", "").replaceAll(/([A-Z])/g, " $1").trimStart().toLowerCase() + " icon"; + function IconComponent(props) { + const $ = reactCompilerRuntime.c(2); + let t0; + if ($[0] !== props) { + t0 = /* @__PURE__ */jsxRuntime.jsx(RawComponent, { + title, + ...props + }); + $[0] = props; + $[1] = t0; + } else { + t0 = $[1]; + } + return t0; } - state.line = startLine + 1; - const token = state.push('hr', 'hr', 0); - token.map = [startLine, state.line]; - token.markup = Array(cnt + 1).join(String.fromCharCode(marker)); - return true; + IconComponent.displayName = RawComponent.name; + return IconComponent; } - -// Lists - -// Search `[-+*][\n ]`, returns next pos after marker on success -// or -1 on fail. -function skipBulletListMarker(state, startLine) { - const max = state.eMarks[startLine]; - let pos = state.bMarks[startLine] + state.tShift[startLine]; - const marker = state.src.charCodeAt(pos++); - // Check bullet - if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x2B /* + */) { - return -1; +const UnStyledButton = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-un-styled", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== props || $[3] !== ref || $[4] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx("button", { + ...props, + ref, + className: t0 + }); + $[2] = props; + $[3] = ref; + $[4] = t0; + $[5] = t1; + } else { + t1 = $[5]; } - if (pos < max) { - const ch = state.src.charCodeAt(pos); - if (!isSpace(ch)) { - // " -test " - is not a list item - return -1; - } + return t1; +}); +UnStyledButton.displayName = "UnStyledButton"; +const Button$1 = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(7); + let t0; + if ($[0] !== props.className || $[1] !== props.state) { + t0 = clsx.clsx("graphiql-button", { + success: "graphiql-button-success", + error: "graphiql-button-error" + }[props.state], props.className); + $[0] = props.className; + $[1] = props.state; + $[2] = t0; + } else { + t0 = $[2]; + } + let t1; + if ($[3] !== props || $[4] !== ref || $[5] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx("button", { + ...props, + ref, + className: t0 + }); + $[3] = props; + $[4] = ref; + $[5] = t0; + $[6] = t1; + } else { + t1 = $[6]; } - return pos; + return t1; +}); +Button$1.displayName = "Button"; +const ButtonGroup = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-button-group", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== props || $[3] !== ref || $[4] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx("div", { + ...props, + ref, + className: t0 + }); + $[2] = props; + $[3] = ref; + $[4] = t0; + $[5] = t1; + } else { + t1 = $[5]; + } + return t1; +}); +ButtonGroup.displayName = "ButtonGroup"; +const createComponentGroup = (root, children) => Object.entries(children).reduce((r, [key, value]) => { + r[key] = value; + return r; +}, root); +const DialogClose = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(8); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-dialog-close", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + let t2; + if ($[2] === Symbol.for("react.memo_cache_sentinel")) { + t1 = /* @__PURE__ */jsxRuntime.jsx(reactVisuallyHidden.Root, { + children: "Close dialog" + }); + t2 = /* @__PURE__ */jsxRuntime.jsx(CloseIcon, {}); + $[2] = t1; + $[3] = t2; + } else { + t1 = $[2]; + t2 = $[3]; + } + let t3; + if ($[4] !== props || $[5] !== ref || $[6] !== t0) { + t3 = /* @__PURE__ */jsxRuntime.jsx(D__namespace.Close, { + asChild: true, + children: /* @__PURE__ */jsxRuntime.jsxs(UnStyledButton, { + ...props, + ref, + type: "button", + className: t0, + children: [t1, t2] + }) + }); + $[4] = props; + $[5] = ref; + $[6] = t0; + $[7] = t3; + } else { + t3 = $[7]; + } + return t3; +}); +DialogClose.displayName = "Dialog.Close"; +function DialogRoot(t0) { + const $ = reactCompilerRuntime.c(9); + let children; + let props; + if ($[0] !== t0) { + ({ + children, + ...props + } = t0); + $[0] = t0; + $[1] = children; + $[2] = props; + } else { + children = $[1]; + props = $[2]; + } + let t1; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t1 = /* @__PURE__ */jsxRuntime.jsx(D__namespace.Overlay, { + className: "graphiql-dialog-overlay" + }); + $[3] = t1; + } else { + t1 = $[3]; + } + let t2; + if ($[4] !== children) { + t2 = /* @__PURE__ */jsxRuntime.jsxs(D__namespace.Portal, { + children: [t1, /* @__PURE__ */jsxRuntime.jsx(D__namespace.Content, { + className: "graphiql-dialog", + children + })] + }); + $[4] = children; + $[5] = t2; + } else { + t2 = $[5]; + } + let t3; + if ($[6] !== props || $[7] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsx(D__namespace.Root, { + ...props, + children: t2 + }); + $[6] = props; + $[7] = t2; + $[8] = t3; + } else { + t3 = $[8]; + } + return t3; } - -// Search `\d+[.)][\n ]`, returns next pos after marker on success -// or -1 on fail. -function skipOrderedListMarker(state, startLine) { - const start = state.bMarks[startLine] + state.tShift[startLine]; - const max = state.eMarks[startLine]; - let pos = start; - - // List marker should have at least 2 chars (digit + dot) - if (pos + 1 >= max) { - return -1; +const Dialog = createComponentGroup(DialogRoot, { + Close: DialogClose, + Title: D__namespace.Title, + Trigger: D__namespace.Trigger, + Description: D__namespace.Description +}); +const Button = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-un-styled", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== props || $[3] !== ref || $[4] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx(reactDropdownMenu.Trigger, { + asChild: true, + children: /* @__PURE__ */jsxRuntime.jsx("button", { + ...props, + ref, + className: t0 + }) + }); + $[2] = props; + $[3] = ref; + $[4] = t0; + $[5] = t1; + } else { + t1 = $[5]; } - let ch = state.src.charCodeAt(pos++); - if (ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */) { - return -1; + return t1; +}); +Button.displayName = "DropdownMenuButton"; +function Content(t0) { + const $ = reactCompilerRuntime.c(14); + let children; + let className; + let props; + let t1; + let t2; + if ($[0] !== t0) { + ({ + children, + align: t1, + sideOffset: t2, + className, + ...props + } = t0); + $[0] = t0; + $[1] = children; + $[2] = className; + $[3] = props; + $[4] = t1; + $[5] = t2; + } else { + children = $[1]; + className = $[2]; + props = $[3]; + t1 = $[4]; + t2 = $[5]; + } + const align = t1 === void 0 ? "start" : t1; + const sideOffset = t2 === void 0 ? 5 : t2; + let t3; + if ($[6] !== className) { + t3 = clsx.clsx("graphiql-dropdown-content", className); + $[6] = className; + $[7] = t3; + } else { + t3 = $[7]; + } + let t4; + if ($[8] !== align || $[9] !== children || $[10] !== props || $[11] !== sideOffset || $[12] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsx(reactDropdownMenu.Portal, { + children: /* @__PURE__ */jsxRuntime.jsx(reactDropdownMenu.Content, { + align, + sideOffset, + className: t3, + ...props, + children + }) + }); + $[8] = align; + $[9] = children; + $[10] = props; + $[11] = sideOffset; + $[12] = t3; + $[13] = t4; + } else { + t4 = $[13]; } - for (;;) { - // EOL -> fail - if (pos >= max) { - return -1; - } - ch = state.src.charCodeAt(pos++); - if (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) { - // List marker should have no more than 9 digits - // (prevents integer overflow in browsers) - if (pos - start >= 10) { - return -1; + return t4; +} +const Item = ({ + className, + children, + ...props +}) => /* @__PURE__ */jsxRuntime.jsx(reactDropdownMenu.Item, { + className: clsx.clsx("graphiql-dropdown-item", className), + ...props, + children +}); +const DropdownMenu = createComponentGroup(reactDropdownMenu.Root, { + Button, + Item, + Content +}); +const markdown = new MarkdownIt({ + breaks: true, + linkify: true +}); +const MarkdownContent = React.forwardRef((t0, ref) => { + const $ = reactCompilerRuntime.c(18); + let children; + let onlyShowFirstChild; + let props; + let type; + if ($[0] !== t0) { + ({ + children, + onlyShowFirstChild, + type, + ...props + } = t0); + $[0] = t0; + $[1] = children; + $[2] = onlyShowFirstChild; + $[3] = props; + $[4] = type; + } else { + children = $[1]; + onlyShowFirstChild = $[2]; + props = $[3]; + type = $[4]; + } + const t1 = `graphiql-markdown-${type}`; + const t2 = onlyShowFirstChild && "graphiql-markdown-preview"; + let t3; + if ($[5] !== props.className || $[6] !== t1 || $[7] !== t2) { + t3 = clsx.clsx(t1, t2, props.className); + $[5] = props.className; + $[6] = t1; + $[7] = t2; + $[8] = t3; + } else { + t3 = $[8]; + } + let t4; + if ($[9] !== children) { + t4 = markdown.render(children); + $[9] = children; + $[10] = t4; + } else { + t4 = $[10]; + } + let t5; + if ($[11] !== t4) { + t5 = { + __html: t4 + }; + $[11] = t4; + $[12] = t5; + } else { + t5 = $[12]; + } + let t6; + if ($[13] !== props || $[14] !== ref || $[15] !== t3 || $[16] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsx("div", { + ...props, + ref, + className: t3, + dangerouslySetInnerHTML: t5 + }); + $[13] = props; + $[14] = ref; + $[15] = t3; + $[16] = t5; + $[17] = t6; + } else { + t6 = $[17]; + } + return t6; +}); +MarkdownContent.displayName = "MarkdownContent"; +const Spinner = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-spinner", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== props || $[3] !== ref || $[4] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx("div", { + ...props, + ref, + className: t0 + }); + $[2] = props; + $[3] = ref; + $[4] = t0; + $[5] = t1; + } else { + t1 = $[5]; + } + return t1; +}); +Spinner.displayName = "Spinner"; +function TooltipRoot(t0) { + const $ = reactCompilerRuntime.c(10); + const { + children, + align: t1, + side: t2, + sideOffset: t3, + label + } = t0; + const align = t1 === void 0 ? "start" : t1; + const side = t2 === void 0 ? "bottom" : t2; + const sideOffset = t3 === void 0 ? 5 : t3; + let t4; + if ($[0] !== children) { + t4 = /* @__PURE__ */jsxRuntime.jsx(T__namespace.Trigger, { + asChild: true, + children + }); + $[0] = children; + $[1] = t4; + } else { + t4 = $[1]; + } + let t5; + if ($[2] !== align || $[3] !== label || $[4] !== side || $[5] !== sideOffset) { + t5 = /* @__PURE__ */jsxRuntime.jsx(T__namespace.Portal, { + children: /* @__PURE__ */jsxRuntime.jsx(T__namespace.Content, { + className: "graphiql-tooltip", + align, + side, + sideOffset, + children: label + }) + }); + $[2] = align; + $[3] = label; + $[4] = side; + $[5] = sideOffset; + $[6] = t5; + } else { + t5 = $[6]; + } + let t6; + if ($[7] !== t4 || $[8] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsxs(T__namespace.Root, { + children: [t4, t5] + }); + $[7] = t4; + $[8] = t5; + $[9] = t6; + } else { + t6 = $[9]; + } + return t6; +} +const Tooltip = createComponentGroup(TooltipRoot, { + Provider: T__namespace.Provider +}); +const TabRoot = React.forwardRef((t0, ref) => { + const $ = reactCompilerRuntime.c(16); + let children; + let className; + let isActive; + let props; + let value; + if ($[0] !== t0) { + ({ + isActive, + value, + children, + className, + ...props + } = t0); + $[0] = t0; + $[1] = children; + $[2] = className; + $[3] = isActive; + $[4] = props; + $[5] = value; + } else { + children = $[1]; + className = $[2]; + isActive = $[3]; + props = $[4]; + value = $[5]; + } + const t1 = isActive ? "true" : void 0; + const t2 = isActive && "graphiql-tab-active"; + let t3; + if ($[6] !== className || $[7] !== t2) { + t3 = clsx.clsx("graphiql-tab", t2, className); + $[6] = className; + $[7] = t2; + $[8] = t3; + } else { + t3 = $[8]; + } + let t4; + if ($[9] !== children || $[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== t3 || $[14] !== value) { + t4 = /* @__PURE__ */jsxRuntime.jsx(framerMotion.Reorder.Item, { + ...props, + ref, + value, + "aria-selected": t1, + role: "tab", + className: t3, + children + }); + $[9] = children; + $[10] = props; + $[11] = ref; + $[12] = t1; + $[13] = t3; + $[14] = value; + $[15] = t4; + } else { + t4 = $[15]; + } + return t4; +}); +TabRoot.displayName = "Tab"; +const TabButton = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-tab-button", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== props || $[3] !== ref || $[4] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + ...props, + ref, + type: "button", + className: t0, + children: props.children + }); + $[2] = props; + $[3] = ref; + $[4] = t0; + $[5] = t1; + } else { + t1 = $[5]; + } + return t1; +}); +TabButton.displayName = "Tab.Button"; +const TabClose = React.forwardRef((props, ref) => { + const $ = reactCompilerRuntime.c(7); + let t0; + if ($[0] !== props.className) { + t0 = clsx.clsx("graphiql-tab-close", props.className); + $[0] = props.className; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] === Symbol.for("react.memo_cache_sentinel")) { + t1 = /* @__PURE__ */jsxRuntime.jsx(CloseIcon, {}); + $[2] = t1; + } else { + t1 = $[2]; + } + let t2; + if ($[3] !== props || $[4] !== ref || $[5] !== t0) { + t2 = /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label: "Close Tab", + children: /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + "aria-label": "Close Tab", + ...props, + ref, + type: "button", + className: t0, + children: t1 + }) + }); + $[3] = props; + $[4] = ref; + $[5] = t0; + $[6] = t2; + } else { + t2 = $[6]; + } + return t2; +}); +TabClose.displayName = "Tab.Close"; +const Tab = createComponentGroup(TabRoot, { + Button: TabButton, + Close: TabClose +}); +const Tabs = React.forwardRef((t0, ref) => { + const $ = reactCompilerRuntime.c(15); + let children; + let className; + let onReorder; + let props; + let values; + if ($[0] !== t0) { + ({ + values, + onReorder, + children, + className, + ...props + } = t0); + $[0] = t0; + $[1] = children; + $[2] = className; + $[3] = onReorder; + $[4] = props; + $[5] = values; + } else { + children = $[1]; + className = $[2]; + onReorder = $[3]; + props = $[4]; + values = $[5]; + } + let t1; + if ($[6] !== className) { + t1 = clsx.clsx("graphiql-tabs", className); + $[6] = className; + $[7] = t1; + } else { + t1 = $[7]; + } + let t2; + if ($[8] !== children || $[9] !== onReorder || $[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== values) { + t2 = /* @__PURE__ */jsxRuntime.jsx(framerMotion.Reorder.Group, { + ...props, + ref, + values, + onReorder, + axis: "x", + role: "tablist", + className: t1, + children + }); + $[8] = children; + $[9] = onReorder; + $[10] = props; + $[11] = ref; + $[12] = t1; + $[13] = values; + $[14] = t2; + } else { + t2 = $[14]; + } + return t2; +}); +Tabs.displayName = "Tabs"; +const HistoryContext = createNullableContext("HistoryContext"); +function HistoryContextProvider(t0) { + const $ = reactCompilerRuntime.c(11); + const { + maxHistoryLength: t1, + children + } = t0; + const maxHistoryLength = t1 === void 0 ? DEFAULT_HISTORY_LENGTH : t1; + const storage = useStorageContext(); + let t2; + if ($[0] !== maxHistoryLength || $[1] !== storage) { + t2 = () => new toolkit.HistoryStore(storage || new toolkit.StorageAPI(null), maxHistoryLength); + $[0] = maxHistoryLength; + $[1] = storage; + $[2] = t2; + } else { + t2 = $[2]; + } + const [historyStore] = React.useState(t2); + let t3; + if ($[3] !== historyStore.queries) { + t3 = () => historyStore.queries || []; + $[3] = historyStore.queries; + $[4] = t3; + } else { + t3 = $[4]; + } + const [items, setItems] = React.useState(t3); + let t4; + if ($[5] !== historyStore || $[6] !== items) { + t4 = { + addToHistory(operation) { + historyStore.updateHistory(operation); + setItems(historyStore.queries); + }, + editLabel(operation_0, index) { + historyStore.editLabel(operation_0, index); + setItems(historyStore.queries); + }, + items, + toggleFavorite(operation_1) { + historyStore.toggleFavorite(operation_1); + setItems(historyStore.queries); + }, + setActive: _temp$8, + deleteFromHistory(item_0, clearFavorites) { + historyStore.deleteHistory(item_0, clearFavorites); + setItems(historyStore.queries); } - continue; - } - - // found valid marker - if (ch === 0x29 /* ) */ || ch === 0x2e /* . */) { - break; - } - return -1; + }; + $[5] = historyStore; + $[6] = items; + $[7] = t4; + } else { + t4 = $[7]; } - if (pos < max) { - ch = state.src.charCodeAt(pos); - if (!isSpace(ch)) { - // " 1.test " - is not a list item - return -1; - } + const value = t4; + let t5; + if ($[8] !== children || $[9] !== value) { + t5 = /* @__PURE__ */jsxRuntime.jsx(HistoryContext.Provider, { + value, + children + }); + $[8] = children; + $[9] = value; + $[10] = t5; + } else { + t5 = $[10]; } - return pos; + return t5; } -function markTightParagraphs(state, idx) { - const level = state.level + 2; - for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) { - if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') { - state.tokens[i + 2].hidden = true; - state.tokens[i].hidden = true; - i += 2; - } +function _temp$8(item) { + return item; +} +const useHistoryContext = createContextHook(HistoryContext); +const DEFAULT_HISTORY_LENGTH = 20; +function History() { + const { + items: all, + deleteFromHistory + } = useHistoryContext({ + nonNull: true + }); + let items = all.slice().map((item, i) => ({ + ...item, + index: i + })).reverse(); + const favorites = items.filter(item_0 => item_0.favorite); + if (favorites.length) { + items = items.filter(item_1 => !item_1.favorite); } + const [clearStatus, setClearStatus] = React.useState(null); + React.useEffect(() => { + if (clearStatus) { + setTimeout(() => { + setClearStatus(null); + }, 2e3); + } + }, [clearStatus]); + const handleClearStatus = () => { + try { + for (const item_2 of items) { + deleteFromHistory(item_2, true); + } + setClearStatus("success"); + } catch { + setClearStatus("error"); + } + }; + return /* @__PURE__ */jsxRuntime.jsxs("section", { + "aria-label": "History", + className: "graphiql-history", + children: [/* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-history-header", + children: ["History", (clearStatus || items.length > 0) && /* @__PURE__ */jsxRuntime.jsx(Button$1, { + type: "button", + state: clearStatus || void 0, + disabled: !items.length, + onClick: handleClearStatus, + children: { + success: "Cleared", + error: "Failed to Clear" + }[clearStatus] || "Clear" + })] + }), Boolean(favorites.length) && /* @__PURE__ */jsxRuntime.jsx("ul", { + className: "graphiql-history-items", + children: favorites.map(item_3 => /* @__PURE__ */jsxRuntime.jsx(HistoryItem, { + item: item_3 + }, item_3.index)) + }), Boolean(favorites.length) && Boolean(items.length) && /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-history-item-spacer" + }), Boolean(items.length) && /* @__PURE__ */jsxRuntime.jsx("ul", { + className: "graphiql-history-items", + children: items.map(item_4 => /* @__PURE__ */jsxRuntime.jsx(HistoryItem, { + item: item_4 + }, item_4.index)) + })] + }); } -function list(state, startLine, endLine, silent) { - let max, pos, start, token; - let nextLine = startLine; - let tight = true; - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[nextLine] - state.blkIndent >= 4) { - return false; +function HistoryItem(props) { + const $ = reactCompilerRuntime.c(40); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true, + caller: HistoryItem + }; + $[0] = t0; + } else { + t0 = $[0]; } - - // Special case: - // - item 1 - // - item 2 - // - item 3 - // - item 4 - // - this one is a paragraph continuation - if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) { - return false; + const { + editLabel, + toggleFavorite, + deleteFromHistory, + setActive + } = useHistoryContext(t0); + let t1; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: HistoryItem + }; + $[1] = t1; + } else { + t1 = $[1]; } - let isTerminatingParagraph = false; - - // limit conditions when list can interrupt - // a paragraph (validation mode only) - if (silent && state.parentType === 'paragraph') { - // Next list item should still terminate previous list item; - // - // This code can fail if plugins use blkIndent as well as lists, - // but I hope the spec gets fixed long before that happens. - // - if (state.sCount[nextLine] >= state.blkIndent) { - isTerminatingParagraph = true; - } + const { + headerEditor, + queryEditor, + variableEditor + } = useEditorContext(t1); + const inputRef = React.useRef(null); + const buttonRef = React.useRef(null); + const [isEditable, setIsEditable] = React.useState(false); + let t2; + let t3; + if ($[2] !== isEditable) { + t2 = () => { + var _a; + if (isEditable) { + (_a = inputRef.current) == null ? void 0 : _a.focus(); + } + }; + t3 = [isEditable]; + $[2] = isEditable; + $[3] = t2; + $[4] = t3; + } else { + t2 = $[3]; + t3 = $[4]; + } + React.useEffect(t2, t3); + let t4; + if ($[5] !== props.item.label || $[6] !== props.item.operationName || $[7] !== props.item.query) { + t4 = props.item.label || props.item.operationName || formatQuery(props.item.query); + $[5] = props.item.label; + $[6] = props.item.operationName; + $[7] = props.item.query; + $[8] = t4; + } else { + t4 = $[8]; } - - // Detect list type and position after marker - let isOrdered; - let markerValue; - let posAfterMarker; - if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) { - isOrdered = true; - start = state.bMarks[nextLine] + state.tShift[nextLine]; - markerValue = Number(state.src.slice(start, posAfterMarker - 1)); - - // If we're starting a new ordered list right after - // a paragraph, it should start with 1. - if (isTerminatingParagraph && markerValue !== 1) return false; - } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) { - isOrdered = false; + const displayName = t4; + let t5; + if ($[9] !== editLabel || $[10] !== props.item) { + t5 = () => { + var _a; + setIsEditable(false); + const { + index, + ...item + } = props.item; + editLabel({ + ...item, + label: (_a = inputRef.current) == null ? void 0 : _a.value + }, index); + }; + $[9] = editLabel; + $[10] = props.item; + $[11] = t5; } else { - return false; + t5 = $[11]; } - - // If we're starting a new unordered list right after - // a paragraph, first line should not be empty. - if (isTerminatingParagraph) { - if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false; + const handleSave = t5; + let t6; + if ($[12] === Symbol.for("react.memo_cache_sentinel")) { + t6 = () => { + setIsEditable(false); + }; + $[12] = t6; + } else { + t6 = $[12]; } - - // For validation mode we can terminate immediately - if (silent) { - return true; + const handleClose = t6; + let t7; + if ($[13] === Symbol.for("react.memo_cache_sentinel")) { + t7 = e => { + e.stopPropagation(); + setIsEditable(true); + }; + $[13] = t7; + } else { + t7 = $[13]; } - - // We should terminate list on style change. Remember first one to compare. - const markerCharCode = state.src.charCodeAt(posAfterMarker - 1); - - // Start list - const listTokIdx = state.tokens.length; - if (isOrdered) { - token = state.push('ordered_list_open', 'ol', 1); - if (markerValue !== 1) { - token.attrs = [['start', markerValue]]; - } + const handleEditLabel = t7; + let t8; + if ($[14] !== headerEditor || $[15] !== props.item || $[16] !== queryEditor || $[17] !== setActive || $[18] !== variableEditor) { + t8 = () => { + const { + query, + variables, + headers + } = props.item; + queryEditor == null ? void 0 : queryEditor.setValue(query !== null && query !== void 0 ? query : ""); + variableEditor == null ? void 0 : variableEditor.setValue(variables !== null && variables !== void 0 ? variables : ""); + headerEditor == null ? void 0 : headerEditor.setValue(headers !== null && headers !== void 0 ? headers : ""); + setActive(props.item); + }; + $[14] = headerEditor; + $[15] = props.item; + $[16] = queryEditor; + $[17] = setActive; + $[18] = variableEditor; + $[19] = t8; + } else { + t8 = $[19]; + } + const handleHistoryItemClick = t8; + let t9; + if ($[20] !== deleteFromHistory || $[21] !== props.item) { + t9 = e_0 => { + e_0.stopPropagation(); + deleteFromHistory(props.item); + }; + $[20] = deleteFromHistory; + $[21] = props.item; + $[22] = t9; + } else { + t9 = $[22]; + } + const handleDeleteItemFromHistory = t9; + let t10; + if ($[23] !== props.item || $[24] !== toggleFavorite) { + t10 = e_1 => { + e_1.stopPropagation(); + toggleFavorite(props.item); + }; + $[23] = props.item; + $[24] = toggleFavorite; + $[25] = t10; + } else { + t10 = $[25]; + } + const handleToggleFavorite = t10; + const t11 = isEditable && "editable"; + let t12; + if ($[26] !== t11) { + t12 = clsx.clsx("graphiql-history-item", t11); + $[26] = t11; + $[27] = t12; + } else { + t12 = $[27]; + } + let t13; + if ($[28] !== displayName || $[29] !== editLabel || $[30] !== handleDeleteItemFromHistory || $[31] !== handleHistoryItemClick || $[32] !== handleSave || $[33] !== handleToggleFavorite || $[34] !== isEditable || $[35] !== props.item) { + t13 = isEditable ? /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [/* @__PURE__ */jsxRuntime.jsx("input", { + type: "text", + defaultValue: props.item.label, + ref: inputRef, + onKeyDown: e_2 => { + if (e_2.key === "Esc") { + setIsEditable(false); + } else { + if (e_2.key === "Enter") { + setIsEditable(false); + editLabel({ + ...props.item, + label: e_2.currentTarget.value + }); + } + } + }, + placeholder: "Type a label" + }), /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + ref: buttonRef, + onClick: handleSave, + children: "Save" + }), /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + ref: buttonRef, + onClick: handleClose, + children: /* @__PURE__ */jsxRuntime.jsx(CloseIcon, {}) + })] + }) : /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [/* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label: "Set active", + children: /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + className: "graphiql-history-item-label", + onClick: handleHistoryItemClick, + "aria-label": "Set active", + children: displayName + }) + }), /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label: "Edit label", + children: /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + className: "graphiql-history-item-action", + onClick: handleEditLabel, + "aria-label": "Edit label", + children: /* @__PURE__ */jsxRuntime.jsx(PenIcon, { + "aria-hidden": "true" + }) + }) + }), /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label: props.item.favorite ? "Remove favorite" : "Add favorite", + children: /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + className: "graphiql-history-item-action", + onClick: handleToggleFavorite, + "aria-label": props.item.favorite ? "Remove favorite" : "Add favorite", + children: props.item.favorite ? /* @__PURE__ */jsxRuntime.jsx(StarFilledIcon, { + "aria-hidden": "true" + }) : /* @__PURE__ */jsxRuntime.jsx(StarIcon, { + "aria-hidden": "true" + }) + }) + }), /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label: "Delete from history", + children: /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + type: "button", + className: "graphiql-history-item-action", + onClick: handleDeleteItemFromHistory, + "aria-label": "Delete from history", + children: /* @__PURE__ */jsxRuntime.jsx(TrashIcon, { + "aria-hidden": "true" + }) + }) + })] + }); + $[28] = displayName; + $[29] = editLabel; + $[30] = handleDeleteItemFromHistory; + $[31] = handleHistoryItemClick; + $[32] = handleSave; + $[33] = handleToggleFavorite; + $[34] = isEditable; + $[35] = props.item; + $[36] = t13; + } else { + t13 = $[36]; + } + let t14; + if ($[37] !== t12 || $[38] !== t13) { + t14 = /* @__PURE__ */jsxRuntime.jsx("li", { + className: t12, + children: t13 + }); + $[37] = t12; + $[38] = t13; + $[39] = t14; + } else { + t14 = $[39]; + } + return t14; +} +function formatQuery(query) { + return query == null ? void 0 : query.split("\n").map(line => line.replace(/#(.*)/, "")).join(" ").replaceAll("{", " { ").replaceAll("}", " } ").replaceAll(/[\s]{2,}/g, " "); +} +const ExecutionContext = createNullableContext("ExecutionContext"); +function ExecutionContextProvider(t0) { + const $ = reactCompilerRuntime.c(27); + const { + fetcher, + getDefaultFieldNames, + children, + operationName + } = t0; + if (!fetcher) { + throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop."); + } + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: ExecutionContextProvider + }; + $[0] = t1; + } else { + t1 = $[0]; + } + const { + externalFragments, + headerEditor, + queryEditor, + responseEditor, + variableEditor, + updateActiveTabValues + } = useEditorContext(t1); + const history = useHistoryContext(); + let t2; + if ($[1] !== getDefaultFieldNames) { + t2 = { + getDefaultFieldNames, + caller: ExecutionContextProvider + }; + $[1] = getDefaultFieldNames; + $[2] = t2; + } else { + t2 = $[2]; + } + const autoCompleteLeafs = useAutoCompleteLeafs(t2); + const [isFetching, setIsFetching] = React.useState(false); + const [subscription, setSubscription] = React.useState(null); + const queryIdRef = React.useRef(0); + let t3; + if ($[3] !== subscription) { + t3 = () => { + subscription == null ? void 0 : subscription.unsubscribe(); + setIsFetching(false); + setSubscription(null); + }; + $[3] = subscription; + $[4] = t3; + } else { + t3 = $[4]; + } + const stop = t3; + let t4; + if ($[5] !== autoCompleteLeafs || $[6] !== externalFragments || $[7] !== fetcher || $[8] !== headerEditor || $[9] !== history || $[10] !== operationName || $[11] !== queryEditor || $[12] !== responseEditor || $[13] !== stop || $[14] !== subscription || $[15] !== updateActiveTabValues || $[16] !== variableEditor) { + t4 = async () => { + var _ref, _headers2, _queryEditor$document; + if (!queryEditor || !responseEditor) { + return; + } + if (subscription) { + stop(); + return; + } + const setResponse = value => { + responseEditor.setValue(value); + updateActiveTabValues({ + response: value + }); + }; + queryIdRef.current = queryIdRef.current + 1; + const queryId = queryIdRef.current; + let query = autoCompleteLeafs() || queryEditor.getValue(); + const variablesString = variableEditor == null ? void 0 : variableEditor.getValue(); + let variables; + try { + variables = tryParseJsonObject({ + json: variablesString, + errorMessageParse: "Variables are invalid JSON", + errorMessageType: "Variables are not a JSON object." + }); + } catch (t52) { + const error = t52; + setResponse(error instanceof Error ? error.message : `${error}`); + return; + } + const headersString = headerEditor == null ? void 0 : headerEditor.getValue(); + let headers; + try { + headers = tryParseJsonObject({ + json: headersString, + errorMessageParse: "Headers are invalid JSON", + errorMessageType: "Headers are not a JSON object." + }); + } catch (t62) { + const error_0 = t62; + setResponse(error_0 instanceof Error ? error_0.message : `${error_0}`); + return; + } + if (externalFragments) { + const fragmentDependencies = queryEditor.documentAST ? graphqlLanguageService.getFragmentDependenciesForAST(queryEditor.documentAST, externalFragments) : []; + if (fragmentDependencies.length > 0) { + query = query + ("\n" + fragmentDependencies.map(_temp$7).join("\n")); + } + } + setResponse(""); + setIsFetching(true); + const opName = (_ref = operationName !== null && operationName !== void 0 ? operationName : queryEditor.operationName) !== null && _ref !== void 0 ? _ref : void 0; + history == null ? void 0 : history.addToHistory({ + query, + variables: variablesString, + headers: headersString, + operationName: opName + }); + const _headers = (_headers2 = headers) !== null && _headers2 !== void 0 ? _headers2 : void 0; + const documentAST = (_queryEditor$document = queryEditor.documentAST) !== null && _queryEditor$document !== void 0 ? _queryEditor$document : void 0; + try { + const fullResponse = {}; + const handleResponse = result => { + if (queryId !== queryIdRef.current) { + return; + } + let maybeMultipart = Array.isArray(result) ? result : false; + if (!maybeMultipart && typeof result === "object" && result !== null && "hasNext" in result) { + maybeMultipart = [result]; + } + if (maybeMultipart) { + for (const part of maybeMultipart) { + mergeIncrementalResult(fullResponse, part); + } + setIsFetching(false); + setResponse(toolkit.formatResult(fullResponse)); + } else { + const response = toolkit.formatResult(result); + setIsFetching(false); + setResponse(response); + } + }; + const fetch2 = fetcher({ + query, + variables, + operationName: opName + }, { + headers: _headers, + documentAST + }); + const value_0 = await Promise.resolve(fetch2); + if (toolkit.isObservable(value_0)) { + setSubscription(value_0.subscribe({ + next(result_0) { + handleResponse(result_0); + }, + error(error_2) { + setIsFetching(false); + if (error_2) { + setResponse(toolkit.formatError(error_2)); + } + setSubscription(null); + }, + complete() { + setIsFetching(false); + setSubscription(null); + } + })); + } else { + if (toolkit.isAsyncIterable(value_0)) { + setSubscription({ + unsubscribe: () => { + var _a, _b; + return (_b = (_a = value_0[Symbol.asyncIterator]()).return) == null ? void 0 : _b.call(_a); + } + }); + await handleAsyncResults(handleResponse, value_0); + setIsFetching(false); + setSubscription(null); + } else { + handleResponse(value_0); + } + } + } catch (t72) { + const error_1 = t72; + setIsFetching(false); + setResponse(toolkit.formatError(error_1)); + setSubscription(null); + } + }; + $[5] = autoCompleteLeafs; + $[6] = externalFragments; + $[7] = fetcher; + $[8] = headerEditor; + $[9] = history; + $[10] = operationName; + $[11] = queryEditor; + $[12] = responseEditor; + $[13] = stop; + $[14] = subscription; + $[15] = updateActiveTabValues; + $[16] = variableEditor; + $[17] = t4; + } else { + t4 = $[17]; + } + const run = t4; + const isSubscribed = Boolean(subscription); + const t5 = operationName !== null && operationName !== void 0 ? operationName : null; + let t6; + if ($[18] !== isFetching || $[19] !== isSubscribed || $[20] !== run || $[21] !== stop || $[22] !== t5) { + t6 = { + isFetching, + isSubscribed, + operationName: t5, + run, + stop + }; + $[18] = isFetching; + $[19] = isSubscribed; + $[20] = run; + $[21] = stop; + $[22] = t5; + $[23] = t6; + } else { + t6 = $[23]; + } + const value_1 = t6; + let t7; + if ($[24] !== children || $[25] !== value_1) { + t7 = /* @__PURE__ */jsxRuntime.jsx(ExecutionContext.Provider, { + value: value_1, + children + }); + $[24] = children; + $[25] = value_1; + $[26] = t7; } else { - token = state.push('bullet_list_open', 'ul', 1); + t7 = $[26]; } - const listLines = [nextLine, 0]; - token.map = listLines; - token.markup = String.fromCharCode(markerCharCode); - - // - // Iterate list items - // - - let prevEmptyEnd = false; - const terminatorRules = state.md.block.ruler.getRules('list'); - const oldParentType = state.parentType; - state.parentType = 'list'; - while (nextLine < endLine) { - pos = posAfterMarker; - max = state.eMarks[nextLine]; - const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]); - let offset = initial; - while (pos < max) { - const ch = state.src.charCodeAt(pos); - if (ch === 0x09) { - offset += 4 - (offset + state.bsCount[nextLine]) % 4; - } else if (ch === 0x20) { - offset++; - } else { - break; + return t7; +} +function _temp$7(node) { + return graphql.print(node); +} +async function handleAsyncResults(onResponse, value) { + for await (const result of value) { + onResponse(result); + } +} +const useExecutionContext = createContextHook(ExecutionContext); +function tryParseJsonObject({ + json, + errorMessageParse, + errorMessageType +}) { + let parsed; + try { + parsed = json && json.trim() !== "" ? JSON.parse(json) : void 0; + } catch (error) { + throw new Error(`${errorMessageParse}: ${error instanceof Error ? error.message : error}.`); + } + const isObject = typeof parsed === "object" && parsed !== null && !Array.isArray(parsed); + if (parsed !== void 0 && !isObject) { + throw new Error(errorMessageType); + } + return parsed; +} +const pathsMap = /* @__PURE__ */new WeakMap(); +function mergeIncrementalResult(executionResult, incrementalResult) { + var _incrementalResult$pa; + var _a, _b, _c; + let path = ["data", ...((_incrementalResult$pa = incrementalResult.path) !== null && _incrementalResult$pa !== void 0 ? _incrementalResult$pa : [])]; + for (const result of [executionResult, incrementalResult]) { + if (result.pending) { + let paths = pathsMap.get(executionResult); + if (paths === void 0) { + paths = /* @__PURE__ */new Map(); + pathsMap.set(executionResult, paths); + } + for (const { + id, + path: pendingPath + } of result.pending) { + paths.set(id, ["data", ...pendingPath]); } - pos++; - } - const contentStart = pos; - let indentAfterMarker; - if (contentStart >= max) { - // trimming space in "- \n 3" case, indent is 1 here - indentAfterMarker = 1; - } else { - indentAfterMarker = offset - initial; - } - - // If we have more than 4 spaces, the indent is 1 - // (the rest is just indented code block) - if (indentAfterMarker > 4) { - indentAfterMarker = 1; - } - - // " - test" - // ^^^^^ - calculating total length of this thing - const indent = initial + indentAfterMarker; - - // Run subparser & write tokens - token = state.push('list_item_open', 'li', 1); - token.markup = String.fromCharCode(markerCharCode); - const itemLines = [nextLine, 0]; - token.map = itemLines; - if (isOrdered) { - token.info = state.src.slice(start, posAfterMarker - 1); } - - // change current state, then restore it after parser subcall - const oldTight = state.tight; - const oldTShift = state.tShift[nextLine]; - const oldSCount = state.sCount[nextLine]; - - // - example list - // ^ listIndent position will be here - // ^ blkIndent position will be here - // - const oldListIndent = state.listIndent; - state.listIndent = state.blkIndent; - state.blkIndent = indent; - state.tight = true; - state.tShift[nextLine] = contentStart - state.bMarks[nextLine]; - state.sCount[nextLine] = offset; - if (contentStart >= max && state.isEmpty(nextLine + 1)) { - // workaround for this case - // (list item is empty, list terminates before "foo"): - // ~~~~~~~~ - // - - // - // foo - // ~~~~~~~~ - state.line = Math.min(state.line + 2, endLine); + } + const { + items + } = incrementalResult; + if (items) { + const { + id + } = incrementalResult; + if (id) { + path = (_a = pathsMap.get(executionResult)) == null ? void 0 : _a.get(id); + if (path === void 0) { + throw new Error("Invalid incremental delivery format."); + } + const list = getValue(executionResult, path.join(".")); + list.push(...items); } else { - state.md.block.tokenize(state, nextLine, endLine, true); - } - - // If any of list item is tight, mark list as tight - if (!state.tight || prevEmptyEnd) { - tight = false; - } - // Item become loose if finish with empty line, - // but we should filter last element, because it means list finish - prevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1); - state.blkIndent = state.listIndent; - state.listIndent = oldListIndent; - state.tShift[nextLine] = oldTShift; - state.sCount[nextLine] = oldSCount; - state.tight = oldTight; - token = state.push('list_item_close', 'li', -1); - token.markup = String.fromCharCode(markerCharCode); - nextLine = state.line; - itemLines[1] = nextLine; - if (nextLine >= endLine) { - break; - } - - // - // Try to check if list is terminated or continued. - // - if (state.sCount[nextLine] < state.blkIndent) { - break; - } - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[nextLine] - state.blkIndent >= 4) { - break; - } - - // fail if terminating block found - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; - break; + var _incrementalResult$pa2; + path = ["data", ...((_incrementalResult$pa2 = incrementalResult.path) !== null && _incrementalResult$pa2 !== void 0 ? _incrementalResult$pa2 : [])]; + for (const item of items) { + setValue(executionResult, path.join("."), item); + path[path.length - 1]++; } } - if (terminate) { - break; - } - - // fail if list has another type - if (isOrdered) { - posAfterMarker = skipOrderedListMarker(state, nextLine); - if (posAfterMarker < 0) { - break; + } + const { + data + } = incrementalResult; + if (data) { + const { + id + } = incrementalResult; + if (id) { + path = (_b = pathsMap.get(executionResult)) == null ? void 0 : _b.get(id); + if (path === void 0) { + throw new Error("Invalid incremental delivery format."); } - start = state.bMarks[nextLine] + state.tShift[nextLine]; - } else { - posAfterMarker = skipBulletListMarker(state, nextLine); - if (posAfterMarker < 0) { - break; + const { + subPath + } = incrementalResult; + if (subPath !== void 0) { + path = [...path, ...subPath]; } } - if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { - break; - } + setValue(executionResult, path.join("."), data, { + merge: true + }); } - - // Finalize list - if (isOrdered) { - token = state.push('ordered_list_close', 'ol', -1); - } else { - token = state.push('bullet_list_close', 'ul', -1); + if (incrementalResult.errors) { + executionResult.errors || (executionResult.errors = []); + executionResult.errors.push(...incrementalResult.errors); } - token.markup = String.fromCharCode(markerCharCode); - listLines[1] = nextLine; - state.line = nextLine; - state.parentType = oldParentType; - - // mark paragraphs tight if needed - if (tight) { - markTightParagraphs(state, listTokIdx); + if (incrementalResult.extensions) { + setValue(executionResult, "extensions", incrementalResult.extensions, { + merge: true + }); + } + if (incrementalResult.incremental) { + for (const incrementalSubResult of incrementalResult.incremental) { + mergeIncrementalResult(executionResult, incrementalSubResult); + } + } + if (incrementalResult.completed) { + for (const { + id, + errors + } of incrementalResult.completed) { + (_c = pathsMap.get(executionResult)) == null ? void 0 : _c.delete(id); + if (errors) { + executionResult.errors || (executionResult.errors = []); + executionResult.errors.push(...errors); + } + } } - return true; } -function reference(state, startLine, _endLine, silent) { - let pos = state.bMarks[startLine] + state.tShift[startLine]; - let max = state.eMarks[startLine]; - let nextLine = startLine + 1; - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; +const isMacOs = typeof navigator !== "undefined" && navigator.userAgent.includes("Mac"); +const DEFAULT_EDITOR_THEME = "graphiql"; +const DEFAULT_KEY_MAP = "sublime"; +const commonKeys = { + // Persistent search box in Query Editor + [isMacOs ? "Cmd-F" : "Ctrl-F"]: "findPersistent", + "Cmd-G": "findPersistent", + "Ctrl-G": "findPersistent", + // Editor improvements + "Ctrl-Left": "goSubwordLeft", + "Ctrl-Right": "goSubwordRight", + "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight" +}; +async function importCodeMirror(addons, options) { + const CodeMirror = await Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"))).then(c => + // Depending on bundler and settings the dynamic import either returns a + // function (e.g. parcel) or an object containing a `default` property + typeof c === "function" ? c : c.default); + await Promise.all((options == null ? void 0 : options.useCommonAddons) === false ? addons : [Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/hint/show-hint.js */ "../../../node_modules/codemirror/addon/hint/show-hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/edit/matchbrackets.js */ "../../../node_modules/codemirror/addon/edit/matchbrackets.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/edit/closebrackets.js */ "../../../node_modules/codemirror/addon/edit/closebrackets.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/fold/brace-fold.js */ "../../../node_modules/codemirror/addon/fold/brace-fold.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/fold/foldgutter.js */ "../../../node_modules/codemirror/addon/fold/foldgutter.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/lint/lint.js */ "../../../node_modules/codemirror/addon/lint/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/searchcursor.js */ "../../../node_modules/codemirror/addon/search/searchcursor.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/jump-to-line.js */ "../../../node_modules/codemirror/addon/search/jump-to-line.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/dialog/dialog.js */ "../../../node_modules/codemirror/addon/dialog/dialog.js"))), // @ts-expect-error + Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/keymap/sublime.js */ "../../../node_modules/codemirror/keymap/sublime.js"))), ...addons]); + return CodeMirror; +} +const printDefault = ast => { + if (!ast) { + return ""; + } + return graphql.print(ast); +}; +function DefaultValue(t0) { + const $ = reactCompilerRuntime.c(12); + const { + field + } = t0; + if (!("defaultValue" in field) || field.defaultValue === void 0) { + return null; } - if (state.src.charCodeAt(pos) !== 0x5B /* [ */) { - return false; + const t1 = field.defaultValue; + const t2 = field.type; + let t3; + let t4; + let t5; + let t6; + if ($[0] !== field.defaultValue || $[1] !== field.type) { + t6 = Symbol.for("react.early_return_sentinel"); + bb0: { + const ast = graphql.astFromValue(t1, t2); + if (!ast) { + t6 = null; + break bb0; + } + t5 = " = "; + t3 = "graphiql-doc-explorer-default-value"; + t4 = printDefault(ast); + } + $[0] = field.defaultValue; + $[1] = field.type; + $[2] = t3; + $[3] = t4; + $[4] = t5; + $[5] = t6; + } else { + t3 = $[2]; + t4 = $[3]; + t5 = $[4]; + t6 = $[5]; + } + if (t6 !== Symbol.for("react.early_return_sentinel")) { + return t6; + } + let t7; + if ($[6] !== t3 || $[7] !== t4) { + t7 = /* @__PURE__ */jsxRuntime.jsx("span", { + className: t3, + children: t4 + }); + $[6] = t3; + $[7] = t4; + $[8] = t7; + } else { + t7 = $[8]; } - function getNextLine(nextLine) { - const endLine = state.lineMax; - if (nextLine >= endLine || state.isEmpty(nextLine)) { - // empty line or end of input - return null; - } - let isContinuation = false; - - // this would be a code block normally, but after paragraph - // it's considered a lazy continuation regardless of what's there - if (state.sCount[nextLine] - state.blkIndent > 3) { - isContinuation = true; - } - - // quirk for blockquotes, this line should already be checked by that rule - if (state.sCount[nextLine] < 0) { - isContinuation = true; - } - if (!isContinuation) { - const terminatorRules = state.md.block.ruler.getRules('reference'); - const oldParentType = state.parentType; - state.parentType = 'reference'; - - // Some tags can terminate paragraph without empty line. - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; - break; - } - } - state.parentType = oldParentType; - if (terminate) { - // terminated by another block - return null; + let t8; + if ($[9] !== t5 || $[10] !== t7) { + t8 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t5, t7] + }); + $[9] = t5; + $[10] = t7; + $[11] = t8; + } else { + t8 = $[11]; + } + return t8; +} +const SchemaContext = createNullableContext("SchemaContext"); +function SchemaContextProvider(t0) { + const $ = reactCompilerRuntime.c(38); + let fetcher; + let onSchemaChange; + let props; + if ($[0] !== t0) { + ({ + fetcher, + onSchemaChange, + ...props + } = t0); + $[0] = t0; + $[1] = fetcher; + $[2] = onSchemaChange; + $[3] = props; + } else { + fetcher = $[1]; + onSchemaChange = $[2]; + props = $[3]; + } + if (!fetcher) { + throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop."); + } + let t1; + if ($[4] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: SchemaContextProvider + }; + $[4] = t1; + } else { + t1 = $[4]; + } + const { + initialHeaders, + headerEditor + } = useEditorContext(t1); + const [schema, setSchema] = React.useState(); + const [isFetching, setIsFetching] = React.useState(false); + const [fetchError, setFetchError] = React.useState(null); + const counterRef = React.useRef(0); + let t2; + let t3; + if ($[5] !== props.schema) { + t2 = () => { + setSchema(graphql.isSchema(props.schema) || props.schema == null ? props.schema : void 0); + counterRef.current = counterRef.current + 1; + }; + t3 = [props.schema]; + $[5] = props.schema; + $[6] = t2; + $[7] = t3; + } else { + t2 = $[6]; + t3 = $[7]; + } + React.useEffect(t2, t3); + const headersRef = React.useRef(initialHeaders); + let t4; + if ($[8] !== headerEditor) { + t4 = () => { + if (headerEditor) { + headersRef.current = headerEditor.getValue(); } - } - const pos = state.bMarks[nextLine] + state.tShift[nextLine]; - const max = state.eMarks[nextLine]; - - // max + 1 explicitly includes the newline - return state.src.slice(pos, max + 1); + }; + $[8] = headerEditor; + $[9] = t4; + } else { + t4 = $[9]; + } + React.useEffect(t4); + let t5; + if ($[10] !== props.inputValueDeprecation || $[11] !== props.introspectionQueryName || $[12] !== props.schemaDescription) { + t5 = { + inputValueDeprecation: props.inputValueDeprecation, + introspectionQueryName: props.introspectionQueryName, + schemaDescription: props.schemaDescription + }; + $[10] = props.inputValueDeprecation; + $[11] = props.introspectionQueryName; + $[12] = props.schemaDescription; + $[13] = t5; + } else { + t5 = $[13]; } - let str = state.src.slice(pos, max + 1); - max = str.length; - let labelEnd = -1; - for (pos = 1; pos < max; pos++) { - const ch = str.charCodeAt(pos); - if (ch === 0x5B /* [ */) { - return false; - } else if (ch === 0x5D /* ] */) { - labelEnd = pos; - break; - } else if (ch === 0x0A /* \n */) { - const lineContent = getNextLine(nextLine); - if (lineContent !== null) { - str += lineContent; - max = str.length; - nextLine++; + const { + introspectionQuery, + introspectionQueryName, + introspectionQuerySansSubscriptions + } = useIntrospectionQuery(t5); + let t6; + if ($[14] !== fetcher || $[15] !== introspectionQuery || $[16] !== introspectionQueryName || $[17] !== introspectionQuerySansSubscriptions || $[18] !== onSchemaChange || $[19] !== props.schema) { + t6 = () => { + if (graphql.isSchema(props.schema) || props.schema === null) { + return; } - } else if (ch === 0x5C /* \ */) { - pos++; - if (pos < max && str.charCodeAt(pos) === 0x0A) { - const lineContent = getNextLine(nextLine); - if (lineContent !== null) { - str += lineContent; - max = str.length; - nextLine++; + const counter = counterRef.current = counterRef.current + 1; + const maybeIntrospectionData = props.schema; + const fetchIntrospectionData = async function fetchIntrospectionData2() { + if (maybeIntrospectionData) { + return maybeIntrospectionData; } - } - } + const parsedHeaders = parseHeaderString(headersRef.current); + if (!parsedHeaders.isValidJSON) { + setFetchError("Introspection failed as headers are invalid."); + return; + } + const fetcherOpts = parsedHeaders.headers ? { + headers: parsedHeaders.headers + } : {}; + const fetch2 = toolkit.fetcherReturnToPromise(fetcher({ + query: introspectionQuery, + operationName: introspectionQueryName + }, fetcherOpts)); + if (!toolkit.isPromise(fetch2)) { + setFetchError("Fetcher did not return a Promise for introspection."); + return; + } + setIsFetching(true); + setFetchError(null); + let result = await fetch2; + if (typeof result !== "object" || result === null || !("data" in result)) { + const fetch22 = toolkit.fetcherReturnToPromise(fetcher({ + query: introspectionQuerySansSubscriptions, + operationName: introspectionQueryName + }, fetcherOpts)); + if (!toolkit.isPromise(fetch22)) { + throw new Error("Fetcher did not return a Promise for introspection."); + } + result = await fetch22; + } + setIsFetching(false); + if ((result == null ? void 0 : result.data) && "__schema" in result.data) { + return result.data; + } + const responseString = typeof result === "string" ? result : toolkit.formatResult(result); + setFetchError(responseString); + }; + fetchIntrospectionData().then(introspectionData => { + if (counter !== counterRef.current || !introspectionData) { + return; + } + try { + const newSchema = graphql.buildClientSchema(introspectionData); + setSchema(newSchema); + if (onSchemaChange) { + onSchemaChange(newSchema); + } + } catch (t72) { + const error = t72; + setFetchError(toolkit.formatError(error)); + } + }).catch(error_0 => { + if (counter !== counterRef.current) { + return; + } + setFetchError(toolkit.formatError(error_0)); + setIsFetching(false); + }); + }; + $[14] = fetcher; + $[15] = introspectionQuery; + $[16] = introspectionQueryName; + $[17] = introspectionQuerySansSubscriptions; + $[18] = onSchemaChange; + $[19] = props.schema; + $[20] = t6; + } else { + t6 = $[20]; + } + const introspect = t6; + let t7; + let t8; + if ($[21] !== introspect) { + t7 = () => { + introspect(); + }; + t8 = [introspect]; + $[21] = introspect; + $[22] = t7; + $[23] = t8; + } else { + t7 = $[22]; + t8 = $[23]; } - if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */) { - return false; + React.useEffect(t7, t8); + let t9; + if ($[24] !== introspect) { + t9 = () => { + const triggerIntrospection = function triggerIntrospection2(event) { + if (event.ctrlKey && event.key === "R") { + introspect(); + } + }; + window.addEventListener("keydown", triggerIntrospection); + return () => { + window.removeEventListener("keydown", triggerIntrospection); + }; + }; + $[24] = introspect; + $[25] = t9; + } else { + t9 = $[25]; + } + React.useEffect(t9); + let t10; + if ($[26] !== props.dangerouslyAssumeSchemaIsValid || $[27] !== schema) { + t10 = !schema || props.dangerouslyAssumeSchemaIsValid ? [] : graphql.validateSchema(schema); + $[26] = props.dangerouslyAssumeSchemaIsValid; + $[27] = schema; + $[28] = t10; + } else { + t10 = $[28]; + } + const validationErrors = t10; + let t11; + if ($[29] !== fetchError || $[30] !== introspect || $[31] !== isFetching || $[32] !== schema || $[33] !== validationErrors) { + t11 = { + fetchError, + introspect, + isFetching, + schema, + validationErrors + }; + $[29] = fetchError; + $[30] = introspect; + $[31] = isFetching; + $[32] = schema; + $[33] = validationErrors; + $[34] = t11; + } else { + t11 = $[34]; } - - // [label]: destination 'title' - // ^^^ skip optional whitespace here - for (pos = labelEnd + 2; pos < max; pos++) { - const ch = str.charCodeAt(pos); - if (ch === 0x0A) { - const lineContent = getNextLine(nextLine); - if (lineContent !== null) { - str += lineContent; - max = str.length; - nextLine++; - } - } else if (isSpace(ch)) ;else { - break; + const value = t11; + let t12; + if ($[35] !== props.children || $[36] !== value) { + t12 = /* @__PURE__ */jsxRuntime.jsx(SchemaContext.Provider, { + value, + children: props.children + }); + $[35] = props.children; + $[36] = value; + $[37] = t12; + } else { + t12 = $[37]; + } + return t12; +} +const useSchemaContext = createContextHook(SchemaContext); +function useIntrospectionQuery({ + inputValueDeprecation, + introspectionQueryName, + schemaDescription +}) { + const queryName = introspectionQueryName || "IntrospectionQuery"; + let query = graphql.getIntrospectionQuery({ + inputValueDeprecation, + schemaDescription + }); + if (introspectionQueryName) { + query = query.replace("query IntrospectionQuery", `query ${queryName}`); + } + const querySansSubscriptions = query.replace("subscriptionType { name }", ""); + return { + introspectionQueryName: queryName, + introspectionQuery: query, + introspectionQuerySansSubscriptions: querySansSubscriptions + }; +} +function parseHeaderString(headersString) { + let headers = null; + let isValidJSON = true; + try { + if (headersString) { + headers = JSON.parse(headersString); } + } catch { + isValidJSON = false; } - - // [label]: destination 'title' - // ^^^^^^^^^^^ parse this - const destRes = state.md.helpers.parseLinkDestination(str, pos, max); - if (!destRes.ok) { - return false; + return { + headers, + isValidJSON + }; +} +const initialNavStackItem = { + name: "Docs" +}; +const ExplorerContext = createNullableContext("ExplorerContext"); +function ExplorerContextProvider(props) { + const $ = reactCompilerRuntime.c(14); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true, + caller: ExplorerContextProvider + }; + $[0] = t0; + } else { + t0 = $[0]; } - const href = state.md.normalizeLink(destRes.str); - if (!state.md.validateLink(href)) { - return false; + const { + schema, + validationErrors + } = useSchemaContext(t0); + let t1; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = [initialNavStackItem]; + $[1] = t1; + } else { + t1 = $[1]; + } + const [navStack, setNavStack] = React.useState(t1); + let t2; + if ($[2] === Symbol.for("react.memo_cache_sentinel")) { + t2 = item => { + setNavStack(currentState => { + const lastItem = currentState.at(-1); + return lastItem.def === item.def ? currentState : [...currentState, item]; + }); + }; + $[2] = t2; + } else { + t2 = $[2]; } - pos = destRes.pos; - - // save cursor state, we could require to rollback later - const destEndPos = pos; - const destEndLineNo = nextLine; - - // [label]: destination 'title' - // ^^^ skipping those spaces - const start = pos; - for (; pos < max; pos++) { - const ch = str.charCodeAt(pos); - if (ch === 0x0A) { - const lineContent = getNextLine(nextLine); - if (lineContent !== null) { - str += lineContent; - max = str.length; - nextLine++; + const push = t2; + let t3; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t3 = () => { + setNavStack(_temp$6); + }; + $[3] = t3; + } else { + t3 = $[3]; + } + const pop = t3; + let t4; + if ($[4] === Symbol.for("react.memo_cache_sentinel")) { + t4 = () => { + setNavStack(_temp2$3); + }; + $[4] = t4; + } else { + t4 = $[4]; + } + const reset = t4; + let t5; + let t6; + if ($[5] !== schema || $[6] !== validationErrors) { + t5 = () => { + if (schema == null || validationErrors.length > 0) { + reset(); + } else { + setNavStack(oldNavStack => { + if (oldNavStack.length === 1) { + return oldNavStack; + } + const newNavStack = [initialNavStackItem]; + let lastEntity = null; + for (const item_0 of oldNavStack) { + if (item_0 === initialNavStackItem) { + continue; + } + if (item_0.def) { + if (graphql.isNamedType(item_0.def)) { + const newType = schema.getType(item_0.def.name); + if (newType) { + newNavStack.push({ + name: item_0.name, + def: newType + }); + lastEntity = newType; + } else { + break; + } + } else { + if (lastEntity === null) { + break; + } else { + if (graphql.isObjectType(lastEntity) || graphql.isInputObjectType(lastEntity)) { + const field = lastEntity.getFields()[item_0.name]; + if (field) { + newNavStack.push({ + name: item_0.name, + def: field + }); + } else { + break; + } + } else { + if (graphql.isScalarType(lastEntity) || graphql.isEnumType(lastEntity) || graphql.isInterfaceType(lastEntity) || graphql.isUnionType(lastEntity)) { + break; + } else { + const field_0 = lastEntity; + const arg = field_0.args.find(a => a.name === item_0.name); + if (arg) { + newNavStack.push({ + name: item_0.name, + def: field_0 + }); + } else { + break; + } + } + } + } + } + } else { + lastEntity = null; + newNavStack.push(item_0); + } + } + return newNavStack; + }); } - } else if (isSpace(ch)) ;else { - break; - } + }; + t6 = [schema, validationErrors]; + $[5] = schema; + $[6] = validationErrors; + $[7] = t5; + $[8] = t6; + } else { + t5 = $[7]; + t6 = $[8]; + } + React.useEffect(t5, t6); + let t7; + if ($[9] !== navStack) { + t7 = { + explorerNavStack: navStack, + push, + pop, + reset + }; + $[9] = navStack; + $[10] = t7; + } else { + t7 = $[10]; } - - // [label]: destination 'title' - // ^^^^^^^ parse this - let titleRes = state.md.helpers.parseLinkTitle(str, pos, max); - while (titleRes.can_continue) { - const lineContent = getNextLine(nextLine); - if (lineContent === null) break; - str += lineContent; - pos = max; - max = str.length; - nextLine++; - titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes); + const value = t7; + let t8; + if ($[11] !== props.children || $[12] !== value) { + t8 = /* @__PURE__ */jsxRuntime.jsx(ExplorerContext.Provider, { + value, + children: props.children + }); + $[11] = props.children; + $[12] = value; + $[13] = t8; + } else { + t8 = $[13]; } - let title; - if (pos < max && start !== pos && titleRes.ok) { - title = titleRes.str; - pos = titleRes.pos; + return t8; +} +function _temp2$3(currentState_1) { + return currentState_1.length === 1 ? currentState_1 : [initialNavStackItem]; +} +function _temp$6(currentState_0) { + return currentState_0.length > 1 ? currentState_0.slice(0, -1) : currentState_0; +} +const useExplorerContext = createContextHook(ExplorerContext); +function renderType(type, renderNamedType) { + if (graphql.isNonNullType(type)) { + return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [renderType(type.ofType, renderNamedType), "!"] + }); + } + if (graphql.isListType(type)) { + return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: ["[", renderType(type.ofType, renderNamedType), "]"] + }); + } + return renderNamedType(type); +} +function TypeLink(props) { + const $ = reactCompilerRuntime.c(6); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true, + caller: TypeLink + }; + $[0] = t0; } else { - title = ''; - pos = destEndPos; - nextLine = destEndLineNo; + t0 = $[0]; } - - // skip trailing spaces until the rest of the line - while (pos < max) { - const ch = str.charCodeAt(pos); - if (!isSpace(ch)) { - break; - } - pos++; + const { + push + } = useExplorerContext(t0); + if (!props.type) { + return null; } - if (pos < max && str.charCodeAt(pos) !== 0x0A) { - if (title) { - // garbage at the end of the line after title, - // but it could still be a valid reference if we roll back - title = ''; - pos = destEndPos; - nextLine = destEndLineNo; - while (pos < max) { - const ch = str.charCodeAt(pos); - if (!isSpace(ch)) { - break; - } - pos++; - } - } + let t1; + if ($[1] !== push) { + t1 = namedType => /* @__PURE__ */jsxRuntime.jsx("a", { + className: "graphiql-doc-explorer-type-name", + onClick: event => { + event.preventDefault(); + push({ + name: namedType.name, + def: namedType + }); + }, + href: "#", + children: namedType.name + }); + $[1] = push; + $[2] = t1; + } else { + t1 = $[2]; + } + let t2; + if ($[3] !== props.type || $[4] !== t1) { + t2 = renderType(props.type, t1); + $[3] = props.type; + $[4] = t1; + $[5] = t2; + } else { + t2 = $[5]; + } + return t2; +} +function Argument(t0) { + const $ = reactCompilerRuntime.c(19); + const { + arg, + showDefaultValue, + inline + } = t0; + let t1; + if ($[0] !== arg.name) { + t1 = /* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-argument-name", + children: arg.name + }); + $[0] = arg.name; + $[1] = t1; + } else { + t1 = $[1]; + } + let t2; + if ($[2] !== arg.type) { + t2 = /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: arg.type + }); + $[2] = arg.type; + $[3] = t2; + } else { + t2 = $[3]; + } + let t3; + if ($[4] !== arg || $[5] !== showDefaultValue) { + t3 = showDefaultValue !== false && /* @__PURE__ */jsxRuntime.jsx(DefaultValue, { + field: arg + }); + $[4] = arg; + $[5] = showDefaultValue; + $[6] = t3; + } else { + t3 = $[6]; + } + let t4; + if ($[7] !== t1 || $[8] !== t2 || $[9] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs("span", { + children: [t1, ": ", t2, t3] + }); + $[7] = t1; + $[8] = t2; + $[9] = t3; + $[10] = t4; + } else { + t4 = $[10]; + } + const definition = t4; + if (inline) { + return definition; + } + let t5; + if ($[11] !== arg.description) { + t5 = arg.description ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + children: arg.description + }) : null; + $[11] = arg.description; + $[12] = t5; + } else { + t5 = $[12]; + } + let t6; + if ($[13] !== arg.deprecationReason) { + t6 = arg.deprecationReason ? /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-argument-deprecation", + children: [/* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-argument-deprecation-label", + children: "Deprecated" + }), /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "deprecation", + children: arg.deprecationReason + })] + }) : null; + $[13] = arg.deprecationReason; + $[14] = t6; + } else { + t6 = $[14]; } - if (pos < max && str.charCodeAt(pos) !== 0x0A) { - // garbage at the end of the line - return false; + let t7; + if ($[15] !== definition || $[16] !== t5 || $[17] !== t6) { + t7 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-argument", + children: [definition, t5, t6] + }); + $[15] = definition; + $[16] = t5; + $[17] = t6; + $[18] = t7; + } else { + t7 = $[18]; + } + return t7; +} +function DeprecationReason(props) { + const $ = reactCompilerRuntime.c(3); + let t0; + if ($[0] !== props.children || $[1] !== props.preview) { + var _props$preview; + t0 = props.children ? /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-deprecation", + children: [/* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-deprecation-label", + children: "Deprecated" + }), /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "deprecation", + onlyShowFirstChild: (_props$preview = props.preview) !== null && _props$preview !== void 0 ? _props$preview : true, + children: props.children + })] + }) : null; + $[0] = props.children; + $[1] = props.preview; + $[2] = t0; + } else { + t0 = $[2]; } - const label = normalizeReference(str.slice(1, labelEnd)); - if (!label) { - // CommonMark 0.20 disallows empty labels - return false; + return t0; +} +function Directive(t0) { + const $ = reactCompilerRuntime.c(2); + const { + directive + } = t0; + let t1; + if ($[0] !== directive.name.value) { + t1 = /* @__PURE__ */jsxRuntime.jsxs("span", { + className: "graphiql-doc-explorer-directive", + children: ["@", directive.name.value] + }); + $[0] = directive.name.value; + $[1] = t1; + } else { + t1 = $[1]; + } + return t1; +} +function ExplorerSection(props) { + const $ = reactCompilerRuntime.c(10); + const Icon2 = TYPE_TO_ICON[props.title]; + let t0; + if ($[0] !== Icon2) { + t0 = /* @__PURE__ */jsxRuntime.jsx(Icon2, {}); + $[0] = Icon2; + $[1] = t0; + } else { + t0 = $[1]; } - - // Reference can not terminate anything. This check is for safety only. - /* istanbul ignore if */ - if (silent) { - return true; + let t1; + if ($[2] !== props.title || $[3] !== t0) { + t1 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-section-title", + children: [t0, props.title] + }); + $[2] = props.title; + $[3] = t0; + $[4] = t1; + } else { + t1 = $[4]; } - if (typeof state.env.references === 'undefined') { - state.env.references = {}; + let t2; + if ($[5] !== props.children) { + t2 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-section-content", + children: props.children + }); + $[5] = props.children; + $[6] = t2; + } else { + t2 = $[6]; } - if (typeof state.env.references[label] === 'undefined') { - state.env.references[label] = { - title, - href - }; + let t3; + if ($[7] !== t1 || $[8] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [t1, t2] + }); + $[7] = t1; + $[8] = t2; + $[9] = t3; + } else { + t3 = $[9]; + } + return t3; +} +const TYPE_TO_ICON = { + Arguments: ArgumentIcon, + "Deprecated Arguments": DeprecatedArgumentIcon, + "Deprecated Enum Values": DeprecatedEnumValueIcon, + "Deprecated Fields": DeprecatedFieldIcon, + Directives: DirectiveIcon, + "Enum Values": EnumValueIcon, + Fields: FieldIcon, + Implements: ImplementsIcon, + Implementations: TypeIcon, + "Possible Types": TypeIcon, + "Root Types": RootTypeIcon, + Type: TypeIcon, + "All Schema Types": TypeIcon +}; +function FieldDocumentation(props) { + const $ = reactCompilerRuntime.c(15); + let t0; + if ($[0] !== props.field.description) { + t0 = props.field.description ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + children: props.field.description + }) : null; + $[0] = props.field.description; + $[1] = t0; + } else { + t0 = $[1]; } - state.line = nextLine; - return true; -} - -// List of valid html blocks names, according to commonmark spec -// https://spec.commonmark.org/0.30/#html-blocks - -var block_names = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'search', 'section', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul']; - -// Regexps to match html elements - -const attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; -const unquoted = '[^"\'=<>`\\x00-\\x20]+'; -const single_quoted = "'[^']*'"; -const double_quoted = '"[^"]*"'; -const attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')'; -const attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)'; -const open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>'; -const close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>'; -const comment = ''; -const processing = '<[?][\\s\\S]*?[?]>'; -const declaration = ']*>'; -const cdata = ''; -const HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')'); -const HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')'); - -// HTML block - -// An array of opening and corresponding closing sequences for html tags, -// last argument defines whether it can terminate a paragraph or not -// -const HTML_SEQUENCES = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true], [/^/, true], [/^<\?/, /\?>/, true], [/^/, true], [/^/, true], [new RegExp('^|$))', 'i'), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false]]; -function html_block(state, startLine, endLine, silent) { - let pos = state.bMarks[startLine] + state.tShift[startLine]; - let max = state.eMarks[startLine]; - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; + let t1; + if ($[2] !== props.field.deprecationReason) { + t1 = /* @__PURE__ */jsxRuntime.jsx(DeprecationReason, { + preview: false, + children: props.field.deprecationReason + }); + $[2] = props.field.deprecationReason; + $[3] = t1; + } else { + t1 = $[3]; } - if (!state.md.options.html) { - return false; + let t2; + if ($[4] !== props.field.type) { + t2 = /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Type", + children: /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: props.field.type + }) + }); + $[4] = props.field.type; + $[5] = t2; + } else { + t2 = $[5]; } - if (state.src.charCodeAt(pos) !== 0x3C /* < */) { - return false; + let t3; + let t4; + if ($[6] !== props.field) { + t3 = /* @__PURE__ */jsxRuntime.jsx(Arguments, { + field: props.field + }); + t4 = /* @__PURE__ */jsxRuntime.jsx(Directives, { + field: props.field + }); + $[6] = props.field; + $[7] = t3; + $[8] = t4; + } else { + t3 = $[7]; + t4 = $[8]; } - let lineText = state.src.slice(pos, max); - let i = 0; - for (; i < HTML_SEQUENCES.length; i++) { - if (HTML_SEQUENCES[i][0].test(lineText)) { - break; - } + let t5; + if ($[9] !== t0 || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 || $[13] !== t4) { + t5 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t0, t1, t2, t3, t4] + }); + $[9] = t0; + $[10] = t1; + $[11] = t2; + $[12] = t3; + $[13] = t4; + $[14] = t5; + } else { + t5 = $[14]; } - if (i === HTML_SEQUENCES.length) { - return false; + return t5; +} +function Arguments(t0) { + const $ = reactCompilerRuntime.c(12); + const { + field + } = t0; + const [showDeprecated, setShowDeprecated] = React.useState(false); + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = () => { + setShowDeprecated(true); + }; + $[0] = t1; + } else { + t1 = $[0]; } - if (silent) { - // true if this sequence can be a terminator, false otherwise - return HTML_SEQUENCES[i][2]; + const handleShowDeprecated = t1; + if (!("args" in field)) { + return null; } - let nextLine = startLine + 1; - - // If we are here - we detected HTML block. - // Let's roll down till block end. - if (!HTML_SEQUENCES[i][1].test(lineText)) { - for (; nextLine < endLine; nextLine++) { - if (state.sCount[nextLine] < state.blkIndent) { - break; - } - pos = state.bMarks[nextLine] + state.tShift[nextLine]; - max = state.eMarks[nextLine]; - lineText = state.src.slice(pos, max); - if (HTML_SEQUENCES[i][1].test(lineText)) { - if (lineText.length !== 0) { - nextLine++; - } - break; + let args; + let deprecatedArgs; + let t2; + if ($[1] !== field.args) { + args = []; + deprecatedArgs = []; + for (const argument of field.args) { + if (argument.deprecationReason) { + deprecatedArgs.push(argument); + } else { + args.push(argument); } } + t2 = args.length > 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Arguments", + children: args.map(_temp$5) + }) : null; + $[1] = field.args; + $[2] = args; + $[3] = deprecatedArgs; + $[4] = t2; + } else { + args = $[2]; + deprecatedArgs = $[3]; + t2 = $[4]; } - state.line = nextLine; - const token = state.push('html_block', '', 0); - token.map = [startLine, nextLine]; - token.content = state.getLines(startLine, nextLine, state.blkIndent, true); - return true; -} - -// heading (#, ##, ...) - -function heading(state, startLine, endLine, silent) { - let pos = state.bMarks[startLine] + state.tShift[startLine]; - let max = state.eMarks[startLine]; - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; + let t3; + if ($[5] !== args.length || $[6] !== deprecatedArgs || $[7] !== showDeprecated) { + t3 = deprecatedArgs.length > 0 ? showDeprecated || args.length === 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Deprecated Arguments", + children: deprecatedArgs.map(_temp2$2) + }) : /* @__PURE__ */jsxRuntime.jsx(Button$1, { + type: "button", + onClick: handleShowDeprecated, + children: "Show Deprecated Arguments" + }) : null; + $[5] = args.length; + $[6] = deprecatedArgs; + $[7] = showDeprecated; + $[8] = t3; + } else { + t3 = $[8]; } - let ch = state.src.charCodeAt(pos); - if (ch !== 0x23 /* # */ || pos >= max) { - return false; + let t4; + if ($[9] !== t2 || $[10] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t2, t3] + }); + $[9] = t2; + $[10] = t3; + $[11] = t4; + } else { + t4 = $[11]; } - - // count heading level - let level = 1; - ch = state.src.charCodeAt(++pos); - while (ch === 0x23 /* # */ && pos < max && level <= 6) { - level++; - ch = state.src.charCodeAt(++pos); + return t4; +} +function _temp2$2(arg_0) { + return /* @__PURE__ */jsxRuntime.jsx(Argument, { + arg: arg_0 + }, arg_0.name); +} +function _temp$5(arg) { + return /* @__PURE__ */jsxRuntime.jsx(Argument, { + arg + }, arg.name); +} +function Directives(t0) { + var _a, _b, _c; + const $ = reactCompilerRuntime.c(6); + const { + field + } = t0; + let t1; + if ($[0] !== ((_a = field.astNode) == null ? void 0 : _a.directives)) { + t1 = ((_b = field.astNode) == null ? void 0 : _b.directives) || []; + $[0] = (_c = field.astNode) == null ? void 0 : _c.directives; + $[1] = t1; + } else { + t1 = $[1]; } - if (level > 6 || pos < max && !isSpace(ch)) { - return false; + const directives = t1; + if (!directives || directives.length === 0) { + return null; } - if (silent) { - return true; + let t2; + if ($[2] !== directives) { + t2 = directives.map(_temp3$2); + $[2] = directives; + $[3] = t2; + } else { + t2 = $[3]; } - - // Let's cut tails like ' ### ' from the end of string - - max = state.skipSpacesBack(max, pos); - const tmp = state.skipCharsBack(max, 0x23, pos); // # - if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) { - max = tmp; + let t3; + if ($[4] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Directives", + children: t2 + }); + $[4] = t2; + $[5] = t3; + } else { + t3 = $[5]; } - state.line = startLine + 1; - const token_o = state.push('heading_open', 'h' + String(level), 1); - token_o.markup = '########'.slice(0, level); - token_o.map = [startLine, state.line]; - const token_i = state.push('inline', '', 0); - token_i.content = state.src.slice(pos, max).trim(); - token_i.map = [startLine, state.line]; - token_i.children = []; - const token_c = state.push('heading_close', 'h' + String(level), -1); - token_c.markup = '########'.slice(0, level); - return true; + return t3; } - -// lheading (---, ===) - -function lheading(state, startLine, endLine /*, silent */) { - const terminatorRules = state.md.block.ruler.getRules('paragraph'); - - // if it's indented more than 3 spaces, it should be a code block - if (state.sCount[startLine] - state.blkIndent >= 4) { - return false; - } - const oldParentType = state.parentType; - state.parentType = 'paragraph'; // use paragraph to match terminatorRules - - // jump line-by-line until empty one or EOF - let level = 0; - let marker; - let nextLine = startLine + 1; - for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { - // this would be a code block normally, but after paragraph - // it's considered a lazy continuation regardless of what's there - if (state.sCount[nextLine] - state.blkIndent > 3) { - continue; +function _temp3$2(directive) { + return /* @__PURE__ */jsxRuntime.jsx("div", { + children: /* @__PURE__ */jsxRuntime.jsx(Directive, { + directive + }) + }, directive.name.value); +} +function SchemaDocumentation(props) { + var _a, _b, _c, _d; + const $ = reactCompilerRuntime.c(39); + let t0; + if ($[0] !== props.schema) { + t0 = props.schema.getQueryType(); + $[0] = props.schema; + $[1] = t0; + } else { + t0 = $[1]; + } + const queryType = t0; + let t1; + if ($[2] !== props.schema) { + t1 = (_b = (_a = props.schema).getMutationType) == null ? void 0 : _b.call(_a); + $[2] = props.schema; + $[3] = t1; + } else { + t1 = $[3]; + } + const mutationType = t1; + let t2; + if ($[4] !== props.schema) { + t2 = (_d = (_c = props.schema).getSubscriptionType) == null ? void 0 : _d.call(_c); + $[4] = props.schema; + $[5] = t2; + } else { + t2 = $[5]; + } + const subscriptionType = t2; + let T0; + let t3; + let t4; + let t5; + let t6; + if ($[6] !== mutationType || $[7] !== props.schema || $[8] !== queryType || $[9] !== subscriptionType) { + const typeMap = props.schema.getTypeMap(); + const t72 = queryType == null ? void 0 : queryType.name; + const t82 = mutationType == null ? void 0 : mutationType.name; + const t9 = subscriptionType == null ? void 0 : subscriptionType.name; + let t10; + if ($[15] !== t72 || $[16] !== t82 || $[17] !== t9) { + t10 = [t72, t82, t9]; + $[15] = t72; + $[16] = t82; + $[17] = t9; + $[18] = t10; + } else { + t10 = $[18]; + } + const ignoreTypesInAllSchema = t10; + const t11 = props.schema.description || "A GraphQL schema provides a root type for each kind of operation."; + if ($[19] !== t11) { + t5 = /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + children: t11 + }); + $[19] = t11; + $[20] = t5; + } else { + t5 = $[20]; } - - // - // Check for underline in setext header - // - if (state.sCount[nextLine] >= state.blkIndent) { - let pos = state.bMarks[nextLine] + state.tShift[nextLine]; - const max = state.eMarks[nextLine]; - if (pos < max) { - marker = state.src.charCodeAt(pos); - if (marker === 0x2D /* - */ || marker === 0x3D /* = */) { - pos = state.skipChars(pos, marker); - pos = state.skipSpaces(pos); - if (pos >= max) { - level = marker === 0x3D /* = */ ? 1 : 2; - break; - } - } - } + let t12; + if ($[21] !== queryType) { + t12 = queryType ? /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [/* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-root-type", + children: "query" + }), ": ", /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: queryType + })] + }) : null; + $[21] = queryType; + $[22] = t12; + } else { + t12 = $[22]; } - - // quirk for blockquotes, this line should already be checked by that rule - if (state.sCount[nextLine] < 0) { - continue; + let t13; + if ($[23] !== mutationType) { + t13 = mutationType && /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [/* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-root-type", + children: "mutation" + }), ": ", /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: mutationType + })] + }); + $[23] = mutationType; + $[24] = t13; + } else { + t13 = $[24]; } - - // Some tags can terminate paragraph without empty line. - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; - break; - } + let t14; + if ($[25] !== subscriptionType) { + t14 = subscriptionType && /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [/* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-root-type", + children: "subscription" + }), ": ", /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: subscriptionType + })] + }); + $[25] = subscriptionType; + $[26] = t14; + } else { + t14 = $[26]; } - if (terminate) { - break; + if ($[27] !== t12 || $[28] !== t13 || $[29] !== t14) { + t6 = /* @__PURE__ */jsxRuntime.jsxs(ExplorerSection, { + title: "Root Types", + children: [t12, t13, t14] + }); + $[27] = t12; + $[28] = t13; + $[29] = t14; + $[30] = t6; + } else { + t6 = $[30]; } + T0 = ExplorerSection; + t3 = "All Schema Types"; + t4 = typeMap && /* @__PURE__ */jsxRuntime.jsx("div", { + children: Object.values(typeMap).map(type => { + if (ignoreTypesInAllSchema.includes(type.name) || type.name.startsWith("__")) { + return null; + } + return /* @__PURE__ */jsxRuntime.jsx("div", { + children: /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type + }) + }, type.name); + }) + }); + $[6] = mutationType; + $[7] = props.schema; + $[8] = queryType; + $[9] = subscriptionType; + $[10] = T0; + $[11] = t3; + $[12] = t4; + $[13] = t5; + $[14] = t6; + } else { + T0 = $[10]; + t3 = $[11]; + t4 = $[12]; + t5 = $[13]; + t6 = $[14]; + } + let t7; + if ($[31] !== T0 || $[32] !== t3 || $[33] !== t4) { + t7 = /* @__PURE__ */jsxRuntime.jsx(T0, { + title: t3, + children: t4 + }); + $[31] = T0; + $[32] = t3; + $[33] = t4; + $[34] = t7; + } else { + t7 = $[34]; } - if (!level) { - // Didn't find valid underline - return false; + let t8; + if ($[35] !== t5 || $[36] !== t6 || $[37] !== t7) { + t8 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t5, t6, t7] + }); + $[35] = t5; + $[36] = t6; + $[37] = t7; + $[38] = t8; + } else { + t8 = $[38]; } - const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); - state.line = nextLine + 1; - const token_o = state.push('heading_open', 'h' + String(level), 1); - token_o.markup = String.fromCharCode(marker); - token_o.map = [startLine, state.line]; - const token_i = state.push('inline', '', 0); - token_i.content = content; - token_i.map = [startLine, state.line - 1]; - token_i.children = []; - const token_c = state.push('heading_close', 'h' + String(level), -1); - token_c.markup = String.fromCharCode(marker); - state.parentType = oldParentType; - return true; + return t8; } - -// Paragraph - -function paragraph(state, startLine, endLine) { - const terminatorRules = state.md.block.ruler.getRules('paragraph'); - const oldParentType = state.parentType; - let nextLine = startLine + 1; - state.parentType = 'paragraph'; - - // jump line-by-line until empty one or EOF - for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { - // this would be a code block normally, but after paragraph - // it's considered a lazy continuation regardless of what's there - if (state.sCount[nextLine] - state.blkIndent > 3) { - continue; - } - - // quirk for blockquotes, this line should already be checked by that rule - if (state.sCount[nextLine] < 0) { - continue; +function debounce(duration, fn) { + let timeout; + return function (...args) { + if (timeout) { + window.clearTimeout(timeout); } + timeout = window.setTimeout(() => { + timeout = null; + fn(...args); + }, duration); + }; +} +function Search() { + "use no memo"; - // Some tags can terminate paragraph without empty line. - let terminate = false; - for (let i = 0, l = terminatorRules.length; i < l; i++) { - if (terminatorRules[i](state, nextLine, endLine, true)) { - terminate = true; - break; + const { + explorerNavStack, + push + } = useExplorerContext({ + nonNull: true, + caller: Search + }); + const inputRef = React.useRef(null); + const getSearchResults = useSearchResults(); + const [searchValue, setSearchValue] = React.useState(""); + const [results, setResults] = React.useState(getSearchResults(searchValue)); + const debouncedGetSearchResults = React.useMemo(() => debounce(200, search => { + setResults(getSearchResults(search)); + }), [getSearchResults]); + React.useEffect(() => { + debouncedGetSearchResults(searchValue); + }, [debouncedGetSearchResults, searchValue]); + React.useEffect(() => { + function handleKeyDown(event) { + var _a; + if (event.metaKey && event.key === "k") { + (_a = inputRef.current) == null ? void 0 : _a.focus(); } } - if (terminate) { - break; - } + window.addEventListener("keydown", handleKeyDown); + return () => window.removeEventListener("keydown", handleKeyDown); + }, []); + const navItem = explorerNavStack.at(-1); + const onSelect = React.useCallback(def => { + push("field" in def ? { + name: def.field.name, + def: def.field + } : { + name: def.type.name, + def: def.type + }); + }, [push]); + const isFocused = React.useRef(false); + const handleFocus = React.useCallback(e => { + isFocused.current = e.type === "focus"; + }, []); + const shouldSearchBoxAppear = explorerNavStack.length === 1 || graphql.isObjectType(navItem.def) || graphql.isInterfaceType(navItem.def) || graphql.isInputObjectType(navItem.def); + if (!shouldSearchBoxAppear) { + return null; } - const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); - state.line = nextLine; - const token_o = state.push('paragraph_open', 'p', 1); - token_o.map = [startLine, state.line]; - const token_i = state.push('inline', '', 0); - token_i.content = content; - token_i.map = [startLine, state.line]; - token_i.children = []; - state.push('paragraph_close', 'p', -1); - state.parentType = oldParentType; - return true; + return /* @__PURE__ */jsxRuntime.jsxs(react.Combobox, { + as: "div", + className: "graphiql-doc-explorer-search", + onChange: onSelect, + "data-state": isFocused ? void 0 : "idle", + "aria-label": `Search ${navItem.name}...`, + children: [/* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-search-input", + onClick: () => { + var _a; + (_a = inputRef.current) == null ? void 0 : _a.focus(); + }, + children: [/* @__PURE__ */jsxRuntime.jsx(MagnifyingGlassIcon, {}), /* @__PURE__ */jsxRuntime.jsx(react.Combobox.Input, { + autoComplete: "off", + onFocus: handleFocus, + onBlur: handleFocus, + onChange: event_0 => setSearchValue(event_0.target.value), + placeholder: `${isMacOs ? "⌘" : "Ctrl"} K`, + ref: inputRef, + value: searchValue, + "data-cy": "doc-explorer-input" + })] + }), isFocused.current && /* @__PURE__ */jsxRuntime.jsxs(react.Combobox.Options, { + "data-cy": "doc-explorer-list", + children: [results.within.length + results.types.length + results.fields.length === 0 ? /* @__PURE__ */jsxRuntime.jsx("li", { + className: "graphiql-doc-explorer-search-empty", + children: "No results found" + }) : results.within.map((result, i) => /* @__PURE__ */jsxRuntime.jsx(react.Combobox.Option, { + value: result, + "data-cy": "doc-explorer-option", + children: /* @__PURE__ */jsxRuntime.jsx(Field$1, { + field: result.field, + argument: result.argument + }) + }, `within-${i}`)), results.within.length > 0 && results.types.length + results.fields.length > 0 ? /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-search-divider", + children: "Other results" + }) : null, results.types.map((result_0, i_0) => /* @__PURE__ */jsxRuntime.jsx(react.Combobox.Option, { + value: result_0, + "data-cy": "doc-explorer-option", + children: /* @__PURE__ */jsxRuntime.jsx(Type, { + type: result_0.type + }) + }, `type-${i_0}`)), results.fields.map((result_1, i_1) => /* @__PURE__ */jsxRuntime.jsxs(react.Combobox.Option, { + value: result_1, + "data-cy": "doc-explorer-option", + children: [/* @__PURE__ */jsxRuntime.jsx(Type, { + type: result_1.type + }), ".", /* @__PURE__ */jsxRuntime.jsx(Field$1, { + field: result_1.field, + argument: result_1.argument + })] + }, `field-${i_1}`))] + })] + }); } - -/** internal - * class ParserBlock - * - * Block-level tokenizer. - **/ - -const _rules$1 = [ -// First 2 params - rule name & source. Secondary array - list of rules, -// which can be terminated by this one. -['table', table, ['paragraph', 'reference']], ['code', code], ['fence', fence, ['paragraph', 'reference', 'blockquote', 'list']], ['blockquote', blockquote, ['paragraph', 'reference', 'blockquote', 'list']], ['hr', hr, ['paragraph', 'reference', 'blockquote', 'list']], ['list', list, ['paragraph', 'reference', 'blockquote']], ['reference', reference], ['html_block', html_block, ['paragraph', 'reference', 'blockquote']], ['heading', heading, ['paragraph', 'reference', 'blockquote']], ['lheading', lheading], ['paragraph', paragraph]]; - -/** - * new ParserBlock() - **/ -function ParserBlock() { - /** - * ParserBlock#ruler -> Ruler - * - * [[Ruler]] instance. Keep configuration of block rules. - **/ - this.ruler = new Ruler(); - for (let i = 0; i < _rules$1.length; i++) { - this.ruler.push(_rules$1[i][0], _rules$1[i][1], { - alt: (_rules$1[i][2] || []).slice() +const _useSearchResults = useSearchResults; +function useSearchResults(caller) { + const $ = reactCompilerRuntime.c(9); + const t0 = caller || _useSearchResults; + let t1; + if ($[0] !== t0) { + t1 = { + nonNull: true, + caller: t0 + }; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; + } + const { + explorerNavStack + } = useExplorerContext(t1); + const t2 = caller || _useSearchResults; + let t3; + if ($[2] !== t2) { + t3 = { + nonNull: true, + caller: t2 + }; + $[2] = t2; + $[3] = t3; + } else { + t3 = $[3]; + } + const { + schema + } = useSchemaContext(t3); + let t4; + if ($[4] !== explorerNavStack) { + t4 = explorerNavStack.at(-1); + $[4] = explorerNavStack; + $[5] = t4; + } else { + t4 = $[5]; + } + const navItem = t4; + let t5; + if ($[6] !== navItem || $[7] !== schema) { + t5 = searchValue => { + const matches = { + within: [], + types: [], + fields: [] + }; + if (!schema) { + return matches; + } + const withinType = navItem.def; + const typeMap = schema.getTypeMap(); + let typeNames = Object.keys(typeMap); + if (withinType) { + typeNames = typeNames.filter(n => n !== withinType.name); + typeNames.unshift(withinType.name); + } + for (const typeName of typeNames) { + if (matches.within.length + matches.types.length + matches.fields.length >= 100) { + break; + } + const type = typeMap[typeName]; + if (withinType !== type && isMatch(typeName, searchValue)) { + matches.types.push({ + type + }); + } + if (!graphql.isObjectType(type) && !graphql.isInterfaceType(type) && !graphql.isInputObjectType(type)) { + continue; + } + const fields = type.getFields(); + for (const fieldName in fields) { + const field = fields[fieldName]; + let matchingArgs; + if (!isMatch(fieldName, searchValue)) { + if ("args" in field) { + matchingArgs = field.args.filter(arg => isMatch(arg.name, searchValue)); + if (matchingArgs.length === 0) { + continue; + } + } else { + continue; + } + } + matches[withinType === type ? "within" : "fields"].push(...(matchingArgs ? matchingArgs.map(argument => ({ + type, + field, + argument + })) : [{ + type, + field + }])); + } + } + return matches; + }; + $[6] = navItem; + $[7] = schema; + $[8] = t5; + } else { + t5 = $[8]; + } + return t5; +} +function isMatch(sourceText, searchValue) { + try { + const escaped = searchValue.replaceAll(/[^_0-9A-Za-z]/g, ch => "\\" + ch); + return sourceText.search(new RegExp(escaped, "i")) !== -1; + } catch { + return sourceText.toLowerCase().includes(searchValue.toLowerCase()); + } +} +function Type(props) { + const $ = reactCompilerRuntime.c(2); + let t0; + if ($[0] !== props.type.name) { + t0 = /* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-search-type", + children: props.type.name }); + $[0] = props.type.name; + $[1] = t0; + } else { + t0 = $[1]; } + return t0; } - -// Generate tokens for input range -// -ParserBlock.prototype.tokenize = function (state, startLine, endLine) { - const rules = this.ruler.getRules(''); - const len = rules.length; - const maxNesting = state.md.options.maxNesting; - let line = startLine; - let hasEmptyLines = false; - while (line < endLine) { - state.line = line = state.skipEmptyLines(line); - if (line >= endLine) { - break; - } - - // Termination condition for nested calls. - // Nested calls currently used for blockquotes & lists - if (state.sCount[line] < state.blkIndent) { - break; - } - - // If nesting level exceeded - skip tail to the end. That's not ordinary - // situation and we should not care about content. - if (state.level >= maxNesting) { - state.line = endLine; - break; - } - - // Try all possible rules. - // On success, rule should: - // - // - update `state.line` - // - update `state.tokens` - // - return true - const prevLine = state.line; - let ok = false; - for (let i = 0; i < len; i++) { - ok = rules[i](state, line, endLine, false); - if (ok) { - if (prevLine >= state.line) { - throw new Error("block rule didn't increment state.line"); - } - break; +function Field$1(t0) { + const $ = reactCompilerRuntime.c(7); + const { + field, + argument + } = t0; + let t1; + if ($[0] !== field.name) { + t1 = /* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-search-field", + children: field.name + }); + $[0] = field.name; + $[1] = t1; + } else { + t1 = $[1]; + } + let t2; + if ($[2] !== argument) { + t2 = argument ? /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: ["(", /* @__PURE__ */jsxRuntime.jsx("span", { + className: "graphiql-doc-explorer-search-argument", + children: argument.name + }), ":", " ", renderType(argument.type, _temp$4), ")"] + }) : null; + $[2] = argument; + $[3] = t2; + } else { + t2 = $[3]; + } + let t3; + if ($[4] !== t1 || $[5] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t1, t2] + }); + $[4] = t1; + $[5] = t2; + $[6] = t3; + } else { + t3 = $[6]; + } + return t3; +} +function _temp$4(namedType) { + return /* @__PURE__ */jsxRuntime.jsx(Type, { + type: namedType + }); +} +function FieldLink(props) { + const $ = reactCompilerRuntime.c(7); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true + }; + $[0] = t0; + } else { + t0 = $[0]; + } + const { + push + } = useExplorerContext(t0); + let t1; + if ($[1] !== props.field || $[2] !== push) { + t1 = event => { + event.preventDefault(); + push({ + name: props.field.name, + def: props.field + }); + }; + $[1] = props.field; + $[2] = push; + $[3] = t1; + } else { + t1 = $[3]; + } + let t2; + if ($[4] !== props.field.name || $[5] !== t1) { + t2 = /* @__PURE__ */jsxRuntime.jsx("a", { + className: "graphiql-doc-explorer-field-name", + onClick: t1, + href: "#", + children: props.field.name + }); + $[4] = props.field.name; + $[5] = t1; + $[6] = t2; + } else { + t2 = $[6]; + } + return t2; +} +function TypeDocumentation(props) { + const $ = reactCompilerRuntime.c(2); + let t0; + if ($[0] !== props.type) { + t0 = graphql.isNamedType(props.type) ? /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [props.type.description ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + children: props.type.description + }) : null, /* @__PURE__ */jsxRuntime.jsx(ImplementsInterfaces, { + type: props.type + }), /* @__PURE__ */jsxRuntime.jsx(Fields, { + type: props.type + }), /* @__PURE__ */jsxRuntime.jsx(EnumValues, { + type: props.type + }), /* @__PURE__ */jsxRuntime.jsx(PossibleTypes, { + type: props.type + })] + }) : null; + $[0] = props.type; + $[1] = t0; + } else { + t0 = $[1]; + } + return t0; +} +function ImplementsInterfaces(t0) { + const $ = reactCompilerRuntime.c(5); + const { + type + } = t0; + if (!graphql.isObjectType(type)) { + return null; + } + let t1; + if ($[0] !== type) { + t1 = type.getInterfaces(); + $[0] = type; + $[1] = t1; + } else { + t1 = $[1]; + } + const interfaces = t1; + let t2; + if ($[2] !== interfaces.length || $[3] !== type) { + t2 = interfaces.length > 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Implements", + children: type.getInterfaces().map(_temp$3) + }) : null; + $[2] = interfaces.length; + $[3] = type; + $[4] = t2; + } else { + t2 = $[4]; + } + return t2; +} +function _temp$3(implementedInterface) { + return /* @__PURE__ */jsxRuntime.jsx("div", { + children: /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: implementedInterface + }) + }, implementedInterface.name); +} +function Fields(t0) { + const $ = reactCompilerRuntime.c(12); + const { + type + } = t0; + const [showDeprecated, setShowDeprecated] = React.useState(false); + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = () => { + setShowDeprecated(true); + }; + $[0] = t1; + } else { + t1 = $[0]; + } + const handleShowDeprecated = t1; + if (!graphql.isObjectType(type) && !graphql.isInterfaceType(type) && !graphql.isInputObjectType(type)) { + return null; + } + let deprecatedFields; + let fields; + let t2; + if ($[1] !== type) { + const fieldMap = type.getFields(); + fields = []; + deprecatedFields = []; + for (const field of Object.keys(fieldMap).map(name => fieldMap[name])) { + if (field.deprecationReason) { + deprecatedFields.push(field); + } else { + fields.push(field); } } - - // this can only happen if user disables paragraph rule - if (!ok) throw new Error('none of the block rules matched'); - - // set state.tight if we had an empty line before current tag - // i.e. latest empty line should not count - state.tight = !hasEmptyLines; - - // paragraph might "eat" one newline after it in nested lists - if (state.isEmpty(state.line - 1)) { - hasEmptyLines = true; - } - line = state.line; - if (line < endLine && state.isEmpty(line)) { - hasEmptyLines = true; - line++; - state.line = line; - } + t2 = fields.length > 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Fields", + children: fields.map(_temp2$1) + }) : null; + $[1] = type; + $[2] = deprecatedFields; + $[3] = fields; + $[4] = t2; + } else { + deprecatedFields = $[2]; + fields = $[3]; + t2 = $[4]; } -}; - -/** - * ParserBlock.parse(str, md, env, outTokens) - * - * Process input string and push block tokens into `outTokens` - **/ -ParserBlock.prototype.parse = function (src, md, env, outTokens) { - if (!src) { - return; + let t3; + if ($[5] !== deprecatedFields || $[6] !== fields.length || $[7] !== showDeprecated) { + t3 = deprecatedFields.length > 0 ? showDeprecated || fields.length === 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Deprecated Fields", + children: deprecatedFields.map(_temp3$1) + }) : /* @__PURE__ */jsxRuntime.jsx(Button$1, { + type: "button", + onClick: handleShowDeprecated, + children: "Show Deprecated Fields" + }) : null; + $[5] = deprecatedFields; + $[6] = fields.length; + $[7] = showDeprecated; + $[8] = t3; + } else { + t3 = $[8]; } - const state = new this.State(src, md, env, outTokens); - this.tokenize(state, state.line, state.lineMax); -}; -ParserBlock.prototype.State = StateBlock; - -// Inline parser state - -function StateInline(src, md, env, outTokens) { - this.src = src; - this.env = env; - this.md = md; - this.tokens = outTokens; - this.tokens_meta = Array(outTokens.length); - this.pos = 0; - this.posMax = this.src.length; - this.level = 0; - this.pending = ''; - this.pendingLevel = 0; - - // Stores { start: end } pairs. Useful for backtrack - // optimization of pairs parse (emphasis, strikes). - this.cache = {}; - - // List of emphasis-like delimiters for current tag - this.delimiters = []; - - // Stack of delimiter lists for upper level tags - this._prev_delimiters = []; - - // backtick length => last seen position - this.backticks = {}; - this.backticksScanned = false; - - // Counter used to disable inline linkify-it execution - // inside and markdown links - this.linkLevel = 0; + let t4; + if ($[9] !== t2 || $[10] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t2, t3] + }); + $[9] = t2; + $[10] = t3; + $[11] = t4; + } else { + t4 = $[11]; + } + return t4; } - -// Flush pending text -// -StateInline.prototype.pushPending = function () { - const token = new Token('text', '', 0); - token.content = this.pending; - token.level = this.pendingLevel; - this.tokens.push(token); - this.pending = ''; - return token; -}; - -// Push new token to "stream". -// If pending text exists - flush it as text token -// -StateInline.prototype.push = function (type, tag, nesting) { - if (this.pending) { - this.pushPending(); +function _temp3$1(field_1) { + return /* @__PURE__ */jsxRuntime.jsx(Field, { + field: field_1 + }, field_1.name); +} +function _temp2$1(field_0) { + return /* @__PURE__ */jsxRuntime.jsx(Field, { + field: field_0 + }, field_0.name); +} +function Field(t0) { + const $ = reactCompilerRuntime.c(22); + const { + field + } = t0; + let t1; + let t2; + let t3; + if ($[0] !== field) { + const args = "args" in field ? field.args.filter(_temp4$1) : []; + t3 = "graphiql-doc-explorer-item"; + t1 = /* @__PURE__ */jsxRuntime.jsx(FieldLink, { + field + }); + t2 = args.length > 0 ? /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: ["(", /* @__PURE__ */jsxRuntime.jsx("span", { + children: args.map(arg_0 => args.length === 1 ? /* @__PURE__ */jsxRuntime.jsx(Argument, { + arg: arg_0, + inline: true + }, arg_0.name) : /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-argument-multiple", + children: /* @__PURE__ */jsxRuntime.jsx(Argument, { + arg: arg_0, + inline: true + }) + }, arg_0.name)) + }), ")"] + }) : null; + $[0] = field; + $[1] = t1; + $[2] = t2; + $[3] = t3; + } else { + t1 = $[1]; + t2 = $[2]; + t3 = $[3]; + } + let t4; + if ($[4] !== field.type) { + t4 = /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: field.type + }); + $[4] = field.type; + $[5] = t4; + } else { + t4 = $[5]; } - const token = new Token(type, tag, nesting); - let token_meta = null; - if (nesting < 0) { - // closing tag - this.level--; - this.delimiters = this._prev_delimiters.pop(); + let t5; + if ($[6] !== field) { + t5 = /* @__PURE__ */jsxRuntime.jsx(DefaultValue, { + field + }); + $[6] = field; + $[7] = t5; + } else { + t5 = $[7]; } - token.level = this.level; - if (nesting > 0) { - // opening tag - this.level++; - this._prev_delimiters.push(this.delimiters); - this.delimiters = []; - token_meta = { - delimiters: this.delimiters + let t6; + if ($[8] !== t1 || $[9] !== t2 || $[10] !== t4 || $[11] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [t1, t2, ": ", t4, t5] + }); + $[8] = t1; + $[9] = t2; + $[10] = t4; + $[11] = t5; + $[12] = t6; + } else { + t6 = $[12]; + } + let t7; + if ($[13] !== field.description) { + t7 = field.description ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + onlyShowFirstChild: true, + children: field.description + }) : null; + $[13] = field.description; + $[14] = t7; + } else { + t7 = $[14]; + } + let t8; + if ($[15] !== field.deprecationReason) { + t8 = /* @__PURE__ */jsxRuntime.jsx(DeprecationReason, { + children: field.deprecationReason + }); + $[15] = field.deprecationReason; + $[16] = t8; + } else { + t8 = $[16]; + } + let t9; + if ($[17] !== t3 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) { + t9 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: t3, + children: [t6, t7, t8] + }); + $[17] = t3; + $[18] = t6; + $[19] = t7; + $[20] = t8; + $[21] = t9; + } else { + t9 = $[21]; + } + return t9; +} +function _temp4$1(arg) { + return !arg.deprecationReason; +} +function EnumValues(t0) { + const $ = reactCompilerRuntime.c(12); + const { + type + } = t0; + const [showDeprecated, setShowDeprecated] = React.useState(false); + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = () => { + setShowDeprecated(true); }; + $[0] = t1; + } else { + t1 = $[0]; } - this.pendingLevel = this.level; - this.tokens.push(token); - this.tokens_meta.push(token_meta); - return token; -}; - -// Scan a sequence of emphasis-like markers, and determine whether -// it can start an emphasis sequence or end an emphasis sequence. -// -// - start - position to scan from (it should point at a valid marker); -// - canSplitWord - determine if these markers can be found inside a word -// -StateInline.prototype.scanDelims = function (start, canSplitWord) { - const max = this.posMax; - const marker = this.src.charCodeAt(start); - - // treat beginning of the line as a whitespace - const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20; - let pos = start; - while (pos < max && this.src.charCodeAt(pos) === marker) { - pos++; + const handleShowDeprecated = t1; + if (!graphql.isEnumType(type)) { + return null; } - const count = pos - start; - - // treat end of the line as a whitespace - const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20; - const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); - const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); - const isLastWhiteSpace = isWhiteSpace(lastChar); - const isNextWhiteSpace = isWhiteSpace(nextChar); - const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar); - const right_flanking = !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar); - const can_open = left_flanking && (canSplitWord || !right_flanking || isLastPunctChar); - const can_close = right_flanking && (canSplitWord || !left_flanking || isNextPunctChar); - return { - can_open, - can_close, - length: count - }; -}; - -// re-export Token class to use in block rules -StateInline.prototype.Token = Token; - -// Skip text characters for text token, place those to pending buffer -// and increment current pos - -// Rule to skip pure text -// '{}$%@~+=:' reserved for extentions - -// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ - -// !!!! Don't confuse with "Markdown ASCII Punctuation" chars -// http://spec.commonmark.org/0.15/#ascii-punctuation-character -function isTerminatorChar(ch) { - switch (ch) { - case 0x0A /* \n */: - case 0x21 /* ! */: - case 0x23 /* # */: - case 0x24 /* $ */: - case 0x25 /* % */: - case 0x26 /* & */: - case 0x2A /* * */: - case 0x2B /* + */: - case 0x2D /* - */: - case 0x3A /* : */: - case 0x3C /* < */: - case 0x3D /* = */: - case 0x3E /* > */: - case 0x40 /* @ */: - case 0x5B /* [ */: - case 0x5C /* \ */: - case 0x5D /* ] */: - case 0x5E /* ^ */: - case 0x5F /* _ */: - case 0x60 /* ` */: - case 0x7B /* { */: - case 0x7D /* } */: - case 0x7E /* ~ */: - return true; - default: - return false; + let deprecatedValues; + let t2; + let values; + if ($[1] !== type) { + values = []; + deprecatedValues = []; + for (const value of type.getValues()) { + if (value.deprecationReason) { + deprecatedValues.push(value); + } else { + values.push(value); + } + } + t2 = values.length > 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Enum Values", + children: values.map(_temp5) + }) : null; + $[1] = type; + $[2] = deprecatedValues; + $[3] = t2; + $[4] = values; + } else { + deprecatedValues = $[2]; + t2 = $[3]; + values = $[4]; + } + let t3; + if ($[5] !== deprecatedValues || $[6] !== showDeprecated || $[7] !== values.length) { + t3 = deprecatedValues.length > 0 ? showDeprecated || values.length === 0 ? /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: "Deprecated Enum Values", + children: deprecatedValues.map(_temp6) + }) : /* @__PURE__ */jsxRuntime.jsx(Button$1, { + type: "button", + onClick: handleShowDeprecated, + children: "Show Deprecated Values" + }) : null; + $[5] = deprecatedValues; + $[6] = showDeprecated; + $[7] = values.length; + $[8] = t3; + } else { + t3 = $[8]; } + let t4; + if ($[9] !== t2 || $[10] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [t2, t3] + }); + $[9] = t2; + $[10] = t3; + $[11] = t4; + } else { + t4 = $[11]; + } + return t4; } -function text(state, silent) { - let pos = state.pos; - while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) { - pos++; +function _temp6(value_1) { + return /* @__PURE__ */jsxRuntime.jsx(EnumValue, { + value: value_1 + }, value_1.name); +} +function _temp5(value_0) { + return /* @__PURE__ */jsxRuntime.jsx(EnumValue, { + value: value_0 + }, value_0.name); +} +function EnumValue(t0) { + const $ = reactCompilerRuntime.c(10); + const { + value + } = t0; + let t1; + if ($[0] !== value.name) { + t1 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-enum-value", + children: value.name + }); + $[0] = value.name; + $[1] = t1; + } else { + t1 = $[1]; } - if (pos === state.pos) { - return false; + let t2; + if ($[2] !== value.description) { + t2 = value.description ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "description", + children: value.description + }) : null; + $[2] = value.description; + $[3] = t2; + } else { + t2 = $[3]; } - if (!silent) { - state.pending += state.src.slice(state.pos, pos); + let t3; + if ($[4] !== value.deprecationReason) { + t3 = value.deprecationReason ? /* @__PURE__ */jsxRuntime.jsx(MarkdownContent, { + type: "deprecation", + children: value.deprecationReason + }) : null; + $[4] = value.deprecationReason; + $[5] = t3; + } else { + t3 = $[5]; } - state.pos = pos; - return true; + let t4; + if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-item", + children: [t1, t2, t3] + }); + $[6] = t1; + $[7] = t2; + $[8] = t3; + $[9] = t4; + } else { + t4 = $[9]; + } + return t4; } - -// Alternative implementation, for memory. -// -// It costs 10% of performance, but allows extend terminators list, if place it -// to `ParserInline` property. Probably, will switch to it sometime, such -// flexibility required. - -/* -var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/; - -module.exports = function text(state, silent) { - var pos = state.pos, - idx = state.src.slice(pos).search(TERMINATOR_RE); - - // first char is terminator -> empty text - if (idx === 0) { return false; } - - // no terminator -> text till end of string - if (idx < 0) { - if (!silent) { state.pending += state.src.slice(pos); } - state.pos = state.src.length; - return true; +function PossibleTypes(t0) { + const $ = reactCompilerRuntime.c(7); + const { + type + } = t0; + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true + }; + $[0] = t1; + } else { + t1 = $[0]; } - - if (!silent) { state.pending += state.src.slice(pos, pos + idx); } - - state.pos += idx; - - return true; -}; */ - -// Process links like https://example.org/ - -// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) -const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i; -function linkify(state, silent) { - if (!state.md.options.linkify) return false; - if (state.linkLevel > 0) return false; - const pos = state.pos; - const max = state.posMax; - if (pos + 3 > max) return false; - if (state.src.charCodeAt(pos) !== 0x3A /* : */) return false; - if (state.src.charCodeAt(pos + 1) !== 0x2F /* / */) return false; - if (state.src.charCodeAt(pos + 2) !== 0x2F /* / */) return false; - const match = state.pending.match(SCHEME_RE); - if (!match) return false; - const proto = match[1]; - const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length)); - if (!link) return false; - let url = link.url; - - // invalid link, but still detected by linkify somehow; - // need to check to prevent infinite loop below - if (url.length <= proto.length) return false; - - // disallow '*' at the end of the link (conflicts with emphasis) - url = url.replace(/\*+$/, ''); - const fullUrl = state.md.normalizeLink(url); - if (!state.md.validateLink(fullUrl)) return false; - if (!silent) { - state.pending = state.pending.slice(0, -proto.length); - const token_o = state.push('link_open', 'a', 1); - token_o.attrs = [['href', fullUrl]]; - token_o.markup = 'linkify'; - token_o.info = 'auto'; - const token_t = state.push('text', '', 0); - token_t.content = state.md.normalizeLinkText(url); - const token_c = state.push('link_close', 'a', -1); - token_c.markup = 'linkify'; - token_c.info = 'auto'; + const { + schema + } = useSchemaContext(t1); + if (!schema || !graphql.isAbstractType(type)) { + return null; } - state.pos += url.length - proto.length; - return true; + const t2 = graphql.isInterfaceType(type) ? "Implementations" : "Possible Types"; + let t3; + if ($[1] !== schema || $[2] !== type) { + t3 = schema.getPossibleTypes(type).map(_temp7); + $[1] = schema; + $[2] = type; + $[3] = t3; + } else { + t3 = $[3]; + } + let t4; + if ($[4] !== t2 || $[5] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsx(ExplorerSection, { + title: t2, + children: t3 + }); + $[4] = t2; + $[5] = t3; + $[6] = t4; + } else { + t4 = $[6]; + } + return t4; } - -// Proceess '\n' - -function newline(state, silent) { - let pos = state.pos; - if (state.src.charCodeAt(pos) !== 0x0A /* \n */) { - return false; +function _temp7(possibleType) { + return /* @__PURE__ */jsxRuntime.jsx("div", { + children: /* @__PURE__ */jsxRuntime.jsx(TypeLink, { + type: possibleType + }) + }, possibleType.name); +} +function DocExplorer() { + const $ = reactCompilerRuntime.c(40); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true, + caller: DocExplorer + }; + $[0] = t0; + } else { + t0 = $[0]; } - const pmax = state.pending.length - 1; - const max = state.posMax; - - // ' \n' -> hardbreak - // Lookup in pending chars is bad practice! Don't copy to other rules! - // Pending string is stored in concat mode, indexed lookups will cause - // convertion to flat mode. - if (!silent) { - if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) { - if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) { - // Find whitespaces tail of pending chars. - let ws = pmax - 1; - while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--; - state.pending = state.pending.slice(0, ws); - state.push('hardbreak', 'br', 0); + const { + fetchError, + isFetching, + schema, + validationErrors + } = useSchemaContext(t0); + let t1; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: DocExplorer + }; + $[1] = t1; + } else { + t1 = $[1]; + } + const { + explorerNavStack, + pop + } = useExplorerContext(t1); + let content; + let navItem; + if ($[2] !== explorerNavStack || $[3] !== fetchError || $[4] !== isFetching || $[5] !== schema || $[6] !== validationErrors) { + navItem = explorerNavStack.at(-1); + content = null; + if (fetchError) { + let t22; + if ($[9] === Symbol.for("react.memo_cache_sentinel")) { + t22 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-error", + children: "Error fetching schema" + }); + $[9] = t22; } else { - state.pending = state.pending.slice(0, -1); - state.push('softbreak', 'br', 0); + t22 = $[9]; } + content = t22; } else { - state.push('softbreak', 'br', 0); + if (validationErrors.length > 0) { + const t22 = validationErrors[0]; + let t32; + if ($[10] !== t22.message) { + t32 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-error", + children: ["Schema is invalid: ", t22.message] + }); + $[10] = t22.message; + $[11] = t32; + } else { + t32 = $[11]; + } + content = t32; + } else { + if (isFetching) { + let t22; + if ($[12] === Symbol.for("react.memo_cache_sentinel")) { + t22 = /* @__PURE__ */jsxRuntime.jsx(Spinner, {}); + $[12] = t22; + } else { + t22 = $[12]; + } + content = t22; + } else { + if (!schema) { + let t22; + if ($[13] === Symbol.for("react.memo_cache_sentinel")) { + t22 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-error", + children: "No GraphQL schema available" + }); + $[13] = t22; + } else { + t22 = $[13]; + } + content = t22; + } else { + if (explorerNavStack.length === 1) { + let t22; + if ($[14] !== schema) { + t22 = /* @__PURE__ */jsxRuntime.jsx(SchemaDocumentation, { + schema + }); + $[14] = schema; + $[15] = t22; + } else { + t22 = $[15]; + } + content = t22; + } else { + if (graphql.isType(navItem.def)) { + let t22; + if ($[16] !== navItem.def) { + t22 = /* @__PURE__ */jsxRuntime.jsx(TypeDocumentation, { + type: navItem.def + }); + $[16] = navItem.def; + $[17] = t22; + } else { + t22 = $[17]; + } + content = t22; + } else { + if (navItem.def) { + let t22; + if ($[18] !== navItem.def) { + t22 = /* @__PURE__ */jsxRuntime.jsx(FieldDocumentation, { + field: navItem.def + }); + $[18] = navItem.def; + $[19] = t22; + } else { + t22 = $[19]; + } + content = t22; + } + } + } + } + } + } + } + $[2] = explorerNavStack; + $[3] = fetchError; + $[4] = isFetching; + $[5] = schema; + $[6] = validationErrors; + $[7] = content; + $[8] = navItem; + } else { + content = $[7]; + navItem = $[8]; + } + let prevName; + if (explorerNavStack.length > 1) { + let t22; + if ($[20] !== explorerNavStack) { + t22 = explorerNavStack.at(-2); + $[20] = explorerNavStack; + $[21] = t22; + } else { + t22 = $[21]; } + prevName = t22.name; } - pos++; - - // skip heading spaces for next line - while (pos < max && isSpace(state.src.charCodeAt(pos))) { - pos++; + let t2; + if ($[22] !== pop || $[23] !== prevName) { + t2 = prevName && /* @__PURE__ */jsxRuntime.jsxs("a", { + href: "#", + className: "graphiql-doc-explorer-back", + onClick: event => { + event.preventDefault(); + pop(); + }, + "aria-label": `Go back to ${prevName}`, + children: [/* @__PURE__ */jsxRuntime.jsx(ChevronLeftIcon, {}), prevName] + }); + $[22] = pop; + $[23] = prevName; + $[24] = t2; + } else { + t2 = $[24]; } - state.pos = pos; - return true; -} - -// Process escaped chars and hardbreaks - -const ESCAPED = []; -for (let i = 0; i < 256; i++) { - ESCAPED.push(0); + let t3; + if ($[25] !== navItem.name) { + t3 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-title", + children: navItem.name + }); + $[25] = navItem.name; + $[26] = t3; + } else { + t3 = $[26]; + } + let t4; + if ($[27] !== t2 || $[28] !== t3) { + t4 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-header-content", + children: [t2, t3] + }); + $[27] = t2; + $[28] = t3; + $[29] = t4; + } else { + t4 = $[29]; + } + let t5; + if ($[30] !== navItem.name) { + t5 = /* @__PURE__ */jsxRuntime.jsx(Search, {}, navItem.name); + $[30] = navItem.name; + $[31] = t5; + } else { + t5 = $[31]; + } + let t6; + if ($[32] !== t4 || $[33] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsxs("div", { + className: "graphiql-doc-explorer-header", + children: [t4, t5] + }); + $[32] = t4; + $[33] = t5; + $[34] = t6; + } else { + t6 = $[34]; + } + let t7; + if ($[35] !== content) { + t7 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-doc-explorer-content", + children: content + }); + $[35] = content; + $[36] = t7; + } else { + t7 = $[36]; + } + let t8; + if ($[37] !== t6 || $[38] !== t7) { + t8 = /* @__PURE__ */jsxRuntime.jsxs("section", { + className: "graphiql-doc-explorer", + "aria-label": "Documentation Explorer", + children: [t6, t7] + }); + $[37] = t6; + $[38] = t7; + $[39] = t8; + } else { + t8 = $[39]; + } + return t8; } -'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) { - ESCAPED[ch.charCodeAt(0)] = 1; -}); -function escape(state, silent) { - let pos = state.pos; - const max = state.posMax; - if (state.src.charCodeAt(pos) !== 0x5C /* \ */) return false; - pos++; - - // '\' at the end of the inline block - if (pos >= max) return false; - let ch1 = state.src.charCodeAt(pos); - if (ch1 === 0x0A) { - if (!silent) { - state.push('hardbreak', 'br', 0); +const DOC_EXPLORER_PLUGIN = { + title: "Documentation Explorer", + icon: function Icon() { + const pluginContext = usePluginContext(); + return (pluginContext == null ? void 0 : pluginContext.visiblePlugin) === DOC_EXPLORER_PLUGIN ? /* @__PURE__ */jsxRuntime.jsx(DocsFilledIcon, {}) : /* @__PURE__ */jsxRuntime.jsx(DocsIcon, {}); + }, + content: DocExplorer +}; +const HISTORY_PLUGIN = { + title: "History", + icon: HistoryIcon, + content: History +}; +const PluginContext = createNullableContext("PluginContext"); +function PluginContextProvider(props) { + const $ = reactCompilerRuntime.c(27); + const storage = useStorageContext(); + const explorerContext = useExplorerContext(); + const historyContext = useHistoryContext(); + const hasExplorerContext = Boolean(explorerContext); + const hasHistoryContext = Boolean(historyContext); + let t0; + let pluginList; + if ($[0] !== hasExplorerContext || $[1] !== hasHistoryContext || $[2] !== props.plugins) { + pluginList = []; + const pluginTitles = {}; + if (hasExplorerContext) { + pluginList.push(DOC_EXPLORER_PLUGIN); + pluginTitles[DOC_EXPLORER_PLUGIN.title] = true; + } + if (hasHistoryContext) { + pluginList.push(HISTORY_PLUGIN); + pluginTitles[HISTORY_PLUGIN.title] = true; + } + let t12; + if ($[4] !== props.plugins) { + t12 = props.plugins || []; + $[4] = props.plugins; + $[5] = t12; + } else { + t12 = $[5]; } - pos++; - // skip leading whitespaces from next line - while (pos < max) { - ch1 = state.src.charCodeAt(pos); - if (!isSpace(ch1)) break; - pos++; + for (const plugin of t12) { + if (typeof plugin.title !== "string" || !plugin.title) { + throw new Error("All GraphiQL plugins must have a unique title"); + } + if (pluginTitles[plugin.title]) { + throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${plugin.title}'`); + } else { + pluginList.push(plugin); + pluginTitles[plugin.title] = true; + } + } + $[0] = hasExplorerContext; + $[1] = hasHistoryContext; + $[2] = props.plugins; + $[3] = pluginList; + } else { + pluginList = $[3]; + } + t0 = pluginList; + const plugins = t0; + let t1; + if ($[6] !== plugins || $[7] !== props.visiblePlugin || $[8] !== storage) { + t1 = () => { + const storedValue = storage == null ? void 0 : storage.get(STORAGE_KEY$4); + const pluginForStoredValue = plugins.find(plugin_0 => plugin_0.title === storedValue); + if (pluginForStoredValue) { + return pluginForStoredValue; + } + if (storedValue) { + storage == null ? void 0 : storage.set(STORAGE_KEY$4, ""); + } + if (!props.visiblePlugin) { + return null; + } + return plugins.find(plugin_1 => (typeof props.visiblePlugin === "string" ? plugin_1.title : plugin_1) === props.visiblePlugin) || null; + }; + $[6] = plugins; + $[7] = props.visiblePlugin; + $[8] = storage; + $[9] = t1; + } else { + t1 = $[9]; + } + const [visiblePlugin, internalSetVisiblePlugin] = React.useState(t1); + const { + onTogglePluginVisibility, + children + } = props; + let t2; + if ($[10] !== onTogglePluginVisibility || $[11] !== plugins) { + t2 = plugin_2 => { + const newVisiblePlugin = plugin_2 ? plugins.find(p => (typeof plugin_2 === "string" ? p.title : p) === plugin_2) || null : null; + internalSetVisiblePlugin(current => { + if (newVisiblePlugin === current) { + return current; + } + onTogglePluginVisibility == null ? void 0 : onTogglePluginVisibility(newVisiblePlugin); + return newVisiblePlugin; + }); + }; + $[10] = onTogglePluginVisibility; + $[11] = plugins; + $[12] = t2; + } else { + t2 = $[12]; + } + const setVisiblePlugin = t2; + let t3; + if ($[13] !== props.visiblePlugin || $[14] !== setVisiblePlugin) { + t3 = () => { + if (props.visiblePlugin) { + setVisiblePlugin(props.visiblePlugin); + } + }; + $[13] = props.visiblePlugin; + $[14] = setVisiblePlugin; + $[15] = t3; + } else { + t3 = $[15]; + } + let t4; + if ($[16] !== plugins || $[17] !== props.visiblePlugin || $[18] !== setVisiblePlugin) { + t4 = [plugins, props.visiblePlugin, setVisiblePlugin]; + $[16] = plugins; + $[17] = props.visiblePlugin; + $[18] = setVisiblePlugin; + $[19] = t4; + } else { + t4 = $[19]; + } + React.useEffect(t3, t4); + let t5; + if ($[20] !== plugins || $[21] !== setVisiblePlugin || $[22] !== visiblePlugin) { + t5 = { + plugins, + setVisiblePlugin, + visiblePlugin + }; + $[20] = plugins; + $[21] = setVisiblePlugin; + $[22] = visiblePlugin; + $[23] = t5; + } else { + t5 = $[23]; + } + const value = t5; + let t6; + if ($[24] !== children || $[25] !== value) { + t6 = /* @__PURE__ */jsxRuntime.jsx(PluginContext.Provider, { + value, + children + }); + $[24] = children; + $[25] = value; + $[26] = t6; + } else { + t6 = $[26]; + } + return t6; +} +const usePluginContext = createContextHook(PluginContext); +const STORAGE_KEY$4 = "visiblePlugin"; +function onHasCompletion(_cm, data, schema, explorer, plugin, callback) { + void importCodeMirror([], { + useCommonAddons: false + }).then(CodeMirror => { + let information; + let fieldName; + let typeNamePill; + let typeNamePrefix; + let typeName; + let typeNameSuffix; + let description; + let deprecation; + let deprecationReason; + CodeMirror.on(data, "select", + // @ts-expect-error + (ctx, el) => { + if (!information) { + const hintsUl = el.parentNode; + information = document.createElement("div"); + information.className = "CodeMirror-hint-information"; + hintsUl.append(information); + const header = document.createElement("header"); + header.className = "CodeMirror-hint-information-header"; + information.append(header); + fieldName = document.createElement("span"); + fieldName.className = "CodeMirror-hint-information-field-name"; + header.append(fieldName); + typeNamePill = document.createElement("span"); + typeNamePill.className = "CodeMirror-hint-information-type-name-pill"; + header.append(typeNamePill); + typeNamePrefix = document.createElement("span"); + typeNamePill.append(typeNamePrefix); + typeName = document.createElement("a"); + typeName.className = "CodeMirror-hint-information-type-name"; + typeName.href = "javascript:void 0"; + typeName.addEventListener("click", onClickHintInformation); + typeNamePill.append(typeName); + typeNameSuffix = document.createElement("span"); + typeNamePill.append(typeNameSuffix); + description = document.createElement("div"); + description.className = "CodeMirror-hint-information-description"; + information.append(description); + deprecation = document.createElement("div"); + deprecation.className = "CodeMirror-hint-information-deprecation"; + information.append(deprecation); + const deprecationLabel = document.createElement("span"); + deprecationLabel.className = "CodeMirror-hint-information-deprecation-label"; + deprecationLabel.textContent = "Deprecated"; + deprecation.append(deprecationLabel); + deprecationReason = document.createElement("div"); + deprecationReason.className = "CodeMirror-hint-information-deprecation-reason"; + deprecation.append(deprecationReason); + const defaultInformationPadding = parseInt(window.getComputedStyle(information).paddingBottom.replace(/px$/, ""), 10) || 0; + const defaultInformationMaxHeight = parseInt(window.getComputedStyle(information).maxHeight.replace(/px$/, ""), 10) || 0; + const handleScroll = () => { + if (information) { + information.style.paddingTop = hintsUl.scrollTop + defaultInformationPadding + "px"; + information.style.maxHeight = hintsUl.scrollTop + defaultInformationMaxHeight + "px"; + } + }; + hintsUl.addEventListener("scroll", handleScroll); + let onRemoveFn; + hintsUl.addEventListener("DOMNodeRemoved", onRemoveFn = event => { + if (event.target !== hintsUl) { + return; + } + hintsUl.removeEventListener("scroll", handleScroll); + hintsUl.removeEventListener("DOMNodeRemoved", onRemoveFn); + if (information) { + information.removeEventListener("click", onClickHintInformation); + } + information = null; + fieldName = null; + typeNamePill = null; + typeNamePrefix = null; + typeName = null; + typeNameSuffix = null; + description = null; + deprecation = null; + deprecationReason = null; + onRemoveFn = null; + }); + } + if (fieldName) { + fieldName.textContent = ctx.text; + } + if (typeNamePill && typeNamePrefix && typeName && typeNameSuffix) { + if (ctx.type) { + typeNamePill.style.display = "inline"; + const renderType2 = type => { + if (graphql.isNonNullType(type)) { + typeNameSuffix.textContent = "!" + typeNameSuffix.textContent; + renderType2(type.ofType); + } else if (graphql.isListType(type)) { + typeNamePrefix.textContent += "["; + typeNameSuffix.textContent = "]" + typeNameSuffix.textContent; + renderType2(type.ofType); + } else { + typeName.textContent = type.name; + } + }; + typeNamePrefix.textContent = ""; + typeNameSuffix.textContent = ""; + renderType2(ctx.type); + } else { + typeNamePrefix.textContent = ""; + typeName.textContent = ""; + typeNameSuffix.textContent = ""; + typeNamePill.style.display = "none"; + } + } + if (description) { + if (ctx.description) { + description.style.display = "block"; + description.innerHTML = markdown.render(ctx.description); + } else { + description.style.display = "none"; + description.innerHTML = ""; + } + } + if (deprecation && deprecationReason) { + if (ctx.deprecationReason) { + deprecation.style.display = "block"; + deprecationReason.innerHTML = markdown.render(ctx.deprecationReason); + } else { + deprecation.style.display = "none"; + deprecationReason.innerHTML = ""; + } + } + }); + }); + function onClickHintInformation(event) { + if (!schema || !explorer || !plugin || !(event.currentTarget instanceof HTMLElement)) { + return; } - state.pos = pos; - return true; - } - let escapedStr = state.src[pos]; - if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) { - const ch2 = state.src.charCodeAt(pos + 1); - if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { - escapedStr += state.src[pos + 1]; - pos++; + const typeName = event.currentTarget.textContent || ""; + const type = schema.getType(typeName); + if (type) { + plugin.setVisiblePlugin(DOC_EXPLORER_PLUGIN); + explorer.push({ + name: type.name, + def: type + }); + callback == null ? void 0 : callback(type); } } - const origStr = '\\' + escapedStr; - if (!silent) { - const token = state.push('text_special', '', 0); - if (ch1 < 256 && ESCAPED[ch1] !== 0) { - token.content = escapedStr; - } else { - token.content = origStr; - } - token.markup = origStr; - token.info = 'escape'; +} +function useSynchronizeValue(editor, value) { + const $ = reactCompilerRuntime.c(4); + let t0; + let t1; + if ($[0] !== editor || $[1] !== value) { + t0 = () => { + if (editor && typeof value === "string" && value !== editor.getValue()) { + editor.setValue(value); + } + }; + t1 = [editor, value]; + $[0] = editor; + $[1] = value; + $[2] = t0; + $[3] = t1; + } else { + t0 = $[2]; + t1 = $[3]; } - state.pos = pos + 1; - return true; + React.useEffect(t0, t1); } - -// Parse backticks - -function backtick(state, silent) { - let pos = state.pos; - const ch = state.src.charCodeAt(pos); - if (ch !== 0x60 /* ` */) { - return false; +function useSynchronizeOption(editor, option, value) { + const $ = reactCompilerRuntime.c(5); + let t0; + let t1; + if ($[0] !== editor || $[1] !== option || $[2] !== value) { + t0 = () => { + if (editor) { + editor.setOption(option, value); + } + }; + t1 = [editor, option, value]; + $[0] = editor; + $[1] = option; + $[2] = value; + $[3] = t0; + $[4] = t1; + } else { + t0 = $[3]; + t1 = $[4]; + } + React.useEffect(t0, t1); +} +function useChangeHandler(editor, callback, storageKey, tabProperty, caller) { + const $ = reactCompilerRuntime.c(10); + let t0; + if ($[0] !== caller) { + t0 = { + nonNull: true, + caller + }; + $[0] = caller; + $[1] = t0; + } else { + t0 = $[1]; } - const start = pos; - pos++; - const max = state.posMax; - - // scan marker length - while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */) { - pos++; + const { + updateActiveTabValues + } = useEditorContext(t0); + const storage = useStorageContext(); + let t1; + let t2; + if ($[2] !== callback || $[3] !== editor || $[4] !== storage || $[5] !== storageKey || $[6] !== tabProperty || $[7] !== updateActiveTabValues) { + t1 = () => { + if (!editor) { + return; + } + const store = debounce(500, value => { + if (!storage || storageKey === null) { + return; + } + storage.set(storageKey, value); + }); + const updateTab = debounce(100, value_0 => { + updateActiveTabValues({ + [tabProperty]: value_0 + }); + }); + const handleChange = (editorInstance, changeObj) => { + if (!changeObj) { + return; + } + const newValue = editorInstance.getValue(); + store(newValue); + updateTab(newValue); + callback == null ? void 0 : callback(newValue); + }; + editor.on("change", handleChange); + return () => editor.off("change", handleChange); + }; + t2 = [callback, editor, storage, storageKey, tabProperty, updateActiveTabValues]; + $[2] = callback; + $[3] = editor; + $[4] = storage; + $[5] = storageKey; + $[6] = tabProperty; + $[7] = updateActiveTabValues; + $[8] = t1; + $[9] = t2; + } else { + t1 = $[8]; + t2 = $[9]; + } + React.useEffect(t1, t2); +} +function useCompletion(editor, callback, caller) { + const $ = reactCompilerRuntime.c(9); + let t0; + if ($[0] !== caller) { + t0 = { + nonNull: true, + caller + }; + $[0] = caller; + $[1] = t0; + } else { + t0 = $[1]; } - const marker = state.src.slice(start, pos); - const openerLength = marker.length; - if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) { - if (!silent) state.pending += marker; - state.pos += openerLength; - return true; + const { + schema + } = useSchemaContext(t0); + const explorer = useExplorerContext(); + const plugin = usePluginContext(); + let t1; + let t2; + if ($[2] !== callback || $[3] !== editor || $[4] !== explorer || $[5] !== plugin || $[6] !== schema) { + t1 = () => { + if (!editor) { + return; + } + const handleCompletion = (instance, changeObj) => { + onHasCompletion(instance, changeObj, schema, explorer, plugin, type => { + callback == null ? void 0 : callback({ + kind: "Type", + type, + schema: schema || void 0 + }); + }); + }; + editor.on("hasCompletion", handleCompletion); + return () => editor.off("hasCompletion", handleCompletion); + }; + t2 = [callback, editor, explorer, plugin, schema]; + $[2] = callback; + $[3] = editor; + $[4] = explorer; + $[5] = plugin; + $[6] = schema; + $[7] = t1; + $[8] = t2; + } else { + t1 = $[7]; + t2 = $[8]; + } + React.useEffect(t1, t2); +} +function useKeyMap(editor, keys, callback) { + const $ = reactCompilerRuntime.c(5); + let t0; + let t1; + if ($[0] !== callback || $[1] !== editor || $[2] !== keys) { + t0 = () => { + if (!editor) { + return; + } + for (const key of keys) { + editor.removeKeyMap(key); + } + if (callback) { + const keyMap = {}; + for (const key_0 of keys) { + keyMap[key_0] = () => callback(); + } + editor.addKeyMap(keyMap); + } + }; + t1 = [editor, keys, callback]; + $[0] = callback; + $[1] = editor; + $[2] = keys; + $[3] = t0; + $[4] = t1; + } else { + t0 = $[3]; + t1 = $[4]; + } + React.useEffect(t0, t1); +} +const _useCopyQuery = useCopyQuery; +const _useMergeQuery = useMergeQuery; +const _usePrettifyEditors = usePrettifyEditors; +const _useAutoCompleteLeafs = useAutoCompleteLeafs; +function useCopyQuery(t0) { + const $ = reactCompilerRuntime.c(7); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - let matchEnd = pos; - let matchStart; - - // Nothing found in the cache, scan until the end of the line (or until marker is found) - while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) { - matchEnd = matchStart + 1; - - // scan marker length - while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */) { - matchEnd++; - } - const closerLength = matchEnd - matchStart; - if (closerLength === openerLength) { - // Found matching closer length. - if (!silent) { - const token = state.push('code_inline', 'code', 0); - token.markup = marker; - token.content = state.src.slice(pos, matchStart).replace(/\n/g, ' ').replace(/^ (.+) $/, '$1'); + const { + caller, + onCopyQuery + } = t1; + const t2 = caller || _useCopyQuery; + let t3; + if ($[2] !== t2) { + t3 = { + nonNull: true, + caller: t2 + }; + $[2] = t2; + $[3] = t3; + } else { + t3 = $[3]; + } + const { + queryEditor + } = useEditorContext(t3); + let t4; + if ($[4] !== onCopyQuery || $[5] !== queryEditor) { + t4 = () => { + if (!queryEditor) { + return; } - state.pos = matchEnd; - return true; - } - - // Some different length found, put it in cache as upper limit of where closer can be found - state.backticks[closerLength] = matchStart; + const query = queryEditor.getValue(); + copyToClipboard(query); + onCopyQuery == null ? void 0 : onCopyQuery(query); + }; + $[4] = onCopyQuery; + $[5] = queryEditor; + $[6] = t4; + } else { + t4 = $[6]; } - - // Scanned through the end, didn't find anything - state.backticksScanned = true; - if (!silent) state.pending += marker; - state.pos += openerLength; - return true; + return t4; } - -// ~~strike through~~ -// - -// Insert each marker as a separate text token, and add it to delimiter list -// -function strikethrough_tokenize(state, silent) { - const start = state.pos; - const marker = state.src.charCodeAt(start); - if (silent) { - return false; - } - if (marker !== 0x7E /* ~ */) { - return false; +function useMergeQuery(t0) { + const $ = reactCompilerRuntime.c(8); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - const scanned = state.scanDelims(state.pos, true); - let len = scanned.length; - const ch = String.fromCharCode(marker); - if (len < 2) { - return false; + const { + caller + } = t1; + const t2 = caller || _useMergeQuery; + let t3; + if ($[2] !== t2) { + t3 = { + nonNull: true, + caller: t2 + }; + $[2] = t2; + $[3] = t3; + } else { + t3 = $[3]; } - let token; - if (len % 2) { - token = state.push('text', '', 0); - token.content = ch; - len--; + const { + queryEditor + } = useEditorContext(t3); + let t4; + if ($[4] === Symbol.for("react.memo_cache_sentinel")) { + t4 = { + nonNull: true, + caller: _useMergeQuery + }; + $[4] = t4; + } else { + t4 = $[4]; } - for (let i = 0; i < len; i += 2) { - token = state.push('text', '', 0); - token.content = ch + ch; - state.delimiters.push({ - marker, - length: 0, - // disable "rule of 3" length checks meant for emphasis - token: state.tokens.length - 1, - end: -1, - open: scanned.can_open, - close: scanned.can_close - }); + const { + schema + } = useSchemaContext(t4); + let t5; + if ($[5] !== queryEditor || $[6] !== schema) { + t5 = () => { + const documentAST = queryEditor == null ? void 0 : queryEditor.documentAST; + const query = queryEditor == null ? void 0 : queryEditor.getValue(); + if (!documentAST || !query) { + return; + } + queryEditor.setValue(graphql.print(toolkit.mergeAst(documentAST, schema))); + }; + $[5] = queryEditor; + $[6] = schema; + $[7] = t5; + } else { + t5 = $[7]; } - state.pos += scanned.length; - return true; + return t5; } -function postProcess$1(state, delimiters) { - let token; - const loneMarkers = []; - const max = delimiters.length; - for (let i = 0; i < max; i++) { - const startDelim = delimiters[i]; - if (startDelim.marker !== 0x7E /* ~ */) { - continue; - } - if (startDelim.end === -1) { - continue; - } - const endDelim = delimiters[startDelim.end]; - token = state.tokens[startDelim.token]; - token.type = 's_open'; - token.tag = 's'; - token.nesting = 1; - token.markup = '~~'; - token.content = ''; - token = state.tokens[endDelim.token]; - token.type = 's_close'; - token.tag = 's'; - token.nesting = -1; - token.markup = '~~'; - token.content = ''; - if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') { - loneMarkers.push(endDelim.token - 1); - } +function usePrettifyEditors(t0) { + const $ = reactCompilerRuntime.c(8); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - - // If a marker sequence has an odd number of characters, it's splitted - // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the - // start of the sequence. - // - // So, we have to move all those markers after subsequent s_close tags. - // - while (loneMarkers.length) { - const i = loneMarkers.pop(); - let j = i + 1; - while (j < state.tokens.length && state.tokens[j].type === 's_close') { - j++; - } - j--; - if (i !== j) { - token = state.tokens[j]; - state.tokens[j] = state.tokens[i]; - state.tokens[i] = token; - } + const { + caller + } = t1; + const t2 = caller || _usePrettifyEditors; + let t3; + if ($[2] !== t2) { + t3 = { + nonNull: true, + caller: t2 + }; + $[2] = t2; + $[3] = t3; + } else { + t3 = $[3]; } -} - -// Walk through delimiter list and replace text tokens with tags -// -function strikethrough_postProcess(state) { - const tokens_meta = state.tokens_meta; - const max = state.tokens_meta.length; - postProcess$1(state, state.delimiters); - for (let curr = 0; curr < max; curr++) { - if (tokens_meta[curr] && tokens_meta[curr].delimiters) { - postProcess$1(state, tokens_meta[curr].delimiters); - } + const { + queryEditor, + headerEditor, + variableEditor + } = useEditorContext(t3); + let t4; + if ($[4] !== headerEditor || $[5] !== queryEditor || $[6] !== variableEditor) { + t4 = () => { + if (variableEditor) { + const variableEditorContent = variableEditor.getValue(); + try { + const prettifiedVariableEditorContent = JSON.stringify(JSON.parse(variableEditorContent), null, 2); + if (prettifiedVariableEditorContent !== variableEditorContent) { + variableEditor.setValue(prettifiedVariableEditorContent); + } + } catch {} + } + if (headerEditor) { + const headerEditorContent = headerEditor.getValue(); + try { + const prettifiedHeaderEditorContent = JSON.stringify(JSON.parse(headerEditorContent), null, 2); + if (prettifiedHeaderEditorContent !== headerEditorContent) { + headerEditor.setValue(prettifiedHeaderEditorContent); + } + } catch {} + } + if (queryEditor) { + const editorContent = queryEditor.getValue(); + const prettifiedEditorContent = graphql.print(graphql.parse(editorContent)); + if (prettifiedEditorContent !== editorContent) { + queryEditor.setValue(prettifiedEditorContent); + } + } + }; + $[4] = headerEditor; + $[5] = queryEditor; + $[6] = variableEditor; + $[7] = t4; + } else { + t4 = $[7]; } + return t4; } -var r_strikethrough = { - tokenize: strikethrough_tokenize, - postProcess: strikethrough_postProcess -}; - -// Process *this* and _that_ -// - -// Insert each marker as a separate text token, and add it to delimiter list -// -function emphasis_tokenize(state, silent) { - const start = state.pos; - const marker = state.src.charCodeAt(start); - if (silent) { - return false; +function useAutoCompleteLeafs(t0) { + const $ = reactCompilerRuntime.c(10); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { - return false; + const { + getDefaultFieldNames, + caller + } = t1; + const t2 = caller || _useAutoCompleteLeafs; + let t3; + if ($[2] !== t2) { + t3 = { + nonNull: true, + caller: t2 + }; + $[2] = t2; + $[3] = t3; + } else { + t3 = $[3]; } - const scanned = state.scanDelims(state.pos, marker === 0x2A); - for (let i = 0; i < scanned.length; i++) { - const token = state.push('text', '', 0); - token.content = String.fromCharCode(marker); - state.delimiters.push({ - // Char code of the starting marker (number). - // - marker, - // Total length of these series of delimiters. - // - length: scanned.length, - // A position of the token this delimiter corresponds to. - // - token: state.tokens.length - 1, - // If this delimiter is matched as a valid opener, `end` will be - // equal to its position, otherwise it's `-1`. - // - end: -1, - // Boolean flags that determine if this delimiter could open or close - // an emphasis. - // - open: scanned.can_open, - close: scanned.can_close - }); + const { + schema + } = useSchemaContext(t3); + const t4 = caller || _useAutoCompleteLeafs; + let t5; + if ($[4] !== t4) { + t5 = { + nonNull: true, + caller: t4 + }; + $[4] = t4; + $[5] = t5; + } else { + t5 = $[5]; } - state.pos += scanned.length; - return true; -} -function postProcess(state, delimiters) { - const max = delimiters.length; - for (let i = max - 1; i >= 0; i--) { - const startDelim = delimiters[i]; - if (startDelim.marker !== 0x5F /* _ */ && startDelim.marker !== 0x2A /* * */) { - continue; - } - - // Process only opening markers - if (startDelim.end === -1) { - continue; - } - const endDelim = delimiters[startDelim.end]; - - // If the previous delimiter has the same marker and is adjacent to this one, - // merge those into one strong delimiter. - // - // `whatever` -> `whatever` - // - const isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && - // check that first two markers match and adjacent - delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 && - // check that last two markers are adjacent (we can safely assume they match) - delimiters[startDelim.end + 1].token === endDelim.token + 1; - const ch = String.fromCharCode(startDelim.marker); - const token_o = state.tokens[startDelim.token]; - token_o.type = isStrong ? 'strong_open' : 'em_open'; - token_o.tag = isStrong ? 'strong' : 'em'; - token_o.nesting = 1; - token_o.markup = isStrong ? ch + ch : ch; - token_o.content = ''; - const token_c = state.tokens[endDelim.token]; - token_c.type = isStrong ? 'strong_close' : 'em_close'; - token_c.tag = isStrong ? 'strong' : 'em'; - token_c.nesting = -1; - token_c.markup = isStrong ? ch + ch : ch; - token_c.content = ''; - if (isStrong) { - state.tokens[delimiters[i - 1].token].content = ''; - state.tokens[delimiters[startDelim.end + 1].token].content = ''; - i--; - } + const { + queryEditor + } = useEditorContext(t5); + let t6; + if ($[6] !== getDefaultFieldNames || $[7] !== queryEditor || $[8] !== schema) { + t6 = () => { + if (!queryEditor) { + return; + } + const query = queryEditor.getValue(); + const { + insertions, + result + } = toolkit.fillLeafs(schema, query, getDefaultFieldNames); + if (insertions && insertions.length > 0) { + queryEditor.operation(() => { + const cursor = queryEditor.getCursor(); + const cursorIndex = queryEditor.indexFromPos(cursor); + queryEditor.setValue(result || ""); + let added; + added = 0; + const markers = insertions.map(t7 => { + const { + index, + string + } = t7; + added = added + string.length; + return queryEditor.markText(queryEditor.posFromIndex(index + added), queryEditor.posFromIndex(index + added), { + className: "auto-inserted-leaf", + clearOnEnter: true, + title: "Automatically added leaf fields" + }); + }); + setTimeout(() => { + for (const marker of markers) { + marker.clear(); + } + }, 7e3); + let newCursorIndex = cursorIndex; + for (const { + index: index_0, + string: string_0 + } of insertions) { + if (index_0 < cursorIndex) { + newCursorIndex = newCursorIndex + string_0.length; + } + } + queryEditor.setCursor(queryEditor.posFromIndex(newCursorIndex)); + }); + } + return result; + }; + $[6] = getDefaultFieldNames; + $[7] = queryEditor; + $[8] = schema; + $[9] = t6; + } else { + t6 = $[9]; } + return t6; } +const useEditorState = editor => { + "use no memo"; -// Walk through delimiter list and replace text tokens with tags -// -function emphasis_post_process(state) { - const tokens_meta = state.tokens_meta; - const max = state.tokens_meta.length; - postProcess(state, state.delimiters); - for (let curr = 0; curr < max; curr++) { - if (tokens_meta[curr] && tokens_meta[curr].delimiters) { - postProcess(state, tokens_meta[curr].delimiters); - } + var _ref2; + const context = useEditorContext({ + nonNull: true + }); + const editorInstance = context[`${editor}Editor`]; + let valueString = ""; + const editorValue = (_ref2 = editorInstance == null ? void 0 : editorInstance.getValue()) !== null && _ref2 !== void 0 ? _ref2 : false; + if (editorValue && editorValue.length > 0) { + valueString = editorValue; + } + const handleEditorValue = React.useCallback(value => editorInstance == null ? void 0 : editorInstance.setValue(value), [editorInstance]); + return React.useMemo(() => [valueString, handleEditorValue], [valueString, handleEditorValue]); +}; +const useOperationsEditorState = () => { + return useEditorState("query"); +}; +const useVariablesEditorState = () => { + return useEditorState("variable"); +}; +const useHeadersEditorState = () => { + return useEditorState("header"); +}; +function useOptimisticState(t0) { + const $ = reactCompilerRuntime.c(12); + const [upstreamState, upstreamSetState] = t0; + let t1; + if ($[0] !== upstreamState) { + t1 = { + pending: null, + last: upstreamState + }; + $[0] = upstreamState; + $[1] = t1; + } else { + t1 = $[1]; + } + const lastStateRef = React.useRef(t1); + const [state, setOperationsText] = React.useState(upstreamState); + let t2; + let t3; + if ($[2] !== state || $[3] !== upstreamSetState || $[4] !== upstreamState) { + t2 = () => { + if (lastStateRef.current.last === upstreamState) ;else { + lastStateRef.current.last = upstreamState; + if (lastStateRef.current.pending === null) { + setOperationsText(upstreamState); + } else { + if (lastStateRef.current.pending === upstreamState) { + lastStateRef.current.pending = null; + if (upstreamState !== state) { + lastStateRef.current.pending = state; + upstreamSetState(state); + } + } else { + lastStateRef.current.pending = null; + setOperationsText(upstreamState); + } + } + } + }; + t3 = [upstreamState, state, upstreamSetState]; + $[2] = state; + $[3] = upstreamSetState; + $[4] = upstreamState; + $[5] = t2; + $[6] = t3; + } else { + t2 = $[5]; + t3 = $[6]; + } + React.useEffect(t2, t3); + let t4; + if ($[7] !== upstreamSetState) { + t4 = newState => { + setOperationsText(newState); + if (lastStateRef.current.pending === null && lastStateRef.current.last !== newState) { + lastStateRef.current.pending = newState; + upstreamSetState(newState); + } + }; + $[7] = upstreamSetState; + $[8] = t4; + } else { + t4 = $[8]; + } + const setState = t4; + let t5; + if ($[9] !== setState || $[10] !== state) { + t5 = [state, setState]; + $[9] = setState; + $[10] = state; + $[11] = t5; + } else { + t5 = $[11]; + } + return t5; +} +function importCodeMirrorImports$3() { + return importCodeMirror([// @ts-expect-error + Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/mode/javascript/javascript.js */ "../../../node_modules/codemirror/mode/javascript/javascript.js")))]); +} +const _useHeaderEditor = useHeaderEditor; +function useHeaderEditor(t0, caller) { + const $ = reactCompilerRuntime.c(17); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; + } + const { + editorTheme: t2, + keyMap: t3, + onEdit, + readOnly: t4 + } = t1; + const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2; + const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3; + const readOnly = t4 === void 0 ? false : t4; + const t5 = caller || _useHeaderEditor; + let t6; + if ($[2] !== t5) { + t6 = { + nonNull: true, + caller: t5 + }; + $[2] = t5; + $[3] = t6; + } else { + t6 = $[3]; + } + const { + initialHeaders, + headerEditor, + setHeaderEditor, + shouldPersistHeaders + } = useEditorContext(t6); + const executionContext = useExecutionContext(); + const t7 = caller || _useHeaderEditor; + let t8; + if ($[4] !== t7) { + t8 = { + caller: t7 + }; + $[4] = t7; + $[5] = t8; + } else { + t8 = $[5]; + } + const merge = useMergeQuery(t8); + const t9 = caller || _useHeaderEditor; + let t10; + if ($[6] !== t9) { + t10 = { + caller: t9 + }; + $[6] = t9; + $[7] = t10; + } else { + t10 = $[7]; + } + const prettify = usePrettifyEditors(t10); + const ref = React.useRef(null); + let t11; + let t12; + if ($[8] !== editorTheme || $[9] !== initialHeaders || $[10] !== readOnly || $[11] !== setHeaderEditor) { + t11 = () => { + let isActive; + isActive = true; + importCodeMirrorImports$3().then(CodeMirror => { + if (!isActive) { + return; + } + const container = ref.current; + if (!container) { + return; + } + const newEditor = CodeMirror(container, { + value: initialHeaders, + lineNumbers: true, + tabSize: 2, + mode: { + name: "javascript", + json: true + }, + theme: editorTheme, + autoCloseBrackets: true, + matchBrackets: true, + showCursorWhenSelecting: true, + readOnly: readOnly ? "nocursor" : false, + foldGutter: true, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + extraKeys: commonKeys + }); + newEditor.addKeyMap({ + "Cmd-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Ctrl-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Alt-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Shift-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + } + }); + newEditor.on("keyup", _temp$2); + setHeaderEditor(newEditor); + }); + return () => { + isActive = false; + }; + }; + t12 = [editorTheme, initialHeaders, readOnly, setHeaderEditor]; + $[8] = editorTheme; + $[9] = initialHeaders; + $[10] = readOnly; + $[11] = setHeaderEditor; + $[12] = t11; + $[13] = t12; + } else { + t11 = $[12]; + t12 = $[13]; + } + React.useEffect(t11, t12); + useSynchronizeOption(headerEditor, "keyMap", keyMap); + useChangeHandler(headerEditor, onEdit, shouldPersistHeaders ? STORAGE_KEY$3 : null, "headers", _useHeaderEditor); + let t13; + if ($[14] === Symbol.for("react.memo_cache_sentinel")) { + t13 = ["Cmd-Enter", "Ctrl-Enter"]; + $[14] = t13; + } else { + t13 = $[14]; + } + useKeyMap(headerEditor, t13, executionContext == null ? void 0 : executionContext.run); + let t14; + if ($[15] === Symbol.for("react.memo_cache_sentinel")) { + t14 = ["Shift-Ctrl-P"]; + $[15] = t14; + } else { + t14 = $[15]; + } + useKeyMap(headerEditor, t14, prettify); + let t15; + if ($[16] === Symbol.for("react.memo_cache_sentinel")) { + t15 = ["Shift-Ctrl-M"]; + $[16] = t15; + } else { + t15 = $[16]; } + useKeyMap(headerEditor, t15, merge); + return ref; } -var r_emphasis = { - tokenize: emphasis_tokenize, - postProcess: emphasis_post_process -}; - -// Process [link]( "stuff") - -function link(state, silent) { - let code, label, res, ref; - let href = ''; - let title = ''; - let start = state.pos; - let parseReference = true; - if (state.src.charCodeAt(state.pos) !== 0x5B /* [ */) { - return false; +function _temp$2(editorInstance, event) { + const { + code, + key, + shiftKey + } = event; + const isLetter = code.startsWith("Key"); + const isNumber = !shiftKey && code.startsWith("Digit"); + if (isLetter || isNumber || key === "_" || key === '"') { + editorInstance.execCommand("autocomplete"); + } +} +const STORAGE_KEY$3 = "headers"; +const invalidCharacters = Array.from({ + length: 11 +}, (_, i) => { + return String.fromCharCode(8192 + i); +}).concat(["\u2028", "\u2029", " ", " "]); +const sanitizeRegex = new RegExp("[" + invalidCharacters.join("") + "]", "g"); +function normalizeWhitespace(line) { + return line.replace(sanitizeRegex, " "); +} +function importCodeMirrorImports$2() { + return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/comment/comment.js */ "../../../node_modules/codemirror/addon/comment/comment.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/search.js */ "../../../node_modules/codemirror/addon/search/search.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/hint.js */ "../../codemirror-graphql/esm/hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/lint.js */ "../../codemirror-graphql/esm/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/info.js */ "../../codemirror-graphql/esm/info.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/jump.js */ "../../codemirror-graphql/esm/jump.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/mode.js */ "../../codemirror-graphql/esm/mode.js")))]); +} +const _useQueryEditor = useQueryEditor; +function updateVariableEditor(variableEditor, operationFacts) { + variableEditor.state.lint.linterOptions.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType; + variableEditor.options.lint.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType; + variableEditor.options.hintOptions.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType; +} +function updateEditorSchema(editor, schema) { + editor.state.lint.linterOptions.schema = schema; + editor.options.lint.schema = schema; + editor.options.hintOptions.schema = schema; + editor.options.info.schema = schema; + editor.options.jump.schema = schema; +} +function updateEditorValidationRules(editor, validationRules) { + editor.state.lint.linterOptions.validationRules = validationRules; + editor.options.lint.validationRules = validationRules; +} +function updateEditorExternalFragments(editor, externalFragmentList) { + editor.state.lint.linterOptions.externalFragments = externalFragmentList; + editor.options.lint.externalFragments = externalFragmentList; + editor.options.hintOptions.externalFragments = externalFragmentList; +} +function useQueryEditor(t0, caller) { + const $ = reactCompilerRuntime.c(41); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - const oldPos = state.pos; - const max = state.posMax; - const labelStart = state.pos + 1; - const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true); - - // parser failed to find ']', so it's not a valid link - if (labelEnd < 0) { - return false; + const { + editorTheme: t2, + keyMap: t3, + onClickReference, + onCopyQuery, + onEdit, + readOnly: t4 + } = t1; + const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2; + const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3; + const readOnly = t4 === void 0 ? false : t4; + const t5 = caller || _useQueryEditor; + let t6; + if ($[2] !== t5) { + t6 = { + nonNull: true, + caller: t5 + }; + $[2] = t5; + $[3] = t6; + } else { + t6 = $[3]; } - let pos = labelEnd + 1; - if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) { - // - // Inline link - // - - // might have found a valid shortcut link, disable reference parsing - parseReference = false; - - // [link]( "title" ) - // ^^ skipping these spaces - pos++; - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; + const { + schema + } = useSchemaContext(t6); + const t7 = caller || _useQueryEditor; + let t8; + if ($[4] !== t7) { + t8 = { + nonNull: true, + caller: t7 + }; + $[4] = t7; + $[5] = t8; + } else { + t8 = $[5]; + } + const { + externalFragments, + initialQuery, + queryEditor, + setOperationName, + setQueryEditor, + validationRules, + variableEditor, + updateActiveTabValues + } = useEditorContext(t8); + const executionContext = useExecutionContext(); + const storage = useStorageContext(); + const explorer = useExplorerContext(); + const plugin = usePluginContext(); + const t9 = caller || _useQueryEditor; + let t10; + if ($[6] !== onCopyQuery || $[7] !== t9) { + t10 = { + caller: t9, + onCopyQuery + }; + $[6] = onCopyQuery; + $[7] = t9; + $[8] = t10; + } else { + t10 = $[8]; + } + const copy = useCopyQuery(t10); + const t11 = caller || _useQueryEditor; + let t12; + if ($[9] !== t11) { + t12 = { + caller: t11 + }; + $[9] = t11; + $[10] = t12; + } else { + t12 = $[10]; + } + const merge = useMergeQuery(t12); + const t13 = caller || _useQueryEditor; + let t14; + if ($[11] !== t13) { + t14 = { + caller: t13 + }; + $[11] = t13; + $[12] = t14; + } else { + t14 = $[12]; + } + const prettify = usePrettifyEditors(t14); + const ref = React.useRef(null); + const codeMirrorRef = React.useRef(); + const onClickReferenceRef = React.useRef(_temp$1); + let t15; + let t16; + if ($[13] !== explorer || $[14] !== onClickReference || $[15] !== plugin) { + t15 = () => { + onClickReferenceRef.current = reference => { + if (!explorer || !plugin) { + return; + } + plugin.setVisiblePlugin(DOC_EXPLORER_PLUGIN); + bb47: switch (reference.kind) { + case "Type": + { + explorer.push({ + name: reference.type.name, + def: reference.type + }); + break bb47; + } + case "Field": + { + explorer.push({ + name: reference.field.name, + def: reference.field + }); + break bb47; + } + case "Argument": + { + if (reference.field) { + explorer.push({ + name: reference.field.name, + def: reference.field + }); + } + break bb47; + } + case "EnumValue": + { + if (reference.type) { + explorer.push({ + name: reference.type.name, + def: reference.type + }); + } + } + } + onClickReference == null ? void 0 : onClickReference(reference); + }; + }; + t16 = [explorer, onClickReference, plugin]; + $[13] = explorer; + $[14] = onClickReference; + $[15] = plugin; + $[16] = t15; + $[17] = t16; + } else { + t15 = $[16]; + t16 = $[17]; + } + React.useEffect(t15, t16); + let t17; + let t18; + if ($[18] !== editorTheme || $[19] !== initialQuery || $[20] !== readOnly || $[21] !== setQueryEditor) { + t17 = () => { + let isActive; + isActive = true; + importCodeMirrorImports$2().then(CodeMirror => { + if (!isActive) { + return; + } + codeMirrorRef.current = CodeMirror; + const container = ref.current; + if (!container) { + return; + } + const newEditor = CodeMirror(container, { + value: initialQuery, + lineNumbers: true, + tabSize: 2, + foldGutter: true, + mode: "graphql", + theme: editorTheme, + autoCloseBrackets: true, + matchBrackets: true, + showCursorWhenSelecting: true, + readOnly: readOnly ? "nocursor" : false, + lint: { + schema: void 0, + validationRules: null, + externalFragments: void 0 + }, + hintOptions: { + schema: void 0, + closeOnUnfocus: false, + completeSingle: false, + container, + externalFragments: void 0, + autocompleteOptions: { + mode: graphqlLanguageService.GraphQLDocumentMode.EXECUTABLE + } + }, + info: { + schema: void 0, + renderDescription: _temp2, + onClick(reference_0) { + onClickReferenceRef.current(reference_0); + } + }, + jump: { + schema: void 0, + onClick(reference_1) { + onClickReferenceRef.current(reference_1); + } + }, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + extraKeys: { + ...commonKeys, + "Cmd-S"() {}, + "Ctrl-S"() {} + } + }); + newEditor.addKeyMap({ + "Cmd-Space"() { + newEditor.showHint({ + completeSingle: true, + container + }); + }, + "Ctrl-Space"() { + newEditor.showHint({ + completeSingle: true, + container + }); + }, + "Alt-Space"() { + newEditor.showHint({ + completeSingle: true, + container + }); + }, + "Shift-Space"() { + newEditor.showHint({ + completeSingle: true, + container + }); + }, + "Shift-Alt-Space"() { + newEditor.showHint({ + completeSingle: true, + container + }); + } + }); + newEditor.on("keyup", _temp3); + let showingHints; + showingHints = false; + newEditor.on("startCompletion", () => { + showingHints = true; + }); + newEditor.on("endCompletion", () => { + showingHints = false; + }); + newEditor.on("keydown", (editorInstance_0, event_0) => { + if (event_0.key === "Escape" && showingHints) { + event_0.stopPropagation(); + } + }); + newEditor.on("beforeChange", _temp4); + newEditor.documentAST = null; + newEditor.operationName = null; + newEditor.operations = null; + newEditor.variableToType = null; + setQueryEditor(newEditor); + }); + return () => { + isActive = false; + }; + }; + t18 = [editorTheme, initialQuery, readOnly, setQueryEditor]; + $[18] = editorTheme; + $[19] = initialQuery; + $[20] = readOnly; + $[21] = setQueryEditor; + $[22] = t17; + $[23] = t18; + } else { + t17 = $[22]; + t18 = $[23]; + } + React.useEffect(t17, t18); + useSynchronizeOption(queryEditor, "keyMap", keyMap); + let t19; + let t20; + if ($[24] !== onEdit || $[25] !== queryEditor || $[26] !== schema || $[27] !== setOperationName || $[28] !== storage || $[29] !== updateActiveTabValues || $[30] !== variableEditor) { + t19 = () => { + if (!queryEditor) { + return; } - } - if (pos >= max) { - return false; - } - - // [link]( "title" ) - // ^^^^^^ parsing link destination - start = pos; - res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); - if (res.ok) { - href = state.md.normalizeLink(res.str); - if (state.md.validateLink(href)) { - pos = res.pos; - } else { - href = ''; + const getAndUpdateOperationFacts = function getAndUpdateOperationFacts2(editorInstance_2) { + var _editorInstance_2$ope, _editorInstance_2$ope2, _ref3, _ref4; + var _a; + const operationFacts = graphqlLanguageService.getOperationFacts(schema, editorInstance_2.getValue()); + const operationName = toolkit.getSelectedOperationName((_editorInstance_2$ope = editorInstance_2.operations) !== null && _editorInstance_2$ope !== void 0 ? _editorInstance_2$ope : void 0, (_editorInstance_2$ope2 = editorInstance_2.operationName) !== null && _editorInstance_2$ope2 !== void 0 ? _editorInstance_2$ope2 : void 0, operationFacts == null ? void 0 : operationFacts.operations); + editorInstance_2.documentAST = (_ref3 = operationFacts == null ? void 0 : operationFacts.documentAST) !== null && _ref3 !== void 0 ? _ref3 : null; + editorInstance_2.operationName = operationName !== null && operationName !== void 0 ? operationName : null; + editorInstance_2.operations = (_ref4 = operationFacts == null ? void 0 : operationFacts.operations) !== null && _ref4 !== void 0 ? _ref4 : null; + if (variableEditor) { + updateVariableEditor(variableEditor, operationFacts); + (_a = codeMirrorRef.current) == null ? void 0 : _a.signal(variableEditor, "change", variableEditor); + } + return operationFacts ? { + ...operationFacts, + operationName + } : null; + }; + const handleChange = debounce(100, editorInstance_3 => { + var _ref5; + const query = editorInstance_3.getValue(); + storage == null ? void 0 : storage.set(STORAGE_KEY_QUERY, query); + const currentOperationName = editorInstance_3.operationName; + const operationFacts_0 = getAndUpdateOperationFacts(editorInstance_3); + if ((operationFacts_0 == null ? void 0 : operationFacts_0.operationName) !== void 0) { + storage == null ? void 0 : storage.set(STORAGE_KEY_OPERATION_NAME, operationFacts_0.operationName); + } + onEdit == null ? void 0 : onEdit(query, operationFacts_0 == null ? void 0 : operationFacts_0.documentAST); + if ((operationFacts_0 == null ? void 0 : operationFacts_0.operationName) && currentOperationName !== operationFacts_0.operationName) { + setOperationName(operationFacts_0.operationName); + } + updateActiveTabValues({ + query, + operationName: (_ref5 = operationFacts_0 == null ? void 0 : operationFacts_0.operationName) !== null && _ref5 !== void 0 ? _ref5 : null + }); + }); + getAndUpdateOperationFacts(queryEditor); + queryEditor.on("change", handleChange); + return () => queryEditor.off("change", handleChange); + }; + t20 = [onEdit, queryEditor, schema, setOperationName, storage, variableEditor, updateActiveTabValues]; + $[24] = onEdit; + $[25] = queryEditor; + $[26] = schema; + $[27] = setOperationName; + $[28] = storage; + $[29] = updateActiveTabValues; + $[30] = variableEditor; + $[31] = t19; + $[32] = t20; + } else { + t19 = $[31]; + t20 = $[32]; + } + React.useEffect(t19, t20); + useSynchronizeSchema(queryEditor, schema !== null && schema !== void 0 ? schema : null, codeMirrorRef); + useSynchronizeValidationRules(queryEditor, validationRules !== null && validationRules !== void 0 ? validationRules : null, codeMirrorRef); + useSynchronizeExternalFragments(queryEditor, externalFragments, codeMirrorRef); + useCompletion(queryEditor, onClickReference || null, _useQueryEditor); + const run = executionContext == null ? void 0 : executionContext.run; + let t21; + if ($[33] !== queryEditor || $[34] !== run || $[35] !== setOperationName) { + t21 = () => { + var _a; + if (!run || !queryEditor || !queryEditor.operations || !queryEditor.hasFocus()) { + run == null ? void 0 : run(); + return; } - - // [link]( "title" ) - // ^^ skipping these spaces - start = pos; - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; + const cursorIndex = queryEditor.indexFromPos(queryEditor.getCursor()); + let operationName_0; + for (const operation of queryEditor.operations) { + if (operation.loc && operation.loc.start <= cursorIndex && operation.loc.end >= cursorIndex) { + operationName_0 = (_a = operation.name) == null ? void 0 : _a.value; } } - - // [link]( "title" ) - // ^^^^^^^ parsing link title - res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); - if (pos < max && start !== pos && res.ok) { - title = res.str; - pos = res.pos; - - // [link]( "title" ) - // ^^ skipping these spaces - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; - } - } + if (operationName_0 && operationName_0 !== queryEditor.operationName) { + setOperationName(operationName_0); } - } - if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) { - // parsing a valid shortcut link failed, fallback to reference - parseReference = true; - } - pos++; + run(); + }; + $[33] = queryEditor; + $[34] = run; + $[35] = setOperationName; + $[36] = t21; + } else { + t21 = $[36]; } - if (parseReference) { - // - // Link reference - // - if (typeof state.env.references === 'undefined') { - return false; - } - if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) { - start = pos + 1; - pos = state.md.helpers.parseLinkLabel(state, pos); - if (pos >= 0) { - label = state.src.slice(start, pos++); - } else { - pos = labelEnd + 1; - } - } else { - pos = labelEnd + 1; - } - - // covers label === '' and label === undefined - // (collapsed reference link and shortcut reference link respectively) - if (!label) { - label = state.src.slice(labelStart, labelEnd); - } - ref = state.env.references[normalizeReference(label)]; - if (!ref) { - state.pos = oldPos; - return false; - } - href = ref.href; - title = ref.title; + const runAtCursor = t21; + let t22; + if ($[37] === Symbol.for("react.memo_cache_sentinel")) { + t22 = ["Cmd-Enter", "Ctrl-Enter"]; + $[37] = t22; + } else { + t22 = $[37]; } - - // - // We found the end of the link, and know for a fact it's a valid link; - // so all that's left to do is to call tokenizer. - // - if (!silent) { - state.pos = labelStart; - state.posMax = labelEnd; - const token_o = state.push('link_open', 'a', 1); - const attrs = [['href', href]]; - token_o.attrs = attrs; - if (title) { - attrs.push(['title', title]); - } - state.linkLevel++; - state.md.inline.tokenize(state); - state.linkLevel--; - state.push('link_close', 'a', -1); + useKeyMap(queryEditor, t22, runAtCursor); + let t23; + if ($[38] === Symbol.for("react.memo_cache_sentinel")) { + t23 = ["Shift-Ctrl-C"]; + $[38] = t23; + } else { + t23 = $[38]; } - state.pos = pos; - state.posMax = max; - return true; -} - -// Process ![image]( "title") - -function image(state, silent) { - let code, content, label, pos, ref, res, title, start; - let href = ''; - const oldPos = state.pos; - const max = state.posMax; - if (state.src.charCodeAt(state.pos) !== 0x21 /* ! */) { - return false; + useKeyMap(queryEditor, t23, copy); + let t24; + if ($[39] === Symbol.for("react.memo_cache_sentinel")) { + t24 = ["Shift-Ctrl-P", "Shift-Ctrl-F"]; + $[39] = t24; + } else { + t24 = $[39]; } - if (state.src.charCodeAt(state.pos + 1) !== 0x5B /* [ */) { - return false; + useKeyMap(queryEditor, t24, prettify); + let t25; + if ($[40] === Symbol.for("react.memo_cache_sentinel")) { + t25 = ["Shift-Ctrl-M"]; + $[40] = t25; + } else { + t25 = $[40]; } - const labelStart = state.pos + 2; - const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false); - - // parser failed to find ']', so it's not a valid link - if (labelEnd < 0) { - return false; + useKeyMap(queryEditor, t25, merge); + return ref; +} +function _temp4(editorInstance_1, change) { + var _a; + if (change.origin === "paste") { + const text_0 = change.text.map(normalizeWhitespace); + (_a = change.update) == null ? void 0 : _a.call(change, change.from, change.to, text_0); } - pos = labelEnd + 1; - if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) { - // - // Inline link - // - - // [link]( "title" ) - // ^^ skipping these spaces - pos++; - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; +} +function _temp3(editorInstance, event) { + if (AUTO_COMPLETE_AFTER_KEY.test(event.key)) { + editorInstance.execCommand("autocomplete"); + } +} +function _temp2(text) { + return markdown.render(text); +} +function _temp$1() {} +function useSynchronizeSchema(editor, schema, codeMirrorRef) { + const $ = reactCompilerRuntime.c(5); + let t0; + let t1; + if ($[0] !== codeMirrorRef || $[1] !== editor || $[2] !== schema) { + t0 = () => { + if (!editor) { + return; } - } - if (pos >= max) { - return false; - } - - // [link]( "title" ) - // ^^^^^^ parsing link destination - start = pos; - res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); - if (res.ok) { - href = state.md.normalizeLink(res.str); - if (state.md.validateLink(href)) { - pos = res.pos; - } else { - href = ''; + const didChange = editor.options.lint.schema !== schema; + updateEditorSchema(editor, schema); + if (didChange && codeMirrorRef.current) { + codeMirrorRef.current.signal(editor, "change", editor); } - } - - // [link]( "title" ) - // ^^ skipping these spaces - start = pos; - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; + }; + t1 = [editor, schema, codeMirrorRef]; + $[0] = codeMirrorRef; + $[1] = editor; + $[2] = schema; + $[3] = t0; + $[4] = t1; + } else { + t0 = $[3]; + t1 = $[4]; + } + React.useEffect(t0, t1); +} +function useSynchronizeValidationRules(editor, validationRules, codeMirrorRef) { + const $ = reactCompilerRuntime.c(5); + let t0; + let t1; + if ($[0] !== codeMirrorRef || $[1] !== editor || $[2] !== validationRules) { + t0 = () => { + if (!editor) { + return; } - } - - // [link]( "title" ) - // ^^^^^^^ parsing link title - res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); - if (pos < max && start !== pos && res.ok) { - title = res.str; - pos = res.pos; - - // [link]( "title" ) - // ^^ skipping these spaces - for (; pos < max; pos++) { - code = state.src.charCodeAt(pos); - if (!isSpace(code) && code !== 0x0A) { - break; - } + const didChange = editor.options.lint.validationRules !== validationRules; + updateEditorValidationRules(editor, validationRules); + if (didChange && codeMirrorRef.current) { + codeMirrorRef.current.signal(editor, "change", editor); } - } else { - title = ''; - } - if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) { - state.pos = oldPos; - return false; - } - pos++; + }; + t1 = [editor, validationRules, codeMirrorRef]; + $[0] = codeMirrorRef; + $[1] = editor; + $[2] = validationRules; + $[3] = t0; + $[4] = t1; } else { - // - // Link reference - // - if (typeof state.env.references === 'undefined') { - return false; + t0 = $[3]; + t1 = $[4]; + } + React.useEffect(t0, t1); +} +function useSynchronizeExternalFragments(editor, externalFragments, codeMirrorRef) { + const $ = reactCompilerRuntime.c(9); + let t0; + if ($[0] !== externalFragments) { + t0 = externalFragments.values(); + $[0] = externalFragments; + $[1] = t0; + } else { + t0 = $[1]; + } + let t1; + if ($[2] !== t0) { + t1 = [...t0]; + $[2] = t0; + $[3] = t1; + } else { + t1 = $[3]; + } + const externalFragmentList = t1; + let t2; + let t3; + if ($[4] !== codeMirrorRef || $[5] !== editor || $[6] !== externalFragmentList) { + t2 = () => { + if (!editor) { + return; + } + const didChange = editor.options.lint.externalFragments !== externalFragmentList; + updateEditorExternalFragments(editor, externalFragmentList); + if (didChange && codeMirrorRef.current) { + codeMirrorRef.current.signal(editor, "change", editor); + } + }; + t3 = [editor, externalFragmentList, codeMirrorRef]; + $[4] = codeMirrorRef; + $[5] = editor; + $[6] = externalFragmentList; + $[7] = t2; + $[8] = t3; + } else { + t2 = $[7]; + t3 = $[8]; + } + React.useEffect(t2, t3); +} +const AUTO_COMPLETE_AFTER_KEY = /^[a-zA-Z0-9_@(]$/; +const STORAGE_KEY_QUERY = "query"; +const STORAGE_KEY_OPERATION_NAME = "operationName"; +function getDefaultTabState({ + defaultQuery, + defaultHeaders, + headers, + defaultTabs, + query, + variables, + storage, + shouldPersistHeaders +}) { + const storedState = storage == null ? void 0 : storage.get(STORAGE_KEY$2); + try { + if (!storedState) { + throw new Error("Storage for tabs is empty"); } - if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) { - start = pos + 1; - pos = state.md.helpers.parseLinkLabel(state, pos); - if (pos >= 0) { - label = state.src.slice(start, pos++); + const parsed = JSON.parse(storedState); + const headersForHash = shouldPersistHeaders ? headers : void 0; + if (isTabsState(parsed)) { + const expectedHash = hashFromTabContents({ + query, + variables, + headers: headersForHash + }); + let matchingTabIndex = -1; + for (let index = 0; index < parsed.tabs.length; index++) { + const tab = parsed.tabs[index]; + tab.hash = hashFromTabContents({ + query: tab.query, + variables: tab.variables, + headers: tab.headers + }); + if (tab.hash === expectedHash) { + matchingTabIndex = index; + } + } + if (matchingTabIndex >= 0) { + parsed.activeTabIndex = matchingTabIndex; } else { - pos = labelEnd + 1; + const operationName = query ? fuzzyExtractOperationName(query) : null; + parsed.tabs.push({ + id: guid(), + hash: expectedHash, + title: operationName || DEFAULT_TITLE, + query, + variables, + headers, + operationName, + response: null + }); + parsed.activeTabIndex = parsed.tabs.length - 1; } - } else { - pos = labelEnd + 1; - } - - // covers label === '' and label === undefined - // (collapsed reference link and shortcut reference link respectively) - if (!label) { - label = state.src.slice(labelStart, labelEnd); - } - ref = state.env.references[normalizeReference(label)]; - if (!ref) { - state.pos = oldPos; - return false; + return parsed; } - href = ref.href; - title = ref.title; + throw new Error("Storage for tabs is invalid"); + } catch { + return { + activeTabIndex: 0, + tabs: (defaultTabs || [{ + query: query !== null && query !== void 0 ? query : defaultQuery, + variables, + headers: headers !== null && headers !== void 0 ? headers : defaultHeaders + }]).map(createTab) + }; } - - // - // We found the end of the link, and know for a fact it's a valid link; - // so all that's left to do is to call tokenizer. - // - if (!silent) { - content = state.src.slice(labelStart, labelEnd); - const tokens = []; - state.md.inline.parse(content, state.md, state.env, tokens); - const token = state.push('image', 'img', 0); - const attrs = [['src', href], ['alt', '']]; - token.attrs = attrs; - token.children = tokens; - token.content = content; - if (title) { - attrs.push(['title', title]); - } +} +function isTabsState(obj) { + return obj && typeof obj === "object" && !Array.isArray(obj) && hasNumberKey(obj, "activeTabIndex") && "tabs" in obj && Array.isArray(obj.tabs) && obj.tabs.every(isTabState); +} +function isTabState(obj) { + return obj && typeof obj === "object" && !Array.isArray(obj) && hasStringKey(obj, "id") && hasStringKey(obj, "title") && hasStringOrNullKey(obj, "query") && hasStringOrNullKey(obj, "variables") && hasStringOrNullKey(obj, "headers") && hasStringOrNullKey(obj, "operationName") && hasStringOrNullKey(obj, "response"); +} +function hasNumberKey(obj, key) { + return key in obj && typeof obj[key] === "number"; +} +function hasStringKey(obj, key) { + return key in obj && typeof obj[key] === "string"; +} +function hasStringOrNullKey(obj, key) { + return key in obj && (typeof obj[key] === "string" || obj[key] === null); +} +function useSynchronizeActiveTabValues({ + queryEditor, + variableEditor, + headerEditor, + responseEditor +}) { + return React.useCallback(state => { + var _ref6, _ref7, _ref8, _ref9, _ref10; + const query = (_ref6 = queryEditor == null ? void 0 : queryEditor.getValue()) !== null && _ref6 !== void 0 ? _ref6 : null; + const variables = (_ref7 = variableEditor == null ? void 0 : variableEditor.getValue()) !== null && _ref7 !== void 0 ? _ref7 : null; + const headers = (_ref8 = headerEditor == null ? void 0 : headerEditor.getValue()) !== null && _ref8 !== void 0 ? _ref8 : null; + const operationName = (_ref9 = queryEditor == null ? void 0 : queryEditor.operationName) !== null && _ref9 !== void 0 ? _ref9 : null; + const response = (_ref10 = responseEditor == null ? void 0 : responseEditor.getValue()) !== null && _ref10 !== void 0 ? _ref10 : null; + return setPropertiesInActiveTab(state, { + query, + variables, + headers, + response, + operationName + }); + }, [queryEditor, variableEditor, headerEditor, responseEditor]); +} +function serializeTabState(tabState, shouldPersistHeaders = false) { + return JSON.stringify(tabState, (key, value) => key === "hash" || key === "response" || !shouldPersistHeaders && key === "headers" ? null : value); +} +function useStoreTabs({ + storage, + shouldPersistHeaders +}) { + const store = React.useMemo(() => debounce(500, value => { + storage == null ? void 0 : storage.set(STORAGE_KEY$2, value); + }), [storage]); + return React.useCallback(currentState => { + store(serializeTabState(currentState, shouldPersistHeaders)); + }, [shouldPersistHeaders, store]); +} +function useSetEditorValues({ + queryEditor, + variableEditor, + headerEditor, + responseEditor, + defaultHeaders +}) { + return React.useCallback(({ + query, + variables, + headers, + response + }) => { + var _ref11; + queryEditor == null ? void 0 : queryEditor.setValue(query !== null && query !== void 0 ? query : ""); + variableEditor == null ? void 0 : variableEditor.setValue(variables !== null && variables !== void 0 ? variables : ""); + headerEditor == null ? void 0 : headerEditor.setValue((_ref11 = headers !== null && headers !== void 0 ? headers : defaultHeaders) !== null && _ref11 !== void 0 ? _ref11 : ""); + responseEditor == null ? void 0 : responseEditor.setValue(response !== null && response !== void 0 ? response : ""); + }, [headerEditor, queryEditor, responseEditor, variableEditor, defaultHeaders]); +} +function createTab({ + query = null, + variables = null, + headers = null +} = {}) { + return { + id: guid(), + hash: hashFromTabContents({ + query, + variables, + headers + }), + title: query && fuzzyExtractOperationName(query) || DEFAULT_TITLE, + query, + variables, + headers, + operationName: null, + response: null + }; +} +function setPropertiesInActiveTab(state, partialTab) { + return { + ...state, + tabs: state.tabs.map((tab, index) => { + if (index !== state.activeTabIndex) { + return tab; + } + const newTab = { + ...tab, + ...partialTab + }; + return { + ...newTab, + hash: hashFromTabContents(newTab), + title: newTab.operationName || (newTab.query ? fuzzyExtractOperationName(newTab.query) : void 0) || DEFAULT_TITLE + }; + }) + }; +} +function guid() { + const s4 = () => { + return Math.floor((1 + Math.random()) * 65536).toString(16).slice(1); + }; + return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`; +} +function hashFromTabContents(args) { + var _args$query, _args$variables, _args$headers; + return [(_args$query = args.query) !== null && _args$query !== void 0 ? _args$query : "", (_args$variables = args.variables) !== null && _args$variables !== void 0 ? _args$variables : "", (_args$headers = args.headers) !== null && _args$headers !== void 0 ? _args$headers : ""].join("|"); +} +function fuzzyExtractOperationName(str) { + var _ref12; + const regex = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m; + const match = regex.exec(str); + return (_ref12 = match == null ? void 0 : match[2]) !== null && _ref12 !== void 0 ? _ref12 : null; +} +function clearHeadersFromTabs(storage) { + const persistedTabs = storage == null ? void 0 : storage.get(STORAGE_KEY$2); + if (persistedTabs) { + const parsedTabs = JSON.parse(persistedTabs); + storage == null ? void 0 : storage.set(STORAGE_KEY$2, JSON.stringify(parsedTabs, (key, value) => key === "headers" ? null : value)); + } +} +const DEFAULT_TITLE = ""; +const STORAGE_KEY$2 = "tabState"; +function importCodeMirrorImports$1() { + return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/variables/hint.js */ "../../codemirror-graphql/esm/variables/hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/variables/lint.js */ "../../codemirror-graphql/esm/variables/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/variables/mode.js */ "../../codemirror-graphql/esm/variables/mode.js")))]); +} +const _useVariableEditor = useVariableEditor; +function useVariableEditor(t0, caller) { + const $ = reactCompilerRuntime.c(17); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; } - state.pos = pos; - state.posMax = max; - return true; + const { + editorTheme: t2, + keyMap: t3, + onClickReference, + onEdit, + readOnly: t4 + } = t1; + const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2; + const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3; + const readOnly = t4 === void 0 ? false : t4; + const t5 = caller || _useVariableEditor; + let t6; + if ($[2] !== t5) { + t6 = { + nonNull: true, + caller: t5 + }; + $[2] = t5; + $[3] = t6; + } else { + t6 = $[3]; + } + const { + initialVariables, + variableEditor, + setVariableEditor + } = useEditorContext(t6); + const executionContext = useExecutionContext(); + const t7 = caller || _useVariableEditor; + let t8; + if ($[4] !== t7) { + t8 = { + caller: t7 + }; + $[4] = t7; + $[5] = t8; + } else { + t8 = $[5]; + } + const merge = useMergeQuery(t8); + const t9 = caller || _useVariableEditor; + let t10; + if ($[6] !== t9) { + t10 = { + caller: t9 + }; + $[6] = t9; + $[7] = t10; + } else { + t10 = $[7]; + } + const prettify = usePrettifyEditors(t10); + const ref = React.useRef(null); + const codeMirrorRef = React.useRef(); + let t11; + let t12; + if ($[8] !== editorTheme || $[9] !== initialVariables || $[10] !== readOnly || $[11] !== setVariableEditor) { + t11 = () => { + let isActive; + isActive = true; + importCodeMirrorImports$1().then(CodeMirror => { + if (!isActive) { + return; + } + codeMirrorRef.current = CodeMirror; + const container = ref.current; + if (!container) { + return; + } + const newEditor = CodeMirror(container, { + value: initialVariables, + lineNumbers: true, + tabSize: 2, + mode: "graphql-variables", + theme: editorTheme, + autoCloseBrackets: true, + matchBrackets: true, + showCursorWhenSelecting: true, + readOnly: readOnly ? "nocursor" : false, + foldGutter: true, + lint: { + variableToType: void 0 + }, + hintOptions: { + closeOnUnfocus: false, + completeSingle: false, + container, + variableToType: void 0 + }, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + extraKeys: commonKeys + }); + newEditor.addKeyMap({ + "Cmd-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Ctrl-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Alt-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + }, + "Shift-Space"() { + newEditor.showHint({ + completeSingle: false, + container + }); + } + }); + newEditor.on("keyup", _temp); + setVariableEditor(newEditor); + }); + return () => { + isActive = false; + }; + }; + t12 = [editorTheme, initialVariables, readOnly, setVariableEditor]; + $[8] = editorTheme; + $[9] = initialVariables; + $[10] = readOnly; + $[11] = setVariableEditor; + $[12] = t11; + $[13] = t12; + } else { + t11 = $[12]; + t12 = $[13]; + } + React.useEffect(t11, t12); + useSynchronizeOption(variableEditor, "keyMap", keyMap); + useChangeHandler(variableEditor, onEdit, STORAGE_KEY$1, "variables", _useVariableEditor); + useCompletion(variableEditor, onClickReference || null, _useVariableEditor); + let t13; + if ($[14] === Symbol.for("react.memo_cache_sentinel")) { + t13 = ["Cmd-Enter", "Ctrl-Enter"]; + $[14] = t13; + } else { + t13 = $[14]; + } + useKeyMap(variableEditor, t13, executionContext == null ? void 0 : executionContext.run); + let t14; + if ($[15] === Symbol.for("react.memo_cache_sentinel")) { + t14 = ["Shift-Ctrl-P"]; + $[15] = t14; + } else { + t14 = $[15]; + } + useKeyMap(variableEditor, t14, prettify); + let t15; + if ($[16] === Symbol.for("react.memo_cache_sentinel")) { + t15 = ["Shift-Ctrl-M"]; + $[16] = t15; + } else { + t15 = $[16]; + } + useKeyMap(variableEditor, t15, merge); + return ref; } - -// Process autolinks '' - -/* eslint max-len:0 */ -const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/; -/* eslint-disable-next-line no-control-regex */ -const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/; -function autolink(state, silent) { - let pos = state.pos; - if (state.src.charCodeAt(pos) !== 0x3C /* < */) { - return false; +function _temp(editorInstance, event) { + const { + code, + key, + shiftKey + } = event; + const isLetter = code.startsWith("Key"); + const isNumber = !shiftKey && code.startsWith("Digit"); + if (isLetter || isNumber || key === "_" || key === '"') { + editorInstance.execCommand("autocomplete"); + } +} +const STORAGE_KEY$1 = "variables"; +const EditorContext = createNullableContext("EditorContext"); +function EditorContextProvider(props) { + const $ = reactCompilerRuntime.c(89); + const storage = useStorageContext(); + const [headerEditor, setHeaderEditor] = React.useState(null); + const [queryEditor, setQueryEditor] = React.useState(null); + const [responseEditor, setResponseEditor] = React.useState(null); + const [variableEditor, setVariableEditor] = React.useState(null); + let t0; + if ($[0] !== props.shouldPersistHeaders || $[1] !== storage) { + t0 = () => { + const isStored = (storage == null ? void 0 : storage.get(PERSIST_HEADERS_STORAGE_KEY)) !== null; + return props.shouldPersistHeaders !== false && isStored ? (storage == null ? void 0 : storage.get(PERSIST_HEADERS_STORAGE_KEY)) === "true" : Boolean(props.shouldPersistHeaders); + }; + $[0] = props.shouldPersistHeaders; + $[1] = storage; + $[2] = t0; + } else { + t0 = $[2]; + } + const [shouldPersistHeaders, setShouldPersistHeadersInternal] = React.useState(t0); + useSynchronizeValue(headerEditor, props.headers); + useSynchronizeValue(queryEditor, props.query); + useSynchronizeValue(responseEditor, props.response); + useSynchronizeValue(variableEditor, props.variables); + let t1; + if ($[3] !== shouldPersistHeaders || $[4] !== storage) { + t1 = { + storage, + shouldPersistHeaders + }; + $[3] = shouldPersistHeaders; + $[4] = storage; + $[5] = t1; + } else { + t1 = $[5]; + } + const storeTabs = useStoreTabs(t1); + let t2; + if ($[6] !== props.defaultHeaders || $[7] !== props.defaultQuery || $[8] !== props.defaultTabs || $[9] !== props.headers || $[10] !== props.query || $[11] !== props.response || $[12] !== props.variables || $[13] !== shouldPersistHeaders || $[14] !== storage || $[15] !== storeTabs) { + t2 = () => { + var _ref13, _props$query, _ref14, _props$variables, _ref15, _props$headers, _props$response, _ref16, _ref17; + const query = (_ref13 = (_props$query = props.query) !== null && _props$query !== void 0 ? _props$query : storage == null ? void 0 : storage.get(STORAGE_KEY_QUERY)) !== null && _ref13 !== void 0 ? _ref13 : null; + const variables = (_ref14 = (_props$variables = props.variables) !== null && _props$variables !== void 0 ? _props$variables : storage == null ? void 0 : storage.get(STORAGE_KEY$1)) !== null && _ref14 !== void 0 ? _ref14 : null; + const headers = (_ref15 = (_props$headers = props.headers) !== null && _props$headers !== void 0 ? _props$headers : storage == null ? void 0 : storage.get(STORAGE_KEY$3)) !== null && _ref15 !== void 0 ? _ref15 : null; + const response = (_props$response = props.response) !== null && _props$response !== void 0 ? _props$response : ""; + const tabState = getDefaultTabState({ + query, + variables, + headers, + defaultTabs: props.defaultTabs, + defaultQuery: props.defaultQuery || DEFAULT_QUERY, + defaultHeaders: props.defaultHeaders, + storage, + shouldPersistHeaders + }); + storeTabs(tabState); + return { + query: (_ref16 = query !== null && query !== void 0 ? query : tabState.activeTabIndex === 0 ? tabState.tabs[0].query : null) !== null && _ref16 !== void 0 ? _ref16 : "", + variables: variables !== null && variables !== void 0 ? variables : "", + headers: (_ref17 = headers !== null && headers !== void 0 ? headers : props.defaultHeaders) !== null && _ref17 !== void 0 ? _ref17 : "", + response, + tabState + }; + }; + $[6] = props.defaultHeaders; + $[7] = props.defaultQuery; + $[8] = props.defaultTabs; + $[9] = props.headers; + $[10] = props.query; + $[11] = props.response; + $[12] = props.variables; + $[13] = shouldPersistHeaders; + $[14] = storage; + $[15] = storeTabs; + $[16] = t2; + } else { + t2 = $[16]; + } + const [initialState] = React.useState(t2); + const [tabState_0, setTabState] = React.useState(initialState.tabState); + let t3; + if ($[17] !== headerEditor || $[18] !== storage || $[19] !== tabState_0) { + t3 = persist => { + if (persist) { + var _ref18; + storage == null ? void 0 : storage.set(STORAGE_KEY$3, (_ref18 = headerEditor == null ? void 0 : headerEditor.getValue()) !== null && _ref18 !== void 0 ? _ref18 : ""); + const serializedTabs = serializeTabState(tabState_0, true); + storage == null ? void 0 : storage.set(STORAGE_KEY$2, serializedTabs); + } else { + storage == null ? void 0 : storage.set(STORAGE_KEY$3, ""); + clearHeadersFromTabs(storage); + } + setShouldPersistHeadersInternal(persist); + storage == null ? void 0 : storage.set(PERSIST_HEADERS_STORAGE_KEY, persist.toString()); + }; + $[17] = headerEditor; + $[18] = storage; + $[19] = tabState_0; + $[20] = t3; + } else { + t3 = $[20]; + } + const setShouldPersistHeaders = t3; + const lastShouldPersistHeadersProp = React.useRef(); + let t4; + let t5; + if ($[21] !== props.shouldPersistHeaders || $[22] !== setShouldPersistHeaders) { + t4 = () => { + const propValue = Boolean(props.shouldPersistHeaders); + if ((lastShouldPersistHeadersProp == null ? void 0 : lastShouldPersistHeadersProp.current) !== propValue) { + setShouldPersistHeaders(propValue); + lastShouldPersistHeadersProp.current = propValue; + } + }; + t5 = [props.shouldPersistHeaders, setShouldPersistHeaders]; + $[21] = props.shouldPersistHeaders; + $[22] = setShouldPersistHeaders; + $[23] = t4; + $[24] = t5; + } else { + t4 = $[23]; + t5 = $[24]; + } + React.useEffect(t4, t5); + let t6; + if ($[25] !== headerEditor || $[26] !== queryEditor || $[27] !== responseEditor || $[28] !== variableEditor) { + t6 = { + queryEditor, + variableEditor, + headerEditor, + responseEditor + }; + $[25] = headerEditor; + $[26] = queryEditor; + $[27] = responseEditor; + $[28] = variableEditor; + $[29] = t6; + } else { + t6 = $[29]; } - const start = state.pos; - const max = state.posMax; - for (;;) { - if (++pos >= max) return false; - const ch = state.src.charCodeAt(pos); - if (ch === 0x3C /* < */) return false; - if (ch === 0x3E /* > */) break; + const synchronizeActiveTabValues = useSynchronizeActiveTabValues(t6); + const { + onTabChange, + defaultHeaders, + defaultQuery, + children + } = props; + let t7; + if ($[30] !== defaultHeaders || $[31] !== headerEditor || $[32] !== queryEditor || $[33] !== responseEditor || $[34] !== variableEditor) { + t7 = { + queryEditor, + variableEditor, + headerEditor, + responseEditor, + defaultHeaders + }; + $[30] = defaultHeaders; + $[31] = headerEditor; + $[32] = queryEditor; + $[33] = responseEditor; + $[34] = variableEditor; + $[35] = t7; + } else { + t7 = $[35]; + } + const setEditorValues = useSetEditorValues(t7); + let t8; + if ($[36] !== defaultHeaders || $[37] !== defaultQuery || $[38] !== onTabChange || $[39] !== setEditorValues || $[40] !== storeTabs || $[41] !== synchronizeActiveTabValues) { + t8 = () => { + setTabState(current => { + const updatedValues = synchronizeActiveTabValues(current); + const updated = { + tabs: [...updatedValues.tabs, createTab({ + headers: defaultHeaders, + query: defaultQuery !== null && defaultQuery !== void 0 ? defaultQuery : DEFAULT_QUERY + })], + activeTabIndex: updatedValues.tabs.length + }; + storeTabs(updated); + setEditorValues(updated.tabs[updated.activeTabIndex]); + onTabChange == null ? void 0 : onTabChange(updated); + return updated; + }); + }; + $[36] = defaultHeaders; + $[37] = defaultQuery; + $[38] = onTabChange; + $[39] = setEditorValues; + $[40] = storeTabs; + $[41] = synchronizeActiveTabValues; + $[42] = t8; + } else { + t8 = $[42]; + } + const addTab = t8; + let t9; + if ($[43] !== onTabChange || $[44] !== setEditorValues || $[45] !== storeTabs) { + t9 = index => { + setTabState(current_0 => { + const updated_0 = { + ...current_0, + activeTabIndex: index + }; + storeTabs(updated_0); + setEditorValues(updated_0.tabs[updated_0.activeTabIndex]); + onTabChange == null ? void 0 : onTabChange(updated_0); + return updated_0; + }); + }; + $[43] = onTabChange; + $[44] = setEditorValues; + $[45] = storeTabs; + $[46] = t9; + } else { + t9 = $[46]; + } + const changeTab = t9; + let t10; + if ($[47] !== onTabChange || $[48] !== setEditorValues || $[49] !== storeTabs) { + t10 = newOrder => { + setTabState(current_1 => { + const activeTab = current_1.tabs[current_1.activeTabIndex]; + const updated_1 = { + tabs: newOrder, + activeTabIndex: newOrder.indexOf(activeTab) + }; + storeTabs(updated_1); + setEditorValues(updated_1.tabs[updated_1.activeTabIndex]); + onTabChange == null ? void 0 : onTabChange(updated_1); + return updated_1; + }); + }; + $[47] = onTabChange; + $[48] = setEditorValues; + $[49] = storeTabs; + $[50] = t10; + } else { + t10 = $[50]; + } + const moveTab = t10; + let t11; + if ($[51] !== onTabChange || $[52] !== setEditorValues || $[53] !== storeTabs) { + t11 = index_0 => { + setTabState(current_2 => { + const updated_2 = { + tabs: current_2.tabs.filter((_tab, i) => index_0 !== i), + activeTabIndex: Math.max(current_2.activeTabIndex - 1, 0) + }; + storeTabs(updated_2); + setEditorValues(updated_2.tabs[updated_2.activeTabIndex]); + onTabChange == null ? void 0 : onTabChange(updated_2); + return updated_2; + }); + }; + $[51] = onTabChange; + $[52] = setEditorValues; + $[53] = storeTabs; + $[54] = t11; + } else { + t11 = $[54]; + } + const closeTab = t11; + let t12; + if ($[55] !== onTabChange || $[56] !== storeTabs) { + t12 = partialTab => { + setTabState(current_3 => { + const updated_3 = setPropertiesInActiveTab(current_3, partialTab); + storeTabs(updated_3); + onTabChange == null ? void 0 : onTabChange(updated_3); + return updated_3; + }); + }; + $[55] = onTabChange; + $[56] = storeTabs; + $[57] = t12; + } else { + t12 = $[57]; } - const url = state.src.slice(start + 1, pos); - if (AUTOLINK_RE.test(url)) { - const fullUrl = state.md.normalizeLink(url); - if (!state.md.validateLink(fullUrl)) { - return false; - } - if (!silent) { - const token_o = state.push('link_open', 'a', 1); - token_o.attrs = [['href', fullUrl]]; - token_o.markup = 'autolink'; - token_o.info = 'auto'; - const token_t = state.push('text', '', 0); - token_t.content = state.md.normalizeLinkText(url); - const token_c = state.push('link_close', 'a', -1); - token_c.markup = 'autolink'; - token_c.info = 'auto'; - } - state.pos += url.length + 2; - return true; + const updateActiveTabValues = t12; + const { + onEditOperationName + } = props; + let t13; + if ($[58] !== onEditOperationName || $[59] !== queryEditor || $[60] !== updateActiveTabValues) { + t13 = operationName => { + if (!queryEditor) { + return; + } + updateQueryEditor(queryEditor, operationName); + updateActiveTabValues({ + operationName + }); + onEditOperationName == null ? void 0 : onEditOperationName(operationName); + }; + $[58] = onEditOperationName; + $[59] = queryEditor; + $[60] = updateActiveTabValues; + $[61] = t13; + } else { + t13 = $[61]; } - if (EMAIL_RE.test(url)) { - const fullUrl = state.md.normalizeLink('mailto:' + url); - if (!state.md.validateLink(fullUrl)) { - return false; - } - if (!silent) { - const token_o = state.push('link_open', 'a', 1); - token_o.attrs = [['href', fullUrl]]; - token_o.markup = 'autolink'; - token_o.info = 'auto'; - const token_t = state.push('text', '', 0); - token_t.content = state.md.normalizeLinkText(url); - const token_c = state.push('link_close', 'a', -1); - token_c.markup = 'autolink'; - token_c.info = 'auto'; + const setOperationName = t13; + let t14; + let map; + if ($[62] !== props.externalFragments) { + map = /* @__PURE__ */new Map(); + if (Array.isArray(props.externalFragments)) { + for (const fragment of props.externalFragments) { + map.set(fragment.name.value, fragment); + } + } else { + if (typeof props.externalFragments === "string") { + graphql.visit(graphql.parse(props.externalFragments, {}), { + FragmentDefinition(fragment_0) { + map.set(fragment_0.name.value, fragment_0); + } + }); + } else { + if (props.externalFragments) { + throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects."); + } + } } - state.pos += url.length + 2; - return true; + $[62] = props.externalFragments; + $[63] = map; + } else { + map = $[63]; + } + t14 = map; + const externalFragments = t14; + let t15; + if ($[64] !== props.validationRules) { + t15 = props.validationRules || []; + $[64] = props.validationRules; + $[65] = t15; + } else { + t15 = $[65]; + } + const validationRules = t15; + let t16; + if ($[66] !== addTab || $[67] !== changeTab || $[68] !== closeTab || $[69] !== externalFragments || $[70] !== headerEditor || $[71] !== initialState.headers || $[72] !== initialState.query || $[73] !== initialState.response || $[74] !== initialState.variables || $[75] !== moveTab || $[76] !== queryEditor || $[77] !== responseEditor || $[78] !== setOperationName || $[79] !== setShouldPersistHeaders || $[80] !== shouldPersistHeaders || $[81] !== tabState_0 || $[82] !== updateActiveTabValues || $[83] !== validationRules || $[84] !== variableEditor) { + t16 = { + ...tabState_0, + addTab, + changeTab, + moveTab, + closeTab, + updateActiveTabValues, + headerEditor, + queryEditor, + responseEditor, + variableEditor, + setHeaderEditor, + setQueryEditor, + setResponseEditor, + setVariableEditor, + setOperationName, + initialQuery: initialState.query, + initialVariables: initialState.variables, + initialHeaders: initialState.headers, + initialResponse: initialState.response, + externalFragments, + validationRules, + shouldPersistHeaders, + setShouldPersistHeaders + }; + $[66] = addTab; + $[67] = changeTab; + $[68] = closeTab; + $[69] = externalFragments; + $[70] = headerEditor; + $[71] = initialState.headers; + $[72] = initialState.query; + $[73] = initialState.response; + $[74] = initialState.variables; + $[75] = moveTab; + $[76] = queryEditor; + $[77] = responseEditor; + $[78] = setOperationName; + $[79] = setShouldPersistHeaders; + $[80] = shouldPersistHeaders; + $[81] = tabState_0; + $[82] = updateActiveTabValues; + $[83] = validationRules; + $[84] = variableEditor; + $[85] = t16; + } else { + t16 = $[85]; } - return false; -} - -// Process html tags - -function isLinkOpen(str) { - return /^\s]/i.test(str); -} -function isLinkClose(str) { - return /^<\/a\s*>/i.test(str); + const value = t16; + let t17; + if ($[86] !== children || $[87] !== value) { + t17 = /* @__PURE__ */jsxRuntime.jsx(EditorContext.Provider, { + value, + children + }); + $[86] = children; + $[87] = value; + $[88] = t17; + } else { + t17 = $[88]; + } + return t17; } -function isLetter(ch) { - /* eslint no-bitwise:0 */ - const lc = ch | 0x20; // to lower case - return lc >= 0x61 /* a */ && lc <= 0x7a /* z */; +function updateQueryEditor(queryEditor, operationName) { + queryEditor.operationName = operationName; } +const useEditorContext = createContextHook(EditorContext); +const PERSIST_HEADERS_STORAGE_KEY = "shouldPersistHeaders"; +const DEFAULT_QUERY = `# Welcome to GraphiQL +# +# GraphiQL is an in-browser tool for writing, validating, and +# testing GraphQL queries. +# +# Type queries into this side of the screen, and you will see intelligent +# typeaheads aware of the current GraphQL type schema and live syntax and +# validation errors highlighted within the text. +# +# GraphQL queries typically start with a "{" character. Lines that start +# with a # are ignored. +# +# An example GraphQL query might look like: +# +# { +# field(arg: "value") { +# subField +# } +# } +# +# Keyboard shortcuts: +# +# Prettify query: Shift-Ctrl-P (or press the prettify button) +# +# Merge fragments: Shift-Ctrl-M (or press the merge button) +# +# Run Query: Ctrl-Enter (or press the play button) +# +# Auto Complete: Ctrl-Space (or just start typing) +# -function html_inline(state, silent) { - if (!state.md.options.html) { - return false; +`; +function HeaderEditor(t0) { + const $ = reactCompilerRuntime.c(13); + let hookArgs; + let isHidden; + if ($[0] !== t0) { + ({ + isHidden, + ...hookArgs + } = t0); + $[0] = t0; + $[1] = hookArgs; + $[2] = isHidden; + } else { + hookArgs = $[1]; + isHidden = $[2]; + } + let t1; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: HeaderEditor + }; + $[3] = t1; + } else { + t1 = $[3]; } - - // Check start - const max = state.posMax; - const pos = state.pos; - if (state.src.charCodeAt(pos) !== 0x3C /* < */ || pos + 2 >= max) { - return false; + const { + headerEditor + } = useEditorContext(t1); + const ref = useHeaderEditor(hookArgs, HeaderEditor); + let t2; + let t3; + if ($[4] !== headerEditor || $[5] !== isHidden) { + t2 = () => { + if (!isHidden) { + headerEditor == null ? void 0 : headerEditor.refresh(); + } + }; + t3 = [headerEditor, isHidden]; + $[4] = headerEditor; + $[5] = isHidden; + $[6] = t2; + $[7] = t3; + } else { + t2 = $[6]; + t3 = $[7]; + } + React.useEffect(t2, t3); + const t4 = isHidden && "hidden"; + let t5; + if ($[8] !== t4) { + t5 = clsx.clsx("graphiql-editor", t4); + $[8] = t4; + $[9] = t5; + } else { + t5 = $[9]; } - - // Quick fail on second char - const ch = state.src.charCodeAt(pos + 1); - if (ch !== 0x21 /* ! */ && ch !== 0x3F /* ? */ && ch !== 0x2F /* / */ && !isLetter(ch)) { - return false; + let t6; + if ($[10] !== ref || $[11] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: t5, + ref + }); + $[10] = ref; + $[11] = t5; + $[12] = t6; + } else { + t6 = $[12]; } - const match = state.src.slice(pos).match(HTML_TAG_RE); - if (!match) { - return false; + return t6; +} +function ImagePreview(props) { + var _a; + const $ = reactCompilerRuntime.c(14); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + width: null, + height: null + }; + $[0] = t0; + } else { + t0 = $[0]; + } + const [dimensions, setDimensions] = React.useState(t0); + const [mime, setMime] = React.useState(null); + const ref = React.useRef(null); + const src = (_a = tokenToURL(props.token)) == null ? void 0 : _a.href; + let t1; + let t2; + if ($[1] !== src) { + t1 = () => { + if (!ref.current) { + return; + } + if (!src) { + setDimensions({ + width: null, + height: null + }); + setMime(null); + return; + } + fetch(src, { + method: "HEAD" + }).then(response => { + setMime(response.headers.get("Content-Type")); + }).catch(() => { + setMime(null); + }); + }; + t2 = [src]; + $[1] = src; + $[2] = t1; + $[3] = t2; + } else { + t1 = $[2]; + t2 = $[3]; + } + React.useEffect(t1, t2); + let t3; + if ($[4] !== dimensions.height || $[5] !== dimensions.width || $[6] !== mime) { + t3 = dimensions.width !== null && dimensions.height !== null ? /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [dimensions.width, "x", dimensions.height, mime === null ? null : " " + mime] + }) : null; + $[4] = dimensions.height; + $[5] = dimensions.width; + $[6] = mime; + $[7] = t3; + } else { + t3 = $[7]; + } + const dims = t3; + let t4; + if ($[8] === Symbol.for("react.memo_cache_sentinel")) { + t4 = () => { + var _ref19, _ref20; + var _a2, _b; + setDimensions({ + width: (_ref19 = (_a2 = ref.current) == null ? void 0 : _a2.naturalWidth) !== null && _ref19 !== void 0 ? _ref19 : null, + height: (_ref20 = (_b = ref.current) == null ? void 0 : _b.naturalHeight) !== null && _ref20 !== void 0 ? _ref20 : null + }); + }; + $[8] = t4; + } else { + t4 = $[8]; + } + let t5; + if ($[9] !== src) { + t5 = /* @__PURE__ */jsxRuntime.jsx("img", { + onLoad: t4, + ref, + src + }); + $[9] = src; + $[10] = t5; + } else { + t5 = $[10]; } - if (!silent) { - const token = state.push('html_inline', '', 0); - token.content = match[0]; - if (isLinkOpen(token.content)) state.linkLevel++; - if (isLinkClose(token.content)) state.linkLevel--; + let t6; + if ($[11] !== dims || $[12] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsxs("div", { + children: [t5, dims] + }); + $[11] = dims; + $[12] = t5; + $[13] = t6; + } else { + t6 = $[13]; } - state.pos += match[0].length; - return true; + return t6; } - -// Process html entity - {, ¯, ", ... - -const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i; -const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i; -function entity(state, silent) { - const pos = state.pos; - const max = state.posMax; - if (state.src.charCodeAt(pos) !== 0x26 /* & */) return false; - if (pos + 1 >= max) return false; - const ch = state.src.charCodeAt(pos + 1); - if (ch === 0x23 /* # */) { - const match = state.src.slice(pos).match(DIGITAL_RE); - if (match) { - if (!silent) { - const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10); - const token = state.push('text_special', '', 0); - token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD); - token.markup = match[0]; - token.info = 'entity'; - } - state.pos += match[0].length; - return true; - } +ImagePreview.shouldRender = function shouldRender(token) { + const url = tokenToURL(token); + return url ? isImageURL(url) : false; +}; +function tokenToURL(token) { + if (token.type !== "string") { + return; + } + const value = token.string.slice(1).slice(0, -1).trim(); + try { + const { + location + } = window; + return new URL(value, location.protocol + "//" + location.host); + } catch { + return; + } +} +function isImageURL(url) { + return /\.(bmp|gif|jpe?g|png|svg|webp)$/.test(url.pathname); +} +function QueryEditor(props) { + const $ = reactCompilerRuntime.c(2); + const ref = useQueryEditor(props, QueryEditor); + let t0; + if ($[0] !== ref) { + t0 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: "graphiql-editor", + ref + }); + $[0] = ref; + $[1] = t0; } else { - const match = state.src.slice(pos).match(NAMED_RE); - if (match) { - const decoded = entities.decodeHTML(match[0]); - if (decoded !== match[0]) { - if (!silent) { - const token = state.push('text_special', '', 0); - token.content = decoded; - token.markup = match[0]; - token.info = 'entity'; - } - state.pos += match[0].length; - return true; - } - } + t0 = $[1]; } - return false; + return t0; } - -// For each opening emphasis-like marker find a matching closing one -// - -function processDelimiters(delimiters) { - const openersBottom = {}; - const max = delimiters.length; - if (!max) return; - - // headerIdx is the first delimiter of the current (where closer is) delimiter run - let headerIdx = 0; - let lastTokenIdx = -2; // needs any value lower than -1 - const jumps = []; - for (let closerIdx = 0; closerIdx < max; closerIdx++) { - const closer = delimiters[closerIdx]; - jumps.push(0); - - // markers belong to same delimiter run if: - // - they have adjacent tokens - // - AND markers are the same - // - if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) { - headerIdx = closerIdx; - } - lastTokenIdx = closer.token; - - // Length is only used for emphasis-specific "rule of 3", - // if it's not defined (in strikethrough or 3rd party plugins), - // we can default it to 0 to disable those checks. - // - closer.length = closer.length || 0; - if (!closer.close) continue; - - // Previously calculated lower bounds (previous fails) - // for each marker, each delimiter length modulo 3, - // and for whether this closer can be an opener; - // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460 - /* eslint-disable-next-line no-prototype-builtins */ - if (!openersBottom.hasOwnProperty(closer.marker)) { - openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]; - } - const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3]; - let openerIdx = headerIdx - jumps[headerIdx] - 1; - let newMinOpenerIdx = openerIdx; - for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) { - const opener = delimiters[openerIdx]; - if (opener.marker !== closer.marker) continue; - if (opener.open && opener.end < 0) { - let isOddMatch = false; - - // from spec: - // - // If one of the delimiters can both open and close emphasis, then the - // sum of the lengths of the delimiter runs containing the opening and - // closing delimiters must not be a multiple of 3 unless both lengths - // are multiples of 3. - // - if (opener.close || closer.open) { - if ((opener.length + closer.length) % 3 === 0) { - if (opener.length % 3 !== 0 || closer.length % 3 !== 0) { - isOddMatch = true; - } - } +function importCodeMirrorImports() { + return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/fold/foldgutter.js */ "../../../node_modules/codemirror/addon/fold/foldgutter.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/fold/brace-fold.js */ "../../../node_modules/codemirror/addon/fold/brace-fold.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/dialog/dialog.js */ "../../../node_modules/codemirror/addon/dialog/dialog.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/search.js */ "../../../node_modules/codemirror/addon/search/search.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/searchcursor.js */ "../../../node_modules/codemirror/addon/search/searchcursor.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/addon/search/jump-to-line.js */ "../../../node_modules/codemirror/addon/search/jump-to-line.js"))), // @ts-expect-error + Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror/keymap/sublime.js */ "../../../node_modules/codemirror/keymap/sublime.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/results/mode.js */ "../../codemirror-graphql/esm/results/mode.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! codemirror-graphql/esm/utils/info-addon.js */ "../../codemirror-graphql/esm/utils/info-addon.js")))], { + useCommonAddons: false + }); +} +const _useResponseEditor = useResponseEditor; +function useResponseEditor(t0, caller) { + const $ = reactCompilerRuntime.c(19); + let t1; + if ($[0] !== t0) { + t1 = t0 === void 0 ? {} : t0; + $[0] = t0; + $[1] = t1; + } else { + t1 = $[1]; + } + const { + responseTooltip, + editorTheme: t2, + keyMap: t3 + } = t1; + const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2; + const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3; + const t4 = caller || _useResponseEditor; + let t5; + if ($[2] !== t4) { + t5 = { + nonNull: true, + caller: t4 + }; + $[2] = t4; + $[3] = t5; + } else { + t5 = $[3]; + } + const { + fetchError, + validationErrors + } = useSchemaContext(t5); + const t6 = caller || _useResponseEditor; + let t7; + if ($[4] !== t6) { + t7 = { + nonNull: true, + caller: t6 + }; + $[4] = t6; + $[5] = t7; + } else { + t7 = $[5]; + } + const { + initialResponse, + responseEditor, + setResponseEditor + } = useEditorContext(t7); + const ref = React.useRef(null); + const responseTooltipRef = React.useRef(responseTooltip); + let t8; + let t9; + if ($[6] !== responseTooltip) { + t8 = () => { + responseTooltipRef.current = responseTooltip; + }; + t9 = [responseTooltip]; + $[6] = responseTooltip; + $[7] = t8; + $[8] = t9; + } else { + t8 = $[7]; + t9 = $[8]; + } + React.useEffect(t8, t9); + let t10; + let t11; + if ($[9] !== editorTheme || $[10] !== initialResponse || $[11] !== setResponseEditor) { + t10 = () => { + let isActive; + isActive = true; + importCodeMirrorImports().then(CodeMirror => { + if (!isActive) { + return; } - if (!isOddMatch) { - // If previous delimiter cannot be an opener, we can safely skip - // the entire sequence in future checks. This is required to make - // sure algorithm has linear complexity (see *_*_*_*_*_... case). - // - const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0; - jumps[closerIdx] = closerIdx - openerIdx + lastJump; - jumps[openerIdx] = lastJump; - closer.open = false; - opener.end = closerIdx; - opener.close = false; - newMinOpenerIdx = -1; - // treat next token as start of run, - // it optimizes skips in **<...>**a**<...>** pathological case - lastTokenIdx = -2; - break; + const tooltipDiv = document.createElement("div"); + CodeMirror.registerHelper("info", "graphql-results", (token, _options, _cm, pos) => { + const infoElements = []; + const ResponseTooltipComponent = responseTooltipRef.current; + if (ResponseTooltipComponent) { + infoElements.push( /* @__PURE__ */jsxRuntime.jsx(ResponseTooltipComponent, { + pos, + token + })); + } + if (ImagePreview.shouldRender(token)) { + infoElements.push( /* @__PURE__ */jsxRuntime.jsx(ImagePreview, { + token + }, "image-preview")); + } + if (!infoElements.length) { + ReactDOM.unmountComponentAtNode(tooltipDiv); + return null; + } + ReactDOM.render(infoElements, tooltipDiv); + return tooltipDiv; + }); + const container = ref.current; + if (!container) { + return; } + const newEditor = CodeMirror(container, { + value: initialResponse, + lineWrapping: true, + readOnly: true, + theme: editorTheme, + mode: "graphql-results", + foldGutter: true, + gutters: ["CodeMirror-foldgutter"], + info: true, + extraKeys: commonKeys + }); + setResponseEditor(newEditor); + }); + return () => { + isActive = false; + }; + }; + t11 = [editorTheme, initialResponse, setResponseEditor]; + $[9] = editorTheme; + $[10] = initialResponse; + $[11] = setResponseEditor; + $[12] = t10; + $[13] = t11; + } else { + t10 = $[12]; + t11 = $[13]; + } + React.useEffect(t10, t11); + useSynchronizeOption(responseEditor, "keyMap", keyMap); + let t12; + let t13; + if ($[14] !== fetchError || $[15] !== responseEditor || $[16] !== validationErrors) { + t12 = () => { + if (fetchError) { + responseEditor == null ? void 0 : responseEditor.setValue(fetchError); } - } - if (newMinOpenerIdx !== -1) { - // If match for this delimiter run failed, we want to set lower bound for - // future lookups. This is required to make sure algorithm has linear - // complexity. - // - // See details here: - // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442 - // - openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx; - } + if (validationErrors.length > 0) { + responseEditor == null ? void 0 : responseEditor.setValue(toolkit.formatError(validationErrors)); + } + }; + t13 = [responseEditor, fetchError, validationErrors]; + $[14] = fetchError; + $[15] = responseEditor; + $[16] = validationErrors; + $[17] = t12; + $[18] = t13; + } else { + t12 = $[17]; + t13 = $[18]; } + React.useEffect(t12, t13); + return ref; } -function link_pairs(state) { - const tokens_meta = state.tokens_meta; - const max = state.tokens_meta.length; - processDelimiters(state.delimiters); - for (let curr = 0; curr < max; curr++) { - if (tokens_meta[curr] && tokens_meta[curr].delimiters) { - processDelimiters(tokens_meta[curr].delimiters); - } +function ResponseEditor(props) { + const $ = reactCompilerRuntime.c(2); + const ref = useResponseEditor(props, ResponseEditor); + let t0; + if ($[0] !== ref) { + t0 = /* @__PURE__ */jsxRuntime.jsx("section", { + className: "result-window", + "aria-label": "Result Window", + "aria-live": "polite", + "aria-atomic": "true", + ref + }); + $[0] = ref; + $[1] = t0; + } else { + t0 = $[1]; + } + return t0; +} +function VariableEditor(t0) { + const $ = reactCompilerRuntime.c(13); + let hookArgs; + let isHidden; + if ($[0] !== t0) { + ({ + isHidden, + ...hookArgs + } = t0); + $[0] = t0; + $[1] = hookArgs; + $[2] = isHidden; + } else { + hookArgs = $[1]; + isHidden = $[2]; + } + let t1; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: VariableEditor + }; + $[3] = t1; + } else { + t1 = $[3]; } -} - -// Clean up tokens after emphasis and strikethrough postprocessing: -// merge adjacent text nodes into one and re-calculate all token levels -// -// This is necessary because initially emphasis delimiter markers (*, _, ~) -// are treated as their own separate text tokens. Then emphasis rule either -// leaves them as text (needed to merge with adjacent text) or turns them -// into opening/closing tags (which messes up levels inside). -// - -function fragments_join(state) { - let curr, last; - let level = 0; - const tokens = state.tokens; - const max = state.tokens.length; - for (curr = last = 0; curr < max; curr++) { - // re-calculate levels after emphasis/strikethrough turns some text nodes - // into opening/closing tags - if (tokens[curr].nesting < 0) level--; // closing tag - tokens[curr].level = level; - if (tokens[curr].nesting > 0) level++; // opening tag - - if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') { - // collapse two adjacent text nodes - tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; - } else { - if (curr !== last) { - tokens[last] = tokens[curr]; + const { + variableEditor + } = useEditorContext(t1); + const ref = useVariableEditor(hookArgs, VariableEditor); + let t2; + let t3; + if ($[4] !== isHidden || $[5] !== variableEditor) { + t2 = () => { + if (variableEditor && !isHidden) { + variableEditor.refresh(); } - last++; - } + }; + t3 = [variableEditor, isHidden]; + $[4] = isHidden; + $[5] = variableEditor; + $[6] = t2; + $[7] = t3; + } else { + t2 = $[6]; + t3 = $[7]; + } + React.useEffect(t2, t3); + const t4 = isHidden && "hidden"; + let t5; + if ($[8] !== t4) { + t5 = clsx.clsx("graphiql-editor", t4); + $[8] = t4; + $[9] = t5; + } else { + t5 = $[9]; } - if (curr !== last) { - tokens.length = last; + let t6; + if ($[10] !== ref || $[11] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsx("div", { + className: t5, + ref + }); + $[10] = ref; + $[11] = t5; + $[12] = t6; + } else { + t6 = $[12]; } + return t6; } - -/** internal - * class ParserInline - * - * Tokenizes paragraph content. - **/ - -// Parser rules - -const _rules = [['text', text], ['linkify', linkify], ['newline', newline], ['escape', escape], ['backticks', backtick], ['strikethrough', r_strikethrough.tokenize], ['emphasis', r_emphasis.tokenize], ['link', link], ['image', image], ['autolink', autolink], ['html_inline', html_inline], ['entity', entity]]; - -// `rule2` ruleset was created specifically for emphasis/strikethrough -// post-processing and may be changed in the future. -// -// Don't use this for anything except pairs (plugins working with `balance_pairs`). -// -const _rules2 = [['balance_pairs', link_pairs], ['strikethrough', r_strikethrough.postProcess], ['emphasis', r_emphasis.postProcess], -// rules for pairs separate '**' into its own text tokens, which may be left unused, -// rule below merges unused segments back with the rest of the text -['fragments_join', fragments_join]]; - -/** - * new ParserInline() - **/ -function ParserInline() { - /** - * ParserInline#ruler -> Ruler - * - * [[Ruler]] instance. Keep configuration of inline rules. - **/ - this.ruler = new Ruler(); - for (let i = 0; i < _rules.length; i++) { - this.ruler.push(_rules[i][0], _rules[i][1]); +function GraphiQLProvider(t0) { + const $ = reactCompilerRuntime.c(39); + const { + children, + dangerouslyAssumeSchemaIsValid, + defaultQuery, + defaultHeaders, + defaultTabs, + externalFragments, + fetcher, + getDefaultFieldNames, + headers, + inputValueDeprecation, + introspectionQueryName, + maxHistoryLength, + onEditOperationName, + onSchemaChange, + onTabChange, + onTogglePluginVisibility, + operationName, + plugins, + query, + response, + schema, + schemaDescription, + shouldPersistHeaders, + storage, + validationRules, + variables, + visiblePlugin + } = t0; + let t1; + if ($[0] !== children || $[1] !== onTogglePluginVisibility || $[2] !== plugins || $[3] !== visiblePlugin) { + t1 = /* @__PURE__ */jsxRuntime.jsx(ExplorerContextProvider, { + children: /* @__PURE__ */jsxRuntime.jsx(PluginContextProvider, { + onTogglePluginVisibility, + plugins, + visiblePlugin, + children + }) + }); + $[0] = children; + $[1] = onTogglePluginVisibility; + $[2] = plugins; + $[3] = visiblePlugin; + $[4] = t1; + } else { + t1 = $[4]; } - - /** - * ParserInline#ruler2 -> Ruler - * - * [[Ruler]] instance. Second ruler used for post-processing - * (e.g. in emphasis-like rules). - **/ - this.ruler2 = new Ruler(); - for (let i = 0; i < _rules2.length; i++) { - this.ruler2.push(_rules2[i][0], _rules2[i][1]); + let t2; + if ($[5] !== fetcher || $[6] !== getDefaultFieldNames || $[7] !== operationName || $[8] !== t1) { + t2 = /* @__PURE__ */jsxRuntime.jsx(ExecutionContextProvider, { + getDefaultFieldNames, + fetcher, + operationName, + children: t1 + }); + $[5] = fetcher; + $[6] = getDefaultFieldNames; + $[7] = operationName; + $[8] = t1; + $[9] = t2; + } else { + t2 = $[9]; + } + let t3; + if ($[10] !== dangerouslyAssumeSchemaIsValid || $[11] !== fetcher || $[12] !== inputValueDeprecation || $[13] !== introspectionQueryName || $[14] !== onSchemaChange || $[15] !== schema || $[16] !== schemaDescription || $[17] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsx(SchemaContextProvider, { + dangerouslyAssumeSchemaIsValid, + fetcher, + inputValueDeprecation, + introspectionQueryName, + onSchemaChange, + schema, + schemaDescription, + children: t2 + }); + $[10] = dangerouslyAssumeSchemaIsValid; + $[11] = fetcher; + $[12] = inputValueDeprecation; + $[13] = introspectionQueryName; + $[14] = onSchemaChange; + $[15] = schema; + $[16] = schemaDescription; + $[17] = t2; + $[18] = t3; + } else { + t3 = $[18]; + } + let t4; + if ($[19] !== defaultHeaders || $[20] !== defaultQuery || $[21] !== defaultTabs || $[22] !== externalFragments || $[23] !== headers || $[24] !== onEditOperationName || $[25] !== onTabChange || $[26] !== query || $[27] !== response || $[28] !== shouldPersistHeaders || $[29] !== t3 || $[30] !== validationRules || $[31] !== variables) { + t4 = /* @__PURE__ */jsxRuntime.jsx(EditorContextProvider, { + defaultQuery, + defaultHeaders, + defaultTabs, + externalFragments, + headers, + onEditOperationName, + onTabChange, + query, + response, + shouldPersistHeaders, + validationRules, + variables, + children: t3 + }); + $[19] = defaultHeaders; + $[20] = defaultQuery; + $[21] = defaultTabs; + $[22] = externalFragments; + $[23] = headers; + $[24] = onEditOperationName; + $[25] = onTabChange; + $[26] = query; + $[27] = response; + $[28] = shouldPersistHeaders; + $[29] = t3; + $[30] = validationRules; + $[31] = variables; + $[32] = t4; + } else { + t4 = $[32]; + } + let t5; + if ($[33] !== maxHistoryLength || $[34] !== t4) { + t5 = /* @__PURE__ */jsxRuntime.jsx(HistoryContextProvider, { + maxHistoryLength, + children: t4 + }); + $[33] = maxHistoryLength; + $[34] = t4; + $[35] = t5; + } else { + t5 = $[35]; + } + let t6; + if ($[36] !== storage || $[37] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsx(StorageContextProvider, { + storage, + children: t5 + }); + $[36] = storage; + $[37] = t5; + $[38] = t6; + } else { + t6 = $[38]; + } + return t6; +} +function useTheme(t0) { + const $ = reactCompilerRuntime.c(11); + const defaultTheme = t0 === void 0 ? null : t0; + const storageContext = useStorageContext(); + let t1; + if ($[0] !== defaultTheme || $[1] !== storageContext) { + t1 = () => { + if (!storageContext) { + return null; + } + const stored = storageContext.get(STORAGE_KEY); + switch (stored) { + case "light": + { + return "light"; + } + case "dark": + { + return "dark"; + } + default: + { + if (typeof stored === "string") { + storageContext.set(STORAGE_KEY, ""); + } + return defaultTheme; + } + } + }; + $[0] = defaultTheme; + $[1] = storageContext; + $[2] = t1; + } else { + t1 = $[2]; + } + const [theme, setThemeInternal] = React.useState(t1); + let t2; + let t3; + if ($[3] !== theme) { + t2 = () => { + if (typeof window === "undefined") { + return; + } + document.body.classList.remove("graphiql-light", "graphiql-dark"); + if (theme) { + document.body.classList.add(`graphiql-${theme}`); + } + }; + t3 = [theme]; + $[3] = theme; + $[4] = t2; + $[5] = t3; + } else { + t2 = $[4]; + t3 = $[5]; + } + React.useLayoutEffect(t2, t3); + let t4; + if ($[6] !== storageContext) { + t4 = newTheme => { + storageContext == null ? void 0 : storageContext.set(STORAGE_KEY, newTheme || ""); + setThemeInternal(newTheme); + }; + $[6] = storageContext; + $[7] = t4; + } else { + t4 = $[7]; + } + const setTheme = t4; + let t5; + if ($[8] !== setTheme || $[9] !== theme) { + t5 = { + theme, + setTheme + }; + $[8] = setTheme; + $[9] = theme; + $[10] = t5; + } else { + t5 = $[10]; } + return t5; } - -// Skip single token by running all rules in validation mode; -// returns `true` if any rule reported success -// -ParserInline.prototype.skipToken = function (state) { - const pos = state.pos; - const rules = this.ruler.getRules(''); - const len = rules.length; - const maxNesting = state.md.options.maxNesting; - const cache = state.cache; - if (typeof cache[pos] !== 'undefined') { - state.pos = cache[pos]; - return; +const STORAGE_KEY = "theme"; +function useDragResize(t0) { + const $ = reactCompilerRuntime.c(31); + const { + defaultSizeRelation: t1, + direction, + initiallyHidden, + onHiddenElementChange, + sizeThresholdFirst: t2, + sizeThresholdSecond: t3, + storageKey + } = t0; + const defaultSizeRelation = t1 === void 0 ? DEFAULT_FLEX : t1; + const sizeThresholdFirst = t2 === void 0 ? 100 : t2; + const sizeThresholdSecond = t3 === void 0 ? 100 : t3; + const storage = useStorageContext(); + let t4; + if ($[0] !== storage || $[1] !== storageKey) { + t4 = debounce(500, value => { + if (storageKey) { + storage == null ? void 0 : storage.set(storageKey, value); + } + }); + $[0] = storage; + $[1] = storageKey; + $[2] = t4; + } else { + t4 = $[2]; } - let ok = false; - if (state.level < maxNesting) { - for (let i = 0; i < len; i++) { - // Increment state.level and decrement it later to limit recursion. - // It's harmless to do here, because no tokens are created. But ideally, - // we'd need a separate private state variable for this purpose. - // - state.level++; - ok = rules[i](state, true); - state.level--; - if (ok) { - if (pos >= state.pos) { - throw new Error("inline rule didn't increment state.pos"); + const store = t4; + let t5; + if ($[3] !== initiallyHidden || $[4] !== storage || $[5] !== storageKey) { + t5 = () => { + const storedValue = storageKey && (storage == null ? void 0 : storage.get(storageKey)); + if (storedValue === HIDE_FIRST || initiallyHidden === "first") { + return "first"; + } + if (storedValue === HIDE_SECOND || initiallyHidden === "second") { + return "second"; + } + return null; + }; + $[3] = initiallyHidden; + $[4] = storage; + $[5] = storageKey; + $[6] = t5; + } else { + t5 = $[6]; + } + const [hiddenElement, setHiddenElement] = React.useState(t5); + let t6; + if ($[7] !== hiddenElement || $[8] !== onHiddenElementChange) { + t6 = element => { + if (element !== hiddenElement) { + setHiddenElement(element); + onHiddenElementChange == null ? void 0 : onHiddenElementChange(element); + } + }; + $[7] = hiddenElement; + $[8] = onHiddenElementChange; + $[9] = t6; + } else { + t6 = $[9]; + } + const setHiddenElementWithCallback = t6; + const firstRef = React.useRef(null); + const dragBarRef = React.useRef(null); + const secondRef = React.useRef(null); + const defaultFlexRef = React.useRef(`${defaultSizeRelation}`); + let t7; + if ($[10] !== storage || $[11] !== storageKey) { + t7 = () => { + const storedValue_0 = storageKey && (storage == null ? void 0 : storage.get(storageKey)) || defaultFlexRef.current; + if (firstRef.current) { + firstRef.current.style.display = "flex"; + firstRef.current.style.flex = storedValue_0 === HIDE_FIRST || storedValue_0 === HIDE_SECOND ? defaultFlexRef.current : storedValue_0; + } + if (secondRef.current) { + secondRef.current.style.display = "flex"; + secondRef.current.style.flex = "1"; + } + if (dragBarRef.current) { + dragBarRef.current.style.display = "flex"; + } + }; + $[10] = storage; + $[11] = storageKey; + $[12] = t7; + } else { + t7 = $[12]; + } + let t8; + if ($[13] !== direction || $[14] !== storage || $[15] !== storageKey) { + t8 = [direction, storage, storageKey]; + $[13] = direction; + $[14] = storage; + $[15] = storageKey; + $[16] = t8; + } else { + t8 = $[16]; + } + React.useLayoutEffect(t7, t8); + let t10; + let t9; + if ($[17] !== hiddenElement || $[18] !== storage || $[19] !== storageKey) { + t9 = () => { + const hide = resizableElement => { + const element_0 = resizableElement === "first" ? firstRef.current : secondRef.current; + if (!element_0) { + return; + } + element_0.style.left = "-1000px"; + element_0.style.position = "absolute"; + element_0.style.opacity = "0"; + element_0.style.height = "500px"; + element_0.style.width = "500px"; + if (firstRef.current) { + const flex = parseFloat(firstRef.current.style.flex); + if (!Number.isFinite(flex) || flex < 1) { + firstRef.current.style.flex = "1"; + } + } + }; + const show = resizableElement_0 => { + const element_1 = resizableElement_0 === "first" ? firstRef.current : secondRef.current; + if (!element_1) { + return; + } + element_1.style.width = ""; + element_1.style.height = ""; + element_1.style.opacity = ""; + element_1.style.position = ""; + element_1.style.left = ""; + if (storage && storageKey) { + const storedValue_1 = storage.get(storageKey); + if (firstRef.current && storedValue_1 !== HIDE_FIRST && storedValue_1 !== HIDE_SECOND) { + firstRef.current.style.flex = storedValue_1 || defaultFlexRef.current; + } + } + }; + if (hiddenElement === "first") { + hide("first"); + } else { + show("first"); + } + if (hiddenElement === "second") { + hide("second"); + } else { + show("second"); + } + }; + t10 = [hiddenElement, storage, storageKey]; + $[17] = hiddenElement; + $[18] = storage; + $[19] = storageKey; + $[20] = t10; + $[21] = t9; + } else { + t10 = $[20]; + t9 = $[21]; + } + React.useLayoutEffect(t9, t10); + let t11; + let t12; + if ($[22] !== direction || $[23] !== setHiddenElementWithCallback || $[24] !== sizeThresholdFirst || $[25] !== sizeThresholdSecond || $[26] !== store) { + t11 = () => { + if (!dragBarRef.current || !firstRef.current || !secondRef.current) { + return; + } + const dragBarContainer = dragBarRef.current; + const firstContainer = firstRef.current; + const wrapper = firstContainer.parentElement; + const eventProperty = direction === "horizontal" ? "clientX" : "clientY"; + const rectProperty = direction === "horizontal" ? "left" : "top"; + const adjacentRectProperty = direction === "horizontal" ? "right" : "bottom"; + const sizeProperty = direction === "horizontal" ? "clientWidth" : "clientHeight"; + const handleMouseDown = function handleMouseDown2(downEvent) { + downEvent.preventDefault(); + const offset = downEvent[eventProperty] - dragBarContainer.getBoundingClientRect()[rectProperty]; + const handleMouseMove = function handleMouseMove2(moveEvent) { + if (moveEvent.buttons === 0) { + return handleMouseUp(); + } + const firstSize = moveEvent[eventProperty] - wrapper.getBoundingClientRect()[rectProperty] - offset; + const secondSize = wrapper.getBoundingClientRect()[adjacentRectProperty] - moveEvent[eventProperty] + offset - dragBarContainer[sizeProperty]; + if (firstSize < sizeThresholdFirst) { + setHiddenElementWithCallback("first"); + store(HIDE_FIRST); + } else { + if (secondSize < sizeThresholdSecond) { + setHiddenElementWithCallback("second"); + store(HIDE_SECOND); + } else { + setHiddenElementWithCallback(null); + const newFlex = `${firstSize / secondSize}`; + firstContainer.style.flex = newFlex; + store(newFlex); + } + } + }; + function handleMouseUp() { + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("mouseup", handleMouseUp); } - break; + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("mouseup", handleMouseUp); + }; + dragBarContainer.addEventListener("mousedown", handleMouseDown); + const reset = function reset2() { + if (firstRef.current) { + firstRef.current.style.flex = defaultFlexRef.current; + } + store(defaultFlexRef.current); + setHiddenElementWithCallback(null); + }; + dragBarContainer.addEventListener("dblclick", reset); + return () => { + dragBarContainer.removeEventListener("mousedown", handleMouseDown); + dragBarContainer.removeEventListener("dblclick", reset); + }; + }; + t12 = [direction, setHiddenElementWithCallback, sizeThresholdFirst, sizeThresholdSecond, store]; + $[22] = direction; + $[23] = setHiddenElementWithCallback; + $[24] = sizeThresholdFirst; + $[25] = sizeThresholdSecond; + $[26] = store; + $[27] = t11; + $[28] = t12; + } else { + t11 = $[27]; + t12 = $[28]; + } + React.useEffect(t11, t12); + let t13; + if ($[29] !== hiddenElement) { + t13 = { + dragBarRef, + hiddenElement, + firstRef, + setHiddenElement, + secondRef + }; + $[29] = hiddenElement; + $[30] = t13; + } else { + t13 = $[30]; + } + return t13; +} +const DEFAULT_FLEX = 1; +const HIDE_FIRST = "hide-first"; +const HIDE_SECOND = "hide-second"; +const ToolbarButton = React.forwardRef((t0, ref) => { + const $ = reactCompilerRuntime.c(19); + let label; + let onClick; + let props; + if ($[0] !== t0) { + ({ + label, + onClick, + ...props + } = t0); + $[0] = t0; + $[1] = label; + $[2] = onClick; + $[3] = props; + } else { + label = $[1]; + onClick = $[2]; + props = $[3]; + } + const [error, setError] = React.useState(null); + let t1; + if ($[4] !== onClick) { + t1 = event => { + try { + if (onClick) { + onClick(event); + } + setError(null); + } catch (t22) { + const err = t22; + setError(err instanceof Error ? err : new Error(`Toolbar button click failed: ${err}`)); } - } + }; + $[4] = onClick; + $[5] = t1; } else { - // Too much nesting, just skip until the end of the paragraph. - // - // NOTE: this will cause links to behave incorrectly in the following case, - // when an amount of `[` is exactly equal to `maxNesting + 1`: - // - // [[[[[[[[[[[[[[[[[[[[[foo]() - // - // TODO: remove this workaround when CM standard will allow nested links - // (we can replace it by preventing links from being parsed in - // validation mode) - // - state.pos = state.posMax; + t1 = $[5]; + } + const handleClick = t1; + const t2 = error && "error"; + let t3; + if ($[6] !== props.className || $[7] !== t2) { + t3 = clsx.clsx("graphiql-toolbar-button", t2, props.className); + $[6] = props.className; + $[7] = t2; + $[8] = t3; + } else { + t3 = $[8]; + } + const t4 = error ? error.message : label; + const t5 = error ? "true" : props["aria-invalid"]; + let t6; + if ($[9] !== handleClick || $[10] !== props || $[11] !== ref || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) { + t6 = /* @__PURE__ */jsxRuntime.jsx(UnStyledButton, { + ...props, + ref, + type: "button", + className: t3, + onClick: handleClick, + "aria-label": t4, + "aria-invalid": t5 + }); + $[9] = handleClick; + $[10] = props; + $[11] = ref; + $[12] = t3; + $[13] = t4; + $[14] = t5; + $[15] = t6; + } else { + t6 = $[15]; } - if (!ok) { - state.pos++; + let t7; + if ($[16] !== label || $[17] !== t6) { + t7 = /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label, + children: t6 + }); + $[16] = label; + $[17] = t6; + $[18] = t7; + } else { + t7 = $[18]; } - cache[pos] = state.pos; -}; - -// Generate tokens for input range -// -ParserInline.prototype.tokenize = function (state) { - const rules = this.ruler.getRules(''); - const len = rules.length; - const end = state.posMax; - const maxNesting = state.md.options.maxNesting; - while (state.pos < end) { - // Try all possible rules. - // On success, rule should: - // - // - update `state.pos` - // - update `state.tokens` - // - return true - const prevPos = state.pos; - let ok = false; - if (state.level < maxNesting) { - for (let i = 0; i < len; i++) { - ok = rules[i](state, false); - if (ok) { - if (prevPos >= state.pos) { - throw new Error("inline rule didn't increment state.pos"); + return t7; +}); +ToolbarButton.displayName = "ToolbarButton"; +function ExecuteButton() { + const $ = reactCompilerRuntime.c(19); + let t0; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t0 = { + nonNull: true, + caller: ExecuteButton + }; + $[0] = t0; + } else { + t0 = $[0]; + } + const { + queryEditor, + setOperationName + } = useEditorContext(t0); + let t1; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = { + nonNull: true, + caller: ExecuteButton + }; + $[1] = t1; + } else { + t1 = $[1]; + } + const { + isFetching, + isSubscribed, + operationName, + run, + stop + } = useExecutionContext(t1); + let t2; + if ($[2] !== (queryEditor == null ? void 0 : queryEditor.operations)) { + t2 = (queryEditor == null ? void 0 : queryEditor.operations) || []; + $[2] = queryEditor == null ? void 0 : queryEditor.operations; + $[3] = t2; + } else { + t2 = $[3]; + } + const operations = t2; + const hasOptions = operations.length > 1 && typeof operationName !== "string"; + const isRunning = isFetching || isSubscribed; + const label = `${isRunning ? "Stop" : "Execute"} query (Ctrl-Enter)`; + let t3; + if ($[4] !== isRunning) { + t3 = isRunning ? /* @__PURE__ */jsxRuntime.jsx(StopIcon, {}) : /* @__PURE__ */jsxRuntime.jsx(PlayIcon, {}); + $[4] = isRunning; + $[5] = t3; + } else { + t3 = $[5]; + } + let t4; + if ($[6] !== label || $[7] !== t3) { + t4 = { + type: "button", + className: "graphiql-execute-button", + children: t3, + "aria-label": label + }; + $[6] = label; + $[7] = t3; + $[8] = t4; + } else { + t4 = $[8]; + } + const buttonProps = t4; + let t5; + if ($[9] !== buttonProps || $[10] !== hasOptions || $[11] !== isRunning || $[12] !== label || $[13] !== operations || $[14] !== queryEditor || $[15] !== run || $[16] !== setOperationName || $[17] !== stop) { + t5 = hasOptions && !isRunning ? /* @__PURE__ */jsxRuntime.jsxs(DropdownMenu, { + children: [/* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label, + children: /* @__PURE__ */jsxRuntime.jsx(DropdownMenu.Button, { + ...buttonProps + }) + }), /* @__PURE__ */jsxRuntime.jsx(DropdownMenu.Content, { + children: operations.map((operation, i) => { + const opName = operation.name ? operation.name.value : ``; + return /* @__PURE__ */jsxRuntime.jsx(DropdownMenu.Item, { + onSelect: () => { + var _a; + const selectedOperationName = (_a = operation.name) == null ? void 0 : _a.value; + if (queryEditor && selectedOperationName && selectedOperationName !== queryEditor.operationName) { + setOperationName(selectedOperationName); + } + run(); + }, + children: opName + }, `${opName}-${i}`); + }) + })] + }) : /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label, + children: /* @__PURE__ */jsxRuntime.jsx("button", { + ...buttonProps, + onClick: () => { + if (isRunning) { + stop(); + } else { + run(); } - break; } - } - } - if (ok) { - if (state.pos >= end) { - break; - } - continue; - } - state.pending += state.src[state.pos++]; - } - if (state.pending) { - state.pushPending(); + }) + }); + $[9] = buttonProps; + $[10] = hasOptions; + $[11] = isRunning; + $[12] = label; + $[13] = operations; + $[14] = queryEditor; + $[15] = run; + $[16] = setOperationName; + $[17] = stop; + $[18] = t5; + } else { + t5 = $[18]; + } + return t5; +} +const ToolbarMenuRoot = t0 => { + const $ = reactCompilerRuntime.c(20); + let button; + let children; + let label; + let props; + if ($[0] !== t0) { + ({ + button, + children, + label, + ...props + } = t0); + $[0] = t0; + $[1] = button; + $[2] = children; + $[3] = label; + $[4] = props; + } else { + button = $[1]; + children = $[2]; + label = $[3]; + props = $[4]; + } + let t1; + if ($[5] !== props.className) { + t1 = clsx.clsx("graphiql-un-styled graphiql-toolbar-menu", props.className); + $[5] = props.className; + $[6] = t1; + } else { + t1 = $[6]; + } + let t2; + if ($[7] !== button || $[8] !== label || $[9] !== t1) { + t2 = /* @__PURE__ */jsxRuntime.jsx(DropdownMenu.Button, { + className: t1, + "aria-label": label, + children: button + }); + $[7] = button; + $[8] = label; + $[9] = t1; + $[10] = t2; + } else { + t2 = $[10]; } -}; - -/** - * ParserInline.parse(str, md, env, outTokens) - * - * Process input string and push inline tokens into `outTokens` - **/ -ParserInline.prototype.parse = function (str, md, env, outTokens) { - const state = new this.State(str, md, env, outTokens); - this.tokenize(state); - const rules = this.ruler2.getRules(''); - const len = rules.length; - for (let i = 0; i < len; i++) { - rules[i](state); + let t3; + if ($[11] !== label || $[12] !== t2) { + t3 = /* @__PURE__ */jsxRuntime.jsx(Tooltip, { + label, + children: t2 + }); + $[11] = label; + $[12] = t2; + $[13] = t3; + } else { + t3 = $[13]; } -}; -ParserInline.prototype.State = StateInline; - -// markdown-it default options - -var cfg_default = { - options: { - // Enable HTML tags in source - html: false, - // Use '/' to close single tags (
) - xhtmlOut: false, - // Convert '\n' in paragraphs into
- breaks: false, - // CSS language prefix for fenced blocks - langPrefix: 'language-', - // autoconvert URL-like texts to links - linkify: false, - // Enable some language-neutral replacements + quotes beautification - typographer: false, - // Double + single quotes replacement pairs, when typographer enabled, - // and smartquotes on. Could be either a String or an Array. - // - // For example, you can use '«»„“' for Russian, '„“‚‘' for German, - // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - quotes: '\u201c\u201d\u2018\u2019', - /* “”‘’ */ - - // Highlighter function. Should return escaped HTML, - // or '' if the source string is not changed and should be escaped externaly. - // If result starts with ) - xhtmlOut: false, - // Convert '\n' in paragraphs into
- breaks: false, - // CSS language prefix for fenced blocks - langPrefix: 'language-', - // autoconvert URL-like texts to links - linkify: false, - // Enable some language-neutral replacements + quotes beautification - typographer: false, - // Double + single quotes replacement pairs, when typographer enabled, - // and smartquotes on. Could be either a String or an Array. - // - // For example, you can use '«»„“' for Russian, '„“‚‘' for German, - // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - quotes: '\u201c\u201d\u2018\u2019', - /* “”‘’ */ - - // Highlighter function. Should return escaped HTML, - // or '' if the source string is not changed and should be escaped externaly. - // If result starts with ) - xhtmlOut: true, - // Convert '\n' in paragraphs into
- breaks: false, - // CSS language prefix for fenced blocks - langPrefix: 'language-', - // autoconvert URL-like texts to links - linkify: false, - // Enable some language-neutral replacements + quotes beautification - typographer: false, - // Double + single quotes replacement pairs, when typographer enabled, - // and smartquotes on. Could be either a String or an Array. - // - // For example, you can use '«»„“' for Russian, '„“‚‘' for German, - // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - quotes: '\u201c\u201d\u2018\u2019', - /* “”‘’ */ - - // Highlighter function. Should return escaped HTML, - // or '' if the source string is not changed and should be escaped externaly. - // If result starts with = 0) { - try { - parsed.hostname = punycode.toASCII(parsed.hostname); - } catch (er) {/**/} - } - } - return mdurl__namespace.encode(mdurl__namespace.format(parsed)); +function observableToPromise(observable) { + return new Promise((resolve, reject) => { + const subscription = observable.subscribe({ + next(v) { + resolve(v), subscription.unsubscribe(); + }, + error: reject, + complete() { + reject(new Error("no value resolved")); + } + }); + }); } -function normalizeLinkText(url) { - const parsed = mdurl__namespace.parse(url, true); - if (parsed.hostname) { - // Encode hostnames in urls like: - // `http://host/`, `https://host/`, `mailto:user@host`, `//host/` - // - // We don't encode unknown schemas, because it's likely that we encode - // something we shouldn't (e.g. `skype:name` treated as `skype:host`) - // - if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) { - try { - parsed.hostname = punycode.toUnicode(parsed.hostname); - } catch (er) {/**/} - } - } - - // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720 - return mdurl__namespace.decode(mdurl__namespace.format(parsed), mdurl__namespace.decode.defaultChars + '%'); +function isObservable(value) { + return typeof value == "object" && value !== null && "subscribe" in value && typeof value.subscribe == "function"; +} +function isAsyncIterable(input) { + return typeof input == "object" && input !== null && ( + // Some browsers still don't have Symbol.asyncIterator implemented (iOS Safari) + // That means every custom AsyncIterable must be built using a AsyncGeneratorFunction (async function * () {}) + input[Symbol.toStringTag] === "AsyncGenerator" || Symbol.asyncIterator in input); +} +async function asyncIterableToPromise(input) { + var _a; + const iteratorReturn = (_a = ("return" in input ? input : input[Symbol.asyncIterator]()).return) == null ? void 0 : _a.bind(input), + result = await ("next" in input ? input : input[Symbol.asyncIterator]()).next.bind(input)(); + return iteratorReturn == null || iteratorReturn(), result.value; +} +async function fetcherReturnToPromise(fetcherResult) { + const result = await fetcherResult; + return isAsyncIterable(result) ? asyncIterableToPromise(result) : isObservable(result) ? observableToPromise(result) : result; } -/** - * class MarkdownIt - * - * Main parser/renderer class. - * - * ##### Usage - * - * ```javascript - * // node.js, "classic" way: - * var MarkdownIt = require('markdown-it'), - * md = new MarkdownIt(); - * var result = md.render('# markdown-it rulezz!'); - * - * // node.js, the same, but with sugar: - * var md = require('markdown-it')(); - * var result = md.render('# markdown-it rulezz!'); - * - * // browser without AMD, added to "window" on script load - * // Note, there are no dash. - * var md = window.markdownit(); - * var result = md.render('# markdown-it rulezz!'); - * ``` - * - * Single line rendering, without paragraph wrap: - * - * ```javascript - * var md = require('markdown-it')(); - * var result = md.renderInline('__markdown-it__ rulezz!'); - * ``` - **/ - -/** - * new MarkdownIt([presetName, options]) - * - presetName (String): optional, `commonmark` / `zero` - * - options (Object) - * - * Creates parser instanse with given config. Can be called without `new`. - * - * ##### presetName - * - * MarkdownIt provides named presets as a convenience to quickly - * enable/disable active syntax rules and options for common use cases. - * - * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) - - * configures parser to strict [CommonMark](http://commonmark.org/) mode. - * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) - - * similar to GFM, used when no preset name given. Enables all available rules, - * but still without html, typographer & autolinker. - * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) - - * all rules disabled. Useful to quickly setup your config via `.enable()`. - * For example, when you need only `bold` and `italic` markup and nothing else. - * - * ##### options: - * - * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful! - * That's not safe! You may need external sanitizer to protect output from XSS. - * It's better to extend features via plugins, instead of enabling HTML. - * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags - * (`
`). This is needed only for full CommonMark compatibility. In real - * world you will need HTML output. - * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `
`. - * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks. - * Can be useful for external highlighters. - * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links. - * - __typographer__ - `false`. Set `true` to enable [some language-neutral - * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) + - * quotes beautification (smartquotes). - * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement - * pairs, when typographer enabled and smartquotes on. For example, you can - * use `'«»„“'` for Russian, `'„“‚‘'` for German, and - * `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp). - * - __highlight__ - `null`. Highlighter function for fenced code blocks. - * Highlighter `function (str, lang)` should return escaped HTML. It can also - * return empty string if the source was not changed and should be escaped - * externaly. If result starts with ` or ``): - * - * ```javascript - * var hljs = require('highlight.js') // https://highlightjs.org/ - * - * // Actual default values - * var md = require('markdown-it')({ - * highlight: function (str, lang) { - * if (lang && hljs.getLanguage(lang)) { - * try { - * return '
' +
- *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
- *                '
'; - * } catch (__) {} - * } - * - * return '
' + md.utils.escapeHtml(str) + '
'; - * } - * }); - * ``` - * - **/ -function MarkdownIt(presetName, options) { - if (!(this instanceof MarkdownIt)) { - return new MarkdownIt(presetName, options); - } - if (!options) { - if (!isString(presetName)) { - options = presetName || {}; - presetName = 'default'; - } - } - - /** - * MarkdownIt#inline -> ParserInline - * - * Instance of [[ParserInline]]. You may need it to add new rules when - * writing plugins. For simple rules control use [[MarkdownIt.disable]] and - * [[MarkdownIt.enable]]. - **/ - this.inline = new ParserInline(); - - /** - * MarkdownIt#block -> ParserBlock - * - * Instance of [[ParserBlock]]. You may need it to add new rules when - * writing plugins. For simple rules control use [[MarkdownIt.disable]] and - * [[MarkdownIt.enable]]. - **/ - this.block = new ParserBlock(); - - /** - * MarkdownIt#core -> Core - * - * Instance of [[Core]] chain executor. You may need it to add new rules when - * writing plugins. For simple rules control use [[MarkdownIt.disable]] and - * [[MarkdownIt.enable]]. - **/ - this.core = new Core(); +/***/ }), - /** - * MarkdownIt#renderer -> Renderer - * - * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering - * rules for new token types, generated by plugins. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')(); - * - * function myToken(tokens, idx, options, env, self) { - * //... - * return result; - * }; - * - * md.renderer.rules['my_token'] = myToken - * ``` - * - * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs). - **/ - this.renderer = new Renderer(); +/***/ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js": +/*!*********************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { - /** - * MarkdownIt#linkify -> LinkifyIt - * - * [linkify-it](https://github.com/markdown-it/linkify-it) instance. - * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs) - * rule. - **/ - this.linkify = new LinkifyIt(); +"use strict"; - /** - * MarkdownIt#validateLink(url) -> Boolean - * - * Link validation function. CommonMark allows too much in links. By default - * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas - * except some embedded image types. - * - * You can change this behaviour: - * - * ```javascript - * var md = require('markdown-it')(); - * // enable everything - * md.validateLink = function () { return true; } - * ``` - **/ - this.validateLink = validateLink; - /** - * MarkdownIt#normalizeLink(url) -> String - * - * Function used to encode link url to a machine-readable format, - * which includes url-encoding, punycode, etc. - **/ - this.normalizeLink = normalizeLink; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.__spreadValues = exports.__spreadProps = exports.__forAwait = exports.__await = exports.__asyncGenerator = void 0; +var __defProp = Object.defineProperty, + __defProps = Object.defineProperties; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty, + __propIsEnum = Object.prototype.propertyIsEnumerable; +var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name); +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { + enumerable: !0, + configurable: !0, + writable: !0, + value + }) : obj[key] = value, + __spreadValues = (a, b) => { + for (var prop in b || (b = {})) __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]); + return a; + }, + __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +exports.__spreadProps = __spreadProps; +exports.__spreadValues = __spreadValues; +var __await = function (promise, isYieldStar) { + this[0] = promise, this[1] = isYieldStar; + }, + __asyncGenerator = (__this, __arguments, generator) => { + var resume = (k, v, yes, no) => { + try { + var x = generator[k](v), + isAwait = (v = x.value) instanceof __await, + done = x.done; + Promise.resolve(isAwait ? v[0] : v).then(y => isAwait ? resume(k === "return" ? k : "next", v[1] ? { + done: y.done, + value: y.value + } : y, yes, no) : yes({ + value: y, + done + })).catch(e => resume("throw", e, yes, no)); + } catch (e) { + no(e); + } + }, + method = k => it[k] = x => new Promise((yes, no) => resume(k, x, yes, no)), + it = {}; + return generator = generator.apply(__this, __arguments), it[__knownSymbol("asyncIterator")] = () => it, method("next"), method("throw"), method("return"), it; + }; +exports.__asyncGenerator = __asyncGenerator; +exports.__await = __await; +var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")]) ? it.call(obj) : (obj = obj[__knownSymbol("iterator")](), it = {}, method = (key, fn) => (fn = obj[key]) && (it[key] = arg => new Promise((yes, no, done) => (arg = fn.call(obj, arg), done = arg.done, Promise.resolve(arg.value).then(value => yes({ + value, + done +}), no)))), method("next"), method("return"), it); +exports.__forAwait = __forAwait; - /** - * MarkdownIt#normalizeLinkText(url) -> String - * - * Function used to decode link url to a human-readable format` - **/ - this.normalizeLinkText = normalizeLinkText; +/***/ }), - // Expose utils & helpers for easy acces from plugins +/***/ "../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js": +/*!***********************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - /** - * MarkdownIt#utils -> utils - * - * Assorted utility functions, useful to write plugins. See details - * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs). - **/ - this.utils = utils; +"use strict"; - /** - * MarkdownIt#helpers -> helpers - * - * Link components parser functions, useful to write plugins. See details - * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers). - **/ - this.helpers = assign({}, helpers); - this.options = {}; - this.configure(presetName); - if (options) { - this.set(options); - } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createGraphiQLFetcher = createGraphiQLFetcher; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _lib = __webpack_require__(/*! ./lib */ "../../graphiql-toolkit/dist/esm/create-fetcher/lib.js"); +function createGraphiQLFetcher(options) { + const httpFetch = options.fetch || typeof window != "undefined" && window.fetch; + if (!httpFetch) throw new Error("No valid fetcher implementation available"); + options.enableIncrementalDelivery = options.enableIncrementalDelivery !== !1; + const simpleFetcher = (0, _lib.createSimpleFetcher)(options, httpFetch), + httpFetcher = options.enableIncrementalDelivery ? (0, _lib.createMultipartFetcher)(options, httpFetch) : simpleFetcher; + return async (graphQLParams, fetcherOpts) => { + if (graphQLParams.operationName === "IntrospectionQuery") return (options.schemaFetcher || simpleFetcher)(graphQLParams, fetcherOpts); + if (fetcherOpts != null && fetcherOpts.documentAST ? (0, _lib.isSubscriptionWithName)(fetcherOpts.documentAST, graphQLParams.operationName || void 0) : !1) { + const wsFetcher = await (0, _lib.getWsFetcher)(options, fetcherOpts); + if (!wsFetcher) throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${options.subscriptionUrl ? `Provided URL ${options.subscriptionUrl} failed` : "Please provide subscriptionUrl, wsClient or legacyClient option first."}`); + return wsFetcher(graphQLParams); + } + return httpFetcher(graphQLParams, fetcherOpts); + }; } -/** chainable - * MarkdownIt.set(options) - * - * Set parser options (in the same format as in constructor). Probably, you - * will never need it, but you can change options after constructor call. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')() - * .set({ html: true, breaks: true }) - * .set({ typographer, true }); - * ``` - * - * __Note:__ To achieve the best possible performance, don't modify a - * `markdown-it` instance options on the fly. If you need multiple configurations - * it's best to create multiple instances and initialize each with separate - * config. - **/ -MarkdownIt.prototype.set = function (options) { - assign(this.options, options); - return this; -}; +/***/ }), -/** chainable, internal - * MarkdownIt.configure(presets) - * - * Batch load of all options and compenent settings. This is internal method, - * and you probably will not need it. But if you will - see available presets - * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets) - * - * We strongly recommend to use presets instead of direct config loads. That - * will give better compatibility with next versions. - **/ -MarkdownIt.prototype.configure = function (presets) { - const self = this; - if (isString(presets)) { - const presetName = presets; - presets = config[presetName]; - if (!presets) { - throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); - } - } - if (!presets) { - throw new Error('Wrong `markdown-it` preset, can\'t be empty'); - } - if (presets.options) { - self.set(presets.options); +/***/ "../../graphiql-toolkit/dist/esm/create-fetcher/index.js": +/*!***************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/create-fetcher/index.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _exportNames = { + createGraphiQLFetcher: true +}; +Object.defineProperty(exports, "createGraphiQLFetcher", ({ + enumerable: true, + get: function () { + return _createFetcher.createGraphiQLFetcher; } - if (presets.components) { - Object.keys(presets.components).forEach(function (name) { - if (presets.components[name].rules) { - self[name].ruler.enableOnly(presets.components[name].rules); +})); +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _types = __webpack_require__(/*! ./types */ "../../graphiql-toolkit/dist/esm/create-fetcher/types.js"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +var _createFetcher = __webpack_require__(/*! ./createFetcher */ "../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js"); + +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/create-fetcher/lib.js": +/*!*************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/create-fetcher/lib.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createWebsocketsFetcherFromClient = exports.createSimpleFetcher = exports.createMultipartFetcher = exports.createLegacyWebsocketsFetcher = void 0; +exports.createWebsocketsFetcherFromUrl = createWebsocketsFetcherFromUrl; +exports.getWsFetcher = getWsFetcher; +exports.isSubscriptionWithName = void 0; +var _chunkLMOQIXV = __webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _meros = __webpack_require__(/*! meros */ "../../../node_modules/meros/browser/index.js"); +var _pushPullAsyncIterableIterator = __webpack_require__(/*! @n1ru4l/push-pull-async-iterable-iterator */ "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +const errorHasCode = err => typeof err == "object" && err !== null && "code" in err, + isSubscriptionWithName = (document, name) => { + let isSubscription = !1; + return (0, _graphql.visit)(document, { + OperationDefinition(node) { + var _a; + name === ((_a = node.name) == null ? void 0 : _a.value) && node.operation === "subscription" && (isSubscription = !0); } - if (presets.components[name].rules2) { - self[name].ruler2.enableOnly(presets.components[name].rules2); + }), isSubscription; + }, + createSimpleFetcher = (options, httpFetch) => async (graphQLParams, fetcherOpts) => (await httpFetch(options.url, { + method: "POST", + body: JSON.stringify(graphQLParams), + headers: (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({ + "content-type": "application/json" + }, options.headers), fetcherOpts == null ? void 0 : fetcherOpts.headers) + })).json(); +exports.createSimpleFetcher = createSimpleFetcher; +exports.isSubscriptionWithName = isSubscriptionWithName; +async function createWebsocketsFetcherFromUrl(url, connectionParams) { + let wsClient; + try { + const { + createClient + } = await Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__(/*! graphql-ws */ "../../../node_modules/graphql-ws/lib/index.js"))); + return wsClient = createClient({ + url, + connectionParams + }), createWebsocketsFetcherFromClient(wsClient); + } catch (err) { + if (errorHasCode(err) && err.code === "MODULE_NOT_FOUND") throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'"); + console.error(`Error creating websocket client for ${url}`, err); + } +} +const createWebsocketsFetcherFromClient = wsClient => graphQLParams => (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => wsClient.subscribe(graphQLParams, (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, sink), { + error(err) { + err instanceof CloseEvent ? sink.error(new Error(`Socket closed with event ${err.code} ${err.reason || ""}`.trim())) : sink.error(err); + } + }))), + createLegacyWebsocketsFetcher = legacyWsClient => graphQLParams => { + const observable = legacyWsClient.request(graphQLParams); + return (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)( + // @ts-ignore + sink => observable.subscribe(sink).unsubscribe); + }, + createMultipartFetcher = (options, httpFetch) => function (graphQLParams, fetcherOpts) { + return (0, _chunkLMOQIXV.__asyncGenerator)(this, null, function* () { + const response = yield new _chunkLMOQIXV.__await(httpFetch(options.url, { + method: "POST", + body: JSON.stringify(graphQLParams), + headers: (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({ + "content-type": "application/json", + accept: "application/json, multipart/mixed" + }, options.headers), fetcherOpts == null ? void 0 : fetcherOpts.headers) + }).then(r => (0, _meros.meros)(r, { + multiple: !0 + }))); + if (!(0, _pushPullAsyncIterableIterator.isAsyncIterable)(response)) return yield response.json(); + try { + for (var iter = (0, _chunkLMOQIXV.__forAwait)(response), more, temp, error; more = !(temp = yield new _chunkLMOQIXV.__await(iter.next())).done; more = !1) { + const chunk = temp.value; + if (chunk.some(part => !part.json)) { + const message = chunk.map(part => `Headers:: +${part.headers} + +Body:: +${part.body}`); + throw new Error(`Expected multipart chunks to be of json type. got: +${message}`); + } + yield chunk.map(part => part.body); + } + } catch (temp) { + error = [temp]; + } finally { + try { + more && (temp = iter.return) && (yield new _chunkLMOQIXV.__await(temp.call(iter))); + } finally { + if (error) throw error[0]; + } } }); - } - return this; -}; + }; +exports.createMultipartFetcher = createMultipartFetcher; +exports.createLegacyWebsocketsFetcher = createLegacyWebsocketsFetcher; +exports.createWebsocketsFetcherFromClient = createWebsocketsFetcherFromClient; +async function getWsFetcher(options, fetcherOpts) { + if (options.wsClient) return createWebsocketsFetcherFromClient(options.wsClient); + if (options.subscriptionUrl) return createWebsocketsFetcherFromUrl(options.subscriptionUrl, (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({}, options.wsConnectionParams), fetcherOpts == null ? void 0 : fetcherOpts.headers)); + const legacyWebsocketsClient = options.legacyClient || options.legacyWsClient; + if (legacyWebsocketsClient) return createLegacyWebsocketsFetcher(legacyWebsocketsClient); +} -/** chainable - * MarkdownIt.enable(list, ignoreInvalid) - * - list (String|Array): rule name or list of rule names to enable - * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. - * - * Enable list or rules. It will automatically find appropriate components, - * containing rules with given names. If rule not found, and `ignoreInvalid` - * not set - throws exception. - * - * ##### Example - * - * ```javascript - * var md = require('markdown-it')() - * .enable(['sub', 'sup']) - * .disable('smartquotes'); - * ``` - **/ -MarkdownIt.prototype.enable = function (list, ignoreInvalid) { - let result = []; - if (!Array.isArray(list)) { - list = [list]; - } - ['core', 'block', 'inline'].forEach(function (chain) { - result = result.concat(this[chain].ruler.enable(list, true)); - }, this); - result = result.concat(this.inline.ruler2.enable(list, true)); - const missed = list.filter(function (name) { - return result.indexOf(name) < 0; +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/create-fetcher/types.js": +/*!***************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/create-fetcher/types.js ***! + \***************************************************************/ +/***/ (function() { + +"use strict"; + + +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/format/index.js": +/*!*******************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/format/index.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.formatError = formatError; +exports.formatResult = formatResult; +var _chunkLMOQIXV = __webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +function stringify(obj) { + return JSON.stringify(obj, null, 2); +} +function formatSingleError(error) { + return (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, error), { + // Raise these details even if they're non-enumerable + message: error.message, + stack: error.stack }); - if (missed.length && !ignoreInvalid) { - throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed); - } - return this; -}; +} +function handleSingleError(error) { + return error instanceof Error ? formatSingleError(error) : error; +} +function formatError(error) { + return Array.isArray(error) ? stringify({ + errors: error.map(e => handleSingleError(e)) + }) : stringify({ + errors: [handleSingleError(error)] + }); +} +function formatResult(result) { + return stringify(result); +} -/** chainable - * MarkdownIt.disable(list, ignoreInvalid) - * - list (String|Array): rule name or list of rule names to disable. - * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found. - * - * The same as [[MarkdownIt.enable]], but turn specified rules off. - **/ -MarkdownIt.prototype.disable = function (list, ignoreInvalid) { - let result = []; - if (!Array.isArray(list)) { - list = [list]; +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js": +/*!************************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js ***! + \************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.fillLeafs = fillLeafs; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +function fillLeafs(schema, docString, getDefaultFieldNames) { + const insertions = []; + if (!schema || !docString) return { + insertions, + result: docString + }; + let ast; + try { + ast = (0, _graphql.parse)(docString); + } catch (e) { + return { + insertions, + result: docString + }; } - ['core', 'block', 'inline'].forEach(function (chain) { - result = result.concat(this[chain].ruler.disable(list, true)); - }, this); - result = result.concat(this.inline.ruler2.disable(list, true)); - const missed = list.filter(function (name) { - return result.indexOf(name) < 0; - }); - if (missed.length && !ignoreInvalid) { - throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed); + const fieldNameFn = getDefaultFieldNames || defaultGetDefaultFieldNames, + typeInfo = new _graphql.TypeInfo(schema); + return (0, _graphql.visit)(ast, { + leave(node) { + typeInfo.leave(node); + }, + enter(node) { + if (typeInfo.enter(node), node.kind === "Field" && !node.selectionSet) { + const fieldType = typeInfo.getType(), + selectionSet = buildSelectionSet(isFieldType(fieldType), fieldNameFn); + if (selectionSet && node.loc) { + const indent = getIndentation(docString, node.loc.start); + insertions.push({ + index: node.loc.end, + string: " " + (0, _graphql.print)(selectionSet).replaceAll(` +`, ` +` + indent) + }); + } + } + } + }), { + insertions, + result: withInsertions(docString, insertions) + }; +} +function defaultGetDefaultFieldNames(type) { + if (!("getFields" in type)) return []; + const fields = type.getFields(); + if (fields.id) return ["id"]; + if (fields.edges) return ["edges"]; + if (fields.node) return ["node"]; + const leafFieldNames = []; + for (const fieldName of Object.keys(fields)) (0, _graphql.isLeafType)(fields[fieldName].type) && leafFieldNames.push(fieldName); + return leafFieldNames; +} +function buildSelectionSet(type, getDefaultFieldNames) { + const namedType = (0, _graphql.getNamedType)(type); + if (!type || (0, _graphql.isLeafType)(type)) return; + const fieldNames = getDefaultFieldNames(namedType); + if (!(!Array.isArray(fieldNames) || fieldNames.length === 0 || !("getFields" in namedType))) return { + kind: _graphql.Kind.SELECTION_SET, + selections: fieldNames.map(fieldName => { + const fieldDef = namedType.getFields()[fieldName], + fieldType = fieldDef ? fieldDef.type : null; + return { + kind: _graphql.Kind.FIELD, + name: { + kind: _graphql.Kind.NAME, + value: fieldName + }, + // we can use as here, because we already know that fieldType + // comes from an origin parameter + selectionSet: buildSelectionSet(fieldType, getDefaultFieldNames) + }; + }) + }; +} +function withInsertions(initial, insertions) { + if (insertions.length === 0) return initial; + let edited = "", + prevIndex = 0; + for (const { + index, + string + } of insertions) edited += initial.slice(prevIndex, index) + string, prevIndex = index; + return edited += initial.slice(prevIndex), edited; +} +function getIndentation(str, index) { + let indentStart = index, + indentEnd = index; + for (; indentStart;) { + const c = str.charCodeAt(indentStart - 1); + if (c === 10 || c === 13 || c === 8232 || c === 8233) break; + indentStart--, c !== 9 && c !== 11 && c !== 12 && c !== 32 && c !== 160 && (indentEnd = indentStart); } - return this; -}; + return str.slice(indentStart, indentEnd); +} +function isFieldType(fieldType) { + if (fieldType) return fieldType; +} -/** chainable - * MarkdownIt.use(plugin, params) - * - * Load specified plugin with given params into current parser instance. - * It's just a sugar to call `plugin(md, params)` with curring. - * - * ##### Example - * - * ```javascript - * var iterator = require('markdown-it-for-inline'); - * var md = require('markdown-it')() - * .use(iterator, 'foo_replace', 'text', function (tokens, idx) { - * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar'); - * }); - * ``` - **/ -MarkdownIt.prototype.use = function (plugin /*, params, ... */) { - const args = [this].concat(Array.prototype.slice.call(arguments, 1)); - plugin.apply(plugin, args); - return this; -}; +/***/ }), -/** internal - * MarkdownIt.parse(src, env) -> Array - * - src (String): source string - * - env (Object): environment sandbox - * - * Parse input string and return list of block tokens (special token type - * "inline" will contain list of inline tokens). You should not call this - * method directly, until you write custom renderer (for example, to produce - * AST). - * - * `env` is used to pass data between "distributed" rules and return additional - * metadata like reference info, needed for the renderer. It also can be used to - * inject data in specific cases. Usually, you will be ok to pass `{}`, - * and then pass updated object to renderer. - **/ -MarkdownIt.prototype.parse = function (src, env) { - if (typeof src !== 'string') { - throw new Error('Input data should be a String'); - } - const state = new this.core.State(src, this, env); - this.core.process(state); - return state.tokens; -}; +/***/ "../../graphiql-toolkit/dist/esm/graphql-helpers/index.js": +/*!****************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/index.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -/** - * MarkdownIt.render(src [, env]) -> String - * - src (String): source string - * - env (Object): environment sandbox - * - * Render markdown string into html. It does all magic for you :). - * - * `env` can be used to inject additional metadata (`{}` by default). - * But you will not need it with high probability. See also comment - * in [[MarkdownIt.parse]]. - **/ -MarkdownIt.prototype.render = function (src, env) { - env = env || {}; - return this.renderer.render(this.parse(src, env), this.options, env); -}; +"use strict"; -/** internal - * MarkdownIt.parseInline(src, env) -> Array - * - src (String): source string - * - env (Object): environment sandbox - * - * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the - * block tokens list with the single `inline` element, containing parsed inline - * tokens in `children` property. Also updates `env` object. - **/ -MarkdownIt.prototype.parseInline = function (src, env) { - const state = new this.core.State(src, this, env); - state.inlineMode = true; - this.core.process(state); - return state.tokens; -}; -/** - * MarkdownIt.renderInline(src [, env]) -> String - * - src (String): source string - * - env (Object): environment sandbox - * - * Similar to [[MarkdownIt.render]] but for single paragraph content. Result - * will NOT be wrapped into `

` tags. - **/ -MarkdownIt.prototype.renderInline = function (src, env) { - env = env || {}; - return this.renderer.render(this.parseInline(src, env), this.options, env); -}; -module.exports = MarkdownIt; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _autoComplete = __webpack_require__(/*! ./auto-complete */ "../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js"); +Object.keys(_autoComplete).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _autoComplete[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _autoComplete[key]; + } + }); +}); +var _mergeAst = __webpack_require__(/*! ./merge-ast */ "../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js"); +Object.keys(_mergeAst).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _mergeAst[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _mergeAst[key]; + } + }); +}); +var _operationName = __webpack_require__(/*! ./operation-name */ "../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js"); +Object.keys(_operationName).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _operationName[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _operationName[key]; + } + }); +}); /***/ }), -/***/ "../node_modules/mdurl/build/index.cjs.js": -/*!************************************************!*\ - !*** ../node_modules/mdurl/build/index.cjs.js ***! - \************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js": +/*!********************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -/* eslint-disable no-bitwise */ -const decodeCache = {}; -function getDecodeCache(exclude) { - let cache = decodeCache[exclude]; - if (cache) { - return cache; - } - cache = decodeCache[exclude] = []; - for (let i = 0; i < 128; i++) { - const ch = String.fromCharCode(i); - cache.push(ch); - } - for (let i = 0; i < exclude.length; i++) { - const ch = exclude.charCodeAt(i); - cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2); - } - return cache; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.mergeAst = mergeAst; +var _chunkLMOQIXV = __webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +function uniqueBy(array, iteratee) { + var _a; + const FilteredMap = /* @__PURE__ */new Map(), + result = []; + for (const item of array) if (item.kind === "Field") { + const uniqueValue = iteratee(item), + existing = FilteredMap.get(uniqueValue); + if ((_a = item.directives) != null && _a.length) { + const itemClone = (0, _chunkLMOQIXV.__spreadValues)({}, item); + result.push(itemClone); + } else if (existing != null && existing.selectionSet && item.selectionSet) existing.selectionSet.selections = [...existing.selectionSet.selections, ...item.selectionSet.selections];else if (!existing) { + const itemClone = (0, _chunkLMOQIXV.__spreadValues)({}, item); + FilteredMap.set(uniqueValue, itemClone), result.push(itemClone); + } + } else result.push(item); + return result; } - -// Decode percent-encoded string. -// -function decode(string, exclude) { - if (typeof exclude !== 'string') { - exclude = decode.defaultChars; - } - const cache = getDecodeCache(exclude); - return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) { - let result = ''; - for (let i = 0, l = seq.length; i < l; i += 3) { - const b1 = parseInt(seq.slice(i + 1, i + 3), 16); - if (b1 < 0x80) { - result += cache[b1]; - continue; +function inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType) { + var _a; + const selectionSetTypeName = selectionSetType ? (0, _graphql.getNamedType)(selectionSetType).name : null, + outputSelections = [], + seenSpreads = []; + for (let selection of selections) { + if (selection.kind === "FragmentSpread") { + const fragmentName = selection.name.value; + if (!selection.directives || selection.directives.length === 0) { + if (seenSpreads.includes(fragmentName)) continue; + seenSpreads.push(fragmentName); } - if ((b1 & 0xE0) === 0xC0 && i + 3 < l) { - // 110xxxxx 10xxxxxx - const b2 = parseInt(seq.slice(i + 4, i + 6), 16); - if ((b2 & 0xC0) === 0x80) { - const chr = b1 << 6 & 0x7C0 | b2 & 0x3F; - if (chr < 0x80) { - result += '\ufffd\ufffd'; - } else { - result += String.fromCharCode(chr); - } - i += 3; - continue; - } + const fragmentDefinition = fragmentDefinitions[selection.name.value]; + if (fragmentDefinition) { + const { + typeCondition, + directives, + selectionSet + } = fragmentDefinition; + selection = { + kind: _graphql.Kind.INLINE_FRAGMENT, + typeCondition, + directives, + selectionSet + }; } - if ((b1 & 0xF0) === 0xE0 && i + 6 < l) { - // 1110xxxx 10xxxxxx 10xxxxxx - const b2 = parseInt(seq.slice(i + 4, i + 6), 16); - const b3 = parseInt(seq.slice(i + 7, i + 9), 16); - if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) { - const chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F; - if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) { - result += '\ufffd\ufffd\ufffd'; - } else { - result += String.fromCharCode(chr); - } - i += 6; - continue; - } + } + if (selection.kind === _graphql.Kind.INLINE_FRAGMENT && ( + // Cannot inline if there are directives + !selection.directives || ((_a = selection.directives) == null ? void 0 : _a.length) === 0)) { + const fragmentTypeName = selection.typeCondition ? selection.typeCondition.name.value : null; + if (!fragmentTypeName || fragmentTypeName === selectionSetTypeName) { + outputSelections.push(...inlineRelevantFragmentSpreads(fragmentDefinitions, selection.selectionSet.selections, selectionSetType)); + continue; } - if ((b1 & 0xF8) === 0xF0 && i + 9 < l) { - // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx - const b2 = parseInt(seq.slice(i + 4, i + 6), 16); - const b3 = parseInt(seq.slice(i + 7, i + 9), 16); - const b4 = parseInt(seq.slice(i + 10, i + 12), 16); - if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) { - let chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F; - if (chr < 0x10000 || chr > 0x10FFFF) { - result += '\ufffd\ufffd\ufffd\ufffd'; - } else { - chr -= 0x10000; - result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF)); - } - i += 9; - continue; - } + } + outputSelections.push(selection); + } + return outputSelections; +} +function mergeAst(documentAST, schema) { + const typeInfo = schema ? new _graphql.TypeInfo(schema) : null, + fragmentDefinitions = /* @__PURE__ */Object.create(null); + for (const definition of documentAST.definitions) definition.kind === _graphql.Kind.FRAGMENT_DEFINITION && (fragmentDefinitions[definition.name.value] = definition); + const flattenVisitors = { + SelectionSet(node) { + const selectionSetType = typeInfo ? typeInfo.getParentType() : null; + let { + selections + } = node; + return selections = inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType), (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, node), { + selections + }); + }, + FragmentDefinition() { + return null; } - result += '\ufffd'; + }, + flattenedAST = (0, _graphql.visit)(documentAST, typeInfo ? (0, _graphql.visitWithTypeInfo)(typeInfo, flattenVisitors) : flattenVisitors); + return (0, _graphql.visit)(flattenedAST, { + SelectionSet(node) { + let { + selections + } = node; + return selections = uniqueBy(selections, selection => selection.alias ? selection.alias.value : selection.name.value), (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, node), { + selections + }); + }, + FragmentDefinition() { + return null; } - return result; }); } -decode.defaultChars = ';/?:@&=+$,#'; -decode.componentChars = ''; -const encodeCache = {}; -// Create a lookup array where anything but characters in `chars` string -// and alphanumeric chars is percent-encoded. -// -function getEncodeCache(exclude) { - let cache = encodeCache[exclude]; - if (cache) { - return cache; - } - cache = encodeCache[exclude] = []; - for (let i = 0; i < 128; i++) { - const ch = String.fromCharCode(i); - if (/^[0-9a-z]$/i.test(ch)) { - // always allow unencoded alphanumeric characters - cache.push(ch); - } else { - cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2)); - } - } - for (let i = 0; i < exclude.length; i++) { - cache[exclude.charCodeAt(i)] = exclude[i]; +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js": +/*!*************************************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js ***! + \*************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getSelectedOperationName = getSelectedOperationName; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +function getSelectedOperationName(prevOperations, prevSelectedOperationName, operations) { + if (!operations || operations.length < 1) return; + const names = operations.map(op => { + var _a; + return (_a = op.name) == null ? void 0 : _a.value; + }); + if (prevSelectedOperationName && names.includes(prevSelectedOperationName)) return prevSelectedOperationName; + if (prevSelectedOperationName && prevOperations) { + const prevIndex = prevOperations.map(op => { + var _a; + return (_a = op.name) == null ? void 0 : _a.value; + }).indexOf(prevSelectedOperationName); + if (prevIndex !== -1 && prevIndex < names.length) return names[prevIndex]; } - return cache; + return names[0]; } -// Encode unsafe characters with percent-encoding, skipping already -// encoded sequences. -// -// - string - string to encode -// - exclude - list of characters to ignore (in addition to a-zA-Z0-9) -// - keepEscaped - don't encode '%' in a correct escape sequence (default: true) -// -function encode(string, exclude, keepEscaped) { - if (typeof exclude !== 'string') { - // encode(string, keepEscaped) - keepEscaped = exclude; - exclude = encode.defaultChars; - } - if (typeof keepEscaped === 'undefined') { - keepEscaped = true; - } - const cache = getEncodeCache(exclude); - let result = ''; - for (let i = 0, l = string.length; i < l; i++) { - const code = string.charCodeAt(i); - if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) { - if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) { - result += string.slice(i, i + 3); - i += 2; - continue; - } +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/index.js": +/*!************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/index.js ***! + \************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _asyncHelpers = __webpack_require__(/*! ./async-helpers */ "../../graphiql-toolkit/dist/esm/async-helpers/index.js"); +Object.keys(_asyncHelpers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _asyncHelpers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _asyncHelpers[key]; } - if (code < 128) { - result += cache[code]; - continue; + }); +}); +var _createFetcher = __webpack_require__(/*! ./create-fetcher */ "../../graphiql-toolkit/dist/esm/create-fetcher/index.js"); +Object.keys(_createFetcher).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _createFetcher[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _createFetcher[key]; } - if (code >= 0xD800 && code <= 0xDFFF) { - if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) { - const nextCode = string.charCodeAt(i + 1); - if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) { - result += encodeURIComponent(string[i] + string[i + 1]); - i++; - continue; - } + }); +}); +var _format = __webpack_require__(/*! ./format */ "../../graphiql-toolkit/dist/esm/format/index.js"); +Object.keys(_format).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _format[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _format[key]; + } + }); +}); +var _graphqlHelpers = __webpack_require__(/*! ./graphql-helpers */ "../../graphiql-toolkit/dist/esm/graphql-helpers/index.js"); +Object.keys(_graphqlHelpers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _graphqlHelpers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _graphqlHelpers[key]; + } + }); +}); +var _storage = __webpack_require__(/*! ./storage */ "../../graphiql-toolkit/dist/esm/storage/index.js"); +Object.keys(_storage).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _storage[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _storage[key]; + } + }); +}); + +/***/ }), + +/***/ "../../graphiql-toolkit/dist/esm/storage/base.js": +/*!*******************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/storage/base.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.StorageAPI = void 0; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +function isQuotaError(storage, e) { + return e instanceof DOMException && ( + // everything except Firefox + e.code === 22 || + // Firefox + e.code === 1014 || + // test name field too, because code might not be present + // everything except Firefox + e.name === "QuotaExceededError" || + // Firefox + e.name === "NS_ERROR_DOM_QUOTA_REACHED") && + // acknowledge QuotaExceededError only if there's something already stored + storage.length !== 0; +} +class StorageAPI { + constructor(storage) { + storage ? this.storage = storage : storage === null ? this.storage = null : typeof window == "undefined" ? this.storage = null : this.storage = { + getItem: localStorage.getItem.bind(localStorage), + setItem: localStorage.setItem.bind(localStorage), + removeItem: localStorage.removeItem.bind(localStorage), + get length() { + let keys = 0; + for (const key in localStorage) key.indexOf(`${STORAGE_NAMESPACE}:`) === 0 && (keys += 1); + return keys; + }, + clear() { + for (const key in localStorage) key.indexOf(`${STORAGE_NAMESPACE}:`) === 0 && localStorage.removeItem(key); } - result += '%EF%BF%BD'; - continue; + }; + } + get(name) { + if (!this.storage) return null; + const key = `${STORAGE_NAMESPACE}:${name}`, + value = this.storage.getItem(key); + return value === "null" || value === "undefined" ? (this.storage.removeItem(key), null) : value || null; + } + set(name, value) { + let quotaError = !1, + error = null; + if (this.storage) { + const key = `${STORAGE_NAMESPACE}:${name}`; + if (value) try { + this.storage.setItem(key, value); + } catch (e) { + error = e instanceof Error ? e : new Error(`${e}`), quotaError = isQuotaError(this.storage, e); + } else this.storage.removeItem(key); } - result += encodeURIComponent(string[i]); + return { + isQuotaError: quotaError, + error + }; } - return result; -} -encode.defaultChars = ";/?:@&=+$,-_.!~*'()#"; -encode.componentChars = "-_.!~*'()"; -function format(url) { - let result = ''; - result += url.protocol || ''; - result += url.slashes ? '//' : ''; - result += url.auth ? url.auth + '@' : ''; - if (url.hostname && url.hostname.indexOf(':') !== -1) { - // ipv6 address - result += '[' + url.hostname + ']'; - } else { - result += url.hostname || ''; + clear() { + this.storage && this.storage.clear(); } - result += url.port ? ':' + url.port : ''; - result += url.pathname || ''; - result += url.search || ''; - result += url.hash || ''; - return result; } +exports.StorageAPI = StorageAPI; +const STORAGE_NAMESPACE = "graphiql"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. +/***/ }), -// -// Changes from joyent/node: -// -// 1. No leading slash in paths, -// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/` -// -// 2. Backslashes are not replaced with slashes, -// so `http:\\example.org\` is treated like a relative path -// -// 3. Trailing colon is treated like a part of the path, -// i.e. in `http://example.org:foo` pathname is `:foo` -// -// 4. Nothing is URL-encoded in the resulting object, -// (in joyent/node some chars in auth and paths are encoded) -// -// 5. `url.parse()` does not have `parseQueryString` argument -// -// 6. Removed extraneous result properties: `host`, `path`, `query`, etc., -// which can be constructed using other parts of the url. -// +/***/ "../../graphiql-toolkit/dist/esm/storage/custom.js": +/*!*********************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/storage/custom.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.pathname = null; -} +"use strict"; -// Reference: RFC 3986, RFC 1808, RFC 2396 -// define these here so at least they only have to be -// compiled once on the first module load. -const protocolPattern = /^([a-z0-9.+-]+:)/i; -const portPattern = /:[0-9]*$/; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createLocalStorage = createLocalStorage; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +function createLocalStorage({ + namespace +}) { + const storageKeyPrefix = `${namespace}:`, + getStorageKey = key => `${storageKeyPrefix}${key}`; + return { + setItem: (key, value) => localStorage.setItem(getStorageKey(key), value), + getItem: key => localStorage.getItem(getStorageKey(key)), + removeItem: key => localStorage.removeItem(getStorageKey(key)), + get length() { + let keys = 0; + for (const key in localStorage) key.indexOf(storageKeyPrefix) === 0 && (keys += 1); + return keys; + }, + clear() { + for (const key in localStorage) key.indexOf(storageKeyPrefix) === 0 && localStorage.removeItem(key); + } + }; +} -// Special case for a simple path URL -/* eslint-disable-next-line no-useless-escape */ -const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/; +/***/ }), -// RFC 2396: characters reserved for delimiting URLs. -// We actually just auto-escape these. -const delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t']; +/***/ "../../graphiql-toolkit/dist/esm/storage/history.js": +/*!**********************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/storage/history.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -// RFC 2396: characters not allowed for various reasons. -const unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims); +"use strict"; -// Allowed by RFCs, but cause of XSS attacks. Always escape these. -const autoEscape = ['\''].concat(unwise); -// Characters that are never ever allowed in a hostname. -// Note that any invalid chars are also handled, but these -// are the ones that are *expected* to be seen, so we fast-path -// them. -const nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape); -const hostEndingChars = ['/', '?', '#']; -const hostnameMaxLen = 255; -const hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/; -const hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/; -// protocols that can allow "unsafe" and "unwise" chars. -// protocols that never have a hostname. -const hostlessProtocol = { - javascript: true, - 'javascript:': true -}; -// protocols that always contain a // bit. -const slashedProtocol = { - http: true, - https: true, - ftp: true, - gopher: true, - file: true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true -}; -function urlParse(url, slashesDenoteHost) { - if (url && url instanceof Url) return url; - const u = new Url(); - u.parse(url, slashesDenoteHost); - return u; -} -Url.prototype.parse = function (url, slashesDenoteHost) { - let lowerProto, hec, slashes; - let rest = url; - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - const simplePath = simplePathPattern.exec(rest); - if (simplePath) { - this.pathname = simplePath[1]; - if (simplePath[2]) { - this.search = simplePath[2]; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.HistoryStore = void 0; +var _chunkLMOQIXV = __webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/dist/esm/storage/query.js"); +const MAX_QUERY_SIZE = 1e5; +class HistoryStore { + constructor(storage, maxHistoryLength) { + this.storage = storage; + this.maxHistoryLength = maxHistoryLength; + this.updateHistory = ({ + query, + variables, + headers, + operationName + }) => { + if (!this.shouldSaveQuery(query, variables, headers, this.history.fetchRecent())) return; + this.history.push({ + query, + variables, + headers, + operationName + }); + const historyQueries = this.history.items, + favoriteQueries = this.favorite.items; + this.queries = historyQueries.concat(favoriteQueries); + }; + this.deleteHistory = ({ + query, + variables, + headers, + operationName, + favorite + }, clearFavorites = !1) => { + function deleteFromStore(store) { + const found = store.items.find(x => x.query === query && x.variables === variables && x.headers === headers && x.operationName === operationName); + found && store.delete(found); } - return this; + (favorite || clearFavorites) && deleteFromStore(this.favorite), (!favorite || clearFavorites) && deleteFromStore(this.history), this.queries = [...this.history.items, ...this.favorite.items]; + }; + this.history = new _query.QueryStore("queries", this.storage, this.maxHistoryLength), this.favorite = new _query.QueryStore("favorites", this.storage, null), this.queries = [...this.history.fetchAll(), ...this.favorite.fetchAll()]; + } + shouldSaveQuery(query, variables, headers, lastQuerySaved) { + if (!query) return !1; + try { + (0, _graphql.parse)(query); + } catch (e) { + return !1; } + return query.length > MAX_QUERY_SIZE ? !1 : lastQuerySaved ? !(JSON.stringify(query) === JSON.stringify(lastQuerySaved.query) && (JSON.stringify(variables) === JSON.stringify(lastQuerySaved.variables) && (JSON.stringify(headers) === JSON.stringify(lastQuerySaved.headers) || headers && !lastQuerySaved.headers) || variables && !lastQuerySaved.variables)) : !0; } - let proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - lowerProto = proto.toLowerCase(); - this.protocol = proto; - rest = rest.substr(proto.length); + toggleFavorite({ + query, + variables, + headers, + operationName, + label, + favorite + }) { + const item = { + query, + variables, + headers, + operationName, + label + }; + favorite ? (item.favorite = !1, this.favorite.delete(item), this.history.push(item)) : (item.favorite = !0, this.favorite.push(item), this.history.delete(item)), this.queries = [...this.history.items, ...this.favorite.items]; } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - /* eslint-disable-next-line no-useless-escape */ - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } + editLabel({ + query, + variables, + headers, + operationName, + label, + favorite + }, index) { + const item = { + query, + variables, + headers, + operationName, + label + }; + favorite ? this.favorite.edit((0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, item), { + favorite + }), index) : this.history.edit(item, index), this.queries = [...this.history.items, ...this.favorite.items]; } - if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c +} +exports.HistoryStore = HistoryStore; - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. +/***/ }), - // find the first instance of any hostEndingChars - let hostEnd = -1; - for (let i = 0; i < hostEndingChars.length; i++) { - hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { - hostEnd = hec; - } - } +/***/ "../../graphiql-toolkit/dist/esm/storage/index.js": +/*!********************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/storage/index.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - let auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } +"use strict"; - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = auth; - } - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (let i = 0; i < nonHostChars.length; i++) { - hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { - hostEnd = hec; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _base = __webpack_require__(/*! ./base */ "../../graphiql-toolkit/dist/esm/storage/base.js"); +Object.keys(_base).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _base[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _base[key]; } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) { - hostEnd = rest.length; + }); +}); +var _history = __webpack_require__(/*! ./history */ "../../graphiql-toolkit/dist/esm/storage/history.js"); +Object.keys(_history).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _history[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _history[key]; } - if (rest[hostEnd - 1] === ':') { - hostEnd--; + }); +}); +var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/dist/esm/storage/query.js"); +Object.keys(_query).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _query[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _query[key]; } - const host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); + }); +}); +var _custom = __webpack_require__(/*! ./custom */ "../../graphiql-toolkit/dist/esm/storage/custom.js"); +Object.keys(_custom).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _custom[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _custom[key]; + } + }); +}); - // pull out port. - this.parseHost(host); +/***/ }), - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - this.hostname = this.hostname || ''; +/***/ "../../graphiql-toolkit/dist/esm/storage/query.js": +/*!********************************************************!*\ + !*** ../../graphiql-toolkit/dist/esm/storage/query.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - const ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; +"use strict"; - // validate a little. - if (!ipv6Hostname) { - const hostparts = this.hostname.split(/\./); - for (let i = 0, l = hostparts.length; i < l; i++) { - const part = hostparts[i]; - if (!part) { - continue; - } - if (!part.match(hostnamePartPattern)) { - let newpart = ''; - for (let j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - const validParts = hostparts.slice(0, i); - const notHost = hostparts.slice(i + 1); - const bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.QueryStore = void 0; +__webpack_require__(/*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js"); +class QueryStore { + constructor(key, storage, maxSize = null) { + this.key = key; + this.storage = storage; + this.maxSize = maxSize; + this.items = this.fetchAll(); } - - // chop off from the tail first. - const hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); + get length() { + return this.items.length; } - const qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - rest = rest.slice(0, qm); + contains(item) { + return this.items.some(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); } - if (rest) { - this.pathname = rest; + edit(item, index) { + if (typeof index == "number" && this.items[index]) { + const found = this.items[index]; + if (found.query === item.query && found.variables === item.variables && found.headers === item.headers && found.operationName === item.operationName) { + this.items.splice(index, 1, item), this.save(); + return; + } + } + const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); + itemIndex !== -1 && (this.items.splice(itemIndex, 1, item), this.save()); } - if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { - this.pathname = ''; + delete(item) { + const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName); + itemIndex !== -1 && (this.items.splice(itemIndex, 1), this.save()); } - return this; -}; -Url.prototype.parseHost = function (host) { - let port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); + fetchRecent() { + return this.items.at(-1); + } + fetchAll() { + const raw = this.storage.get(this.key); + return raw ? JSON.parse(raw)[this.key] : []; + } + push(item) { + const items = [...this.items, item]; + this.maxSize && items.length > this.maxSize && items.shift(); + for (let attempts = 0; attempts < 5; attempts++) { + const response = this.storage.set(this.key, JSON.stringify({ + [this.key]: items + })); + if (!(response != null && response.error)) this.items = items;else if (response.isQuotaError && this.maxSize) items.shift();else return; } - host = host.substr(0, host.length - port.length); } - if (host) { - this.hostname = host; + save() { + this.storage.set(this.key, JSON.stringify({ + [this.key]: this.items + })); } -}; -exports.decode = decode; -exports.encode = encode; -exports.format = format; -exports.parse = urlParse; - -/***/ }), - -/***/ "../node_modules/uc.micro/build/index.cjs.js": -/*!***************************************************!*\ - !*** ../node_modules/uc.micro/build/index.cjs.js ***! - \***************************************************/ -/***/ (function(__unused_webpack_module, exports) { - - - -var regex$5 = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var regex$4 = /[\0-\x1F\x7F-\x9F]/; -var regex$3 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/; -var regex$2 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/; -var regex$1 = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/; -var regex = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; -exports.Any = regex$5; -exports.Cc = regex$4; -exports.Cf = regex$3; -exports.P = regex$2; -exports.S = regex$1; -exports.Z = regex; +} +exports.QueryStore = QueryStore; /***/ }), -/***/ "./components/GraphiQL.tsx": -/*!*********************************!*\ - !*** ./components/GraphiQL.tsx ***! - \*********************************/ +/***/ "./GraphiQL.tsx": +/*!**********************!*\ + !*** ./GraphiQL.tsx ***! + \**********************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -72899,14 +84504,14 @@ exports.GraphiQL = GraphiQL; exports.GraphiQLInterface = GraphiQLInterface; var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); var _react2 = __webpack_require__(/*! @graphiql/react */ "../../graphiql-react/dist/index.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /** - * Copyright (c) 2020 GraphQL Contributors. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ const majorVersion = parseInt(_react.default.version.slice(0, 2), 10); if (majorVersion < 16) { throw new Error(['GraphiQL 0.18.0 and after is not compatible with React 15 or below.', 'If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:', 'https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49'].join('\n')); @@ -72924,38 +84529,37 @@ if (majorVersion < 16) { * * @see https://github.com/graphql/graphiql#usage */ - -function GraphiQL(_ref) { +function GraphiQL({ + dangerouslyAssumeSchemaIsValid, + confirmCloseTab, + defaultQuery, + defaultTabs, + externalFragments, + fetcher, + getDefaultFieldNames, + headers, + inputValueDeprecation, + introspectionQueryName, + maxHistoryLength, + onEditOperationName, + onSchemaChange, + onTabChange, + onTogglePluginVisibility, + operationName, + plugins, + query, + response, + schema, + schemaDescription, + shouldPersistHeaders, + storage, + validationRules, + variables, + visiblePlugin, + defaultHeaders, + ...props +}) { var _props$disableTabs; - let { - dangerouslyAssumeSchemaIsValid, - defaultQuery, - defaultTabs, - externalFragments, - fetcher, - getDefaultFieldNames, - headers, - inputValueDeprecation, - introspectionQueryName, - maxHistoryLength, - onEditOperationName, - onSchemaChange, - onTabChange, - onTogglePluginVisibility, - operationName, - plugins, - query, - response, - schema, - schemaDescription, - shouldPersistHeaders, - storage, - validationRules, - variables, - visiblePlugin, - defaultHeaders, - ...props - } = _ref; // Ensure props are correct if (typeof fetcher !== 'function') { throw new TypeError('The `GraphiQL` component requires a `fetcher` function to be passed as prop.'); @@ -72988,8 +84592,10 @@ function GraphiQL(_ref) { validationRules: validationRules, variables: variables }, /*#__PURE__*/_react.default.createElement(GraphiQLInterface, _extends({ + confirmCloseTab: confirmCloseTab, showPersistHeadersSettings: shouldPersistHeaders !== false, - disableTabs: (_props$disableTabs = props.disableTabs) !== null && _props$disableTabs !== void 0 ? _props$disableTabs : false + disableTabs: (_props$disableTabs = props.disableTabs) !== null && _props$disableTabs !== void 0 ? _props$disableTabs : false, + forcedTheme: props.forcedTheme }, props))); } @@ -72997,6 +84603,8 @@ function GraphiQL(_ref) { GraphiQL.Logo = GraphiQLLogo; GraphiQL.Toolbar = GraphiQLToolbar; GraphiQL.Footer = GraphiQLFooter; +const THEMES = ['light', 'dark', 'system']; +const TAB_CLASS_PREFIX = 'graphiql-session-tab-'; function GraphiQLInterface(props) { var _props$isHeadersEdito, _pluginContext$visibl, _props$toolbar, _props$toolbar2; const isHeadersEditorEnabled = (_props$isHeadersEdito = props.isHeadersEditorEnabled) !== null && _props$isHeadersEdito !== void 0 ? _props$isHeadersEdito : true; @@ -73011,6 +84619,7 @@ function GraphiQLInterface(props) { }); const storageContext = (0, _react2.useStorageContext)(); const pluginContext = (0, _react2.usePluginContext)(); + const forcedTheme = (0, _react.useMemo)(() => props.forcedTheme && THEMES.includes(props.forcedTheme) ? props.forcedTheme : undefined, [props.forcedTheme]); const copy = (0, _react2.useCopyQuery)({ onCopyQuery: props.onCopyQuery }); @@ -73019,7 +84628,14 @@ function GraphiQLInterface(props) { const { theme, setTheme - } = (0, _react2.useTheme)(); + } = (0, _react2.useTheme)(props.defaultTheme); + (0, _react.useEffect)(() => { + if (forcedTheme === 'system') { + setTheme(null); + } else if (forcedTheme === 'light' || forcedTheme === 'dark') { + setTheme(forcedTheme); + } + }, [forcedTheme, setTheme]); const PluginContent = pluginContext === null || pluginContext === void 0 ? void 0 : (_pluginContext$visibl = pluginContext.visiblePlugin) === null || _pluginContext$visibl === void 0 ? void 0 : _pluginContext$visibl.content; const pluginResize = (0, _react2.useDragResize)({ defaultSizeRelation: 1 / 3, @@ -73080,7 +84696,7 @@ function GraphiQLInterface(props) { }, /*#__PURE__*/_react.default.createElement(_react2.CopyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" - })), ((_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.additionalContent) && props.toolbar.additionalContent, ((_props$toolbar2 = props.toolbar) === null || _props$toolbar2 === void 0 ? void 0 : _props$toolbar2.additionalComponent) && /*#__PURE__*/_react.default.createElement(props.toolbar.additionalComponent, null)); + })), (_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.additionalContent, ((_props$toolbar2 = props.toolbar) === null || _props$toolbar2 === void 0 ? void 0 : _props$toolbar2.additionalComponent) && /*#__PURE__*/_react.default.createElement(props.toolbar.additionalComponent, null)); const footer = children.find(child => isChildComponentType(child, GraphiQL.Footer)); const onClickReference = (0, _react.useCallback)(() => { if (pluginResize.hiddenElement === 'first') { @@ -73108,9 +84724,9 @@ function GraphiQLInterface(props) { const handleShowDialog = (0, _react.useCallback)(event => { setShowDialog(event.currentTarget.dataset.value); }, []); - const handlePluginClick = (0, _react.useCallback)(e => { + const handlePluginClick = (0, _react.useCallback)(event => { const context = pluginContext; - const pluginIndex = Number(e.currentTarget.dataset.index); + const pluginIndex = Number(event.currentTarget.dataset.index); const plugin = context.plugins.find((_, index) => pluginIndex === index); const isVisible = plugin === context.visiblePlugin; if (isVisible) { @@ -73151,9 +84767,39 @@ function GraphiQLInterface(props) { }, /*#__PURE__*/_react.default.createElement(_react2.PlusIcon, { "aria-hidden": "true" }))); + const className = props.className ? ` ${props.className}` : ''; + const confirmClose = props.confirmCloseTab; + const handleTabClose = (0, _react.useCallback)(async event => { + const tabButton = event.currentTarget.previousSibling; + const index = Number(tabButton.id.replace(TAB_CLASS_PREFIX, '')); + + /** TODO: + * Move everything after into `editorContext.closeTab` once zustand will be used instead of + * React context, since now we can't use execution context inside editor context, since editor + * context is used in execution context. + */ + const shouldCloseTab = confirmClose ? await confirmClose(index) : true; + if (!shouldCloseTab) { + return; + } + if (editorContext.activeTabIndex === index) { + executionContext.stop(); + } + editorContext.closeTab(index); + }, [confirmClose, editorContext, executionContext]); + const handleTabClick = (0, _react.useCallback)(event => { + const index = Number(event.currentTarget.id.replace(TAB_CLASS_PREFIX, '')); + /** TODO: + * Move everything after into `editorContext.changeTab` once zustand will be used instead of + * React context, since now we can't use execution context inside editor context, since editor + * context is used in execution context. + */ + executionContext.stop(); + editorContext.changeTab(index); + }, [editorContext, executionContext]); return /*#__PURE__*/_react.default.createElement(_react2.Tooltip.Provider, null, /*#__PURE__*/_react.default.createElement("div", { "data-testid": "graphiql-container", - className: "graphiql-container" + className: `graphiql-container${className}` }, /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-sidebar" }, /*#__PURE__*/_react.default.createElement("div", { @@ -73161,7 +84807,6 @@ function GraphiQLInterface(props) { }, pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.plugins.map((plugin, index) => { const isVisible = plugin === pluginContext.visiblePlugin; const label = `${isVisible ? 'Hide' : 'Show'} ${plugin.title}`; - const Icon = plugin.icon; return /*#__PURE__*/_react.default.createElement(_react2.Tooltip, { key: plugin.title, label: label @@ -73171,7 +84816,7 @@ function GraphiQLInterface(props) { onClick: handlePluginClick, "data-index": index, "aria-label": label - }, /*#__PURE__*/_react.default.createElement(Icon, { + }, /*#__PURE__*/_react.default.createElement(plugin.icon, { "aria-hidden": "true" }))); })), /*#__PURE__*/_react.default.createElement("div", { @@ -73223,7 +84868,7 @@ function GraphiQLInterface(props) { className: "graphiql-sessions" }, /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-session-header" - }, props.disableTabs ? null : /*#__PURE__*/_react.default.createElement(_react2.Tabs, { + }, !props.disableTabs && /*#__PURE__*/_react.default.createElement(_react2.Tabs, { values: editorContext.tabs, onReorder: handleReorder, "aria-label": "Select active operation" @@ -73233,25 +84878,18 @@ function GraphiQLInterface(props) { isActive: index === editorContext.activeTabIndex }, /*#__PURE__*/_react.default.createElement(_react2.Tab.Button, { "aria-controls": "graphiql-session", - id: `graphiql-session-tab-${index}`, - onClick: () => { - executionContext.stop(); - editorContext.changeTab(index); - } + id: `${TAB_CLASS_PREFIX}${index}`, + onClick: handleTabClick }, tab.title), /*#__PURE__*/_react.default.createElement(_react2.Tab.Close, { - onClick: () => { - if (editorContext.activeTabIndex === index) { - executionContext.stop(); - } - editorContext.closeTab(index); - } + onClick: handleTabClose }))), addTab)), /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-session-header-right" }, editorContext.tabs.length === 1 && addTab, logo)), /*#__PURE__*/_react.default.createElement("div", { role: "tabpanel", - id: "graphiql-session", + id: "graphiql-session" // used by aria-controls="graphiql-session" + , className: "graphiql-session", - "aria-labelledby": `graphiql-session-tab-${editorContext.activeTabIndex}` + "aria-labelledby": `${TAB_CLASS_PREFIX}${editorContext.activeTabIndex}` }, /*#__PURE__*/_react.default.createElement("div", { ref: editorResize.firstRef }, /*#__PURE__*/_react.default.createElement("div", { @@ -73365,13 +85003,13 @@ function GraphiQLInterface(props) { id: "disable-persist-headers", className: editorContext.shouldPersistHeaders ? '' : 'active', onClick: handlePersistHeaders - }, "Off"))) : null, /*#__PURE__*/_react.default.createElement("div", { + }, "Off"))) : null, !forcedTheme && /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-dialog-section" }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-dialog-section-title" }, "Theme"), /*#__PURE__*/_react.default.createElement("div", { className: "graphiql-dialog-section-caption" - }, "Adjust how the interface looks like.")), /*#__PURE__*/_react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/_react.default.createElement(_react2.Button, { + }, "Adjust how the interface appears.")), /*#__PURE__*/_react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/_react.default.createElement(_react2.Button, { type: "button", className: theme === null ? 'active' : '', onClick: handleChangeTheme @@ -73401,7 +85039,7 @@ function GraphiQLInterface(props) { error: 'Failed' }[clearStorageStatus] || 'Clear data')) : null))); } -const modifier = typeof window !== 'undefined' && window.navigator.platform.toLowerCase().indexOf('mac') === 0 ? 'Cmd' : 'Ctrl'; +const modifier = _react2.isMacOs ? '⌘' : 'Ctrl'; const SHORT_KEYS = Object.entries({ 'Search in editor': [modifier, 'F'], 'Search in documentation': [modifier, 'K'], @@ -73411,22 +85049,18 @@ const SHORT_KEYS = Object.entries({ 'Copy query': ['Ctrl', 'Shift', 'C'], 'Re-fetch schema using introspection': ['Ctrl', 'Shift', 'R'] }); -function ShortKeys(_ref2) { - let { - keyMap - } = _ref2; +function ShortKeys({ + keyMap +}) { return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("table", { className: "graphiql-table" - }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "Short Key"), /*#__PURE__*/_react.default.createElement("th", null, "Function"))), /*#__PURE__*/_react.default.createElement("tbody", null, SHORT_KEYS.map(_ref3 => { - let [title, keys] = _ref3; - return /*#__PURE__*/_react.default.createElement("tr", { - key: title - }, /*#__PURE__*/_react.default.createElement("td", null, keys.map((key, index, array) => /*#__PURE__*/_react.default.createElement(_react.Fragment, { - key: key - }, /*#__PURE__*/_react.default.createElement("code", { - className: "graphiql-key" - }, key), index !== array.length - 1 && ' + '))), /*#__PURE__*/_react.default.createElement("td", null, title)); - }))), /*#__PURE__*/_react.default.createElement("p", null, "The editors use", ' ', /*#__PURE__*/_react.default.createElement("a", { + }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "Short Key"), /*#__PURE__*/_react.default.createElement("th", null, "Function"))), /*#__PURE__*/_react.default.createElement("tbody", null, SHORT_KEYS.map(([title, keys]) => /*#__PURE__*/_react.default.createElement("tr", { + key: title + }, /*#__PURE__*/_react.default.createElement("td", null, keys.map((key, index, array) => /*#__PURE__*/_react.default.createElement(_react.Fragment, { + key: key + }, /*#__PURE__*/_react.default.createElement("code", { + className: "graphiql-key" + }, key), index !== array.length - 1 && ' + '))), /*#__PURE__*/_react.default.createElement("td", null, title))))), /*#__PURE__*/_react.default.createElement("p", null, "The editors use", ' ', /*#__PURE__*/_react.default.createElement("a", { href: "https://codemirror.net/5/doc/manual.html#keymaps", target: "_blank", rel: "noopener noreferrer" @@ -73478,6 +85112,7 @@ function isChildComponentType(child, component) { \***************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -73507,6 +85142,12 @@ Object.defineProperty(exports, "FileChangeTypeKind", ({ return _types.FileChangeTypeKind; } })); +Object.defineProperty(exports, "GraphQLDocumentMode", ({ + enumerable: true, + get: function () { + return _parser.GraphQLDocumentMode; + } +})); Object.defineProperty(exports, "LexRules", ({ enumerable: true, get: function () { @@ -73573,6 +85214,12 @@ Object.defineProperty(exports, "getAutocompleteSuggestions", ({ return _interface.getAutocompleteSuggestions; } })); +Object.defineProperty(exports, "getDefinitionQueryResultForArgument", ({ + enumerable: true, + get: function () { + return _interface.getDefinitionQueryResultForArgument; + } +})); Object.defineProperty(exports, "getDefinitionQueryResultForDefinitionNode", ({ enumerable: true, get: function () { @@ -73600,7 +85247,7 @@ Object.defineProperty(exports, "getDefinitionQueryResultForNamedType", ({ Object.defineProperty(exports, "getDefinitionState", ({ enumerable: true, get: function () { - return _interface.getDefinitionState; + return _parser.getDefinitionState; } })); Object.defineProperty(exports, "getDiagnostics", ({ @@ -73612,7 +85259,7 @@ Object.defineProperty(exports, "getDiagnostics", ({ Object.defineProperty(exports, "getFieldDef", ({ enumerable: true, get: function () { - return _interface.getFieldDef; + return _parser.getFieldDef; } })); Object.defineProperty(exports, "getFragmentDefinitions", ({ @@ -73672,7 +85319,7 @@ Object.defineProperty(exports, "getRange", ({ Object.defineProperty(exports, "getTokenAtPosition", ({ enumerable: true, get: function () { - return _interface.getTokenAtPosition; + return _parser.getTokenAtPosition; } })); Object.defineProperty(exports, "getTypeInfo", ({ @@ -73766,58 +85413,16 @@ var _utils = __webpack_require__(/*! ./utils */ "../../graphql-language-service/ \*************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.forEachState = forEachState; -exports.getDefinitionState = getDefinitionState; -exports.getFieldDef = getFieldDef; +exports.getInsertText = exports.getInputInsertText = exports.getFieldInsertText = void 0; exports.hintList = hintList; exports.objectValues = objectValues; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -function getDefinitionState(tokenState) { - let definitionState; - forEachState(tokenState, state => { - switch (state.kind) { - case 'Query': - case 'ShortQuery': - case 'Mutation': - case 'Subscription': - case 'FragmentDefinition': - definitionState = state; - break; - } - }); - return definitionState; -} -function getFieldDef(schema, type, fieldName) { - if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) { - return _graphql.SchemaMetaFieldDef; - } - if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) { - return _graphql.TypeMetaFieldDef; - } - if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) { - return _graphql.TypeNameMetaFieldDef; - } - if ('getFields' in type) { - return type.getFields()[fieldName]; - } - return null; -} -function forEachState(stack, fn) { - const reverseStateStack = []; - let state = stack; - while (state === null || state === void 0 ? void 0 : state.kind) { - reverseStateStack.push(state); - state = state.prevState; - } - for (let i = reverseStateStack.length - 1; i >= 0; i--) { - fn(reverseStateStack[i]); - } -} function objectValues(object) { const keys = Object.keys(object); const len = keys.length; @@ -73831,7 +85436,7 @@ function hintList(token, list) { return filterAndSortList(list, normalizeText(token.string)); } function filterAndSortList(list, text) { - if (!text) { + if (!text || text.trim() === '' || text.trim() === ':' || text.trim() === '{') { return filterNonEmpty(list, entry => !entry.isDeprecated); } const byProximity = list.map(entry => ({ @@ -73878,6 +85483,34 @@ function lexicalDistance(a, b) { } return d[aLength][bLength]; } +const insertSuffix = n => ` {\n $${n !== null && n !== void 0 ? n : 1}\n}`; +const getInsertText = (prefix, type, fallback) => { + if (!type) { + return fallback !== null && fallback !== void 0 ? fallback : prefix; + } + const namedType = (0, _graphql.getNamedType)(type); + if ((0, _graphql.isObjectType)(namedType) || (0, _graphql.isInputObjectType)(namedType) || (0, _graphql.isListType)(namedType) || (0, _graphql.isAbstractType)(namedType)) { + return prefix + insertSuffix(); + } + return fallback !== null && fallback !== void 0 ? fallback : prefix; +}; +exports.getInsertText = getInsertText; +const getInputInsertText = (prefix, type, fallback) => { + if ((0, _graphql.isListType)(type)) { + const baseType = (0, _graphql.getNamedType)(type.ofType); + return prefix + `[${getInsertText('', baseType, '$1')}]`; + } + return getInsertText(prefix, type, fallback); +}; +exports.getInputInsertText = getInputInsertText; +const getFieldInsertText = field => { + const requiredArgs = field.args.filter(arg => arg.type.toString().endsWith('!')); + if (!requiredArgs.length) { + return; + } + return field.name + `(${requiredArgs.map((arg, i) => `${arg.name}: $${i + 1}`)}) ${getInsertText('', field.type, '\n')}`; +}; +exports.getFieldInsertText = getFieldInsertText; /***/ }), @@ -73887,28 +85520,38 @@ function lexicalDistance(a, b) { \**********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SuggestionCommand = exports.GraphQLDocumentMode = void 0; +exports.SuggestionCommand = void 0; exports.canUseDirective = canUseDirective; exports.getAutocompleteSuggestions = getAutocompleteSuggestions; exports.getFragmentDefinitions = getFragmentDefinitions; -exports.getTokenAtPosition = getTokenAtPosition; -exports.getTypeInfo = getTypeInfo; +Object.defineProperty(exports, "getTypeInfo", ({ + enumerable: true, + get: function () { + return _parser.getTypeInfo; + } +})); exports.getVariableCompletions = getVariableCompletions; -exports.runOnlineParser = runOnlineParser; +Object.defineProperty(exports, "runOnlineParser", ({ + enumerable: true, + get: function () { + return _parser.runOnlineParser; + } +})); var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); var _types = __webpack_require__(/*! ../types */ "../../graphql-language-service/esm/types.js"); var _parser = __webpack_require__(/*! ../parser */ "../../graphql-language-service/esm/parser/index.js"); var _autocompleteUtils = __webpack_require__(/*! ./autocompleteUtils */ "../../graphql-language-service/esm/interface/autocompleteUtils.js"); -const SuggestionCommand = { +var _vscodeLanguageserverTypes = __webpack_require__(/*! vscode-languageserver-types */ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js"); +const SuggestionCommand = exports.SuggestionCommand = { command: 'editor.action.triggerSuggest', title: 'Suggestions' }; -exports.SuggestionCommand = SuggestionCommand; const collectFragmentDefs = op => { const externalFragments = []; if (op) { @@ -73924,51 +85567,34 @@ const collectFragmentDefs = op => { } return externalFragments; }; -const typeSystemKinds = [_graphql.Kind.SCHEMA_DEFINITION, _graphql.Kind.OPERATION_TYPE_DEFINITION, _graphql.Kind.SCALAR_TYPE_DEFINITION, _graphql.Kind.OBJECT_TYPE_DEFINITION, _graphql.Kind.INTERFACE_TYPE_DEFINITION, _graphql.Kind.UNION_TYPE_DEFINITION, _graphql.Kind.ENUM_TYPE_DEFINITION, _graphql.Kind.INPUT_OBJECT_TYPE_DEFINITION, _graphql.Kind.DIRECTIVE_DEFINITION, _graphql.Kind.SCHEMA_EXTENSION, _graphql.Kind.SCALAR_TYPE_EXTENSION, _graphql.Kind.OBJECT_TYPE_EXTENSION, _graphql.Kind.INTERFACE_TYPE_EXTENSION, _graphql.Kind.UNION_TYPE_EXTENSION, _graphql.Kind.ENUM_TYPE_EXTENSION, _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION]; -const hasTypeSystemDefinitions = sdl => { - let hasTypeSystemDef = false; - if (sdl) { - try { - (0, _graphql.visit)((0, _graphql.parse)(sdl), { - enter(node) { - if (node.kind === 'Document') { - return; - } - if (typeSystemKinds.includes(node.kind)) { - hasTypeSystemDef = true; - return _graphql.BREAK; - } - return false; - } - }); - } catch (_a) { - return hasTypeSystemDef; - } - } - return hasTypeSystemDef; -}; function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fragmentDefs, options) { var _a; const opts = Object.assign(Object.assign({}, options), { schema }); - const token = contextToken || getTokenAtPosition(queryText, cursor, 1); - const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state; - const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri); - if (!state) { + const context = (0, _parser.getContextAtPosition)(queryText, cursor, schema, contextToken, options); + if (!context) { return []; } + const { + state, + typeInfo, + mode, + token + } = context; const { kind, step, prevState } = state; - const typeInfo = getTypeInfo(schema, token.state); if (kind === _parser.RuleKinds.DOCUMENT) { - if (mode === GraphQLDocumentMode.TYPE_SYSTEM) { + if (mode === _parser.GraphQLDocumentMode.TYPE_SYSTEM) { return getSuggestionsForTypeSystemDefinitions(token); } - return getSuggestionsForExecutableDefinitions(token); + if (mode === _parser.GraphQLDocumentMode.EXECUTABLE) { + return getSuggestionsForExecutableDefinitions(token); + } + return getSuggestionsForUnknownDocumentMode(token); } if (kind === _parser.RuleKinds.EXTEND_DEF) { return getSuggestionsForExtensionDefinitions(token); @@ -74027,9 +85653,13 @@ function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fra var _a; return { label: argDef.name, - insertText: argDef.name + ': ', + insertText: (0, _autocompleteUtils.getInputInsertText)(argDef.name + ': ', argDef.type), + insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation, + insertTextFormat: _types.InsertTextFormat.Snippet, command: SuggestionCommand, - detail: String(argDef.type), + labelDetails: { + detail: ' ' + String(argDef.type) + }, documentation: (_a = argDef.description) !== null && _a !== void 0 ? _a : undefined, kind: _types.CompletionItemKind.Variable, type: argDef.type @@ -74045,9 +85675,13 @@ function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fra return { label: field.name, detail: String(field.type), - documentation: (_a = field.description) !== null && _a !== void 0 ? _a : undefined, + documentation: (_a = field === null || field === void 0 ? void 0 : field.description) !== null && _a !== void 0 ? _a : undefined, kind: completionKind, - type: field.type + type: field.type, + insertText: (0, _autocompleteUtils.getInputInsertText)(field.name + ': ', field.type), + insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation, + insertTextFormat: _types.InsertTextFormat.Snippet, + command: SuggestionCommand }; })); } @@ -74066,19 +85700,22 @@ function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fra return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, Array.isArray(fragmentDefs) ? fragmentDefs : collectFragmentDefs(fragmentDefs)); } const unwrappedState = unwrapType(state); - if (mode === GraphQLDocumentMode.TYPE_SYSTEM && !unwrappedState.needsAdvance && kind === _parser.RuleKinds.NAMED_TYPE || kind === _parser.RuleKinds.LIST_TYPE) { - if (unwrappedState.kind === _parser.RuleKinds.FIELD_DEF) { - return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isOutputType)(type) && !type.name.startsWith('__')).map(type => ({ - label: type.name, - kind: _types.CompletionItemKind.Function - }))); - } - if (unwrappedState.kind === _parser.RuleKinds.INPUT_VALUE_DEF) { - return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isInputType)(type) && !type.name.startsWith('__')).map(type => ({ - label: type.name, - kind: _types.CompletionItemKind.Function - }))); - } + if (unwrappedState.kind === _parser.RuleKinds.FIELD_DEF) { + return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isOutputType)(type) && !type.name.startsWith('__')).map(type => ({ + label: type.name, + kind: _types.CompletionItemKind.Function, + insertText: (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) ? type.name + '\n' : type.name, + insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation + }))); + } + if (unwrappedState.kind === _parser.RuleKinds.INPUT_VALUE_DEF && step === 2) { + return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isInputType)(type) && !type.name.startsWith('__')).map(type => ({ + label: type.name, + kind: _types.CompletionItemKind.Function, + insertText: (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) ? type.name + '\n$1' : type.name, + insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation, + insertTextFormat: _types.InsertTextFormat.Snippet + }))); } if (kind === _parser.RuleKinds.VARIABLE_DEFINITION && step === 2 || kind === _parser.RuleKinds.LIST_TYPE && step === 1 || kind === _parser.RuleKinds.NAMED_TYPE && prevState && (prevState.kind === _parser.RuleKinds.VARIABLE_DEFINITION || prevState.kind === _parser.RuleKinds.LIST_TYPE || prevState.kind === _parser.RuleKinds.NON_NULL_TYPE)) { return getSuggestionsForVariableDefinition(token, schema, kind); @@ -74086,91 +85723,63 @@ function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fra if (kind === _parser.RuleKinds.DIRECTIVE) { return getSuggestionsForDirective(token, state, schema, kind); } + if (kind === _parser.RuleKinds.DIRECTIVE_DEF) { + return getSuggestionsForDirectiveArguments(token, state, schema, kind); + } return []; } -const insertSuffix = ' {\n $1\n}'; -const getInsertText = field => { - const { - type - } = field; - if ((0, _graphql.isCompositeType)(type)) { - return insertSuffix; - } - if ((0, _graphql.isListType)(type) && (0, _graphql.isCompositeType)(type.ofType)) { - return insertSuffix; - } - if ((0, _graphql.isNonNullType)(type)) { - if ((0, _graphql.isCompositeType)(type.ofType)) { - return insertSuffix; - } - if ((0, _graphql.isListType)(type.ofType) && (0, _graphql.isCompositeType)(type.ofType.ofType)) { - return insertSuffix; - } - } - return null; -}; +const typeSystemCompletionItems = [{ + label: 'type', + kind: _types.CompletionItemKind.Function +}, { + label: 'interface', + kind: _types.CompletionItemKind.Function +}, { + label: 'union', + kind: _types.CompletionItemKind.Function +}, { + label: 'input', + kind: _types.CompletionItemKind.Function +}, { + label: 'scalar', + kind: _types.CompletionItemKind.Function +}, { + label: 'schema', + kind: _types.CompletionItemKind.Function +}]; +const executableCompletionItems = [{ + label: 'query', + kind: _types.CompletionItemKind.Function +}, { + label: 'mutation', + kind: _types.CompletionItemKind.Function +}, { + label: 'subscription', + kind: _types.CompletionItemKind.Function +}, { + label: 'fragment', + kind: _types.CompletionItemKind.Function +}, { + label: '{', + kind: _types.CompletionItemKind.Constructor +}]; function getSuggestionsForTypeSystemDefinitions(token) { return (0, _autocompleteUtils.hintList)(token, [{ label: 'extend', kind: _types.CompletionItemKind.Function - }, { - label: 'type', - kind: _types.CompletionItemKind.Function - }, { - label: 'interface', - kind: _types.CompletionItemKind.Function - }, { - label: 'union', - kind: _types.CompletionItemKind.Function - }, { - label: 'input', - kind: _types.CompletionItemKind.Function - }, { - label: 'scalar', - kind: _types.CompletionItemKind.Function - }, { - label: 'schema', - kind: _types.CompletionItemKind.Function - }]); + }, ...typeSystemCompletionItems]); } function getSuggestionsForExecutableDefinitions(token) { + return (0, _autocompleteUtils.hintList)(token, executableCompletionItems); +} +function getSuggestionsForUnknownDocumentMode(token) { return (0, _autocompleteUtils.hintList)(token, [{ - label: 'query', - kind: _types.CompletionItemKind.Function - }, { - label: 'mutation', - kind: _types.CompletionItemKind.Function - }, { - label: 'subscription', - kind: _types.CompletionItemKind.Function - }, { - label: 'fragment', + label: 'extend', kind: _types.CompletionItemKind.Function - }, { - label: '{', - kind: _types.CompletionItemKind.Constructor - }]); + }, ...executableCompletionItems, ...typeSystemCompletionItems]); } function getSuggestionsForExtensionDefinitions(token) { - return (0, _autocompleteUtils.hintList)(token, [{ - label: 'type', - kind: _types.CompletionItemKind.Function - }, { - label: 'interface', - kind: _types.CompletionItemKind.Function - }, { - label: 'union', - kind: _types.CompletionItemKind.Function - }, { - label: 'input', - kind: _types.CompletionItemKind.Function - }, { - label: 'scalar', - kind: _types.CompletionItemKind.Function - }, { - label: 'schema', - kind: _types.CompletionItemKind.Function - }]); + return (0, _autocompleteUtils.hintList)(token, typeSystemCompletionItems); } function getSuggestionsForFieldNames(token, typeInfo, options) { var _a; @@ -74199,13 +85808,19 @@ function getSuggestionsForFieldNames(token, typeInfo, options) { isDeprecated: Boolean(field.deprecationReason), deprecationReason: field.deprecationReason, kind: _types.CompletionItemKind.Field, + labelDetails: { + detail: ' ' + field.type.toString() + }, type: field.type }; if (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) { - const insertText = getInsertText(field); - if (insertText) { - suggestion.insertText = field.name + insertText; + suggestion.insertText = (0, _autocompleteUtils.getFieldInsertText)(field); + if (!suggestion.insertText) { + suggestion.insertText = (0, _autocompleteUtils.getInsertText)(field.name, field.type, field.name + (token.state.needsAdvance ? '' : '\n')); + } + if (suggestion.insertText) { suggestion.insertTextFormat = _types.InsertTextFormat.Snippet; + suggestion.insertTextMode = _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation; suggestion.command = SuggestionCommand; } } @@ -74216,7 +85831,7 @@ function getSuggestionsForFieldNames(token, typeInfo, options) { } function getSuggestionsForInputValues(token, typeInfo, queryText, schema) { const namedInputType = (0, _graphql.getNamedType)(typeInfo.inputType); - const queryVariables = getVariableCompletions(queryText, schema, token).filter(v => v.detail === namedInputType.name); + const queryVariables = getVariableCompletions(queryText, schema, token).filter(v => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name)); if (namedInputType instanceof _graphql.GraphQLEnumType) { const values = namedInputType.getValues(); return (0, _autocompleteUtils.hintList)(token, values.map(value => { @@ -74256,14 +85871,11 @@ function getSuggestionsForImplements(token, tokenState, schema, documentText, ty } const typeMap = schema.getTypeMap(); const schemaInterfaces = (0, _autocompleteUtils.objectValues)(typeMap).filter(_graphql.isInterfaceType); - const schemaInterfaceNames = schemaInterfaces.map(_ref => { - let { - name - } = _ref; - return name; - }); + const schemaInterfaceNames = schemaInterfaces.map(({ + name + }) => name); const inlineInterfaces = new Set(); - runOnlineParser(documentText, (_, state) => { + (0, _parser.runOnlineParser)(documentText, (_, state) => { var _a, _b, _c, _d, _e; if (state.name) { if (state.kind === _parser.RuleKinds.INTERFACE_DEF && !schemaInterfaceNames.includes(state.name)) { @@ -74271,12 +85883,9 @@ function getSuggestionsForImplements(token, tokenState, schema, documentText, ty } if (state.kind === _parser.RuleKinds.NAMED_TYPE && ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) === _parser.RuleKinds.IMPLEMENTS) { if (typeInfo.interfaceDef) { - const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(_ref2 => { - let { - name - } = _ref2; - return name === state.name; - }); + const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(({ + name + }) => name === state.name); if (existingType) { return; } @@ -74289,12 +85898,9 @@ function getSuggestionsForImplements(token, tokenState, schema, documentText, ty })] })); } else if (typeInfo.objectTypeDef) { - const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(_ref3 => { - let { - name - } = _ref3; - return name === state.name; - }); + const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(({ + name + }) => name === state.name); if (existingType) { return; } @@ -74312,20 +85918,14 @@ function getSuggestionsForImplements(token, tokenState, schema, documentText, ty }); const currentTypeToExtend = typeInfo.interfaceDef || typeInfo.objectTypeDef; const siblingInterfaces = (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.getInterfaces()) || []; - const siblingInterfaceNames = siblingInterfaces.map(_ref4 => { - let { - name - } = _ref4; - return name; - }); + const siblingInterfaceNames = siblingInterfaces.map(({ + name + }) => name); const possibleInterfaces = schemaInterfaces.concat([...inlineInterfaces].map(name => ({ name - }))).filter(_ref5 => { - let { - name - } = _ref5; - return name !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name); - }); + }))).filter(({ + name + }) => name !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name)); return (0, _autocompleteUtils.hintList)(token, possibleInterfaces.map(type => { const result = { label: type.name, @@ -74372,7 +85972,7 @@ function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fra return []; } const typeMap = schema.getTypeMap(); - const defState = (0, _autocompleteUtils.getDefinitionState)(token.state); + const defState = (0, _parser.getDefinitionState)(token.state); const fragments = getFragmentDefinitions(queryText); if (fragmentDefs && fragmentDefs.length > 0) { fragments.push(...fragmentDefs); @@ -74382,6 +85982,9 @@ function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fra label: frag.name.value, detail: String(typeMap[frag.typeCondition.name.value]), documentation: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`, + labelDetails: { + detail: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}` + }, kind: _types.CompletionItemKind.Field, type: typeMap[frag.typeCondition.name.value] }))); @@ -74405,7 +86008,8 @@ function getVariableCompletions(queryText, schema, token) { let variableName = null; let variableType; const definitions = Object.create({}); - runOnlineParser(queryText, (_, state) => { + (0, _parser.runOnlineParser)(queryText, (_, state) => { + var _a; if ((state === null || state === void 0 ? void 0 : state.kind) === _parser.RuleKinds.VARIABLE && state.name) { variableName = state.name; } @@ -74416,10 +86020,12 @@ function getVariableCompletions(queryText, schema, token) { } } if (variableName && variableType && !definitions[variableName]) { + const replaceString = token.string === '$' || ((_a = token === null || token === void 0 ? void 0 : token.state) === null || _a === void 0 ? void 0 : _a.kind) === 'Variable' ? variableName : '$' + variableName; definitions[variableName] = { detail: variableType.toString(), - insertText: token.string === '$' ? variableName : '$' + variableName, - label: variableName, + insertText: replaceString, + label: '$' + variableName, + rawInsert: replaceString, type: variableType, kind: _types.CompletionItemKind.Variable }; @@ -74431,7 +86037,7 @@ function getVariableCompletions(queryText, schema, token) { } function getFragmentDefinitions(queryText) { const fragmentDefs = []; - runOnlineParser(queryText, (_, state) => { + (0, _parser.runOnlineParser)(queryText, (_, state) => { if (state.kind === _parser.RuleKinds.FRAGMENT_DEFINITION && state.name && state.type) { fragmentDefs.push({ kind: _parser.RuleKinds.FRAGMENT_DEFINITION, @@ -74460,7 +86066,7 @@ function getSuggestionsForVariableDefinition(token, schema, _kind) { const inputTypes = (0, _autocompleteUtils.objectValues)(inputTypeMap).filter(_graphql.isInputType); return (0, _autocompleteUtils.hintList)(token, inputTypes.map(type => ({ label: type.name, - documentation: type.description, + documentation: (type === null || type === void 0 ? void 0 : type.description) || '', kind: _types.CompletionItemKind.Variable }))); } @@ -74470,61 +86076,19 @@ function getSuggestionsForDirective(token, state, schema, _kind) { const directives = schema.getDirectives().filter(directive => canUseDirective(state.prevState, directive)); return (0, _autocompleteUtils.hintList)(token, directives.map(directive => ({ label: directive.name, - documentation: directive.description || '', + documentation: (directive === null || directive === void 0 ? void 0 : directive.description) || '', kind: _types.CompletionItemKind.Function }))); } return []; } -function getTokenAtPosition(queryText, cursor) { - let offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - let styleAtCursor = null; - let stateAtCursor = null; - let stringAtCursor = null; - const token = runOnlineParser(queryText, (stream, state, style, index) => { - if (index !== cursor.line || stream.getCurrentPosition() + offset < cursor.character + 1) { - return; - } - styleAtCursor = style; - stateAtCursor = Object.assign({}, state); - stringAtCursor = stream.current(); - return 'BREAK'; - }); - return { - start: token.start, - end: token.end, - string: stringAtCursor || token.string, - state: stateAtCursor || token.state, - style: styleAtCursor || token.style - }; -} -function runOnlineParser(queryText, callback) { - const lines = queryText.split('\n'); - const parser = (0, _parser.onlineParser)(); - let state = parser.startState(); - let style = ''; - let stream = new _parser.CharacterStream(''); - for (let i = 0; i < lines.length; i++) { - stream = new _parser.CharacterStream(lines[i]); - while (!stream.eol()) { - style = parser.token(stream, state); - const code = callback(stream, state, style, i); - if (code === 'BREAK') { - break; - } - } - callback(stream, state, style, i); - if (!state.kind) { - state = parser.startState(); - } - } - return { - start: stream.getStartOfToken(), - end: stream.getCurrentPosition(), - string: stream.current(), - state, - style - }; +function getSuggestionsForDirectiveArguments(token, state, schema, _kind) { + const directive = schema.getDirectives().find(d => d.name === state.name); + return (0, _autocompleteUtils.hintList)(token, (directive === null || directive === void 0 ? void 0 : directive.args.map(arg => ({ + label: arg.name, + documentation: arg.description || '', + kind: _types.CompletionItemKind.Field + }))) || []); } function canUseDirective(state, directive) { if (!(state === null || state === void 0 ? void 0 : state.kind)) { @@ -74582,168 +86146,6 @@ function canUseDirective(state, directive) { } return false; } -function getTypeInfo(schema, tokenState) { - let argDef; - let argDefs; - let directiveDef; - let enumValue; - let fieldDef; - let inputType; - let objectTypeDef; - let objectFieldDefs; - let parentType; - let type; - let interfaceDef; - (0, _autocompleteUtils.forEachState)(tokenState, state => { - var _a; - switch (state.kind) { - case _parser.RuleKinds.QUERY: - case 'ShortQuery': - type = schema.getQueryType(); - break; - case _parser.RuleKinds.MUTATION: - type = schema.getMutationType(); - break; - case _parser.RuleKinds.SUBSCRIPTION: - type = schema.getSubscriptionType(); - break; - case _parser.RuleKinds.INLINE_FRAGMENT: - case _parser.RuleKinds.FRAGMENT_DEFINITION: - if (state.type) { - type = schema.getType(state.type); - } - break; - case _parser.RuleKinds.FIELD: - case _parser.RuleKinds.ALIASED_FIELD: - { - if (!type || !state.name) { - fieldDef = null; - } else { - fieldDef = parentType ? (0, _autocompleteUtils.getFieldDef)(schema, parentType, state.name) : null; - type = fieldDef ? fieldDef.type : null; - } - break; - } - case _parser.RuleKinds.SELECTION_SET: - parentType = (0, _graphql.getNamedType)(type); - break; - case _parser.RuleKinds.DIRECTIVE: - directiveDef = state.name ? schema.getDirective(state.name) : null; - break; - case _parser.RuleKinds.INTERFACE_DEF: - if (state.name) { - objectTypeDef = null; - interfaceDef = new _graphql.GraphQLInterfaceType({ - name: state.name, - interfaces: [], - fields: {} - }); - } - break; - case _parser.RuleKinds.OBJECT_TYPE_DEF: - if (state.name) { - interfaceDef = null; - objectTypeDef = new _graphql.GraphQLObjectType({ - name: state.name, - interfaces: [], - fields: {} - }); - } - break; - case _parser.RuleKinds.ARGUMENTS: - { - if (state.prevState) { - switch (state.prevState.kind) { - case _parser.RuleKinds.FIELD: - argDefs = fieldDef && fieldDef.args; - break; - case _parser.RuleKinds.DIRECTIVE: - argDefs = directiveDef && directiveDef.args; - break; - case _parser.RuleKinds.ALIASED_FIELD: - { - const name = (_a = state.prevState) === null || _a === void 0 ? void 0 : _a.name; - if (!name) { - argDefs = null; - break; - } - const field = parentType ? (0, _autocompleteUtils.getFieldDef)(schema, parentType, name) : null; - if (!field) { - argDefs = null; - break; - } - argDefs = field.args; - break; - } - default: - argDefs = null; - break; - } - } else { - argDefs = null; - } - break; - } - case _parser.RuleKinds.ARGUMENT: - if (argDefs) { - for (let i = 0; i < argDefs.length; i++) { - if (argDefs[i].name === state.name) { - argDef = argDefs[i]; - break; - } - } - } - inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type; - break; - case _parser.RuleKinds.ENUM_VALUE: - const enumType = (0, _graphql.getNamedType)(inputType); - enumValue = enumType instanceof _graphql.GraphQLEnumType ? enumType.getValues().find(val => val.value === state.name) : null; - break; - case _parser.RuleKinds.LIST_VALUE: - const nullableType = (0, _graphql.getNullableType)(inputType); - inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null; - break; - case _parser.RuleKinds.OBJECT_VALUE: - const objectType = (0, _graphql.getNamedType)(inputType); - objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null; - break; - case _parser.RuleKinds.OBJECT_FIELD: - const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null; - inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type; - break; - case _parser.RuleKinds.NAMED_TYPE: - if (state.name) { - type = schema.getType(state.name); - } - break; - } - }); - return { - argDef, - argDefs, - directiveDef, - enumValue, - fieldDef, - inputType, - objectFieldDefs, - parentType, - type, - interfaceDef, - objectTypeDef - }; -} -var GraphQLDocumentMode; -exports.GraphQLDocumentMode = GraphQLDocumentMode; -(function (GraphQLDocumentMode) { - GraphQLDocumentMode["TYPE_SYSTEM"] = "TYPE_SYSTEM"; - GraphQLDocumentMode["EXECUTABLE"] = "EXECUTABLE"; -})(GraphQLDocumentMode || (exports.GraphQLDocumentMode = GraphQLDocumentMode = {})); -function getDocumentMode(documentText, uri) { - if (uri === null || uri === void 0 ? void 0 : uri.endsWith('.graphqls')) { - return GraphQLDocumentMode.TYPE_SYSTEM; - } - return hasTypeSystemDefinitions(documentText) ? GraphQLDocumentMode.TYPE_SYSTEM : GraphQLDocumentMode.EXECUTABLE; -} function unwrapType(state) { if (state.prevState && state.kind && [_parser.RuleKinds.NAMED_TYPE, _parser.RuleKinds.LIST_TYPE, _parser.RuleKinds.TYPE, _parser.RuleKinds.NON_NULL_TYPE].includes(state.kind)) { return unwrapType(state.prevState); @@ -74759,12 +86161,14 @@ function unwrapType(state) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LANGUAGE = void 0; +exports.getDefinitionQueryResultForArgument = getDefinitionQueryResultForArgument; exports.getDefinitionQueryResultForDefinitionNode = getDefinitionQueryResultForDefinitionNode; exports.getDefinitionQueryResultForField = getDefinitionQueryResultForField; exports.getDefinitionQueryResultForFragmentSpread = getDefinitionQueryResultForFragmentSpread; @@ -74797,8 +86201,7 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const LANGUAGE = 'GraphQL'; -exports.LANGUAGE = LANGUAGE; +const LANGUAGE = exports.LANGUAGE = 'GraphQL'; function assert(value, message) { if (!value) { throw new Error(message); @@ -74817,38 +86220,30 @@ function getPosition(text, node) { function getDefinitionQueryResultForNamedType(text, node, dependencies) { return __awaiter(this, void 0, void 0, function* () { const name = node.name.value; - const defNodes = dependencies.filter(_ref => { - let { - definition - } = _ref; - return definition.name && definition.name.value === name; - }); + const defNodes = dependencies.filter(({ + definition + }) => definition.name && definition.name.value === name); if (defNodes.length === 0) { throw new Error(`Definition not found for GraphQL type ${name}`); } - const definitions = defNodes.map(_ref2 => { - let { - filePath, - content, - definition - } = _ref2; - return getDefinitionForNodeDefinition(filePath || '', content, definition); - }); + const definitions = defNodes.map(({ + filePath, + content, + definition + }) => getDefinitionForNodeDefinition(filePath || '', content, definition)); return { definitions, - queryRange: definitions.map(_ => getRange(text, node)) + queryRange: definitions.map(_ => getRange(text, node)), + printedName: name }; }); } function getDefinitionQueryResultForField(fieldName, typeName, dependencies) { var _a; return __awaiter(this, void 0, void 0, function* () { - const defNodes = dependencies.filter(_ref3 => { - let { - definition - } = _ref3; - return definition.name && definition.name.value === typeName; - }); + const defNodes = dependencies.filter(({ + definition + }) => definition.name && definition.name.value === typeName); if (defNodes.length === 0) { throw new Error(`Definition not found for GraphQL type ${typeName}`); } @@ -74866,40 +86261,60 @@ function getDefinitionQueryResultForField(fieldName, typeName, dependencies) { } return { definitions, - queryRange: [] + queryRange: [], + printedName: [typeName, fieldName].join('.') + }; + }); +} +function getDefinitionQueryResultForArgument(argumentName, fieldName, typeName, dependencies) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const definitions = []; + for (const { + filePath, + content, + definition + } of dependencies) { + const argDefinition = (_c = (_b = (_a = definition.fields) === null || _a === void 0 ? void 0 : _a.find(item => item.name.value === fieldName)) === null || _b === void 0 ? void 0 : _b.arguments) === null || _c === void 0 ? void 0 : _c.find(item => item.name.value === argumentName); + if (argDefinition == null) { + continue; + } + definitions.push(getDefinitionForArgumentDefinition(filePath || '', content, argDefinition)); + } + return { + definitions, + queryRange: [], + printedName: `${[typeName, fieldName].join('.')}(${argumentName})` }; }); } function getDefinitionQueryResultForFragmentSpread(text, fragment, dependencies) { return __awaiter(this, void 0, void 0, function* () { const name = fragment.name.value; - const defNodes = dependencies.filter(_ref4 => { - let { - definition - } = _ref4; - return definition.name.value === name; - }); + const defNodes = dependencies.filter(({ + definition + }) => definition.name.value === name); if (defNodes.length === 0) { throw new Error(`Definition not found for GraphQL fragment ${name}`); } - const definitions = defNodes.map(_ref5 => { - let { - filePath, - content, - definition - } = _ref5; - return getDefinitionForFragmentDefinition(filePath || '', content, definition); - }); + const definitions = defNodes.map(({ + filePath, + content, + definition + }) => getDefinitionForFragmentDefinition(filePath || '', content, definition)); return { definitions, - queryRange: definitions.map(_ => getRange(text, fragment)) + queryRange: definitions.map(_ => getRange(text, fragment)), + printedName: name }; }); } function getDefinitionQueryResultForDefinitionNode(path, text, definition) { + var _a; return { definitions: [getDefinitionForFragmentDefinition(path, text, definition)], - queryRange: definition.name ? [getRange(text, definition.name)] : [] + queryRange: definition.name ? [getRange(text, definition.name)] : [], + printedName: (_a = definition.name) === null || _a === void 0 ? void 0 : _a.value }; } function getDefinitionForFragmentDefinition(path, text, definition) { @@ -74946,6 +86361,20 @@ function getDefinitionForFieldDefinition(path, text, definition) { projectRoot: path }; } +function getDefinitionForArgumentDefinition(path, text, definition) { + const { + name + } = definition; + assert(name, 'Expected ASTNode to have a Name.'); + return { + path, + position: getPosition(text, definition), + range: getRange(text, definition), + name: name.value || '', + language: LANGUAGE, + projectRoot: path + }; +} /***/ }), @@ -74955,6 +86384,7 @@ function getDefinitionForFieldDefinition(path, text, definition) { \**********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -74967,30 +86397,24 @@ exports.validateQuery = validateQuery; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); var _parser = __webpack_require__(/*! ../parser */ "../../graphql-language-service/esm/parser/index.js"); var _utils = __webpack_require__(/*! ../utils */ "../../graphql-language-service/esm/utils/index.js"); -const SEVERITY = { +const SEVERITY = exports.SEVERITY = { Error: 'Error', Warning: 'Warning', Information: 'Information', Hint: 'Hint' }; -exports.SEVERITY = SEVERITY; -const DIAGNOSTIC_SEVERITY = { +const DIAGNOSTIC_SEVERITY = exports.DIAGNOSTIC_SEVERITY = { [SEVERITY.Error]: 1, [SEVERITY.Warning]: 2, [SEVERITY.Information]: 3, [SEVERITY.Hint]: 4 }; -exports.DIAGNOSTIC_SEVERITY = DIAGNOSTIC_SEVERITY; const invariant = (condition, message) => { if (!condition) { throw new Error(message); } }; -function getDiagnostics(query) { - let schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - let customRules = arguments.length > 2 ? arguments[2] : undefined; - let isRelayCompatMode = arguments.length > 3 ? arguments[3] : undefined; - let externalFragments = arguments.length > 4 ? arguments[4] : undefined; +function getDiagnostics(query, schema = null, customRules, isRelayCompatMode, externalFragments) { var _a, _b; let ast = null; let fragments = ''; @@ -75017,10 +86441,7 @@ function getDiagnostics(query) { } return validateQuery(ast, schema, customRules, isRelayCompatMode); } -function validateQuery(ast) { - let schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - let customRules = arguments.length > 2 ? arguments[2] : undefined; - let isRelayCompatMode = arguments.length > 3 ? arguments[3] : undefined; +function validateQuery(ast, schema = null, customRules, isRelayCompatMode) { if (!schema) { return []; } @@ -75086,28 +86507,37 @@ function getLocation(node) { \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHoverInformation = getHoverInformation; +exports.renderArg = renderArg; +exports.renderDirective = renderDirective; +exports.renderEnumValue = renderEnumValue; +exports.renderField = renderField; +exports.renderType = renderType; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -var _getAutocompleteSuggestions = __webpack_require__(/*! ./getAutocompleteSuggestions */ "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js"); +var _parser = __webpack_require__(/*! ../parser */ "../../graphql-language-service/esm/parser/index.js"); function getHoverInformation(schema, queryText, cursor, contextToken, config) { - const token = contextToken || (0, _getAutocompleteSuggestions.getTokenAtPosition)(queryText, cursor); - if (!schema || !token || !token.state) { + const options = Object.assign(Object.assign({}, config), { + schema + }); + const context = (0, _parser.getContextAtPosition)(queryText, cursor, schema, contextToken); + if (!context) { return ''; } + const { + typeInfo, + token + } = context; const { kind, step } = token.state; - const typeInfo = (0, _getAutocompleteSuggestions.getTypeInfo)(schema, token.state); - const options = Object.assign(Object.assign({}, config), { - schema - }); - if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef) { + if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef || kind === 'ObjectField' && step === 0 && typeInfo.fieldDef) { const into = []; renderMdCodeStart(into, options); renderField(into, typeInfo, options); @@ -75123,6 +86553,14 @@ function getHoverInformation(schema, queryText, cursor, contextToken, config) { renderDescription(into, options, typeInfo.directiveDef); return into.join('').trim(); } + if (kind === 'Variable' && typeInfo.type) { + const into = []; + renderMdCodeStart(into, options); + renderType(into, typeInfo, options, typeInfo.type); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.type); + return into.join('').trim(); + } if (kind === 'Argument' && step === 0 && typeInfo.argDef) { const into = []; renderMdCodeStart(into, options); @@ -75263,6 +86701,7 @@ function text(into, content) { \******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75398,6 +86837,7 @@ function concatMap(arr, fn) { \*************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75478,6 +86918,7 @@ var _getHoverInformation = __webpack_require__(/*! ./getHoverInformation */ "../ \********************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75486,7 +86927,6 @@ Object.defineProperty(exports, "__esModule", ({ exports["default"] = void 0; class CharacterStream { constructor(sourceText) { - var _this = this; this._start = 0; this._pos = 0; this.getStartOfToken = () => this._start; @@ -75531,24 +86971,22 @@ class CharacterStream { this.skipTo = position => { this._pos = position; }; - this.match = function (pattern) { - let consume = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - let caseFold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + this.match = (pattern, consume = true, caseFold = false) => { let token = null; let match = null; if (typeof pattern === 'string') { const regex = new RegExp(pattern, caseFold ? 'i' : 'g'); - match = regex.test(_this._sourceText.slice(_this._pos, _this._pos + pattern.length)); + match = regex.test(this._sourceText.slice(this._pos, this._pos + pattern.length)); token = pattern; } else if (pattern instanceof RegExp) { - match = _this._sourceText.slice(_this._pos).match(pattern); + match = this._sourceText.slice(this._pos).match(pattern); token = match === null || match === void 0 ? void 0 : match[0]; } - if (match != null && (typeof pattern === 'string' || match instanceof Array && _this._sourceText.startsWith(match[0], _this._pos))) { + if (match != null && (typeof pattern === 'string' || match instanceof Array && this._sourceText.startsWith(match[0], this._pos))) { if (consume) { - _this._start = _this._pos; + this._start = this._pos; if (token && token.length) { - _this._pos += token.length; + this._pos += token.length; } } return match; @@ -75600,6 +87038,7 @@ exports["default"] = CharacterStream; \****************************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75654,6 +87093,7 @@ function p(value, style) { \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75664,15 +87104,14 @@ var _RuleHelpers = __webpack_require__(/*! ./RuleHelpers */ "../../graphql-langu var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); const isIgnored = ch => ch === ' ' || ch === '\t' || ch === ',' || ch === '\n' || ch === '\r' || ch === '\uFEFF' || ch === '\u00A0'; exports.isIgnored = isIgnored; -const LexRules = { +const LexRules = exports.LexRules = { Name: /^[_A-Za-z][_0-9A-Za-z]*/, Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/, Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/, Comment: /^#.*/ }; -exports.LexRules = LexRules; -const ParseRules = { +const ParseRules = exports.ParseRules = { Document: [(0, _RuleHelpers.list)('Definition')], Definition(token) { switch (token.value) { @@ -75822,7 +87261,6 @@ const ParseRules = { [_graphql.Kind.ENUM_TYPE_EXTENSION]: ['EnumDef'], [_graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION]: ['InputDef'] }; -exports.ParseRules = ParseRules; function word(value) { return { style: 'keyword', @@ -75854,12 +87292,356 @@ function type(style) { /***/ }), +/***/ "../../graphql-language-service/esm/parser/api.js": +/*!********************************************************!*\ + !*** ../../graphql-language-service/esm/parser/api.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TYPE_SYSTEM_KINDS = exports.GraphQLDocumentMode = void 0; +exports.getContextAtPosition = getContextAtPosition; +exports.getDocumentMode = getDocumentMode; +exports.getTokenAtPosition = getTokenAtPosition; +exports.runOnlineParser = runOnlineParser; +var _ = __webpack_require__(/*! . */ "../../graphql-language-service/esm/parser/index.js"); +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +function runOnlineParser(queryText, callback) { + const lines = queryText.split('\n'); + const parser = (0, _.onlineParser)(); + let state = parser.startState(); + let style = ''; + let stream = new _.CharacterStream(''); + for (let i = 0; i < lines.length; i++) { + stream = new _.CharacterStream(lines[i]); + while (!stream.eol()) { + style = parser.token(stream, state); + const code = callback(stream, state, style, i); + if (code === 'BREAK') { + break; + } + } + callback(stream, state, style, i); + if (!state.kind) { + state = parser.startState(); + } + } + return { + start: stream.getStartOfToken(), + end: stream.getCurrentPosition(), + string: stream.current(), + state, + style + }; +} +var GraphQLDocumentMode; +(function (GraphQLDocumentMode) { + GraphQLDocumentMode["TYPE_SYSTEM"] = "TYPE_SYSTEM"; + GraphQLDocumentMode["EXECUTABLE"] = "EXECUTABLE"; + GraphQLDocumentMode["UNKNOWN"] = "UNKNOWN"; +})(GraphQLDocumentMode || (exports.GraphQLDocumentMode = GraphQLDocumentMode = {})); +const TYPE_SYSTEM_KINDS = exports.TYPE_SYSTEM_KINDS = [_graphql.Kind.SCHEMA_DEFINITION, _graphql.Kind.OPERATION_TYPE_DEFINITION, _graphql.Kind.SCALAR_TYPE_DEFINITION, _graphql.Kind.OBJECT_TYPE_DEFINITION, _graphql.Kind.INTERFACE_TYPE_DEFINITION, _graphql.Kind.UNION_TYPE_DEFINITION, _graphql.Kind.ENUM_TYPE_DEFINITION, _graphql.Kind.INPUT_OBJECT_TYPE_DEFINITION, _graphql.Kind.DIRECTIVE_DEFINITION, _graphql.Kind.SCHEMA_EXTENSION, _graphql.Kind.SCALAR_TYPE_EXTENSION, _graphql.Kind.OBJECT_TYPE_EXTENSION, _graphql.Kind.INTERFACE_TYPE_EXTENSION, _graphql.Kind.UNION_TYPE_EXTENSION, _graphql.Kind.ENUM_TYPE_EXTENSION, _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION]; +const getParsedMode = sdl => { + let mode = GraphQLDocumentMode.UNKNOWN; + if (sdl) { + try { + (0, _graphql.visit)((0, _graphql.parse)(sdl), { + enter(node) { + if (node.kind === 'Document') { + mode = GraphQLDocumentMode.EXECUTABLE; + return; + } + if (TYPE_SYSTEM_KINDS.includes(node.kind)) { + mode = GraphQLDocumentMode.TYPE_SYSTEM; + return _graphql.BREAK; + } + return false; + } + }); + } catch (_a) { + return mode; + } + } + return mode; +}; +function getDocumentMode(documentText, uri) { + if (uri === null || uri === void 0 ? void 0 : uri.endsWith('.graphqls')) { + return GraphQLDocumentMode.TYPE_SYSTEM; + } + return getParsedMode(documentText); +} +function getTokenAtPosition(queryText, cursor, offset = 0) { + let styleAtCursor = null; + let stateAtCursor = null; + let stringAtCursor = null; + const token = runOnlineParser(queryText, (stream, state, style, index) => { + if (index !== cursor.line || stream.getCurrentPosition() + offset < cursor.character + 1) { + return; + } + styleAtCursor = style; + stateAtCursor = Object.assign({}, state); + stringAtCursor = stream.current(); + return 'BREAK'; + }); + return { + start: token.start, + end: token.end, + string: stringAtCursor || token.string, + state: stateAtCursor || token.state, + style: styleAtCursor || token.style + }; +} +function getContextAtPosition(queryText, cursor, schema, contextToken, options) { + const token = contextToken || getTokenAtPosition(queryText, cursor, 1); + if (!token) { + return null; + } + const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state; + if (!state) { + return null; + } + const typeInfo = (0, _.getTypeInfo)(schema, token.state); + const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri); + return { + token, + state, + typeInfo, + mode + }; +} + +/***/ }), + +/***/ "../../graphql-language-service/esm/parser/getTypeInfo.js": +/*!****************************************************************!*\ + !*** ../../graphql-language-service/esm/parser/getTypeInfo.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.forEachState = forEachState; +exports.getDefinitionState = getDefinitionState; +exports.getFieldDef = getFieldDef; +exports.getTypeInfo = getTypeInfo; +var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); +var _ = __webpack_require__(/*! . */ "../../graphql-language-service/esm/parser/index.js"); +function getFieldDef(schema, type, fieldName) { + if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) { + return _graphql.SchemaMetaFieldDef; + } + if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) { + return _graphql.TypeMetaFieldDef; + } + if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) { + return _graphql.TypeNameMetaFieldDef; + } + if ('getFields' in type) { + return type.getFields()[fieldName]; + } + return null; +} +function forEachState(stack, fn) { + const reverseStateStack = []; + let state = stack; + while (state === null || state === void 0 ? void 0 : state.kind) { + reverseStateStack.push(state); + state = state.prevState; + } + for (let i = reverseStateStack.length - 1; i >= 0; i--) { + fn(reverseStateStack[i]); + } +} +function getDefinitionState(tokenState) { + let definitionState; + forEachState(tokenState, state => { + switch (state.kind) { + case 'Query': + case 'ShortQuery': + case 'Mutation': + case 'Subscription': + case 'FragmentDefinition': + definitionState = state; + break; + } + }); + return definitionState; +} +function getTypeInfo(schema, tokenState) { + let argDef; + let argDefs; + let directiveDef; + let enumValue; + let fieldDef; + let inputType; + let objectTypeDef; + let objectFieldDefs; + let parentType; + let type; + let interfaceDef; + forEachState(tokenState, state => { + var _a; + switch (state.kind) { + case _.RuleKinds.QUERY: + case 'ShortQuery': + type = schema.getQueryType(); + break; + case _.RuleKinds.MUTATION: + type = schema.getMutationType(); + break; + case _.RuleKinds.SUBSCRIPTION: + type = schema.getSubscriptionType(); + break; + case _.RuleKinds.INLINE_FRAGMENT: + case _.RuleKinds.FRAGMENT_DEFINITION: + if (state.type) { + type = schema.getType(state.type); + } + break; + case _.RuleKinds.FIELD: + case _.RuleKinds.ALIASED_FIELD: + { + if (!type || !state.name) { + fieldDef = null; + } else { + fieldDef = parentType ? getFieldDef(schema, parentType, state.name) : null; + type = fieldDef ? fieldDef.type : null; + } + break; + } + case _.RuleKinds.SELECTION_SET: + parentType = (0, _graphql.getNamedType)(type); + break; + case _.RuleKinds.DIRECTIVE: + directiveDef = state.name ? schema.getDirective(state.name) : null; + break; + case _.RuleKinds.INTERFACE_DEF: + if (state.name) { + objectTypeDef = null; + interfaceDef = new _graphql.GraphQLInterfaceType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case _.RuleKinds.OBJECT_TYPE_DEF: + if (state.name) { + interfaceDef = null; + objectTypeDef = new _graphql.GraphQLObjectType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case _.RuleKinds.ARGUMENTS: + { + if (state.prevState) { + switch (state.prevState.kind) { + case _.RuleKinds.FIELD: + argDefs = fieldDef && fieldDef.args; + break; + case _.RuleKinds.DIRECTIVE: + argDefs = directiveDef && directiveDef.args; + break; + case _.RuleKinds.ALIASED_FIELD: + { + const name = (_a = state.prevState) === null || _a === void 0 ? void 0 : _a.name; + if (!name) { + argDefs = null; + break; + } + const field = parentType ? getFieldDef(schema, parentType, name) : null; + if (!field) { + argDefs = null; + break; + } + argDefs = field.args; + break; + } + default: + argDefs = null; + break; + } + } else { + argDefs = null; + } + break; + } + case _.RuleKinds.ARGUMENT: + if (argDefs) { + for (let i = 0; i < argDefs.length; i++) { + if (argDefs[i].name === state.name) { + argDef = argDefs[i]; + break; + } + } + } + inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type; + break; + case _.RuleKinds.VARIABLE_DEFINITION: + case _.RuleKinds.VARIABLE: + type = inputType; + break; + case _.RuleKinds.ENUM_VALUE: + const enumType = (0, _graphql.getNamedType)(inputType); + enumValue = enumType instanceof _graphql.GraphQLEnumType ? enumType.getValues().find(val => val.value === state.name) : null; + break; + case _.RuleKinds.LIST_VALUE: + const nullableType = (0, _graphql.getNullableType)(inputType); + inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null; + break; + case _.RuleKinds.OBJECT_VALUE: + const objectType = (0, _graphql.getNamedType)(inputType); + objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null; + break; + case _.RuleKinds.OBJECT_FIELD: + const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null; + inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type; + fieldDef = objectField; + type = fieldDef ? fieldDef.type : null; + break; + case _.RuleKinds.NAMED_TYPE: + if (state.name) { + type = schema.getType(state.name); + } + break; + } + }); + return { + argDef, + argDefs, + directiveDef, + enumValue, + fieldDef, + inputType, + objectFieldDefs, + parentType, + type, + interfaceDef, + objectTypeDef + }; +} + +/***/ }), + /***/ "../../graphql-language-service/esm/parser/index.js": /*!**********************************************************!*\ !*** ../../graphql-language-service/esm/parser/index.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75875,7 +87657,15 @@ var _exportNames = { opt: true, p: true, t: true, - onlineParser: true + onlineParser: true, + runOnlineParser: true, + getTokenAtPosition: true, + getContextAtPosition: true, + GraphQLDocumentMode: true, + getDocumentMode: true, + getTypeInfo: true, + getDefinitionState: true, + getFieldDef: true }; Object.defineProperty(exports, "CharacterStream", ({ enumerable: true, @@ -75883,6 +87673,12 @@ Object.defineProperty(exports, "CharacterStream", ({ return _CharacterStream.default; } })); +Object.defineProperty(exports, "GraphQLDocumentMode", ({ + enumerable: true, + get: function () { + return _api.GraphQLDocumentMode; + } +})); Object.defineProperty(exports, "LexRules", ({ enumerable: true, get: function () { @@ -75901,6 +87697,42 @@ Object.defineProperty(exports, "butNot", ({ return _RuleHelpers.butNot; } })); +Object.defineProperty(exports, "getContextAtPosition", ({ + enumerable: true, + get: function () { + return _api.getContextAtPosition; + } +})); +Object.defineProperty(exports, "getDefinitionState", ({ + enumerable: true, + get: function () { + return _getTypeInfo.getDefinitionState; + } +})); +Object.defineProperty(exports, "getDocumentMode", ({ + enumerable: true, + get: function () { + return _api.getDocumentMode; + } +})); +Object.defineProperty(exports, "getFieldDef", ({ + enumerable: true, + get: function () { + return _getTypeInfo.getFieldDef; + } +})); +Object.defineProperty(exports, "getTokenAtPosition", ({ + enumerable: true, + get: function () { + return _api.getTokenAtPosition; + } +})); +Object.defineProperty(exports, "getTypeInfo", ({ + enumerable: true, + get: function () { + return _getTypeInfo.getTypeInfo; + } +})); Object.defineProperty(exports, "isIgnored", ({ enumerable: true, get: function () { @@ -75931,6 +87763,12 @@ Object.defineProperty(exports, "p", ({ return _RuleHelpers.p; } })); +Object.defineProperty(exports, "runOnlineParser", ({ + enumerable: true, + get: function () { + return _api.runOnlineParser; + } +})); Object.defineProperty(exports, "t", ({ enumerable: true, get: function () { @@ -75941,6 +87779,8 @@ var _CharacterStream = _interopRequireDefault(__webpack_require__(/*! ./Characte var _Rules = __webpack_require__(/*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js"); var _RuleHelpers = __webpack_require__(/*! ./RuleHelpers */ "../../graphql-language-service/esm/parser/RuleHelpers.js"); var _onlineParser = _interopRequireDefault(__webpack_require__(/*! ./onlineParser */ "../../graphql-language-service/esm/parser/onlineParser.js")); +var _api = __webpack_require__(/*! ./api */ "../../graphql-language-service/esm/parser/api.js"); +var _getTypeInfo = __webpack_require__(/*! ./getTypeInfo */ "../../graphql-language-service/esm/parser/getTypeInfo.js"); var _types = __webpack_require__(/*! ./types */ "../../graphql-language-service/esm/parser/types.js"); Object.keys(_types).forEach(function (key) { if (key === "default" || key === "__esModule") return; @@ -75963,6 +87803,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de \*****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -75971,13 +87812,12 @@ Object.defineProperty(exports, "__esModule", ({ exports["default"] = onlineParser; var _Rules = __webpack_require__(/*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js"); var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -function onlineParser() { - let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - eatWhitespace: stream => stream.eatWhile(_Rules.isIgnored), - lexRules: _Rules.LexRules, - parseRules: _Rules.ParseRules, - editorConfig: {} - }; +function onlineParser(options = { + eatWhitespace: stream => stream.eatWhile(_Rules.isIgnored), + lexRules: _Rules.LexRules, + parseRules: _Rules.ParseRules, + editorConfig: {} +}) { return { startState() { const initialState = { @@ -76185,6 +88025,7 @@ function lex(lexRules, stream) { \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76192,7 +88033,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.RuleKinds = exports.AdditionalRuleKinds = void 0; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -const AdditionalRuleKinds = { +const AdditionalRuleKinds = exports.AdditionalRuleKinds = { ALIASED_FIELD: 'AliasedField', ARGUMENTS: 'Arguments', SHORT_QUERY: 'ShortQuery', @@ -76220,11 +88061,10 @@ const AdditionalRuleKinds = { DIRECTIVE_DEF: 'DirectiveDef', IMPLEMENTS: 'Implements', VARIABLE_DEFINITIONS: 'VariableDefinitions', - TYPE: 'Type' + TYPE: 'Type', + VARIABLE: 'Variable' }; -exports.AdditionalRuleKinds = AdditionalRuleKinds; -const RuleKinds = Object.assign(Object.assign({}, _graphql.Kind), AdditionalRuleKinds); -exports.RuleKinds = RuleKinds; +const RuleKinds = exports.RuleKinds = Object.assign(Object.assign({}, _graphql.Kind), AdditionalRuleKinds); /***/ }), @@ -76234,12 +88074,19 @@ exports.RuleKinds = RuleKinds; \***************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FileChangeTypeKind = exports.CompletionItemKind = void 0; +Object.defineProperty(exports, "GraphQLDocumentMode", ({ + enumerable: true, + get: function () { + return _parser.GraphQLDocumentMode; + } +})); Object.defineProperty(exports, "InsertTextFormat", ({ enumerable: true, get: function () { @@ -76247,14 +88094,13 @@ Object.defineProperty(exports, "InsertTextFormat", ({ } })); var _vscodeLanguageserverTypes = __webpack_require__(/*! vscode-languageserver-types */ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js"); -const FileChangeTypeKind = { +var _parser = __webpack_require__(/*! ./parser */ "../../graphql-language-service/esm/parser/index.js"); +const FileChangeTypeKind = exports.FileChangeTypeKind = { Created: 1, Changed: 2, Deleted: 3 }; -exports.FileChangeTypeKind = FileChangeTypeKind; var CompletionItemKind; -exports.CompletionItemKind = CompletionItemKind; (function (CompletionItemKind) { CompletionItemKind.Text = 1; CompletionItemKind.Method = 2; @@ -76291,6 +88137,7 @@ exports.CompletionItemKind = CompletionItemKind; \*********************************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76356,6 +88203,7 @@ function locToRange(text, loc) { \********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76396,6 +88244,7 @@ function collectVariables(schema, documentAST) { \************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76466,6 +88315,7 @@ exports.getFragmentDependenciesForAST = getFragmentDependenciesForAST; \************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76506,6 +88356,7 @@ function pointToOffset(text, point) { \*********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76542,8 +88393,7 @@ function getOperationFacts(schema, documentString) { return; } } -const getQueryFacts = getOperationFacts; -exports.getQueryFacts = getQueryFacts; +const getQueryFacts = exports.getQueryFacts = getOperationFacts; /***/ }), @@ -76553,6 +88403,7 @@ exports.getQueryFacts = getQueryFacts; \**************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76561,10 +88412,9 @@ Object.defineProperty(exports, "__esModule", ({ exports.defaultJSONSchemaOptions = void 0; exports.getVariablesJSONSchema = getVariablesJSONSchema; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -const defaultJSONSchemaOptions = { +const defaultJSONSchemaOptions = exports.defaultJSONSchemaOptions = { useMarkdownDescription: false }; -exports.defaultJSONSchemaOptions = defaultJSONSchemaOptions; function text(into, newText) { into.push(newText); } @@ -76793,6 +88643,7 @@ function getVariablesJSONSchema(variableToType, options) { \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76889,8 +88740,8 @@ var _Range = __webpack_require__(/*! ./Range */ "../../graphql-language-service/ var _validateWithCustomRules = __webpack_require__(/*! ./validateWithCustomRules */ "../../graphql-language-service/esm/utils/validateWithCustomRules.js"); var _collectVariables = __webpack_require__(/*! ./collectVariables */ "../../graphql-language-service/esm/utils/collectVariables.js"); var _getOperationFacts = _interopRequireWildcard(__webpack_require__(/*! ./getOperationFacts */ "../../graphql-language-service/esm/utils/getOperationFacts.js")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /***/ }), @@ -76900,6 +88751,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && \***************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; Object.defineProperty(exports, "__esModule", ({ @@ -76907,7 +88759,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.validateWithCustomRules = validateWithCustomRules; var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"); -const specifiedSDLRules = [_graphql.LoneSchemaDefinitionRule, _graphql.UniqueOperationTypesRule, _graphql.UniqueTypeNamesRule, _graphql.UniqueEnumValueNamesRule, _graphql.UniqueFieldDefinitionNamesRule, _graphql.UniqueDirectiveNamesRule, _graphql.KnownTypeNamesRule, _graphql.KnownDirectivesRule, _graphql.UniqueDirectivesPerLocationRule, _graphql.PossibleTypeExtensionsRule, _graphql.UniqueArgumentNamesRule, _graphql.UniqueInputFieldNamesRule]; +const specifiedSDLRules = [_graphql.LoneSchemaDefinitionRule, _graphql.UniqueOperationTypesRule, _graphql.UniqueTypeNamesRule, _graphql.UniqueEnumValueNamesRule, _graphql.UniqueFieldDefinitionNamesRule, _graphql.UniqueDirectiveNamesRule, _graphql.KnownTypeNamesRule, _graphql.KnownDirectivesRule, _graphql.UniqueDirectivesPerLocationRule, _graphql.PossibleTypeExtensionsRule, _graphql.UniqueArgumentNamesRule, _graphql.UniqueInputFieldNamesRule, _graphql.UniqueVariableNamesRule, _graphql.FragmentsOnCompositeTypesRule, _graphql.ProvidedRequiredArgumentsRule]; function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, isSchemaDocument) { const rules = _graphql.specifiedRules.filter(rule => { if (rule === _graphql.NoUnusedFragmentsRule || rule === _graphql.ExecutableDefinitionsRule) { @@ -76947,6 +88799,7 @@ function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, is \*******************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -76959,6 +88812,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -76971,6 +88825,7 @@ __webpack_require__.r(__webpack_exports__); \***********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -76983,6 +88838,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -76995,6 +88851,7 @@ __webpack_require__.r(__webpack_exports__); \************************/ /***/ (function(module) { +"use strict"; module.exports = window["React"]; /***/ }), @@ -77005,6 +88862,7 @@ module.exports = window["React"]; \***************************/ /***/ (function(module) { +"use strict"; module.exports = window["ReactDOM"]; /***/ }), @@ -77015,6 +88873,7 @@ module.exports = window["ReactDOM"]; \***********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; @@ -84176,6 +96035,7 @@ var Transition = Object.assign(TransitionRoot, { Child, Root: TransitionRoot }); \**************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { +"use strict"; if (false) {} else { @@ -84191,6 +96051,7 @@ if (false) {} else { \***************************************************************/ /***/ (function(module) { +"use strict"; function _extends() { @@ -84268,8 +96129,9 @@ module.exports = _extends, module.exports.__esModule = true, module.exports["def /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +// This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { +"use strict"; var exports = __webpack_exports__; /*!****************!*\ !*** ./cdn.ts ***! @@ -84281,15 +96143,15 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; var GraphiQLReact = _interopRequireWildcard(__webpack_require__(/*! @graphiql/react */ "../../graphiql-react/dist/index.js")); -var _toolkit = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/esm/index.js"); +var _toolkit = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/dist/esm/index.js"); var GraphQL = _interopRequireWildcard(__webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs")); -var _GraphiQL = __webpack_require__(/*! ./components/GraphiQL */ "./components/GraphiQL.tsx"); +var _GraphiQL = __webpack_require__(/*! ./GraphiQL */ "./GraphiQL.tsx"); __webpack_require__(/*! @graphiql/react/font/roboto.css */ "../../graphiql-react/font/roboto.css"); __webpack_require__(/*! @graphiql/react/font/fira-code.css */ "../../graphiql-react/font/fira-code.css"); __webpack_require__(/*! @graphiql/react/dist/style.css */ "../../graphiql-react/dist/style.css"); __webpack_require__(/*! ./style.css */ "./style.css"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /** * Copyright (c) 2021 GraphQL Contributors. * @@ -84328,8 +96190,7 @@ _GraphiQL.GraphiQL.GraphQL = GraphQL; */ // @ts-expect-error _GraphiQL.GraphiQL.React = GraphiQLReact; -var _default = _GraphiQL.GraphiQL; -exports["default"] = _default; +var _default = exports["default"] = _GraphiQL.GraphiQL; }(); window.GraphiQL = __webpack_exports__["default"]; /******/ })() diff --git a/src/Symfony/Bundle/Resources/public/graphql-playground/middleware.js b/src/Symfony/Bundle/Resources/public/graphql-playground/middleware.js index f8723d58398..302e93eba54 100644 --- a/src/Symfony/Bundle/Resources/public/graphql-playground/middleware.js +++ b/src/Symfony/Bundle/Resources/public/graphql-playground/middleware.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=542)}([function(e,t,n){"use strict";n.d(t,"S",(function(){return C})),n.d(t,"x",(function(){return w})),n.d(t,"R",(function(){return S})),n.d(t,"w",(function(){return k})),n.d(t,"N",(function(){return A})),n.d(t,"u",(function(){return T})),n.d(t,"H",(function(){return _})),n.d(t,"o",(function(){return O})),n.d(t,"T",(function(){return F})),n.d(t,"y",(function(){return N})),n.d(t,"E",(function(){return I})),n.d(t,"l",(function(){return M})),n.d(t,"F",(function(){return j})),n.d(t,"m",(function(){return L})),n.d(t,"J",(function(){return P})),n.d(t,"q",(function(){return R})),n.d(t,"L",(function(){return B})),n.d(t,"s",(function(){return U})),n.d(t,"G",(function(){return z})),n.d(t,"n",(function(){return V})),n.d(t,"O",(function(){return q})),n.d(t,"v",(function(){return H})),n.d(t,"I",(function(){return W})),n.d(t,"p",(function(){return G})),n.d(t,"D",(function(){return K})),n.d(t,"k",(function(){return J})),n.d(t,"C",(function(){return Q})),n.d(t,"j",(function(){return Y})),n.d(t,"d",(function(){return $})),n.d(t,"e",(function(){return X})),n.d(t,"U",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"M",(function(){return te})),n.d(t,"t",(function(){return ne})),n.d(t,"B",(function(){return re})),n.d(t,"K",(function(){return ie})),n.d(t,"r",(function(){return oe})),n.d(t,"A",(function(){return ae})),n.d(t,"g",(function(){return ce})),n.d(t,"f",(function(){return le})),n.d(t,"i",(function(){return me})),n.d(t,"P",(function(){return ge})),n.d(t,"c",(function(){return ye})),n.d(t,"h",(function(){return ve})),n.d(t,"a",(function(){return Ee})),n.d(t,"b",(function(){return De})),n.d(t,"Q",(function(){return we}));var r=n(55),i=n(25),o=n(4),a=n(36),s=n(57),u=n(41),c=n(8),l=n(50),p=n(48),f=n(39),d=n(31);function h(e){return e}var m=n(47),g=n(44),y=n(2),v=n(1),b=n(15),E=n(217);function x(e,t){for(var n=0;n0?e:void 0}$.prototype.toString=function(){return"["+String(this.ofType)+"]"},$.prototype.toJSON=function(){return this.toString()},Object.defineProperty($.prototype,i.c,{get:function(){return"GraphQLList"}}),Object(m.a)($),X.prototype.toString=function(){return String(this.ofType)+"!"},X.prototype.toJSON=function(){return this.toString()},Object.defineProperty(X.prototype,i.c,{get:function(){return"GraphQLNonNull"}}),Object(m.a)(X);var ce=function(){function e(e){var t,n,r,i=null!==(t=e.parseValue)&&void 0!==t?t:h;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:h,this.parseValue=i,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:function(e){return i(Object(E.a)(e))},this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.specifiedByUrl||"string"==typeof e.specifiedByUrl||Object(c.a)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(Object(o.a)(e.specifiedByUrl),".")),null==e.serialize||"function"==typeof e.serialize||Object(c.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||Object(c.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLScalarType"}}]),e}();Object(m.a)(ce);var le=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=fe.bind(void 0,e),this._interfaces=pe.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.isTypeOf||"function"==typeof e.isTypeOf||Object(c.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(o.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLObjectType"}}]),e}();function pe(e){var t,n=null!==(t=se(e.interfaces))&&void 0!==t?t:[];return Array.isArray(n)||Object(c.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function fe(e){var t=se(e.fields);return de(t)||Object(c.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(s.a)(t,(function(t,n){var i;de(t)||Object(c.a)(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||Object(c.a)(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"==typeof t.resolve||Object(c.a)(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(Object(o.a)(t.resolve),"."));var a=null!==(i=t.args)&&void 0!==i?i:{};de(a)||Object(c.a)(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var s=Object(r.a)(a).map((function(e){var t=e[0],n=e[1];return{name:t,description:n.description,type:n.type,defaultValue:n.defaultValue,extensions:n.extensions&&Object(u.a)(n.extensions),astNode:n.astNode}}));return{name:n,description:t.description,type:t.type,args:s,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&Object(u.a)(t.extensions),astNode:t.astNode}}))}function de(e){return Object(d.a)(e)&&!Array.isArray(e)}function he(e){return Object(s.a)(e,(function(e){return{description:e.description,type:e.type,args:me(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))}function me(e){return Object(l.a)(e,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}))}function ge(e){return B(e.type)&&void 0===e.defaultValue}Object(m.a)(le);var ye=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=fe.bind(void 0,e),this._interfaces=pe.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(c.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(o.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLInterfaceType"}}]),e}();Object(m.a)(ye);var ve=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._types=be.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(c.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(o.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLUnionType"}}]),e}();function be(e){var t=se(e.types);return Array.isArray(t)||Object(c.a)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}Object(m.a)(ve);var Ee=function(){function e(e){var t,n;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._values=(t=this.name,de(n=e.values)||Object(c.a)(0,"".concat(t," values must be an object with value names as keys.")),Object(r.a)(n).map((function(e){var n=e[0],r=e[1];return de(r)||Object(c.a)(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(o.a)(r),".")),!("isDeprecated"in r)||Object(c.a)(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:void 0!==r.value?r.value:n,isDeprecated:null!=r.deprecationReason,deprecationReason:r.deprecationReason,extensions:r.extensions&&Object(u.a)(r.extensions),astNode:r.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=Object(a.a)(this._values,(function(e){return e.name})),"string"==typeof e.name||Object(c.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new y.a('Enum "'.concat(this.name,'" cannot represent value: ').concat(Object(o.a)(e)));return t.name},t.parseValue=function(e){if("string"!=typeof e){var t=Object(o.a)(e);throw new y.a('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+xe(this,t))}var n=this.getValue(e);if(null==n)throw new y.a('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+xe(this,e));return n.value},t.parseLiteral=function(e,t){if(e.kind!==v.a.ENUM){var n=Object(b.print)(e);throw new y.a('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(n,".")+xe(this,n),e)}var r=this.getValue(e.value);if(null==r){var i=Object(b.print)(e);throw new y.a('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+xe(this,i),e)}return r.value},t.toConfig=function(){var e,t=Object(l.a)(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLEnumType"}}]),e}();function xe(e,t){var n=e.getValues().map((function(e){return e.name})),r=Object(g.a)(t,n);return Object(f.a)("the enum value",r)}Object(m.a)(Ee);var De=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=Ce.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=Object(s.a)(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLInputObjectType"}}]),e}();function Ce(e){var t=se(e.fields);return de(t)||Object(c.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(s.a)(t,(function(t,n){return!("resolve"in t)||Object(c.a)(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,extensions:t.extensions&&Object(u.a)(t.extensions),astNode:t.astNode}}))}function we(e){return B(e.type)&&void 0===e.defaultValue}Object(m.a)(De)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r=n(31),i=n(25),o=n(96),a=n(137);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return ae})),n.d(t,"b",(function(){return L})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return x})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return U})),n.d(t,"h",(function(){return K})),n.d(t,"i",(function(){return I})),n.d(t,"j",(function(){return $})),n.d(t,"k",(function(){return z})),n.d(t,"l",(function(){return X})),n.d(t,"m",(function(){return ue})),n.d(t,"n",(function(){return pe})),n.d(t,"o",(function(){return oe})),n.d(t,"p",(function(){return de})),n.d(t,"q",(function(){return j})),n.d(t,"r",(function(){return F})),n.d(t,"s",(function(){return P})),n.d(t,"t",(function(){return q})),n.d(t,"u",(function(){return M})),n.d(t,"v",(function(){return ve})),n.d(t,"w",(function(){return re})),n.d(t,"x",(function(){return Q})),n.d(t,"y",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"A",(function(){return te})),n.d(t,"B",(function(){return ne})),n.d(t,"C",(function(){return B})),n.d(t,"D",(function(){return se})),n.d(t,"E",(function(){return ce})),n.d(t,"F",(function(){return le})),n.d(t,"G",(function(){return fe})),n.d(t,"H",(function(){return he})),n.d(t,"I",(function(){return me})),n.d(t,"J",(function(){return ge})),n.d(t,"K",(function(){return ye})),n.d(t,"L",(function(){return V})),n.d(t,"M",(function(){return l})),n.d(t,"N",(function(){return H})),n.d(t,"O",(function(){return N})),n.d(t,"P",(function(){return W})),n.d(t,"Q",(function(){return G})),n.d(t,"R",(function(){return J})),n.d(t,"S",(function(){return b})),n.d(t,"T",(function(){return k})),n.d(t,"U",(function(){return s})),n.d(t,"V",(function(){return S})),n.d(t,"W",(function(){return E})),n.d(t,"X",(function(){return O})),n.d(t,"Y",(function(){return h})),n.d(t,"Z",(function(){return p})),n.d(t,"ab",(function(){return y})),n.d(t,"bb",(function(){return d})),n.d(t,"cb",(function(){return w})),n.d(t,"db",(function(){return u})),n.d(t,"eb",(function(){return f})),n.d(t,"fb",(function(){return A})),n.d(t,"gb",(function(){return C})),n.d(t,"hb",(function(){return D}));var r=n(18),i=n(37),o=n(10),a=n(112),s=function(e){return function(){return e}}(!0),u=function(){};var c=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;function l(e,t,n){if(!t(e))throw new Error(n)}var p=function(e,t){Object(i.a)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))},f=function(e,t){var n;return(n=[]).concat.apply(n,t.map(e))};function d(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function h(e){var t=!1;return function(){t||(t=!0,e())}}var m=function(e){throw e},g=function(e){return{value:e,done:!0}};function y(e,t,n){void 0===t&&(t=m),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:g,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function v(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var b=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")},E=function(e){return Array.apply(null,new Array(e))},x=function(e){return function(t){return e(Object.defineProperty(t,r.f,{value:!0}))}},D=function(e){return e===r.k},C=function(e){return e===r.j},w=function(e){return D(e)||C(e)};function S(e,t){var n=Object.keys(e),r=n.length;var i,a=0,s=Object(o.a)(e)?E(r):{},c={};return n.forEach((function(e){var n=function(n,o){i||(o||w(n)?(t.cancel(),t(n,o)):(s[e]=n,++a===r&&(i=!0,t(s))))};n.cancel=u,c[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return c[e].cancel()})))},c}function k(e){return{name:e.name||"anonymous",location:A(e)}}function A(e){return e[r.g]}var T={isEmpty:s,put:u,take:u};function _(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},u=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2147483647||n<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: "+Object(o.a)(t));return n},parseValue:function(e){if(!i(e))throw new c.a("Int cannot represent non-integer value: ".concat(Object(o.a)(e)));if(e>2147483647||e<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: ".concat(e));return e},parseLiteral:function(e){if(e.kind!==s.a.INT)throw new c.a("Int cannot represent non-integer value: ".concat(Object(u.print)(e)),e);var t=parseInt(e.value,10);if(t>2147483647||t<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: ".concat(e.value),e);return t}});var f=new l.g({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:function(e){var t=d(e);if("boolean"==typeof t)return t?1:0;var n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),!Object(r.a)(n))throw new c.a("Float cannot represent non numeric value: ".concat(Object(o.a)(t)));return n},parseValue:function(e){if(!Object(r.a)(e))throw new c.a("Float cannot represent non numeric value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.FLOAT&&e.kind!==s.a.INT)throw new c.a("Float cannot represent non numeric value: ".concat(Object(u.print)(e)),e);return parseFloat(e.value)}});function d(e){if(Object(a.a)(e)){if("function"==typeof e.valueOf){var t=e.valueOf();if(!Object(a.a)(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}var h=new l.g({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:function(e){var t=d(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if(Object(r.a)(t))return t.toString();throw new c.a("String cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"!=typeof e)throw new c.a("String cannot represent a non string value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.STRING)throw new c.a("String cannot represent a non string value: ".concat(Object(u.print)(e)),e);return e.value}});var m=new l.g({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){var t=d(e);if("boolean"==typeof t)return t;if(Object(r.a)(t))return 0!==t;throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(t)))},parseValue:function(e){if("boolean"!=typeof e)throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.BOOLEAN)throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(u.print)(e)),e);return e.value}});var g=new l.g({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:function(e){var t=d(e);if("string"==typeof t)return t;if(i(t))return String(t);throw new c.a("ID cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"==typeof e)return e;if(i(e))return e.toString();throw new c.a("ID cannot represent value: ".concat(Object(o.a)(e)))},parseLiteral:function(e){if(e.kind!==s.a.STRING&&e.kind!==s.a.INT)throw new c.a("ID cannot represent a non-string and non-integer value: "+Object(u.print)(e),e);return e.value}}),y=Object.freeze([h,p,f,m,g]);function v(e){return y.some((function(t){var n=t.name;return e.name===n}))}},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))};t.a=r},function(e,t,n){"use strict";n.r(t),n.d(t,"print",(function(){return o}));var r=n(26),i=n(53);function o(e){return Object(r.c)(e,{leave:a})}var a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return u(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=l("(",u(e.variableDefinitions,", "),")"),i=u(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?u([t,u([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+l(" = ",r)+l(" ",u(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return u([l("",t,": ")+n+l("(",u(r,", "),")"),u(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+l(" ",u(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return u(["...",l("on ",t),u(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(l("(",u(r,", "),")")," ")+"on ".concat(n," ").concat(l("",u(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(i.c)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+u(e.values,", ")+"]"},ObjectValue:function(e){return"{"+u(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+l("(",u(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:s((function(e){var t=e.directives,n=e.operationTypes;return u(["schema",u(t," "),c(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:s((function(e){return u(["scalar",e.name,u(e.directives," ")]," ")})),ObjectTypeDefinition:s((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")})),FieldDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+": "+r+l(" ",u(i," "))})),InputValueDefinition:s((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return u([t+": "+n,l("= ",r),u(i," ")]," ")})),InterfaceTypeDefinition:s((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["interface",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")})),UnionTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.types;return u(["union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")})),EnumTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.values;return u(["enum",t,u(n," "),c(r)]," ")})),EnumValueDefinition:s((function(e){return u([e.name,u(e.directives," ")]," ")})),InputObjectTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.fields;return u(["input",t,u(n," "),c(r)]," ")})),DirectiveDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+(r?" repeatable":"")+" on "+u(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return u(["extend schema",u(t," "),c(n)]," ")},ScalarTypeExtension:function(e){return u(["extend scalar",e.name,u(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["extend type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["extend interface",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return u(["extend union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return u(["extend enum",t,u(n," "),c(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return u(["extend input",t,u(n," "),c(r)]," ")}};function s(e){return function(t){return u([t.description,e(t)],"\n")}}function u(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function c(e){return e&&0!==e.length?"{\n"+p(u(e,"\n"))+"\n}":""}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t?e+t+n:""}function p(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function d(e){return e&&e.some(f)}},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),c=u&&/Qt\/\d+\.\d+/.test(e),l=!o&&/Chrome\//.test(e),p=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),y=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),E=/win/i.test(t),x=p&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(p=!1,u=!0);var D=v&&(c||p&&(null==x||x<12.11)),C=n||a&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,k=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return A(e).appendChild(t)}function _(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}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(J(G)+" ");return G[e]}function J(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||X.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(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}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var ue=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,l=a.length,p=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ve(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){de(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){be(e),Ee(e)}function Ce(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var Se,ke,Ae=function(){if(a&&s<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Se){var t=_("span","​");T(e,_("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _e(e){if(null!=ke)return ke;var t=T(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(ke=r.right-n.right<3)}var Oe,Fe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Oe=_("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),Me=null,je={},Le={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Re(e){if("string"==typeof e&&Le.hasOwnProperty(e))e=Le[e];else if(e&&"string"==typeof e.name&&Le.hasOwnProperty(e.name)){var t=Le[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Re(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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}var Ue={};function ze(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ve(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 qe(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 He(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ge(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?et(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ge(e,t.line).text.length)}function ut(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.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},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},lt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],u=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=u;ce&&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&&Ve(e.doc.mode,r.state),o=pt(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 dt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new lt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var u=Ge(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var l=R(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}(e,t,n),a=o>r.first&&Ge(r,o-1).stateAfter,s=a?lt.fromSaved(r,a,o):new lt(r,He(r.mode),o);return r.iter(o,t,(function(n){ht(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.")}lt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},lt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},lt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},lt.fromSaved=function(e,t,n){return t instanceof ct?new lt(e,Ve(e.mode,t.state),n,t.lookAhead):new lt(e,Ve(e.mode,t),n)},lt.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var yt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function vt(e,t,n,r){var i,o,a=e.doc,s=a.mode,u=Ge(a,(t=st(a,t)).line),c=dt(e,t.line,n),l=new We(u.text,e.options.tabSize,c);for(r&&(o=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,p.pos),p.pos=t.length,u=null):u=bt(gt(n,p,r.state,f),o),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||l!=u){for(;c=t:o.to>t);(r||(r=[])).push(new Ct(a,o.from,s?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Nt(n,o.marker)<0)&&(n=o.marker)}return n}function Pt(e,t,n,r,i){var o=Ge(e,t),a=Dt&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||l<=0&&p>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Rt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ge(e,t),r=Rt(n);return n==r?t:Ye(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!zt(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Ye(r)+1}function zt(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,_t(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Tt(e)}Gt.prototype.lineNo=function(){return Ye(this)},ve(Gt);var Jt={},Qt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Jt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,t){var n=O("span",null,null,u?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,_e(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Ye(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Xt(e){var t=_("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,o,u){if(t){var c,l=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.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 tn(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 nn(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=s="",f=null,p=null,y=1/0;for(var v=[],b=void 0,E=0;Eh||D.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&y>x.to&&(y=x.to,c=""),D.className&&(u+=" "+D.className),D.css&&(s=(s?s+";":"")+D.css),D.startStyle&&x.from==h&&(l+=" "+D.startStyle),D.endStyle&&x.to==y&&(b||(b=[])).push(D.endStyle,x.to),D.title&&((f||(f={})).title=D.title),D.attributes)for(var C in D.attributes)(f||(f={}))[C]=D.attributes[C];D.collapsed&&(!p||Nt(p.marker,D)<0)&&(p=x)}else x.from>h&&y>x.from&&(y=x.from)}if(b)for(var w=0;w=d)break;for(var k=Math.min(d,y);;){if(g){var A=h+g.length;if(!p){var T=A>k?g.slice(0,k-h):g;t.addToken(t,T,a?a+u:u,l,h+T.length==y?c:"",s,f)}if(A>=k){g=g.slice(k-h),h=k;break}h=A,l=""}g=i.slice(o,o=n[m++]),a=Yt(n[m++],t.cm.options)}}else for(var _=1;_n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function On(e,t,n,r){return In(e,Nn(e,t),n,r)}function Fn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((u.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Ln(t.map,n,r),u=o.node,c=o.start,l=o.end,p=o.collapse;if(3==u.nodeType){for(var f=0;f<4;f++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+l1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;c>0&&(p=r="right"),i=e.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==r?d.length-1:0]:u.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=u.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+ir(e.display),top:h.top,bottom:h.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,y=(m+g)/2,v=t.view.measure.heights,b=0;bt)&&(i=(o=u-s)-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 Rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);function l(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var p=se(s,u,c),f=ae,d=l(u,p,"before"==c);return null!=f&&(d.other=l(u,f,"before"!=c)),d}function Jn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ge(e.doc,t.line),i=qt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,-1,-1);var i=$e(r,n),o=r.first+r.size-1;if(i>o)return Qn(r.first+r.size-1,Ge(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,i);;){var s=er(e,a,i,t,n),u=Lt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var c=u.find(1);if(c.line==i)return c;a=Ge(r,i=c.line)}}function $n(e,t,n,r){r-=qn(t);var i=t.text.length,o=oe((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return In(e,n,t).top>r}),o,i)}}function Xn(e,t,n,r){return n||(n=Nn(e,t)),$n(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=qt(t);var o=Nn(e,t),a=qn(t),s=0,u=t.text.length,c=!0,l=ce(t,e.doc.direction);if(l){var p=(e.options.lineWrapping?nr:tr)(e,t,n,o,l,r,i);s=(c=1!=p.level)?p.from:p.to-1,u=c?p.to:p.from-1}var f,d,h=null,m=null,g=oe((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(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=E.bottom?1:0}return Qn(n,g=ie(t.text,g,1),d,y,r-f)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var u=i[s],c=1!=u.level;return Zn(Kn(e,et(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=Kn(e,et(n,c?u.from:u.to,c?"after":"before"),"line",t,r);Zn(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function nr(e,t,n,r,i,o,a){var s=$n(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=In(e,r,1!=d.level?Math.min(c,d.to)-1:Math.max(u,d.from)).right,m=hm)&&(l=d,p=m)}}return l||(l=i[i.length-1]),l.fromc&&(l={from:l.from,to:c,level:l.level}),l}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(_("br"));Mn.appendChild(document.createTextNode("x"))}T(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(zt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(u=Ge(e.doc,c.line).text).length==c.ch){var l=R(u,u.length,e.options.tabSize)-u.length;c=et(c.line,Math.max(0,Math.round((o-Sn(e.display).left)/ir(e.display))-l))}return c}function lr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&Bt(e.doc,t)i.viewFrom?dr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)dr(e);else if(t<=i.viewFrom){var o=hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):dr(e)}else if(n>=i.viewTo){var a=hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):dr(e)}else{var s=hr(e,t,t,-1),u=hr(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):dr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!Dt||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(;Bt(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 mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||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")}(m,n||0,null==r?f:r,(function(e,t,i,p){var g="ltr"==i,y=d(e,g?"left":"right"),v=d(t-1,g?"right":"left"),b=null==n&&0==e,E=null==r&&t==f,x=0==p,D=!m||p==m.length-1;if(v.top-y.top<=3){var C=(c?E:b)&&D,w=(c?b:E)&&x?s:(g?y:v).left,S=C?u:(g?v:y).right;l(w,y.top,S-w,y.bottom)}else{var k,A,T,_;g?(k=c&&b&&x?s:y.left,A=c?u:h(e,i,"before"),T=c?s:h(t,i,"after"),_=c&&E&&D?u:v.right):(k=c?h(e,i,"before"):s,A=!c&&b&&x?u:y.right,T=!c&&E&&D?s:v.left,_=c?h(t,i,"after"):u),l(k,y.top,A-k,y.bottom),y.bottom0?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 Dr(e){e.state.focused||(e.display.input.focus(),wr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function kr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Qe(i.line,u),Ar(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(c/ir(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ar(e){if(e.widgets)for(var t=0;t=a&&(o=$e(t,qt(Ge(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function _r(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Tn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+wn(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=An(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 Or(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Fr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,Jn(e,t.from),Jn(e,t.to),t.margin))}function Mr(e,t,n,r){var i=_r(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});Nr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ui(e,{top:t}),Lr(e,t,!0),n&&ui(e),ri(e,100))}function Lr(e,t,n){t=Math.max(0,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 Pr(e,t,n,r){t=Math.max(0,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,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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+kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.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}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=v&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(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)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function zr(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&kr(e),Vr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(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=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var qr={native:Br,null:Ur};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(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?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Gr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&kr(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(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+kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-An(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function $r(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=_("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+kn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Kn(e,t),u=n&&n!=t?Kn(e,n):s,c=_r(e,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}),l=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=dt(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?Ve(t.mode,r.state):null,u=pt(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 ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(dr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Dt&&(o=Bt(e.doc,o),a=Ut(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=qt(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=function(e){if(e.hasFocus())return null;var t=N();if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&F(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return u&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,l=r.viewFrom,p=0;p-1&&(d=!1),ln(e,f,l,n)),d&&(A(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,l)))),a=f.node.nextSibling}else{var h=yn(e,f,l,n);o.insertBefore(h,a)}l+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(l),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=An(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;kr(e);var i=Rr(e);gr(e),zr(e,i),li(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 ui(e,t){var n=new oi(e,t);if(ai(e,n)){kr(e),si(e,n);var r=Rr(e);gr(e),zr(e,r),li(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function li(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+kn(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&c||o&&l){if(o&&v&&u)e:for(var f=t.target,d=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:u>=0){var c=ot(s.from(),a.from()),l=it(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ci(p?l:c,p?c:l))}}return new Di(t,n)}function Si(e,t){return new Di([new Ci(e,t||e)],0)}function ki(e){return e.text?et(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ai(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return ki(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+=ki(t).ch-t.to.ch),et(n,r)}function Ti(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,y)}un(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(i,i.lastOp==r)))a=J(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=ki(t):o.changes.push(Ri(e,t));else{var u=J(i.done);for(u&&u.ranges||Vi(e.sel,i.done),o={changes:[Ri(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||he(e,"historyAdded")}function zi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,J(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Vi(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qi(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 Hi(e){if(!e)return null;for(var t,n=0;n-1&&(J(s)[p]=c[p],delete c[p])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new Di([Ki(e.sel.primary(),t,n,i)],0),r)}function Qi(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&&(he(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var p=u.find(r<0?1:-1),f=void 0;if((r<0?l:c)&&(p=ao(e,p,-r,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(f=tt(p,n))&&(r<0?f<0:f>0))return io(e,p,t,r,i)}var d=u.find(r<0?-1:1);return(r<0?c:l)&&(d=ao(e,d,r,d.line==t.line?o:null)),d?io(e,d,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var l=[u,1],p=tt(c.from,s.from),f=tt(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&l.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&l.push({from:s.to,to:c.to}),i.splice.apply(i,l),u+=l.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)lo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ti(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),ho(e,t,n,kt(e,t));var r=[];Mi(e,(function(e,n){n||-1!=U(r,e.history)||(vo(e.history,t),r.push(e.history)),ho(e,t,null,kt(e,t))}))}}function po(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=f(d);if(h)return h.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Di(Q(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pr(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:et(o,Ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Ti(e,t)),e.cm?function(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=Ye(Rt(Ge(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&&ge(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,(function(e){var t=Ht(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ge(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof Eo))){var s=[];this.collapse(s),this.children=[new Eo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,n,o)||t.line!=n.line&&Pt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt=!0}o.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,c=e.cm;if(e.iter(u,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Rt(e)==c.display.maxLine&&(s=!0),o.collapsed&&u!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){zt(e,t)&&Qe(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)pr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var l=t.line;l<=n.line;l++)fr(c,l,"text");o.atomic&&no(c.doc),un(c,"markerAdded",c,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),ye(this,"clear")){var n=this.find();n&&un(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&un(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)co(this,r[u]);s?Xi(this,s):this.cm&&Fr(this.cm)})),undo:ni((function(){po(this,"undo")})),redo:ni((function(){po(this,"redo")})),undoSelection:ni((function(){po(this,"undo",!0)})),redoSelection:ni((function(){po(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=st(this,e),t=st(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})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Si(n,n)),f)for(var d=0;d=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Fr(e)}))}function Xo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zo(e,t,n){var r=Xo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?J(o):o[0],u=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Nn(t,n);a=i<0?n.text.length-1:0;var l=In(t,c,a).top;a=oe((function(e){return In(t,c,e).top==l}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=Xo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,u)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}qo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qo.default=v?qo.macDefault:qo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return $o(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ge(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",l),de(i.scroller,"dragstart",p),de(i.scroller,"drop",c),o||(be(t),r.addNew||Ji(e.doc,n,null,null,r.extend),u&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},p=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",l),pe(i.scroller,"dragstart",p),pe(i.scroller,"drop",c),Cr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Ci(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ci(n,n)),n=cr(e,t,!0,!0),s=-1;else{var l=ya(e,n,r.unit);a=r.extend?Ki(a,l.anchor,l.head,r.extend):l}r.addNew?-1==s?(s=c.length,Zi(o,wi(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(o,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Yi(o,s,a,q):(s=0,Zi(o,new Di([a],0),q),u=o.sel);var p=n;function f(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,l=R(Ge(o,n.line).text,n.ch,c),f=R(Ge(o,t.line).text,t.ch,c),d=Math.min(l,f),h=Math.max(l,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var y=Ge(o,m).text,v=W(y,d,c);d==h?i.push(new Ci(et(m,v),et(m,v))):y.length>v&&i.push(new Ci(et(m,v),et(m,W(y,h,c))))}i.length||i.push(new Ci(n,n)),Zi(o,wi(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,x=ya(e,t,r.unit),D=E.anchor;tt(x.anchor,D)>0?(b=x.head,D=ot(E.from(),x.anchor)):(b=x.anchor,D=it(E.to(),x.head));var C=u.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=Ge(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=se(o,r.ch,r.sticky),p=l-a||(r.ch-n.ch)*(1==s.level?-1:1);u=l==c-1||l==c?p<0:p>0}var f=o[c+(u?-1:0)],d=u==(1==f.level),h=d?f.from:f.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new Ci(new et(n.line,h,m),r)}(e,new Ci(st(o,D),b)),Zi(o,wi(e,C,s),q)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(be(t),i.input.focus()),de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&we(t)?function t(n){var a=++h,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,p)){e.curOp.focus=N(),f(s);var u=Tr(i,o);(s.line>=u.to||s.lined.bottom?20:0;c&&setTimeout(ei(e,(function(){h==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),y=ei(e,m);e.state.selectingText=y,pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",y)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&be(e):2==i?(r&&Ji(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function ya(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function va(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(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return xe(t);o-=s.top-a.viewOffset;for(var u=0;u=i)return he(e,n,e,$e(e.doc,o),e.display.gutterSpecs[u].className,t),xe(t)}}function ba(e,t){return va(e,t,"gutterClick",!0)}function Ea(e,t){Dn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&va(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Ca={},wa={};function Sa(e,t,n){if(!t!=!(n&&n!=Da)){var r=e.display.dragFunctions,i=t?pe:de;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 ka(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),ur(e),pr(e),Un(e),setTimeout((function(){return zr(e)}),100)}function Aa(e,t){var n=this;if(!(this instanceof Aa))return new Aa(e,t);this.options=t=t?P(t):{},P(Ca,t,!1);var r=t.value;"string"==typeof r?r=new Fo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Aa.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(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 B,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",ei(e,ga)),pe(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!Dn(e.display,t)){be(t);var r=e.findWordAt(n);Ji(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),pe(t.scroller,"contextmenu",(function(t){return Ea(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ea(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Dn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Ci(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Ci(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return xi(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||De(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),De(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-No<100))De(t);else if(!me(e,t)&&!Dn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=_("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Io),leave:function(t){me(e,t)||Mo(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return pa.call(e,t)})),pe(u,"keydown",ei(e,la)),pe(u,"keypress",ei(e,fa)),pe(u,"focus",(function(t){return wr(e,t)})),pe(u,"blur",(function(t){return Sr(e,t)}))}(this),Po(),Gr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(L(wr,this),20):Sr(this),wa)wa.hasOwnProperty(c)&&wa[c](this,t[c],Da);fi(this),t.finishInit&&t.finishInit(this);for(var l=0;l150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(Ge(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 p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)f+=a,p+="\t";if(fa,u=Fe(t),c=null;if(s&&r.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){c=[];for(var l=0;l=0;f--){var d=r.ranges[f],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ge(o,m.line).text.length,m.ch+J(u).length)):s&&Oa&&Oa.lineWise&&Oa.text.join("\n")==u.join("\n")&&(h=m=et(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:u,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),un(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Fr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Na(t,n,0,null,"paste")})),!0}function Ma(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=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=_a(e,i.head.line,"smart"));a&&un(e,"electricInput",e,i.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(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 et(n.line,f,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,u(e,1),"before"):new et(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}(e.cm,s,t,n):Zo(s,t,n))){if(r||(a=t.line+u)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(s=Ge(e,a))))return!1;t=ea(i,e.cm,s,t.line,u)}else t=o;return!0}if("char"==r)c();else if("column"==r)c(!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)||c(!d);d=!1){var h=s.text.charAt(t.ch)||"\n",m=ee(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,c(),t.sticky="after");break}if(m&&(l=m),n>0&&!c(!d))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(u-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Yn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function za(e,t){var n=Fn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),i=_n(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Ln(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&za(t,i)||{node:u[0].measure.map[2],offset:0},l=o.liner.firstLine()&&(a=et(a.line-1,Ge(r.doc,a.line-1).length)),s.ch==Ge(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=Ye(i.view[0].line),n=i.view[0].node):(t=Ye(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,c,l=lr(r,s.line);if(l==i.view.length-1?(u=i.viewTo-1,c=i.lineDiv.lastChild):(u=Ye(i.view[l+1].line)-1,c=i.view[l+1].node.previousSibling),!n)return!1;for(var p=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),u=!1;function c(){a&&(o+=s,u&&(o+=s),a=u=!1)}function l(e){e&&(c(),o+=e)}function p(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(d.length&&(o=d[0].find(0))&&l(Ke(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&f.length>1;)if(J(p)==J(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),t++}for(var d=0,h=0,m=p[0],g=f[0],y=Math.min(m.length,g.length);da.ch&&v.charCodeAt(v.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;p[p.length-1]=v.slice(0,v.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(d).replace(/\u200b+$/,"");var x=et(t,d),D=et(u,f.length?J(f).length-h:0);return p.length>1||p[0]||tt(x,D)?(mo(r.doc,p,x,D,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.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))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return pr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Na)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Fa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=ja(r);Fa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){me(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Dn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Dn(e,t)||be(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(e){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Wa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var i=Kn(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},Wa.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wa.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&&j(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(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(a&&s>=9&&this.hasSelection===i||v&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,c=Math.min(r.length,i.length);u1e3||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},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Zi)(n.doc,Si(o),V);var l,f=i.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(l=window.scrollY),r.input.focus(),u&&window.scrollTo(null,l),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){De(e);var m=function(){de(window,"mouseup",m),setTimeout(y,20)};pe(window,"mouseup",m)}else setTimeout(y,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Wa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Wa.prototype.setUneditable=function(){},Wa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Da&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Oi(e)}),!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Fi(e),Un(e),pr(e)}),!0),n("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(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Da&&e.refresh()})),n("specialCharPlaceholder",Xt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){xa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yo(t),i=n!=Da&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=di(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return zr(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),zr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=di(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Fi,!0),n("addModeClass",!1,Fi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Fi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Aa),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)&&ei(this,t[e])(this,n,i),he(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"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Fr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;u0&&Yi(this.doc,r,new Ci(o,c[r].to()),V)}}})),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ge(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=Ge(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-qt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,u=this.display,c=(e=Kn(this,st(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),u.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var p=Math.max(u.wrapper.clientHeight,this.doc.height),f=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>p)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=p&&(c=e.bottom),l+t.offsetWidth>f&&(l=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(l=u.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(u.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&(o=this,a={left:l,top:c,right:l+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=_r(o,a)).scrollTop&&jr(o,s.scrollTop),null!=s.scrollLeft&&Pr(o,s.scrollLeft))},triggerOnKeyDown:ti(la),triggerOnKeyPress:ti(fa),triggerOnKeyUp:pa,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ma(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&ur(this),he(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Un(this),this.display.input.reset(),Nr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,un(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ve(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})}}(Aa);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Fo.prototype)Fo.prototype.hasOwnProperty(Ka)&&U(Ga,Ka)<0&&(Aa.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fo.prototype[Ka]));return ve(Fo),Aa.inputStyles={textarea:Wa,contenteditable:Ua},Aa.defineMode=function(e){Aa.defaults.mode||"null"==e||(Aa.defaults.mode=e),Pe.apply(this,arguments)},Aa.defineMIME=function(e,t){Le[e]=t},Aa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Aa.defineMIME("text/plain","null"),Aa.defineExtension=function(e,t){Aa.prototype[e]=t},Aa.defineDocExtension=function(e,t){Fo.prototype[e]=t},Aa.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(de(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Aa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=de,e.on=pe,e.wheelEventPixels=Ei,e.Doc=Fo,e.splitLines=Fe,e.countColumn=R,e.findColumn=W,e.isWordChar=Z,e.Pass=z,e.signal=he,e.Line=Gt,e.changeEnd=ki,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Le,e.resolveMode=Re,e.getMode=Be,e.modeExtensions=Ue,e.extendMode=ze,e.copyState=Ve,e.startState=He,e.innerMode=qe,e.commands=ta,e.keyMap=qo,e.keyName=Qo,e.isModifierKey=Ko,e.lookupKey=Go,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=Ao,e.TextMarker=So,e.LineWidget=Do,e.e_preventDefault=be,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=I,e.contains=F,e.rmClass=k,e.keyNames=Bo}(Aa),Aa.version="5.57.0",Aa}()},function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return f})),n.d(t,"k",(function(){return d}));var r=function(e){return"@@redux-saga/"+e},i=r("CANCEL_PROMISE"),o=r("CHANNEL_END"),a=r("IO"),s=r("MATCH"),u=r("MULTICAST"),c=r("SAGA_ACTION"),l=r("SELF_CANCELLATION"),p=r("TASK"),f=r("TASK_CANCEL"),d=r("TERMINATE"),h=r("LOCATION")},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})); +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=535)}([function(e,t,n){"use strict";n.d(t,"S",(function(){return C})),n.d(t,"x",(function(){return w})),n.d(t,"R",(function(){return S})),n.d(t,"w",(function(){return _})),n.d(t,"N",(function(){return k})),n.d(t,"u",(function(){return A})),n.d(t,"H",(function(){return T})),n.d(t,"o",(function(){return O})),n.d(t,"T",(function(){return F})),n.d(t,"y",(function(){return N})),n.d(t,"E",(function(){return I})),n.d(t,"l",(function(){return M})),n.d(t,"F",(function(){return j})),n.d(t,"m",(function(){return L})),n.d(t,"J",(function(){return P})),n.d(t,"q",(function(){return R})),n.d(t,"L",(function(){return B})),n.d(t,"s",(function(){return U})),n.d(t,"G",(function(){return z})),n.d(t,"n",(function(){return V})),n.d(t,"O",(function(){return q})),n.d(t,"v",(function(){return H})),n.d(t,"I",(function(){return W})),n.d(t,"p",(function(){return G})),n.d(t,"D",(function(){return K})),n.d(t,"k",(function(){return J})),n.d(t,"C",(function(){return Q})),n.d(t,"j",(function(){return Y})),n.d(t,"d",(function(){return $})),n.d(t,"e",(function(){return X})),n.d(t,"U",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"M",(function(){return te})),n.d(t,"t",(function(){return ne})),n.d(t,"B",(function(){return re})),n.d(t,"K",(function(){return ie})),n.d(t,"r",(function(){return oe})),n.d(t,"A",(function(){return ae})),n.d(t,"g",(function(){return ce})),n.d(t,"f",(function(){return le})),n.d(t,"i",(function(){return me})),n.d(t,"P",(function(){return ge})),n.d(t,"c",(function(){return ye})),n.d(t,"h",(function(){return ve})),n.d(t,"a",(function(){return Ee})),n.d(t,"b",(function(){return De})),n.d(t,"Q",(function(){return we}));var r=n(54),i=n(25),o=n(4),a=n(36),s=n(56),u=n(40),c=n(8),l=n(49),p=n(47),f=n(38),d=n(31);function h(e){return e}var m=n(46),g=n(43),y=n(2),v=n(1),b=n(15),E=n(210);function x(e,t){for(var n=0;n0?e:void 0}$.prototype.toString=function(){return"["+String(this.ofType)+"]"},$.prototype.toJSON=function(){return this.toString()},Object.defineProperty($.prototype,i.c,{get:function(){return"GraphQLList"}}),Object(m.a)($),X.prototype.toString=function(){return String(this.ofType)+"!"},X.prototype.toJSON=function(){return this.toString()},Object.defineProperty(X.prototype,i.c,{get:function(){return"GraphQLNonNull"}}),Object(m.a)(X);var ce=function(){function e(e){var t,n,r,i=null!==(t=e.parseValue)&&void 0!==t?t:h;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:h,this.parseValue=i,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:function(e){return i(Object(E.a)(e))},this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.specifiedByUrl||"string"==typeof e.specifiedByUrl||Object(c.a)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(Object(o.a)(e.specifiedByUrl),".")),null==e.serialize||"function"==typeof e.serialize||Object(c.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||Object(c.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLScalarType"}}]),e}();Object(m.a)(ce);var le=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=fe.bind(void 0,e),this._interfaces=pe.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.isTypeOf||"function"==typeof e.isTypeOf||Object(c.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(o.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLObjectType"}}]),e}();function pe(e){var t,n=null!==(t=se(e.interfaces))&&void 0!==t?t:[];return Array.isArray(n)||Object(c.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function fe(e){var t=se(e.fields);return de(t)||Object(c.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(s.a)(t,(function(t,n){var i;de(t)||Object(c.a)(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||Object(c.a)(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"==typeof t.resolve||Object(c.a)(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(Object(o.a)(t.resolve),"."));var a=null!==(i=t.args)&&void 0!==i?i:{};de(a)||Object(c.a)(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var s=Object(r.a)(a).map((function(e){var t=e[0],n=e[1];return{name:t,description:n.description,type:n.type,defaultValue:n.defaultValue,extensions:n.extensions&&Object(u.a)(n.extensions),astNode:n.astNode}}));return{name:n,description:t.description,type:t.type,args:s,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&Object(u.a)(t.extensions),astNode:t.astNode}}))}function de(e){return Object(d.a)(e)&&!Array.isArray(e)}function he(e){return Object(s.a)(e,(function(e){return{description:e.description,type:e.type,args:me(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))}function me(e){return Object(l.a)(e,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}))}function ge(e){return B(e.type)&&void 0===e.defaultValue}Object(m.a)(le);var ye=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=fe.bind(void 0,e),this._interfaces=pe.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(c.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(o.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLInterfaceType"}}]),e}();Object(m.a)(ye);var ve=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._types=be.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(c.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(o.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLUnionType"}}]),e}();function be(e){var t=se(e.types);return Array.isArray(t)||Object(c.a)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}Object(m.a)(ve);var Ee=function(){function e(e){var t,n;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._values=(t=this.name,de(n=e.values)||Object(c.a)(0,"".concat(t," values must be an object with value names as keys.")),Object(r.a)(n).map((function(e){var n=e[0],r=e[1];return de(r)||Object(c.a)(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(o.a)(r),".")),!("isDeprecated"in r)||Object(c.a)(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:void 0!==r.value?r.value:n,isDeprecated:null!=r.deprecationReason,deprecationReason:r.deprecationReason,extensions:r.extensions&&Object(u.a)(r.extensions),astNode:r.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=Object(a.a)(this._values,(function(e){return e.name})),"string"==typeof e.name||Object(c.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new y.a('Enum "'.concat(this.name,'" cannot represent value: ').concat(Object(o.a)(e)));return t.name},t.parseValue=function(e){if("string"!=typeof e){var t=Object(o.a)(e);throw new y.a('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+xe(this,t))}var n=this.getValue(e);if(null==n)throw new y.a('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+xe(this,e));return n.value},t.parseLiteral=function(e,t){if(e.kind!==v.a.ENUM){var n=Object(b.print)(e);throw new y.a('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(n,".")+xe(this,n),e)}var r=this.getValue(e.value);if(null==r){var i=Object(b.print)(e);throw new y.a('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+xe(this,i),e)}return r.value},t.toConfig=function(){var e,t=Object(l.a)(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLEnumType"}}]),e}();function xe(e,t){var n=e.getValues().map((function(e){return e.name})),r=Object(g.a)(t,n);return Object(f.a)("the enum value",r)}Object(m.a)(Ee);var De=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(u.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ue(e.extensionASTNodes),this._fields=Ce.bind(void 0,e),"string"==typeof e.name||Object(c.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=Object(s.a)(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:i.c,get:function(){return"GraphQLInputObjectType"}}]),e}();function Ce(e){var t=se(e.fields);return de(t)||Object(c.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(s.a)(t,(function(t,n){return!("resolve"in t)||Object(c.a)(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,extensions:t.extensions&&Object(u.a)(t.extensions),astNode:t.astNode}}))}function we(e){return B(e.type)&&void 0===e.defaultValue}Object(m.a)(De)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r=n(31),i=n(25),o=n(94),a=n(137);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return ae})),n.d(t,"b",(function(){return L})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return x})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return U})),n.d(t,"h",(function(){return K})),n.d(t,"i",(function(){return I})),n.d(t,"j",(function(){return $})),n.d(t,"k",(function(){return z})),n.d(t,"l",(function(){return X})),n.d(t,"m",(function(){return ue})),n.d(t,"n",(function(){return pe})),n.d(t,"o",(function(){return oe})),n.d(t,"p",(function(){return de})),n.d(t,"q",(function(){return j})),n.d(t,"r",(function(){return F})),n.d(t,"s",(function(){return P})),n.d(t,"t",(function(){return q})),n.d(t,"u",(function(){return M})),n.d(t,"v",(function(){return ve})),n.d(t,"w",(function(){return re})),n.d(t,"x",(function(){return Q})),n.d(t,"y",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"A",(function(){return te})),n.d(t,"B",(function(){return ne})),n.d(t,"C",(function(){return B})),n.d(t,"D",(function(){return se})),n.d(t,"E",(function(){return ce})),n.d(t,"F",(function(){return le})),n.d(t,"G",(function(){return fe})),n.d(t,"H",(function(){return he})),n.d(t,"I",(function(){return me})),n.d(t,"J",(function(){return ge})),n.d(t,"K",(function(){return ye})),n.d(t,"L",(function(){return V})),n.d(t,"M",(function(){return l})),n.d(t,"N",(function(){return H})),n.d(t,"O",(function(){return N})),n.d(t,"P",(function(){return W})),n.d(t,"Q",(function(){return G})),n.d(t,"R",(function(){return J})),n.d(t,"S",(function(){return b})),n.d(t,"T",(function(){return _})),n.d(t,"U",(function(){return s})),n.d(t,"V",(function(){return S})),n.d(t,"W",(function(){return E})),n.d(t,"X",(function(){return O})),n.d(t,"Y",(function(){return h})),n.d(t,"Z",(function(){return p})),n.d(t,"ab",(function(){return y})),n.d(t,"bb",(function(){return d})),n.d(t,"cb",(function(){return w})),n.d(t,"db",(function(){return u})),n.d(t,"eb",(function(){return f})),n.d(t,"fb",(function(){return k})),n.d(t,"gb",(function(){return C})),n.d(t,"hb",(function(){return D}));var r=n(19),i=n(63),o=n(10),a=n(109),s=function(e){return function(){return e}}(!0),u=function(){};var c=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;function l(e,t,n){if(!t(e))throw new Error(n)}var p=function(e,t){Object(i.a)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))},f=function(e,t){var n;return(n=[]).concat.apply(n,t.map(e))};function d(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function h(e){var t=!1;return function(){t||(t=!0,e())}}var m=function(e){throw e},g=function(e){return{value:e,done:!0}};function y(e,t,n){void 0===t&&(t=m),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:g,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function v(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var b=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")},E=function(e){return Array.apply(null,new Array(e))},x=function(e){return function(t){return e(Object.defineProperty(t,r.f,{value:!0}))}},D=function(e){return e===r.k},C=function(e){return e===r.j},w=function(e){return D(e)||C(e)};function S(e,t){var n=Object.keys(e),r=n.length;var i,a=0,s=Object(o.a)(e)?E(r):{},c={};return n.forEach((function(e){var n=function(n,o){i||(o||w(n)?(t.cancel(),t(n,o)):(s[e]=n,++a===r&&(i=!0,t(s))))};n.cancel=u,c[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return c[e].cancel()})))},c}function _(e){return{name:e.name||"anonymous",location:k(e)}}function k(e){return e[r.g]}var A={isEmpty:s,put:u,take:u};function T(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},u=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2147483647||n<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: "+Object(o.a)(t));return n},parseValue:function(e){if(!i(e))throw new c.a("Int cannot represent non-integer value: ".concat(Object(o.a)(e)));if(e>2147483647||e<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: ".concat(e));return e},parseLiteral:function(e){if(e.kind!==s.a.INT)throw new c.a("Int cannot represent non-integer value: ".concat(Object(u.print)(e)),e);var t=parseInt(e.value,10);if(t>2147483647||t<-2147483648)throw new c.a("Int cannot represent non 32-bit signed integer value: ".concat(e.value),e);return t}});var f=new l.g({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:function(e){var t=d(e);if("boolean"==typeof t)return t?1:0;var n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),!Object(r.a)(n))throw new c.a("Float cannot represent non numeric value: ".concat(Object(o.a)(t)));return n},parseValue:function(e){if(!Object(r.a)(e))throw new c.a("Float cannot represent non numeric value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.FLOAT&&e.kind!==s.a.INT)throw new c.a("Float cannot represent non numeric value: ".concat(Object(u.print)(e)),e);return parseFloat(e.value)}});function d(e){if(Object(a.a)(e)){if("function"==typeof e.valueOf){var t=e.valueOf();if(!Object(a.a)(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}var h=new l.g({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:function(e){var t=d(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if(Object(r.a)(t))return t.toString();throw new c.a("String cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"!=typeof e)throw new c.a("String cannot represent a non string value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.STRING)throw new c.a("String cannot represent a non string value: ".concat(Object(u.print)(e)),e);return e.value}});var m=new l.g({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){var t=d(e);if("boolean"==typeof t)return t;if(Object(r.a)(t))return 0!==t;throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(t)))},parseValue:function(e){if("boolean"!=typeof e)throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind!==s.a.BOOLEAN)throw new c.a("Boolean cannot represent a non boolean value: ".concat(Object(u.print)(e)),e);return e.value}});var g=new l.g({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:function(e){var t=d(e);if("string"==typeof t)return t;if(i(t))return String(t);throw new c.a("ID cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"==typeof e)return e;if(i(e))return e.toString();throw new c.a("ID cannot represent value: ".concat(Object(o.a)(e)))},parseLiteral:function(e){if(e.kind!==s.a.STRING&&e.kind!==s.a.INT)throw new c.a("ID cannot represent a non-string and non-integer value: "+Object(u.print)(e),e);return e.value}}),y=Object.freeze([h,p,f,m,g]);function v(e){return y.some((function(t){var n=t.name;return e.name===n}))}},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))};t.a=r},function(e,t,n){"use strict";n.r(t),n.d(t,"print",(function(){return o}));var r=n(26),i=n(52);function o(e){return Object(r.c)(e,{leave:a})}var a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return u(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=l("(",u(e.variableDefinitions,", "),")"),i=u(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?u([t,u([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+l(" = ",r)+l(" ",u(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return u([l("",t,": ")+n+l("(",u(r,", "),")"),u(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+l(" ",u(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return u(["...",l("on ",t),u(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(l("(",u(r,", "),")")," ")+"on ".concat(n," ").concat(l("",u(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(i.c)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+u(e.values,", ")+"]"},ObjectValue:function(e){return"{"+u(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+l("(",u(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:s((function(e){var t=e.directives,n=e.operationTypes;return u(["schema",u(t," "),c(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:s((function(e){return u(["scalar",e.name,u(e.directives," ")]," ")})),ObjectTypeDefinition:s((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")})),FieldDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+": "+r+l(" ",u(i," "))})),InputValueDefinition:s((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return u([t+": "+n,l("= ",r),u(i," ")]," ")})),InterfaceTypeDefinition:s((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["interface",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")})),UnionTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.types;return u(["union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")})),EnumTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.values;return u(["enum",t,u(n," "),c(r)]," ")})),EnumValueDefinition:s((function(e){return u([e.name,u(e.directives," ")]," ")})),InputObjectTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.fields;return u(["input",t,u(n," "),c(r)]," ")})),DirectiveDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+(r?" repeatable":"")+" on "+u(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return u(["extend schema",u(t," "),c(n)]," ")},ScalarTypeExtension:function(e){return u(["extend scalar",e.name,u(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["extend type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["extend interface",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return u(["extend union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return u(["extend enum",t,u(n," "),c(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return u(["extend input",t,u(n," "),c(r)]," ")}};function s(e){return function(t){return u([t.description,e(t)],"\n")}}function u(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function c(e){return e&&0!==e.length?"{\n"+p(u(e,"\n"))+"\n}":""}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t?e+t+n:""}function p(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function d(e){return e&&e.some(f)}},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),c=u&&/Qt\/\d+\.\d+/.test(e),l=!o&&/Chrome\//.test(e),p=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),y=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),E=/win/i.test(t),x=p&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(p=!1,u=!0);var D=v&&(c||p&&(null==x||x<12.11)),C=n||a&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,_=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function k(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return k(e).appendChild(t)}function T(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}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(J(G)+" ");return G[e]}function J(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||X.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(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}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var ue=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,l=a.length,p=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ve(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){de(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){be(e),Ee(e)}function Ce(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var Se,_e,ke=function(){if(a&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Se){var t=T("span","​");A(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=_e)return _e;var t=A(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return k(e),!(!n||n.left==n.right)&&(_e=r.right-n.right<3)}var Oe,Fe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Oe=T("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),Me=null,je={},Le={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Re(e){if("string"==typeof e&&Le.hasOwnProperty(e))e=Le[e];else if(e&&"string"==typeof e.name&&Le.hasOwnProperty(e.name)){var t=Le[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Re(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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}var Ue={};function ze(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ve(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 qe(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 He(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ge(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?et(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ge(e,t.line).text.length)}function ut(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.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},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},lt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],u=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=u;ce&&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&&Ve(e.doc.mode,r.state),o=pt(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 dt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new lt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var u=Ge(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var l=R(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}(e,t,n),a=o>r.first&&Ge(r,o-1).stateAfter,s=a?lt.fromSaved(r,a,o):new lt(r,He(r.mode),o);return r.iter(o,t,(function(n){ht(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.")}lt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},lt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},lt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},lt.fromSaved=function(e,t,n){return t instanceof ct?new lt(e,Ve(e.mode,t.state),n,t.lookAhead):new lt(e,Ve(e.mode,t),n)},lt.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var yt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function vt(e,t,n,r){var i,o,a=e.doc,s=a.mode,u=Ge(a,(t=st(a,t)).line),c=dt(e,t.line,n),l=new We(u.text,e.options.tabSize,c);for(r&&(o=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,p.pos),p.pos=t.length,u=null):u=bt(gt(n,p,r.state,f),o),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||l!=u){for(;c=t:o.to>t);(r||(r=[])).push(new Ct(a,o.from,s?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Nt(n,o.marker)<0)&&(n=o.marker)}return n}function Pt(e,t,n,r,i){var o=Ge(e,t),a=Dt&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||l<=0&&p>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Rt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ge(e,t),r=Rt(n);return n==r?t:Ye(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!zt(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Ye(r)+1}function zt(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,At(e)}Gt.prototype.lineNo=function(){return Ye(this)},ve(Gt);var Jt={},Qt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Jt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,t){var n=O("span",null,null,u?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Te(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Ye(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Xt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,o,u){if(t){var c,l=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.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 tn(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 nn(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=s="",f=null,p=null,y=1/0;for(var v=[],b=void 0,E=0;Eh||D.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&y>x.to&&(y=x.to,c=""),D.className&&(u+=" "+D.className),D.css&&(s=(s?s+";":"")+D.css),D.startStyle&&x.from==h&&(l+=" "+D.startStyle),D.endStyle&&x.to==y&&(b||(b=[])).push(D.endStyle,x.to),D.title&&((f||(f={})).title=D.title),D.attributes)for(var C in D.attributes)(f||(f={}))[C]=D.attributes[C];D.collapsed&&(!p||Nt(p.marker,D)<0)&&(p=x)}else x.from>h&&y>x.from&&(y=x.from)}if(b)for(var w=0;w=d)break;for(var _=Math.min(d,y);;){if(g){var k=h+g.length;if(!p){var A=k>_?g.slice(0,_-h):g;t.addToken(t,A,a?a+u:u,l,h+A.length==y?c:"",s,f)}if(k>=_){g=g.slice(_-h),h=_;break}h=k,l=""}g=i.slice(o,o=n[m++]),a=Yt(n[m++],t.cm.options)}}else for(var T=1;Tn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function On(e,t,n,r){return In(e,Nn(e,t),n,r)}function Fn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((u.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Ln(t.map,n,r),u=o.node,c=o.start,l=o.end,p=o.collapse;if(3==u.nodeType){for(var f=0;f<4;f++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+l1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;c>0&&(p=r="right"),i=e.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==r?d.length-1:0]:u.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=u.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+ir(e.display),top:h.top,bottom:h.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,y=(m+g)/2,v=t.view.measure.heights,b=0;bt)&&(i=(o=u-s)-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 Rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);function l(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var p=se(s,u,c),f=ae,d=l(u,p,"before"==c);return null!=f&&(d.other=l(u,f,"before"!=c)),d}function Jn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ge(e.doc,t.line),i=qt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,-1,-1);var i=$e(r,n),o=r.first+r.size-1;if(i>o)return Qn(r.first+r.size-1,Ge(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,i);;){var s=er(e,a,i,t,n),u=Lt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var c=u.find(1);if(c.line==i)return c;a=Ge(r,i=c.line)}}function $n(e,t,n,r){r-=qn(t);var i=t.text.length,o=oe((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return In(e,n,t).top>r}),o,i)}}function Xn(e,t,n,r){return n||(n=Nn(e,t)),$n(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=qt(t);var o=Nn(e,t),a=qn(t),s=0,u=t.text.length,c=!0,l=ce(t,e.doc.direction);if(l){var p=(e.options.lineWrapping?nr:tr)(e,t,n,o,l,r,i);s=(c=1!=p.level)?p.from:p.to-1,u=c?p.to:p.from-1}var f,d,h=null,m=null,g=oe((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(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=E.bottom?1:0}return Qn(n,g=ie(t.text,g,1),d,y,r-f)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var u=i[s],c=1!=u.level;return Zn(Kn(e,et(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=Kn(e,et(n,c?u.from:u.to,c?"after":"before"),"line",t,r);Zn(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function nr(e,t,n,r,i,o,a){var s=$n(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=In(e,r,1!=d.level?Math.min(c,d.to)-1:Math.max(u,d.from)).right,m=hm)&&(l=d,p=m)}}return l||(l=i[i.length-1]),l.fromc&&(l={from:l.from,to:c,level:l.level}),l}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(T("br"));Mn.appendChild(document.createTextNode("x"))}A(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),k(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(zt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(u=Ge(e.doc,c.line).text).length==c.ch){var l=R(u,u.length,e.options.tabSize)-u.length;c=et(c.line,Math.max(0,Math.round((o-Sn(e.display).left)/ir(e.display))-l))}return c}function lr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&Bt(e.doc,t)i.viewFrom?dr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)dr(e);else if(t<=i.viewFrom){var o=hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):dr(e)}else if(n>=i.viewTo){var a=hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):dr(e)}else{var s=hr(e,t,t,-1),u=hr(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):dr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!Dt||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(;Bt(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 mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||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")}(m,n||0,null==r?f:r,(function(e,t,i,p){var g="ltr"==i,y=d(e,g?"left":"right"),v=d(t-1,g?"right":"left"),b=null==n&&0==e,E=null==r&&t==f,x=0==p,D=!m||p==m.length-1;if(v.top-y.top<=3){var C=(c?E:b)&&D,w=(c?b:E)&&x?s:(g?y:v).left,S=C?u:(g?v:y).right;l(w,y.top,S-w,y.bottom)}else{var _,k,A,T;g?(_=c&&b&&x?s:y.left,k=c?u:h(e,i,"before"),A=c?s:h(t,i,"after"),T=c&&E&&D?u:v.right):(_=c?h(e,i,"before"):s,k=!c&&b&&x?u:y.right,A=!c&&E&&D?s:v.left,T=c?h(t,i,"after"):u),l(_,y.top,k-_,y.bottom),y.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Dr(e){e.state.focused||(e.display.input.focus(),wr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function _r(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Qe(i.line,u),kr(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(c/ir(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function kr(e){if(e.widgets)for(var t=0;t=a&&(o=$e(t,qt(Ge(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Tr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=An(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+wn(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=kn(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 Or(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Fr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,Jn(e,t.from),Jn(e,t.to),t.margin))}function Mr(e,t,n,r){var i=Tr(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});Nr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ui(e,{top:t}),Lr(e,t,!0),n&&ui(e),ri(e,100))}function Lr(e,t,n){t=Math.max(0,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 Pr(e,t,n,r){t=Math.max(0,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,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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+_n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.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}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=v&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(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)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function zr(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&_r(e),Vr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(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=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var qr={native:Br,null:Ur};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(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?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Gr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&_r(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(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+_n(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-kn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function $r(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=T("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+_n(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Kn(e,t),u=n&&n!=t?Kn(e,n):s,c=Tr(e,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}),l=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=dt(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?Ve(t.mode,r.state):null,u=pt(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 ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(dr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Dt&&(o=Bt(e.doc,o),a=Ut(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=qt(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=function(e){if(e.hasFocus())return null;var t=N();if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&F(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return u&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,l=r.viewFrom,p=0;p-1&&(d=!1),ln(e,f,l,n)),d&&(k(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,l)))),a=f.node.nextSibling}else{var h=yn(e,f,l,n);o.insertBefore(h,a)}l+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(l),k(n.cursorDiv),k(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=kn(e))r&&(t.visible=Ar(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-An(e),n.top)}),t.visible=Ar(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;_r(e);var i=Rr(e);gr(e),zr(e,i),li(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 ui(e,t){var n=new oi(e,t);if(ai(e,n)){_r(e),si(e,n);var r=Rr(e);gr(e),zr(e,r),li(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function li(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+_n(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&c||o&&l){if(o&&v&&u)e:for(var f=t.target,d=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:u>=0){var c=ot(s.from(),a.from()),l=it(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ci(p?l:c,p?c:l))}}return new Di(t,n)}function Si(e,t){return new Di([new Ci(e,t||e)],0)}function _i(e){return e.text?et(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ki(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return _i(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+=_i(t).ch-t.to.ch),et(n,r)}function Ai(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,y)}un(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(i,i.lastOp==r)))a=J(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=_i(t):o.changes.push(Ri(e,t));else{var u=J(i.done);for(u&&u.ranges||Vi(e.sel,i.done),o={changes:[Ri(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||he(e,"historyAdded")}function zi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,J(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Vi(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qi(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 Hi(e){if(!e)return null;for(var t,n=0;n-1&&(J(s)[p]=c[p],delete c[p])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new Di([Ki(e.sel.primary(),t,n,i)],0),r)}function Qi(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&&(he(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var p=u.find(r<0?1:-1),f=void 0;if((r<0?l:c)&&(p=ao(e,p,-r,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(f=tt(p,n))&&(r<0?f<0:f>0))return io(e,p,t,r,i)}var d=u.find(r<0?-1:1);return(r<0?c:l)&&(d=ao(e,d,r,d.line==t.line?o:null)),d?io(e,d,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var l=[u,1],p=tt(c.from,s.from),f=tt(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&l.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&l.push({from:s.to,to:c.to}),i.splice.apply(i,l),u+=l.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)lo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ai(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),ho(e,t,n,_t(e,t));var r=[];Mi(e,(function(e,n){n||-1!=U(r,e.history)||(vo(e.history,t),r.push(e.history)),ho(e,t,null,_t(e,t))}))}}function po(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=f(d);if(h)return h.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Di(Q(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pr(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:et(o,Ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Ai(e,t)),e.cm?function(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=Ye(Rt(Ge(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&&ge(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,(function(e){var t=Ht(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ge(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof Eo))){var s=[];this.collapse(s),this.children=[new Eo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,n,o)||t.line!=n.line&&Pt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt=!0}o.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,c=e.cm;if(e.iter(u,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Rt(e)==c.display.maxLine&&(s=!0),o.collapsed&&u!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){zt(e,t)&&Qe(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)pr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var l=t.line;l<=n.line;l++)fr(c,l,"text");o.atomic&&no(c.doc),un(c,"markerAdded",c,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),ye(this,"clear")){var n=this.find();n&&un(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&un(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)co(this,r[u]);s?Xi(this,s):this.cm&&Fr(this.cm)})),undo:ni((function(){po(this,"undo")})),redo:ni((function(){po(this,"redo")})),undoSelection:ni((function(){po(this,"undo",!0)})),redoSelection:ni((function(){po(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=st(this,e),t=st(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})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Si(n,n)),f)for(var d=0;d=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Fr(e)}))}function Xo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zo(e,t,n){var r=Xo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?J(o):o[0],u=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Nn(t,n);a=i<0?n.text.length-1:0;var l=In(t,c,a).top;a=oe((function(e){return In(t,c,e).top==l}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=Xo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,u)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}qo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qo.default=v?qo.macDefault:qo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return $o(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ge(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",l),de(i.scroller,"dragstart",p),de(i.scroller,"drop",c),o||(be(t),r.addNew||Ji(e.doc,n,null,null,r.extend),u&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},p=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",l),pe(i.scroller,"dragstart",p),pe(i.scroller,"drop",c),Cr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Ci(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ci(n,n)),n=cr(e,t,!0,!0),s=-1;else{var l=ya(e,n,r.unit);a=r.extend?Ki(a,l.anchor,l.head,r.extend):l}r.addNew?-1==s?(s=c.length,Zi(o,wi(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(o,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Yi(o,s,a,q):(s=0,Zi(o,new Di([a],0),q),u=o.sel);var p=n;function f(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,l=R(Ge(o,n.line).text,n.ch,c),f=R(Ge(o,t.line).text,t.ch,c),d=Math.min(l,f),h=Math.max(l,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var y=Ge(o,m).text,v=W(y,d,c);d==h?i.push(new Ci(et(m,v),et(m,v))):y.length>v&&i.push(new Ci(et(m,v),et(m,W(y,h,c))))}i.length||i.push(new Ci(n,n)),Zi(o,wi(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,x=ya(e,t,r.unit),D=E.anchor;tt(x.anchor,D)>0?(b=x.head,D=ot(E.from(),x.anchor)):(b=x.anchor,D=it(E.to(),x.head));var C=u.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=Ge(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=se(o,r.ch,r.sticky),p=l-a||(r.ch-n.ch)*(1==s.level?-1:1);u=l==c-1||l==c?p<0:p>0}var f=o[c+(u?-1:0)],d=u==(1==f.level),h=d?f.from:f.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new Ci(new et(n.line,h,m),r)}(e,new Ci(st(o,D),b)),Zi(o,wi(e,C,s),q)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(be(t),i.input.focus()),de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&we(t)?function t(n){var a=++h,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,p)){e.curOp.focus=N(),f(s);var u=Ar(i,o);(s.line>=u.to||s.lined.bottom?20:0;c&&setTimeout(ei(e,(function(){h==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),y=ei(e,m);e.state.selectingText=y,pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",y)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&be(e):2==i?(r&&Ji(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function ya(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function va(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(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return xe(t);o-=s.top-a.viewOffset;for(var u=0;u=i)return he(e,n,e,$e(e.doc,o),e.display.gutterSpecs[u].className,t),xe(t)}}function ba(e,t){return va(e,t,"gutterClick",!0)}function Ea(e,t){Dn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&va(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Ca={},wa={};function Sa(e,t,n){if(!t!=!(n&&n!=Da)){var r=e.display.dragFunctions,i=t?pe:de;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 _a(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),ur(e),pr(e),Un(e),setTimeout((function(){return zr(e)}),100)}function ka(e,t){var n=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?P(t):{},P(Ca,t,!1);var r=t.value;"string"==typeof r?r=new Fo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(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 B,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",ei(e,ga)),pe(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!Dn(e.display,t)){be(t);var r=e.findWordAt(n);Ji(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),pe(t.scroller,"contextmenu",(function(t){return Ea(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ea(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Dn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Ci(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Ci(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return xi(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||De(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(e,t),De(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-No<100))De(t);else if(!me(e,t)&&!Dn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Io),leave:function(t){me(e,t)||Mo(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return pa.call(e,t)})),pe(u,"keydown",ei(e,la)),pe(u,"keypress",ei(e,fa)),pe(u,"focus",(function(t){return wr(e,t)})),pe(u,"blur",(function(t){return Sr(e,t)}))}(this),Po(),Gr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&wr(n)}),20):Sr(this),wa)wa.hasOwnProperty(c)&&wa[c](this,t[c],Da);fi(this),t.finishInit&&t.finishInit(this);for(var l=0;l150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(Ge(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 p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)f+=a,p+="\t";if(fa,u=Fe(t),c=null;if(s&&r.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){c=[];for(var l=0;l=0;f--){var d=r.ranges[f],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ge(o,m.line).text.length,m.ch+J(u).length)):s&&Oa&&Oa.lineWise&&Oa.text.join("\n")==u.join("\n")&&(h=m=et(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:u,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),un(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Fr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Na(t,n,0,null,"paste")})),!0}function Ma(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=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&un(e,"electricInput",e,i.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r0?0:-1));a=isNaN(l)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(l>=55296&&l<56320?2:1))),-n)}else a=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Zo(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=se(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 et(n.line,f,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,u(e,1),"before"):new et(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}(e.cm,s,t,n):Zo(s,t,n);if(null==a){if(o||(c=t.line+u)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ge(e,c))))return!1;t=ea(i,e.cm,s,t.line,u)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!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)||c(!d);d=!1){var h=s.text.charAt(t.ch)||"\n",m=ee(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,c(),t.sticky="after");break}if(m&&(l=m),n>0&&!c(!d))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(u-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Yn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function za(e,t){var n=Fn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),i=Tn(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Ln(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&za(t,i)||{node:u[0].measure.map[2],offset:0},l=o.liner.firstLine()&&(a=et(a.line-1,Ge(r.doc,a.line-1).length)),s.ch==Ge(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=Ye(i.view[0].line),n=i.view[0].node):(t=Ye(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,c,l=lr(r,s.line);if(l==i.view.length-1?(u=i.viewTo-1,c=i.lineDiv.lastChild):(u=Ye(i.view[l+1].line)-1,c=i.view[l+1].node.previousSibling),!n)return!1;for(var p=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),u=!1;function c(){a&&(o+=s,u&&(o+=s),a=u=!1)}function l(e){e&&(c(),o+=e)}function p(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(d.length&&(o=d[0].find(0))&&l(Ke(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&f.length>1;)if(J(p)==J(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),t++}for(var d=0,h=0,m=p[0],g=f[0],y=Math.min(m.length,g.length);da.ch&&v.charCodeAt(v.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;p[p.length-1]=v.slice(0,v.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(d).replace(/\u200b+$/,"");var x=et(t,d),D=et(u,f.length?J(f).length-h:0);return p.length>1||p[0]||tt(x,D)?(mo(r.doc,p,x,D,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.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))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return pr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Na)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Fa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=ja(r);Fa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){me(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Dn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Dn(e,t)||be(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(e){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Wa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var i=Kn(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},Wa.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wa.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&&j(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(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(a&&s>=9&&this.hasSelection===i||v&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,c=Math.min(r.length,i.length);u1e3||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},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Zi)(n.doc,Si(o),V);var l,f=i.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(l=window.scrollY),r.input.focus(),u&&window.scrollTo(null,l),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){De(e);var m=function(){de(window,"mouseup",m),setTimeout(y,20)};pe(window,"mouseup",m)}else setTimeout(y,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Wa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Wa.prototype.setUneditable=function(){},Wa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Da&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Oi(e)}),!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Fi(e),Un(e),pr(e)}),!0),n("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(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Da&&e.refresh()})),n("specialCharPlaceholder",Xt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){xa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yo(t),i=n!=Da&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=di(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return zr(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),zr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=di(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Fi,!0),n("addModeClass",!1,Fi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Fi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(ka),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)&&ei(this,t[e])(this,n,i),he(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"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ta(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Fr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;u0&&Yi(this.doc,r,new Ci(o,c[r].to()),V)}}})),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ge(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=Ge(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-qt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,u=this.display,c=(e=Kn(this,st(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),u.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var p=Math.max(u.wrapper.clientHeight,this.doc.height),f=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>p)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=p&&(c=e.bottom),l+t.offsetWidth>f&&(l=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(l=u.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(u.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&(o=this,a={left:l,top:c,right:l+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tr(o,a)).scrollTop&&jr(o,s.scrollTop),null!=s.scrollLeft&&Pr(o,s.scrollLeft))},triggerOnKeyDown:ti(la),triggerOnKeyPress:ti(fa),triggerOnKeyUp:pa,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ma(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&ur(this),he(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Un(this),this.display.input.reset(),Nr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,un(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ve(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})}}(ka);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Fo.prototype)Fo.prototype.hasOwnProperty(Ka)&&U(Ga,Ka)<0&&(ka.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fo.prototype[Ka]));return ve(Fo),ka.inputStyles={textarea:Wa,contenteditable:Ua},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),Pe.apply(this,arguments)},ka.defineMIME=function(e,t){Le[e]=t},ka.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){Fo.prototype[e]=t},ka.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(de(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=ka((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=de,e.on=pe,e.wheelEventPixels=Ei,e.Doc=Fo,e.splitLines=Fe,e.countColumn=R,e.findColumn=W,e.isWordChar=Z,e.Pass=z,e.signal=he,e.Line=Gt,e.changeEnd=_i,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Le,e.resolveMode=Re,e.getMode=Be,e.modeExtensions=Ue,e.extendMode=ze,e.copyState=Ve,e.startState=He,e.innerMode=qe,e.commands=ta,e.keyMap=qo,e.keyName=Qo,e.isModifierKey=Ko,e.lookupKey=Go,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=ko,e.TextMarker=So,e.LineWidget=Do,e.e_preventDefault=be,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=I,e.contains=F,e.rmClass=_,e.keyNames=Bo}(ka),ka.version="5.58.1",ka}()},function(e,t,n){"use strict";n.r(t),n.d(t,"version",(function(){return r})),n.d(t,"versionInfo",(function(){return i})),n.d(t,"graphql",(function(){return de})),n.d(t,"graphqlSync",(function(){return he})),n.d(t,"GraphQLSchema",(function(){return ge.a})),n.d(t,"GraphQLDirective",(function(){return x.c})),n.d(t,"GraphQLScalarType",(function(){return D.g})),n.d(t,"GraphQLObjectType",(function(){return D.f})),n.d(t,"GraphQLInterfaceType",(function(){return D.c})),n.d(t,"GraphQLUnionType",(function(){return D.h})),n.d(t,"GraphQLEnumType",(function(){return D.a})),n.d(t,"GraphQLInputObjectType",(function(){return D.b})),n.d(t,"GraphQLList",(function(){return D.d})),n.d(t,"GraphQLNonNull",(function(){return D.e})),n.d(t,"specifiedScalarTypes",(function(){return ye.g})),n.d(t,"GraphQLInt",(function(){return ye.d})),n.d(t,"GraphQLFloat",(function(){return ye.b})),n.d(t,"GraphQLString",(function(){return ye.e})),n.d(t,"GraphQLBoolean",(function(){return ye.a})),n.d(t,"GraphQLID",(function(){return ye.c})),n.d(t,"specifiedDirectives",(function(){return x.j})),n.d(t,"GraphQLIncludeDirective",(function(){return x.d})),n.d(t,"GraphQLSkipDirective",(function(){return x.e})),n.d(t,"GraphQLDeprecatedDirective",(function(){return x.b})),n.d(t,"GraphQLSpecifiedByDirective",(function(){return x.f})),n.d(t,"TypeKind",(function(){return E.TypeKind})),n.d(t,"DEFAULT_DEPRECATION_REASON",(function(){return x.a})),n.d(t,"introspectionTypes",(function(){return E.introspectionTypes})),n.d(t,"__Schema",(function(){return E.__Schema})),n.d(t,"__Directive",(function(){return E.__Directive})),n.d(t,"__DirectiveLocation",(function(){return E.__DirectiveLocation})),n.d(t,"__Type",(function(){return E.__Type})),n.d(t,"__Field",(function(){return E.__Field})),n.d(t,"__InputValue",(function(){return E.__InputValue})),n.d(t,"__EnumValue",(function(){return E.__EnumValue})),n.d(t,"__TypeKind",(function(){return E.__TypeKind})),n.d(t,"SchemaMetaFieldDef",(function(){return E.SchemaMetaFieldDef})),n.d(t,"TypeMetaFieldDef",(function(){return E.TypeMetaFieldDef})),n.d(t,"TypeNameMetaFieldDef",(function(){return E.TypeNameMetaFieldDef})),n.d(t,"isSchema",(function(){return ge.c})),n.d(t,"isDirective",(function(){return x.h})),n.d(t,"isType",(function(){return D.S})),n.d(t,"isScalarType",(function(){return D.R})),n.d(t,"isObjectType",(function(){return D.N})),n.d(t,"isInterfaceType",(function(){return D.H})),n.d(t,"isUnionType",(function(){return D.T})),n.d(t,"isEnumType",(function(){return D.E})),n.d(t,"isInputObjectType",(function(){return D.F})),n.d(t,"isListType",(function(){return D.J})),n.d(t,"isNonNullType",(function(){return D.L})),n.d(t,"isInputType",(function(){return D.G})),n.d(t,"isOutputType",(function(){return D.O})),n.d(t,"isLeafType",(function(){return D.I})),n.d(t,"isCompositeType",(function(){return D.D})),n.d(t,"isAbstractType",(function(){return D.C})),n.d(t,"isWrappingType",(function(){return D.U})),n.d(t,"isNullableType",(function(){return D.M})),n.d(t,"isNamedType",(function(){return D.K})),n.d(t,"isRequiredArgument",(function(){return D.P})),n.d(t,"isRequiredInputField",(function(){return D.Q})),n.d(t,"isSpecifiedScalarType",(function(){return ye.f})),n.d(t,"isIntrospectionType",(function(){return E.isIntrospectionType})),n.d(t,"isSpecifiedDirective",(function(){return x.i})),n.d(t,"assertSchema",(function(){return ge.b})),n.d(t,"assertDirective",(function(){return x.g})),n.d(t,"assertType",(function(){return D.x})),n.d(t,"assertScalarType",(function(){return D.w})),n.d(t,"assertObjectType",(function(){return D.u})),n.d(t,"assertInterfaceType",(function(){return D.o})),n.d(t,"assertUnionType",(function(){return D.y})),n.d(t,"assertEnumType",(function(){return D.l})),n.d(t,"assertInputObjectType",(function(){return D.m})),n.d(t,"assertListType",(function(){return D.q})),n.d(t,"assertNonNullType",(function(){return D.s})),n.d(t,"assertInputType",(function(){return D.n})),n.d(t,"assertOutputType",(function(){return D.v})),n.d(t,"assertLeafType",(function(){return D.p})),n.d(t,"assertCompositeType",(function(){return D.k})),n.d(t,"assertAbstractType",(function(){return D.j})),n.d(t,"assertWrappingType",(function(){return D.z})),n.d(t,"assertNullableType",(function(){return D.t})),n.d(t,"assertNamedType",(function(){return D.r})),n.d(t,"getNullableType",(function(){return D.B})),n.d(t,"getNamedType",(function(){return D.A})),n.d(t,"validateSchema",(function(){return u.b})),n.d(t,"assertValidSchema",(function(){return u.a})),n.d(t,"Token",(function(){return ve.b})),n.d(t,"Source",(function(){return be.a})),n.d(t,"Location",(function(){return ve.a})),n.d(t,"getLocation",(function(){return Ee.a})),n.d(t,"printLocation",(function(){return xe.a})),n.d(t,"printSourceLocation",(function(){return xe.b})),n.d(t,"Lexer",(function(){return De.a})),n.d(t,"TokenKind",(function(){return Ce.a})),n.d(t,"parse",(function(){return a.a})),n.d(t,"parseValue",(function(){return a.c})),n.d(t,"parseType",(function(){return a.b})),n.d(t,"print",(function(){return A.print})),n.d(t,"visit",(function(){return we.c})),n.d(t,"visitInParallel",(function(){return we.d})),n.d(t,"getVisitFn",(function(){return we.b})),n.d(t,"BREAK",(function(){return we.a})),n.d(t,"Kind",(function(){return b.a})),n.d(t,"DirectiveLocation",(function(){return Se.a})),n.d(t,"isDefinitionNode",(function(){return _e.a})),n.d(t,"isExecutableDefinitionNode",(function(){return _e.b})),n.d(t,"isSelectionNode",(function(){return _e.c})),n.d(t,"isValueNode",(function(){return _e.i})),n.d(t,"isTypeNode",(function(){return _e.f})),n.d(t,"isTypeSystemDefinitionNode",(function(){return _e.g})),n.d(t,"isTypeDefinitionNode",(function(){return _e.d})),n.d(t,"isTypeSystemExtensionNode",(function(){return _e.h})),n.d(t,"isTypeExtensionNode",(function(){return _e.e})),n.d(t,"execute",(function(){return z})),n.d(t,"executeSync",(function(){return V})),n.d(t,"defaultFieldResolver",(function(){return pe})),n.d(t,"defaultTypeResolver",(function(){return le})),n.d(t,"responsePathAsArray",(function(){return g})),n.d(t,"getDirectiveValues",(function(){return B})),n.d(t,"subscribe",(function(){return Ne})),n.d(t,"createSourceEventStream",(function(){return je})),n.d(t,"validate",(function(){return s.c})),n.d(t,"ValidationContext",(function(){return Pe.b})),n.d(t,"specifiedRules",(function(){return Re.a})),n.d(t,"ExecutableDefinitionsRule",(function(){return Be.a})),n.d(t,"FieldsOnCorrectTypeRule",(function(){return Ue.a})),n.d(t,"FragmentsOnCompositeTypesRule",(function(){return ze.a})),n.d(t,"KnownArgumentNamesRule",(function(){return Ve.b})),n.d(t,"KnownDirectivesRule",(function(){return qe.a})),n.d(t,"KnownFragmentNamesRule",(function(){return He.a})),n.d(t,"KnownTypeNamesRule",(function(){return We.a})),n.d(t,"LoneAnonymousOperationRule",(function(){return Ge.a})),n.d(t,"NoFragmentCyclesRule",(function(){return Ke.a})),n.d(t,"NoUndefinedVariablesRule",(function(){return Je.a})),n.d(t,"NoUnusedFragmentsRule",(function(){return Qe.a})),n.d(t,"NoUnusedVariablesRule",(function(){return Ye.a})),n.d(t,"OverlappingFieldsCanBeMergedRule",(function(){return $e.a})),n.d(t,"PossibleFragmentSpreadsRule",(function(){return Xe.a})),n.d(t,"ProvidedRequiredArgumentsRule",(function(){return Ze.b})),n.d(t,"ScalarLeafsRule",(function(){return et.a})),n.d(t,"SingleFieldSubscriptionsRule",(function(){return tt.a})),n.d(t,"UniqueArgumentNamesRule",(function(){return nt.a})),n.d(t,"UniqueDirectivesPerLocationRule",(function(){return rt.a})),n.d(t,"UniqueFragmentNamesRule",(function(){return it.a})),n.d(t,"UniqueInputFieldNamesRule",(function(){return ot.a})),n.d(t,"UniqueOperationNamesRule",(function(){return at.a})),n.d(t,"UniqueVariableNamesRule",(function(){return st.a})),n.d(t,"ValuesOfCorrectTypeRule",(function(){return ut.a})),n.d(t,"VariablesAreInputTypesRule",(function(){return ct.a})),n.d(t,"VariablesInAllowedPositionRule",(function(){return lt.a})),n.d(t,"LoneSchemaDefinitionRule",(function(){return pt.a})),n.d(t,"UniqueOperationTypesRule",(function(){return ft.a})),n.d(t,"UniqueTypeNamesRule",(function(){return dt.a})),n.d(t,"UniqueEnumValueNamesRule",(function(){return ht.a})),n.d(t,"UniqueFieldDefinitionNamesRule",(function(){return mt.a})),n.d(t,"UniqueDirectiveNamesRule",(function(){return gt.a})),n.d(t,"PossibleTypeExtensionsRule",(function(){return yt.a})),n.d(t,"NoDeprecatedCustomRule",(function(){return vt.a})),n.d(t,"NoSchemaIntrospectionCustomRule",(function(){return bt})),n.d(t,"GraphQLError",(function(){return y.a})),n.d(t,"syntaxError",(function(){return Et.a})),n.d(t,"locatedError",(function(){return v.a})),n.d(t,"printError",(function(){return y.b})),n.d(t,"formatError",(function(){return xt})),n.d(t,"getIntrospectionQuery",(function(){return wt})),n.d(t,"getOperationAST",(function(){return St.getOperationAST})),n.d(t,"getOperationRootType",(function(){return w})),n.d(t,"introspectionFromSchema",(function(){return At})),n.d(t,"buildClientSchema",(function(){return Ot})),n.d(t,"buildASTSchema",(function(){return Vt})),n.d(t,"buildSchema",(function(){return qt})),n.d(t,"getDescription",(function(){return zt})),n.d(t,"extendSchema",(function(){return Lt})),n.d(t,"lexicographicSortSchema",(function(){return Kt})),n.d(t,"printSchema",(function(){return Xt})),n.d(t,"printType",(function(){return rn})),n.d(t,"printIntrospectionSchema",(function(){return Zt})),n.d(t,"typeFromAST",(function(){return C.a})),n.d(t,"valueFromAST",(function(){return O})),n.d(t,"valueFromASTUntyped",(function(){return dn.a})),n.d(t,"astFromValue",(function(){return $t.a})),n.d(t,"TypeInfo",(function(){return hn.a})),n.d(t,"visitWithTypeInfo",(function(){return hn.b})),n.d(t,"coerceInputValue",(function(){return M})),n.d(t,"concatAST",(function(){return gn})),n.d(t,"separateOperations",(function(){return yn})),n.d(t,"stripIgnoredCharacters",(function(){return bn})),n.d(t,"isEqualType",(function(){return xn.b})),n.d(t,"isTypeSubTypeOf",(function(){return xn.c})),n.d(t,"doTypesOverlap",(function(){return xn.a})),n.d(t,"assertValidName",(function(){return Dn.a})),n.d(t,"isValidNameError",(function(){return Dn.b})),n.d(t,"BreakingChangeType",(function(){return _n})),n.d(t,"DangerousChangeType",(function(){return kn})),n.d(t,"findBreakingChanges",(function(){return An})),n.d(t,"findDangerousChanges",(function(){return Tn})),n.d(t,"findDeprecatedUsages",(function(){return Vn.a}));var r="15.3.0",i=Object.freeze({major:15,minor:3,patch:0,preReleaseTag:null});function o(e){return"function"==typeof(null==e?void 0:e.then)}var a=n(64),s=n(65),u=n(79),c=n(57),l=n(4);var p=n(18),f=n(8),d=n(31),h=n(80);function m(e,t,n){return{prev:e,key:t,typename:n}}function g(e){for(var t=[],n=e;n;)t.push(n.key),n=n.prev;return t.reverse()}var y=n(2),v=n(81),b=n(1),E=n(12),x=n(21),D=n(0),C=n(33);function w(e,t){if("query"===t.operation){var n=e.getQueryType();if(!n)throw new y.a("Schema does not define the required query root type.",t);return n}if("mutation"===t.operation){var r=e.getMutationType();if(!r)throw new y.a("Schema is not configured for mutations.",t);return r}if("subscription"===t.operation){var i=e.getSubscriptionType();if(!i)throw new y.a("Schema is not configured for subscriptions.",t);return i}throw new y.a("Can only have query, mutation and subscription operations.",t)}var S=n(55),_=n(36);function k(e){return e.map((function(e){return"number"==typeof e?"["+e.toString()+"]":"."+e})).join("")}var A=n(15),T=n(14);function O(e,t,n){if(e){if(e.kind===b.a.VARIABLE){var r=e.name.value;if(null==n||void 0===n[r])return;var i=n[r];if(null===i&&Object(D.L)(t))return;return i}if(Object(D.L)(t)){if(e.kind===b.a.NULL)return;return O(e,t.ofType,n)}if(e.kind===b.a.NULL)return null;if(Object(D.J)(t)){var o=t.ofType;if(e.kind===b.a.LIST){for(var a=[],s=0,u=e.values;s2&&void 0!==arguments[2]?arguments[2]:j;return L(e,t,n)}function j(e,t,n){var r="Invalid value "+Object(l.a)(t);throw e.length>0&&(r+=' at "value'.concat(k(e),'"')),n.message=r+": "+n.message,n}function L(e,t,n,r){if(Object(D.L)(t))return null!=e?L(e,t.ofType,n,r):void n(g(r),e,new y.a('Expected non-nullable type "'.concat(Object(l.a)(t),'" not to be null.')));if(null==e)return null;if(Object(D.J)(t)){var i=t.ofType;return Object(h.a)(e)?Object(c.a)(e,(function(e,t){var o=m(r,t,void 0);return L(e,i,n,o)})):[L(e,i,n,r)]}if(Object(D.F)(t)){if(!Object(d.a)(e))return void n(g(r),e,new y.a('Expected type "'.concat(t.name,'" to be an object.')));for(var o={},a=t.getFields(),s=0,u=Object(T.a)(a);s0&&(i+=' at "'.concat(s).concat(k(e),'"')),r(new y.a(i+"; "+n.message,a,void 0,void 0,void 0,n.originalError))}))},a=0;a=o)throw new y.a("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:a}}catch(e){i.push(e)}return{errors:i}}function R(e,t,n){for(var r,i={},o=null!==(r=t.arguments)&&void 0!==r?r:[],a=Object(_.a)(o,(function(e){return e.name.value})),s=0,u=e.args;s0)return{errors:d};try{t=Object(a.a)(r)}catch(e){return{errors:[e]}}var h=Object(s.c)(n,t);return h.length>0?{errors:h}:z({schema:n,document:t,rootValue:i,contextValue:o,variableValues:c,operationName:l,fieldResolver:p,typeResolver:f})}var ge=n(53),ye=n(13),ve=n(24),be=n(82),Ee=n(94),xe=n(137),De=n(83),Ce=n(5),we=n(26),Se=n(9),_e=n(45),ke=n(25);function Ae(e,t,n){var r,i,o,a,s,u,c=e[ke.a].call(e);function l(e){return e.done?e:Te(e.value,t).then(Oe,i)}if("function"==typeof c.return&&(r=c.return,i=function(e){var t=function(){return Promise.reject(e)};return r.call(c).then(t,t)}),n){var p=n;o=function(e){return Te(e,p).then(Oe,i)}}return a={next:function(){return c.next().then(l,o)},return:function(){return r?r.call(c).then(l,o):Promise.resolve({value:void 0,done:!0})},throw:function(e){return"function"==typeof c.throw?c.throw(e).then(l,o):Promise.reject(e).catch(i)}},s=ke.a,u=function(){return this},s in a?Object.defineProperty(a,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[s]=u,a}function Te(e,t){return new Promise((function(n){return n(t(e))}))}function Oe(e){return{value:e,done:!1}}function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t,n,r,i,o,a,s){return 1===arguments.length?Me(e):Me({schema:e,document:t,rootValue:n,contextValue:r,variableValues:i,operationName:o,fieldResolver:a,subscribeFieldResolver:s})}function Ie(e){if(e instanceof y.a)return{errors:[e]};throw e}function Me(e){var t=e.schema,n=e.document,r=e.rootValue,i=e.contextValue,o=e.variableValues,a=e.operationName,s=e.fieldResolver,u=e.subscribeFieldResolver,c=je(t,n,r,i,o,a,u),l=function(e){return z({schema:t,document:n,rootValue:e,contextValue:i,variableValues:o,operationName:a,fieldResolver:s})};return c.then((function(e){return Le(e)?Ae(e,l,Ie):e}))}function je(e,t,n,r,i,o,a){H(e,t,i);try{var s,u=W(e,t,n,r,i,o,a);if(Array.isArray(u))return Promise.resolve({errors:u});var c=w(e,u.operation),p=K(u,c,u.operation.selectionSet,Object.create(null),Object.create(null)),f=Object.keys(p)[0],d=p[f],h=d[0].name.value,b=fe(e,c,h);if(!b)throw new y.a('The subscription field "'.concat(h,'" is not defined.'),d);var E=null!==(s=b.subscribe)&&void 0!==s?s:u.fieldResolver,x=m(void 0,f,c.name),D=$(u,b,d,c,x),C=X(u,b,d,E,n,D);return Promise.resolve(C).then((function(e){if(e instanceof Error)return{errors:[Object(v.a)(e,d,g(x))]};if(Le(e))return e;throw new Error("Subscription field must return Async Iterable. "+"Received: ".concat(Object(l.a)(e),"."))}))}catch(e){return e instanceof y.a?Promise.resolve({errors:[e]}):Promise.reject(e)}}function Le(e){return null!=e&&"object"===Fe(e)&&"function"==typeof e[ke.a]}var Pe=n(146),Re=n(138),Be=n(212),Ue=n(219),ze=n(216),Ve=n(142),qe=n(140),He=n(221),We=n(139),Ge=n(214),Ke=n(224),Je=n(226),Qe=n(222),Ye=n(227),$e=n(230),Xe=n(223),Ze=n(144),et=n(218),tt=n(215),nt=n(143),rt=n(141),it=n(220),ot=n(145),at=n(213),st=n(225),ut=n(228),ct=n(217),lt=n(229),pt=n(231),ft=n(232),dt=n(233),ht=n(234),mt=n(235),gt=n(236),yt=n(237),vt=n(238);function bt(e){return{Field:function(t){var n=Object(D.A)(e.getType());n&&Object(E.isIntrospectionType)(n)&&e.reportError(new y.a('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(t.name.value,'".'),t))}}}var Et=n(44);function xt(e){var t;e||Object(f.a)(0,"Received null or undefined error.");var n=null!==(t=e.message)&&void 0!==t?t:"An unknown error occurred.",r=e.locations,i=e.path,o=e.extensions;return o?{message:n,locations:r,path:i,extensions:o}:{message:n,locations:r,path:i}}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wt(e){var t=function(e){for(var t=1;t0?n.reverse().join("\n"):void 0}(e);if(void 0!==n)return Object(Nt.a)("\n"+n)}}function Vt(e,t){null!=e&&e.kind===b.a.DOCUMENT||Object(f.a)(0,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&Object(s.a)(e);var n=Pt({description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(var r=0,i=n.types;r2&&void 0!==arguments[2]?arguments[2]:"";return 0===t.length?"":t.every((function(e){return!e.description}))?"("+t.map(cn).join(", ")+")":"(\n"+t.map((function(t,r){return pn(e,t," "+n,!r)+" "+n+cn(t)})).join("\n")+"\n"+n+")"}function cn(e){var t=Object($t.a)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=" = ".concat(Object(A.print)(t))),n}function ln(e){if(!e.isDeprecated)return"";var t=e.deprecationReason,n=Object($t.a)(t,ye.e);return n&&t!==x.a?" @deprecated(reason: "+Object(A.print)(n)+")":" @deprecated"}function pn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=t.description;if(null==i)return"";if(!0===(null==e?void 0:e.commentDescriptions))return fn(i,n,r);var o=i.length>70,a=Object(Nt.c)(i,"",o),s=n&&!r?"\n"+n:n;return s+a.replace(/\n/g,"\n"+n)+"\n"}function fn(e,t,n){return(t&&!n?"\n":"")+e.split("\n").map((function(e){return t+(""!==e?"# "+e:"#")})).join("\n")+"\n"}var dn=n(210),hn=n(84),mn=n(113);function gn(e){return{kind:"Document",definitions:Object(mn.a)(e,(function(e){return e.definitions}))}}function yn(e){var t,n=[],r=Object.create(null);Object(we.c)(e,{OperationDefinition:function(e){t=vn(e),n.push(e)},FragmentDefinition:function(e){t=e.name.value},FragmentSpread:function(e){var n=e.name.value,i=r[t];void 0===i&&(i=r[t]=Object.create(null)),i[n]=!0}});for(var i=Object.create(null),o=function(t){var o=n[t],a=vn(o),s=Object.create(null);!function e(t,n,r){var i=n[r];if(i)for(var o=0,a=Object.keys(i);o0&&(n="\n"+n);var i=n[n.length-1];return('"'===i&&'\\"""'!==n.slice(-4)||"\\"===i)&&(n+="\n"),'"""'+n+'"""'}var xn=n(61),Dn=n(211);function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:j;return L(e,t,n)}function j(e,t,n){var r="Invalid value "+Object(l.a)(t);throw e.length>0&&(r+=' at "value'.concat(A(e),'"')),n.message=r+": "+n.message,n}function L(e,t,n,r){if(Object(D.L)(t))return null!=e?L(e,t.ofType,n,r):void n(g(r),e,new y.a('Expected non-nullable type "'.concat(Object(l.a)(t),'" not to be null.')));if(null==e)return null;if(Object(D.J)(t)){var i=t.ofType;return Object(h.a)(e)?Object(c.a)(e,(function(e,t){var o=m(r,t,void 0);return L(e,i,n,o)})):[L(e,i,n,r)]}if(Object(D.F)(t)){if(!Object(d.a)(e))return void n(g(r),e,new y.a('Expected type "'.concat(t.name,'" to be an object.')));for(var o={},a=t.getFields(),s=0,u=Object(_.a)(a);s0&&(i+=' at "'.concat(s).concat(A(e),'"')),r(new y.a(i+"; "+n.message,a,void 0,void 0,void 0,n.originalError))}))},a=0;a=o)throw new y.a("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:a}}catch(e){i.push(e)}return{errors:i}}function R(e,t,n){for(var r,i={},o=null!==(r=t.arguments)&&void 0!==r?r:[],a=Object(k.a)(o,(function(e){return e.name.value})),s=0,u=e.args;s0)return{errors:d};try{t=Object(a.a)(r)}catch(e){return{errors:[e]}}var h=Object(s.c)(n,t);return h.length>0?{errors:h}:z({schema:n,document:t,rootValue:i,contextValue:o,variableValues:c,operationName:l,fieldResolver:p,typeResolver:f})}var ge=n(54),ye=n(13),ve=n(24),be=n(84),Ee=n(96),xe=n(137),De=n(85),Ce=n(5),we=n(26),Se=n(9),ke=n(46),Ae=n(25);function Te(e,t,n){var r,i,o,a,s,u,c=e[Ae.a].call(e);function l(e){return e.done?e:_e(e.value,t).then(Oe,i)}if("function"==typeof c.return&&(r=c.return,i=function(e){var t=function(){return Promise.reject(e)};return r.call(c).then(t,t)}),n){var p=n;o=function(e){return _e(e,p).then(Oe,i)}}return a={next:function(){return c.next().then(l,o)},return:function(){return r?r.call(c).then(l,o):Promise.resolve({value:void 0,done:!0})},throw:function(e){return"function"==typeof c.throw?c.throw(e).then(l,o):Promise.reject(e).catch(i)}},s=Ae.a,u=function(){return this},s in a?Object.defineProperty(a,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[s]=u,a}function _e(e,t){return new Promise((function(n){return n(t(e))}))}function Oe(e){return{value:e,done:!1}}function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t,n,r,i,o,a,s){return 1===arguments.length?Me(e):Me({schema:e,document:t,rootValue:n,contextValue:r,variableValues:i,operationName:o,fieldResolver:a,subscribeFieldResolver:s})}function Ie(e){if(e instanceof y.a)return{errors:[e]};throw e}function Me(e){var t=e.schema,n=e.document,r=e.rootValue,i=e.contextValue,o=e.variableValues,a=e.operationName,s=e.fieldResolver,u=e.subscribeFieldResolver,c=je(t,n,r,i,o,a,u),l=function(e){return z({schema:t,document:n,rootValue:e,contextValue:i,variableValues:o,operationName:a,fieldResolver:s})};return c.then((function(e){return Le(e)?Te(e,l,Ie):e}))}function je(e,t,n,r,i,o,a){H(e,t,i);try{var s,u=W(e,t,n,r,i,o,a);if(Array.isArray(u))return Promise.resolve({errors:u});var c=w(e,u.operation),p=K(u,c,u.operation.selectionSet,Object.create(null),Object.create(null)),f=Object.keys(p)[0],d=p[f],h=d[0].name.value,b=fe(e,c,h);if(!b)throw new y.a('The subscription field "'.concat(h,'" is not defined.'),d);var E=null!==(s=b.subscribe)&&void 0!==s?s:u.fieldResolver,x=m(void 0,f,c.name),D=$(u,b,d,c,x),C=X(u,b,d,E,n,D);return Promise.resolve(C).then((function(e){if(e instanceof Error)return{errors:[Object(v.a)(e,d,g(x))]};if(Le(e))return e;throw new Error("Subscription field must return Async Iterable. "+"Received: ".concat(Object(l.a)(e),"."))}))}catch(e){return e instanceof y.a?Promise.resolve({errors:[e]}):Promise.reject(e)}}function Le(e){return null!=e&&"object"===Fe(e)&&"function"==typeof e[Ae.a]}var Pe=n(146),Re=n(138),Be=n(219),Ue=n(226),ze=n(223),Ve=n(142),qe=n(140),He=n(228),We=n(139),Ge=n(221),Ke=n(231),Je=n(233),Qe=n(229),Ye=n(234),$e=n(237),Xe=n(230),Ze=n(144),et=n(225),tt=n(222),nt=n(143),rt=n(141),it=n(227),ot=n(145),at=n(220),st=n(232),ut=n(235),ct=n(224),lt=n(236),pt=n(238),ft=n(239),dt=n(240),ht=n(241),mt=n(242),gt=n(243),yt=n(244),vt=n(245);function bt(e){return{Field:function(t){var n=Object(D.A)(e.getType());n&&Object(E.isIntrospectionType)(n)&&e.reportError(new y.a('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(t.name.value,'".'),t))}}}var Et=n(45);function xt(e){var t;e||Object(f.a)(0,"Received null or undefined error.");var n=null!==(t=e.message)&&void 0!==t?t:"An unknown error occurred.",r=e.locations,i=e.path,o=e.extensions;return o?{message:n,locations:r,path:i,extensions:o}:{message:n,locations:r,path:i}}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wt(e){var t=function(e){for(var t=1;t0?n.reverse().join("\n"):void 0}(e);if(void 0!==n)return Object(Nt.a)("\n"+n)}}function Vt(e,t){null!=e&&e.kind===b.a.DOCUMENT||Object(f.a)(0,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&Object(s.a)(e);var n=Pt({description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(var r=0,i=n.types;r2&&void 0!==arguments[2]?arguments[2]:"";return 0===t.length?"":t.every((function(e){return!e.description}))?"("+t.map(cn).join(", ")+")":"(\n"+t.map((function(t,r){return pn(e,t," "+n,!r)+" "+n+cn(t)})).join("\n")+"\n"+n+")"}function cn(e){var t=Object($t.a)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=" = ".concat(Object(T.print)(t))),n}function ln(e){if(!e.isDeprecated)return"";var t=e.deprecationReason,n=Object($t.a)(t,ye.e);return n&&t!==x.a?" @deprecated(reason: "+Object(T.print)(n)+")":" @deprecated"}function pn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=t.description;if(null==i)return"";if(!0===(null==e?void 0:e.commentDescriptions))return fn(i,n,r);var o=i.length>70,a=Object(Nt.c)(i,"",o),s=n&&!r?"\n"+n:n;return s+a.replace(/\n/g,"\n"+n)+"\n"}function fn(e,t,n){return(t&&!n?"\n":"")+e.split("\n").map((function(e){return t+(""!==e?"# "+e:"#")})).join("\n")+"\n"}var dn=n(217),hn=n(86),mn=n(116);function gn(e){return{kind:"Document",definitions:Object(mn.a)(e,(function(e){return e.definitions}))}}function yn(e){var t,n=[],r=Object.create(null);Object(we.c)(e,{OperationDefinition:function(e){t=vn(e),n.push(e)},FragmentDefinition:function(e){t=e.name.value},FragmentSpread:function(e){var n=e.name.value,i=r[t];void 0===i&&(i=r[t]=Object.create(null)),i[n]=!0}});for(var i=Object.create(null),o=function(t){var o=n[t],a=vn(o),s=Object.create(null);!function e(t,n,r){var i=n[r];if(i)for(var o=0,a=Object.keys(i);o0&&(n="\n"+n);var i=n[n.length-1];return('"'===i&&'\\"""'!==n.slice(-4)||"\\"===i)&&(n+="\n"),'"""'+n+'"""'}var xn=n(63),Dn=n(218);function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t=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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(170);var p=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(104);t.lib={},t.lib.mdurl=n(105),t.lib.ucmicro=n(171),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.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},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return i(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(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},t.isMdAsciiPunct=function(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}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(201);var p=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(104);t.lib={},t.lib.mdurl=n(105),t.lib.ucmicro=n(171),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.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},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return i(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(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},t.isMdAsciiPunct=function(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}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(47),i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();Object(r.a)(i);var o=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function a(e){return null!=e&&"string"==typeof e.kind}Object(r.a)(o)},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));var r="function"==typeof Symbol?Symbol.iterator:"@@iterator",i="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator",o="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),i=n(24),o={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},a=Object.freeze({});function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=void 0,u=Array.isArray(e),l=[e],p=-1,f=[],d=void 0,h=void 0,m=void 0,g=[],y=[],v=e;do{var b=++p===l.length,E=b&&0!==f.length;if(b){if(h=0===y.length?void 0:g[g.length-1],d=m,m=y.pop(),E){if(u)d=d.slice();else{for(var x={},D=0,C=Object.keys(d);D1&&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]:u;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;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function B(e,t){return e===t}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?w:n,i=t.mapStateToPropsFactories,o=void 0===i?N:i,a=t.mapDispatchToPropsFactories,s=void 0===a?F:a,u=t.mergePropsFactories,c=void 0===u?M:u,l=t.selectorFactory,d=void 0===l?P:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,h=a.areStatesEqual,m=void 0===h?B:h,g=a.areOwnPropsEqual,y=void 0===g?k:g,v=a.areStatePropsEqual,b=void 0===v?k:v,E=a.areMergedPropsEqual,x=void 0===E?k:E,D=Object(f.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=R(e,o,"mapStateToProps"),w=R(t,s,"mapDispatchToProps"),S=R(n,c,"mergeProps");return r(d,Object(p.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:C,initMapDispatchToProps:w,initMergeProps:S,pure:l,areStatesEqual:m,areOwnPropsEqual:y,areStatePropsEqual:b,areMergedPropsEqual:x},D))}}var z=U();function V(){return Object(r.useContext)(o)}function q(e){void 0===e&&(e=o);var t=e===o?V:function(){return Object(r.useContext)(e)};return function(){return t().store}}var H=q();function W(e){void 0===e&&(e=o);var t=e===o?H:q(e);return function(){return t().dispatch}}var G=W(),K=function(e,t){return e===t};function J(e){void 0===e&&(e=o);var t=e===o?V:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=K);var i=t();return function(e,t,n,i){var o,a=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new c(n,i)}),[n,i]),u=Object(r.useRef)(),l=Object(r.useRef)(),p=Object(r.useRef)();try{o=e!==l.current||u.current?e(n.getState()):p.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return g((function(){l.current=e,p.current=o,u.current=void 0})),g((function(){function e(){try{var e=l.current(n.getState());if(t(e,p.current))return;p.current=e}catch(e){u.current=e}a({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(e,n,i.store,i.subscription)}}var Q,Y=J(),$=n(59);Q=$.unstable_batchedUpdates,a=Q},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return"object"==r(e)&&null!==e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(42);function o(e){return e.get("selectedWorkspace")}t.getSessionsState=r.createSelector([function(e){return e.getIn(["workspaces",o(e)])||i.makeWorkspace("")}],(function(e){return e.get("sessions")})),t.getSelectedSession=r.createSelector([t.getSessionsState],(function(e){var n=t.getSelectedSessionId(e);return e.getIn(["sessions",n])})),t.getSelectedSessionId=function(e){return e.selectedSessionId&&""!==e.selectedSessionId?e.selectedSessionId:e.sessions.first().id},t.getSelectedSessionIdFromRoot=r.createSelector([t.getSelectedSession],(function(e){return e.get("id")}));var a=function(e){return r.createSelector([t.getSelectedSession],(function(t){return t.get(e)}))};function s(e){return e.getIn(["settingsString"])}function u(e){try{return JSON.parse(e)}catch(e){}return{}}function c(e){var t=e.variables;try{return JSON.parse(t)}catch(e){}return{}}t.getScrollTop=a("scrollTop"),t.getEndpoint=a("endpoint"),t.getQuery=a("query"),t.getFile=a("file"),t.getVariables=a("variables"),t.getResponses=a("responses"),t.getOperationName=a("operationName"),t.getQueryRunning=a("queryRunning"),t.getSubscriptionActive=a("subscriptionActive"),t.getOperations=a("operations"),t.getVariableToType=a("variableToType"),t.getQueryTypes=a("queryTypes"),t.getDate=a("date"),t.getHasMutation=a("hasMutation"),t.getHasSubscription=a("hasSubscription"),t.getHasQuery=a("hasQuery"),t.getIsFile=a("isFile"),t.getStarred=a("starred"),t.getName=a("name"),t.getFilePath=a("filePath"),t.getSelectedUserToken=a("selectedUserToken"),t.getHeaders=a("headers"),t.getHasChanged=a("hasChanged"),t.getAbsolutePath=a("absolutePath"),t.getIsSettingsTab=a("isSettingsTab"),t.getIsConfigTab=a("isConfigTab"),t.getCurrentQueryStartTime=a("currentQueryStartTime"),t.getCurrentQueryEndTime=a("currentQueryEndTime"),t.getIsReloadingSchema=a("isReloadingSchema"),t.getIsPollingSchema=r.createSelector([t.getEndpoint,s],(function(e,t){var n=JSON.parse(t);try{return n["schema.polling.enable"]&&e.match("/"+n["schema.polling.endpointFilter"])&&!0}catch(e){return!1}})),t.getResponseExtensions=a("responseExtensions"),t.getQueryVariablesActive=a("queryVariablesActive"),t.getEndpointUnreachable=a("endpointUnreachable"),t.getEditorFlex=a("editorFlex"),t.getVariableEditorOpen=a("variableEditorOpen"),t.getVariableEditorHeight=a("variableEditorHeight"),t.getResponseTracingOpen=a("responseTracingOpen"),t.getResponseTracingHeight=a("responseTracingHeight"),t.getDocExplorerWidth=a("docExplorerWidth"),t.getNextQueryStartTime=a("nextQueryStartTime"),t.getTracingSupported=a("tracingSupported"),t.getTabWidth=r.createSelector([s],(function(e){try{return JSON.parse(e)["prettier.tabWidth"]||2}catch(e){}return 2})),t.getUseTabs=r.createSelector([s],(function(e){try{return JSON.parse(e)["prettier.useTabs"]||!1}catch(e){}return!1})),t.getHeadersCount=r.createSelector([t.getHeaders],(function(e){try{var t=JSON.parse(e);return Object.keys(t).length}catch(e){}return 0})),t.getParsedHeaders=r.createSelector([t.getSelectedSession],u),t.getParsedHeadersFromSession=u,t.getParsedVariables=r.createSelector([t.getSelectedSession],c),t.getParsedVariablesFromSession=c,t.getTracing=r.createSelector([t.getResponseExtensions],(function(e){return e&&e.tracing})),t.getSessionsArray=r.createSelector([t.getSessionsState],(function(e){return e.get("sessions").toArray().map((function(e){return e[1]}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(4),i=n(17),o=n(1),a=n(0);function s(e,t){var n;return t.kind===o.a.LIST_TYPE?(n=s(e,t.type))&&Object(a.d)(n):t.kind===o.a.NON_NULL_TYPE?(n=s(e,t.type))&&Object(a.e)(n):t.kind===o.a.NAMED_TYPE?e.getType(t.name.value):void Object(i.a)(0,"Unexpected type node: "+Object(r.a)(t))}},function(e,t,n){"use strict";n.r(t),n.d(t,"version",(function(){return rr})),n.d(t,"Collection",(function(){return v})),n.d(t,"Iterable",(function(){return or})),n.d(t,"Seq",(function(){return R})),n.d(t,"Map",(function(){return Et})),n.d(t,"OrderedMap",(function(){return rn})),n.d(t,"List",(function(){return qt})),n.d(t,"Stack",(function(){return cn})),n.d(t,"Set",(function(){return bn})),n.d(t,"OrderedSet",(function(){return Vn})),n.d(t,"Record",(function(){return Kn})),n.d(t,"Range",(function(){return kn})),n.d(t,"Repeat",(function(){return er})),n.d(t,"is",(function(){return Z})),n.d(t,"fromJS",(function(){return tr})),n.d(t,"hash",(function(){return re})),n.d(t,"isImmutable",(function(){return w})),n.d(t,"isCollection",(function(){return h})),n.d(t,"isKeyed",(function(){return m})),n.d(t,"isIndexed",(function(){return g})),n.d(t,"isAssociative",(function(){return y})),n.d(t,"isOrdered",(function(){return k})),n.d(t,"isValueObject",(function(){return X})),n.d(t,"get",(function(){return We})),n.d(t,"getIn",(function(){return An})),n.d(t,"has",(function(){return He})),n.d(t,"hasIn",(function(){return _n})),n.d(t,"merge",(function(){return at})),n.d(t,"mergeDeep",(function(){return ut})),n.d(t,"mergeWith",(function(){return st})),n.d(t,"mergeDeepWith",(function(){return ct})),n.d(t,"remove",(function(){return Ke})),n.d(t,"removeIn",(function(){return Xe})),n.d(t,"set",(function(){return Je})),n.d(t,"setIn",(function(){return Ye})),n.d(t,"update",(function(){return et})),n.d(t,"updateIn",(function(){return Qe}));var r={};function i(e){e&&(e.value=!0)}function o(){}function a(e){return void 0===e.size&&(e.size=e.__iterate(u)),e.size}function s(e,t){if("number"!=typeof t){var n=t>>>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 Boolean(e&&e["@@__IMMUTABLE_ITERABLE__@@"])}function m(e){return Boolean(e&&e["@@__IMMUTABLE_KEYED__@@"])}function g(e){return Boolean(e&&e["@@__IMMUTABLE_INDEXED__@@"])}function y(e){return m(e)||g(e)}var v=function(e){return h(e)?e:R(e)},b=function(e){function t(e){return m(e)?e:B(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v),E=function(e){function t(e){return g(e)?e:U(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v),x=function(e){function t(e){return h(e)&&!y(e)?e:z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v);v.Keyed=b,v.Indexed=E,v.Set=x;function D(e){return Boolean(e&&e["@@__IMMUTABLE_SEQ__@@"])}function C(e){return Boolean(e&&e["@@__IMMUTABLE_RECORD__@@"])}function w(e){return h(e)||C(e)}var S="@@__IMMUTABLE_ORDERED__@@";function k(e){return Boolean(e&&e[S])}var A="function"==typeof Symbol&&Symbol.iterator,T=A||"@@iterator",_=function(e){this.next=e};function O(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 F(){return{value:void 0,done:!0}}function N(e){return!!j(e)}function I(e){return e&&"function"==typeof e.next}function M(e){var t=j(e);return t&&t.call(e)}function j(e){var t=e&&(A&&e[A]||e["@@iterator"]);if("function"==typeof t)return t}_.prototype.toString=function(){return"[Iterator]"},_.KEYS=0,_.VALUES=1,_.ENTRIES=2,_.prototype.inspect=_.prototype.toSource=function(){return this.toString()},_.prototype[T]=function(){return this};var L=Object.prototype.hasOwnProperty;function P(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var R=function(e){function t(e){return null==e?G():w(e)?e.toSeq():function(e){var t=Q(e);if(t)return t;if("object"==typeof e)return new q(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new _((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return O(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(v),B=function(e){function t(e){return null==e?G().toKeyedSeq():h(e)?m(e)?e.toSeq():e.fromEntrySeq():C(e)?e.toSeq():K(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(R),U=function(e){function t(e){return null==e?G():h(e)?m(e)?e.entrySeq():e.toIndexedSeq():C(e)?e.toSeq().entrySeq():J(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(R),z=function(e){function t(e){return(h(e)&&!y(e)?e:U(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(R);R.isSeq=D,R.Keyed=B,R.Set=z,R.Indexed=U,R.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var V=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[s(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new _((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return O(e,o,n[o])}))},t}(U),q=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return L.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new _((function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return O(e,a,n[a])}))},t}(B);q.prototype[S]=!0;var H,W=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=M(this._collection),r=0;if(I(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=M(this._collection);if(!I(n))return new _(F);var r=0;return new _((function(){var t=n.next();return t.done?t:O(e,r++,t.value)}))},t}(U);function G(){return H||(H=new V([]))}function K(e){var t=Array.isArray(e)?new V(e):N(e)?new W(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new q(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function J(e){var t=Q(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Q(e){return P(e)?new V(e):N(e)?new W(e):void 0}function Y(e){return Boolean(e&&e["@@__IMMUTABLE_MAP__@@"])}function $(e){return Y(e)&&k(e)}function X(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Z(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!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(X(e)&&X(t)&&e.equals(t))}var ee="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function te(e){return e>>>1&1073741824|3221225471&e}var ne=Object.prototype.valueOf;function re(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return te(t)}(e);case"string":return e.length>pe?function(e){var t=he[e];void 0===t&&(t=ie(e),de===fe&&(de=0,he={}),de++,he[e]=t);return t}(e):ie(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?te(e.hashCode(e)):(e.valueOf!==ne&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(ue&&void 0!==(t=se.get(e)))return t;if(void 0!==(t=e[le]))return t;if(!ae){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[le]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++ce,1073741824&ce&&(ce=0);if(ue)se.set(e,t);else{if(void 0!==oe&&!1===oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ae)Object.defineProperty(e,le,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[le]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[le]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return ie(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function ie(e){for(var t=0,n=0;n=0&&(d.get=function(t,n){return(t=s(this,t))>=0&&tu)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:O(t,s-1,0===t?void 0:e.value[1],e)}))},d}function we(e,t,n,r){var i=Me(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(2,o),u=!0,c=0;return new _((function(){var e,o,l;do{if((e=s.next()).done)return r||1===i?e:O(i,c++,0===i?void 0: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 2===i?e:O(i,o,l,e)}))},i}function Se(e,t){var n=m(e),r=[e].concat(t).map((function(e){return h(e)?n&&(e=b(e)):e=n?K(e):J(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&&m(i)||g(e)&&g(i))return i}var o=new V(r);return n?o=o.toKeyedSeq():g(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),o}function ke(e,t,n){var r=Me(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function e(u,c){u.__iterate((function(o,u){return(!t||c0}function Oe(e,t,n,r){var i=Me(e),o=new V(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.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map((function(e){return e=v(e),M(i?e.reverse():e)})),a=0,s=!1;return new _((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?{value:void 0,done:!0}:O(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function Fe(e,t){return e===t?e:D(e)?t:e.constructor(t)}function Ne(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ie(e){return m(e)?b:g(e)?E:x}function Me(e){return Object.create((m(e)?B:g(e)?U:z).prototype)}function je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):R.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];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ot(this,t,e)}function ot(e,t,n){for(var i=[],o=0;o0;)t[n]=arguments[n+1];return pt(e,t)}function st(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return pt(t,n,e)}function ut(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return lt(e,t)}function ct(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return lt(t,n,e)}function lt(e,t,n){return pt(e,t,function(e){return function t(n,r,i){return Ve(n)&&Ve(r)?pt(n,[r],t):e?e(n,r,i):r}}(n))}function pt(e,t,n){if(!Ve(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(w(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?E:b,a=r?function(t){i===e&&(i=Ge(i)),i.push(t)}:function(t,r){var o=L.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=Ge(i)),i[r]=a)},s=0;s0;)t[n]=arguments[n+1];return lt(this,t,e)}function ht(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return pt(e,t)}))}function mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return lt(e,t)}))}function gt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function yt(){return this.__ownerID?this:this.__ensureOwner(new o)}function vt(){return this.__ensureOwner()}function bt(){return this.__altered}ge.prototype.cacheResult=me.prototype.cacheResult=ye.prototype.cacheResult=ve.prototype.cacheResult=je;var Et=function(e){function t(t){return null==t?Nt():Y(t)&&!k(t)?t:Nt().withMutations((function(n){var r=e(t);Be(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 Nt().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 It(this,e,t)},t.prototype.remove=function(e){return It(this,e,r)},t.prototype.deleteAll=function(e){var t=v(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):Nt()},t.prototype.sort=function(e){return rn(Ae(this,e))},t.prototype.sortBy=function(e,t){return rn(Ae(this,t,e))},t.prototype.map=function(e,t){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,e.call(t,r,i,n))}))}))},t.prototype.__iterator=function(e,t){return new Tt(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?Ft(this.size,this._root,e,this.__hash):0===this.size?Nt():(this.__ownerID=e,this.__altered=!1,this)},t}(b);Et.isMap=Y;var xt=Et.prototype;xt["@@__IMMUTABLE_MAP__@@"]=!0,xt.delete=xt.remove,xt.removeAll=xt.deleteAll,xt.setIn=$e,xt.removeIn=xt.deleteIn=Ze,xt.update=tt,xt.updateIn=nt,xt.merge=xt.concat=rt,xt.mergeWith=it,xt.mergeDeep=ft,xt.mergeDeepWith=dt,xt.mergeIn=ht,xt.mergeDeepIn=mt,xt.withMutations=gt,xt.wasAltered=bt,xt.asImmutable=vt,xt["@@transducer/init"]=xt.asMutable=yt,xt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},xt["@@transducer/result"]=function(e){return e.asImmutable()};var Dt=function(e,t){this.ownerID=e,this.entries=t};Dt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Bt)return function(e,t,n,r){e||(e=new o);for(var i=new kt(e,re(n),[n,r]),a=0;a>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Pt(o&i-1)].get(e+5,t,n,r)},Ct.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=1<=Ut)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new wt(e,o+1,a)}(e,d,l,u,m);if(p&&!m&&2===d.length&&jt(d[1^f]))return d[1^f];if(p&&m&&1===d.length&&jt(m))return m;var g=e&&e===this.ownerID,y=p?m?l:l^c:l|c,v=p?m?Rt(d,f,m,g):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},wt.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=o===r,l=this.nodes,p=l[u];if(c&&!p)return this;var f=Mt(p,e,t+5,n,i,o,a,s);if(f===p)return this;var d=this.count;if(p){if(!f&&--d>>n),s=31&(0===n?r:r>>>n),u=a===s?[Lt(e,t,n+5,r,i)]:(o=new kt(t,r,i),a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Rt(e,t,n,r){var i=r?e:Pe(e);return i[t]=n,i}var Bt=8,Ut=16,zt=8;function Vt(e){return Boolean(e&&e["@@__IMMUTABLE_LIST__@@"])}var qt=function(e){function t(t){var n=Yt();if(null==t)return n;if(Vt(t))return t;var r=e(t),i=r.size;return 0===i?n:(Be(i),i>0&&i<32?Qt(0,i,5,null,new Wt(r.toArray())):n.withMutations((function(e){e.setSize(i),r.forEach((function(t,n){return e.set(n,t)}))})))}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("List [","]")},t.prototype.get=function(e,t){if((e=s(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?en(e,t).set(0,n):en(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=tn(e._capacity)?r=$t(r,e.__ownerID,0,t,n,o):i=$t(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Qt(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Yt()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){en(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new Wt([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=Xt(this,e);if(!o)for(var u=0;u>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=Xt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var Gt,Kt={};function Jt(e,t){var n=e._origin,r=e._capacity,i=tn(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,u){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,u=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(u===c)return Kt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,i,o){var s,u=e&&e.array,c=o>n?0:n-o>>i,l=1+(r-o>>i);l>32&&(l=32);return function(){for(;;){if(s){var e=s();if(e!==Kt)return e;s=null}if(c===l)return Kt;var n=t?--l:c++;s=a(u&&u[n],i-5,o+(n<>>n&31,c=e&&u0){var l=e&&e.array[u],p=$t(l,t,n-5,r,o,a);return p===l?e:((s=Xt(e,t)).array[u]=p,s)}return c&&e.array[u]===o?e:(a&&i(a),s=Xt(e,t),void 0===o&&u===s.array.length-1?s.array.pop():s.array[u]=o,s)}function Xt(e,t){return t&&e&&t===e.ownerID?e:new Wt(e?e.array.slice():[],t)}function Zt(e,t){if(t>=tn(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function en(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 Wt(l&&l.array.length?[void 0,l]:[],r),p+=1<<(c+=5);p&&(s+=p,i+=p,u+=p,a+=p);for(var f=tn(a),d=tn(u);d>=1<f?new Wt([],r):h;if(h&&d>f&&s5;y-=5){var v=f>>>y&31;g=g.array[v]=Xt(g.array[v],r)}g.array[f>>>5&31]=h}if(u=d)s-=d,u-=d,c=5,l=null,m=m&&m.removeBefore(r,0,s);else if(s>i||d>>c&31;if(b!==d>>>c&31)break;b&&(p+=(1<i&&(l=l.removeBefore(r,c,s-p)),l&&d>>5<<5}var nn,rn=function(e){function t(e){return null==e?an():$(e)?e:an().withMutations((function(t){var n=b(e);Be(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):an()},t.prototype.set=function(e,t){return sn(this,e,t)},t.prototype.remove=function(e){return sn(this,e,r)},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?on(t,n,e,this.__hash):0===this.size?an():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Et);function on(e,t,n,r){var i=Object.create(rn.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function an(){return nn||(nn=on(Nt(),Yt()))}function sn(e,t,n){var i,o,a=e._map,s=e._list,u=a.get(t),c=void 0!==u;if(n===r){if(!c)return e;s.size>=32&&s.size>=2*a.size?(i=(o=s.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(i.__ownerID=o.__ownerID=e.__ownerID)):(i=a.remove(t),o=u===s.size-1?s.pop():s.set(u,void 0))}else if(c){if(n===s.get(u)[1])return e;i=a,o=s.set(u,[t,n])}else i=a.set(t,s.size),o=s.set(s.size,[t,n]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=o,e.__hash=void 0,e):on(i,o)}rn.isOrderedMap=$,rn.prototype[S]=!0,rn.prototype.delete=rn.prototype.remove;function un(e){return Boolean(e&&e["@@__IMMUTABLE_STACK__@@"])}var cn=function(e){function t(e){return null==e?dn():un(e)?e:dn().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):fn(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&un(t))return t;Be(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):fn(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):dn()},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):fn(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?fn(this.size,this._head,e,this.__hash):0===this.size?dn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new V(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++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new V(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new _((function(){if(r){var t=r.value;return r=r.next,O(e,n++,t)}return{value:void 0,done:!0}}))},t}(E);cn.isStack=un;var ln,pn=cn.prototype;function fn(e,t,n,r){var i=Object.create(pn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function dn(){return ln||(ln=fn(0))}pn["@@__IMMUTABLE_STACK__@@"]=!0,pn.shift=pn.pop,pn.unshift=pn.push,pn.unshiftAll=pn.pushAll,pn.withMutations=gt,pn.wasAltered=bt,pn.asImmutable=vt,pn["@@transducer/init"]=pn.asMutable=yt,pn["@@transducer/step"]=function(e,t){return e.unshift(t)},pn["@@transducer/result"]=function(e){return e.asImmutable()};function hn(e){return Boolean(e&&e["@@__IMMUTABLE_SET__@@"])}function mn(e){return hn(e)&&k(e)}function gn(e,t){if(e===t)return!0;if(!h(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||m(e)!==m(t)||g(e)!==g(t)||k(e)!==k(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!y(e);if(k(e)){var i=e.entries();return t.every((function(e,t){var r=i.next().value;return r&&Z(r[1],e)&&(n||Z(r[0],t))}))&&i.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var s=!0,u=t.__iterate((function(t,i){if(n?!e.has(t):o?!Z(t,e.get(i,r)):!Z(e.get(i,r),t))return s=!1,!1}));return s&&e.size===u}function yn(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 vn(e){if(!e||"object"!=typeof e)return e;if(!h(e)){if(!Ve(e))return e;e=R(e)}if(m(e)){var t={};return e.__iterate((function(e,n){t[n]=vn(e)})),t}var n=[];return e.__iterate((function(e){n.push(vn(e))})),n}var bn=function(e){function t(t){return null==t?wn():hn(t)&&!k(t)?t:wn().withMutations((function(n){var r=e(t);Be(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(b(e).keySeq())},t.intersect=function(e){return(e=v(e).toArray()).length?xn.intersect.apply(t(e.pop()),e):wn()},t.union=function(e){return(e=v(e).toArray()).length?xn.union.apply(t(e.pop()),e):wn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Dn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Dn(this,this._map.remove(e))},t.prototype.clear=function(){return Dn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach((function(o){var a=e.call(t,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(e){r.forEach((function(t){return e.remove(t)})),i.forEach((function(t){return e.add(t)}))}))},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var r=0;r=0&&t=0&&n>>-15,461845907),t=ee(t<<13|t>>>-13,5),t=ee((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=te((t=ee(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+zn(re(e),re(t))|0}:function(e,t){r=r+zn(re(e),re(t))|0}:t?function(e){r=31*r+re(e)|0}:function(e){r=r+re(e)|0}),r)}(this))}});var Fn=v.prototype;Fn["@@__IMMUTABLE_ITERABLE__@@"]=!0,Fn[T]=Fn.values,Fn.toJSON=Fn.toArray,Fn.__toStringMapper=qe,Fn.inspect=Fn.toSource=function(){return this.toString()},Fn.chain=Fn.flatMap,Fn.contains=Fn.includes,yn(b,{flip:function(){return Fe(this,be(this))},mapEntries:function(e,t){var n=this,r=0;return Fe(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Fe(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Nn=b.prototype;Nn["@@__IMMUTABLE_KEYED__@@"]=!0,Nn[T]=Fn.entries,Nn.toJSON=On,Nn.__toStringMapper=function(e,t){return qe(t)+": "+qe(e)},yn(E,{toKeyedSeq:function(){return new me(this,!1)},filter:function(e,t){return Fe(this,De(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Fe(this,xe(this,!1))},slice:function(e,t){return Fe(this,Ce(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=l(e,e<0?this.count():this.size);var r=this.slice(0,e);return Fe(this,1===n?r:r.concat(Pe(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return Fe(this,ke(this,e,!1))},get:function(e,t){return(e=s(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.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||et?-1:0}function zn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}In["@@__IMMUTABLE_INDEXED__@@"]=!0,In[S]=!0,yn(x,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),x.prototype.has=Fn.includes,x.prototype.contains=x.prototype.includes,yn(B,b.prototype),yn(U,E.prototype),yn(z,x.prototype);var Vn=function(e){function t(e){return null==e?Gn():mn(e)?e:Gn().withMutations((function(t){var n=x(e);Be(n.size),n.forEach((function(e){return t.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(b(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(bn);Vn.isOrderedSet=mn;var qn,Hn=Vn.prototype;function Wn(e,t){var n=Object.create(Hn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Gn(){return qn||(qn=Wn(an()))}Hn[S]=!0,Hn.zip=In.zip,Hn.zipWith=In.zipWith,Hn.__empty=Gn,Hn.__make=Wn;var Kn=function(e,t){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(e),u=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var c=0;c2?[]:void 0,{"":e})}function nr(e,t){return m(t)?t.toMap():t.toList()}var rr="4.0.0-rc.11",ir={version:rr,Collection:v,Iterable:v,Seq:R,Map:Et,OrderedMap:rn,List:qt,Stack:cn,Set:bn,OrderedSet:Vn,Record:Kn,Range:kn,Repeat:er,is:Z,fromJS:tr,hash:re,isImmutable:w,isCollection:h,isKeyed:m,isIndexed:g,isAssociative:y,isOrdered:k,isValueObject:X,isSeq:D,isList:Vt,isMap:Y,isOrderedMap:$,isStack:un,isSet:hn,isOrderedSet:mn,isRecord:C,get:We,getIn:An,has:He,hasIn:_n,merge:at,mergeDeep:ut,mergeWith:st,mergeDeepWith:ct,remove:Ke,removeIn:Xe,set:Je,setIn:Ye,update:et,updateIn:Qe},or=v;t.default=ir},function(e,t,n){"use strict";var r=n(93),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";function r(e,t){return e.reduce((function(e,n){return e[t(n)]=n,e}),Object.create(null))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;tt)){for(var c=this._rows,l=0;l<=u;l++)c[0][l]=l;for(var p=1;p<=s;p++){for(var f=c[(p-1)%3],d=c[p%3],h=d[0]=p,m=1;m<=u;m++){var g=r[p-1]===i[m-1]?0:1,y=Math.min(f[m]+1,d[m-1]+1,f[m-1]+g);if(p>1&&m>1&&r[p-1]===i[m-2]&&r[p-2]===i[m-1]){var v=c[(p-2)%3][m-2];y=Math.min(y,v+1)}yt)return}var b=c[s%3][u];return b<=t?b:void 0}},e}();function o(e){for(var t=e.length,n=new Array(t),r=0;r1?n-1:0),i=1;i1?t-1:0),r=1;r2?n-2:0),a=2;a0&&a(t[0]);)t.shift();for(;t.length>0&&a(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=null,n=1;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,u="";return!s||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return g})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return v}));var r=n(56),i=n(58),o=n(14),a=n(25),s=n(4),u=n(41),c=n(8),l=n(48),p=n(31),f=n(12),d=n(21),h=n(0);function m(e,t){for(var n=0;n9999999)throw new TypeError("Near-infinite iteration.");return s}var c=e.length;if("number"==typeof c&&c>=0&&c%1==0){for(var l=[],p=0;p=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ApolloLink",(function(){return b})),n.d(t,"concat",(function(){return v})),n.d(t,"createOperation",(function(){return f})),n.d(t,"empty",(function(){return m})),n.d(t,"execute",(function(){return E})),n.d(t,"from",(function(){return g})),n.d(t,"fromError",(function(){return p})),n.d(t,"fromPromise",(function(){return l})),n.d(t,"makePromise",(function(){return c})),n.d(t,"split",(function(){return y})),n.d(t,"toPromise",(function(){return u}));var r=n(40);n.d(t,"Observable",(function(){return r.a}));var i=n(27),o=n(19),a=n(113);n.d(t,"getOperationName",(function(){return a.a}));!function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}Object(o.b)(t,e)}(Error);function s(e){return e.request.length<=1}function u(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t||(t=!0,n(e))},error:r})}))}var c=u;function l(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function p(e){return new r.a((function(t){t.error(e)}))}function f(e,t){var n=Object(o.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(o.a)({},n,e(n)):Object(o.a)({},n,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(o.a)({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,n=e.variables,r=e.operationName;return JSON.stringify([r,t,n])}(t)}}),t}function d(e,t){return t?t(e):r.a.of()}function h(e){return"function"==typeof e?new b(e):e}function m(){return new b((function(){return r.a.of()}))}function g(e){return 0===e.length?m():e.map(h).reduce((function(e,t){return e.concat(t)}))}function y(e,t,n){var i=h(t),o=h(n||new b(d));return s(i)&&s(o)?new b((function(t){return e(t)?i.request(t)||r.a.of():o.request(t)||r.a.of()})):new b((function(t,n){return e(t)?i.request(t,n)||r.a.of():o.request(t,n)||r.a.of()}))}var v=function(e,t){var n=h(e);if(s(n))return n;var i=h(t);return s(i)?new b((function(e){return n.request(e,(function(e){return i.request(e)||r.a.of()}))||r.a.of()})):new b((function(e,t){return n.request(e,(function(e){return i.request(e,t)||r.a.of()}))||r.a.of()}))},b=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,r){return this.concat(y(t,n,r||new e(d)))},e.prototype.concat=function(e){return v(this,e)},e.prototype.request=function(e,t){throw new i.a(1)},e.empty=m,e.from=g,e.split=y,e.execute=E,e}();function E(e,t){return e.request(f(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(a.a)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n=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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(171);var p=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(88);t.lib={},t.lib.mdurl=n(102),t.lib.ucmicro=n(172),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.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},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return i(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(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},t.isMdAsciiPunct=function(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}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(194);var p=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(88);t.lib={},t.lib.mdurl=n(102),t.lib.ucmicro=n(172),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.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},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return i(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(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},t.isMdAsciiPunct=function(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}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(46),i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();Object(r.a)(i);var o=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function a(e){return null!=e&&"string"==typeof e.kind}Object(r.a)(o)},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));var r="function"==typeof Symbol?Symbol.iterator:"@@iterator",i="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator",o="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),i=n(24),o={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},a=Object.freeze({});function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=void 0,u=Array.isArray(e),l=[e],p=-1,f=[],d=void 0,h=void 0,m=void 0,g=[],y=[],v=e;do{var b=++p===l.length,E=b&&0!==f.length;if(b){if(h=0===y.length?void 0:g[g.length-1],d=m,m=y.pop(),E){if(u)d=d.slice();else{for(var x={},D=0,C=Object.keys(d);D1&&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]:u;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||(i[n]=e[n]);return i}var h=n(136),m=n.n(h),g=n(78),y=[],v=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function E(e,t,n){l((function(){return e.apply(void 0,t)}),n)}function x(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function D(e,t,n,r,i,o,a,s,u,c){if(e){var l=!1,p=null,f=function(){if(!l){var e,n,f=t.getState();try{e=r(f,i.current)}catch(e){n=e,p=e}n||(p=null),e===o.current?a.current||u():(o.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}}var C=function(){return[null,0]};function w(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,s=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,u=n.methodName,l=void 0===u?"connectAdvanced":u,p=n.renderCountProp,h=void 0===p?void 0:p,w=n.shouldHandleStateChanges,S=void 0===w||w,_=n.storeKey,k=void 0===_?"store":_,A=(n.withRef,n.forwardRef),T=void 0!==A&&A,O=n.context,F=void 0===O?o:O,N=d(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),I=F;return function(t){var n=t.displayName||t.name||"Component",o=s(n),a=f({},N,{getDisplayName:s,methodName:l,renderCountProp:h,shouldHandleStateChanges:S,storeKey:k,displayName:o,wrappedComponentName:n,WrappedComponent:t}),u=N.pure;var p=u?r.useMemo:function(e){return e()};function w(n){var o=Object(r.useMemo)((function(){var e=n.reactReduxForwardedRef,t=d(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),s=o[0],u=o[1],l=o[2],h=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(g.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:I}),[s,I]),m=Object(r.useContext)(h),w=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(m)&&Boolean(m.store);var _=w?n.store:m.store,k=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(_)}),[_]),A=Object(r.useMemo)((function(){if(!S)return v;var e=new c(_,w?null:m.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[_,w,m]),T=A[0],O=A[1],F=Object(r.useMemo)((function(){return w?m:f({},m,{subscription:T})}),[w,m,T]),N=Object(r.useReducer)(b,y,C),M=N[0][0],j=N[1];if(M&&M.error)throw M.error;var L=Object(r.useRef)(),P=Object(r.useRef)(l),R=Object(r.useRef)(),B=Object(r.useRef)(!1),U=p((function(){return R.current&&l===P.current?R.current:k(_.getState(),l)}),[_,M,l]);E(x,[P,L,B,l,U,R,O]),E(D,[S,_,T,k,P,L,B,R,O,j],[_,T,k]);var z=Object(r.useMemo)((function(){return i.a.createElement(t,f({},U,{ref:u}))}),[u,t,U]);return Object(r.useMemo)((function(){return S?i.a.createElement(h.Provider,{value:F},z):z}),[h,z,F])}var _=u?i.a.memo(w):w;if(_.WrappedComponent=t,_.displayName=o,T){var A=i.a.forwardRef((function(e,t){return i.a.createElement(_,f({},e,{reactReduxForwardedRef:t}))}));return A.displayName=o,A.WrappedComponent=t,m()(A,t)}return m()(_,t)}}function S(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function _(e,t){if(S(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function B(e,t){return e===t}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?w:n,i=t.mapStateToPropsFactories,o=void 0===i?N:i,a=t.mapDispatchToPropsFactories,s=void 0===a?F:a,u=t.mergePropsFactories,c=void 0===u?M:u,l=t.selectorFactory,p=void 0===l?P:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,h=a.areStatesEqual,m=void 0===h?B:h,g=a.areOwnPropsEqual,y=void 0===g?_:g,v=a.areStatePropsEqual,b=void 0===v?_:v,E=a.areMergedPropsEqual,x=void 0===E?_:E,D=d(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=R(e,o,"mapStateToProps"),w=R(t,s,"mapDispatchToProps"),S=R(n,c,"mergeProps");return r(p,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:C,initMapDispatchToProps:w,initMergeProps:S,pure:l,areStatesEqual:m,areOwnPropsEqual:y,areStatePropsEqual:b,areMergedPropsEqual:x},D))}}var z=U();function V(){return Object(r.useContext)(o)}function q(e){void 0===e&&(e=o);var t=e===o?V:function(){return Object(r.useContext)(e)};return function(){return t().store}}var H=q();function W(e){void 0===e&&(e=o);var t=e===o?H:q(e);return function(){return t().dispatch}}var G=W(),K=function(e,t){return e===t};function J(e){void 0===e&&(e=o);var t=e===o?V:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=K);var i=t(),o=function(e,t,n,i){var o,a=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new c(n,i)}),[n,i]),u=Object(r.useRef)(),p=Object(r.useRef)(),f=Object(r.useRef)(),d=Object(r.useRef)(),h=n.getState();try{if(e!==p.current||h!==f.current||u.current){var m=e(h);o=void 0!==d.current&&t(m,d.current)?d.current:m}else o=d.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return l((function(){p.current=e,f.current=h,d.current=o,u.current=void 0})),l((function(){function e(){try{var e=p.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){u.current=e}a()}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(e,n,i.store,i.subscription);return Object(r.useDebugValue)(o),o}}var Q,Y=J(),$=n(58);Q=$.unstable_batchedUpdates,a=Q},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return"object"==r(e)&&null!==e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(41);function o(e){return e.get("selectedWorkspace")}t.getSessionsState=r.createSelector([function(e){return e.getIn(["workspaces",o(e)])||i.makeWorkspace("")}],(function(e){return e.get("sessions")})),t.getSelectedSession=r.createSelector([t.getSessionsState],(function(e){var n=t.getSelectedSessionId(e);return e.getIn(["sessions",n])})),t.getSelectedSessionId=function(e){return e.selectedSessionId&&""!==e.selectedSessionId?e.selectedSessionId:e.sessions.first().id},t.getSelectedSessionIdFromRoot=r.createSelector([t.getSelectedSession],(function(e){return e.get("id")}));var a=function(e){return r.createSelector([t.getSelectedSession],(function(t){return t.get(e)}))};function s(e){return e.getIn(["settingsString"])}function u(e){try{return JSON.parse(e)}catch(e){}return{}}function c(e){var t=e.variables;try{return JSON.parse(t)}catch(e){}return{}}t.getScrollTop=a("scrollTop"),t.getEndpoint=a("endpoint"),t.getQuery=a("query"),t.getFile=a("file"),t.getVariables=a("variables"),t.getResponses=a("responses"),t.getOperationName=a("operationName"),t.getQueryRunning=a("queryRunning"),t.getSubscriptionActive=a("subscriptionActive"),t.getOperations=a("operations"),t.getVariableToType=a("variableToType"),t.getQueryTypes=a("queryTypes"),t.getDate=a("date"),t.getHasMutation=a("hasMutation"),t.getHasSubscription=a("hasSubscription"),t.getHasQuery=a("hasQuery"),t.getIsFile=a("isFile"),t.getStarred=a("starred"),t.getName=a("name"),t.getFilePath=a("filePath"),t.getSelectedUserToken=a("selectedUserToken"),t.getHeaders=a("headers"),t.getHasChanged=a("hasChanged"),t.getAbsolutePath=a("absolutePath"),t.getIsSettingsTab=a("isSettingsTab"),t.getIsConfigTab=a("isConfigTab"),t.getCurrentQueryStartTime=a("currentQueryStartTime"),t.getCurrentQueryEndTime=a("currentQueryEndTime"),t.getIsReloadingSchema=a("isReloadingSchema"),t.getIsPollingSchema=r.createSelector([t.getEndpoint,s],(function(e,t){var n=JSON.parse(t);try{return n["schema.polling.enable"]&&e.match("/"+n["schema.polling.endpointFilter"])&&!0}catch(e){return!1}})),t.getResponseExtensions=a("responseExtensions"),t.getQueryVariablesActive=a("queryVariablesActive"),t.getEndpointUnreachable=a("endpointUnreachable"),t.getEditorFlex=a("editorFlex"),t.getVariableEditorOpen=a("variableEditorOpen"),t.getVariableEditorHeight=a("variableEditorHeight"),t.getResponseTracingOpen=a("responseTracingOpen"),t.getResponseTracingHeight=a("responseTracingHeight"),t.getDocExplorerWidth=a("docExplorerWidth"),t.getNextQueryStartTime=a("nextQueryStartTime"),t.getTracingSupported=a("tracingSupported"),t.getTabWidth=r.createSelector([s],(function(e){try{return JSON.parse(e)["prettier.tabWidth"]||2}catch(e){}return 2})),t.getUseTabs=r.createSelector([s],(function(e){try{return JSON.parse(e)["prettier.useTabs"]||!1}catch(e){}return!1})),t.getHeadersCount=r.createSelector([t.getHeaders],(function(e){try{var t=JSON.parse(e);return Object.keys(t).length}catch(e){}return 0})),t.getParsedHeaders=r.createSelector([t.getSelectedSession],u),t.getParsedHeadersFromSession=u,t.getParsedVariables=r.createSelector([t.getSelectedSession],c),t.getParsedVariablesFromSession=c,t.getTracing=r.createSelector([t.getResponseExtensions],(function(e){return e&&e.tracing})),t.getSessionsArray=r.createSelector([t.getSessionsState],(function(e){return e.get("sessions").toArray().map((function(e){return e[1]}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(4),i=n(18),o=n(1),a=n(0);function s(e,t){var n;return t.kind===o.a.LIST_TYPE?(n=s(e,t.type))&&Object(a.d)(n):t.kind===o.a.NON_NULL_TYPE?(n=s(e,t.type))&&Object(a.e)(n):t.kind===o.a.NAMED_TYPE?e.getType(t.name.value):void Object(i.a)(0,"Unexpected type node: "+Object(r.a)(t))}},function(e,t,n){"use strict";n.r(t),n.d(t,"version",(function(){return rr})),n.d(t,"Collection",(function(){return v})),n.d(t,"Iterable",(function(){return or})),n.d(t,"Seq",(function(){return R})),n.d(t,"Map",(function(){return Et})),n.d(t,"OrderedMap",(function(){return rn})),n.d(t,"List",(function(){return qt})),n.d(t,"Stack",(function(){return cn})),n.d(t,"Set",(function(){return bn})),n.d(t,"OrderedSet",(function(){return Vn})),n.d(t,"Record",(function(){return Kn})),n.d(t,"Range",(function(){return _n})),n.d(t,"Repeat",(function(){return er})),n.d(t,"is",(function(){return Z})),n.d(t,"fromJS",(function(){return tr})),n.d(t,"hash",(function(){return re})),n.d(t,"isImmutable",(function(){return w})),n.d(t,"isCollection",(function(){return h})),n.d(t,"isKeyed",(function(){return m})),n.d(t,"isIndexed",(function(){return g})),n.d(t,"isAssociative",(function(){return y})),n.d(t,"isOrdered",(function(){return _})),n.d(t,"isValueObject",(function(){return X})),n.d(t,"get",(function(){return We})),n.d(t,"getIn",(function(){return kn})),n.d(t,"has",(function(){return He})),n.d(t,"hasIn",(function(){return Tn})),n.d(t,"merge",(function(){return at})),n.d(t,"mergeDeep",(function(){return ut})),n.d(t,"mergeWith",(function(){return st})),n.d(t,"mergeDeepWith",(function(){return ct})),n.d(t,"remove",(function(){return Ke})),n.d(t,"removeIn",(function(){return Xe})),n.d(t,"set",(function(){return Je})),n.d(t,"setIn",(function(){return Ye})),n.d(t,"update",(function(){return et})),n.d(t,"updateIn",(function(){return Qe}));var r={};function i(e){e&&(e.value=!0)}function o(){}function a(e){return void 0===e.size&&(e.size=e.__iterate(u)),e.size}function s(e,t){if("number"!=typeof t){var n=t>>>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 Boolean(e&&e["@@__IMMUTABLE_ITERABLE__@@"])}function m(e){return Boolean(e&&e["@@__IMMUTABLE_KEYED__@@"])}function g(e){return Boolean(e&&e["@@__IMMUTABLE_INDEXED__@@"])}function y(e){return m(e)||g(e)}var v=function(e){return h(e)?e:R(e)},b=function(e){function t(e){return m(e)?e:B(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v),E=function(e){function t(e){return g(e)?e:U(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v),x=function(e){function t(e){return h(e)&&!y(e)?e:z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(v);v.Keyed=b,v.Indexed=E,v.Set=x;function D(e){return Boolean(e&&e["@@__IMMUTABLE_SEQ__@@"])}function C(e){return Boolean(e&&e["@@__IMMUTABLE_RECORD__@@"])}function w(e){return h(e)||C(e)}var S="@@__IMMUTABLE_ORDERED__@@";function _(e){return Boolean(e&&e[S])}var k="function"==typeof Symbol&&Symbol.iterator,A=k||"@@iterator",T=function(e){this.next=e};function O(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 F(){return{value:void 0,done:!0}}function N(e){return!!j(e)}function I(e){return e&&"function"==typeof e.next}function M(e){var t=j(e);return t&&t.call(e)}function j(e){var t=e&&(k&&e[k]||e["@@iterator"]);if("function"==typeof t)return t}T.prototype.toString=function(){return"[Iterator]"},T.KEYS=0,T.VALUES=1,T.ENTRIES=2,T.prototype.inspect=T.prototype.toSource=function(){return this.toString()},T.prototype[A]=function(){return this};var L=Object.prototype.hasOwnProperty;function P(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var R=function(e){function t(e){return null==e?G():w(e)?e.toSeq():function(e){var t=Q(e);if(t)return t;if("object"==typeof e)return new q(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new T((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return O(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(v),B=function(e){function t(e){return null==e?G().toKeyedSeq():h(e)?m(e)?e.toSeq():e.fromEntrySeq():C(e)?e.toSeq():K(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(R),U=function(e){function t(e){return null==e?G():h(e)?m(e)?e.entrySeq():e.toIndexedSeq():C(e)?e.toSeq().entrySeq():J(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(R),z=function(e){function t(e){return(h(e)&&!y(e)?e:U(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(R);R.isSeq=D,R.Keyed=B,R.Set=z,R.Indexed=U,R.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var V=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[s(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new T((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return O(e,o,n[o])}))},t}(U),q=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return L.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new T((function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return O(e,a,n[a])}))},t}(B);q.prototype[S]=!0;var H,W=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=M(this._collection),r=0;if(I(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=M(this._collection);if(!I(n))return new T(F);var r=0;return new T((function(){var t=n.next();return t.done?t:O(e,r++,t.value)}))},t}(U);function G(){return H||(H=new V([]))}function K(e){var t=Array.isArray(e)?new V(e):N(e)?new W(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new q(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function J(e){var t=Q(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Q(e){return P(e)?new V(e):N(e)?new W(e):void 0}function Y(e){return Boolean(e&&e["@@__IMMUTABLE_MAP__@@"])}function $(e){return Y(e)&&_(e)}function X(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Z(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!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(X(e)&&X(t)&&e.equals(t))}var ee="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function te(e){return e>>>1&1073741824|3221225471&e}var ne=Object.prototype.valueOf;function re(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return te(t)}(e);case"string":return e.length>pe?function(e){var t=he[e];void 0===t&&(t=ie(e),de===fe&&(de=0,he={}),de++,he[e]=t);return t}(e):ie(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?te(e.hashCode(e)):(e.valueOf!==ne&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(ue&&void 0!==(t=se.get(e)))return t;if(void 0!==(t=e[le]))return t;if(!ae){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[le]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++ce,1073741824&ce&&(ce=0);if(ue)se.set(e,t);else{if(void 0!==oe&&!1===oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ae)Object.defineProperty(e,le,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[le]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[le]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return ie(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function ie(e){for(var t=0,n=0;n=0&&(d.get=function(t,n){return(t=s(this,t))>=0&&tu)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:O(t,s-1,0===t?void 0:e.value[1],e)}))},d}function we(e,t,n,r){var i=Me(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(2,o),u=!0,c=0;return new T((function(){var e,o,l;do{if((e=s.next()).done)return r||1===i?e:O(i,c++,0===i?void 0: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 2===i?e:O(i,o,l,e)}))},i}function Se(e,t){var n=m(e),r=[e].concat(t).map((function(e){return h(e)?n&&(e=b(e)):e=n?K(e):J(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&&m(i)||g(e)&&g(i))return i}var o=new V(r);return n?o=o.toKeyedSeq():g(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),o}function _e(e,t,n){var r=Me(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function e(u,c){u.__iterate((function(o,u){return(!t||c0}function Oe(e,t,n,r){var i=Me(e),o=new V(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.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map((function(e){return e=v(e),M(i?e.reverse():e)})),a=0,s=!1;return new T((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?{value:void 0,done:!0}:O(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function Fe(e,t){return e===t?e:D(e)?t:e.constructor(t)}function Ne(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ie(e){return m(e)?b:g(e)?E:x}function Me(e){return Object.create((m(e)?B:g(e)?U:z).prototype)}function je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):R.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];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ot(this,t,e)}function ot(e,t,n){for(var i=[],o=0;o0;)t[n]=arguments[n+1];return pt(e,t)}function st(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return pt(t,n,e)}function ut(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return lt(e,t)}function ct(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return lt(t,n,e)}function lt(e,t,n){return pt(e,t,function(e){return function t(n,r,i){return Ve(n)&&Ve(r)?pt(n,[r],t):e?e(n,r,i):r}}(n))}function pt(e,t,n){if(!Ve(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(w(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?E:b,a=r?function(t){i===e&&(i=Ge(i)),i.push(t)}:function(t,r){var o=L.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=Ge(i)),i[r]=a)},s=0;s0;)t[n]=arguments[n+1];return lt(this,t,e)}function ht(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return pt(e,t)}))}function mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return lt(e,t)}))}function gt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function yt(){return this.__ownerID?this:this.__ensureOwner(new o)}function vt(){return this.__ensureOwner()}function bt(){return this.__altered}ge.prototype.cacheResult=me.prototype.cacheResult=ye.prototype.cacheResult=ve.prototype.cacheResult=je;var Et=function(e){function t(t){return null==t?Nt():Y(t)&&!_(t)?t:Nt().withMutations((function(n){var r=e(t);Be(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 Nt().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 It(this,e,t)},t.prototype.remove=function(e){return It(this,e,r)},t.prototype.deleteAll=function(e){var t=v(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):Nt()},t.prototype.sort=function(e){return rn(ke(this,e))},t.prototype.sortBy=function(e,t){return rn(ke(this,t,e))},t.prototype.map=function(e,t){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,e.call(t,r,i,n))}))}))},t.prototype.__iterator=function(e,t){return new At(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?Ft(this.size,this._root,e,this.__hash):0===this.size?Nt():(this.__ownerID=e,this.__altered=!1,this)},t}(b);Et.isMap=Y;var xt=Et.prototype;xt["@@__IMMUTABLE_MAP__@@"]=!0,xt.delete=xt.remove,xt.removeAll=xt.deleteAll,xt.setIn=$e,xt.removeIn=xt.deleteIn=Ze,xt.update=tt,xt.updateIn=nt,xt.merge=xt.concat=rt,xt.mergeWith=it,xt.mergeDeep=ft,xt.mergeDeepWith=dt,xt.mergeIn=ht,xt.mergeDeepIn=mt,xt.withMutations=gt,xt.wasAltered=bt,xt.asImmutable=vt,xt["@@transducer/init"]=xt.asMutable=yt,xt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},xt["@@transducer/result"]=function(e){return e.asImmutable()};var Dt=function(e,t){this.ownerID=e,this.entries=t};Dt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Bt)return function(e,t,n,r){e||(e=new o);for(var i=new _t(e,re(n),[n,r]),a=0;a>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Pt(o&i-1)].get(e+5,t,n,r)},Ct.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=1<=Ut)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new wt(e,o+1,a)}(e,d,l,u,m);if(p&&!m&&2===d.length&&jt(d[1^f]))return d[1^f];if(p&&m&&1===d.length&&jt(m))return m;var g=e&&e===this.ownerID,y=p?m?l:l^c:l|c,v=p?m?Rt(d,f,m,g):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},wt.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=o===r,l=this.nodes,p=l[u];if(c&&!p)return this;var f=Mt(p,e,t+5,n,i,o,a,s);if(f===p)return this;var d=this.count;if(p){if(!f&&--d>>n),s=31&(0===n?r:r>>>n),u=a===s?[Lt(e,t,n+5,r,i)]:(o=new _t(t,r,i),a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Rt(e,t,n,r){var i=r?e:Pe(e);return i[t]=n,i}var Bt=8,Ut=16,zt=8;function Vt(e){return Boolean(e&&e["@@__IMMUTABLE_LIST__@@"])}var qt=function(e){function t(t){var n=Yt();if(null==t)return n;if(Vt(t))return t;var r=e(t),i=r.size;return 0===i?n:(Be(i),i>0&&i<32?Qt(0,i,5,null,new Wt(r.toArray())):n.withMutations((function(e){e.setSize(i),r.forEach((function(t,n){return e.set(n,t)}))})))}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("List [","]")},t.prototype.get=function(e,t){if((e=s(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?en(e,t).set(0,n):en(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=tn(e._capacity)?r=$t(r,e.__ownerID,0,t,n,o):i=$t(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Qt(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Yt()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){en(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new Wt([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=Xt(this,e);if(!o)for(var u=0;u>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=Xt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var Gt,Kt={};function Jt(e,t){var n=e._origin,r=e._capacity,i=tn(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,u){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,u=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(u===c)return Kt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,i,o){var s,u=e&&e.array,c=o>n?0:n-o>>i,l=1+(r-o>>i);l>32&&(l=32);return function(){for(;;){if(s){var e=s();if(e!==Kt)return e;s=null}if(c===l)return Kt;var n=t?--l:c++;s=a(u&&u[n],i-5,o+(n<>>n&31,c=e&&u0){var l=e&&e.array[u],p=$t(l,t,n-5,r,o,a);return p===l?e:((s=Xt(e,t)).array[u]=p,s)}return c&&e.array[u]===o?e:(a&&i(a),s=Xt(e,t),void 0===o&&u===s.array.length-1?s.array.pop():s.array[u]=o,s)}function Xt(e,t){return t&&e&&t===e.ownerID?e:new Wt(e?e.array.slice():[],t)}function Zt(e,t){if(t>=tn(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function en(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 Wt(l&&l.array.length?[void 0,l]:[],r),p+=1<<(c+=5);p&&(s+=p,i+=p,u+=p,a+=p);for(var f=tn(a),d=tn(u);d>=1<f?new Wt([],r):h;if(h&&d>f&&s5;y-=5){var v=f>>>y&31;g=g.array[v]=Xt(g.array[v],r)}g.array[f>>>5&31]=h}if(u=d)s-=d,u-=d,c=5,l=null,m=m&&m.removeBefore(r,0,s);else if(s>i||d>>c&31;if(b!==d>>>c&31)break;b&&(p+=(1<i&&(l=l.removeBefore(r,c,s-p)),l&&d>>5<<5}var nn,rn=function(e){function t(e){return null==e?an():$(e)?e:an().withMutations((function(t){var n=b(e);Be(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):an()},t.prototype.set=function(e,t){return sn(this,e,t)},t.prototype.remove=function(e){return sn(this,e,r)},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?on(t,n,e,this.__hash):0===this.size?an():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Et);function on(e,t,n,r){var i=Object.create(rn.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function an(){return nn||(nn=on(Nt(),Yt()))}function sn(e,t,n){var i,o,a=e._map,s=e._list,u=a.get(t),c=void 0!==u;if(n===r){if(!c)return e;s.size>=32&&s.size>=2*a.size?(i=(o=s.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(i.__ownerID=o.__ownerID=e.__ownerID)):(i=a.remove(t),o=u===s.size-1?s.pop():s.set(u,void 0))}else if(c){if(n===s.get(u)[1])return e;i=a,o=s.set(u,[t,n])}else i=a.set(t,s.size),o=s.set(s.size,[t,n]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=o,e.__hash=void 0,e):on(i,o)}rn.isOrderedMap=$,rn.prototype[S]=!0,rn.prototype.delete=rn.prototype.remove;function un(e){return Boolean(e&&e["@@__IMMUTABLE_STACK__@@"])}var cn=function(e){function t(e){return null==e?dn():un(e)?e:dn().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):fn(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&un(t))return t;Be(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):fn(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):dn()},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):fn(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?fn(this.size,this._head,e,this.__hash):0===this.size?dn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new V(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++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new V(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new T((function(){if(r){var t=r.value;return r=r.next,O(e,n++,t)}return{value:void 0,done:!0}}))},t}(E);cn.isStack=un;var ln,pn=cn.prototype;function fn(e,t,n,r){var i=Object.create(pn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function dn(){return ln||(ln=fn(0))}pn["@@__IMMUTABLE_STACK__@@"]=!0,pn.shift=pn.pop,pn.unshift=pn.push,pn.unshiftAll=pn.pushAll,pn.withMutations=gt,pn.wasAltered=bt,pn.asImmutable=vt,pn["@@transducer/init"]=pn.asMutable=yt,pn["@@transducer/step"]=function(e,t){return e.unshift(t)},pn["@@transducer/result"]=function(e){return e.asImmutable()};function hn(e){return Boolean(e&&e["@@__IMMUTABLE_SET__@@"])}function mn(e){return hn(e)&&_(e)}function gn(e,t){if(e===t)return!0;if(!h(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||m(e)!==m(t)||g(e)!==g(t)||_(e)!==_(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!y(e);if(_(e)){var i=e.entries();return t.every((function(e,t){var r=i.next().value;return r&&Z(r[1],e)&&(n||Z(r[0],t))}))&&i.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var s=!0,u=t.__iterate((function(t,i){if(n?!e.has(t):o?!Z(t,e.get(i,r)):!Z(e.get(i,r),t))return s=!1,!1}));return s&&e.size===u}function yn(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 vn(e){if(!e||"object"!=typeof e)return e;if(!h(e)){if(!Ve(e))return e;e=R(e)}if(m(e)){var t={};return e.__iterate((function(e,n){t[n]=vn(e)})),t}var n=[];return e.__iterate((function(e){n.push(vn(e))})),n}var bn=function(e){function t(t){return null==t?wn():hn(t)&&!_(t)?t:wn().withMutations((function(n){var r=e(t);Be(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(b(e).keySeq())},t.intersect=function(e){return(e=v(e).toArray()).length?xn.intersect.apply(t(e.pop()),e):wn()},t.union=function(e){return(e=v(e).toArray()).length?xn.union.apply(t(e.pop()),e):wn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Dn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Dn(this,this._map.remove(e))},t.prototype.clear=function(){return Dn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach((function(o){var a=e.call(t,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(e){r.forEach((function(t){return e.remove(t)})),i.forEach((function(t){return e.add(t)}))}))},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var r=0;r=0&&t=0&&n>>-15,461845907),t=ee(t<<13|t>>>-13,5),t=ee((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=te((t=ee(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+zn(re(e),re(t))|0}:function(e,t){r=r+zn(re(e),re(t))|0}:t?function(e){r=31*r+re(e)|0}:function(e){r=r+re(e)|0}),r)}(this))}});var Fn=v.prototype;Fn["@@__IMMUTABLE_ITERABLE__@@"]=!0,Fn[A]=Fn.values,Fn.toJSON=Fn.toArray,Fn.__toStringMapper=qe,Fn.inspect=Fn.toSource=function(){return this.toString()},Fn.chain=Fn.flatMap,Fn.contains=Fn.includes,yn(b,{flip:function(){return Fe(this,be(this))},mapEntries:function(e,t){var n=this,r=0;return Fe(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Fe(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Nn=b.prototype;Nn["@@__IMMUTABLE_KEYED__@@"]=!0,Nn[A]=Fn.entries,Nn.toJSON=On,Nn.__toStringMapper=function(e,t){return qe(t)+": "+qe(e)},yn(E,{toKeyedSeq:function(){return new me(this,!1)},filter:function(e,t){return Fe(this,De(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Fe(this,xe(this,!1))},slice:function(e,t){return Fe(this,Ce(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=l(e,e<0?this.count():this.size);var r=this.slice(0,e);return Fe(this,1===n?r:r.concat(Pe(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return Fe(this,_e(this,e,!1))},get:function(e,t){return(e=s(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.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||et?-1:0}function zn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}In["@@__IMMUTABLE_INDEXED__@@"]=!0,In[S]=!0,yn(x,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),x.prototype.has=Fn.includes,x.prototype.contains=x.prototype.includes,yn(B,b.prototype),yn(U,E.prototype),yn(z,x.prototype);var Vn=function(e){function t(e){return null==e?Gn():mn(e)?e:Gn().withMutations((function(t){var n=x(e);Be(n.size),n.forEach((function(e){return t.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(b(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(bn);Vn.isOrderedSet=mn;var qn,Hn=Vn.prototype;function Wn(e,t){var n=Object.create(Hn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Gn(){return qn||(qn=Wn(an()))}Hn[S]=!0,Hn.zip=In.zip,Hn.zipWith=In.zipWith,Hn.__empty=Gn,Hn.__make=Wn;var Kn=function(e,t){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(e),u=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var c=0;c2?[]:void 0,{"":e})}function nr(e,t){return m(t)?t.toMap():t.toList()}var rr="4.0.0-rc.11",ir={version:rr,Collection:v,Iterable:v,Seq:R,Map:Et,OrderedMap:rn,List:qt,Stack:cn,Set:bn,OrderedSet:Vn,Record:Kn,Range:_n,Repeat:er,is:Z,fromJS:tr,hash:re,isImmutable:w,isCollection:h,isKeyed:m,isIndexed:g,isAssociative:y,isOrdered:_,isValueObject:X,isSeq:D,isList:Vt,isMap:Y,isOrderedMap:$,isStack:un,isSet:hn,isOrderedSet:mn,isRecord:C,get:We,getIn:kn,has:He,hasIn:Tn,merge:at,mergeDeep:ut,mergeWith:st,mergeDeepWith:ct,remove:Ke,removeIn:Xe,set:Je,setIn:Ye,update:et,updateIn:Qe},or=v;t.default=ir},function(e,t,n){"use strict";var r=n(91),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";function r(e,t){return e.reduce((function(e,n){return e[t(n)]=n,e}),Object.create(null))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(48);function o(e,t){return function(n){var r;return(r={})[e]=n||t,r}}t.editQuery=(r=i.createActions({EDIT_QUERY:function(e){return{query:e}},EDIT_HEADERS:o("headers"),EDIT_ENDPOINT:o("endpoint"),EDIT_VARIABLES:o("variables"),SET_OPERATION_NAME:o("operationName"),SET_VARIABLE_TO_TYPE:o("variableToType"),SET_OPERATIONS:o("operations"),SET_EDITOR_FLEX:o("editorFlex"),EDIT_NAME:o("name"),OPEN_QUERY_VARIABLES:function(){return{queryVariablesActive:!0}},CLOSE_QUERY_VARIABLES:function(){return{queryVariablesActive:!1}},SET_VARIABLE_EDITOR_HEIGHT:o("variableEditorHeight"),SET_RESPONSE_TRACING_HEIGHT:o("responceTracingHeight"),SET_TRACING_SUPPORTED:o("tracingSupported"),SET_SUBSCRIPTION_ACTIVE:o("subscriptionActive"),SET_QUERY_TYPES:o("queryTypes"),SET_RESPONSE_EXTENSIONS:o("responseExtensions"),SET_CURRENT_QUERY_START_TIME:o("currentQueryStartTime"),SET_CURRENT_QUERY_END_TIME:o("currentQueryEndTime"),UPDATE_QUERY_FACTS:o(),PRETTIFY_QUERY:o(),INJECT_HEADERS:function(e,t){return{headers:e,endpoint:t}},CLOSE_TRACING:o("responseTracingHeight"),OPEN_TRACING:o("responseTracingHeight"),TOGGLE_TRACING:o(),CLOSE_VARIABLES:o("variableEditorHeight"),OPEN_VARIABLES:o("variableEditorHeight"),TOGGLE_VARIABLES:o(),ADD_RESPONSE:function(e,t,n){return{workspaceId:e,sessionId:t,response:n}},SET_RESPONSE:function(e,t,n){return{workspaceId:e,sessionId:t,response:n}},CLEAR_RESPONSES:o(),FETCH_SCHEMA:o(),REFETCH_SCHEMA:o(),SET_ENDPOINT_UNREACHABLE:o("endpoint"),SET_SCROLL_TOP:function(e,t){return{sessionId:e,scrollTop:t}},SCHEMA_FETCHING_SUCCESS:function(e,t,n){return{endpoint:e,tracingSupported:t,isPollingSchema:n}},SCHEMA_FETCHING_ERROR:function(e,t){return{endpoint:e,error:t}},RENEW_STACKS:o(),RUN_QUERY:function(e){return{operationName:e}},QUERY_SUCCESS:o(),QUERY_ERROR:o(),RUN_QUERY_AT_POSITION:function(e){return{position:e}},START_QUERY:o("queryRunning",!0),STOP_QUERY:function(e,t){return{workspaceId:t,sessionId:e}},OPEN_SETTINGS_TAB:function(){return{}},OPEN_CONFIG_TAB:function(){return{}},NEW_SESSION:function(e,t){return{endpoint:e,reuseHeaders:t}},NEW_SESSION_FROM_QUERY:function(e){return{query:e}},NEW_FILE_TAB:function(e,t,n){return{fileName:e,filePath:t,file:n}},DUPLICATE_SESSION:o("session"),CLOSE_SELECTED_TAB:function(){return{}},SELECT_NEXT_TAB:function(){return{}},SELECT_PREV_TAB:function(){return{}},SELECT_TAB:o("sessionId"),SELECT_TAB_INDEX:o("index"),CLOSE_TAB:o("sessionId"),REORDER_TABS:function(e,t){return{src:e,dest:t}},EDIT_SETTINGS:o(),SAVE_SETTINGS:o(),EDIT_CONFIG:o(),SAVE_CONFIG:o(),EDIT_FILE:o(),SAVE_FILE:o()})).editQuery,t.editVariables=r.editVariables,t.setOperationName=r.setOperationName,t.editHeaders=r.editHeaders,t.editEndpoint=r.editEndpoint,t.setVariableToType=r.setVariableToType,t.setOperations=r.setOperations,t.startQuery=r.startQuery,t.stopQuery=r.stopQuery,t.setEditorFlex=r.setEditorFlex,t.openQueryVariables=r.openQueryVariables,t.closeQueryVariables=r.closeQueryVariables,t.setVariableEditorHeight=r.setVariableEditorHeight,t.setResponseTracingHeight=r.setResponseTracingHeight,t.setTracingSupported=r.setTracingSupported,t.closeTracing=r.closeTracing,t.openTracing=r.openTracing,t.closeVariables=r.closeVariables,t.openVariables=r.openVariables,t.addResponse=r.addResponse,t.setResponse=r.setResponse,t.clearResponses=r.clearResponses,t.openSettingsTab=r.openSettingsTab,t.schemaFetchingSuccess=r.schemaFetchingSuccess,t.schemaFetchingError=r.schemaFetchingError,t.setEndpointUnreachable=r.setEndpointUnreachable,t.renewStacks=r.renewStacks,t.runQuery=r.runQuery,t.prettifyQuery=r.prettifyQuery,t.fetchSchema=r.fetchSchema,t.updateQueryFacts=r.updateQueryFacts,t.runQueryAtPosition=r.runQueryAtPosition,t.toggleTracing=r.toggleTracing,t.toggleVariables=r.toggleVariables,t.newSession=r.newSession,t.newSessionFromQuery=r.newSessionFromQuery,t.newFileTab=r.newFileTab,t.closeTab=r.closeTab,t.closeSelectedTab=r.closeSelectedTab,t.editSettings=r.editSettings,t.saveSettings=r.saveSettings,t.editConfig=r.editConfig,t.saveConfig=r.saveConfig,t.editFile=r.editFile,t.saveFile=r.saveFile,t.selectTab=r.selectTab,t.selectTabIndex=r.selectTabIndex,t.selectNextTab=r.selectNextTab,t.selectPrevTab=r.selectPrevTab,t.duplicateSession=r.duplicateSession,t.querySuccess=r.querySuccess,t.queryError=r.queryError,t.setSubscriptionActive=r.setSubscriptionActive,t.setQueryTypes=r.setQueryTypes,t.injectHeaders=r.injectHeaders,t.openConfigTab=r.openConfigTab,t.editName=r.editName,t.setResponseExtensions=r.setResponseExtensions,t.setCurrentQueryStartTime=r.setCurrentQueryStartTime,t.setCurrentQueryEndTime=r.setCurrentQueryEndTime,t.refetchSchema=r.refetchSchema,t.setScrollTop=r.setScrollTop,t.reorderTabs=r.reorderTabs},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e,t){var n="string"==typeof e?[e,t]:[void 0,e],r=n[0],i=" Did you mean ";r&&(i+=r+" ");var o=n[1].map((function(e){return'"'.concat(e,'"')}));switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}var a=o.slice(0,5),s=a.pop();return i+a.join(", ")+", or "+s+"?"}},function(e,t,n){"use strict";var r=n(208),i=n.n(r).a;t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(54);function i(e){if(null===Object.getPrototypeOf(e))return e;for(var t=Object.create(null),n=0,i=Object(r.a)(e);nt)){for(var c=this._rows,l=0;l<=u;l++)c[0][l]=l;for(var p=1;p<=s;p++){for(var f=c[(p-1)%3],d=c[p%3],h=d[0]=p,m=1;m<=u;m++){var g=r[p-1]===i[m-1]?0:1,y=Math.min(f[m]+1,d[m-1]+1,f[m-1]+g);if(p>1&&m>1&&r[p-1]===i[m-2]&&r[p-2]===i[m-1]){var v=c[(p-2)%3][m-2];y=Math.min(y,v+1)}yt)return}var b=c[s%3][u];return b<=t?b:void 0}},e}();function o(e){for(var t=e.length,n=new Array(t),r=0;r1?n-1:0),i=1;i1?t-1:0),r=1;r2?n-2:0),a=2;a0&&a(t[0]);)t.shift();for(;t.length>0&&a(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=null,n=1;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,u="";return!s||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return g})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return v}));var r=n(55),i=n(57),o=n(14),a=n(25),s=n(4),u=n(40),c=n(8),l=n(47),p=n(31),f=n(12),d=n(21),h=n(0);function m(e,t){for(var n=0;n9999999)throw new TypeError("Near-infinite iteration.");return s}var c=e.length;if("number"==typeof c&&c>=0&&c%1==0){for(var l=[],p=0;p * @license MIT - */function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i=0;c--)if(l[c]!==p[c])return!1;for(c=l.length-1;c>=0;c--)if(s=l[c],!b(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function E(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function D(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&y(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&x(i,n)||s)&&y(i,n,"Got unwanted exception"+r),e&&i&&n&&!x(i,n)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=h(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){D(!0,e,t,n)},f.doesNotThrow=function(e,t,n){D(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||y(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var C=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(43))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(4),i=n(8),o=n(45),a=n(1),s=n(24),u=n(84),c=n(5),l=n(9),p=n(85);function f(e,t){return new m(e,t).parseDocument()}function d(e,t){var n=new m(e,t);n.expectToken(c.a.SOF);var r=n.parseValueLiteral(!1);return n.expectToken(c.a.EOF),r}function h(e,t){var n=new m(e,t);n.expectToken(c.a.SOF);var r=n.parseTypeReference();return n.expectToken(c.a.EOF),r}var m=function(){function e(e,t){var n="string"==typeof e?new u.a(e):e;n instanceof u.a||Object(i.a)(0,"Must provide Source. Received: ".concat(Object(r.a)(n),".")),this._lexer=new p.a(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(c.a.NAME);return{kind:a.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:a.a.DOCUMENT,definitions:this.many(c.a.SOF,this.parseDefinition,c.a.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(c.a.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(c.a.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(c.a.BRACE_L))return{kind:a.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(c.a.NAME)&&(t=this.parseName()),{kind:a.a.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(c.a.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(c.a.PAREN_L,this.parseVariableDefinition,c.a.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:a.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(c.a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(c.a.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(c.a.DOLLAR),{kind:a.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:a.a.SELECTION_SET,selections:this.many(c.a.BRACE_L,this.parseSelection,c.a.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(c.a.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(c.a.COLON)?(e=r,t=this.parseName()):t=r,{kind:a.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(c.a.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(c.a.PAREN_L,t,c.a.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(c.a.COLON),{kind:a.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:a.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(c.a.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(c.a.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(c.a.NAME)?{kind:a.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:a.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:a.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:a.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case c.a.BRACKET_L:return this.parseList(e);case c.a.BRACE_L:return this.parseObject(e);case c.a.INT:return this._lexer.advance(),{kind:a.a.INT,value:t.value,loc:this.loc(t)};case c.a.FLOAT:return this._lexer.advance(),{kind:a.a.FLOAT,value:t.value,loc:this.loc(t)};case c.a.STRING:case c.a.BLOCK_STRING:return this.parseStringLiteral();case c.a.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:a.a.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:a.a.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:a.a.NULL,loc:this.loc(t)};default:return{kind:a.a.ENUM,value:t.value,loc:this.loc(t)}}case c.a.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:a.a.STRING,value:e.value,block:e.kind===c.a.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:a.a.LIST,values:this.any(c.a.BRACKET_L,(function(){return t.parseValueLiteral(e)}),c.a.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:a.a.OBJECT,fields:this.any(c.a.BRACE_L,(function(){return t.parseObjectField(e)}),c.a.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(c.a.COLON),{kind:a.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(c.a.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(c.a.AT),{kind:a.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(c.a.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(c.a.BRACKET_R),e={kind:a.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(c.a.BANG)?{kind:a.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:a.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===c.a.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(c.a.STRING)||this.peek(c.a.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(c.a.BRACE_L,this.parseOperationTypeDefinition,c.a.BRACE_R);return{kind:a.a.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(c.a.COLON);var n=this.parseNamedType();return{kind:a.a.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:a.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:a.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(c.a.AMP);do{var t;e.push(this.parseNamedType())}while(this.expectOptionalToken(c.a.AMP)||!0===(null===(t=this._options)||void 0===t?void 0:t.allowLegacySDLImplementsInterfaces)&&this.peek(c.a.NAME))}return e},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(c.a.BRACE_L)&&this._lexer.lookahead().kind===c.a.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(c.a.BRACE_L,this.parseFieldDefinition,c.a.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(c.a.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:a.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(c.a.PAREN_L,this.parseInputValueDef,c.a.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(c.a.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(c.a.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:a.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:a.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:a.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(c.a.EQUALS)){this.expectOptionalToken(c.a.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(c.a.PIPE))}return e},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:a.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(c.a.BRACE_L,this.parseEnumValueDefinition,c.a.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:a.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:a.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(c.a.BRACE_L,this.parseInputValueDef,c.a.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===c.a.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(c.a.BRACE_L,this.parseOperationTypeDefinition,c.a.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:a.a.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:a.a.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:a.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:a.a.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:a.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:a.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:a.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(c.a.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:a.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){this.expectOptionalToken(c.a.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(c.a.PIPE));return e},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==l.a[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new s.a(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Object(o.a)(this._lexer.source,t.start,"Expected ".concat(y(e),", found ").concat(g(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==c.a.NAME||t.value!==e)throw Object(o.a)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(g(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===c.a.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Object(o.a)(this._lexer.source,t.start,"Unexpected ".concat(g(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},e}();function g(e){var t=e.value;return y(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function y(e){return Object(p.b)(e)?'"'.concat(e,'"'):e}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d}));var r=n(8),i=n(2),o=n(26),a=n(81),s=n(86),u=n(138),c=n(146);function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new s.a(e),p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{maxErrors:void 0};t||Object(r.a)(0,"Must provide document."),Object(a.a)(e);var f=Object.freeze({}),d=[],h=new c.b(e,t,l,(function(e){if(null!=p.maxErrors&&d.length>=p.maxErrors)throw d.push(new i.a("Too many validation errors, error limit reached. Validation aborted.")),f;d.push(e)})),m=Object(o.d)(n.map((function(e){return e(h)})));try{Object(o.c)(t,Object(s.b)(l,m))}catch(e){if(e!==f)throw e}return d}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.b,r=[],i=new c.a(e,t,(function(e){r.push(e)})),a=n.map((function(e){return e(i)}));return Object(o.c)(e,Object(o.d)(a)),r}function f(e){var t=p(e);if(0!==t.length)throw new Error(t.map((function(e){return e.message})).join("\n\n"))}function d(e,t){var n=p(e,t);if(0!==n.length)throw new Error(n.map((function(e){return e.message})).join("\n\n"))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(72),i=n(58),o=n(14),a=n(4),s=n(17),u=n(31),c=n(82),l=n(1),p=n(13),f=n(0);function d(e,t){if(Object(f.L)(t)){var n=d(e,t.ofType);return(null==n?void 0:n.kind)===l.a.NULL?null:n}if(null===e)return{kind:l.a.NULL};if(void 0===e)return null;if(Object(f.J)(t)){var m=t.ofType;if(Object(c.a)(e)){for(var g=[],y=0,v=Object(i.a)(e);y

'+(n?e:o(e,!0))+"
\n":"
"+(n?e:o(e,!0))+"
"}blockquote(e){return"
\n"+e+"
\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return"
  • "+e+"
  • \n"}checkbox(e){return" "}paragraph(e){return"

    "+e+"

    \n"}table(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return"\n"+e+"\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='
    ",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r=''+n+'":">",r}text(e){return e}}},function(e,t,n){!function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(n){n=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in u)i[o]=u[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var i=0;ic.clientHeight+1,F=a.getScrollInfo();if(_>0){var N=T.bottom-T.top;if(y.top-(y.bottom-T.top)-N>0)c.style.top=(b=y.top-N-D)+"px",E=!1;else if(N>A){c.style.height=A-5+"px",c.style.top=(b=y.bottom-T.top-D)+"px";var I=a.getCursor();n.from.ch!=I.ch&&(y=a.cursorCoords(I),c.style.left=(v=y.left-x)+"px",T=c.getBoundingClientRect())}}var M,j=T.right-k;if(j>0&&(T.right-T.left>k&&(c.style.width=k-5+"px",j-=T.right-T.left-k),c.style.left=(v=y.left-j-x)+"px"),O)for(var L=c.firstChild;L;L=L.nextSibling)L.style.paddingRight=a.display.nativeBarWidth+"px";return a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:p.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){M=setTimeout((function(){t.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(M)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),r=b+F.top-e.top,i=r-(u.pageYOffset||(s.documentElement||s.body).scrollTop);if(E||(i+=c.offsetHeight),i<=n.top||i>=n.bottom)return t.close();c.style.top=r+"px",c.style.left=v+F.left-e.left+"px"}),e.on(c,"dblclick",(function(e){var t=o(c,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(c,"click",(function(e){var n=o(c,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(c,"mousedown",(function(){setTimeout((function(){a.focus()}),20)})),this.scrollToActive(),e.signal(n,"select",p[this.selectedHint],c.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" CodeMirror-hint-active","")),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.completion.options.scrollMargin||0,t=this.hints.childNodes[Math.max(0,this.selectedHint-e)],n=this.hints.childNodes[Math.min(this.data.list.length-1,this.selectedHint+e)],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}(n(16))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),c=0;c=0;c--){var p=a[c].head;t.replaceRange("",n(p.line,p.ch-1),n(p.line,p.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a1&&f.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;y="addFour"}else if(d){var x=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(E)||x==i||e.isWordChar(x))return e.Pass;y="both"}else{if(!m||!(0===E.length||/\s/.test(E)||p.indexOf(E)>-1))return e.Pass;y="both"}else y=d&&c(t,b)?"both":f.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(l){if(l!=y)return e.Pass}else l=y}var D=u%2?a.charAt(u-1):i,C=u%2?i:a.charAt(u+1);t.operation((function(){if("skip"==l)t.execCommand("goCharRight");else if("skipThree"==l)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==l){var i=t.getSelections();for(r=0;r0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==l?(t.replaceSelection(D+C,null),t.triggerElectric(D+C),t.execCommand("goCharLeft")):"addFour"==l&&(t.replaceSelection(D+D+D+D,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function u(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(16))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,i,o){var a=function(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",i.style.left=t.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}(t,r,i);function s(){var t;e.off(o,"mouseout",s),a&&((t=a).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout((function(){n(t)}),600)),a=null)}var u=setInterval((function(){if(a)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){s();break}}if(!a)return clearInterval(u)}),400);e.on(o,"mouseout",s)}function i(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var i=n.getBoundingClientRect(),o=(i.left+i.right)/2,a=(i.top+i.bottom)/2,u=e.findMarksAt(e.coordsChar({left:o,top:a},"client")),c=[],l=0;l1,u.options.tooltips))}}c.onUpdateLinting&&c.onUpdateLinting(n,l,e)}function l(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){u(e)}),t.options.delay||500))}e.defineOption("lint",!1,(function(n,r,a){if(a&&a!=e.Init&&(o(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",l),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var s=n.getOption("gutters"),c=!1,p=0;p=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.DocType=o.styled.div(i||(i=r(["\n padding: 20px 16px 0 16px;\n overflow: auto;\n font-size: 14px;\n"],["\n padding: 20px 16px 0 16px;\n overflow: auto;\n font-size: 14px;\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),i=n(163);function o(e){return"string"==typeof e?{endpoint:e,subscriptionEndpoint:void 0}:{endpoint:e.url,subscriptionEndpoint:e.subscription?e.subscription.url:void 0,headers:e.headers}}t.getActiveEndpoints=function(e,t,n){return o(n?e.projects[n].extensions.endpoints[t]:e.extensions.endpoints[t])},t.getEndpointFromEndpointConfig=o;var a=new i({max:10});t.cachedPrintSchema=function(e){var t=a.get(e);if(t)return t;var n=r.printSchema(e);return a.set(e,n),n}},function(e,t,n){"use strict";var r=n(79);e.exports=new r({explicit:[n(498),n(499),n(500)]})},function(e,t,n){"use strict";n.r(t),n.d(t,"CharacterStream",(function(){return r})),n.d(t,"LexRules",(function(){return l})),n.d(t,"ParseRules",(function(){return p})),n.d(t,"isIgnored",(function(){return c})),n.d(t,"butNot",(function(){return a})),n.d(t,"list",(function(){return o})),n.d(t,"opt",(function(){return i})),n.d(t,"p",(function(){return u})),n.d(t,"t",(function(){return s})),n.d(t,"onlineParser",(function(){return m})),n.d(t,"AdditionalRuleKinds",(function(){return w})),n.d(t,"RuleKinds",(function(){return S}));class r{constructor(e){this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=i&&i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0===e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function i(e){return{ofRule:e}}function o(e,t){return{ofRule:e,isList:!0,separator:t}}function a(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}function s(e,t){return{style:t,match:t=>t.kind===e}}function u(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const c=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,l={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},p={Document:[o("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[d("query"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],Mutation:[d("mutation"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],Subscription:[d("subscription"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],VariableDefinitions:[u("("),o("VariableDefinition"),u(")")],VariableDefinition:["Variable",u(":"),"Type",i("DefaultValue")],Variable:[u("$","variable"),h("variable")],DefaultValue:[u("="),"Value"],SelectionSet:[u("{"),o("Selection"),u("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[h("property"),u(":"),h("qualifier"),i("Arguments"),o("Directive"),i("SelectionSet")],Field:[h("property"),i("Arguments"),o("Directive"),i("SelectionSet")],Arguments:[u("("),o("Argument"),u(")")],Argument:[h("attribute"),u(":"),"Value"],FragmentSpread:[u("..."),h("def"),o("Directive")],InlineFragment:[u("..."),i("TypeCondition"),o("Directive"),"SelectionSet"],FragmentDefinition:[d("fragment"),i(a(h("def"),[d("on")])),"TypeCondition",o("Directive"),"SelectionSet"],TypeCondition:[d("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[s("Number","number")],StringValue:[s("String","string")],BooleanValue:[s("Name","builtin")],NullValue:[s("Name","keyword")],EnumValue:[h("string-2")],ListValue:[u("["),o("Value"),u("]")],ObjectValue:[u("{"),o("ObjectField"),u("}")],ObjectField:[h("attribute"),u(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[u("["),"Type",u("]"),i(u("!"))],NonNullType:["NamedType",i(u("!"))],NamedType:[(f="atom",{style:f,match:e=>"Name"===e.kind,update(e,t){e.prevState&&e.prevState.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[u("@","meta"),h("meta"),i("Arguments")],SchemaDef:[d("schema"),o("Directive"),u("{"),o("OperationTypeDef"),u("}")],OperationTypeDef:[h("keyword"),u(":"),h("atom")],ScalarDef:[d("scalar"),h("atom"),o("Directive")],ObjectTypeDef:[d("type"),h("atom"),i("Implements"),o("Directive"),u("{"),o("FieldDef"),u("}")],Implements:[d("implements"),o("NamedType")],FieldDef:[h("property"),i("ArgumentsDef"),u(":"),"Type",o("Directive")],ArgumentsDef:[u("("),o("InputValueDef"),u(")")],InputValueDef:[h("attribute"),u(":"),"Type",i("DefaultValue"),o("Directive")],InterfaceDef:[d("interface"),h("atom"),o("Directive"),u("{"),o("FieldDef"),u("}")],UnionDef:[d("union"),h("atom"),o("Directive"),u("="),o("UnionMember",u("|"))],UnionMember:["NamedType"],EnumDef:[d("enum"),h("atom"),o("Directive"),u("{"),o("EnumValueDef"),u("}")],EnumValueDef:[h("string-2"),o("Directive")],InputDef:[d("input"),h("atom"),o("Directive"),u("{"),o("InputValueDef"),u("}")],ExtendDef:[d("extend"),"ObjectTypeDef"],DirectiveDef:[d("directive"),u("@","meta"),h("meta"),i("ArgumentsDef"),d("on"),o("DirectiveLocation",u("|"))],DirectiveLocation:[h("string-2")]};var f;function d(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function h(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function m(e={eatWhitespace:e=>e.eatWhile(c),lexRules:l,parseRules:p,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return v(e.parseRules,t,"Document"),t},token:(t,n)=>function(e,t,n){const{lexRules:r,parseRules:i,eatWhitespace:o,editorConfig:a}=n;t.rule&&0===t.rule.length?b(t):t.needsAdvance&&(t.needsAdvance=!1,E(t,!0));if(e.sol()){const n=a&&a.tabSize||2;t.indentLevel=Math.floor(e.indentation()/n)}if(o(e))return"ws";const s=function(e,t){const n=Object.keys(e);for(let r=0;r0&&e[e.length-1]120){for(var h=Math.floor(l/80),m=l%80,g=[],y=0;y])/g,v=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,E=/\s{2,}/g,x=/([^\(])(:+) */g,D=/[svh]\w+-[tblr]{2}/,C=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,S=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,_="-webkit-",O="-moz-",F="-ms-",N=59,I=125,M=123,j=40,L=41,P=10,R=13,B=32,U=45,z=42,V=44,q=58,H=47,W=1,G=1,K=0,J=1,Q=1,Y=1,$=0,X=0,Z=0,ee=[],te=[],ne=0,re=null,ie=0,oe=1,ae="",se="",ue="";function ce(e,t,i,o,a){for(var s,u,l=0,p=0,f=0,d=0,y=0,v=0,b=0,E=0,D=0,w=0,S=0,k=0,A=0,T=0,O=0,F=0,$=0,te=0,re=0,pe=i.length,ye=pe-1,ve="",be="",Ee="",xe="",De="",Ce="";O0&&(be=be.replace(r,"")),be.trim().length>0)){switch(b){case B:case 9:case N:case R:case P:break;default:be+=i.charAt(O)}b=N}if(1===$)switch(b){case M:case I:case N:case 34:case 39:case j:case L:case V:$=0;case 9:case R:case P:case B:break;default:for($=0,re=O,y=b,O--,b=N;re0&&(++O,b=y);case M:re=pe}}switch(b){case M:for(y=(be=be.trim()).charCodeAt(0),S=1,re=++O;O0&&(be=be.replace(r,"")),v=be.charCodeAt(1)){case 100:case 109:case 115:case U:s=t;break;default:s=ee}if(re=(Ee=ce(t,s,Ee,v,a+1)).length,Z>0&&0===re&&(re=be.length),ne>0&&(u=me(3,Ee,s=le(ee,be,te),t,G,W,re,v,a,o),be=s.join(""),void 0!==u&&0===(re=(Ee=u.trim()).length)&&(v=0,Ee="")),re>0)switch(v){case 115:be=be.replace(C,he);case 100:case 109:case U:Ee=be+"{"+Ee+"}";break;case 107:Ee=(be=be.replace(h,"$1 $2"+(oe>0?ae:"")))+"{"+Ee+"}",Ee=1===Q||2===Q&&de("@"+Ee,3)?"@"+_+Ee+"@"+Ee:"@"+Ee;break;default:Ee=be+Ee,112===o&&(xe+=Ee,Ee="")}else Ee="";break;default:Ee=ce(t,le(t,be,te),Ee,o,a+1)}De+=Ee,k=0,$=0,T=0,F=0,te=0,A=0,be="",Ee="",b=i.charCodeAt(++O);break;case I:case N:if((re=(be=(F>0?be.replace(r,""):be).trim()).length)>1)switch(0===T&&((y=be.charCodeAt(0))===U||y>96&&y<123)&&(re=(be=be.replace(" ",":")).length),ne>0&&void 0!==(u=me(1,be,t,e,G,W,xe.length,o,a,o))&&0===(re=(be=u.trim()).length)&&(be="\0\0"),y=be.charCodeAt(0),v=be.charCodeAt(1),y){case 0:break;case 64:if(105===v||99===v){Ce+=be+i.charAt(O);break}default:if(be.charCodeAt(re-1)===q)break;xe+=fe(be,y,v,be.charCodeAt(2))}k=0,$=0,T=0,F=0,te=0,be="",b=i.charCodeAt(++O)}}switch(b){case R:case P:if(p+d+f+l+X===0)switch(w){case L:case 39:case 34:case 64:case 126:case 62:case z:case 43:case H:case U:case q:case V:case N:case M:case I:break;default:T>0&&($=1)}p===H?p=0:J+k===0&&107!==o&&be.length>0&&(F=1,be+="\0"),ne*ie>0&&me(0,be,t,e,G,W,xe.length,o,a,o),W=1,G++;break;case N:case I:if(p+d+f+l===0){W++;break}default:switch(W++,ve=i.charAt(O),b){case 9:case B:if(d+l+p===0)switch(E){case V:case q:case 9:case B:ve="";break;default:b!==B&&(ve=" ")}break;case 0:ve="\\0";break;case 12:ve="\\f";break;case 11:ve="\\v";break;case 38:d+p+l===0&&J>0&&(te=1,F=1,ve="\f"+ve);break;case 108:if(d+p+l+K===0&&T>0)switch(O-T){case 2:112===E&&i.charCodeAt(O-3)===q&&(K=E);case 8:111===D&&(K=D)}break;case q:d+p+l===0&&(T=O);break;case V:p+f+d+l===0&&(F=1,ve+="\r");break;case 34:case 39:0===p&&(d=d===b?0:0===d?b:d);break;case 91:d+p+f===0&&l++;break;case 93:d+p+f===0&&l--;break;case L:d+p+l===0&&f--;break;case j:if(d+p+l===0){if(0===k)switch(2*E+3*D){case 533:break;default:S=0,k=1}f++}break;case 64:p+f+d+l+T+A===0&&(A=1);break;case z:case H:if(d+l+f>0)break;switch(p){case 0:switch(2*b+3*i.charCodeAt(O+1)){case 235:p=H;break;case 220:re=O,p=z}break;case z:b===H&&E===z&&re+2!==O&&(33===i.charCodeAt(re+2)&&(xe+=i.substring(re,O+1)),ve="",p=0)}}if(0===p){if(J+d+l+A===0&&107!==o&&b!==N)switch(b){case V:case 126:case 62:case 43:case L:case j:if(0===k){switch(E){case 9:case B:case P:case R:ve+="\0";break;default:ve="\0"+ve+(b===V?"":"\0")}F=1}else switch(b){case j:T+7===O&&108===E&&(T=0),k=++S;break;case L:0==(k=--S)&&(F=1,ve+="\0")}break;case 9:case B:switch(E){case 0:case M:case I:case N:case V:case 12:case 9:case B:case P:case R:break;default:0===k&&(F=1,ve+="\0")}}be+=ve,b!==B&&9!==b&&(w=b)}}D=E,E=b,O++}if(re=xe.length,Z>0&&0===re&&0===De.length&&0===t[0].length==0&&(109!==o||1===t.length&&(J>0?se:ue)===t[0])&&(re=t.join(",").length+2),re>0){if(s=0===J&&107!==o?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(f=u.charCodeAt(u.length-1),d=n.charCodeAt(0),t="",0!==l)switch(f){case z:case 126:case 62:case 43:case B:case j:break;default:t=" "}switch(d){case 38:n=t+se;case 126:case 62:case 43:case B:case L:case j:break;case 91:n=t+n+se;break;case q:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(Y>0){n=t+n.substring(8,p-1);break}default:(l<1||s[l-1].length<1)&&(n=t+se+n)}break;case V:t="";default:n=p>1&&n.indexOf(":")>0?t+n.replace(x,"$1"+se+"$2"):t+n+se}u+=n}a[i]=u.replace(r,"").trim()}return a}(t):t,ne>0&&void 0!==(u=me(2,xe,s,e,G,W,re,o,a,o))&&0===(xe=u).length)return Ce+xe+De;if(xe=s.join(",")+"{"+xe+"}",Q*K!=0){switch(2!==Q||de(xe,2)||(K=0),K){case 111:xe=xe.replace(g,":-moz-$1")+xe;break;case 112:xe=xe.replace(m,"::"+_+"input-$1")+xe.replace(m,"::-moz-$1")+xe.replace(m,":-ms-input-$1")+xe}K=0}}return Ce+xe+De}function le(e,t,n){var r=t.trim().split(l),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,u=0===a?"":e[0]+" ";s0&&J>0)return i.replace(f,"$1").replace(p,"$1"+ue);break;default:return e.trim()+i.replace(p,"$1"+e.trim())}default:if(n*J>0&&i.indexOf("\f")>0)return i.replace(p,(e.charCodeAt(0)===q?"":"$1")+e.trim())}return e+i}function fe(e,t,n,r){var c,l=0,p=e+";",f=2*t+3*n+4*r;if(944===f)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*oe){case 0:break;case U:if(110!==e.charCodeAt(10))break;default:var o=i.split((i="",s)),a=0;for(n=0,t=o.length;a64&&p<90||p>96&&p<123||95===p||p===U&&c.charCodeAt(1)!==U))switch(isNaN(parseFloat(c))+(-1!==c.indexOf("("))){case 1:switch(c){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:c+=ae}}l[n++]=c}i+=(0===a?"":",")+l.join(" ")}}return i=r+i+";",1===Q||2===Q&&de(i,1)?_+i+i:i}(p);if(0===Q||2===Q&&!de(p,1))return p;switch(f){case 1015:return 97===p.charCodeAt(10)?_+p+p:p;case 951:return 116===p.charCodeAt(3)?_+p+p:p;case 963:return 110===p.charCodeAt(5)?_+p+p:p;case 1009:if(100!==p.charCodeAt(4))break;case 969:case 942:return _+p+p;case 978:return _+p+O+p+p;case 1019:case 983:return _+p+O+p+F+p+p;case 883:return p.charCodeAt(8)===U?_+p+p:p.indexOf("image-set(",11)>0?p.replace(T,"$1"+_+"$2")+p:p;case 932:if(p.charCodeAt(4)===U)switch(p.charCodeAt(5)){case 103:return _+"box-"+p.replace("-grow","")+_+p+F+p.replace("grow","positive")+p;case 115:return _+p+F+p.replace("shrink","negative")+p;case 98:return _+p+F+p.replace("basis","preferred-size")+p}return _+p+F+p+p;case 964:return _+p+F+"flex-"+p+p;case 1023:if(99!==p.charCodeAt(8))break;return c=p.substring(p.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),_+"box-pack"+c+_+p+F+"flex-pack"+c+p;case 1005:return o.test(p)?p.replace(i,":"+_)+p.replace(i,":"+O)+p:p;case 1e3:switch(l=(c=p.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(l)){case 226:c=p.replace(D,"tb");break;case 232:c=p.replace(D,"tb-rl");break;case 220:c=p.replace(D,"lr");break;default:return p}return _+p+F+c+p;case 1017:if(-1===p.indexOf("sticky",9))return p;case 975:switch(l=(p=e).length-10,f=(c=(33===p.charCodeAt(l)?p.substring(0,l):p).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(c.charCodeAt(8)<111)break;case 115:p=p.replace(c,_+c)+";"+p;break;case 207:case 102:p=p.replace(c,_+(f>102?"inline-":"")+"box")+";"+p.replace(c,_+c)+";"+p.replace(c,F+c+"box")+";"+p}return p+";";case 938:if(p.charCodeAt(5)===U)switch(p.charCodeAt(6)){case 105:return c=p.replace("-items",""),_+p+_+"box-"+c+F+"flex-"+c+p;case 115:return _+p+F+"flex-item-"+p.replace(S,"")+p;default:return _+p+F+"flex-line-pack"+p.replace("align-content","").replace(S,"")+p}break;case 973:case 989:if(p.charCodeAt(3)!==U||122===p.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?fe(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):p.replace(c,_+c)+p.replace(c,O+c.replace("fill-",""))+p;break;case 962:if(p=_+p+(102===p.charCodeAt(5)?F+p:"")+p,n+r===211&&105===p.charCodeAt(13)&&p.indexOf("transform",10)>0)return p.substring(0,p.indexOf(";",27)+1).replace(a,"$1"+_+"$2")+p}return p}function de(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return re(2!==t?r:r.replace(k,"$1"),i,t)}function he(e,t){var n=fe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function me(e,t,n,r,i,o,a,s,u,c){for(var l,p=0,f=t;p0&&(ae=i.replace(d,91===o?"":"-")),o=1,1===J?ue=i:se=i;var a,s=[ue];ne>0&&void 0!==(a=me(-1,n,s,s,G,W,0,0,0,0))&&"string"==typeof a&&(n=a);var u=ce(ee,s,n,0,0);return ne>0&&void 0!==(a=me(-2,u,s,s,G,W,u.length,0,0,0))&&"string"!=typeof(u=a)&&(o=0),ae="",ue="",se="",K=0,G=1,W=1,$*o==0?u:u.replace(r,"").replace(y,"").replace(v,"$1").replace(b,"$1").replace(E," ")}return ve.use=function e(t){switch(t){case void 0:case null:ne=te.length=0;break;default:if("function"==typeof t)te[ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n0&&e.selectionSet.selections[0].name.value),"subscription"===e.operation&&(t=!0),"query"===e.operation&&(n=!0),"mutation"===e.operation&&(r=!0)})),{firstOperationName:i,subscription:t,query:n,mutation:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMove=t.sortableHandle=t.sortableElement=t.sortableContainer=t.SortableHandle=t.SortableElement=t.SortableContainer=void 0;var r=n(102);Object.defineProperty(t,"arrayMove",{enumerable:!0,get:function(){return r.arrayMove}});var i=s(n(287)),o=s(n(289)),a=s(n(290));function s(e){return e&&e.__esModule?e:{default:e}}t.SortableContainer=i.default,t.SortableElement=o.default,t.SortableHandle=a.default,t.sortableContainer=i.default,t.sortableElement=o.default,t.sortableHandle=a.default},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),a=n(49),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(o.Record({history:!1,headers:!0,allTabs:!0,shareUrl:null}));t.SharingState=s,t.default=a.handleActions({TOGGLE_SHARE_HISTORY:function(e){return e.set("history",!e.history)},TOGGLE_SHARE_HEADERS:function(e){return e.set("headers",!e.headers)},TOGGLE_SHARE_ALL_TABS:function(e){return e.set("allTabs",!e.allTabs)},SET_SHARE_URL:function(e,t){var n=t.payload.shareUrl;return e.set("shareUrl",n)}},new s)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),a=n(49),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(o.Record({historyOpen:!1,fixedEndpoint:!1,endpoint:"",configString:"",envVars:{}}));t.GeneralState=s,t.default=a.handleActions({OPEN_HISTORY:function(e){return e.set("historyOpen",!0)},CLOSE_HISTORY:function(e){return e.set("historyOpen",!1)},SET_ENDPOINT_DISABLED:function(e,t){var n=t.payload.value;return e.set("endpointDisabled",n)},SET_CONFIG_STRING:function(e,t){var n=t.payload.configString;return e.set("configString",n)}},new s)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1;const m=(e,t,n)=>{const r=e[f].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[d]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},y=e=>{if(e[o]>e[i])for(let t=e[p].tail;e[o]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[f].delete(n.key),e[p].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const E=(e,t,n,r)=>{let i=n.value;g(e,i)&&(v(e,n),e[s]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[o]=0,this[p].forEach(e=>{e.length=this[a](e.value,e.key),this[o]+=e.length})),y(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;E(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;E(this,e,n,t),n=r}}keys(){return this[p].toArray().map(e=>e.key)}values(){return this[p].toArray().map(e=>e.value)}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach(e=>this[c](e.key,e.value)),this[f]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[f].has(e)){if(s>this[i])return v(this,this[f].get(e)),!1;const a=this[f].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,r,n);return d.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=d.length,this[p].unshift(d),this[f].set(e,this[p].head),y(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[f].forEach((e,t)=>m(this,t,!1))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(42);t.getSharingState=r.createSelector([i.getSelectedWorkspace],(function(e){return e.sharing}));var o=function(e){return r.createSelector([t.getSharingState],(function(t){return t.get(e)}))};t.getSharingHistory=o("history"),t.getSharingHeaders=o("headers"),t.getSharingAllTabs=o("allTabs"),t.getShareUrl=o("shareUrl")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)}; + */(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",c="[object Array]",l="[object Boolean]",p="[object Date]",f="[object Error]",d="[object Function]",h="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",v="[object RegExp]",b="[object Set]",E="[object String]",x="[object Symbol]",D="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",S="[object Float32Array]",_="[object Float64Array]",k="[object Int8Array]",A="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",F="[object Uint16Array]",N="[object Uint32Array]",I=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,R=RegExp(L.source),B=RegExp(P.source),U=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,K=RegExp(G.source),J=/^\s+|\s+$/g,Q=/^\s+/,Y=/\s+$/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,pe=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="[\\ud800-\\udfff]",me="["+de+"]",ge="["+fe+"]",ye="\\d+",ve="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xe="\\ud83c[\\udffb-\\udfff]",De="[^\\ud800-\\udfff]",Ce="(?:\\ud83c[\\udde6-\\uddff]){2}",we="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="[A-Z\\xc0-\\xd6\\xd8-\\xde]",_e="(?:"+be+"|"+Ee+")",ke="(?:"+Se+"|"+Ee+")",Ae="(?:"+ge+"|"+xe+")"+"?",Te="[\\ufe0e\\ufe0f]?"+Ae+("(?:\\u200d(?:"+[De,Ce,we].join("|")+")[\\ufe0e\\ufe0f]?"+Ae+")*"),Oe="(?:"+[ve,Ce,we].join("|")+")"+Te,Fe="(?:"+[De+ge+"?",ge,Ce,we,he].join("|")+")",Ne=RegExp("['’]","g"),Ie=RegExp(ge,"g"),Me=RegExp(xe+"(?="+xe+")|"+Fe+Te,"g"),je=RegExp([Se+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[me,Se,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[me,Se+_e,"$"].join("|")+")",Se+"?"+_e+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Se+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Oe].join("|"),"g"),Le=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Be=-1,Ue={};Ue[S]=Ue[_]=Ue[k]=Ue[A]=Ue[T]=Ue[O]=Ue["[object Uint8ClampedArray]"]=Ue[F]=Ue[N]=!0,Ue[u]=Ue[c]=Ue[C]=Ue[l]=Ue[w]=Ue[p]=Ue[f]=Ue[d]=Ue[m]=Ue[g]=Ue[y]=Ue[v]=Ue[b]=Ue[E]=Ue[D]=!1;var ze={};ze[u]=ze[c]=ze[C]=ze[w]=ze[l]=ze[p]=ze[S]=ze[_]=ze[k]=ze[A]=ze[T]=ze[m]=ze[g]=ze[y]=ze[v]=ze[b]=ze[E]=ze[x]=ze[O]=ze["[object Uint8ClampedArray]"]=ze[F]=ze[N]=!0,ze[f]=ze[d]=ze[D]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=parseFloat,He=parseInt,We="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ke=We||Ge||Function("return this")(),Je=t&&!t.nodeType&&t,Qe=Je&&"object"==typeof r&&r&&!r.nodeType&&r,Ye=Qe&&Qe.exports===Je,$e=Ye&&We.process,Xe=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||$e&&$e.binding&&$e.binding("util")}catch(e){}}(),Ze=Xe&&Xe.isArrayBuffer,et=Xe&&Xe.isDate,tt=Xe&&Xe.isMap,nt=Xe&&Xe.isRegExp,rt=Xe&&Xe.isSet,it=Xe&&Xe.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function ft(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Mt(e,t){for(var n=e.length;n--&&xt(t,e[n],0)>-1;);return n}function jt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Lt=_t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=_t({"&":"&","<":"<",">":">",'"':""","'":"'"});function Rt(e){return"\\"+Ve[e]}function Bt(e){return Le.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Vt(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Jt=function e(t){var n,r=(t=null==t?Ke:Jt.defaults(Ke.Object(),t,Jt.pick(Ke,Re))).Array,i=t.Date,fe=t.Error,de=t.Function,he=t.Math,me=t.Object,ge=t.RegExp,ye=t.String,ve=t.TypeError,be=r.prototype,Ee=de.prototype,xe=me.prototype,De=t["__core-js_shared__"],Ce=Ee.toString,we=xe.hasOwnProperty,Se=0,_e=(n=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=xe.toString,Ae=Ce.call(me),Te=Ke._,Oe=ge("^"+Ce.call(we).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=Ye?t.Buffer:void 0,Me=t.Symbol,Le=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:void 0,We=zt(me.getPrototypeOf,me),Ge=me.create,Je=xe.propertyIsEnumerable,Qe=be.splice,$e=Me?Me.isConcatSpreadable:void 0,Xe=Me?Me.iterator:void 0,vt=Me?Me.toStringTag:void 0,_t=function(){try{var e=Zi(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),Qt=t.clearTimeout!==Ke.clearTimeout&&t.clearTimeout,Yt=i&&i.now!==Ke.Date.now&&i.now,$t=t.setTimeout!==Ke.setTimeout&&t.setTimeout,Xt=he.ceil,Zt=he.floor,en=me.getOwnPropertySymbols,tn=Fe?Fe.isBuffer:void 0,nn=t.isFinite,rn=be.join,on=zt(me.keys,me),an=he.max,sn=he.min,un=i.now,cn=t.parseInt,ln=he.random,pn=be.reverse,fn=Zi(t,"DataView"),dn=Zi(t,"Map"),hn=Zi(t,"Promise"),mn=Zi(t,"Set"),gn=Zi(t,"WeakMap"),yn=Zi(me,"create"),vn=gn&&new gn,bn={},En=ko(fn),xn=ko(dn),Dn=ko(hn),Cn=ko(mn),wn=ko(gn),Sn=Me?Me.prototype:void 0,_n=Sn?Sn.valueOf:void 0,kn=Sn?Sn.toString:void 0;function An(e){if(Ha(e)&&!Ia(e)&&!(e instanceof Nn)){if(e instanceof Fn)return e;if(we.call(e,"__wrapped__"))return Ao(e)}return new Fn(e)}var Tn=function(){function e(){}return function(t){if(!qa(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function On(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Nn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Yn(e,t,n,r,i,o){var a,s=1&t,c=2&t,f=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!qa(e))return e;var D=Ia(e);if(D){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&we.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return yi(e,a)}else{var I=no(e),M=I==d||I==h;if(Pa(e))return pi(e,s);if(I==y||I==u||M&&!i){if(a=c||M?{}:io(e),!s)return c?function(e,t){return vi(e,to(e),t)}(e,function(e,t){return e&&vi(t,xs(t),e)}(a,e)):function(e,t){return vi(e,eo(e),t)}(e,Gn(a,e))}else{if(!ze[I])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case C:return fi(e);case l:case p:return new r(+e);case w:return function(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case S:case _:case k:case A:case T:case O:case"[object Uint8ClampedArray]":case F:case N:return di(e,n);case m:return new r;case g:case E:return new r(e);case v:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case x:return i=e,_n?me(_n.call(i)):{}}var i}(e,I,s)}}o||(o=new Pn);var j=o.get(e);if(j)return j;o.set(e,a),Qa(e)?e.forEach((function(r){a.add(Yn(r,t,n,r,e,o))})):Wa(e)&&e.forEach((function(r,i){a.set(i,Yn(r,t,n,i,e,o))}));var L=D?void 0:(f?c?Gi:Wi:c?xs:Es)(e);return st(L||e,(function(r,i){L&&(r=e[i=r]),qn(a,i,Yn(r,t,n,i,e,o))})),a}function $n(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function Xn(e,t,n){if("function"!=typeof e)throw new ve(o);return Eo((function(){e.apply(void 0,n)}),t)}function Zn(e,t,n,r){var i=-1,o=pt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=dt(t,Ot(n))),r?(o=ft,a=!1):t.length>=200&&(o=Nt,a=!1,t=new Ln(t));e:for(;++i-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(dn||Mn),string:new In}},jn.prototype.delete=function(e){var t=$i(this,e).delete(e);return this.size-=t?1:0,t},jn.prototype.get=function(e){return $i(this,e).get(e)},jn.prototype.has=function(e){return $i(this,e).has(e)},jn.prototype.set=function(e,t){var n=$i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},Pn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pn.prototype.get=function(e){return this.__data__.get(e)},Pn.prototype.has=function(e){return this.__data__.has(e)},Pn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jn(r)}return n.set(e,t),this.size=n.size,this};var er=xi(ur),tr=xi(cr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?or(s,t-1,n,r,i):ht(i,s):r||(i[i.length]=s)}return i}var ar=Di(),sr=Di(!0);function ur(e,t){return e&&ar(e,t,Es)}function cr(e,t){return e&&sr(e,t,Es)}function lr(e,t){return lt(t,(function(t){return Ua(e[t])}))}function pr(e,t){for(var n=0,r=(t=si(t,e)).length;null!=e&&nt}function mr(e,t){return null!=e&&we.call(e,t)}function gr(e,t){return null!=e&&t in me(e)}function yr(e,t,n){for(var i=n?ft:pt,o=e[0].length,a=e.length,s=a,u=r(a),c=1/0,l=[];s--;){var p=e[s];s&&t&&(p=dt(p,Ot(t))),c=sn(p.length,c),u[s]=!n&&(t||o>=120&&p.length>=120)?new Ln(s&&p):void 0}p=e[0];var f=-1,d=u[0];e:for(;++f=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ir(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Qe.call(s,u,1),Qe.call(e,u,1);return e}function jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ao(i)?Qe.call(e,i,1):Zr(e,i)}}return e}function Lr(e,t){return e+Zt(ln()*(t-e+1))}function Pr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Zt(t/2))&&(e+=e)}while(t);return n}function Rr(e,t){return xo(mo(e,t,Gs),e+"")}function Br(e){return Bn(Ts(e))}function Ur(e,t){var n=Ts(e);return wo(n,Qn(t,0,n.length))}function zr(e,t,n,r){if(!qa(e))return e;for(var i=-1,o=(t=si(t,e)).length,a=o-1,s=e;null!=s&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!$a(a)&&(n?a<=t:a=200){var c=t?null:Pi(e);if(c)return qt(c);a=!1,i=Nt,u=new Ln}else u=t?[]:s;e:for(;++r=r?e:Wr(e,t,n)}var li=Qt||function(e){return Ke.clearTimeout(e)};function pi(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function fi(e){var t=new e.constructor(e.byteLength);return new Le(t).set(new Le(e)),t}function di(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function hi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=$a(e),a=void 0!==t,s=null===t,u=t==t,c=$a(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&so(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=me(t);++r-1?i[o?t[a]:a]:void 0}}function ki(e){return Hi((function(t){var n=t.length,r=n,i=Fn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ve(o);if(i&&!s&&"wrapper"==Ji(a))var s=new Fn([],!0)}for(r=s?r:n;++r1&&b.reverse(),p&&cs))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,p=!0,f=2&n?new Ln:void 0;for(o.set(e,t),o.set(t,e);++l-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace($,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!pt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(r),n)))}function Co(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Jo(e,n)}));function ta(e){var t=An(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Hi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Nn&&ao(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Fn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var ia=bi((function(e,t,n){we.call(e,n)?++e[n]:Kn(e,n,1)}));var oa=_i(No),aa=_i(Io);function sa(e,t){return(Ia(e)?st:er)(e,Yi(t,3))}function ua(e,t){return(Ia(e)?ut:tr)(e,Yi(t,3))}var ca=bi((function(e,t,n){we.call(e,n)?e[n].push(t):Kn(e,n,[t])}));var la=Rr((function(e,t,n){var i=-1,o="function"==typeof t,a=ja(e)?r(e.length):[];return er(e,(function(e){a[++i]=o?ot(t,e,n):vr(e,t,n)})),a})),pa=bi((function(e,t,n){Kn(e,n,t)}));function fa(e,t){return(Ia(e)?dt:kr)(e,Yi(t,3))}var da=bi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Rr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&so(e,t[0],t[1])?t=[]:n>2&&so(t[0],t[1],t[2])&&(t=[t[0]]),Nr(e,or(t,1),[])})),ma=Yt||function(){return Ke.Date.now()};function ga(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ya(e,t){var n;if("function"!=typeof t)throw new ve(o);return e=rs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var va=Rr((function(e,t,n){var r=1;if(n.length){var i=Vt(n,Qi(va));r|=32}return Bi(e,r,t,n,i)})),ba=Rr((function(e,t,n){var r=3;if(n.length){var i=Vt(n,Qi(ba));r|=32}return Bi(t,r,e,n,i)}));function Ea(e,t,n){var r,i,a,s,u,c,l=0,p=!1,f=!1,d=!0;if("function"!=typeof e)throw new ve(o);function h(t){var n=r,o=i;return r=i=void 0,l=t,s=e.apply(o,n)}function m(e){return l=e,u=Eo(y,t),p?h(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-l>=a}function y(){var e=ma();if(g(e))return v(e);u=Eo(y,function(e){var n=t-(e-c);return f?sn(n,a-(e-l)):n}(e))}function v(e){return u=void 0,d&&r?h(e):(r=i=void 0,s)}function b(){var e=ma(),n=g(e);if(r=arguments,i=this,c=e,n){if(void 0===u)return m(c);if(f)return li(u),u=Eo(y,t),h(c)}return void 0===u&&(u=Eo(y,t)),s}return t=os(t)||0,qa(n)&&(p=!!n.leading,a=(f="maxWait"in n)?an(os(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==u&&li(u),l=0,r=c=i=u=void 0},b.flush=function(){return void 0===u?s:v(ma())},b}var xa=Rr((function(e,t){return Xn(e,1,t)})),Da=Rr((function(e,t,n){return Xn(e,os(t)||0,n)}));function Ca(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ca.Cache||jn),n}function wa(e){if("function"!=typeof e)throw new ve(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ca.Cache=jn;var Sa=ui((function(e,t){var n=(t=1==t.length&&Ia(t[0])?dt(t[0],Ot(Yi())):dt(or(t,1),Ot(Yi()))).length;return Rr((function(r){for(var i=-1,o=sn(r.length,n);++i=t})),Na=br(function(){return arguments}())?br:function(e){return Ha(e)&&we.call(e,"callee")&&!Je.call(e,"callee")},Ia=r.isArray,Ma=Ze?Ot(Ze):function(e){return Ha(e)&&dr(e)==C};function ja(e){return null!=e&&Va(e.length)&&!Ua(e)}function La(e){return Ha(e)&&ja(e)}var Pa=tn||ou,Ra=et?Ot(et):function(e){return Ha(e)&&dr(e)==p};function Ba(e){if(!Ha(e))return!1;var t=dr(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ka(e)}function Ua(e){if(!qa(e))return!1;var t=dr(e);return t==d||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==rs(e)}function Va(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ha(e){return null!=e&&"object"==typeof e}var Wa=tt?Ot(tt):function(e){return Ha(e)&&no(e)==m};function Ga(e){return"number"==typeof e||Ha(e)&&dr(e)==g}function Ka(e){if(!Ha(e)||dr(e)!=y)return!1;var t=We(e);if(null===t)return!0;var n=we.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ce.call(n)==Ae}var Ja=nt?Ot(nt):function(e){return Ha(e)&&dr(e)==v};var Qa=rt?Ot(rt):function(e){return Ha(e)&&no(e)==b};function Ya(e){return"string"==typeof e||!Ia(e)&&Ha(e)&&dr(e)==E}function $a(e){return"symbol"==typeof e||Ha(e)&&dr(e)==x}var Xa=it?Ot(it):function(e){return Ha(e)&&Va(e.length)&&!!Ue[dr(e)]};var Za=Mi(_r),es=Mi((function(e,t){return e<=t}));function ts(e){if(!e)return[];if(ja(e))return Ya(e)?Gt(e):yi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=no(e);return(t==m?Ut:t==b?qt:Ts)(e)}function ns(e){return e?(e=os(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function rs(e){var t=ns(e),n=t%1;return t==t?n?t-n:t:0}function is(e){return e?Qn(rs(e),0,4294967295):0}function os(e){if("number"==typeof e)return e;if($a(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(J,"");var n=oe.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function as(e){return vi(e,xs(e))}function ss(e){return null==e?"":$r(e)}var us=Ei((function(e,t){if(po(t)||ja(t))vi(t,Es(t),e);else for(var n in t)we.call(t,n)&&qn(e,n,t[n])})),cs=Ei((function(e,t){vi(t,xs(t),e)})),ls=Ei((function(e,t,n,r){vi(t,xs(t),e,r)})),ps=Ei((function(e,t,n,r){vi(t,Es(t),e,r)})),fs=Hi(Jn);var ds=Rr((function(e,t){e=me(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&so(t[0],t[1],i)&&(r=1);++n1),t})),vi(e,Gi(e),n),r&&(n=Yn(n,7,Vi));for(var i=t.length;i--;)Zr(n,t[i]);return n}));var Ss=Hi((function(e,t){return null==e?{}:function(e,t){return Ir(e,t,(function(t,n){return gs(e,n)}))}(e,t)}));function _s(e,t){if(null==e)return{};var n=dt(Gi(e),(function(e){return[e]}));return t=Yi(t),Ir(e,n,(function(e,n){return t(e,n[0])}))}var ks=Ri(Es),As=Ri(xs);function Ts(e){return null==e?[]:Ft(e,Es(e))}var Os=wi((function(e,t,n){return t=t.toLowerCase(),e+(n?Fs(t):t)}));function Fs(e){return Bs(ss(e).toLowerCase())}function Ns(e){return(e=ss(e))&&e.replace(ce,Lt).replace(Ie,"")}var Is=wi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ms=wi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),js=Ci("toLowerCase");var Ls=wi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ps=wi((function(e,t,n){return e+(n?" ":"")+Bs(t)}));var Rs=wi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Bs=Ci("toUpperCase");function Us(e,t,n){return e=ss(e),void 0===(t=n?void 0:t)?function(e){return Pe.test(e)}(e)?function(e){return e.match(je)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var zs=Rr((function(e,t){try{return ot(e,void 0,t)}catch(e){return Ba(e)?e:new fe(e)}})),Vs=Hi((function(e,t){return st(t,(function(t){t=_o(t),Kn(e,t,va(e[t],e))})),e}));function qs(e){return function(){return e}}var Hs=ki(),Ws=ki(!0);function Gs(e){return e}function Ks(e){return Cr("function"==typeof e?e:Yn(e,1))}var Js=Rr((function(e,t){return function(n){return vr(n,e,t)}})),Qs=Rr((function(e,t){return function(n){return vr(e,n,t)}}));function Ys(e,t,n){var r=Es(t),i=lr(t,r);null!=n||qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=lr(t,Es(t)));var o=!(qa(n)&&"chain"in n&&!n.chain),a=Ua(e);return st(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=yi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function $s(){}var Xs=Fi(dt),Zs=Fi(ct),eu=Fi(yt);function tu(e){return uo(e)?St(_o(e)):function(e){return function(t){return pr(t,e)}}(e)}var nu=Ii(),ru=Ii(!0);function iu(){return[]}function ou(){return!1}var au=Oi((function(e,t){return e+t}),0),su=Li("ceil"),uu=Oi((function(e,t){return e/t}),1),cu=Li("floor");var lu,pu=Oi((function(e,t){return e*t}),1),fu=Li("round"),du=Oi((function(e,t){return e-t}),0);return An.after=function(e,t){if("function"!=typeof t)throw new ve(o);return e=rs(e),function(){if(--e<1)return t.apply(this,arguments)}},An.ary=ga,An.assign=us,An.assignIn=cs,An.assignInWith=ls,An.assignWith=ps,An.at=fs,An.before=ya,An.bind=va,An.bindAll=Vs,An.bindKey=ba,An.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ia(e)?e:[e]},An.chain=ta,An.chunk=function(e,t,n){t=(n?so(e,t,n):void 0===t)?1:an(rs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=r(Xt(i/t));oi?0:i+n),(r=void 0===r||r>i?i:rs(r))<0&&(r+=i),r=n>r?0:is(r);n>>0)?(e=ss(e))&&("string"==typeof t||null!=t&&!Ja(t))&&!(t=$r(t))&&Bt(e)?ci(Gt(e),0,n):e.split(t,n):[]},An.spread=function(e,t){if("function"!=typeof e)throw new ve(o);return t=null==t?0:an(rs(t),0),Rr((function(n){var r=n[t],i=ci(n,0,t);return r&&ht(i,r),ot(e,this,i)}))},An.tail=function(e){var t=null==e?0:e.length;return t?Wr(e,1,t):[]},An.take=function(e,t,n){return e&&e.length?Wr(e,0,(t=n||void 0===t?1:rs(t))<0?0:t):[]},An.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=r-(t=n||void 0===t?1:rs(t)))<0?0:t,r):[]},An.takeRightWhile=function(e,t){return e&&e.length?ti(e,Yi(t,3),!1,!0):[]},An.takeWhile=function(e,t){return e&&e.length?ti(e,Yi(t,3)):[]},An.tap=function(e,t){return t(e),e},An.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ve(o);return qa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ea(e,t,{leading:r,maxWait:t,trailing:i})},An.thru=na,An.toArray=ts,An.toPairs=ks,An.toPairsIn=As,An.toPath=function(e){return Ia(e)?dt(e,_o):$a(e)?[e]:yi(So(ss(e)))},An.toPlainObject=as,An.transform=function(e,t,n){var r=Ia(e),i=r||Pa(e)||Xa(e);if(t=Yi(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:qa(e)&&Ua(o)?Tn(We(e)):{}}return(i?st:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},An.unary=function(e){return ga(e,1)},An.union=Ho,An.unionBy=Wo,An.unionWith=Go,An.uniq=function(e){return e&&e.length?Xr(e):[]},An.uniqBy=function(e,t){return e&&e.length?Xr(e,Yi(t,2)):[]},An.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Xr(e,void 0,t):[]},An.unset=function(e,t){return null==e||Zr(e,t)},An.unzip=Ko,An.unzipWith=Jo,An.update=function(e,t,n){return null==e?e:ei(e,t,ai(n))},An.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ei(e,t,ai(n),r)},An.values=Ts,An.valuesIn=function(e){return null==e?[]:Ft(e,xs(e))},An.without=Qo,An.words=Us,An.wrap=function(e,t){return _a(ai(t),e)},An.xor=Yo,An.xorBy=$o,An.xorWith=Xo,An.zip=Zo,An.zipObject=function(e,t){return ii(e||[],t||[],qn)},An.zipObjectDeep=function(e,t){return ii(e||[],t||[],zr)},An.zipWith=ea,An.entries=ks,An.entriesIn=As,An.extend=cs,An.extendWith=ls,Ys(An,An),An.add=au,An.attempt=zs,An.camelCase=Os,An.capitalize=Fs,An.ceil=su,An.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=os(n))==n?n:0),void 0!==t&&(t=(t=os(t))==t?t:0),Qn(os(e),t,n)},An.clone=function(e){return Yn(e,4)},An.cloneDeep=function(e){return Yn(e,5)},An.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},An.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},An.conformsTo=function(e,t){return null==t||$n(e,t,Es(t))},An.deburr=Ns,An.defaultTo=function(e,t){return null==e||e!=e?t:e},An.divide=uu,An.endsWith=function(e,t,n){e=ss(e),t=$r(t);var r=e.length,i=n=void 0===n?r:Qn(rs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},An.eq=Ta,An.escape=function(e){return(e=ss(e))&&B.test(e)?e.replace(P,Pt):e},An.escapeRegExp=function(e){return(e=ss(e))&&K.test(e)?e.replace(G,"\\$&"):e},An.every=function(e,t,n){var r=Ia(e)?ct:nr;return n&&so(e,t,n)&&(t=void 0),r(e,Yi(t,3))},An.find=oa,An.findIndex=No,An.findKey=function(e,t){return bt(e,Yi(t,3),ur)},An.findLast=aa,An.findLastIndex=Io,An.findLastKey=function(e,t){return bt(e,Yi(t,3),cr)},An.floor=cu,An.forEach=sa,An.forEachRight=ua,An.forIn=function(e,t){return null==e?e:ar(e,Yi(t,3),xs)},An.forInRight=function(e,t){return null==e?e:sr(e,Yi(t,3),xs)},An.forOwn=function(e,t){return e&&ur(e,Yi(t,3))},An.forOwnRight=function(e,t){return e&&cr(e,Yi(t,3))},An.get=ms,An.gt=Oa,An.gte=Fa,An.has=function(e,t){return null!=e&&ro(e,t,mr)},An.hasIn=gs,An.head=jo,An.identity=Gs,An.includes=function(e,t,n,r){e=ja(e)?e:Ts(e),n=n&&!r?rs(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Ya(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xt(e,t,n)>-1},An.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:rs(n);return i<0&&(i=an(r+i,0)),xt(e,t,i)},An.inRange=function(e,t,n){return t=ns(t),void 0===n?(n=t,t=0):n=ns(n),function(e,t,n){return e>=sn(t,n)&&e=-9007199254740991&&e<=9007199254740991},An.isSet=Qa,An.isString=Ya,An.isSymbol=$a,An.isTypedArray=Xa,An.isUndefined=function(e){return void 0===e},An.isWeakMap=function(e){return Ha(e)&&no(e)==D},An.isWeakSet=function(e){return Ha(e)&&"[object WeakSet]"==dr(e)},An.join=function(e,t){return null==e?"":rn.call(e,t)},An.kebabCase=Is,An.last=Bo,An.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=rs(n))<0?an(r+i,0):sn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Et(e,Ct,i,!0)},An.lowerCase=Ms,An.lowerFirst=js,An.lt=Za,An.lte=es,An.max=function(e){return e&&e.length?rr(e,Gs,hr):void 0},An.maxBy=function(e,t){return e&&e.length?rr(e,Yi(t,2),hr):void 0},An.mean=function(e){return wt(e,Gs)},An.meanBy=function(e,t){return wt(e,Yi(t,2))},An.min=function(e){return e&&e.length?rr(e,Gs,_r):void 0},An.minBy=function(e,t){return e&&e.length?rr(e,Yi(t,2),_r):void 0},An.stubArray=iu,An.stubFalse=ou,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=pu,An.nth=function(e,t){return e&&e.length?Fr(e,rs(t)):void 0},An.noConflict=function(){return Ke._===this&&(Ke._=Te),this},An.noop=$s,An.now=ma,An.pad=function(e,t,n){e=ss(e);var r=(t=rs(t))?Wt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ni(Zt(i),n)+e+Ni(Xt(i),n)},An.padEnd=function(e,t,n){e=ss(e);var r=(t=rs(t))?Wt(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=ln();return sn(e+i*(t-e+qe("1e-"+((i+"").length-1))),t)}return Lr(e,t)},An.reduce=function(e,t,n){var r=Ia(e)?mt:kt,i=arguments.length<3;return r(e,Yi(t,4),n,i,er)},An.reduceRight=function(e,t,n){var r=Ia(e)?gt:kt,i=arguments.length<3;return r(e,Yi(t,4),n,i,tr)},An.repeat=function(e,t,n){return t=(n?so(e,t,n):void 0===t)?1:rs(t),Pr(ss(e),t)},An.replace=function(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])},An.result=function(e,t,n){var r=-1,i=(t=si(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=sn(e,4294967295);e-=4294967295;for(var i=Tt(r,t=Yi(t));++n=o)return e;var s=n-Wt(r);if(s<1)return r;var u=a?ci(a,0,s).join(""):e.slice(0,s);if(void 0===i)return u+r;if(a&&(s+=u.length-s),Ja(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=ge(i.source,ss(re.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var p=c.index;u=u.slice(0,void 0===p?s:p)}}else if(e.indexOf($r(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},An.unescape=function(e){return(e=ss(e))&&R.test(e)?e.replace(L,Kt):e},An.uniqueId=function(e){var t=++Se;return ss(e)+t},An.upperCase=Rs,An.upperFirst=Bs,An.each=sa,An.eachRight=ua,An.first=jo,Ys(An,(lu={},ur(An,(function(e,t){we.call(An.prototype,t)||(lu[t]=e)})),lu),{chain:!1}),An.VERSION="4.17.15",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){An[e].placeholder=An})),st(["drop","take"],(function(e,t){Nn.prototype[e]=function(n){n=void 0===n?1:an(rs(n),0);var r=this.__filtered__&&!t?new Nn(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Nn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Nn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Yi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Nn.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Nn.prototype[e]=function(){return this.__filtered__?new Nn(this):this[n](1)}})),Nn.prototype.compact=function(){return this.filter(Gs)},Nn.prototype.find=function(e){return this.filter(e).head()},Nn.prototype.findLast=function(e){return this.reverse().find(e)},Nn.prototype.invokeMap=Rr((function(e,t){return"function"==typeof e?new Nn(this):this.map((function(n){return vr(n,e,t)}))})),Nn.prototype.reject=function(e){return this.filter(wa(Yi(e)))},Nn.prototype.slice=function(e,t){e=rs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Nn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=rs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Nn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Nn.prototype.toArray=function(){return this.take(4294967295)},ur(Nn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=An[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(An.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Nn,u=a[0],c=s||Ia(t),l=function(e){var t=i.apply(An,ht([e],a));return r&&p?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var p=this.__chain__,f=!!this.__actions__.length,d=o&&!p,h=s&&!f;if(!o&&c){t=h?t:new Nn(this);var m=e.apply(t,a);return m.__actions__.push({func:na,args:[l],thisArg:void 0}),new Fn(m,p)}return d&&h?e.apply(this,a):(m=this.thru(l),d?r?m.value()[0]:m.value():m)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);An.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ia(i)?i:[],e)}return this[n]((function(n){return t.apply(Ia(n)?n:[],e)}))}})),ur(Nn.prototype,(function(e,t){var n=An[t];if(n){var r=n.name+"";we.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Ai(void 0,2).name]=[{name:"wrapper",func:void 0}],Nn.prototype.clone=function(){var e=new Nn(this.__wrapped__);return e.__actions__=yi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yi(this.__views__),e},Nn.prototype.reverse=function(){if(this.__filtered__){var e=new Nn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Nn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ia(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},An.prototype.plant=function(e){for(var t,n=this;n instanceof On;){var r=Ao(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},An.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Nn){var t=e;return this.__actions__.length&&(t=new Nn(this)),(t=t.reverse()).__actions__.push({func:na,args:[qo],thisArg:void 0}),new Fn(t,this.__chain__)}return this.thru(qo)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Xe&&(An.prototype[Xe]=function(){return this}),An}();Ke._=Jt,void 0===(i=function(){return Jt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(42),n(160)(e))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(48);t.setSettingsString=(r=i.createActions({SET_SETTINGS_STRING:function(e){return{settingsString:e}},SET_CONFIG_STRING:function(e){return{configString:e}},OPEN_HISTORY:function(){return{}},CLOSE_HISTORY:function(){return{}}})).setSettingsString,t.setConfigString=r.setConfigString,t.openHistory=r.openHistory,t.closeHistory=r.closeHistory},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1)for(var n=1;n0&&(e.responses.size>20||e.responses.get(0).date.length>2e3)&&(t.responses=s.List()),s.merge(e,t)},t}(s.Record(p.getDefaultSession("")));t.Session=m;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.Record({resultID:"",date:"",time:new Date,isSchemaError:!1}));function y(e){return void 0===e&&(e=""),new m({endpoint:e}).set("id",f())}t.ResponseRecord=g,t.sessionFromTab=function(e){return new m(a(a({},e),{headers:e.headers?JSON.stringify(e.headers,null,2):"",responses:e.responses&&e.responses.length>0?s.List(e.responses.map((function(e){return new g({date:e})}))):s.List()})).set("id",f())};var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.Record({sessions:s.OrderedMap({}),selectedSessionId:"",sessionCount:0,headers:""}));function b(e){var t,n=new m({endpoint:e||""});return new v({sessions:s.OrderedMap((t={},t[n.id]=n,t)),selectedSessionId:n.id,sessionCount:1})}t.SessionState=v,t.makeSessionState=b;var E=u.handleActions(((i={})[u.combineActions(c.editQuery,c.editVariables,c.editHeaders,c.editEndpoint,c.setEditorFlex,c.openQueryVariables,c.closeQueryVariables,c.setVariableEditorHeight,c.setResponseTracingHeight,c.setTracingSupported,c.setVariableToType,c.setOperations,c.setOperationName,c.setSubscriptionActive,c.startQuery,c.setQueryTypes,c.editName,c.setResponseExtensions,c.setCurrentQueryStartTime,c.setCurrentQueryEndTime)]=function(e,t){var n=t.payload,r=Object.keys(n),i=1===r.length?r[0]:r[1],o=["sessions",l.getSelectedSessionId(e),i];return e.setIn(o,n[i])},i.START_QUERY=function(e){return e.setIn(["sessions",l.getSelectedSessionId(e),"queryRunning"],!0).setIn(["sessions",l.getSelectedSessionId(e),"responseExtensions"],void 0)},i.CLOSE_TRACING=function(e,t){var n=t.payload.responseTracingHeight;return e.mergeDeepIn(["sessions",l.getSelectedSessionId(e)],s.Map({responseTracingHeight:n,responseTracingOpen:!1}))},i.TOGGLE_TRACING=function(e){var t=["sessions",l.getSelectedSessionId(e),"responseTracingOpen"];return e.setIn(t,!e.getIn(t))},i.OPEN_TRACING=function(e,t){var n=t.payload.responseTracingHeight;return e.mergeDeepIn(["sessions",l.getSelectedSessionId(e)],s.Map({responseTracingHeight:n,responseTracingOpen:!0}))},i.CLOSE_VARIABLES=function(e,t){var n=t.payload.variableEditorHeight;return e.mergeDeepIn(["sessions",l.getSelectedSessionId(e)],s.Map({variableEditorHeight:n,variableEditorOpen:!1}))},i.OPEN_VARIABLES=function(e,t){var n=t.payload.variableEditorHeight;return e.mergeDeepIn(["sessions",l.getSelectedSessionId(e)],s.Map({variableEditorHeight:n,variableEditorOpen:!0}))},i.TOGGLE_VARIABLES=function(e){var t=["sessions",l.getSelectedSessionId(e),"variableEditorOpen"];return e.setIn(t,!e.getIn(t))},i.ADD_RESPONSE=function(e,t){var n=t.payload,r=n.response,i=n.sessionId;return e.updateIn(["sessions",i,"responses"],(function(e){return e.push(r)}))},i.SET_RESPONSE=function(e,t){var n=t.payload,r=n.response,i=n.sessionId;return e.setIn(["sessions",i,"responses"],s.List([r]))},i.CLEAR_RESPONSES=function(e){return e.setIn(["sessions",l.getSelectedSessionId(e),"responses"],s.List())},i.FETCH_SCHEMA=function(e){return e.setIn(["sessions",l.getSelectedSessionId(e),"isReloadingSchema"],!0)},i.REFETCH_SCHEMA=function(e){return e.setIn(["sessions",l.getSelectedSessionId(e),"isReloadingSchema"],!0)},i.STOP_QUERY=function(e,t){var n=t.payload.sessionId;return e.mergeIn(["sessions",n],{queryRunning:!1,subscriptionActive:!1})},i.SET_SCROLL_TOP=function(e,t){var n=t.payload,r=n.sessionId,i=n.scrollTop;return e.sessions.get(r)?e.setIn(["sessions",r,"scrollTop"],i):e},i.SCHEMA_FETCHING_SUCCESS=function(e,t){var n=t.payload,r=e.get("sessions").map((function(e){if(e.endpoint===n.endpoint){var t={tracingSupported:n.tracingSupported,isReloadingSchema:!1,endpointUnreachable:!1},r=e.responses?e.responses.first():null;return r&&1===e.responses.size&&r.isSchemaError&&(t.responses=s.List([])),e.merge(s.Map(t))}return e}));return e.set("sessions",r)},i.SET_ENDPOINT_UNREACHABLE=function(e,t){var n=t.payload,r=e.get("sessions").map((function(e,t){return e.get("endpoint")===n.endpoint?e.merge(s.Map({endpointUnreachable:!0})):e}));return e.set("sessions",r)},i.SCHEMA_FETCHING_ERROR=function(e,t){var n=t.payload,r=e.get("sessions").map((function(e,t){if(e.get("endpoint")===n.endpoint){var r=e.responses;if(r.size<=1){var i=e.responses?e.responses.first():null;i&&!i.isSchemaError||(i=new g({resultID:f(),isSchemaError:!0,date:JSON.stringify(d.formatError(n.error,!0),null,2),time:new Date})),r=s.List([i])}return e.merge(s.Map({isReloadingSchema:!1,endpointUnreachable:!0,responses:r}))}return e}));return e.set("sessions",r)},i.SET_SELECTED_SESSION_ID=function(e,t){var n=t.payload.sessionId;return e.set("selectedSessionId",n)},i.OPEN_SETTINGS_TAB=function(e){var t=e,n=e.sessions.find((function(e){return e.get("isSettingsTab",!1)}));return n||(n=y().merge({isSettingsTab:!0,isFile:!0,name:"Settings",changed:!1}),t=t.setIn(["sessions",n.id],n)),t.set("selectedSessionId",n.id)},i.OPEN_CONFIG_TAB=function(e){var t=e,n=e.sessions.find((function(e){return e.get("isConfigTab",!1)}));return n||(n=y().merge({isConfigTab:!0,isFile:!0,name:"GraphQL Config",changed:!1}),t=t.setIn(["sessions",n.id],n)),t.set("selectedSessionId",n.id)},i.NEW_FILE_TAB=function(e,t){var n=t.payload,r=n.fileName,i=n.filePath,o=n.file,a=e,s=e.sessions.find((function(e){return e.get("name","")===r}));return s||(s=y().merge({isFile:!0,name:r,changed:!1,file:o,filePath:i}),a=a.setIn(["sessions",s.id],s)),a.set("selectedSessionId",s.id).set("sessionCount",a.sessions.size)},i.NEW_SESSION=function(e,t){var n=t.payload,r=n.reuseHeaders,i=n.endpoint,o=e.sessions.first(),a={query:"",isReloadingSchema:o.isReloadingSchema,endpointUnreachable:o.endpointUnreachable};o.endpointUnreachable&&(a.responses=o.responses);var s=y(i||o.endpoint).merge(a);if(r){var u=l.getSelectedSessionId(e),c=e.sessions.get(u);s=s.set("headers",c.headers)}else s=s.set("headers",e.headers);return e.setIn(["sessions",s.id],s).set("selectedSessionId",s.id).set("sessionCount",e.sessions.size+1)},i.INJECT_HEADERS=function(e,t){var n=t.payload,r=n.headers,i=n.endpoint;if(!r||""===r||0===Object.keys(r).length)return e;var o="string"==typeof r?r:JSON.stringify(r,null,2),a=l.getSelectedSessionId(e),s=e.set("headers",o),u=e.sessions.get(a);if(u.headers===o)return s;if(u.query===p.defaultQuery)return s.setIn(["sessions",a,"headers"],o);var c=y(i).set("headers",o);return s.setIn(["sessions",c.id],c).set("selectedSessionId",c.id).set("sessionCount",e.sessions.size+1)},i.DUPLICATE_SESSION=function(e,t){var n=t.payload.session.set("id",f());return e.setIn(["sessions",n.id],n).set("selectedSessionId",n.id).set("sessionCount",e.sessions.size+1)},i.NEW_SESSION_FROM_QUERY=function(e,t){var n=t.payload.query,r=y().set("query",n);return e.setIn(["sessions",r.id],r).set("sessionCount",e.sessions.size+1)},i.CLOSE_SELECTED_TAB=function(e){return x(e,l.getSelectedSessionId(e)).set("sessionCount",e.sessions.size-1)},i.SELECT_NEXT_TAB=function(e){var t=l.getSelectedSessionId(e),n=e.sessions.size,r=e.sessions.keySeq(),i=r.indexOf(t);return i+1=0?e.set("selectedSessionId",r.get(i-1)):e.set("selectedSessionId",r.get(n-1))},i.SELECT_TAB_INDEX=function(e,t){var n=t.payload.index,r=e.sessions.keySeq();return e.set("selectedSessionId",r.get(n))},i.SELECT_TAB=function(e,t){var n=t.payload.sessionId;return e.set("selectedSessionId",n)},i.CLOSE_TAB=function(e,t){return x(e,t.payload.sessionId).set("sessionCount",e.sessions.size-1)},i.REORDER_TABS=function(e,t){for(var n=t.payload,r=n.src,i=n.dest,o=e.sessions.toIndexedSeq(),a=[],u=0;u0?n.set("selectedSessionId",e.sessions.first().id):n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vendorPrefix=t.events=void 0,t.arrayMove=function(e,t,n){var r=e.slice(0);if(n>=r.length)for(var i=n-r.length;1+i--;)r.push(void 0);return r.splice(n,0,r.splice(t,1)[0]),r},t.omit=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rt)return t;return n},t.getElementMargin=function(e){var t=window.getComputedStyle(e);return{top:a(t.marginTop),right:a(t.marginRight),bottom:a(t.marginBottom),left:a(t.marginLeft)}},t.provideDisplayName=function(e,t){var n=t.displayName||t.name;return n?e+"("+n+")":e},t.getPosition=function(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}},t.isTouchEvent=function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length},t.getEdgeOffset=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,left:0};if(t){var i={top:r.top+t.offsetTop,left:r.left+t.offsetLeft};return t.parentNode!==n?e(t.parentNode,n,i):i}},t.getLockPixelOffset=function(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,a=t,s="px";if("string"==typeof t){var u=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);(0,o.default)(null!==u,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=a=parseFloat(t),s=u[1]}(0,o.default)(isFinite(i)&&isFinite(a),"lockOffset value should be a finite. Given %s",t),"%"===s&&(i=i*n/100,a=a*r/100);return{x:i,y:a}};var r,i=n(29),o=(r=i)&&r.__esModule?r:{default:r};t.events={start:["touchstart","mousedown"],move:["touchmove","mousemove"],end:["touchend","touchcancel","mouseup"]},t.vendorPrefix=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function a(e){return"px"===e.substr(-2)?parseFloat(e):0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(308),i=n(168);t.theme=i.theme;var o=r,a=o.default,s=o.css,u=o.injectGlobal,c=o.keyframes,l=o.ThemeProvider,p=o.withTheme,f=o.createGlobalStyle;t.css=s,t.injectGlobal=u,t.keyframes=c,t.ThemeProvider=l,t.withTheme=p,t.createGlobalStyle=f,t.default=a},function(e,t,n){"use strict";e.exports.encode=n(316),e.exports.decode=n(317),e.exports.format=n(318),e.exports.parse=n(319)},function(e,t,n){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var o;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",c),t.off("viewportChange",l),t.off("fold",p),t.off("unfold",p),t.off("swapDoc",c)),r&&(t.state.foldGutter=new n((!0===(o=r)&&(o={}),null==o.gutter&&(o.gutter="CodeMirror-foldgutter"),null==o.indicatorOpen&&(o.indicatorOpen="CodeMirror-foldgutter-open"),null==o.indicatorFolded&&(o.indicatorFolded="CodeMirror-foldgutter-folded"),o)),s(t),t.on("gutterClick",u),t.on("changes",c),t.on("viewportChange",l),t.on("fold",p),t.on("unfold",p),t.on("swapDoc",c))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i=c){if(f&&a&&f.test(a.className))return;o=i(s.indicatorOpen)}}(o||a)&&e.setGutterMarker(n,s.gutter,o)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){o(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function u(e,n,i){var o=e.state.foldGutter;if(o){var a=o.options;if(i==a.gutter){var s=r(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),n.foldOnChangeTimeSpan||600)}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation((function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r '+e.phrase("(Use line:column or scroll% syntax)")+""}(e),e.phrase("Jump to line:"),n.line+1+":"+n.ch,(function(r){var i;if(r)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(t(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var o=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(o=n.line+o+1),e.setCursor(o-1,n.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(t(e,i[1]),n.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(n(16),n(70))},function(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy((function(i){return t.display.shift||t.doc.extend||i.empty()?function(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",u=r.ch,c=u,l=i<0?0:o.length,p=0;c!=l;c+=i,p++){var f=o.charAt(i<0?c-1:c),d="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==d&&f.toUpperCase()==f&&(d="W"),"start"==s)"o"!=d?(s="in",a=d):u=c+i;else if("in"==s&&a!=d){if("w"==a&&"W"==d&&i<0&&c--,"W"==a&&"w"==d&&i>0){if(c==u+1){a="w";continue}c--}break}}return n(r.line,c)}(t.doc,i.head,r):r<0?i.from():i.to()}))}function i(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a=0;s--){var c=r[i[s]];if(!(u&&e.cmpPos(c.head,u)>0)){var l=o(t,c.head);u=l.from,t.replaceRange(n(l.word),l.from,l.to)}}}))}function p(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function f(e,t){var r=p(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.goSubwordLeft=function(e){r(e,-1)},t.goSubwordRight=function(e){r(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;io.line&&s==a.line&&0==a.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;io?i.push(c,l):i.length&&(i[i.length-1]=l),o=l}t.operation((function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],u=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||u--,u=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;o--){var a=r[o].head,s=t.getRange({line:a.line,ch:0},a),u=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&u%i==0){var l=new n(a.line,e.findColumn(s,u-i,i));l.ch!=a.ch&&(c=l)}t.replaceRange("",c,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){l(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){l(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){f(e,!0)},t.findUnderPrevious=function(e){f(e,!1)},t.findAllUnder=function(e){var t=p(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var d=e.keyMap;d.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Cmd-F5":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(d.macSublime),d.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(d.pcSublime);var h=d.default==d.macDefault;d.sublime=h?d.macSublime:d.pcSublime}(n(16),n(69),n(89))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return function(t){return t.general.get(e)}};t.getFixedEndpoint=r("fixedEndpoint"),t.getHistoryOpen=r("historyOpen"),t.getConfigString=r("configString")},function(e,t,n){"use strict";var r=n(77);e.exports=r.DEFAULT=new r({include:[n(92)],explicit:[n(508),n(509),n(510)]})},function(e,t,n){"use strict";n.r(t),n.d(t,"actionChannel",(function(){return i.p})),n.d(t,"all",(function(){return i.B})),n.d(t,"apply",(function(){return i.a})),n.d(t,"call",(function(){return i.o})),n.d(t,"cancel",(function(){return i.n})),n.d(t,"cancelled",(function(){return i.H})),n.d(t,"cps",(function(){return i.D})),n.d(t,"delay",(function(){return i.v})),n.d(t,"effectTypes",(function(){return i.x})),n.d(t,"flush",(function(){return i.I})),n.d(t,"fork",(function(){return i.m})),n.d(t,"getContext",(function(){return i.J})),n.d(t,"join",(function(){return i.F})),n.d(t,"put",(function(){return i.z})),n.d(t,"putResolve",(function(){return i.A})),n.d(t,"race",(function(){return i.w})),n.d(t,"select",(function(){return i.G})),n.d(t,"setContext",(function(){return i.K})),n.d(t,"spawn",(function(){return i.E})),n.d(t,"take",(function(){return i.l})),n.d(t,"takeMaybe",(function(){return i.y})),n.d(t,"debounce",(function(){return E})),n.d(t,"retry",(function(){return b})),n.d(t,"takeEvery",(function(){return m})),n.d(t,"takeLatest",(function(){return g})),n.d(t,"takeLeading",(function(){return y})),n.d(t,"throttle",(function(){return v}));n(19),n(63);var r=n(10),i=n(6),o=(n(109),function(e){return{done:!0,value:e}}),a={};function s(e){return Object(r.b)(e)?"channel":Object(r.l)(e)?String(e):Object(r.d)(e)?e.name:String(e)}function u(e,t,n){var r,s,u,c=t;function l(t,n){if(c===a)return o(t);if(n&&!s)throw c=a,n;r&&r(t);var i=n?e[s](n):e[c]();return c=i.nextState,u=i.effect,r=i.stateUpdater,s=i.errorState,c===a?o(t):u}return Object(i.ab)(l,(function(e){return l(null,e)}),n)}function c(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o2?n-2:0),o=2;o3?r-3:0),a=3;a3?o-3:0),c=3;c3?r-3:0),a=3;a2?n-2:0),o=2;o2?n-2:0),o=2;o2?n-2:0),o=2;o3?r-3:0),a=3;a3?r-3:0),a=3;a3?r-3:0),a=3;a0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0){var a=i.shift();a&&a.applyMiddleware.apply(o,[e,s])}else n(e)})()}))},e.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");t.middlewares.push(e)})),this},e.prototype.getConnectionParams=function(e){return function(){return new Promise((function(t,n){if("function"==typeof e)try{return t(e.call(null))}catch(e){return n(e)}t(e)}))}},e.prototype.executeOperation=function(e,t){var n=this;null===this.client&&this.connect();var r=this.generateOperationId();return this.operations[r]={options:e,handler:t},this.applyMiddlewares(e).then((function(e){n.checkOperationOptions(e,t),n.operations[r]&&(n.operations[r]={options:e,handler:t},n.sendMessage(r,v.default.GQL_START,e))})).catch((function(e){n.unsubscribe(r),t(n.formatErrors(e))})),r},e.prototype.getObserver=function(e,t,n){return"function"==typeof e?{next:function(t){return e(t)},error:function(e){return t&&t(e)},complete:function(){return n&&n()}}:e},e.prototype.createMaxConnectTimeGenerator=function(){var e=this.minWsTimeout,t=this.wsTimeout;return new c({min:e,max:t,factor:1.2})},e.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},e.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},e.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},e.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},e.prototype.setInactivityTimeout=function(){var e=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout((function(){0===Object.keys(e.operations).length&&e.close()}),this.inactivityTimeout))},e.prototype.checkOperationOptions=function(e,t){var n=e.query,r=e.variables,i=e.operationName;if(!n)throw new Error("Must provide a query.");if(!t)throw new Error("Must provide an handler.");if(!p.default(n)&&!h.getOperationAST(n,i)||i&&!p.default(i)||r&&!f.default(r))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},e.prototype.buildMessage=function(e,t,n){return{id:e,type:t,payload:n&&n.query?r(r({},n),{query:"string"==typeof n.query?n.query:d.print(n.query)}):n}},e.prototype.formatErrors=function(e){return Array.isArray(e)?e:e&&e.errors?this.formatErrors(e.errors):e&&e.message?[e]:[{name:"FormatedError",message:"Unknown error",originalError:e}]},e.prototype.sendMessage=function(e,t,n){this.sendMessageRaw(this.buildMessage(e,t,n))},e.prototype.sendMessageRaw=function(e){switch(this.status){case this.wsImpl.OPEN:var t=JSON.stringify(e);try{JSON.parse(t)}catch(t){this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+e))}this.client.send(t);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(e);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(e)))}},e.prototype.generateOperationId=function(){return String(++this.nextOperationId)},e.prototype.tryReconnect=function(){var e=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach((function(t){e.unsentMessagesQueue.push(e.buildMessage(t,v.default.GQL_START,e.operations[t].options))})),this.reconnecting=!0),this.clearTryReconnectTimeout();var t=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout((function(){e.connect()}),t)}},e.prototype.flushUnsentMessagesQueue=function(){var e=this;this.unsentMessagesQueue.forEach((function(t){e.sendMessageRaw(t)})),this.unsentMessagesQueue=[]},e.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},e.prototype.checkMaxConnectTimeout=function(){var e=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout((function(){e.status!==e.wsImpl.OPEN&&(e.reconnecting=!0,e.close(!1,!0))}),this.maxConnectTimeGenerator.duration())},e.prototype.connect=function(){var e,t=this;this.client=new((e=this.wsImpl).bind.apply(e,a([void 0,this.url,this.wsProtocols],this.wsOptionArguments))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return i(t,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return e=n.sent(),this.sendMessage(void 0,v.default.GQL_CONNECTION_INIT,e),this.flushUnsentMessagesQueue(),[3,4];case 3:return t=n.sent(),this.sendMessage(void 0,v.default.GQL_CONNECTION_ERROR,t),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}}))}))},this.client.onclose=function(){t.closedByUser||t.close(!1,!1)},this.client.onerror=function(e){t.eventEmitter.emit("error",e)},this.client.onmessage=function(e){var n=e.data;t.processReceivedData(n)}},e.prototype.processReceivedData=function(e){var t,n;try{n=(t=JSON.parse(e)).id}catch(t){throw new Error("Message must be JSON-parseable. Got: "+e)}if(-1===[v.default.GQL_DATA,v.default.GQL_COMPLETE,v.default.GQL_ERROR].indexOf(t.type)||this.operations[n])switch(t.type){case v.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(t.payload);break;case v.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",t.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case v.default.GQL_COMPLETE:var i=this.operations[n].handler;delete this.operations[n],i.call(this,null,null);break;case v.default.GQL_ERROR:this.operations[n].handler(this.formatErrors(t.payload),null),delete this.operations[n];break;case v.default.GQL_DATA:var o=t.payload.errors?r(r({},t.payload),{errors:this.formatErrors(t.payload.errors)}):t.payload;this.operations[n].handler(null,o);break;case v.default.GQL_CONNECTION_KEEP_ALIVE:var a=void 0===this.wasKeepAliveReceived;this.wasKeepAliveReceived=!0,a&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(n)},e.prototype.unsubscribe=function(e){this.operations[e]&&(delete this.operations[e],this.setInactivityTimeout(),this.sendMessage(e,v.default.GQL_STOP,void 0))},e}();t.SubscriptionClient=b}).call(this,n(42))},function(e,t,n){"use strict";var r=Array.prototype.flatMap,i=r?function(e,t){return r.call(e,t)}:function(e,t){for(var n=[],r=0;r=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&50===r||t.shiftKey&&57===r)&&n.editor.execCommand("autocomplete")},n.onEdit=function(){!n.ignoreChangeEvent&&n.props.onChange&&(n.cachedValue=n.editor.getValue(),n.props.onChange(n.cachedValue))},n.onHasCompletion=function(e,t){c.default(e,t,n.props.onHintInformationRender)},n.closeCompletion=function(){n.editor.state.completionActive&&"function"==typeof n.editor.state.completionActive.close&&n.editor.state.completionActive.close()},n.cachedValue=e.value||"",n.props.getRef&&n.props.getRef(n),n}return i(r,t),r.prototype.componentDidMount=function(){var t=this,r=n(16);n(125),n(178),n(89),n(126),n(103),n(90),n(179),n(69),n(104),n(70),n(127),n(105),n(368),n(369),n(373),n(374),n(376),n(183);var i=[];i.push("CodeMirror-linenumbers"),i.push("CodeMirror-foldgutter"),this.editor=r(this.node,{autofocus:!m.isIframe(),value:this.props.value||"",lineNumbers:!0,tabSize:this.props.tabWidth||2,indentWithTabs:this.props.useTabs||!1,mode:"graphql",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!1,foldGutter:{minFoldSize:4},lint:{schema:this.props.schema},hintOptions:{schema:this.props.schema,closeOnUnfocus:!0,completeSingle:!1},info:{schema:this.props.schema,renderDescription:function(e){return g.render(e)},onClick:this.props.onClickReference},jump:{schema:this.props.schema,onClick:this.props.onClickReference},gutters:i,extraKeys:{"Cmd-Space":function(){return t.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return t.editor.showHint({completeSingle:!0})},"Alt-Space":function(){return t.editor.showHint({completeSingle:!0})},"Shift-Space":function(){return t.editor.showHint({completeSingle:!0})},"Cmd-Enter":function(){t.props.onRunQuery&&t.props.onRunQuery()},"Ctrl-Enter":function(){t.props.onRunQuery&&t.props.onRunQuery()},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-F":"findPersistent","Ctrl-F":"findPersistent"}}),this.editor.on("change",this.onEdit),this.editor.on("keyup",this.onKeyUp),this.editor.on("hasCompletion",this.onHasCompletion),e.editor=this.editor,this.props.scrollTop&&this.scrollTo(this.props.scrollTop)},r.prototype.componentDidUpdate=function(e){var t=this,r=n(16);this.ignoreChangeEvent=!0,this.props.schema!==e.schema&&(this.editor.options.lint.schema=this.props.schema,this.editor.options.hintOptions.schema=this.props.schema,this.editor.options.info.schema=this.props.schema,this.editor.options.jump.schema=this.props.schema,r.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1,setTimeout((function(){t.props.sessionId!==e.sessionId&&t.props.scrollTop&&t.scrollTo(t.props.scrollTop)}))},r.prototype.UNSAFE_componentWillReceiveProps=function(e){this.props.sessionId!==e.sessionId&&(this.closeCompletion(),this.updateSessionScrollTop(),m.isIframe()||this.editor.focus())},r.prototype.scrollTo=function(e){this.node.querySelector(".CodeMirror-scroll").scrollTop=e},r.prototype.updateSessionScrollTop=function(){this.props.setScrollTop&&this.props.sessionId&&this.props.setScrollTop(this.props.sessionId,this.node.querySelector(".CodeMirror-scroll").scrollTop)},r.prototype.componentWillUnmount=function(){this.updateSessionScrollTop(),this.editor.off("change",this.onEdit),this.editor.off("keyup",this.onKeyUp),this.editor.off("hasCompletion",this.onHasCompletion),this.editor=null},r.prototype.render=function(){return a.createElement(d.default,null,a.createElement(E,{ref:this.setRef}))},r.prototype.getCodeMirror=function(){return this.editor},r.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},r}(a.PureComponent);t.QueryEditor=y;var v=p.createStructuredSelector({value:f.getQuery,sessionId:f.getSelectedSessionIdFromRoot,scrollTop:f.getScrollTop,tabWidth:f.getTabWidth,useTabs:f.getUseTabs});t.default=u.connect(v,{onChange:l.editQuery,setScrollTop:l.setScrollTop})(y);var b,E=h.styled.div(b||(b=o(["\n flex: 1 1 0%;\n position: relative;\n\n .CodeMirror {\n width: 100%;\n background: ",";\n }\n"],["\n flex: 1 1 0%;\n position: relative;\n\n .CodeMirror {\n width: 100%;\n background: ",";\n }\n"])),(function(e){return e.theme.editorColours.editorBackground}))}).call(this,n(42))},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){!function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(n){n=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in u)i[o]=u[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var i=0;ic.clientHeight+1,F=a.getScrollInfo();if(T>0){var N=A.bottom-A.top;if(y.top-(y.bottom-A.top)-N>0)c.style.top=(b=y.top-N-D)+"px",E=!1;else if(N>k){c.style.height=k-5+"px",c.style.top=(b=y.bottom-A.top-D)+"px";var I=a.getCursor();n.from.ch!=I.ch&&(y=a.cursorCoords(I),c.style.left=(v=y.left-x)+"px",A=c.getBoundingClientRect())}}var M,j=A.right-_;if(j>0&&(A.right-A.left>_&&(c.style.width=_-5+"px",j-=A.right-A.left-_),c.style.left=(v=y.left-j-x)+"px"),O)for(var L=c.firstChild;L;L=L.nextSibling)L.style.paddingRight=a.display.nativeBarWidth+"px";return a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:p.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){M=setTimeout((function(){t.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(M)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),r=b+F.top-e.top,i=r-(u.pageYOffset||(s.documentElement||s.body).scrollTop);if(E||(i+=c.offsetHeight),i<=n.top||i>=n.bottom)return t.close();c.style.top=r+"px",c.style.left=v+F.left-e.left+"px"}),e.on(c,"dblclick",(function(e){var t=o(c,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(c,"click",(function(e){var n=o(c,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(c,"mousedown",(function(){setTimeout((function(){a.focus()}),20)})),this.scrollToActive(),e.signal(n,"select",p[this.selectedHint],c.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" CodeMirror-hint-active","")),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.completion.options.scrollMargin||0,t=this.hints.childNodes[Math.max(0,this.selectedHint-e)],n=this.hints.childNodes[Math.min(this.data.list.length-1,this.selectedHint+e)],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}(n(16))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),c=0;c=0;c--){var p=a[c].head;t.replaceRange("",n(p.line,p.ch-1),n(p.line,p.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a1&&f.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;y="addFour"}else if(d){var x=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(E)||x==i||e.isWordChar(x))return e.Pass;y="both"}else{if(!m||!(0===E.length||/\s/.test(E)||p.indexOf(E)>-1))return e.Pass;y="both"}else y=d&&c(t,b)?"both":f.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(l){if(l!=y)return e.Pass}else l=y}var D=u%2?a.charAt(u-1):i,C=u%2?i:a.charAt(u+1);t.operation((function(){if("skip"==l)t.execCommand("goCharRight");else if("skipThree"==l)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==l){var i=t.getSelections();for(r=0;r0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==l?(t.replaceSelection(D+C,null),t.triggerElectric(D+C),t.execCommand("goCharLeft")):"addFour"==l&&(t.replaceSelection(D+D+D+D,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function u(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(16))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,i,o){var a=function(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",i.style.left=t.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}(t,r,i);function s(){var t;e.off(o,"mouseout",s),a&&((t=a).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout((function(){n(t)}),600)),a=null)}var u=setInterval((function(){if(a)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){s();break}}if(!a)return clearInterval(u)}),400);e.on(o,"mouseout",s)}function i(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var i=n.getBoundingClientRect(),o=(i.left+i.right)/2,a=(i.top+i.bottom)/2,u=e.findMarksAt(e.coordsChar({left:o,top:a},"client")),c=[],l=0;l1,u.options.tooltips))}}c.onUpdateLinting&&c.onUpdateLinting(n,l,e)}function l(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){u(e)}),t.options.delay||500))}e.defineOption("lint",!1,(function(n,r,a){if(a&&a!=e.Init&&(o(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",l),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var s=n.getOption("gutters"),c=!1,p=0;p=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.DocType=o.styled.div(i||(i=r(["\n padding: 20px 16px 0 16px;\n overflow: auto;\n font-size: 14px;\n"],["\n padding: 20px 16px 0 16px;\n overflow: auto;\n font-size: 14px;\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(163);function o(e){return"string"==typeof e?{endpoint:e,subscriptionEndpoint:void 0}:{endpoint:e.url,subscriptionEndpoint:e.subscription?e.subscription.url:void 0,headers:e.headers}}t.getActiveEndpoints=function(e,t,n){return o(n?e.projects[n].extensions.endpoints[t]:e.extensions.endpoints[t])},t.getEndpointFromEndpointConfig=o;var a=new i({max:10});t.cachedPrintSchema=function(e){var t=a.get(e);if(t)return t;var n=r.printSchema(e);return a.set(e,n),n}},function(e,t,n){"use strict";var r=n(77);e.exports=new r({explicit:[n(491),n(492),n(493)]})},function(e,t,n){"use strict";n.r(t),n.d(t,"CharacterStream",(function(){return r})),n.d(t,"LexRules",(function(){return l})),n.d(t,"ParseRules",(function(){return p})),n.d(t,"isIgnored",(function(){return c})),n.d(t,"butNot",(function(){return a})),n.d(t,"list",(function(){return o})),n.d(t,"opt",(function(){return i})),n.d(t,"p",(function(){return u})),n.d(t,"t",(function(){return s})),n.d(t,"onlineParser",(function(){return m})),n.d(t,"AdditionalRuleKinds",(function(){return w})),n.d(t,"RuleKinds",(function(){return S}));class r{constructor(e){this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=i&&i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0===e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function i(e){return{ofRule:e}}function o(e,t){return{ofRule:e,isList:!0,separator:t}}function a(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}function s(e,t){return{style:t,match:t=>t.kind===e}}function u(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const c=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,l={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},p={Document:[o("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[d("query"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],Mutation:[d("mutation"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],Subscription:[d("subscription"),i(h("def")),i("VariableDefinitions"),o("Directive"),"SelectionSet"],VariableDefinitions:[u("("),o("VariableDefinition"),u(")")],VariableDefinition:["Variable",u(":"),"Type",i("DefaultValue")],Variable:[u("$","variable"),h("variable")],DefaultValue:[u("="),"Value"],SelectionSet:[u("{"),o("Selection"),u("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[h("property"),u(":"),h("qualifier"),i("Arguments"),o("Directive"),i("SelectionSet")],Field:[h("property"),i("Arguments"),o("Directive"),i("SelectionSet")],Arguments:[u("("),o("Argument"),u(")")],Argument:[h("attribute"),u(":"),"Value"],FragmentSpread:[u("..."),h("def"),o("Directive")],InlineFragment:[u("..."),i("TypeCondition"),o("Directive"),"SelectionSet"],FragmentDefinition:[d("fragment"),i(a(h("def"),[d("on")])),"TypeCondition",o("Directive"),"SelectionSet"],TypeCondition:[d("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[s("Number","number")],StringValue:[s("String","string")],BooleanValue:[s("Name","builtin")],NullValue:[s("Name","keyword")],EnumValue:[h("string-2")],ListValue:[u("["),o("Value"),u("]")],ObjectValue:[u("{"),o("ObjectField"),u("}")],ObjectField:[h("attribute"),u(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[u("["),"Type",u("]"),i(u("!"))],NonNullType:["NamedType",i(u("!"))],NamedType:[(f="atom",{style:f,match:e=>"Name"===e.kind,update(e,t){e.prevState&&e.prevState.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[u("@","meta"),h("meta"),i("Arguments")],SchemaDef:[d("schema"),o("Directive"),u("{"),o("OperationTypeDef"),u("}")],OperationTypeDef:[h("keyword"),u(":"),h("atom")],ScalarDef:[d("scalar"),h("atom"),o("Directive")],ObjectTypeDef:[d("type"),h("atom"),i("Implements"),o("Directive"),u("{"),o("FieldDef"),u("}")],Implements:[d("implements"),o("NamedType")],FieldDef:[h("property"),i("ArgumentsDef"),u(":"),"Type",o("Directive")],ArgumentsDef:[u("("),o("InputValueDef"),u(")")],InputValueDef:[h("attribute"),u(":"),"Type",i("DefaultValue"),o("Directive")],InterfaceDef:[d("interface"),h("atom"),o("Directive"),u("{"),o("FieldDef"),u("}")],UnionDef:[d("union"),h("atom"),o("Directive"),u("="),o("UnionMember",u("|"))],UnionMember:["NamedType"],EnumDef:[d("enum"),h("atom"),o("Directive"),u("{"),o("EnumValueDef"),u("}")],EnumValueDef:[h("string-2"),o("Directive")],InputDef:[d("input"),h("atom"),o("Directive"),u("{"),o("InputValueDef"),u("}")],ExtendDef:[d("extend"),"ObjectTypeDef"],DirectiveDef:[d("directive"),u("@","meta"),h("meta"),i("ArgumentsDef"),d("on"),o("DirectiveLocation",u("|"))],DirectiveLocation:[h("string-2")]};var f;function d(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function h(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function m(e={eatWhitespace:e=>e.eatWhile(c),lexRules:l,parseRules:p,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return v(e.parseRules,t,"Document"),t},token:(t,n)=>function(e,t,n){const{lexRules:r,parseRules:i,eatWhitespace:o,editorConfig:a}=n;t.rule&&0===t.rule.length?b(t):t.needsAdvance&&(t.needsAdvance=!1,E(t,!0));if(e.sol()){const n=a&&a.tabSize||2;t.indentLevel=Math.floor(e.indentation()/n)}if(o(e))return"ws";const s=function(e,t){const n=Object.keys(e);for(let r=0;r0&&e[e.length-1]120){for(var h=Math.floor(l/80),m=l%80,g=[],y=0;y])/g,v=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,E=/\s{2,}/g,x=/([^\(])(:+) */g,D=/[svh]\w+-[tblr]{2}/,C=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,S=/-self|flex-/g,_=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,T="-webkit-",O="-moz-",F="-ms-",N=59,I=125,M=123,j=40,L=41,P=10,R=13,B=32,U=45,z=42,V=44,q=58,H=47,W=1,G=1,K=0,J=1,Q=1,Y=1,$=0,X=0,Z=0,ee=[],te=[],ne=0,re=null,ie=0,oe=1,ae="",se="",ue="";function ce(e,t,i,o,a){for(var s,u,l=0,p=0,f=0,d=0,y=0,v=0,b=0,E=0,D=0,w=0,S=0,_=0,k=0,A=0,O=0,F=0,$=0,te=0,re=0,pe=i.length,ye=pe-1,ve="",be="",Ee="",xe="",De="",Ce="";O0&&(be=be.replace(r,"")),be.trim().length>0)){switch(b){case B:case 9:case N:case R:case P:break;default:be+=i.charAt(O)}b=N}if(1===$)switch(b){case M:case I:case N:case 34:case 39:case j:case L:case V:$=0;case 9:case R:case P:case B:break;default:for($=0,re=O,y=b,O--,b=N;re0&&(++O,b=y);case M:re=pe}}switch(b){case M:for(y=(be=be.trim()).charCodeAt(0),S=1,re=++O;O0&&(be=be.replace(r,"")),v=be.charCodeAt(1)){case 100:case 109:case 115:case U:s=t;break;default:s=ee}if(re=(Ee=ce(t,s,Ee,v,a+1)).length,Z>0&&0===re&&(re=be.length),ne>0&&(u=me(3,Ee,s=le(ee,be,te),t,G,W,re,v,a,o),be=s.join(""),void 0!==u&&0===(re=(Ee=u.trim()).length)&&(v=0,Ee="")),re>0)switch(v){case 115:be=be.replace(C,he);case 100:case 109:case U:Ee=be+"{"+Ee+"}";break;case 107:Ee=(be=be.replace(h,"$1 $2"+(oe>0?ae:"")))+"{"+Ee+"}",Ee=1===Q||2===Q&&de("@"+Ee,3)?"@"+T+Ee+"@"+Ee:"@"+Ee;break;default:Ee=be+Ee,112===o&&(xe+=Ee,Ee="")}else Ee="";break;default:Ee=ce(t,le(t,be,te),Ee,o,a+1)}De+=Ee,_=0,$=0,A=0,F=0,te=0,k=0,be="",Ee="",b=i.charCodeAt(++O);break;case I:case N:if((re=(be=(F>0?be.replace(r,""):be).trim()).length)>1)switch(0===A&&((y=be.charCodeAt(0))===U||y>96&&y<123)&&(re=(be=be.replace(" ",":")).length),ne>0&&void 0!==(u=me(1,be,t,e,G,W,xe.length,o,a,o))&&0===(re=(be=u.trim()).length)&&(be="\0\0"),y=be.charCodeAt(0),v=be.charCodeAt(1),y){case 0:break;case 64:if(105===v||99===v){Ce+=be+i.charAt(O);break}default:if(be.charCodeAt(re-1)===q)break;xe+=fe(be,y,v,be.charCodeAt(2))}_=0,$=0,A=0,F=0,te=0,be="",b=i.charCodeAt(++O)}}switch(b){case R:case P:if(p+d+f+l+X===0)switch(w){case L:case 39:case 34:case 64:case 126:case 62:case z:case 43:case H:case U:case q:case V:case N:case M:case I:break;default:A>0&&($=1)}p===H?p=0:J+_===0&&107!==o&&be.length>0&&(F=1,be+="\0"),ne*ie>0&&me(0,be,t,e,G,W,xe.length,o,a,o),W=1,G++;break;case N:case I:if(p+d+f+l===0){W++;break}default:switch(W++,ve=i.charAt(O),b){case 9:case B:if(d+l+p===0)switch(E){case V:case q:case 9:case B:ve="";break;default:b!==B&&(ve=" ")}break;case 0:ve="\\0";break;case 12:ve="\\f";break;case 11:ve="\\v";break;case 38:d+p+l===0&&J>0&&(te=1,F=1,ve="\f"+ve);break;case 108:if(d+p+l+K===0&&A>0)switch(O-A){case 2:112===E&&i.charCodeAt(O-3)===q&&(K=E);case 8:111===D&&(K=D)}break;case q:d+p+l===0&&(A=O);break;case V:p+f+d+l===0&&(F=1,ve+="\r");break;case 34:case 39:0===p&&(d=d===b?0:0===d?b:d);break;case 91:d+p+f===0&&l++;break;case 93:d+p+f===0&&l--;break;case L:d+p+l===0&&f--;break;case j:if(d+p+l===0){if(0===_)switch(2*E+3*D){case 533:break;default:S=0,_=1}f++}break;case 64:p+f+d+l+A+k===0&&(k=1);break;case z:case H:if(d+l+f>0)break;switch(p){case 0:switch(2*b+3*i.charCodeAt(O+1)){case 235:p=H;break;case 220:re=O,p=z}break;case z:b===H&&E===z&&re+2!==O&&(33===i.charCodeAt(re+2)&&(xe+=i.substring(re,O+1)),ve="",p=0)}}if(0===p){if(J+d+l+k===0&&107!==o&&b!==N)switch(b){case V:case 126:case 62:case 43:case L:case j:if(0===_){switch(E){case 9:case B:case P:case R:ve+="\0";break;default:ve="\0"+ve+(b===V?"":"\0")}F=1}else switch(b){case j:A+7===O&&108===E&&(A=0),_=++S;break;case L:0==(_=--S)&&(F=1,ve+="\0")}break;case 9:case B:switch(E){case 0:case M:case I:case N:case V:case 12:case 9:case B:case P:case R:break;default:0===_&&(F=1,ve+="\0")}}be+=ve,b!==B&&9!==b&&(w=b)}}D=E,E=b,O++}if(re=xe.length,Z>0&&0===re&&0===De.length&&0===t[0].length==0&&(109!==o||1===t.length&&(J>0?se:ue)===t[0])&&(re=t.join(",").length+2),re>0){if(s=0===J&&107!==o?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(f=u.charCodeAt(u.length-1),d=n.charCodeAt(0),t="",0!==l)switch(f){case z:case 126:case 62:case 43:case B:case j:break;default:t=" "}switch(d){case 38:n=t+se;case 126:case 62:case 43:case B:case L:case j:break;case 91:n=t+n+se;break;case q:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(Y>0){n=t+n.substring(8,p-1);break}default:(l<1||s[l-1].length<1)&&(n=t+se+n)}break;case V:t="";default:n=p>1&&n.indexOf(":")>0?t+n.replace(x,"$1"+se+"$2"):t+n+se}u+=n}a[i]=u.replace(r,"").trim()}return a}(t):t,ne>0&&void 0!==(u=me(2,xe,s,e,G,W,re,o,a,o))&&0===(xe=u).length)return Ce+xe+De;if(xe=s.join(",")+"{"+xe+"}",Q*K!=0){switch(2!==Q||de(xe,2)||(K=0),K){case 111:xe=xe.replace(g,":-moz-$1")+xe;break;case 112:xe=xe.replace(m,"::"+T+"input-$1")+xe.replace(m,"::-moz-$1")+xe.replace(m,":-ms-input-$1")+xe}K=0}}return Ce+xe+De}function le(e,t,n){var r=t.trim().split(l),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,u=0===a?"":e[0]+" ";s0&&J>0)return i.replace(f,"$1").replace(p,"$1"+ue);break;default:return e.trim()+i.replace(p,"$1"+e.trim())}default:if(n*J>0&&i.indexOf("\f")>0)return i.replace(p,(e.charCodeAt(0)===q?"":"$1")+e.trim())}return e+i}function fe(e,t,n,r){var c,l=0,p=e+";",f=2*t+3*n+4*r;if(944===f)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*oe){case 0:break;case U:if(110!==e.charCodeAt(10))break;default:var o=i.split((i="",s)),a=0;for(n=0,t=o.length;a64&&p<90||p>96&&p<123||95===p||p===U&&c.charCodeAt(1)!==U))switch(isNaN(parseFloat(c))+(-1!==c.indexOf("("))){case 1:switch(c){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:c+=ae}}l[n++]=c}i+=(0===a?"":",")+l.join(" ")}}return i=r+i+";",1===Q||2===Q&&de(i,1)?T+i+i:i}(p);if(0===Q||2===Q&&!de(p,1))return p;switch(f){case 1015:return 97===p.charCodeAt(10)?T+p+p:p;case 951:return 116===p.charCodeAt(3)?T+p+p:p;case 963:return 110===p.charCodeAt(5)?T+p+p:p;case 1009:if(100!==p.charCodeAt(4))break;case 969:case 942:return T+p+p;case 978:return T+p+O+p+p;case 1019:case 983:return T+p+O+p+F+p+p;case 883:return p.charCodeAt(8)===U?T+p+p:p.indexOf("image-set(",11)>0?p.replace(A,"$1"+T+"$2")+p:p;case 932:if(p.charCodeAt(4)===U)switch(p.charCodeAt(5)){case 103:return T+"box-"+p.replace("-grow","")+T+p+F+p.replace("grow","positive")+p;case 115:return T+p+F+p.replace("shrink","negative")+p;case 98:return T+p+F+p.replace("basis","preferred-size")+p}return T+p+F+p+p;case 964:return T+p+F+"flex-"+p+p;case 1023:if(99!==p.charCodeAt(8))break;return c=p.substring(p.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),T+"box-pack"+c+T+p+F+"flex-pack"+c+p;case 1005:return o.test(p)?p.replace(i,":"+T)+p.replace(i,":"+O)+p:p;case 1e3:switch(l=(c=p.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(l)){case 226:c=p.replace(D,"tb");break;case 232:c=p.replace(D,"tb-rl");break;case 220:c=p.replace(D,"lr");break;default:return p}return T+p+F+c+p;case 1017:if(-1===p.indexOf("sticky",9))return p;case 975:switch(l=(p=e).length-10,f=(c=(33===p.charCodeAt(l)?p.substring(0,l):p).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(c.charCodeAt(8)<111)break;case 115:p=p.replace(c,T+c)+";"+p;break;case 207:case 102:p=p.replace(c,T+(f>102?"inline-":"")+"box")+";"+p.replace(c,T+c)+";"+p.replace(c,F+c+"box")+";"+p}return p+";";case 938:if(p.charCodeAt(5)===U)switch(p.charCodeAt(6)){case 105:return c=p.replace("-items",""),T+p+T+"box-"+c+F+"flex-"+c+p;case 115:return T+p+F+"flex-item-"+p.replace(S,"")+p;default:return T+p+F+"flex-line-pack"+p.replace("align-content","").replace(S,"")+p}break;case 973:case 989:if(p.charCodeAt(3)!==U||122===p.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?fe(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):p.replace(c,T+c)+p.replace(c,O+c.replace("fill-",""))+p;break;case 962:if(p=T+p+(102===p.charCodeAt(5)?F+p:"")+p,n+r===211&&105===p.charCodeAt(13)&&p.indexOf("transform",10)>0)return p.substring(0,p.indexOf(";",27)+1).replace(a,"$1"+T+"$2")+p}return p}function de(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return re(2!==t?r:r.replace(_,"$1"),i,t)}function he(e,t){var n=fe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function me(e,t,n,r,i,o,a,s,u,c){for(var l,p=0,f=t;p0&&(ae=i.replace(d,91===o?"":"-")),o=1,1===J?ue=i:se=i;var a,s=[ue];ne>0&&void 0!==(a=me(-1,n,s,s,G,W,0,0,0,0))&&"string"==typeof a&&(n=a);var u=ce(ee,s,n,0,0);return ne>0&&void 0!==(a=me(-2,u,s,s,G,W,u.length,0,0,0))&&"string"!=typeof(u=a)&&(o=0),ae="",ue="",se="",K=0,G=1,W=1,$*o==0?u:u.replace(r,"").replace(y,"").replace(v,"$1").replace(b,"$1").replace(E," ")}return ve.use=function e(t){switch(t){case void 0:case null:ne=te.length=0;break;default:if("function"==typeof t)te[ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n0&&e.selectionSet.selections[0].name.value),"subscription"===e.operation&&(t=!0),"query"===e.operation&&(n=!0),"mutation"===e.operation&&(r=!0)})),{firstOperationName:i,subscription:t,query:n,mutation:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMove=t.sortableHandle=t.sortableElement=t.sortableContainer=t.SortableHandle=t.SortableElement=t.SortableContainer=void 0;var r=n(100);Object.defineProperty(t,"arrayMove",{enumerable:!0,get:function(){return r.arrayMove}});var i=s(n(280)),o=s(n(282)),a=s(n(283));function s(e){return e&&e.__esModule?e:{default:e}}t.SortableContainer=i.default,t.SortableElement=o.default,t.SortableHandle=a.default,t.sortableContainer=i.default,t.sortableElement=o.default,t.sortableHandle=a.default},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),a=n(48),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(o.Record({history:!1,headers:!0,allTabs:!0,shareUrl:null}));t.SharingState=s,t.default=a.handleActions({TOGGLE_SHARE_HISTORY:function(e){return e.set("history",!e.history)},TOGGLE_SHARE_HEADERS:function(e){return e.set("headers",!e.headers)},TOGGLE_SHARE_ALL_TABS:function(e){return e.set("allTabs",!e.allTabs)},SET_SHARE_URL:function(e,t){var n=t.payload.shareUrl;return e.set("shareUrl",n)}},new s)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),a=n(48),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(o.Record({historyOpen:!1,fixedEndpoint:!1,endpoint:"",configString:"",envVars:{}}));t.GeneralState=s,t.default=a.handleActions({OPEN_HISTORY:function(e){return e.set("historyOpen",!0)},CLOSE_HISTORY:function(e){return e.set("historyOpen",!1)},SET_ENDPOINT_DISABLED:function(e,t){var n=t.payload.value;return e.set("endpointDisabled",n)},SET_CONFIG_STRING:function(e,t){var n=t.payload.configString;return e.set("configString",n)}},new s)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1;const m=(e,t,n)=>{const r=e[f].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[d]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},y=e=>{if(e[o]>e[i])for(let t=e[p].tail;e[o]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[f].delete(n.key),e[p].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const E=(e,t,n,r)=>{let i=n.value;g(e,i)&&(v(e,n),e[s]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[o]=0,this[p].forEach(e=>{e.length=this[a](e.value,e.key),this[o]+=e.length})),y(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;E(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;E(this,e,n,t),n=r}}keys(){return this[p].toArray().map(e=>e.key)}values(){return this[p].toArray().map(e=>e.value)}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach(e=>this[c](e.key,e.value)),this[f]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[f].has(e)){if(s>this[i])return v(this,this[f].get(e)),!1;const a=this[f].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,r,n);return d.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=d.length,this[p].unshift(d),this[f].set(e,this[p].head),y(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[f].forEach((e,t)=>m(this,t,!1))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(41);t.getSharingState=r.createSelector([i.getSelectedWorkspace],(function(e){return e.sharing}));var o=function(e){return r.createSelector([t.getSharingState],(function(t){return t.get(e)}))};t.getSharingHistory=o("history"),t.getSharingHeaders=o("headers"),t.getSharingAllTabs=o("allTabs"),t.getShareUrl=o("shareUrl")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)}; /*! * Adapted from jQuery UI core * @@ -44,11 +44,11 @@ object-assign * * http://api.jqueryui.com/category/ui-core/ */ -var r=/input|select|textarea|button|object/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function o(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(i(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=c,t.hide=function(e){c(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){c(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var r,i=n(51),o=(r=i)&&r.__esModule?r:{default:r},a=n(120);var s=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){return!(!e&&!s)||((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42);t.darkColours={green:"#27ae60",darkBlue:"rgb(23, 42, 58)",darkBlue50:"rgba(23, 42, 58, 0.5)",darkBlue80:"rgba(23, 42, 58, 0.8)",darkBlue60:"rgba(23, 42, 58, 0.6)",darkBlue30:"rgba(23, 42, 58, 0.3)",darkBlue20:"rgba(23, 42, 58, 0.2)",darkBlue10:"rgba(23, 42, 58, 0.1)",darkerBlue:"#0F202D",darkestBlue:"rgb(11,20,28)",white10:"rgba(255, 255, 255, 0.1)",white20:"rgba(255, 255, 255, 0.2)",white30:"rgba(255, 255, 255, 0.3)",white60:"rgba(255, 255, 255, 0.6)",white70:"rgba(255, 255, 255, 0.7)",white80:"rgba(255, 255, 255, 0.8)",white:"rgba(255, 255, 255, 1)",black02:"rgba(0, 0, 0, 0.02)",black07:"rgba(0, 0, 0, 0.07)",black04:"rgba(0, 0, 0, 0.04)",black10:"rgba(0, 0, 0, 0.1)",black30:"rgba(0, 0, 0, 0.3)",black40:"rgba(0, 0, 0, 0.4)",black50:"rgba(0, 0, 0, 0.5)",red:"#f25c54",orange:"rgba(241, 143, 1, 1)",blue:"rgba(42, 126, 210, 1)",purple:"rgb(164, 3, 111)",paleText:"rgba(0, 0, 0, 0.5)",paleGrey:"#f3f4f4",lightGrey:"#eeeff0",lighterGrey:"#f6f7f7",text:"rgba(255,255,255,0.6)",textInactive:"#555e66"},t.lightColours={green:"#27ae60",darkBlue:"rgb(23, 42, 58)",darkBlue50:"rgba(23, 42, 58, 0.5)",darkBlue80:"rgba(23, 42, 58, 0.8)",darkBlue60:"rgba(23, 42, 58, 0.6)",darkBlue30:"rgba(23, 42, 58, 0.3)",darkBlue20:"rgba(23, 42, 58, 0.2)",darkBlue10:"rgba(23, 42, 58, 0.1)",darkerBlue:"#0F202D",darkestBlue:"rgb(11,20,28)",white10:"rgba(255, 255, 255, 0.1)",white20:"rgba(255, 255, 255, 0.2)",white30:"rgba(255, 255, 255, 0.3)",white60:"rgba(255, 255, 255, 0.6)",white70:"rgba(255, 255, 255, 0.7)",white80:"rgba(255, 255, 255, 0.8)",white:"rgba(255, 255, 255, 1)",black02:"rgba(0, 0, 0, 0.02)",black04:"rgba(0, 0, 0, 0.04)",black10:"rgba(0, 0, 0, 0.1)",black07:"rgba(0, 0, 0, 0.07)",black30:"rgba(0, 0, 0, 0.3)",black40:"rgba(0, 0, 0, 0.4)",black50:"rgba(0, 0, 0, 0.5)",red:"#f25c54",orange:"rgba(241, 143, 1, 1)",blue:"rgba(42, 126, 210, 1)",purple:"rgb(164, 3, 111)",paleText:"rgba(0, 0, 0, 0.5)",paleGrey:"#f3f4f4",lightGrey:"#eeeff0",lighterGrey:"#f6f7f7",text:"rgba(0,0,0,.7)",textInactive:"rgba(0,0,0,.3)"},t.darkEditorColours={property:"rgb(41, 185, 115)",comment:"rgba(255, 255, 255, 0.3)",punctuation:"rgba(255, 255, 255, 0.4)",keyword:"rgb(42, 126, 211)",def:"rgb(56, 189, 193)",qualifier:"#1c92a9",attribute:"rgb(247, 116, 102)",number:"#2882f9",string:"#d64292",builtin:"#d47509",string2:"#0b7fc7",variable:"rgb(181, 34, 130)",meta:"#b33086",atom:"rgb(249, 233, 34)",ws:"rgba(255, 255, 255, 0.4)",selection:"rgba(255, 255, 255, 0.1)",cursorColor:"rgba(255, 255, 255, 0.4)",text:"#fff",textInactive:"rgba(255, 255, 255, 0.6)",background:"#09141c",sidebarTop:"#0f202d",sidebar:"#172b3a",sidebarBottom:"#172b3a",sidebarItemActive:"rgb(23, 42, 58)",sidebarItemSide:"#27ae60",sidebarItemSessions:"rgba(255, 255, 255, 0.05)",tab:"#172b3a",tabInactive:"#0f202d",tabText:"#fff",navigationBar:"#172b3a",navigationBarText:"rgba(255, 255, 255, 0.6)",editorBackground:"#0f202d",resultBackground:"#172b3a",leftDrawerBackground:"#0b1924",rightDrawerBackground:"#0b1924",drawerText:"rgba(255,255,255,0.6)",drawerTextInactive:"#555e66",executeButton:"rgb(185, 191, 196)",executeButtonBorder:"rgb(11, 20, 28)",executeButtonHover:"rgb(195, 201, 206)",executeButtonSubscription:"#f25c54",executeButtonSubscriptionHover:"#f36c65",icon:"rgb(74, 85, 95)",iconHover:"rgba(255, 255, 255, 0.6)",pollingIcon:"rgba(139, 149, 156, 1)",pollingIconShadow:"rgba(139, 149, 156, 0.4)",button:"#0F202D",buttonHover:"#122535",buttonText:"rgba(255,255,255,0.6)",buttonWorkspace:"#b9bfc4",buttonWorkspaceHover:"#a4acb2",buttonWorkspaceText:"rgb(23, 42, 58)",circle:"rgba(255, 255, 255, 0.4)",subscriptionTimeBoaderTop:"rgba(255, 255, 255, 0.2)",subscriptionTimeText:"rgba(255, 255, 255, 0.5)"},t.lightEditorColours={property:"#328c8c",comment:"rgba(0, 0, 0, 0.3)",punctuation:"rgba(23,42,58,.8)",keyword:"#366b6b",def:"rgb(56, 189, 193)",qualifier:"#1c92a9",attribute:"#b56531",number:"#1f6ed6;",string:"#d64292",builtin:"#d47509",string2:"#0b7fc7",variable:"rgb(236, 95, 103)",meta:"#b33086",atom:"rgb(245, 160, 0)",ws:"rgba(23, 42, 58, 0.8)",selection:"#d1e9fd",cursorColor:"rgba(0, 0, 0, 0.4)",text:"rgba(0, 0, 0, 0.7)",textInactive:"rgba(0, 0, 0, 0.3)",background:"#dbdee0",sidebarTop:"#eeeff0",sidebar:"#eeeff0",sidebarBottom:"#f6f7f7",sidebarItemActive:"#f6f7f7",sidebarItemSide:"#27ae60",sidebarItemSessions:"#dbdee0",tab:"#eeeff0",tabInactive:"#e7eaec",tabText:"rgba(23, 42, 58, .8)",navigationBar:"#eeeff0",navigationBarText:"rgba(23, 42, 58, 0.8)",editorBackground:"#f6f7f7",resultBackground:"#eeeff0",leftDrawerBackground:"#e9eaea",rightDrawerBackground:"#e5e7e7",drawerText:"rgba(0, 0, 0, 0.7)",drawerTextInactive:"rgba(0, 0, 0, 0.3)",executeButton:"rgb(115, 127, 136)",executeButtonBorder:"#eeeff0",executeButtonHover:"",executeButtonSubscription:"#f25c54",executeButtonSubscriptionHover:"#f36c65",icon:"rgb(194, 200, 203)",iconHover:"rgba(23, 42, 58, 0.6)",pollingIcon:"rgba(139, 149, 156, 1)",pollingIconShadow:"rgba(139, 149, 156, 0.4)",button:"#d8dbde",buttonHover:"rgba(20, 37, 51, 0.2)",buttonText:"rgba(23, 42, 58, 0.8)",buttonWorkspace:"rgb(185, 191, 196)",buttonWorkspaceHover:"rgb(157, 166, 173)",buttonWorkspaceText:"rgb(238, 239, 240)",circle:"rgba(23,42,58,.4)",subscriptionTimeBoaderTop:"rgba(23, 42, 58, 0.2)",subscriptionTimeText:"rgba(23, 42, 58, 0.5)"},t.sizes={small6:"6px",small10:"10px",small12:"12px",small16:"16px",medium25:"25px",fontLight:"300",fontSemiBold:"600",fontTiny:"12px",fontSmall:"14px",fontMedium:"20px",smallRadius:"2px"},t.shorthands={},t.theme={mode:"dark",colours:t.darkColours,sizes:t.sizes,shorthands:t.shorthands,editorColours:t.darkEditorColours,settings:r.defaultSettings}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(34);t.toJS=function(e){return function(t){var n=Object.entries(t).reduce((function(e,t){return e[t[0]]=i.isImmutable(t[1])?t[1].toJS():t[1],e}),{});return r.createElement(e,n)}}},function(e,t,n){"use strict";e.exports=n(323)},function(e,t,n){"use strict";t.Any=n(172),t.Cc=n(173),t.Cf=n(328),t.P=n(104),t.Z=n(174)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";e.exports.tokenize=function(e,t){var n,r,i,o,a=e.pos,s=e.src.charCodeAt(a);if(t)return!1;if(126!==s)return!1;if(i=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),i<2)return!1;for(i%2&&(e.push("text","",0).content=o,i--),n=0;n=0;t--)95!==(n=s[t]).marker&&42!==n.marker||-1!==n.end&&(r=s[n.end],a=t>0&&s[t-1].end===n.end+1&&s[t-1].token===n.token-1&&s[n.end+1].token===r.token+1&&s[t-1].marker===n.marker,o=String.fromCharCode(n.marker),(i=e.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?o+o:o,i.content="",(i=e.tokens[r.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?o+o:o,i.content="",a&&(e.tokens[s[t-1].token].content="",e.tokens[s[n.end+1].token].content="",t--))}},function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var u={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function l(e){var t=e.re=n(369)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var u=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===i(n))return!function(e){return"[object RegExp]"===i(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(n)?c(t,n):u.push(t)}})),u.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function f(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function d(e,t){if(!(this instanceof d))return new d(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},u,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}d.prototype.add=function(e,t){return this.__schemas__[e]=t,l(this),this},d.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},d.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,u;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},d.prototype.pretest=function(e){return this.re.pretest.test(e)},d.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},d.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(f(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),l(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,l(this),this)},d.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},d.prototype.onCompile=function(){},e.exports=d},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(p,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=36)e=d(e/35);return d(r+36*e/(e+38))}function D(e){var t,n,r,i,o,a,s,c,l,p,f,h=[],g=e.length,y=0,v=128,E=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((c=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||c>d((u-y)/a))&&m("overflow"),y+=c*a,!(c<(l=s<=E?1:s>=E+26?26:s-E));s+=36)a>d(u/(p=36-l))&&m("overflow"),a*=p;E=x(y-o,t=h.length+1,0==o),d(y/t)>u-v&&m("overflow"),v+=d(y/t),y%=t,h.splice(y++,0,v)}return b(h)}function C(e){var t,n,r,i,o,a,s,c,l,p,f,g,y,b,D,C=[];for(g=(e=v(e)).length,t=128,n=0,o=72,a=0;a=t&&fd((u-n)/(y=r+1))&&m("overflow"),n+=(s-t)*y,t=s,a=0;au&&m("overflow"),f==t){for(c=n,l=36;!(c<(p=l<=o?1:l>=o+26?26:l-o));l+=36)D=c-p,b=36-p,C.push(h(E(p+D%b,0))),c=d(D/b);C.push(h(E(c,0))),o=x(n,y,r==i),n=0,++r}++n,++t}return C.join("")}s={version:"1.4.1",ucs2:{decode:v,encode:b},decode:D,encode:C,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?D(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(161)(e),n(43))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(373);t.default=function(t,i,o){var a,s,u;n(16).on(i,"select",(function(n,i){if(!a){var c=i.parentNode,l=c.parentNode;a=document.createElement("div"),l.appendChild(a);var p=c.style.top,f="",d=t.cursorCoords().top;parseInt(p,10)window.innerHeight&&(y=window.innerHeight-40-m),a.style.top=y+"px",e.wrapper=a,a.addEventListener("DOMNodeRemoved",h=function(e){e.target===c&&(a.removeEventListener("DOMNodeRemoved",h),a.parentNode.removeChild(a),a=null,s=null,h=null)})}var v=n.description?r(n.description,{sanitize:!0}):"",b=n.type&&"undefined"!==n.type?''+function(e){return''+e+""}(n.type)+"":"";if(s.innerHTML='
    '+("

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

    "+b+v.slice(3):b+v)+"

    ",n.isDeprecated){var E=n.deprecationReason?r(n.deprecationReason,{sanitize:!0}):"";u.innerHTML='Deprecated'+E,u.style.display="block"}else u.style.display="none";o&&o(s)}))}}).call(this,n(43))},function(e,t,n){const{noopTest:r,edit:i,merge:o}=n(76),a={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};a.def=i(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=i(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=i(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",a._comment=//,a.html=i(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=i(a._paragraph).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.blockquote=i(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=o({},a),a.gfm=o({},a.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),a.gfm.nptable=i(a.gfm.nptable).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.gfm.table=i(a.gfm.table).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.pedantic=o({},a.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const s={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~"};s.em=i(s.em).replace(/punctuation/g,s._punctuation).getRegex(),s._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,s._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,s._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,s.autolink=i(s.autolink).replace("scheme",s._scheme).replace("email",s._email).getRegex(),s._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,s.tag=i(s.tag).replace("comment",a._comment).replace("attribute",s._attribute).getRegex(),s._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,s._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,s.link=i(s.link).replace("label",s._label).replace("href",s._href).replace("title",s._title).getRegex(),s.reflink=i(s.reflink).replace("label",s._label).getRegex(),s.normal=o({},s),s.pedantic=o({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",s._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",s._label).getRegex()}),s.gfm=o({},s.normal,{escape:i(s.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(124),{defaults:i}=n(90),{inline:o}=n(181),{findClosingBracket:a,escape:s}=n(76);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=o.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=o.pedantic:this.options.gfm&&(this.options.breaks?this.rules=o.breaks:this.rules=o.gfm)}static get rules(){return o}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,o,u,c,l="";for(;t;)if(u=this.rules.escape.exec(t))t=t.substring(u[0].length),l+=s(u[1]);else if(u=this.rules.tag.exec(t))!this.inLink&&/^/i.test(u[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(u[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(u[0])&&(this.inRawBlock=!1),t=t.substring(u[0].length),l+=this.renderer.html(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):s(u[0]):u[0]);else if(u=this.rules.link.exec(t)){const r=a(u[2],"()");if(r>-1){const e=(0===u[0].indexOf("!")?5:4)+u[1].length+r;u[2]=u[2].substring(0,r),u[0]=u[0].substring(0,e).trim(),u[3]=""}t=t.substring(u[0].length),this.inLink=!0,i=u[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],o=n[3]):o=""):o=u[3]?u[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(u,{href:e.escapes(i),title:e.escapes(o)}),this.inLink=!1}else if((u=this.rules.reflink.exec(t))||(u=this.rules.nolink.exec(t))){if(t=t.substring(u[0].length),n=(u[2]||u[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){l+=u[0].charAt(0),t=u[0].substring(1)+t;continue}this.inLink=!0,l+=this.outputLink(u,n),this.inLink=!1}else if(u=this.rules.strong.exec(t))t=t.substring(u[0].length),l+=this.renderer.strong(this.output(u[4]||u[3]||u[2]||u[1]));else if(u=this.rules.em.exec(t))t=t.substring(u[0].length),l+=this.renderer.em(this.output(u[6]||u[5]||u[4]||u[3]||u[2]||u[1]));else if(u=this.rules.code.exec(t))t=t.substring(u[0].length),l+=this.renderer.codespan(s(u[2].trim(),!0));else if(u=this.rules.br.exec(t))t=t.substring(u[0].length),l+=this.renderer.br();else if(u=this.rules.del.exec(t))t=t.substring(u[0].length),l+=this.renderer.del(this.output(u[1]));else if(u=this.rules.autolink.exec(t))t=t.substring(u[0].length),"@"===u[2]?(r=s(this.mangle(u[1])),i="mailto:"+r):(r=s(u[1]),i=r),l+=this.renderer.link(i,null,r);else if(this.inLink||!(u=this.rules.url.exec(t))){if(u=this.rules.text.exec(t))t=t.substring(u[0].length),this.inRawBlock?l+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):s(u[0]):u[0]):l+=this.renderer.text(s(this.smartypants(u[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===u[2])r=s(u[0]),i="mailto:"+r;else{do{c=u[0],u[0]=this.rules._backpedal.exec(u[0])[0]}while(c!==u[0]);r=s(u[0]),i="www."===u[1]?"http://"+r:r}t=t.substring(u[0].length),l+=this.renderer.link(i,null,r)}return l}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function a(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=1/0,i=this.listSelections(),o=null,a=i.length-1;a>=0;a--){var s=i[a].from(),u=i[a].to();s.line>=n||(u.line>=n&&(u=r(n,0)),n=s.line,null==o?this.uncomment(s,u,e)?o="un":(this.lineComment(s,u,e),o="line"):"un"==o?this.uncomment(s,u,e):this.lineComment(s,u,e))}})),e.defineExtension("lineComment",(function(e,i,s){s||(s=t);var u=this,c=a(u,e),l=u.getLine(e.line);if(null!=l&&(p=e,f=l,!/\bstring\b/.test(u.getTokenTypeAt(r(p.line,0)))||/^[\'\"\`]/.test(f))){var p,f,d=s.lineComment||c.lineComment;if(d){var h=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,u.lastLine()+1),m=null==s.padding?" ":s.padding,g=s.commentBlankLines||e.line==i.line;u.operation((function(){if(s.indent){for(var t=null,i=e.line;ia.length)&&(t=a)}for(i=e.line;if||u.operation((function(){if(0!=s.fullLines){var t=n.test(u.getLine(f));u.replaceRange(d+p,r(f)),u.replaceRange(l+d,r(e.line,0));var a=s.blockCommentLead||c.blockCommentLead;if(null!=a)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&u.replaceRange(a+d,r(h,0))}else{var m=0==i(u.getCursor("to"),o),g=!u.somethingSelected();u.replaceRange(p,o),m&&u.setSelection(g?o:u.getCursor("from"),o),u.replaceRange(l,e)}}))}}else(s.lineComment||c.lineComment)&&0!=s.fullLines&&u.lineComment(e,o,s)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var s,u=this,c=a(u,e),l=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,u.lastLine()),p=Math.min(e.line,l),f=o.lineComment||c.lineComment,d=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=p;m<=l;++m){var g=u.getLine(m),y=g.indexOf(f);if(y>-1&&!/comment/.test(u.getTokenTypeAt(r(m,y+1)))&&(y=-1),-1==y&&n.test(g))break e;if(y>-1&&n.test(g.slice(0,y)))break e;d.push(g)}if(u.operation((function(){for(var e=p;e<=l;++e){var t=d[e-p],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),s=!0,u.replaceRange("",r(e,n),r(e,i)))}})),s)return!0}var v=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!v||!b)return!1;var E=o.blockCommentLead||c.blockCommentLead,x=u.getLine(p),D=x.indexOf(v);if(-1==D)return!1;var C=l==p?x:u.getLine(l),w=C.indexOf(b,l==p?D+v.length:0),S=r(p,D+1),k=r(l,w+1);if(-1==w||!/comment/.test(u.getTokenTypeAt(S))||!/comment/.test(u.getTokenTypeAt(k))||u.getRange(S,k,"\n").indexOf(b)>-1)return!1;var A=x.lastIndexOf(v,e.ch),T=-1==A?-1:x.slice(0,e.ch).indexOf(b,A+v.length);if(-1!=A&&-1!=T&&T+b.length!=e.ch)return!1;T=C.indexOf(b,i.ch);var _=C.slice(i.ch).lastIndexOf(v,T-i.ch);return A=-1==T||-1==_?-1:i.ch+_,(-1==T||-1==A||A==i.ch)&&(u.operation((function(){u.replaceRange("",r(l,w-(h&&C.slice(w-h.length,w)==h?h.length:0)),r(l,w+b.length));var e=D+v.length;if(h&&x.slice(e,e+h.length)==h&&(e+=h.length),u.replaceRange("",r(p,D),r(p,e)),E)for(var t=p+1;t<=l;++t){var i=u.getLine(t),o=i.indexOf(E);if(-1!=o&&!n.test(i.slice(0,o))){var a=o+E.length;h&&i.slice(a,a+h.length)==h&&(a+=h.length),u.replaceRange("",r(t,o),r(t,a))}}})),!0)}))}(n(16))},function(e,t,n){!function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function a(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function s(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function u(e,t,n){t.queryText=n,t.query=s(n),e.removeOverlay(t.overlay,r(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function c(t,r,i,a){var s=n(t);if(s.query)return l(t,r);var c=t.getSelection()||s.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var d=null,h=function(n,r){e.e_stop(r),n&&(n!=s.queryText&&(u(t,s,n),s.posFrom=s.posTo=t.getCursor()),d&&(d.style.opacity=1),l(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((d=r).style.opacity=.4)})))};!function(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:i})}(t,f(t),c,h,(function(r,i){var o=e.keyName(r),a=t.getOption("extraKeys"),s=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(r),u(t,n(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(r),h(i,r))})),a&&c&&(u(t,s,c),l(t,r))}else o(t,f(t),"Search for:",c,(function(e){e&&!s.query&&t.operation((function(){u(t,s,e),s.posFrom=s.posTo=t.getCursor(),l(t,r)}))}))}function l(t,r,o){t.operation((function(){var a=n(t),s=i(t,a.query,r?a.posFrom:a.posTo);(s.find(r)||(s=i(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),o&&o(s.from(),s.to()))}))}function p(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function f(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function d(e,t,n){e.operation((function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else r.replace(n)}))}function h(e,t){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,u=''+(t?e.phrase("Replace all:"):e.phrase("Replace:"))+"";o(e,u+function(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}(e),u,r,(function(n){n&&(n=s(n),o(e,function(e){return''+e.phrase("With:")+' '}(e),e.phrase("Replace with:"),"",(function(r){if(r=a(r),t)d(e,n,r);else{p(e);var o=i(e,n,e.getCursor("from")),s=function(){var t,a=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||a&&o.from().line==a.line&&o.from().ch==a.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}(e,function(e){return''+e.phrase("Replace?")+" "}(e),e.phrase("Replace?"),[function(){u(t)},s,function(){d(e,n,r)}]))},u=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),s()};s()}})))}))}}e.commands.find=function(e){p(e),c(e)},e.commands.findPersistent=function(e){p(e),c(e,!1,!0)},e.commands.findPersistentNext=function(e){c(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){c(e,!0,!0,!0)},e.commands.findNext=c,e.commands.findPrev=function(e){c(e,!0)},e.commands.clearSearch=p,e.commands.replace=h,e.commands.replaceAll=function(e){h(e,!0)}}(n(16),n(70),n(71))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return(0,a.default)(t,t=>{switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?s(e,n.parentType,t.name):null,n.type=n.fieldDef&&n.fieldDef.type;break;case"SelectionSet":n.parentType=(0,i.getNamedType)(n.type);break;case"Directive":n.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":const r="Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&s(e,n.parentType,t.prevState.name):null;n.argDefs=r&&r.args;break;case"Argument":if(n.argDef=null,n.argDefs)for(let e=0;ee.value===t.name):null;break;case"ListValue":const a=(0,i.getNullableType)(n.inputType);n.inputType=a instanceof i.GraphQLList?a.ofType:null;break;case"ObjectValue":const u=(0,i.getNamedType)(n.inputType);n.objectFieldDefs=u instanceof i.GraphQLInputObjectType?u.getFields():null;break;case"ObjectField":const c=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=c&&c.type;break;case"NamedType":n.type=e.getType(t.name)}}),n};var r,i=n(20),o=n(12),a=(r=n(188))&&r.__esModule?r:{default:r};function s(e,t,n){return n===o.SchemaMetaFieldDef.name&&e.getQueryType()===t?o.SchemaMetaFieldDef:n===o.TypeMetaFieldDef.name&&e.getQueryType()===t?o.TypeMetaFieldDef:n===o.TypeNameMetaFieldDef.name&&(0,i.isCompositeType)(t)?o.TypeNameMetaFieldDef:t.getFields?t.getFields()[n]:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=[];let r=e;for(;r&&r.kind;)n.push(r),r=r.prevState;for(let e=n.length-1;e>=0;e--)t(n[e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFieldReference=function(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getDirectiveReference=function(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}},t.getArgumentReference=function(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getEnumValueReference=function(e){return{kind:"EnumValue",value:e.enumValue,type:(0,r.getNamedType)(e.inputType)}},t.getTypeReference=function(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}};var r=n(20);function i(e){return"__"===e.name.slice(0,2)}},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatWhile(o.isIgnored),lexRules:o.LexRules,parseRules:o.ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}})},function(e,t,n){"use strict";var r=n(388),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,u,c,l=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),c&&document.body.removeChild(c),a()}return l}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.default=o.styled.div(i||(i=r(["\n width: 20px;\n height: 20px;\n"],["\n width: 20px;\n height: 20px;\n"])))},function(e,t,n){"use strict";var r=s(n(16)),i=n(20),o=s(n(188)),a=s(n(401));function s(e){return e&&e.__esModule?e:{default:e}}r.default.registerHelper("hint","graphql-variables",(e,t)=>{const n=e.getCursor(),s=e.getTokenAt(n),u=function(e,t,n){const r="Invalid"===t.state.kind?t.state.prevState:t.state,s=r.kind,u=r.step;if("Document"===s&&0===u)return(0,a.default)(e,t,[{text:"{"}]);const c=n.variableToType;if(!c)return;const l=function(e,t){const n={type:null,fields:null};return(0,o.default)(t,t=>{if("Variable"===t.kind)n.type=e[t.name];else if("ListValue"===t.kind){const e=(0,i.getNullableType)(n.type);n.type=e instanceof i.GraphQLList?e.ofType:null}else if("ObjectValue"===t.kind){const e=(0,i.getNamedType)(n.type);n.fields=e instanceof i.GraphQLInputObjectType?e.getFields():null}else if("ObjectField"===t.kind){const e=t.name&&n.fields?n.fields[t.name]:null;n.type=e&&e.type}}),n}(c,t.state);if("Document"===s||"Variable"===s&&0===u){const n=Object.keys(c);return(0,a.default)(e,t,n.map(e=>({text:'"'.concat(e,'": '),type:c[e]})))}if(("ObjectValue"===s||"ObjectField"===s&&0===u)&&l.fields){const n=Object.keys(l.fields).map(e=>l.fields[e]);return(0,a.default)(e,t,n.map(e=>({text:'"'.concat(e.name,'": '),type:e.type,description:e.description})))}if("StringValue"===s||"NumberValue"===s||"BooleanValue"===s||"NullValue"===s||"ListValue"===s&&1===u||"ObjectField"===s&&2===u||"Variable"===s&&2===u){const n=(0,i.getNamedType)(l.type);if(n instanceof i.GraphQLInputObjectType)return(0,a.default)(e,t,[{text:"{"}]);if(n instanceof i.GraphQLEnumType){const r=n.getValues(),i=Object.keys(r).map(e=>r[e]);return(0,a.default)(e,t,i.map(e=>({text:'"'.concat(e.name,'"'),type:n,description:e.description})))}if(n===i.GraphQLBoolean)return(0,a.default)(e,t,[{text:"true",type:i.GraphQLBoolean,description:"Not false."},{text:"false",type:i.GraphQLBoolean,description:"Not true."}])}}(n,s,t);return u&&u.list&&u.list.length>0&&(u.from=r.default.Pos(u.from.line,u.from.column),u.to=r.default.Pos(u.to.line,u.to.column),r.default.signal(e,"hasCompletion",e,u,s)),u})},function(e,t,n){"use strict";var r=a(n(16)),i=n(20),o=a(n(402));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}function u(e,t){return Array.prototype.concat.apply([],e.map(t))}r.default.registerHelper("lint","graphql-variables",(e,t,n)=>{if(!e)return[];let r;try{r=(0,o.default)(e)}catch(e){if(e.stack)throw e;return[s(n,e,e.message)]}const a=t.variableToType;return a?function(e,t,n){const r=[];return n.members.forEach(n=>{const o=n.key.value,a=t[o];a?function e(t,n){if(t instanceof i.GraphQLNonNull)return"Null"===n.kind?[[n,'Type "'.concat(t,'" is non-nullable and cannot be null.')]]:e(t.ofType,n);if("Null"===n.kind)return[];if(t instanceof i.GraphQLList){const r=t.ofType;return"Array"===n.kind?u(n.values,t=>e(r,t)):e(r,n)}if(t instanceof i.GraphQLInputObjectType){if("Object"!==n.kind)return[[n,'Type "'.concat(t,'" must be an Object.')]];const r=Object.create(null),o=u(n.members,n=>{const i=n.key.value;r[i]=!0;const o=t.getFields()[i];if(!o)return[[n.key,'Type "'.concat(t,'" does not have a field "').concat(i,'".')]];const a=o?o.type:void 0;return e(a,n.value)});return Object.keys(t.getFields()).forEach(e=>{if(!r[e]){t.getFields()[e].type instanceof i.GraphQLNonNull&&o.push([n,'Object of type "'.concat(t,'" is missing required field "').concat(e,'".')])}}),o}if("Boolean"===t.name&&"Boolean"!==n.kind||"String"===t.name&&"String"!==n.kind||"ID"===t.name&&"Number"!==n.kind&&"String"!==n.kind||"Float"===t.name&&"Number"!==n.kind||"Int"===t.name&&("Number"!==n.kind||(0|n.value)!==n.value))return[[n,'Expected value of type "'.concat(t,'".')]];if((t instanceof i.GraphQLEnumType||t instanceof i.GraphQLScalarType)&&("String"!==n.kind&&"Number"!==n.kind&&"Boolean"!==n.kind&&"Null"!==n.kind||(null==(r=t.parseValue(n.value))||r!=r)))return[[n,'Expected value of type "'.concat(t,'".')]];var r;return[]}(a,n.value).forEach(([t,n])=>{r.push(s(e,t,n))}):r.push(s(e,n.key,'Variable "$'.concat(o,'" does not appear in any GraphQL query.')))}),r}(n,a,r):[]})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql-variables",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:u,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},u={Document:[(0,o.p)("{"),(0,o.list)("Variable",(0,o.opt)((0,o.p)(","))),(0,o.p)("}")],Variable:[c("variable"),(0,o.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,o.t)("Number","number")],StringValue:[(0,o.t)("String","string")],BooleanValue:[(0,o.t)("Keyword","builtin")],NullValue:[(0,o.t)("Keyword","keyword")],ListValue:[(0,o.p)("["),(0,o.list)("Value",(0,o.opt)((0,o.p)(","))),(0,o.p)("]")],ObjectValue:[(0,o.p)("{"),(0,o.list)("ObjectField",(0,o.opt)((0,o.p)(","))),(0,o.p)("}")],ObjectField:[c("attribute"),(0,o.p)(":"),"Value"]};function c(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLeft=function(e){let t=0,n=e;for(;n.offsetParent;)t+=n.offsetLeft,n=n.offsetParent;return t},t.getTop=function(e){let t=0,n=e;for(;n.offsetParent;)t+=n.offsetTop,n=n.offsetParent;return t}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.activeColor,r=e.active,i=e.onClick,o=e.tabWidth;return a.createElement(l,{onClick:i,activeColor:n,active:r,tabWidth:o},t)},t}(a.PureComponent);t.default=u;var c,l=s.styled("div")(c||(c=o(["\n z-index: ",";\n padding: 8px 8px 8px 8px;\n border-radius: 2px 2px 0px 0px;\n color: ",";\n background: ",";\n box-shadow: -1px 1px 6px 0 rgba(0, 0, 0, 0.3);\n text-transform: uppercase;\n text-align: center;\n font-weight: 600;\n font-size: 12px;\n line-height: 12px;\n letter-spacing: 0.45px;\n cursor: pointer;\n transform: rotate(-90deg);\n transform-origin: bottom left;\n margin-top: 65px;\n width: ",";\n"],["\n z-index: ",";\n padding: 8px 8px 8px 8px;\n border-radius: 2px 2px 0px 0px;\n color: ",";\n background: ",";\n box-shadow: -1px 1px 6px 0 rgba(0, 0, 0, 0.3);\n text-transform: uppercase;\n text-align: center;\n font-weight: 600;\n font-size: 12px;\n line-height: 12px;\n letter-spacing: 0.45px;\n cursor: pointer;\n transform: rotate(-90deg);\n transform-origin: bottom left;\n margin-top: 65px;\n width: ",";\n"])),(function(e){return e.active?10:2}),(function(e){return"dark"===e.theme.mode?e.theme.colours.white:e.theme.colours[e.active?"white":"darkBlue"]}),(function(e){return e.active&&e.activeColor?e.theme.colours[e.activeColor]:"dark"===e.theme.mode?"#3D5866":"#DBDEE0"}),(function(e){return e.tabWidth||"100%"}))},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91}; +var r=/input|select|textarea|button|object/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function o(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(i(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=c,t.hide=function(e){c(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){c(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var r,i=n(50),o=(r=i)&&r.__esModule?r:{default:r},a=n(118);var s=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){return!(!e&&!s)||((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);t.darkColours={green:"#27ae60",darkBlue:"rgb(23, 42, 58)",darkBlue50:"rgba(23, 42, 58, 0.5)",darkBlue80:"rgba(23, 42, 58, 0.8)",darkBlue60:"rgba(23, 42, 58, 0.6)",darkBlue30:"rgba(23, 42, 58, 0.3)",darkBlue20:"rgba(23, 42, 58, 0.2)",darkBlue10:"rgba(23, 42, 58, 0.1)",darkerBlue:"#0F202D",darkestBlue:"rgb(11,20,28)",white10:"rgba(255, 255, 255, 0.1)",white20:"rgba(255, 255, 255, 0.2)",white30:"rgba(255, 255, 255, 0.3)",white60:"rgba(255, 255, 255, 0.6)",white70:"rgba(255, 255, 255, 0.7)",white80:"rgba(255, 255, 255, 0.8)",white:"rgba(255, 255, 255, 1)",black02:"rgba(0, 0, 0, 0.02)",black07:"rgba(0, 0, 0, 0.07)",black04:"rgba(0, 0, 0, 0.04)",black10:"rgba(0, 0, 0, 0.1)",black30:"rgba(0, 0, 0, 0.3)",black40:"rgba(0, 0, 0, 0.4)",black50:"rgba(0, 0, 0, 0.5)",red:"#f25c54",orange:"rgba(241, 143, 1, 1)",blue:"rgba(42, 126, 210, 1)",purple:"rgb(164, 3, 111)",paleText:"rgba(0, 0, 0, 0.5)",paleGrey:"#f3f4f4",lightGrey:"#eeeff0",lighterGrey:"#f6f7f7",text:"rgba(255,255,255,0.6)",textInactive:"#555e66"},t.lightColours={green:"#27ae60",darkBlue:"rgb(23, 42, 58)",darkBlue50:"rgba(23, 42, 58, 0.5)",darkBlue80:"rgba(23, 42, 58, 0.8)",darkBlue60:"rgba(23, 42, 58, 0.6)",darkBlue30:"rgba(23, 42, 58, 0.3)",darkBlue20:"rgba(23, 42, 58, 0.2)",darkBlue10:"rgba(23, 42, 58, 0.1)",darkerBlue:"#0F202D",darkestBlue:"rgb(11,20,28)",white10:"rgba(255, 255, 255, 0.1)",white20:"rgba(255, 255, 255, 0.2)",white30:"rgba(255, 255, 255, 0.3)",white60:"rgba(255, 255, 255, 0.6)",white70:"rgba(255, 255, 255, 0.7)",white80:"rgba(255, 255, 255, 0.8)",white:"rgba(255, 255, 255, 1)",black02:"rgba(0, 0, 0, 0.02)",black04:"rgba(0, 0, 0, 0.04)",black10:"rgba(0, 0, 0, 0.1)",black07:"rgba(0, 0, 0, 0.07)",black30:"rgba(0, 0, 0, 0.3)",black40:"rgba(0, 0, 0, 0.4)",black50:"rgba(0, 0, 0, 0.5)",red:"#f25c54",orange:"rgba(241, 143, 1, 1)",blue:"rgba(42, 126, 210, 1)",purple:"rgb(164, 3, 111)",paleText:"rgba(0, 0, 0, 0.5)",paleGrey:"#f3f4f4",lightGrey:"#eeeff0",lighterGrey:"#f6f7f7",text:"rgba(0,0,0,.7)",textInactive:"rgba(0,0,0,.3)"},t.darkEditorColours={property:"rgb(41, 185, 115)",comment:"rgba(255, 255, 255, 0.3)",punctuation:"rgba(255, 255, 255, 0.4)",keyword:"rgb(42, 126, 211)",def:"rgb(56, 189, 193)",qualifier:"#1c92a9",attribute:"rgb(247, 116, 102)",number:"#2882f9",string:"#d64292",builtin:"#d47509",string2:"#0b7fc7",variable:"rgb(181, 34, 130)",meta:"#b33086",atom:"rgb(249, 233, 34)",ws:"rgba(255, 255, 255, 0.4)",selection:"rgba(255, 255, 255, 0.1)",cursorColor:"rgba(255, 255, 255, 0.4)",text:"#fff",textInactive:"rgba(255, 255, 255, 0.6)",background:"#09141c",sidebarTop:"#0f202d",sidebar:"#172b3a",sidebarBottom:"#172b3a",sidebarItemActive:"rgb(23, 42, 58)",sidebarItemSide:"#27ae60",sidebarItemSessions:"rgba(255, 255, 255, 0.05)",tab:"#172b3a",tabInactive:"#0f202d",tabText:"#fff",navigationBar:"#172b3a",navigationBarText:"rgba(255, 255, 255, 0.6)",editorBackground:"#0f202d",resultBackground:"#172b3a",leftDrawerBackground:"#0b1924",rightDrawerBackground:"#0b1924",drawerText:"rgba(255,255,255,0.6)",drawerTextInactive:"#555e66",executeButton:"rgb(185, 191, 196)",executeButtonBorder:"rgb(11, 20, 28)",executeButtonHover:"rgb(195, 201, 206)",executeButtonSubscription:"#f25c54",executeButtonSubscriptionHover:"#f36c65",icon:"rgb(74, 85, 95)",iconHover:"rgba(255, 255, 255, 0.6)",pollingIcon:"rgba(139, 149, 156, 1)",pollingIconShadow:"rgba(139, 149, 156, 0.4)",button:"#0F202D",buttonHover:"#122535",buttonText:"rgba(255,255,255,0.6)",buttonWorkspace:"#b9bfc4",buttonWorkspaceHover:"#a4acb2",buttonWorkspaceText:"rgb(23, 42, 58)",circle:"rgba(255, 255, 255, 0.4)",subscriptionTimeBoaderTop:"rgba(255, 255, 255, 0.2)",subscriptionTimeText:"rgba(255, 255, 255, 0.5)"},t.lightEditorColours={property:"#328c8c",comment:"rgba(0, 0, 0, 0.3)",punctuation:"rgba(23,42,58,.8)",keyword:"#366b6b",def:"rgb(56, 189, 193)",qualifier:"#1c92a9",attribute:"#b56531",number:"#1f6ed6;",string:"#d64292",builtin:"#d47509",string2:"#0b7fc7",variable:"rgb(236, 95, 103)",meta:"#b33086",atom:"rgb(245, 160, 0)",ws:"rgba(23, 42, 58, 0.8)",selection:"#d1e9fd",cursorColor:"rgba(0, 0, 0, 0.4)",text:"rgba(0, 0, 0, 0.7)",textInactive:"rgba(0, 0, 0, 0.3)",background:"#dbdee0",sidebarTop:"#eeeff0",sidebar:"#eeeff0",sidebarBottom:"#f6f7f7",sidebarItemActive:"#f6f7f7",sidebarItemSide:"#27ae60",sidebarItemSessions:"#dbdee0",tab:"#eeeff0",tabInactive:"#e7eaec",tabText:"rgba(23, 42, 58, .8)",navigationBar:"#eeeff0",navigationBarText:"rgba(23, 42, 58, 0.8)",editorBackground:"#f6f7f7",resultBackground:"#eeeff0",leftDrawerBackground:"#e9eaea",rightDrawerBackground:"#e5e7e7",drawerText:"rgba(0, 0, 0, 0.7)",drawerTextInactive:"rgba(0, 0, 0, 0.3)",executeButton:"rgb(115, 127, 136)",executeButtonBorder:"#eeeff0",executeButtonHover:"",executeButtonSubscription:"#f25c54",executeButtonSubscriptionHover:"#f36c65",icon:"rgb(194, 200, 203)",iconHover:"rgba(23, 42, 58, 0.6)",pollingIcon:"rgba(139, 149, 156, 1)",pollingIconShadow:"rgba(139, 149, 156, 0.4)",button:"#d8dbde",buttonHover:"rgba(20, 37, 51, 0.2)",buttonText:"rgba(23, 42, 58, 0.8)",buttonWorkspace:"rgb(185, 191, 196)",buttonWorkspaceHover:"rgb(157, 166, 173)",buttonWorkspaceText:"rgb(238, 239, 240)",circle:"rgba(23,42,58,.4)",subscriptionTimeBoaderTop:"rgba(23, 42, 58, 0.2)",subscriptionTimeText:"rgba(23, 42, 58, 0.5)"},t.sizes={small6:"6px",small10:"10px",small12:"12px",small16:"16px",medium25:"25px",fontLight:"300",fontSemiBold:"600",fontTiny:"12px",fontSmall:"14px",fontMedium:"20px",smallRadius:"2px"},t.shorthands={},t.theme={mode:"dark",colours:t.darkColours,sizes:t.sizes,shorthands:t.shorthands,editorColours:t.darkEditorColours,settings:r.defaultSettings}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(34);t.toJS=function(e){return function(t){var n=Object.entries(t).reduce((function(e,t){return e[t[0]]=i.isImmutable(t[1])?t[1].toJS():t[1],e}),{});return r.createElement(e,n)}}},function(e,t,n){"use strict";e.exports=n(314)},function(e,t,n){"use strict";e.exports=n(315)},function(e,t,n){"use strict";t.Any=n(120),t.Cc=n(121),t.Cf=n(320),t.P=n(88),t.Z=n(122)},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s=[],u=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(p,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=36)e=d(e/35);return d(r+36*e/(e+38))}function D(e){var t,n,r,i,o,a,s,c,l,p,f,h=[],g=e.length,y=0,v=128,E=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((c=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||c>d((u-y)/a))&&m("overflow"),y+=c*a,!(c<(l=s<=E?1:s>=E+26?26:s-E));s+=36)a>d(u/(p=36-l))&&m("overflow"),a*=p;E=x(y-o,t=h.length+1,0==o),d(y/t)>u-v&&m("overflow"),v+=d(y/t),y%=t,h.splice(y++,0,v)}return b(h)}function C(e){var t,n,r,i,o,a,s,c,l,p,f,g,y,b,D,C=[];for(g=(e=v(e)).length,t=128,n=0,o=72,a=0;a=t&&fd((u-n)/(y=r+1))&&m("overflow"),n+=(s-t)*y,t=s,a=0;au&&m("overflow"),f==t){for(c=n,l=36;!(c<(p=l<=o?1:l>=o+26?26:l-o));l+=36)D=c-p,b=36-p,C.push(h(E(p+D%b,0))),c=d(D/b);C.push(h(E(c,0))),o=x(n,y,r==i),n=0,++r}++n,++t}return C.join("")}s={version:"1.4.1",ucs2:{decode:v,encode:b},decode:D,encode:C,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?D(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(160)(e),n(42))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(366),i=new(n(170));t.default=function(t,o,a){var s,u,c;n(16).on(o,"select",(function(n,o){if(!s){var l=o.parentNode,p=l.parentNode;s=document.createElement("div"),p.appendChild(s);var f=l.style.top,d="",h=t.cursorCoords().top;parseInt(f,10)window.innerHeight&&(v=window.innerHeight-40-g),s.style.top=v+"px",e.wrapper=s,s.addEventListener("DOMNodeRemoved",m=function(e){e.target===l&&(s.removeEventListener("DOMNodeRemoved",m),s.parentNode.removeChild(s),s=null,u=null,m=null)})}var b=n.description?i.render(n.description):"",E=n.type&&"undefined"!==n.type?''+function(e){return''+r(e.toString())+""}(n.type)+"":"";if(u.innerHTML='
    '+("

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

    "+E+b.slice(3):E+b)+"

    ",n.isDeprecated){var x=n.deprecationReason?i.render(n.deprecationReason):"";c.innerHTML='Deprecated'+x,c.style.display="block"}else c.style.display="none";a&&a(u)}))}}).call(this,n(42))},function(e,t,n){!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function a(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=1/0,i=this.listSelections(),o=null,a=i.length-1;a>=0;a--){var s=i[a].from(),u=i[a].to();s.line>=n||(u.line>=n&&(u=r(n,0)),n=s.line,null==o?this.uncomment(s,u,e)?o="un":(this.lineComment(s,u,e),o="line"):"un"==o?this.uncomment(s,u,e):this.lineComment(s,u,e))}})),e.defineExtension("lineComment",(function(e,i,s){s||(s=t);var u=this,c=a(u,e),l=u.getLine(e.line);if(null!=l&&(p=e,f=l,!/\bstring\b/.test(u.getTokenTypeAt(r(p.line,0)))||/^[\'\"\`]/.test(f))){var p,f,d=s.lineComment||c.lineComment;if(d){var h=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,u.lastLine()+1),m=null==s.padding?" ":s.padding,g=s.commentBlankLines||e.line==i.line;u.operation((function(){if(s.indent){for(var t=null,i=e.line;ia.length)&&(t=a)}for(i=e.line;if||u.operation((function(){if(0!=s.fullLines){var t=n.test(u.getLine(f));u.replaceRange(d+p,r(f)),u.replaceRange(l+d,r(e.line,0));var a=s.blockCommentLead||c.blockCommentLead;if(null!=a)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&u.replaceRange(a+d,r(h,0))}else{var m=0==i(u.getCursor("to"),o),g=!u.somethingSelected();u.replaceRange(p,o),m&&u.setSelection(g?o:u.getCursor("from"),o),u.replaceRange(l,e)}}))}}else(s.lineComment||c.lineComment)&&0!=s.fullLines&&u.lineComment(e,o,s)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var s,u=this,c=a(u,e),l=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,u.lastLine()),p=Math.min(e.line,l),f=o.lineComment||c.lineComment,d=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=p;m<=l;++m){var g=u.getLine(m),y=g.indexOf(f);if(y>-1&&!/comment/.test(u.getTokenTypeAt(r(m,y+1)))&&(y=-1),-1==y&&n.test(g))break e;if(y>-1&&n.test(g.slice(0,y)))break e;d.push(g)}if(u.operation((function(){for(var e=p;e<=l;++e){var t=d[e-p],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),s=!0,u.replaceRange("",r(e,n),r(e,i)))}})),s)return!0}var v=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!v||!b)return!1;var E=o.blockCommentLead||c.blockCommentLead,x=u.getLine(p),D=x.indexOf(v);if(-1==D)return!1;var C=l==p?x:u.getLine(l),w=C.indexOf(b,l==p?D+v.length:0),S=r(p,D+1),_=r(l,w+1);if(-1==w||!/comment/.test(u.getTokenTypeAt(S))||!/comment/.test(u.getTokenTypeAt(_))||u.getRange(S,_,"\n").indexOf(b)>-1)return!1;var k=x.lastIndexOf(v,e.ch),A=-1==k?-1:x.slice(0,e.ch).indexOf(b,k+v.length);if(-1!=k&&-1!=A&&A+b.length!=e.ch)return!1;A=C.indexOf(b,i.ch);var T=C.slice(i.ch).lastIndexOf(v,A-i.ch);return k=-1==A||-1==T?-1:i.ch+T,(-1==A||-1==k||k==i.ch)&&(u.operation((function(){u.replaceRange("",r(l,w-(h&&C.slice(w-h.length,w)==h?h.length:0)),r(l,w+b.length));var e=D+v.length;if(h&&x.slice(e,e+h.length)==h&&(e+=h.length),u.replaceRange("",r(p,D),r(p,e)),E)for(var t=p+1;t<=l;++t){var i=u.getLine(t),o=i.indexOf(E);if(-1!=o&&!n.test(i.slice(0,o))){var a=o+E.length;h&&i.slice(a,a+h.length)==h&&(a+=h.length),u.replaceRange("",r(t,o),r(t,a))}}})),!0)}))}(n(16))},function(e,t,n){!function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function a(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function s(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function u(e,t,n){t.queryText=n,t.query=s(n),e.removeOverlay(t.overlay,r(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function c(t,r,i,a){var s=n(t);if(s.query)return l(t,r);var c=t.getSelection()||s.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var d=null,h=function(n,r){e.e_stop(r),n&&(n!=s.queryText&&(u(t,s,n),s.posFrom=s.posTo=t.getCursor()),d&&(d.style.opacity=1),l(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((d=r).style.opacity=.4)})))};!function(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:i})}(t,f(t),c,h,(function(r,i){var o=e.keyName(r),a=t.getOption("extraKeys"),s=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(r),u(t,n(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(r),h(i,r))})),a&&c&&(u(t,s,c),l(t,r))}else o(t,f(t),"Search for:",c,(function(e){e&&!s.query&&t.operation((function(){u(t,s,e),s.posFrom=s.posTo=t.getCursor(),l(t,r)}))}))}function l(t,r,o){t.operation((function(){var a=n(t),s=i(t,a.query,r?a.posFrom:a.posTo);(s.find(r)||(s=i(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),o&&o(s.from(),s.to()))}))}function p(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function f(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function d(e,t,n){e.operation((function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else r.replace(n)}))}function h(e,t){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,u=''+(t?e.phrase("Replace all:"):e.phrase("Replace:"))+"";o(e,u+function(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}(e),u,r,(function(n){n&&(n=s(n),o(e,function(e){return''+e.phrase("With:")+' '}(e),e.phrase("Replace with:"),"",(function(r){if(r=a(r),t)d(e,n,r);else{p(e);var o=i(e,n,e.getCursor("from")),s=function(){var t,a=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||a&&o.from().line==a.line&&o.from().ch==a.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}(e,function(e){return''+e.phrase("Replace?")+" "}(e),e.phrase("Replace?"),[function(){u(t)},s,function(){d(e,n,r)}]))},u=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),s()};s()}})))}))}}e.commands.find=function(e){p(e),c(e)},e.commands.findPersistent=function(e){p(e),c(e,!1,!0)},e.commands.findPersistentNext=function(e){c(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){c(e,!0,!0,!0)},e.commands.findNext=c,e.commands.findPrev=function(e){c(e,!0)},e.commands.clearSearch=p,e.commands.replace=h,e.commands.replaceAll=function(e){h(e,!0)}}(n(16),n(69),n(70))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return(0,a.default)(t,t=>{switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?s(e,n.parentType,t.name):null,n.type=n.fieldDef&&n.fieldDef.type;break;case"SelectionSet":n.parentType=(0,i.getNamedType)(n.type);break;case"Directive":n.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":const r="Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&s(e,n.parentType,t.prevState.name):null;n.argDefs=r&&r.args;break;case"Argument":if(n.argDef=null,n.argDefs)for(let e=0;ee.value===t.name):null;break;case"ListValue":const a=(0,i.getNullableType)(n.inputType);n.inputType=a instanceof i.GraphQLList?a.ofType:null;break;case"ObjectValue":const u=(0,i.getNamedType)(n.inputType);n.objectFieldDefs=u instanceof i.GraphQLInputObjectType?u.getFields():null;break;case"ObjectField":const c=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=c&&c.type;break;case"NamedType":n.type=e.getType(t.name)}}),n};var r,i=n(17),o=n(12),a=(r=n(181))&&r.__esModule?r:{default:r};function s(e,t,n){return n===o.SchemaMetaFieldDef.name&&e.getQueryType()===t?o.SchemaMetaFieldDef:n===o.TypeMetaFieldDef.name&&e.getQueryType()===t?o.TypeMetaFieldDef:n===o.TypeNameMetaFieldDef.name&&(0,i.isCompositeType)(t)?o.TypeNameMetaFieldDef:t.getFields?t.getFields()[n]:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=[];let r=e;for(;r&&r.kind;)n.push(r),r=r.prevState;for(let e=n.length-1;e>=0;e--)t(n[e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFieldReference=function(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getDirectiveReference=function(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}},t.getArgumentReference=function(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getEnumValueReference=function(e){return{kind:"EnumValue",value:e.enumValue,type:(0,r.getNamedType)(e.inputType)}},t.getTypeReference=function(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}};var r=n(17);function i(e){return"__"===e.name.slice(0,2)}},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatWhile(o.isIgnored),lexRules:o.LexRules,parseRules:o.ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}})},function(e,t,n){"use strict";var r=n(379),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,u,c,l=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),c&&document.body.removeChild(c),a()}return l}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.default=o.styled.div(i||(i=r(["\n width: 20px;\n height: 20px;\n"],["\n width: 20px;\n height: 20px;\n"])))},function(e,t,n){"use strict";var r=s(n(16)),i=n(17),o=s(n(181)),a=s(n(392));function s(e){return e&&e.__esModule?e:{default:e}}r.default.registerHelper("hint","graphql-variables",(e,t)=>{const n=e.getCursor(),s=e.getTokenAt(n),u=function(e,t,n){const r="Invalid"===t.state.kind?t.state.prevState:t.state,s=r.kind,u=r.step;if("Document"===s&&0===u)return(0,a.default)(e,t,[{text:"{"}]);const c=n.variableToType;if(!c)return;const l=function(e,t){const n={type:null,fields:null};return(0,o.default)(t,t=>{if("Variable"===t.kind)n.type=e[t.name];else if("ListValue"===t.kind){const e=(0,i.getNullableType)(n.type);n.type=e instanceof i.GraphQLList?e.ofType:null}else if("ObjectValue"===t.kind){const e=(0,i.getNamedType)(n.type);n.fields=e instanceof i.GraphQLInputObjectType?e.getFields():null}else if("ObjectField"===t.kind){const e=t.name&&n.fields?n.fields[t.name]:null;n.type=e&&e.type}}),n}(c,t.state);if("Document"===s||"Variable"===s&&0===u){const n=Object.keys(c);return(0,a.default)(e,t,n.map(e=>({text:`"${e}": `,type:c[e]})))}if(("ObjectValue"===s||"ObjectField"===s&&0===u)&&l.fields){const n=Object.keys(l.fields).map(e=>l.fields[e]);return(0,a.default)(e,t,n.map(e=>({text:`"${e.name}": `,type:e.type,description:e.description})))}if("StringValue"===s||"NumberValue"===s||"BooleanValue"===s||"NullValue"===s||"ListValue"===s&&1===u||"ObjectField"===s&&2===u||"Variable"===s&&2===u){const n=(0,i.getNamedType)(l.type);if(n instanceof i.GraphQLInputObjectType)return(0,a.default)(e,t,[{text:"{"}]);if(n instanceof i.GraphQLEnumType){const r=n.getValues(),i=Object.keys(r).map(e=>r[e]);return(0,a.default)(e,t,i.map(e=>({text:`"${e.name}"`,type:n,description:e.description})))}if(n===i.GraphQLBoolean)return(0,a.default)(e,t,[{text:"true",type:i.GraphQLBoolean,description:"Not false."},{text:"false",type:i.GraphQLBoolean,description:"Not true."}])}}(n,s,t);return u&&u.list&&u.list.length>0&&(u.from=r.default.Pos(u.from.line,u.from.column),u.to=r.default.Pos(u.to.line,u.to.column),r.default.signal(e,"hasCompletion",e,u,s)),u})},function(e,t,n){"use strict";var r=a(n(16)),i=n(17),o=a(n(393));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}function u(e,t){return Array.prototype.concat.apply([],e.map(t))}r.default.registerHelper("lint","graphql-variables",(e,t,n)=>{if(!e)return[];let r;try{r=(0,o.default)(e)}catch(e){if(e.stack)throw e;return[s(n,e,e.message)]}const a=t.variableToType;return a?function(e,t,n){const r=[];return n.members.forEach(n=>{const o=n.key.value,a=t[o];a?function e(t,n){if(t instanceof i.GraphQLNonNull)return"Null"===n.kind?[[n,`Type "${t}" is non-nullable and cannot be null.`]]:e(t.ofType,n);if("Null"===n.kind)return[];if(t instanceof i.GraphQLList){const r=t.ofType;return"Array"===n.kind?u(n.values,t=>e(r,t)):e(r,n)}if(t instanceof i.GraphQLInputObjectType){if("Object"!==n.kind)return[[n,`Type "${t}" must be an Object.`]];const r=Object.create(null),o=u(n.members,n=>{const i=n.key.value;r[i]=!0;const o=t.getFields()[i];if(!o)return[[n.key,`Type "${t}" does not have a field "${i}".`]];const a=o?o.type:void 0;return e(a,n.value)});return Object.keys(t.getFields()).forEach(e=>{if(!r[e]){t.getFields()[e].type instanceof i.GraphQLNonNull&&o.push([n,`Object of type "${t}" is missing required field "${e}".`])}}),o}if("Boolean"===t.name&&"Boolean"!==n.kind||"String"===t.name&&"String"!==n.kind||"ID"===t.name&&"Number"!==n.kind&&"String"!==n.kind||"Float"===t.name&&"Number"!==n.kind||"Int"===t.name&&("Number"!==n.kind||(0|n.value)!==n.value))return[[n,`Expected value of type "${t}".`]];if((t instanceof i.GraphQLEnumType||t instanceof i.GraphQLScalarType)&&("String"!==n.kind&&"Number"!==n.kind&&"Boolean"!==n.kind&&"Null"!==n.kind||(null==(r=t.parseValue(n.value))||r!=r)))return[[n,`Expected value of type "${t}".`]];var r;return[]}(a,n.value).forEach(([t,n])=>{r.push(s(e,t,n))}):r.push(s(e,n.key,`Variable "$${o}" does not appear in any GraphQL query.`))}),r}(n,a,r):[]})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql-variables",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:u,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},u={Document:[(0,o.p)("{"),(0,o.list)("Variable",(0,o.opt)((0,o.p)(","))),(0,o.p)("}")],Variable:[c("variable"),(0,o.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,o.t)("Number","number")],StringValue:[(0,o.t)("String","string")],BooleanValue:[(0,o.t)("Keyword","builtin")],NullValue:[(0,o.t)("Keyword","keyword")],ListValue:[(0,o.p)("["),(0,o.list)("Value",(0,o.opt)((0,o.p)(","))),(0,o.p)("]")],ObjectValue:[(0,o.p)("{"),(0,o.list)("ObjectField",(0,o.opt)((0,o.p)(","))),(0,o.p)("}")],ObjectField:[c("attribute"),(0,o.p)(":"),"Value"]};function c(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLeft=function(e){let t=0,n=e;for(;n.offsetParent;)t+=n.offsetLeft,n=n.offsetParent;return t},t.getTop=function(e){let t=0,n=e;for(;n.offsetParent;)t+=n.offsetTop,n=n.offsetParent;return t}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.activeColor,r=e.active,i=e.onClick,o=e.tabWidth;return a.createElement(l,{onClick:i,activeColor:n,active:r,tabWidth:o},t)},t}(a.PureComponent);t.default=u;var c,l=s.styled("div")(c||(c=o(["\n z-index: ",";\n padding: 8px 8px 8px 8px;\n border-radius: 2px 2px 0px 0px;\n color: ",";\n background: ",";\n box-shadow: -1px 1px 6px 0 rgba(0, 0, 0, 0.3);\n text-transform: uppercase;\n text-align: center;\n font-weight: 600;\n font-size: 12px;\n line-height: 12px;\n letter-spacing: 0.45px;\n cursor: pointer;\n transform: rotate(-90deg);\n transform-origin: bottom left;\n margin-top: 65px;\n width: ",";\n"],["\n z-index: ",";\n padding: 8px 8px 8px 8px;\n border-radius: 2px 2px 0px 0px;\n color: ",";\n background: ",";\n box-shadow: -1px 1px 6px 0 rgba(0, 0, 0, 0.3);\n text-transform: uppercase;\n text-align: center;\n font-weight: 600;\n font-size: 12px;\n line-height: 12px;\n letter-spacing: 0.45px;\n cursor: pointer;\n transform: rotate(-90deg);\n transform-origin: bottom left;\n margin-top: 65px;\n width: ",";\n"])),(function(e){return e.active?10:2}),(function(e){return"dark"===e.theme.mode?e.theme.colours.white:e.theme.colours[e.active?"white":"darkBlue"]}),(function(e){return e.active&&e.activeColor?e.theme.colours[e.activeColor]:"dark"===e.theme.mode?"#3D5866":"#DBDEE0"}),(function(e){return e.tabWidth||"100%"}))},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91}; /*! * Programatically add the following */ -for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.ErrorContainer=o.styled.div(i||(i=r(["\n font-weight: bold;\n left: 0;\n letter-spacing: 1px;\n opacity: 0.5;\n position: absolute;\n right: 0;\n text-align: center;\n text-transform: uppercase;\n top: 50%;\n transform: translate(0, -50%);\n"],["\n font-weight: bold;\n left: 0;\n letter-spacing: 1px;\n opacity: 0.5;\n position: absolute;\n right: 0;\n text-align: center;\n text-transform: uppercase;\n top: 50%;\n transform: translate(0, -50%);\n"])))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s=[],u=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n{switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}}),t}function k(e,t,n){return n===w.SchemaMetaFieldDef.name&&e.getQueryType()===t?w.SchemaMetaFieldDef:n===w.TypeMetaFieldDef.name&&e.getQueryType()===t?w.TypeMetaFieldDef:n===w.TypeNameMetaFieldDef.name&&Object(C.D)(t)?w.TypeNameMetaFieldDef:"getFields"in t?t.getFields()[n]:null}function A(e,t){const n=[];let r=e;for(;r&&r.kind;)n.push(r),r=r.prevState;for(let e=n.length-1;e>=0;e--)t(n[e])}function T(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i!e.isDeprecated);return O(O(e.map(e=>({proximity:N(F(e.label),t),entry:e})),e=>e.proximity<=2),e=>!e.entry.isDeprecated).sort((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.label.length-t.entry.label.length).map(e=>e.entry)}(t,F(e.string))}function O(e,t){const n=e.filter(t);return 0===n.length?e:n}function F(e){return e.toLowerCase().replace(/\W/g,"")}function N(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}!function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.number(t.line)&&ue.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(ue.number(e)&&ue.number(t)&&ue.number(n)&&ue.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return ue.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.range)&&(ue.string(t.uri)||ue.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.targetRange)&&ue.string(t.targetUri)&&(i.is(t.targetSelectionRange)||ue.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||ue.undefined(t.originSelectionRange))}}(a||(a={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return ue.number(t.red)&&ue.number(t.green)&&ue.number(t.blue)&&ue.number(t.alpha)}}(s||(s={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&s.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return ue.string(t.label)&&(ue.undefined(t.textEdit)||y.is(t))&&(ue.undefined(t.additionalTextEdits)||ue.typedArray(t.additionalTextEdits,y.is))}}(c||(c={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return ue.defined(n)&&(o.startCharacter=n),ue.defined(r)&&(o.endCharacter=r),ue.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return ue.number(t.startLine)&&ue.number(t.startLine)&&(ue.undefined(t.startCharacter)||ue.number(t.startCharacter))&&(ue.undefined(t.endCharacter)||ue.number(t.endCharacter))&&(ue.undefined(t.kind)||ue.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ue.defined(t)&&o.is(t.location)&&ue.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(d||(d={})),function(e){e.Unnecessary=1,e.Deprecated=2}(h||(h={})),function(e){e.create=function(e,t,n,r,i,o){var a={range:e,message:t};return ue.defined(n)&&(a.severity=n),ue.defined(r)&&(a.code=r),ue.defined(i)&&(a.source=i),ue.defined(o)&&(a.relatedInformation=o),a},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.range)&&ue.string(t.message)&&(ue.number(t.severity)||ue.undefined(t.severity))&&(ue.number(t.code)||ue.string(t.code)||ue.undefined(t.code))&&(ue.string(t.source)||ue.undefined(t.source))&&(ue.undefined(t.relatedInformation)||ue.typedArray(t.relatedInformation,f.is))}}(m||(m={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.title)&&ue.string(t.command)}}(g||(g={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.string(t.newText)&&i.is(t.range)}}(y||(y={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ue.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(v||(v={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))}}(b||(b={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ue.string(t.oldUri)&&ue.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))}}(E||(E={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ue.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ue.boolean(t.options.ignoreIfNotExists)))}}(x||(x={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ue.string(e.kind)?b.is(e)||E.is(e)||x.is(e):v.is(e)})))}}(D||(D={}));var I,M,j,L,P,R,B,U,z,V,q,H,W,G,K,J,Q,Y,$,X,Z,ee,te,ne,re,ie,oe,ae=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(y.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(y.replace(e,t))},e.prototype.delete=function(e){this.edits.push(y.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(v.is(e)){var n=new ae(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new ae(e.changes[n]);t._textEditChanges[n]=r})))}Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(M.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new ae(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new ae(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(E.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(x.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&(null===t.version||ue.number(t.version))}}(M||(M={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.string(t.languageId)&&ue.number(t.version)&&ue.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(L||(L={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){var t=e;return ue.objectLiteral(e)&&L.is(t.kind)&&ue.string(t.value)}}(P||(P={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(R||(R={})),function(e){e.PlainText=1,e.Snippet=2}(B||(B={})),function(e){e.Deprecated=1}(U||(U={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ue.string(t)||ue.objectLiteral(t)&&ue.string(t.language)&&ue.string(t.value)}}(q||(q={})),function(e){e.is=function(e){var t=e;return!!t&&ue.objectLiteral(t)&&(P.is(t.contents)||q.is(t.contents)||ue.typedArray(t.contents,q.is))&&(void 0===e.range||i.is(e.range))}}(H||(H={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(W||(W={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var a=r[o],s=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(u,n.length),i=s}return n}}(se||(se={}));var ue,ce=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;ne?i=o:n=o+1}var a=n-1;return r.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=i&&i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0===e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function me(e){return{ofRule:e}}function ge(e,t){return{ofRule:e,isList:!0,separator:t}}function ye(e,t){return{style:t,match:t=>t.kind===e}}function ve(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const be=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,Ee={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},xe={Document:[ge("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Ce("query"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],Mutation:[Ce("mutation"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],Subscription:[Ce("subscription"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],VariableDefinitions:[ve("("),ge("VariableDefinition"),ve(")")],VariableDefinition:["Variable",ve(":"),"Type",me("DefaultValue")],Variable:[ve("$","variable"),we("variable")],DefaultValue:[ve("="),"Value"],SelectionSet:[ve("{"),ge("Selection"),ve("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[we("property"),ve(":"),we("qualifier"),me("Arguments"),ge("Directive"),me("SelectionSet")],Field:[we("property"),me("Arguments"),ge("Directive"),me("SelectionSet")],Arguments:[ve("("),ge("Argument"),ve(")")],Argument:[we("attribute"),ve(":"),"Value"],FragmentSpread:[ve("..."),we("def"),ge("Directive")],InlineFragment:[ve("..."),me("TypeCondition"),ge("Directive"),"SelectionSet"],FragmentDefinition:[Ce("fragment"),me(function(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}(we("def"),[Ce("on")])),"TypeCondition",ge("Directive"),"SelectionSet"],TypeCondition:[Ce("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[ye("Number","number")],StringValue:[ye("String","string")],BooleanValue:[ye("Name","builtin")],NullValue:[ye("Name","keyword")],EnumValue:[we("string-2")],ListValue:[ve("["),ge("Value"),ve("]")],ObjectValue:[ve("{"),ge("ObjectField"),ve("}")],ObjectField:[we("attribute"),ve(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[ve("["),"Type",ve("]"),me(ve("!"))],NonNullType:["NamedType",me(ve("!"))],NamedType:[(De="atom",{style:De,match:e=>"Name"===e.kind,update(e,t){e.prevState&&e.prevState.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[ve("@","meta"),we("meta"),me("Arguments")],SchemaDef:[Ce("schema"),ge("Directive"),ve("{"),ge("OperationTypeDef"),ve("}")],OperationTypeDef:[we("keyword"),ve(":"),we("atom")],ScalarDef:[Ce("scalar"),we("atom"),ge("Directive")],ObjectTypeDef:[Ce("type"),we("atom"),me("Implements"),ge("Directive"),ve("{"),ge("FieldDef"),ve("}")],Implements:[Ce("implements"),ge("NamedType")],FieldDef:[we("property"),me("ArgumentsDef"),ve(":"),"Type",ge("Directive")],ArgumentsDef:[ve("("),ge("InputValueDef"),ve(")")],InputValueDef:[we("attribute"),ve(":"),"Type",me("DefaultValue"),ge("Directive")],InterfaceDef:[Ce("interface"),we("atom"),ge("Directive"),ve("{"),ge("FieldDef"),ve("}")],UnionDef:[Ce("union"),we("atom"),ge("Directive"),ve("="),ge("UnionMember",ve("|"))],UnionMember:["NamedType"],EnumDef:[Ce("enum"),we("atom"),ge("Directive"),ve("{"),ge("EnumValueDef"),ve("}")],EnumValueDef:[we("string-2"),ge("Directive")],InputDef:[Ce("input"),we("atom"),ge("Directive"),ve("{"),ge("InputValueDef"),ve("}")],ExtendDef:[Ce("extend"),"ObjectTypeDef"],DirectiveDef:[Ce("directive"),ve("@","meta"),we("meta"),me("ArgumentsDef"),Ce("on"),ge("DirectiveLocation",ve("|"))],DirectiveLocation:[we("string-2")]};var De;function Ce(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function we(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Se(e={eatWhitespace:e=>e.eatWhile(be),lexRules:Ee,parseRules:xe,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return Te(e.parseRules,t,"Document"),t},token:(t,n)=>function(e,t,n){const{lexRules:r,parseRules:i,eatWhitespace:o,editorConfig:a}=n;t.rule&&0===t.rule.length?_e(t):t.needsAdvance&&(t.needsAdvance=!1,Oe(t,!0));if(e.sol()){const n=a&&a.tabSize||2;t.indentLevel=Math.floor(e.indentation()/n)}if(o(e))return"ws";const s=function(e,t){const n=Object.keys(e);for(let r=0;r0&&e[e.length-1]{var n;return{sortText:String(t)+e.name,label:e.name,detail:String(e.type),documentation:null!==(n=e.description)&&void 0!==n?n:void 0,deprecated:e.isDeprecated,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason,kind:R.Field}}))}return[]}(i,u,e);if(a===Me.ARGUMENTS||a===Me.ARGUMENT&&0===s){const e=u.argDefs;if(e)return _(i,e.map(e=>{var t;return{label:e.name,detail:String(e.type),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:R.Variable}}))}if((a===Me.OBJECT_VALUE||a===Me.OBJECT_FIELD&&0===s)&&u.objectFieldDefs){const e=T(u.objectFieldDefs),t=a===Me.OBJECT_VALUE?R.Value:R.Field;return _(i,e.map(e=>{var n;return{label:e.name,detail:String(e.type),documentation:null!==(n=e.description)&&void 0!==n?n:void 0,kind:t}}))}if(a===Me.ENUM_VALUE||a===Me.LIST_VALUE&&1===s||a===Me.OBJECT_FIELD&&2===s||a===Me.ARGUMENT&&2===s)return function(e,t,n){const r=Object(C.A)(t.inputType);if(r instanceof C.a){const t=r.getValues();return _(e,t.map(e=>{var t;return{label:e.name,detail:String(r),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,deprecated:e.isDeprecated,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason,kind:R.EnumMember}}))}if(r===fe.a)return _(e,[{label:"true",detail:String(fe.a),documentation:"Not false.",kind:R.Variable},{label:"false",detail:String(fe.a),documentation:"Not true.",kind:R.Variable}]);return[]}(i,u);if(a===Me.VARIABLE&&1===s){const e=[];return Object(le.c)(Object(pe.a)(t,{allowLegacySDLEmptyFields:!0,allowLegacySDLImplementsInterfaces:!0}),{VariableDefinition(t){e.push(t)}}),_(i,e.map(e=>({label:`$${e.variable.name.value}`,kind:R.Variable,detail:"name"in e.type?e.type.name.value:"Variable"})))}return a===Me.TYPE_CONDITION&&1===s||a===Me.NAMED_TYPE&&null!=o.prevState&&o.prevState.kind===Me.TYPE_CONDITION?function(e,t,n,r){let i;if(t.parentType)if(Object(C.C)(t.parentType)){const e=Object(C.j)(t.parentType),r=n.getPossibleTypes(e),o=Object.create(null);r.forEach(e=>{e.getInterfaces().forEach(e=>{o[e.name]=e})}),i=r.concat(T(o))}else i=[t.parentType];else{const e=n.getTypeMap();i=T(e).filter(C.D)}return _(e,i.map(e=>{const t=Object(C.A)(e);return{label:String(e),documentation:t&&t.description||"",kind:R.Field}}))}(i,u,e):a===Me.FRAGMENT_SPREAD&&1===s?function(e,t,n,r,i){const o=n.getTypeMap(),a=S(e.state),s=Le(r).filter(e=>o[e.typeCondition.name.value]&&!(a&&a.kind===Me.FRAGMENT_DEFINITION&&a.name===e.name.value)&&Object(C.D)(t.parentType)&&Object(C.D)(o[e.typeCondition.name.value])&&Object(de.a)(n,t.parentType,o[e.typeCondition.name.value]));return _(e,s.map(e=>({label:e.name.value,detail:String(o[e.typeCondition.name.value]),documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`,kind:R.Field})))}(i,u,e,t):a===Me.VARIABLE_DEFINITION&&2===s||a===Me.LIST_TYPE&&1===s||a===Me.NAMED_TYPE&&o.prevState&&(o.prevState.kind===Me.VARIABLE_DEFINITION||o.prevState.kind===Me.LIST_TYPE||o.prevState.kind===Me.NON_NULL_TYPE)?function(e,t,n){const r=T(t.getTypeMap()).filter(C.G);return _(e,r.map(e=>({label:e.name,documentation:e.description,kind:R.Variable})))}(i,e):a===Me.DIRECTIVE?function(e,t,n,r){if(t.prevState&&t.prevState.kind){const r=n.getDirectives().filter(e=>Be(t.prevState,e));return _(e,r.map(e=>({label:e.name,documentation:e.description||"",kind:R.Function})))}return[]}(i,o,e):[]}function Le(e){const t=[];return Re(e,(e,n)=>{n.kind===Me.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:Me.FRAGMENT_DEFINITION,name:{kind:"Name",value:n.name},selectionSet:{kind:Me.SELECTION_SET,selections:[]},typeCondition:{kind:Me.NAMED_TYPE,name:{kind:"Name",value:n.type}}})}),t}function Pe(e,t){let n=null,r=null,i=null;const o=Re(e,(e,o,a,s)=>{if(s===t.line&&e.getCurrentPosition()>=t.character)return n=a,r=Object.assign({},o),i=e.current(),"BREAK"});return{start:o.start,end:o.end,string:i||o.string,state:r||o.state,style:n||o.style}}function Re(e,t){const n=e.split("\n"),r=Se();let i=r.startState(),o="",a=new he("");for(let e=0;e{switch(t.kind){case Me.QUERY:case"ShortQuery":l=e.getQueryType();break;case Me.MUTATION:l=e.getMutationType();break;case Me.SUBSCRIPTION:l=e.getSubscriptionType();break;case Me.INLINE_FRAGMENT:case Me.FRAGMENT_DEFINITION:t.type&&(l=e.getType(t.type));break;case Me.FIELD:case Me.ALIASED_FIELD:l&&t.name?(a=c?k(e,c,t.name):null,l=a?a.type:null):a=null;break;case Me.SELECTION_SET:c=Object(C.A)(l);break;case Me.DIRECTIVE:i=t.name?e.getDirective(t.name):null;break;case Me.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case Me.FIELD:r=a&&a.args;break;case Me.DIRECTIVE:r=i&&i.args;break;case Me.ALIASED_FIELD:const n=t.prevState&&t.prevState.name;if(!n){r=null;break}const o=c?k(e,c,n):null;if(!o){r=null;break}r=o.args;break;default:r=null}else r=null;break;case Me.ARGUMENT:if(r)for(let e=0;ee.value===t.name):null;break;case Me.LIST_VALUE:const f=Object(C.B)(s);s=f instanceof C.d?f.ofType:null;break;case Me.OBJECT_VALUE:const d=Object(C.A)(s);u=d instanceof C.b?d.getFields():null;break;case Me.OBJECT_FIELD:const h=t.name&&u?u[t.name]:null;s=h&&h.type;break;case Me.NAMED_TYPE:t.name&&(l=e.getType(t.name))}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:o,fieldDef:a,inputType:s,objectFieldDefs:u,parentType:c,type:l}}class ze{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new Ve(e,t)}setEnd(e,t){this.end=new Ve(e,t)}}class Ve{constructor(e,t){this.lessThanOrEqualTo=e=>this.linee.name&&e.name.value===r);if(0===i.length)throw Error(`Definition not found for GraphQL type ${r}`);const o=i.map(({filePath:e,content:t,definition:n})=>function(e,t,n){const r=n.name;return Ye()(r,"Expected ASTNode to have a Name."),{path:e,position:et(t,n),range:Ze(t,n),name:r.value||"",language:Xe,projectRoot:e}}(e||"",t,n));return{definitions:o,queryRange:o.map(n=>Ze(e,t))}}))}function nt(e,t,n){return $e(this,void 0,void 0,(function*(){const r=t.name.value,i=n.filter(({definition:e})=>e.name.value===r);if(0===i.length)throw Error(`Definition not found for GraphQL fragment ${r}`);const o=i.map(({filePath:e,content:t,definition:n})=>it(e||"",t,n));return{definitions:o,queryRange:o.map(n=>Ze(e,t))}}))}function rt(e,t,n){return{definitions:[it(e,t,n)],queryRange:n.name?[Ze(t,n.name)]:[]}}function it(e,t,n){const r=n.name;if(!r)throw Error("Expected ASTNode to have a Name.");return{path:e,position:et(t,n),range:Ze(t,n),name:r.value||"",language:Xe,projectRoot:e}}var ot=n(538);const at={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},st={[at.Error]:1,[at.Warning]:2,[at.Information]:3,[at.Hint]:4};function ut(e,t=null,n,r){let i=null;try{i=Object(pe.a)(e)}catch(t){const n=ft(t.locations[0],e);return[{severity:st.Error,message:t.message,source:"GraphQL: Syntax",range:n}]}return ct(i,t,n,r)}function ct(e,t=null,n,r){if(!t)return[];const i=lt(function(e,t,n,r){const i=He.a.filter(e=>e!==We.a&&e!==Je.a&&(!r||e!==Ge.a));return n&&Array.prototype.push.apply(i,n),Object(Ke.c)(e,t,i).filter(e=>{if(-1!==e.message.indexOf("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===Ie.a.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0})}(t,e,n,r),e=>pt(e,st.Error,"Validation")),o=ot.a?lt(Object(ot.a)(t,e),e=>pt(e,st.Warning,"Deprecation")):[];return i.concat(o)}function lt(e,t){return Array.prototype.concat.apply([],e.map(t))}function pt(e,t,n){if(!e.nodes)return[];const r=[];return e.nodes.forEach(i=>{const o="Variable"!==i.kind&&"name"in i&&void 0!==i.name?i.name:"variable"in i&&void 0!==i.variable?i.variable:i;if(o){Ye()(e.locations,"GraphQL validation error requires locations.");const i=e.locations[0],a=function(e){const t=e.loc;return Ye()(t,"Expected ASTNode to have a location."),t}(o),s=i.column+(a.end-a.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new ze(new Ve(i.line-1,i.column-1),new Ve(i.line-1,s))})}}),r}function ft(e,t){const n=Se(),r=n.startState(),i=t.split("\n");Ye()(i.length>=e.line,"Query text must have more lines than where the error happened");let o=null;for(let t=0;t({representativeName:t.name,startPosition:qe(e,t.loc.start),endPosition:qe(e,t.loc.end),kind:t.kind,children:t.selectionSet||t.fields||t.values||t.arguments||[]});return{Field:e=>{const n=e.alias?[mt("plain",e.alias),mt("plain",": ")]:[];return n.push(mt("plain",e.name)),Object.assign({tokenizedText:n},t(e))},OperationDefinition:e=>Object.assign({tokenizedText:[mt("keyword",e.operation),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),Document:e=>e.definitions,SelectionSet:e=>function(e,t){const n=[];for(let r=0;re.kind===dt?e.selectionSet:e),Name:e=>e.value,FragmentDefinition:e=>Object.assign({tokenizedText:[mt("keyword","fragment"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),InterfaceTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","interface"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),EnumTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","enum"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),EnumValueDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),ObjectTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","type"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),InputObjectTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","input"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),FragmentSpread:e=>Object.assign({tokenizedText:[mt("plain","..."),mt("class-name",e.name)]},t(e)),InputValueDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),FieldDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),InlineFragment:e=>e.selectionSet}}(e);return{outlineTrees:Object(le.c)(t,{leave:e=>void 0!==n&&e.kind in n?n[e.kind](e):null})}}function mt(e,t){return{kind:e,value:t}}function gt(e,t,n,r){const i=r||Pe(t,n);if(!e||!i||!i.state)return"";const o=i.state,a=o.kind,s=o.step,u=Ue(e,i.state),c={schema:e};if("Field"===a&&0===s&&u.fieldDef||"AliasedField"===a&&2===s&&u.fieldDef){const e=[];return function(e,t,n){yt(e,t,n),bt(e,t,n,t.type)}(e,u,c),xt(e,c,u.fieldDef),e.join("").trim()}if("Directive"===a&&1===s&&u.directiveDef){const e=[];return vt(e,u,c),xt(e,c,u.directiveDef),e.join("").trim()}if("Argument"===a&&0===s&&u.argDef){const e=[];return function(e,t,n){t.directiveDef?vt(e,t,n):t.fieldDef&&yt(e,t,n);if(!t.argDef)return;const r=t.argDef.name;Dt(e,"("),Dt(e,r),bt(e,t,n,t.inputType),Dt(e,")")}(e,u,c),xt(e,c,u.argDef),e.join("").trim()}if("EnumValue"===a&&u.enumValue&&"description"in u.enumValue){const e=[];return function(e,t,n){if(!t.enumValue)return;const r=t.enumValue.name;Et(e,t,n,t.inputType),Dt(e,"."),Dt(e,r)}(e,u,c),xt(e,c,u.enumValue),e.join("").trim()}if("NamedType"===a&&u.type&&"description"in u.type){const e=[];return Et(e,u,c,u.type),xt(e,c,u.type),e.join("").trim()}return""}function yt(e,t,n){if(!t.fieldDef)return;const r=t.fieldDef.name;"__"!==r.slice(0,2)&&(Et(e,t,n,t.parentType),Dt(e,".")),Dt(e,r)}function vt(e,t,n){if(!t.directiveDef)return;Dt(e,"@"+t.directiveDef.name)}function bt(e,t,n,r){Dt(e,": "),Et(e,t,n,r)}function Et(e,t,n,r){r&&(r instanceof C.e?(Et(e,t,n,r.ofType),Dt(e,"!")):r instanceof C.d?(Dt(e,"["),Et(e,t,n,r.ofType),Dt(e,"]")):Dt(e,r.name))}function xt(e,t,n){if(!n)return;const r="string"==typeof n.description?n.description:null;r&&(Dt(e,"\n\n"),Dt(e,r)),function(e,t,n){if(!n)return;const r=n.deprecationReason?n.deprecationReason:null;if(!r)return;Dt(e,"\n\n"),Dt(e,"Deprecated: "),Dt(e,r)}(e,0,n)}function Dt(e,t){e.push(t)}var Ct=n(15),wt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};const{FRAGMENT_DEFINITION:St,OBJECT_TYPE_DEFINITION:kt,INTERFACE_TYPE_DEFINITION:At,ENUM_TYPE_DEFINITION:Tt,UNION_TYPE_DEFINITION:_t,SCALAR_TYPE_DEFINITION:Ot,INPUT_OBJECT_TYPE_DEFINITION:Ft,SCALAR_TYPE_EXTENSION:Nt,OBJECT_TYPE_EXTENSION:It,INTERFACE_TYPE_EXTENSION:Mt,UNION_TYPE_EXTENSION:jt,ENUM_TYPE_EXTENSION:Lt,INPUT_OBJECT_TYPE_EXTENSION:Pt,DIRECTIVE_DEFINITION:Rt,FRAGMENT_SPREAD:Bt,OPERATION_DEFINITION:Ut,NAMED_TYPE:zt}=Ie.a,Vt={[Ie.a.FIELD]:Q.Field,[Ie.a.OPERATION_DEFINITION]:Q.Class,[Ie.a.FRAGMENT_DEFINITION]:Q.Class,[Ie.a.FRAGMENT_SPREAD]:Q.Struct,[Ie.a.OBJECT_TYPE_DEFINITION]:Q.Class,[Ie.a.ENUM_TYPE_DEFINITION]:Q.Enum,[Ie.a.ENUM_VALUE_DEFINITION]:Q.EnumMember,[Ie.a.INPUT_OBJECT_TYPE_DEFINITION]:Q.Class,[Ie.a.INPUT_VALUE_DEFINITION]:Q.Field,[Ie.a.FIELD_DEFINITION]:Q.Field,[Ie.a.INTERFACE_TYPE_DEFINITION]:Q.Interface,[Ie.a.DOCUMENT]:Q.File,FieldWithArguments:Q.Method};function qt(e){return"FieldDefinition"===e.kind&&e.children&&e.children.length>0?Vt.FieldWithArguments:Vt[e.kind]}class Ht{constructor(e){this._graphQLCache=e,this._graphQLConfig=e.getGraphQLConfig()}getConfigForURI(e){const t=this._graphQLConfig.getProjectForFile(e);if(t)return t;throw Error(`No config found for uri: ${e}`)}getDiagnostics(e,t,n){return wt(this,void 0,void 0,(function*(){let r=!1;const i=this.getConfigForURI(t);if(!i)return[];const{schema:o,name:a,extensions:s}=i;try{const n=Object(pe.a)(e);o&&t===o||(r=n.definitions.some(e=>{switch(e.kind){case kt:case At:case Tt:case _t:case Ot:case Ft:case Nt:case It:case Mt:case jt:case Lt:case Pt:case Rt:return!0}return!1}))}catch(t){const n=ft(t.locations[0],e);return[{severity:st.Error,message:t.message,source:"GraphQL: Syntax",range:n}]}let u=e;const c=yield this._graphQLCache.getFragmentDefinitions(i);u=`${u} ${(yield this._graphQLCache.getFragmentDependencies(e,c)).reduce((e,t)=>`${e} ${Object(Ct.print)(t.definition)}`,"")}`;let l=null;try{l=Object(pe.a)(u)}catch(e){return[]}let p=null;const f=s.customValidationRules;f&&(p=f(this._graphQLConfig));const d=yield this._graphQLCache.getSchema(a,r);return d?ct(l,d,p,n):[]}))}getAutocompleteSuggestions(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n),i=yield this._graphQLCache.getSchema(r.name);return i?je(i,e,t):[]}))}getHoverInformation(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n),i=yield this._graphQLCache.getSchema(r.name);return i?gt(i,e,t):""}))}getDefinition(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n);let i;try{i=Object(pe.a)(e)}catch(e){return null}const o=function(e,t,n){const r=function(e,t){const n=e.split("\n").slice(0,t.line);return t.character+n.map(e=>e.length+1).reduce((e,t)=>e+t,0)}(e,n);let i;return Object(le.c)(t,{enter(e){if(!("Name"!==e.kind&&e.loc&&e.loc.start<=r&&r<=e.loc.end))return!1;i=e},leave(e){if(e.loc&&e.loc.start<=r&&r<=e.loc.end)return!1}}),i}(e,i,t);if(o)switch(o.kind){case Bt:return this._getDefinitionForFragmentSpread(e,i,o,n,r);case St:case Ut:return rt(n,e,o);case zt:return this._getDefinitionForNamedType(e,i,o,n,r)}return null}))}getDocumentSymbols(e,t){return wt(this,void 0,void 0,(function*(){const n=yield this.getOutline(e);if(!n)return[];const r=[],i=n.outlineTrees.map(e=>[null,e]);for(;i.length>0;){const e=i.pop();if(!e)return[];const[n,o]=e;if(!o)return[];r.push({name:o.representativeName,kind:qt(o),location:{uri:t,range:{start:o.startPosition,end:o.endPosition}},containerName:n?n.representativeName:void 0}),i.push(...o.children.map(e=>[o,e]))}return r}))}_getDefinitionForNamedType(e,t,n,r,i){return wt(this,void 0,void 0,(function*(){const o=yield this._graphQLCache.getObjectTypeDefinitions(i),a=yield this._graphQLCache.getObjectTypeDependenciesForAST(t,o),s=t.definitions.filter(e=>e.kind===kt||e.kind===Ft||e.kind===Tt||e.kind===Ot||e.kind===At).map(t=>({filePath:r,content:e,definition:t}));return yield tt(e,n,a.concat(s))}))}_getDefinitionForFragmentSpread(e,t,n,r,i){return wt(this,void 0,void 0,(function*(){const o=yield this._graphQLCache.getFragmentDefinitions(i),a=yield this._graphQLCache.getFragmentDependenciesForAST(t,o),s=t.definitions.filter(e=>e.kind===St).map(t=>({filePath:r,content:e,definition:t}));return yield nt(e,n,a.concat(s))}))}getOutline(e){return wt(this,void 0,void 0,(function*(){return ht(e)}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CANCEL",(function(){return r.a})),n.d(t,"SAGA_LOCATION",(function(){return r.g})),n.d(t,"buffers",(function(){return s.i})),n.d(t,"detach",(function(){return s.j})),n.d(t,"END",(function(){return S})),n.d(t,"channel",(function(){return A})),n.d(t,"eventChannel",(function(){return T})),n.d(t,"isEnd",(function(){return k})),n.d(t,"multicastChannel",(function(){return _})),n.d(t,"runSaga",(function(){return W})),n.d(t,"stdChannel",(function(){return O}));var r=n(18),i=n(37),o=n(61),a=n(10),s=n(6),u=n(60);function c(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}var l=c,p=(n(112),[]),f=0;function d(e){try{g(),e()}finally{y()}}function h(e){p.push(e),f||(g(),v())}function m(e){try{return g(),e()}finally{v()}}function g(){f++}function y(){f--}function v(){var e;for(y();!f&&void 0!==(e=p.shift());)d(e)}var b=function(e){return function(t){return e.some((function(e){return w(e)(t)}))}},E=function(e){return function(t){return e(t)}},x=function(e){return function(t){return t.type===String(e)}},D=function(e){return function(t){return t.type===e}},C=function(){return s.U};function w(e){var t="*"===e?C:Object(a.k)(e)?x:Object(a.a)(e)?b:Object(a.l)(e)?x:Object(a.d)(e)?E:Object(a.m)(e)?D:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var S={type:r.b},k=function(e){return e&&e.type===r.b};function A(e){void 0===e&&(e=Object(s.O)());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(S):e.isEmpty()?(n.push(r),r.cancel=function(){Object(s.bb)(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(S):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,i=e.length;r2?h-2:0),y=2;y1&&"_"===e[0]&&"_"===e[1]?new i.a('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.')):o.test(e)?void 0:new i.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(1),o=n(46);function a(e){return{Document:function(t){for(var n=0,a=t.definitions;n1&&e.reportError(new r.a("This anonymous operation must be the only defined operation.",n))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);function i(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new r.a(t.name?'Subscription "'.concat(t.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(15),o=n(0),a=n(33);function s(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var s=Object(a.a)(e.getSchema(),n);if(s&&!Object(o.D)(s)){var u=Object(i.print)(n);e.reportError(new r.a('Fragment cannot condition on non composite type "'.concat(u,'".'),n))}}},FragmentDefinition:function(t){var n=Object(a.a)(e.getSchema(),t.typeCondition);if(n&&!Object(o.D)(n)){var s=Object(i.print)(t.typeCondition);e.reportError(new r.a('Fragment "'.concat(t.name.value,'" cannot condition on non composite type "').concat(s,'".'),t.typeCondition))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(15),o=n(0),a=n(33);function s(e){return{VariableDefinition:function(t){var n=Object(a.a)(e.getSchema(),t.type);if(n&&!Object(o.G)(n)){var s=t.variable.name.value,u=Object(i.print)(t.type);e.reportError(new r.a('Variable "$'.concat(s,'" cannot be non-input type "').concat(u,'".'),t.type))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),i=n(2),o=n(0);function a(e){return{Field:function(t){var n=e.getType(),a=t.selectionSet;if(n)if(Object(o.I)(Object(o.A)(n))){if(a){var s=t.name.value,u=Object(r.a)(n);e.reportError(new i.a('Field "'.concat(s,'" must not have a selection since type "').concat(u,'" has no subfields.'),a))}}else if(!a){var c=t.name.value,l=Object(r.a)(n);e.reportError(new i.a('Field "'.concat(c,'" of type "').concat(l,'" must have a selection of subfields. Did you mean "').concat(c,' { ... }"?'),t))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(58),i=n(39),o=n(44),a=n(2),s=n(0);function u(e){return{Field:function(t){var n=e.getParentType();if(n&&!e.getFieldDef()){var u=e.getSchema(),c=t.name.value,l=Object(i.a)("to use an inline fragment on",function(e,t,n){if(!Object(s.C)(t))return[];for(var i=new Set,o=Object.create(null),a=0,u=e.getPossibleTypes(t);a1)for(var p=0;p0)return[[t,e.map((function(e){return e[0]}))],e.reduce((function(e,t){var n=t[1];return e.concat(n)}),[n]),e.reduce((function(e,t){var n=t[2];return e.concat(n)}),[r])]}(function(e,t,n,r,i,o,a,s){var u=[],c=y(e,t,i,o),l=c[0],p=c[1],f=y(e,t,a,s),g=f[0],v=f[1];if(m(e,u,t,n,r,l,g),0!==v.length)for(var b=0;b0&&e.reportError(new r.a("Must provide only one schema definition.",t)),++s)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);function i(e){var t=e.getSchema(),n=Object.create(null),i=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(t){for(var o,a=null!==(o=t.operationTypes)&&void 0!==o?o:[],s=0;s=t?e.apply(this,r):function(){return n.apply(this,r.concat([].slice.call(arguments)))}}}},function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,u,c,l,p){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.a=i},function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===r(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function o(e){return"Array"===r(e)}function a(e){return"Symbol"===r(e)} +for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11);t.ErrorContainer=o.styled.div(i||(i=r(["\n font-weight: bold;\n left: 0;\n letter-spacing: 1px;\n opacity: 0.5;\n position: absolute;\n right: 0;\n text-align: center;\n text-transform: uppercase;\n top: 50%;\n transform: translate(0, -50%);\n"],["\n font-weight: bold;\n left: 0;\n letter-spacing: 1px;\n opacity: 0.5;\n position: absolute;\n right: 0;\n text-align: center;\n text-transform: uppercase;\n top: 50%;\n transform: translate(0, -50%);\n"])))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s=[],u=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n{switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}}),t}function _(e,t,n){return n===w.SchemaMetaFieldDef.name&&e.getQueryType()===t?w.SchemaMetaFieldDef:n===w.TypeMetaFieldDef.name&&e.getQueryType()===t?w.TypeMetaFieldDef:n===w.TypeNameMetaFieldDef.name&&Object(C.D)(t)?w.TypeNameMetaFieldDef:"getFields"in t?t.getFields()[n]:null}function k(e,t){const n=[];let r=e;for(;r&&r.kind;)n.push(r),r=r.prevState;for(let e=n.length-1;e>=0;e--)t(n[e])}function A(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i!e.isDeprecated);return O(O(e.map(e=>({proximity:N(F(e.label),t),entry:e})),e=>e.proximity<=2),e=>!e.entry.isDeprecated).sort((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.label.length-t.entry.label.length).map(e=>e.entry)}(t,F(e.string))}function O(e,t){const n=e.filter(t);return 0===n.length?e:n}function F(e){return e.toLowerCase().replace(/\W/g,"")}function N(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}!function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.number(t.line)&&ue.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(ue.number(e)&&ue.number(t)&&ue.number(n)&&ue.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return ue.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.range)&&(ue.string(t.uri)||ue.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.targetRange)&&ue.string(t.targetUri)&&(i.is(t.targetSelectionRange)||ue.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||ue.undefined(t.originSelectionRange))}}(a||(a={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return ue.number(t.red)&&ue.number(t.green)&&ue.number(t.blue)&&ue.number(t.alpha)}}(s||(s={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&s.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return ue.string(t.label)&&(ue.undefined(t.textEdit)||y.is(t))&&(ue.undefined(t.additionalTextEdits)||ue.typedArray(t.additionalTextEdits,y.is))}}(c||(c={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return ue.defined(n)&&(o.startCharacter=n),ue.defined(r)&&(o.endCharacter=r),ue.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return ue.number(t.startLine)&&ue.number(t.startLine)&&(ue.undefined(t.startCharacter)||ue.number(t.startCharacter))&&(ue.undefined(t.endCharacter)||ue.number(t.endCharacter))&&(ue.undefined(t.kind)||ue.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ue.defined(t)&&o.is(t.location)&&ue.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(d||(d={})),function(e){e.Unnecessary=1,e.Deprecated=2}(h||(h={})),function(e){e.create=function(e,t,n,r,i,o){var a={range:e,message:t};return ue.defined(n)&&(a.severity=n),ue.defined(r)&&(a.code=r),ue.defined(i)&&(a.source=i),ue.defined(o)&&(a.relatedInformation=o),a},e.is=function(e){var t=e;return ue.defined(t)&&i.is(t.range)&&ue.string(t.message)&&(ue.number(t.severity)||ue.undefined(t.severity))&&(ue.number(t.code)||ue.string(t.code)||ue.undefined(t.code))&&(ue.string(t.source)||ue.undefined(t.source))&&(ue.undefined(t.relatedInformation)||ue.typedArray(t.relatedInformation,f.is))}}(m||(m={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.title)&&ue.string(t.command)}}(g||(g={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.string(t.newText)&&i.is(t.range)}}(y||(y={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ue.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(v||(v={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))}}(b||(b={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ue.string(t.oldUri)&&ue.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))}}(E||(E={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ue.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ue.boolean(t.options.ignoreIfNotExists)))}}(x||(x={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ue.string(e.kind)?b.is(e)||E.is(e)||x.is(e):v.is(e)})))}}(D||(D={}));var I,M,j,L,P,R,B,U,z,V,q,H,W,G,K,J,Q,Y,$,X,Z,ee,te,ne,re,ie,oe,ae=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(y.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(y.replace(e,t))},e.prototype.delete=function(e){this.edits.push(y.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(v.is(e)){var n=new ae(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new ae(e.changes[n]);t._textEditChanges[n]=r})))}Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(M.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new ae(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new ae(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(E.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(x.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&(null===t.version||ue.number(t.version))}}(M||(M={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.string(t.languageId)&&ue.number(t.version)&&ue.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(L||(L={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){var t=e;return ue.objectLiteral(e)&&L.is(t.kind)&&ue.string(t.value)}}(P||(P={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(R||(R={})),function(e){e.PlainText=1,e.Snippet=2}(B||(B={})),function(e){e.Deprecated=1}(U||(U={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ue.string(t)||ue.objectLiteral(t)&&ue.string(t.language)&&ue.string(t.value)}}(q||(q={})),function(e){e.is=function(e){var t=e;return!!t&&ue.objectLiteral(t)&&(P.is(t.contents)||q.is(t.contents)||ue.typedArray(t.contents,q.is))&&(void 0===e.range||i.is(e.range))}}(H||(H={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(W||(W={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var a=r[o],s=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(u,n.length),i=s}return n}}(se||(se={}));var ue,ce=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;ne?i=o:n=o+1}var a=n-1;return r.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=i&&i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0===e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function me(e){return{ofRule:e}}function ge(e,t){return{ofRule:e,isList:!0,separator:t}}function ye(e,t){return{style:t,match:t=>t.kind===e}}function ve(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const be=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,Ee={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},xe={Document:[ge("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Ce("query"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],Mutation:[Ce("mutation"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],Subscription:[Ce("subscription"),me(we("def")),me("VariableDefinitions"),ge("Directive"),"SelectionSet"],VariableDefinitions:[ve("("),ge("VariableDefinition"),ve(")")],VariableDefinition:["Variable",ve(":"),"Type",me("DefaultValue")],Variable:[ve("$","variable"),we("variable")],DefaultValue:[ve("="),"Value"],SelectionSet:[ve("{"),ge("Selection"),ve("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[we("property"),ve(":"),we("qualifier"),me("Arguments"),ge("Directive"),me("SelectionSet")],Field:[we("property"),me("Arguments"),ge("Directive"),me("SelectionSet")],Arguments:[ve("("),ge("Argument"),ve(")")],Argument:[we("attribute"),ve(":"),"Value"],FragmentSpread:[ve("..."),we("def"),ge("Directive")],InlineFragment:[ve("..."),me("TypeCondition"),ge("Directive"),"SelectionSet"],FragmentDefinition:[Ce("fragment"),me(function(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}(we("def"),[Ce("on")])),"TypeCondition",ge("Directive"),"SelectionSet"],TypeCondition:[Ce("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[ye("Number","number")],StringValue:[ye("String","string")],BooleanValue:[ye("Name","builtin")],NullValue:[ye("Name","keyword")],EnumValue:[we("string-2")],ListValue:[ve("["),ge("Value"),ve("]")],ObjectValue:[ve("{"),ge("ObjectField"),ve("}")],ObjectField:[we("attribute"),ve(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[ve("["),"Type",ve("]"),me(ve("!"))],NonNullType:["NamedType",me(ve("!"))],NamedType:[(De="atom",{style:De,match:e=>"Name"===e.kind,update(e,t){e.prevState&&e.prevState.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[ve("@","meta"),we("meta"),me("Arguments")],SchemaDef:[Ce("schema"),ge("Directive"),ve("{"),ge("OperationTypeDef"),ve("}")],OperationTypeDef:[we("keyword"),ve(":"),we("atom")],ScalarDef:[Ce("scalar"),we("atom"),ge("Directive")],ObjectTypeDef:[Ce("type"),we("atom"),me("Implements"),ge("Directive"),ve("{"),ge("FieldDef"),ve("}")],Implements:[Ce("implements"),ge("NamedType")],FieldDef:[we("property"),me("ArgumentsDef"),ve(":"),"Type",ge("Directive")],ArgumentsDef:[ve("("),ge("InputValueDef"),ve(")")],InputValueDef:[we("attribute"),ve(":"),"Type",me("DefaultValue"),ge("Directive")],InterfaceDef:[Ce("interface"),we("atom"),ge("Directive"),ve("{"),ge("FieldDef"),ve("}")],UnionDef:[Ce("union"),we("atom"),ge("Directive"),ve("="),ge("UnionMember",ve("|"))],UnionMember:["NamedType"],EnumDef:[Ce("enum"),we("atom"),ge("Directive"),ve("{"),ge("EnumValueDef"),ve("}")],EnumValueDef:[we("string-2"),ge("Directive")],InputDef:[Ce("input"),we("atom"),ge("Directive"),ve("{"),ge("InputValueDef"),ve("}")],ExtendDef:[Ce("extend"),"ObjectTypeDef"],DirectiveDef:[Ce("directive"),ve("@","meta"),we("meta"),me("ArgumentsDef"),Ce("on"),ge("DirectiveLocation",ve("|"))],DirectiveLocation:[we("string-2")]};var De;function Ce(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function we(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Se(e={eatWhitespace:e=>e.eatWhile(be),lexRules:Ee,parseRules:xe,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return Ae(e.parseRules,t,"Document"),t},token:(t,n)=>function(e,t,n){const{lexRules:r,parseRules:i,eatWhitespace:o,editorConfig:a}=n;t.rule&&0===t.rule.length?Te(t):t.needsAdvance&&(t.needsAdvance=!1,Oe(t,!0));if(e.sol()){const n=a&&a.tabSize||2;t.indentLevel=Math.floor(e.indentation()/n)}if(o(e))return"ws";const s=function(e,t){const n=Object.keys(e);for(let r=0;r0&&e[e.length-1]{var n;return{sortText:String(t)+e.name,label:e.name,detail:String(e.type),documentation:null!==(n=e.description)&&void 0!==n?n:void 0,deprecated:e.isDeprecated,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason,kind:R.Field}}))}return[]}(o,c,e);if(s===Me.ARGUMENTS||s===Me.ARGUMENT&&0===u){const e=c.argDefs;if(e)return T(o,e.map(e=>{var t;return{label:e.name,detail:String(e.type),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:R.Variable}}))}if((s===Me.OBJECT_VALUE||s===Me.OBJECT_FIELD&&0===u)&&c.objectFieldDefs){const e=A(c.objectFieldDefs),t=s===Me.OBJECT_VALUE?R.Value:R.Field;return T(o,e.map(e=>{var n;return{label:e.name,detail:String(e.type),documentation:null!==(n=e.description)&&void 0!==n?n:void 0,kind:t}}))}if(s===Me.ENUM_VALUE||s===Me.LIST_VALUE&&1===u||s===Me.OBJECT_FIELD&&2===u||s===Me.ARGUMENT&&2===u)return function(e,t,n){const r=Object(C.A)(t.inputType);if(r instanceof C.a){const t=r.getValues();return T(e,t.map(e=>{var t;return{label:e.name,detail:String(r),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,deprecated:e.isDeprecated,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason,kind:R.EnumMember}}))}if(r===fe.a)return T(e,[{label:"true",detail:String(fe.a),documentation:"Not false.",kind:R.Variable},{label:"false",detail:String(fe.a),documentation:"Not true.",kind:R.Variable}]);return[]}(o,c);if(s===Me.VARIABLE&&1===u){const e=[];return Object(le.c)(Object(pe.a)(t,{allowLegacySDLEmptyFields:!0,allowLegacySDLImplementsInterfaces:!0}),{VariableDefinition(t){e.push(t)}}),T(o,e.map(e=>({label:`$${e.variable.name.value}`,kind:R.Variable,detail:"name"in e.type?e.type.name.value:"Variable"})))}return s===Me.TYPE_CONDITION&&1===u||s===Me.NAMED_TYPE&&null!=a.prevState&&a.prevState.kind===Me.TYPE_CONDITION?function(e,t,n,r){let i;if(t.parentType)if(Object(C.C)(t.parentType)){const e=Object(C.j)(t.parentType),r=n.getPossibleTypes(e),o=Object.create(null);r.forEach(e=>{e.getInterfaces().forEach(e=>{o[e.name]=e})}),i=r.concat(A(o))}else i=[t.parentType];else{const e=n.getTypeMap();i=A(e).filter(C.D)}return T(e,i.map(e=>{const t=Object(C.A)(e);return{label:String(e),documentation:t&&t.description||"",kind:R.Field}}))}(o,c,e):s===Me.FRAGMENT_SPREAD&&1===u?function(e,t,n,r,i){const o=n.getTypeMap(),a=S(e.state),s=Le(r);i&&s.push(...i);const u=s.filter(e=>o[e.typeCondition.name.value]&&!(a&&a.kind===Me.FRAGMENT_DEFINITION&&a.name===e.name.value)&&Object(C.D)(t.parentType)&&Object(C.D)(o[e.typeCondition.name.value])&&Object(de.a)(n,t.parentType,o[e.typeCondition.name.value]));return T(e,u.map(e=>({label:e.name.value,detail:String(o[e.typeCondition.name.value]),documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`,kind:R.Field})))}(o,c,e,t,i):s===Me.VARIABLE_DEFINITION&&2===u||s===Me.LIST_TYPE&&1===u||s===Me.NAMED_TYPE&&a.prevState&&(a.prevState.kind===Me.VARIABLE_DEFINITION||a.prevState.kind===Me.LIST_TYPE||a.prevState.kind===Me.NON_NULL_TYPE)?function(e,t,n){const r=A(t.getTypeMap()).filter(C.G);return T(e,r.map(e=>({label:e.name,documentation:e.description,kind:R.Variable})))}(o,e):s===Me.DIRECTIVE?function(e,t,n,r){if(t.prevState&&t.prevState.kind){const r=n.getDirectives().filter(e=>Be(t.prevState,e));return T(e,r.map(e=>({label:e.name,documentation:e.description||"",kind:R.Function})))}return[]}(o,a,e):[]}function Le(e){const t=[];return Re(e,(e,n)=>{n.kind===Me.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:Me.FRAGMENT_DEFINITION,name:{kind:"Name",value:n.name},selectionSet:{kind:Me.SELECTION_SET,selections:[]},typeCondition:{kind:Me.NAMED_TYPE,name:{kind:"Name",value:n.type}}})}),t}function Pe(e,t){let n=null,r=null,i=null;const o=Re(e,(e,o,a,s)=>{if(s===t.line&&e.getCurrentPosition()>=t.character)return n=a,r=Object.assign({},o),i=e.current(),"BREAK"});return{start:o.start,end:o.end,string:i||o.string,state:r||o.state,style:n||o.style}}function Re(e,t){const n=e.split("\n"),r=Se();let i=r.startState(),o="",a=new he("");for(let e=0;e{switch(t.kind){case Me.QUERY:case"ShortQuery":l=e.getQueryType();break;case Me.MUTATION:l=e.getMutationType();break;case Me.SUBSCRIPTION:l=e.getSubscriptionType();break;case Me.INLINE_FRAGMENT:case Me.FRAGMENT_DEFINITION:t.type&&(l=e.getType(t.type));break;case Me.FIELD:case Me.ALIASED_FIELD:l&&t.name?(a=c?_(e,c,t.name):null,l=a?a.type:null):a=null;break;case Me.SELECTION_SET:c=Object(C.A)(l);break;case Me.DIRECTIVE:i=t.name?e.getDirective(t.name):null;break;case Me.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case Me.FIELD:r=a&&a.args;break;case Me.DIRECTIVE:r=i&&i.args;break;case Me.ALIASED_FIELD:const n=t.prevState&&t.prevState.name;if(!n){r=null;break}const o=c?_(e,c,n):null;if(!o){r=null;break}r=o.args;break;default:r=null}else r=null;break;case Me.ARGUMENT:if(r)for(let e=0;ee.value===t.name):null;break;case Me.LIST_VALUE:const f=Object(C.B)(s);s=f instanceof C.d?f.ofType:null;break;case Me.OBJECT_VALUE:const d=Object(C.A)(s);u=d instanceof C.b?d.getFields():null;break;case Me.OBJECT_FIELD:const h=t.name&&u?u[t.name]:null;s=h&&h.type;break;case Me.NAMED_TYPE:t.name&&(l=e.getType(t.name))}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:o,fieldDef:a,inputType:s,objectFieldDefs:u,parentType:c,type:l}}class ze{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new Ve(e,t)}setEnd(e,t){this.end=new Ve(e,t)}}class Ve{constructor(e,t){this.lessThanOrEqualTo=e=>this.linee.name&&e.name.value===r);if(0===i.length)throw Error(`Definition not found for GraphQL type ${r}`);const o=i.map(({filePath:e,content:t,definition:n})=>function(e,t,n){const r=n.name;return Ye()(r,"Expected ASTNode to have a Name."),{path:e,position:et(t,n),range:Ze(t,n),name:r.value||"",language:Xe,projectRoot:e}}(e||"",t,n));return{definitions:o,queryRange:o.map(n=>Ze(e,t))}}))}function nt(e,t,n){return $e(this,void 0,void 0,(function*(){const r=t.name.value,i=n.filter(({definition:e})=>e.name.value===r);if(0===i.length)throw Error(`Definition not found for GraphQL fragment ${r}`);const o=i.map(({filePath:e,content:t,definition:n})=>it(e||"",t,n));return{definitions:o,queryRange:o.map(n=>Ze(e,t))}}))}function rt(e,t,n){return{definitions:[it(e,t,n)],queryRange:n.name?[Ze(t,n.name)]:[]}}function it(e,t,n){const r=n.name;if(!r)throw Error("Expected ASTNode to have a Name.");return{path:e,position:et(t,n),range:Ze(t,n),name:r.value||"",language:Xe,projectRoot:e}}var ot=n(531);const at={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},st={[at.Error]:1,[at.Warning]:2,[at.Information]:3,[at.Hint]:4};function ut(e,t=null,n,r){let i=null;try{i=Object(pe.a)(e)}catch(t){const n=ft(t.locations[0],e);return[{severity:st.Error,message:t.message,source:"GraphQL: Syntax",range:n}]}return ct(i,t,n,r)}function ct(e,t=null,n,r){if(!t)return[];const i=lt(function(e,t,n,r){const i=He.a.filter(e=>e!==We.a&&e!==Je.a&&(!r||e!==Ge.a));return n&&Array.prototype.push.apply(i,n),Object(Ke.c)(e,t,i).filter(e=>{if(-1!==e.message.indexOf("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===Ie.a.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0})}(t,e,n,r),e=>pt(e,st.Error,"Validation")),o=ot.a?lt(Object(ot.a)(t,e),e=>pt(e,st.Warning,"Deprecation")):[];return i.concat(o)}function lt(e,t){return Array.prototype.concat.apply([],e.map(t))}function pt(e,t,n){if(!e.nodes)return[];const r=[];return e.nodes.forEach(i=>{const o="Variable"!==i.kind&&"name"in i&&void 0!==i.name?i.name:"variable"in i&&void 0!==i.variable?i.variable:i;if(o){Ye()(e.locations,"GraphQL validation error requires locations.");const i=e.locations[0],a=function(e){const t=e.loc;return Ye()(t,"Expected ASTNode to have a location."),t}(o),s=i.column+(a.end-a.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new ze(new Ve(i.line-1,i.column-1),new Ve(i.line-1,s))})}}),r}function ft(e,t){const n=Se(),r=n.startState(),i=t.split("\n");Ye()(i.length>=e.line,"Query text must have more lines than where the error happened");let o=null;for(let t=0;t({representativeName:t.name,startPosition:qe(e,t.loc.start),endPosition:qe(e,t.loc.end),kind:t.kind,children:t.selectionSet||t.fields||t.values||t.arguments||[]});return{Field:e=>{const n=e.alias?[mt("plain",e.alias),mt("plain",": ")]:[];return n.push(mt("plain",e.name)),Object.assign({tokenizedText:n},t(e))},OperationDefinition:e=>Object.assign({tokenizedText:[mt("keyword",e.operation),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),Document:e=>e.definitions,SelectionSet:e=>function(e,t){const n=[];for(let r=0;re.kind===dt?e.selectionSet:e),Name:e=>e.value,FragmentDefinition:e=>Object.assign({tokenizedText:[mt("keyword","fragment"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),InterfaceTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","interface"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),EnumTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","enum"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),EnumValueDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),ObjectTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","type"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),InputObjectTypeDefinition:e=>Object.assign({tokenizedText:[mt("keyword","input"),mt("whitespace"," "),mt("class-name",e.name)]},t(e)),FragmentSpread:e=>Object.assign({tokenizedText:[mt("plain","..."),mt("class-name",e.name)]},t(e)),InputValueDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),FieldDefinition:e=>Object.assign({tokenizedText:[mt("plain",e.name)]},t(e)),InlineFragment:e=>e.selectionSet}}(e);return{outlineTrees:Object(le.c)(t,{leave:e=>void 0!==n&&e.kind in n?n[e.kind](e):null})}}function mt(e,t){return{kind:e,value:t}}function gt(e,t,n,r){const i=r||Pe(t,n);if(!e||!i||!i.state)return"";const o=i.state,a=o.kind,s=o.step,u=Ue(e,i.state),c={schema:e};if("Field"===a&&0===s&&u.fieldDef||"AliasedField"===a&&2===s&&u.fieldDef){const e=[];return function(e,t,n){yt(e,t,n),bt(e,t,n,t.type)}(e,u,c),xt(e,c,u.fieldDef),e.join("").trim()}if("Directive"===a&&1===s&&u.directiveDef){const e=[];return vt(e,u,c),xt(e,c,u.directiveDef),e.join("").trim()}if("Argument"===a&&0===s&&u.argDef){const e=[];return function(e,t,n){t.directiveDef?vt(e,t,n):t.fieldDef&&yt(e,t,n);if(!t.argDef)return;const r=t.argDef.name;Dt(e,"("),Dt(e,r),bt(e,t,n,t.inputType),Dt(e,")")}(e,u,c),xt(e,c,u.argDef),e.join("").trim()}if("EnumValue"===a&&u.enumValue&&"description"in u.enumValue){const e=[];return function(e,t,n){if(!t.enumValue)return;const r=t.enumValue.name;Et(e,t,n,t.inputType),Dt(e,"."),Dt(e,r)}(e,u,c),xt(e,c,u.enumValue),e.join("").trim()}if("NamedType"===a&&u.type&&"description"in u.type){const e=[];return Et(e,u,c,u.type),xt(e,c,u.type),e.join("").trim()}return""}function yt(e,t,n){if(!t.fieldDef)return;const r=t.fieldDef.name;"__"!==r.slice(0,2)&&(Et(e,t,n,t.parentType),Dt(e,".")),Dt(e,r)}function vt(e,t,n){if(!t.directiveDef)return;Dt(e,"@"+t.directiveDef.name)}function bt(e,t,n,r){Dt(e,": "),Et(e,t,n,r)}function Et(e,t,n,r){r&&(r instanceof C.e?(Et(e,t,n,r.ofType),Dt(e,"!")):r instanceof C.d?(Dt(e,"["),Et(e,t,n,r.ofType),Dt(e,"]")):Dt(e,r.name))}function xt(e,t,n){if(!n)return;const r="string"==typeof n.description?n.description:null;r&&(Dt(e,"\n\n"),Dt(e,r)),function(e,t,n){if(!n)return;const r=n.deprecationReason?n.deprecationReason:null;if(!r)return;Dt(e,"\n\n"),Dt(e,"Deprecated: "),Dt(e,r)}(e,0,n)}function Dt(e,t){e.push(t)}var Ct=n(15),wt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};const{FRAGMENT_DEFINITION:St,OBJECT_TYPE_DEFINITION:_t,INTERFACE_TYPE_DEFINITION:kt,ENUM_TYPE_DEFINITION:At,UNION_TYPE_DEFINITION:Tt,SCALAR_TYPE_DEFINITION:Ot,INPUT_OBJECT_TYPE_DEFINITION:Ft,SCALAR_TYPE_EXTENSION:Nt,OBJECT_TYPE_EXTENSION:It,INTERFACE_TYPE_EXTENSION:Mt,UNION_TYPE_EXTENSION:jt,ENUM_TYPE_EXTENSION:Lt,INPUT_OBJECT_TYPE_EXTENSION:Pt,DIRECTIVE_DEFINITION:Rt,FRAGMENT_SPREAD:Bt,OPERATION_DEFINITION:Ut,NAMED_TYPE:zt}=Ie.a,Vt={[Ie.a.FIELD]:Q.Field,[Ie.a.OPERATION_DEFINITION]:Q.Class,[Ie.a.FRAGMENT_DEFINITION]:Q.Class,[Ie.a.FRAGMENT_SPREAD]:Q.Struct,[Ie.a.OBJECT_TYPE_DEFINITION]:Q.Class,[Ie.a.ENUM_TYPE_DEFINITION]:Q.Enum,[Ie.a.ENUM_VALUE_DEFINITION]:Q.EnumMember,[Ie.a.INPUT_OBJECT_TYPE_DEFINITION]:Q.Class,[Ie.a.INPUT_VALUE_DEFINITION]:Q.Field,[Ie.a.FIELD_DEFINITION]:Q.Field,[Ie.a.INTERFACE_TYPE_DEFINITION]:Q.Interface,[Ie.a.DOCUMENT]:Q.File,FieldWithArguments:Q.Method};function qt(e){return"FieldDefinition"===e.kind&&e.children&&e.children.length>0?Vt.FieldWithArguments:Vt[e.kind]}class Ht{constructor(e){this._graphQLCache=e,this._graphQLConfig=e.getGraphQLConfig()}getConfigForURI(e){const t=this._graphQLCache.getProjectForFile(e);if(t)return t;throw Error(`No config found for uri: ${e}`)}getDiagnostics(e,t,n){return wt(this,void 0,void 0,(function*(){let r=!1;const i=this.getConfigForURI(t);if(!i)return[];const{schema:o,name:a,extensions:s}=i;try{const n=Object(pe.a)(e);o&&t===o||(r=n.definitions.some(e=>{switch(e.kind){case _t:case kt:case At:case Tt:case Ot:case Ft:case Nt:case It:case Mt:case jt:case Lt:case Pt:case Rt:return!0}return!1}))}catch(t){const n=ft(t.locations[0],e);return[{severity:st.Error,message:t.message,source:"GraphQL: Syntax",range:n}]}let u=e;const c=yield this._graphQLCache.getFragmentDefinitions(i);u=`${u} ${(yield this._graphQLCache.getFragmentDependencies(e,c)).reduce((e,t)=>`${e} ${Object(Ct.print)(t.definition)}`,"")}`;let l=null;try{l=Object(pe.a)(u)}catch(e){return[]}let p=null;(null==s?void 0:s.customValidationRules)&&"function"==typeof s.customValidationRules&&(p=s.customValidationRules(this._graphQLConfig));const f=yield this._graphQLCache.getSchema(a,r);return f?ct(l,f,p,n):[]}))}getAutocompleteSuggestions(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n),i=yield this._graphQLCache.getSchema(r.name),o=yield this._graphQLCache.getFragmentDefinitions(r),a=Array.from(o).map(([,e])=>e);return i?je(i,e,t,void 0,a.map(({definition:e})=>e)):[]}))}getHoverInformation(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n),i=yield this._graphQLCache.getSchema(r.name);return i?gt(i,e,t):""}))}getDefinition(e,t,n){return wt(this,void 0,void 0,(function*(){const r=this.getConfigForURI(n);let i;try{i=Object(pe.a)(e)}catch(e){return null}const o=function(e,t,n){const r=function(e,t){const n=e.split("\n").slice(0,t.line);return t.character+n.map(e=>e.length+1).reduce((e,t)=>e+t,0)}(e,n);let i;return Object(le.c)(t,{enter(e){if(!("Name"!==e.kind&&e.loc&&e.loc.start<=r&&r<=e.loc.end))return!1;i=e},leave(e){if(e.loc&&e.loc.start<=r&&r<=e.loc.end)return!1}}),i}(e,i,t);if(o)switch(o.kind){case Bt:return this._getDefinitionForFragmentSpread(e,i,o,n,r);case St:case Ut:return rt(n,e,o);case zt:return this._getDefinitionForNamedType(e,i,o,n,r)}return null}))}getDocumentSymbols(e,t){return wt(this,void 0,void 0,(function*(){const n=yield this.getOutline(e);if(!n)return[];const r=[],i=n.outlineTrees.map(e=>[null,e]);for(;i.length>0;){const e=i.pop();if(!e)return[];const[n,o]=e;if(!o)return[];r.push({name:o.representativeName,kind:qt(o),location:{uri:t,range:{start:o.startPosition,end:o.endPosition}},containerName:n?n.representativeName:void 0}),i.push(...o.children.map(e=>[o,e]))}return r}))}_getDefinitionForNamedType(e,t,n,r,i){return wt(this,void 0,void 0,(function*(){const o=yield this._graphQLCache.getObjectTypeDefinitions(i),a=yield this._graphQLCache.getObjectTypeDependenciesForAST(t,o),s=t.definitions.filter(e=>e.kind===_t||e.kind===Ft||e.kind===At||e.kind===Ot||e.kind===kt).map(t=>({filePath:r,content:e,definition:t}));return yield tt(e,n,a.concat(s))}))}_getDefinitionForFragmentSpread(e,t,n,r,i){return wt(this,void 0,void 0,(function*(){const o=yield this._graphQLCache.getFragmentDefinitions(i),a=yield this._graphQLCache.getFragmentDependenciesForAST(t,o),s=t.definitions.filter(e=>e.kind===St).map(t=>({filePath:r,content:e,definition:t}));return yield nt(e,n,a.concat(s))}))}getOutline(e){return wt(this,void 0,void 0,(function*(){return ht(e)}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CANCEL",(function(){return r.a})),n.d(t,"SAGA_LOCATION",(function(){return r.g})),n.d(t,"buffers",(function(){return a.i})),n.d(t,"detach",(function(){return a.j})),n.d(t,"END",(function(){return w})),n.d(t,"channel",(function(){return _})),n.d(t,"eventChannel",(function(){return k})),n.d(t,"isEnd",(function(){return S})),n.d(t,"multicastChannel",(function(){return A})),n.d(t,"runSaga",(function(){return H})),n.d(t,"stdChannel",(function(){return T}));var r=n(19),i=n(63);var o=n(10),a=n(6),s=n(59);function u(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}var c=u,l=(n(109),[]),p=0;function f(e){try{m(),e()}finally{g()}}function d(e){l.push(e),p||(m(),y())}function h(e){try{return m(),e()}finally{y()}}function m(){p++}function g(){p--}function y(){var e;for(g();!p&&void 0!==(e=l.shift());)f(e)}var v=function(e){return function(t){return e.some((function(e){return C(e)(t)}))}},b=function(e){return function(t){return e(t)}},E=function(e){return function(t){return t.type===String(e)}},x=function(e){return function(t){return t.type===e}},D=function(){return a.U};function C(e){var t="*"===e?D:Object(o.k)(e)?E:Object(o.a)(e)?v:Object(o.l)(e)?E:Object(o.d)(e)?b:Object(o.m)(e)?x:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var w={type:r.b},S=function(e){return e&&e.type===r.b};function _(e){void 0===e&&(e=Object(a.O)());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(w):e.isEmpty()?(n.push(r),r.cancel=function(){Object(a.bb)(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(w):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,i=e.length;r2?m-2:0),y=2;y=0||(i[n]=e[n]);return i}(n,["context","channel","sagaMonitor"]);function p(e){var n=e.getState,r=e.dispatch;return t=H.bind(null,Object(i.a)({},l,{context:o,channel:u,dispatch:r,getState:n,sagaMonitor:c})),function(e){return function(t){c&&c.actionDispatched&&c.actionDispatched(t);var n=e(t);return u.put(t),n}}}return p.run=function(){return t.apply(void 0,arguments)},p.setContext=function(e){Object(a.Z)(o,e)},p};t.default=W},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(262).Observable},function(e,t,n){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},o={key:r,value:e[r]};return n(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,a;if(Array.isArray(t)){for(a="[",n=0;n1&&"_"===e[0]&&"_"===e[1]?new i.a('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.')):o.test(e)?void 0:new i.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(1),o=n(45);function a(e){return{Document:function(t){for(var n=0,a=t.definitions;n1&&e.reportError(new r.a("This anonymous operation must be the only defined operation.",n))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);function i(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new r.a(t.name?'Subscription "'.concat(t.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(15),o=n(0),a=n(33);function s(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var s=Object(a.a)(e.getSchema(),n);if(s&&!Object(o.D)(s)){var u=Object(i.print)(n);e.reportError(new r.a('Fragment cannot condition on non composite type "'.concat(u,'".'),n))}}},FragmentDefinition:function(t){var n=Object(a.a)(e.getSchema(),t.typeCondition);if(n&&!Object(o.D)(n)){var s=Object(i.print)(t.typeCondition);e.reportError(new r.a('Fragment "'.concat(t.name.value,'" cannot condition on non composite type "').concat(s,'".'),t.typeCondition))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(15),o=n(0),a=n(33);function s(e){return{VariableDefinition:function(t){var n=Object(a.a)(e.getSchema(),t.type);if(n&&!Object(o.G)(n)){var s=t.variable.name.value,u=Object(i.print)(t.type);e.reportError(new r.a('Variable "$'.concat(s,'" cannot be non-input type "').concat(u,'".'),t.type))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),i=n(2),o=n(0);function a(e){return{Field:function(t){var n=e.getType(),a=t.selectionSet;if(n)if(Object(o.I)(Object(o.A)(n))){if(a){var s=t.name.value,u=Object(r.a)(n);e.reportError(new i.a('Field "'.concat(s,'" must not have a selection since type "').concat(u,'" has no subfields.'),a))}}else if(!a){var c=t.name.value,l=Object(r.a)(n);e.reportError(new i.a('Field "'.concat(c,'" of type "').concat(l,'" must have a selection of subfields. Did you mean "').concat(c,' { ... }"?'),t))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(57),i=n(38),o=n(43),a=n(2),s=n(0);function u(e){return{Field:function(t){var n=e.getParentType();if(n&&!e.getFieldDef()){var u=e.getSchema(),c=t.name.value,l=Object(i.a)("to use an inline fragment on",function(e,t,n){if(!Object(s.C)(t))return[];for(var i=new Set,o=Object.create(null),a=0,u=e.getPossibleTypes(t);a1)for(var p=0;p0)return[[t,e.map((function(e){return e[0]}))],e.reduce((function(e,t){var n=t[1];return e.concat(n)}),[n]),e.reduce((function(e,t){var n=t[2];return e.concat(n)}),[r])]}(function(e,t,n,r,i,o,a,s){var u=[],c=y(e,t,i,o),l=c[0],p=c[1],f=y(e,t,a,s),g=f[0],v=f[1];if(m(e,u,t,n,r,l,g),0!==v.length)for(var b=0;b0&&e.reportError(new r.a("Must provide only one schema definition.",t)),++s)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);function i(e){var t=e.getSchema(),n=Object.create(null),i=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(t){for(var o,a=null!==(o=t.operationTypes)&&void 0!==o?o:[],s=0;s=t?e.apply(this,r):function(){return n.apply(this,r.concat([].slice.call(arguments)))}}}},function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,u,c,l,p){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.a=i},function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===r(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function o(e){return"Array"===r(e)}function a(e){return"Symbol"===r(e)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use @@ -63,7 +63,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -function s(){for(var e=0,t=0,n=arguments.length;t-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function D(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},v.call(E.prototype),v.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},D.error=function(){var e=new D(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];D.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new D(null,{status:t,headers:{location:e}})};var w=self.DOMException;try{new w}catch(e){(w=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),w.prototype.constructor=w}function S(e,t){return new Promise((function(n,r){var i=new E(e,t);if(i.signal&&i.signal.aborted)return r(new w("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new D(i,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new w("Aborted","AbortError"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}S.polyfill=!0,self.fetch||(self.fetch=S,self.Headers=d,self.Request=E,self.Response=D)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(307),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(3),a=n(11),s=n(52);t.Button=function(e){var n=e.purple,r=e.hideArrow,i=e.children,a=e.onClick;return o.createElement(t.ButtonBox,{purple:n,onClick:a},i||"Learn more",!r&&o.createElement(s.FullArrowRightIcon,{color:"red",width:14,height:11}))},t.ButtonBox=a.styled("div")(i||(i=r(["\n display: flex;\n align-items: center;\n\n padding: 6px 16px;\n border-radius: 2px;\n background: ",";\n color: ",";\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 1px;\n white-space: nowrap;\n\n transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;\n cursor: pointer;\n &:hover {\n background: ",";\n transform: ",";\n svg {\n animation: move 1s ease infinite;\n }\n }\n\n svg {\n margin-left: 10px;\n fill: ",";\n }\n\n @keyframes move {\n 0% {\n transform: translate3D(0, 0, 0);\n }\n\n 50% {\n transform: translate3D(3px, 0, 0);\n }\n\n 100% {\n transform: translate3D(0, 0, 0);\n }\n }\n"],["\n display: flex;\n align-items: center;\n\n padding: 6px 16px;\n border-radius: 2px;\n background: ",";\n color: ",";\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 1px;\n white-space: nowrap;\n\n transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;\n cursor: pointer;\n &:hover {\n background: ",";\n transform: ",";\n svg {\n animation: move 1s ease infinite;\n }\n }\n\n svg {\n margin-left: 10px;\n fill: ",";\n }\n\n @keyframes move {\n 0% {\n transform: translate3D(0, 0, 0);\n }\n\n 50% {\n transform: translate3D(3px, 0, 0);\n }\n\n 100% {\n transform: translate3D(0, 0, 0);\n }\n }\n"])),(function(e){return e.purple?"rgb(218, 27, 127)":"#2a7ed2"}),(function(e){return e.theme.colours.white}),(function(e){return e.purple?"rgb(164, 3, 111)":"#3f8ad7"}),(function(e){return e.purple?"translate3D(0, 0, 0)":"translate3D(0, -1px, 0)"}),(function(e){return e.theme.colours.white}))},,function(e,t,n){"undefined"==typeof Promise&&(n(256).enable(),window.Promise=n(258)),n(251),Object.assign=n(73)},function(e,t,n){"use strict";var r=n(151),i=[ReferenceError,TypeError,RangeError],o=!1;function a(){o=!1,r._47=null,r._71=null}function s(e,t){return t.some((function(t){return e instanceof t}))}t.disable=a,t.enable=function(e){e=e||{},o&&a();o=!0;var t=0,n=0,u={};function c(t){(e.allRejections||s(u[t].error,e.whitelist||i))&&(u[t].displayId=n++,e.onUnhandled?(u[t].logged=!0,e.onUnhandled(u[t].displayId,u[t].error)):(u[t].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn(" "+e)}))}(u[t].displayId,u[t].error)))}r._47=function(t){2===t._83&&u[t._56]&&(u[t._56].logged?function(t){u[t].logged&&(e.onHandled?e.onHandled(u[t].displayId,u[t].error):u[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+u[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+u[t].displayId+".")))}(t._56):clearTimeout(u[t._56].timeout),delete u[t._56])},r._71=function(e,n){0===e._75&&(e._56=t++,u[e._56]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._56),s(n,i)?100:2e3),logged:!1})}}},function(e,t,n){"use strict";(function(t){function n(e){i.length||(r(),!0),i[i.length]=e}e.exports=n;var r,i=[],o=0;function a(){for(;o1024){for(var t=0,n=i.length-o;t-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function D(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},v.call(E.prototype),v.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},D.error=function(){var e=new D(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];D.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new D(null,{status:t,headers:{location:e}})};var w=self.DOMException;try{new w}catch(e){(w=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),w.prototype.constructor=w}function S(e,t){return new Promise((function(n,r){var i=new E(e,t);if(i.signal&&i.signal.aborted)return r(new w("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new D(i,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new w("Aborted","AbortError"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}S.polyfill=!0,self.fetch||(self.fetch=S,self.Headers=d,self.Request=E,self.Response=D)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(300),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(3),a=n(11),s=n(51);t.Button=function(e){var n=e.purple,r=e.hideArrow,i=e.children,a=e.onClick;return o.createElement(t.ButtonBox,{purple:n,onClick:a},i||"Learn more",!r&&o.createElement(s.FullArrowRightIcon,{color:"red",width:14,height:11}))},t.ButtonBox=a.styled("div")(i||(i=r(["\n display: flex;\n align-items: center;\n\n padding: 6px 16px;\n border-radius: 2px;\n background: ",";\n color: ",";\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 1px;\n white-space: nowrap;\n\n transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;\n cursor: pointer;\n &:hover {\n background: ",";\n transform: ",";\n svg {\n animation: move 1s ease infinite;\n }\n }\n\n svg {\n margin-left: 10px;\n fill: ",";\n }\n\n @keyframes move {\n 0% {\n transform: translate3D(0, 0, 0);\n }\n\n 50% {\n transform: translate3D(3px, 0, 0);\n }\n\n 100% {\n transform: translate3D(0, 0, 0);\n }\n }\n"],["\n display: flex;\n align-items: center;\n\n padding: 6px 16px;\n border-radius: 2px;\n background: ",";\n color: ",";\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 1px;\n white-space: nowrap;\n\n transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;\n cursor: pointer;\n &:hover {\n background: ",";\n transform: ",";\n svg {\n animation: move 1s ease infinite;\n }\n }\n\n svg {\n margin-left: 10px;\n fill: ",";\n }\n\n @keyframes move {\n 0% {\n transform: translate3D(0, 0, 0);\n }\n\n 50% {\n transform: translate3D(3px, 0, 0);\n }\n\n 100% {\n transform: translate3D(0, 0, 0);\n }\n }\n"])),(function(e){return e.purple?"rgb(218, 27, 127)":"#2a7ed2"}),(function(e){return e.theme.colours.white}),(function(e){return e.purple?"rgb(164, 3, 111)":"#3f8ad7"}),(function(e){return e.purple?"translate3D(0, 0, 0)":"translate3D(0, -1px, 0)"}),(function(e){return e.theme.colours.white}))},,function(e,t,n){"undefined"==typeof Promise&&(n(249).enable(),window.Promise=n(251)),n(244),Object.assign=n(72)},function(e,t,n){"use strict";var r=n(151),i=[ReferenceError,TypeError,RangeError],o=!1;function a(){o=!1,r._47=null,r._71=null}function s(e,t){return t.some((function(t){return e instanceof t}))}t.disable=a,t.enable=function(e){e=e||{},o&&a();o=!0;var t=0,n=0,u={};function c(t){(e.allRejections||s(u[t].error,e.whitelist||i))&&(u[t].displayId=n++,e.onUnhandled?(u[t].logged=!0,e.onUnhandled(u[t].displayId,u[t].error)):(u[t].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn(" "+e)}))}(u[t].displayId,u[t].error)))}r._47=function(t){2===t._83&&u[t._56]&&(u[t._56].logged?function(t){u[t].logged&&(e.onHandled?e.onHandled(u[t].displayId,u[t].error):u[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+u[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+u[t].displayId+".")))}(t._56):clearTimeout(u[t._56].timeout),delete u[t._56])},r._71=function(e,n){0===e._75&&(e._56=t++,u[e._56]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._56),s(n,i)?100:2e3),logged:!1})}}},function(e,t,n){"use strict";(function(t){function n(e){i.length||(r(),!0),i[i.length]=e}e.exports=n;var r,i=[],o=0;function a(){for(;o1024){for(var t=0,n=i.length-o;tO.length&&O.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cO.length&&O.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c
    "},a.code_block=function(e,t,n,r,i){var a=e[t];return""+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,u,c,l,p=e[t],f=p.info?i(p.info).trim():"",d="";return f&&(d=f.split(/\s+/g)[0]),0===(s=n.highlight&&n.highlight(p.content,d)||o(p.content)).indexOf(""+s+"\n"):"
    "+s+"
    \n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}e.exports=function(e){var t,n,o,a,s,u,c,l,p,f,d,h,m,g,y,v,b,E,x=e.tokens;if(e.md.options.linkify)for(n=0,o=x.length;n=0;t--)if("link_close"!==(u=a[t]).type){if("html_inline"===u.type&&(E=u.content,/^\s]/i.test(E)&&m>0&&m--,i(u.content)&&m++),!(m>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(p=u.content,b=e.md.linkify.match(p),c=[],h=u.level,d=0,l=0;ld&&((s=new e.Token("text","",0)).content=p.slice(d,f),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",y]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),d=b[l].lastIndex);d=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(o,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(e){var t,n,i=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||i||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(i.test(e.tokens[t].content)&&u(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(22).isWhiteSpace,i=n(22).isPunctChar,o=n(22).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,a,c,l,p,f,d,h,m,g,y,v,b,E,x,D,C,w,S,k,A;for(S=[],n=0;n=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===a.type){p=0,f=(c=a.content).length;e:for(;p=0)m=c.charCodeAt(l.index-1);else for(C=n-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if("text"===e[C].type){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,p=48&&m<=57&&(D=x=!1),x&&D&&(x=!1,D=v),x||D){if(D)for(C=S.length-1;C>=0&&(h=S[C],!(S[C].level=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(123);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(122),i=[["table",n(343),["paragraph","reference"]],["code",n(344)],["fence",n(345),["paragraph","reference","blockquote","list"]],["blockquote",n(346),["paragraph","reference","blockquote","list"]],["hr",n(347),["paragraph","reference","blockquote","list"]],["list",n(348),["paragraph","reference","blockquote"]],["reference",n(349)],["heading",n(350),["paragraph","reference","blockquote"]],["lheading",n(351)],["html_block",n(352),["paragraph","reference","blockquote"]],["paragraph",n(354)]];function o(){this.ruler=new r;for(var e=0;e=n))&&!(e.sCount[a]=u){e.line=n;break}for(r=0;rn)return!1;if(p=t+1,e.sCount[p]=4)return!1;if((c=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(s=e.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c=4)return!1;if((d=(f=o(u.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(a)return!0;for((h=e.push("table_open","table",1)).map=y=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l=4);p++){for(f=o(u.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),l=0;l=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c,l,p=!1,f=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>d)return!1;if(126!==(i=e.src.charCodeAt(f))&&96!==i)return!1;if(u=f,(o=(f=e.skipChars(f,i))-u)<3)return!1;if(l=e.src.slice(u,f),(a=e.src.slice(f,d)).indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((f=u=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.sCount[s]=4||(f=e.skipChars(f,i))-u=4)return!1;if(62!==e.src.charCodeAt(k++))return!1;if(i)return!0;for(u=d=e.sCount[t]+k-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(k)?(k++,u++,d++,o=!1,E=!0):9===e.src.charCodeAt(k)?(E=!0,(e.bsCount[t]+d)%4==3?(k++,u++,d++,o=!1):o=!0):E=!1,h=[e.bMarks[t]],e.bMarks[t]=k;k=A,v=[e.sCount[t]],e.sCount[t]=d-u,b=[e.tShift[t]],e.tShift[t]=k-e.bMarks[t],D=e.md.block.ruler.getRules("blockquote"),y=e.parentType,e.parentType="blockquote",w=!1,f=t+1;f=(A=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(k++)||w){if(l)break;for(x=!1,s=0,c=D.length;s=A,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(E?1:0),v.push(e.sCount[f]),e.sCount[f]=d-u,b.push(e.tShift[f]),e.tShift[f]=k-e.bMarks[f]}for(g=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=p=[t,0],e.md.block.tokenize(e,t,f),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=y,p[1]=e.line,s=0;s=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c=a)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o=4)return!1;if(r&&"paragraph"===e.parentType&&e.tShift[t]>=e.blkIndent&&(M=!0),(T=o(e,t))>=0){if(f=!0,O=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(O,T-O-1)),M&&1!==v)return!1}else{if(!((T=i(e,t))>=0))return!1;f=!1}if(M&&e.skipSpaces(T)>=e.eMarks[t])return!1;if(y=e.src.charCodeAt(T-1),r)return!0;for(g=e.tokens.length,f?(I=e.push("ordered_list_open","ol",1),1!==v&&(I.attrs=[["start",v]])):I=e.push("bullet_list_open","ul",1),I.map=m=[t,0],I.markup=String.fromCharCode(y),E=t,_=!1,N=e.md.block.ruler.getRules("list"),w=e.parentType,e.parentType="list";E=b?1:x-p)>4&&(l=1),c=p+l,(I=e.push("list_item_open","li",1)).markup=String.fromCharCode(y),I.map=d=[t,0],D=e.blkIndent,k=e.tight,S=e.tShift[t],C=e.sCount[t],e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!_||(j=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=D,e.tShift[t]=S,e.sCount[t]=C,e.tight=k,(I=e.push("list_item_close","li",-1)).markup=String.fromCharCode(y),E=t=e.line,d[1]=E,s=e.bMarks[t],E>=n)break;if(e.sCount[E]=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[S]<0)){for(b=!1,p=0,f=E.length;p=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=l)return!1;for(a=1,o=e.src.charCodeAt(++c);35===o&&c6||cc&&r(e.src.charCodeAt(s-1))&&(l=s),e.line=t+1,(u=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[t,e.line],(u=e.push("inline","",0)).content=e.src.slice(c,l).trim(),u.map=[t,e.line],u.children=[],(u=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,u,c,l,p,f,d=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";d3)){if(e.sCount[d]>=e.blkIndent&&(u=e.bMarks[d]+e.tShift[d])<(c=e.eMarks[d])&&(45===(p=e.src.charCodeAt(u))||61===p)&&(u=e.skipChars(u,p),(u=e.skipSpaces(u))>=c)){l=61===p?1:2;break}if(!(e.sCount[d]<0)){for(i=!1,o=0,a=h.length;o|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(u=e.src.slice(c,l),i=0;i3||e.sCount[u]<0)){for(r=!1,i=0,o=c.length;i0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,u,c,l,p,f=e;if(e>=t)return"";for(l=new Array(t-e),o=0;fn?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(122),i=[["text",n(357)],["newline",n(358)],["escape",n(359)],["backticks",n(360)],["strikethrough",n(176).tokenize],["emphasis",n(177).tokenize],["link",n(361)],["image",n(362)],["autolink",n(363)],["html_inline",n(364)],["entity",n(365)]],o=[["balance_pairs",n(366)],["strikethrough",n(176).postProcess],["emphasis",n(177).postProcess],["text_collapse",n(367)]];function a(){var e;for(this.ruler=new r,e=0;e=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=m)return!1;for(g=c,(l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?c=l.pos:d=""),g=c;c=m||41!==e.src.charCodeAt(c))&&(y=!0),c++}if(y){if(void 0===e.env.references)return!1;if(c=0?a=e.src.slice(g,c++):c=s+1):c=s+1,a||(a=e.src.slice(u,s)),!(p=e.env.references[r(a)]))return e.pos=h,!1;d=p.href,f=p.title}return t||(e.pos=u,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],f&&n.push(["title",f]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(22).normalizeReference,i=n(22).isSpace;e.exports=function(e,t){var n,o,a,s,u,c,l,p,f,d,h,m,g,y="",v=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=u+1)=b)return!1;for(g=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(y=e.md.normalizeLink(f.str),e.md.validateLink(y)?l=f.pos:y=""),g=l;l=b||41!==e.src.charCodeAt(l))return e.pos=v,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?s=e.src.slice(g,l++):l=u+1):l=u+1,s||(s=e.src.slice(c,u)),!(p=e.env.references[r(s)]))return e.pos=v,!1;y=p.href,d=p.title}return t||(a=e.src.slice(c,u),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",y],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=b,!0}},function(e,t,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,i=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,o,a,s,u,c,l=e.pos;return 60===e.src.charCodeAt(l)&&(!((n=e.src.slice(l)).indexOf(">")<0)&&(i.test(n)?(s=(o=n.match(i))[0].slice(1,-1),u=e.md.normalizeLink(s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=o[0].length,!0)):!!r.test(n)&&(s=(a=n.match(r))[0].slice(1,-1),u=e.md.normalizeLink("mailto:"+s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(175).HTML_TAG_RE;e.exports=function(e,t){var n,i,o,a=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(i=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(170),i=n(22).has,o=n(22).isValidEntityCode,a=n(22).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1=0;){if((i=o[n]).open&&i.marker===r.marker&&i.end<0&&i.level===r.level)if(!((i.close||r.open)&&void 0!==i.length&&void 0!==r.length&&(i.length+r.length)%3==0)){r.jump=t-n,r.open=!1,i.end=t,i.jump=0;break}n-=i.jump+1}}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r=0,i=e.tokens,o=e.tokens.length;for(t=n=0;t0&&this.level++,this.pendingLevel=this.level,this.tokens.push(i),i},s.prototype.scanDelims=function(e,t){var n,r,s,u,c,l,p,f,d,h=e,m=!0,g=!0,y=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e,t,n){const r=n(374),i=n(375),o=n(124),a=n(184),s=n(183),u=n(182),{merge:c,checkSanitizeDeprecation:l,escape:p}=n(76),{getDefaults:f,changeDefaults:d,defaults:h}=n(90);function m(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=c({},m.defaults,t||{}),l(t);const o=t.highlight;let a,s,u=0;try{a=r.lex(e,t)}catch(e){return n(e)}s=a.length;const p=function(e){if(e)return t.highlight=o,n(e);let r;try{r=i.parse(a,t)}catch(t){e=t}return t.highlight=o,e?n(e):n(null,r)};if(!o||o.length<3)return p();if(delete t.highlight,!s)return p();for(;uAn error occurred:

    "+p(e.message+"",!0)+"
    ";throw e}}m.options=m.setOptions=function(e){return c(m.defaults,e),d(m.defaults),m},m.getDefaults=f,m.defaults=h,m.Parser=i,m.parser=i.parse,m.Renderer=o,m.TextRenderer=a,m.Lexer=r,m.lexer=r.lex,m.InlineLexer=s,m.inlineLexer=s.output,m.Slugger=u,m.parse=m,e.exports=m},function(e,t,n){const{defaults:r}=n(90),{block:i}=n(181),{rtrim:o,splitCells:a,escape:s}=n(76);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,u,c,l,p,f,d,h,m,g,y,v,b,E,x;for(e=e.replace(/^ +$/gm,"");e;)if((u=this.rules.newline.exec(e))&&(e=e.substring(u[0].length),u[0].length>1&&this.tokens.push({type:"space"})),u=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(u[0].length),t&&"paragraph"===t.type?t.text+="\n"+u[0].trimRight():(u=u[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?u:o(u,"\n")}))}else if(u=this.rules.fences.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"code",lang:u[2]?u[2].trim():u[2],text:u[3]||""});else if(u=this.rules.heading.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"heading",depth:u[1].length,text:u[2]});else if((u=this.rules.nptable.exec(e))&&(p={type:"table",header:a(u[1].replace(/^ *| *\| *$/g,"")),align:u[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:u[3]?u[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(u[0].length),g=0;g ?/gm,""),this.token(u,t),this.tokens.push({type:"blockquote_end"});else if(u=this.rules.list.exec(e)){for(e=e.substring(u[0].length),c=u[2],b=c.length>1,f={type:"list_start",ordered:b,start:b?+c:"",loose:!1},this.tokens.push(f),u=u[0].match(this.rules.item),d=[],n=!1,v=u.length,g=0;g1?1===l.length:l.length>1||this.options.smartLists&&l!==c)&&(e=u.slice(g+1).join("\n")+e,g=v-1)),r=n||/\n\n(?!\s*$)/.test(p),g!==v-1&&(n="\n"===p.charAt(p.length-1),r||(r=n)),r&&(f.loose=!0),E=/^\[[ xX]\] /.test(p),x=void 0,E&&(x=" "!==p[1],p=p.replace(/^\[[ xX]\] +/,"")),h={type:"list_item_start",task:E,checked:x,loose:r},d.push(h),this.tokens.push(h),this.token(p,!1),this.tokens.push({type:"list_item_end"});if(f.loose)for(v=d.length,g=0;gt.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==o){var l=function(e,t,n){var i=r(e,t,"widget");if("function"==typeof i&&(i=i(n.from,n.to)),"string"==typeof i){var o=document.createTextNode(i);(i=document.createElement("span")).appendChild(o),i.className="CodeMirror-foldmarker"}else i&&(i=i.cloneNode(!0));return i}(t,i,c);e.on(l,"mousedown",(function(t){p.clear(),e.e_preventDefault(t)}));var p=t.markText(c.from,c.to,{replacedWith:l,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});p.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,c.from,c.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=t.length,r=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],i=e.Pos;e.Vim=function(){function o(t,n){this==e.keyMap.vim&&(e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){u(e),e.off("cursorActivity",s),e.state.fatCursorMarks=null}(t),t.getInputField().style.caretColor="")),n&&n.attach==a||function(t){t.setOption("disableInput",!1),t.off("cursorActivity",Ze),e.off(t.getInputField(),"paste",f(t)),t.state.vim=null}(t)}function a(t,n){this==e.keyMap.vim&&(e.addClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){e.state.fatCursorMarks=[],s(e),e.on("cursorActivity",s)}(t),t.getInputField().style.caretColor="transparent")),n&&n.attach==a||function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",Ze),P(t),e.on(t.getInputField(),"paste",f(t))}(t)}function s(e){if(e.state.fatCursorMarks){u(e);for(var t=e.listSelections(),n=[],r=0;r")}(t);if(!r)return!1;var i=e.Vim.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}e.defineOption("vimMode",!1,(function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var l={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},p={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function f(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(X(e.getCursor(),0,1)),Q.enterInsertMode(e,{},t))}),t.onPasteFn}var d=/[\d]/,h=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],m=[function(e){return/\S/.test(e)}];function g(e,t){for(var n=[],r=e;r"]),x=[].concat(y,v,b,["-",'"',".",":","/"]);function D(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function w(e){return/^[A-Z]$/.test(e)}function S(e){return/^\s*$/.test(e)}function k(e){return-1!=".?!".indexOf(e)}function A(e,t){for(var n=0;nt?e=t:e0?1:-1,c=i.getCursor();do{if((a=r[(100+(e+=u))%100])&&(s=a.find())&&!ne(c,s))break}while(en)}return a}return{cachedCursor:void 0,add:function(i,o,a){var s=r[e%100];function u(t){var n=++e%100,o=r[n];o&&o.clear(),r[n]=i.setBookmark(t)}if(s){var c=s.find();c&&!ne(c,o)&&u(o)}else u(o);u(a),t=e,(n=e-100+1)<0&&(n=0)},find:function(t,n){var r=e,o=i(t,n);return e=r,o&&o.find()},move:i}},j=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function L(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=j()}function P(e){return e.state.vim||(e.state.vim={inputState:new U,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function R(){for(var e in N={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:M(),macroModeState:new L,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new H,exCommandHistoryController:new H},T){var t=T[e];t.value=t.defaultValue}}L.prototype={exitMacroRecordMode:function(){var e=N.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=N.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var B={buildKeyMap:function(){},getRegisterController:function(){return N.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return N},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:nt,map:function(e,t,n){Je.map(e,t,n)},unmap:function(e,t){Je.unmap(e,t)},noremap:function(e,r,i){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(i),s=t.length,u=s-n;u=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var u=["normal","insert","visual"];for(var c in u)if(u[c]!==e){var l={};for(var p in s)l[p]=s[p];l.context=u[c],this._mapCommand(l)}}}},setOption:O,getOption:F,defineOption:_,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ke[e]=n,Je.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,i){var o,a=P(n);function s(){var e=N.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),z(n),!0;"mapping"!=i&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=N.registerController.getRegister(n);r&&r.pushText(t)}}(e,r)}}function u(){if(""==r)return z(n),a.visualMode?me(n):a.insertMode&&Qe(n),!0}return!1===(o=a.insertMode?function(){if(u())return!0;for(var e=a.inputState.keyBuffer=a.inputState.keyBuffer+r,i=1==r.length,o=W.matchCommand(e,t,a.inputState,"insert");e.length>1&&"full"!=o.type;){e=a.inputState.keyBuffer=e.slice(1);var s=W.matchCommand(e,t,a.inputState,"insert");"none"!=s.type&&(o=s)}if("none"==o.type)return z(n),!1;if("partial"==o.type)return I&&window.clearTimeout(I),I=window.setTimeout((function(){a.insertMode&&a.inputState.keyBuffer&&z(n)}),F("insertModeEscKeysTimeout")),!i;if(I&&window.clearTimeout(I),i){for(var c=n.listSelections(),l=0;l|<\w+>|./.exec(t),r=i[0],t=t.substring(i.index+r.length),e.Vim.handleKey(n,r,"mapping")}(o.toKeys):W.processCommand(n,a,o)}catch(t){throw n.state.vim=void 0,P(n),e.Vim.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Je.processCommand(e,t)},defineMotion:function(e,t){G[e]=t},defineAction:function(e,t){Q[e]=t},defineOperator:function(e,t){J[e]=t},mapCommand:function(e,t,n,r,i){var o={keys:e,type:t};for(var a in o[t]=n,o[t+"Args"]=r,i)o[a]=i[a];Ye(o)},_mapCommand:Ye,defineRegister:function(e,t){var n=N.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,x.push(e)},exitVisualMode:me,exitInsertMode:Qe};function U(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function z(t,n){t.state.vim.inputState=new U,e.signal(t,"vim-command-done",n)}function V(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function q(e){this.registers=e,this.unnamedRegister=e['"']=new V,e["."]=new V,e[":"]=new V,e["/"]=new V}function H(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}U.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},U.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},V.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(j(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(e,t,n,r,i){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)w(e)?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r);else{switch(t){case"yank":this.registers[0]=new V(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new V(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new V(n,r))}this.unnamedRegister.setText(n,r,i)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new V),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&A(e,x)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},H.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var W={matchCommand:function(e,t,n,r){var i,o=function(e,t,n,r){for(var i,o=[],a=[],s=0;s"==i.keys.slice(-11)){var u=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}(e);if(!u)return{type:"none"};n.selectedCharacter=u}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=$(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);z(e)}r.operator=n.operator,r.operatorArgs=$(n.operatorArgs),n.exitVisualBlock&&(t.visualBlock=!1,de(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=$(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=$(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,z(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Q[n.action](e,a,t)},processSearch:function(t,n,r){if(t.getSearchCursor){var i=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;Te(t).setReversed(!i);var a=i?"/":"?",s=Te(t).getQuery(),u=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var c=N.macroModeState;c.isPlaying?d(f=c.replaySearchQueries.shift(),!0,!1):Pe(t,{onClose:function(e){t.scrollTo(u.left,u.top),d(e,!0,!0);var n=N.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=N.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}(n,e)},prefix:a,desc:Le,onKeyUp:function(n,r,o){var a,s,c,l=e.keyName(n);"Up"==l||"Down"==l?(a="Up"==l,s=n.target?n.target.selectionEnd:0,o(r=N.searchHistoryController.nextMatch(r,a)||""),s&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(s,n.target.value.length))):"Left"!=l&&"Right"!=l&&"Ctrl"!=l&&"Alt"!=l&&"Shift"!=l&&N.searchHistoryController.reset();try{c=Re(t,r,!0,!0)}catch(n){}c?t.scrollIntoView(ze(t,!i,c),30):(Ve(t),t.scrollTo(u.left,u.top))},onKeyDown:function(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(N.searchHistoryController.pushInput(r),N.searchHistoryController.reset(),Re(t,s),Ve(t),t.scrollTo(u.left,u.top),e.e_stop(n),z(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}});break;case"wordUnderCursor":var l=ye(t,!1,0,!1,!0),p=!0;if(l||(l=ye(t,!1,0,!1,!1),p=!1),!l)return;var f=t.getLine(l.start.line).substring(l.start.ch,l.end.ch);f=p&&o?"\\b"+f+"\\b":f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),N.jumpList.cachedCursor=t.getCursor(),t.setCursor(l.start),d(f,!0,!1)}}function d(e,i,o){N.searchHistoryController.pushInput(e),N.searchHistoryController.reset();try{Re(t,e,i,o)}catch(n){return je(t,"Invalid regex: "+e),void z(t)}W.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}},processEx:function(t,n,r){function i(e){N.exCommandHistoryController.pushInput(e),N.exCommandHistoryController.reset(),Je.processCommand(t,e)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(N.exCommandHistoryController.pushInput(r),N.exCommandHistoryController.reset(),e.e_stop(n),z(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,i(r=N.exCommandHistoryController.nextMatch(r,o)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&N.exCommandHistoryController.reset()}"keyToEx"==r.type?Je.processCommand(t,r.exArgs.input):n.visualMode?Pe(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):Pe(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,r,o,a=t.inputState,s=a.motion,u=a.motionArgs||{},c=a.operator,l=a.operatorArgs||{},p=a.registerName,f=t.sel,d=te(t.visualMode?Y(e,f.head):e.getCursor("head")),h=te(t.visualMode?Y(e,f.anchor):e.getCursor("anchor")),m=te(d),g=te(h);if(c&&this.recordLastEdit(t,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&u.explicitRepeat?u.repeatIsExplicit=!0:(u.noRepeat||!u.explicitRepeat&&0===o)&&(o=1,u.repeatIsExplicit=!1),a.selectedCharacter&&(u.selectedCharacter=l.selectedCharacter=a.selectedCharacter),u.repeat=o,z(e),s){var y=G[s](e,d,u,t);if(t.lastMotion=G[s],!y)return;if(u.toJumplist){var v=N.jumpList,b=v.cachedCursor;b?(ve(e,b,y),delete v.cachedCursor):ve(e,d,y)}y instanceof Array?(r=y[0],n=y[1]):n=y,n||(n=te(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=Y(e,n)),r&&(r=Y(e,r)),r=r||g,f.anchor=r,f.head=n,de(e),we(e,t,"<",re(r,n)?r:n),we(e,t,">",re(r,n)?n:r)):c||(n=Y(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){r=g;var E=l.lastSel,x=Math.abs(E.head.line-E.anchor.line),D=Math.abs(E.head.ch-E.anchor.ch);n=E.visualLine?i(g.line+x,g.ch):E.visualBlock?i(g.line+x,g.ch+D):E.head.line==E.anchor.line?i(g.line,g.ch+D):i(g.line+x,g.ch),t.visualMode=!0,t.visualLine=E.visualLine,t.visualBlock=E.visualBlock,f=t.sel={anchor:r,head:n},de(e)}else t.visualMode&&(l.lastSel={anchor:te(f.anchor),head:te(f.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,w,k,A,T;if(t.visualMode){if(C=ie(f.head,f.anchor),w=oe(f.head,f.anchor),k=t.visualLine||l.linewise,T=he(e,{anchor:C,head:w},A=t.visualBlock?"block":k?"line":"char"),k){var _=T.ranges;if("block"==A)for(var O=0;O<_.length;O++)_[O].head.ch=se(e,_[O].head.line);else"line"==A&&(_[0].head=i(_[0].head.line+1,0))}}else{if(C=te(r||g),re(w=te(n||m),C)){var F=C;C=w,w=F}(k=u.linewise||l.linewise)?function(e,t,n){t.ch=0,n.ch=0,n.line++}(0,C,w):u.forward&&function(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var i=r.split("\n");i.pop();for(var o=i.pop();i.length>0&&o&&S(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=se(e,n.line)):n.ch=0}}(e,C,w),T=he(e,{anchor:C,head:w},A="char",!u.inclusive||k)}e.setSelections(T.ranges,T.primary),t.lastMotion=null,l.repeat=o,l.registerName=p,l.linewise=k;var I=J[c](e,l,T.ranges,g,n);t.visualMode&&me(e,null!=I),I&&e.setCursor(I)}},recordLastEdit:function(e,t,n){var r=N.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},G={moveToTopLine:function(e,t,n){var r=qe(e).top+n.repeat-1;return i(r,ge(e.getLine(r)))},moveToMiddleLine:function(e){var t=qe(e),n=Math.floor(.5*(t.top+t.bottom));return i(n,ge(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=qe(e).bottom-n.repeat+1;return i(r,ge(e.getLine(r)))},expandToLine:function(e,t,n){return i(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var r=Te(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,Ue(e,i),ze(e,o,i,n.repeat)}},goToMark:function(e,t,n,r){var i=He(e,r,n.selectedCharacter);return i?n.linewise?{line:i.line,ch:ge(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,t,n,r){if(r.visualBlock&&n.sameLine){var o=r.sel;return[Y(e,i(o.anchor.line,o.head.ch)),Y(e,i(o.head.line,o.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(e,t,n,r){for(var o=t,a=0;au:p.linel&&o.line==l?this.moveToEol(e,t,n,r,!0):(n.toFirstChar&&(a=ge(e.getLine(u)),r.lastHPos=a),r.lastHSPos=e.charCoords(i(u,a),"div").left,i(u,a))},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left}var a=n.repeat;if((u=e.findPosV(o,n.forward?a:-a,"line",r.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(u,"div").top+8,left:r.lastHSPos},u=e.coordsChar(s,"div");else{var c=e.charCoords(i(e.firstLine(),0),"div");c.left=r.lastHSPos,u=e.coordsChar(c,"div")}return r.lastHPos=u.ch,u},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return ke(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return function(e,t,n,r){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!D(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,n,r){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},u=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!u)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!S(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!k(a.line[a.pos])||i||a.pos!==a.line.length-1&&!S(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var l=c.length-1;l>=0;--l)if(!S(c[l])){s.pos=l;break}return s}function s(e,t,n,r){var i={line:u=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(k(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||S(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var u=e.getLine(a.ln);a.pos=0;for(var c=0;c0;)u=r<0?s(e,u.ln,u.pos,r):a(e,u.ln,u.pos,r),n--;return i(u.ln,u.pos)}(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(o=G.moveByDisplayLines(e,t,n,r)))return null;var u=e.charCoords(o,"local");return e.scrollTo(null,i.top+u.top-s.top),o},moveByWords:function(e,t,n){return function(e,t,n,r,o,a){var s=te(t),u=[];(r&&!o||!r&&o)&&n++;for(var c=!(r&&o),l=0;l0)p.index=0;else{var m=p.lineText.length;p.index=m>0?m-1:0}p.nextCh=p.lineText.charAt(p.index)}h(p)&&(o.line=c,o.ch=p.index,t--)}return p.nextCh||p.curMoveThrough?i(c,p.index):o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return Y(e,i(n,t-1))}(e,o)},moveToEol:function(e,t,n,r,o){var a=i(t.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(r.lastHPos=1/0,r.lastHSPos=e.charCoords(s,"div").left),a},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return i(n.line,ge(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,r=t,o=r.line,a=r.ch,s=e.getLine(o);a"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(i(o,a),{bracketRegex:c}).to}return r},moveToStartOfLine:function(e,t){return i(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),i(r,ge(e.getLine(r)))},textObjectManipulation:function(t,n,r,o){var a=r.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,u=!r.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[a])s=function(e,t,n,r){var o,a,s=t,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],l=e.getLine(s.line).charAt(s.ch)===c?1:0;if(o=e.scanForBracket(i(s.line,s.ch+l),-1,void 0,{bracketRegex:u}),a=e.scanForBracket(i(s.line,s.ch+l),1,void 0,{bracketRegex:u}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var p=o;o=a,a=p}return r?a.ch+=1:o.ch+=1,{start:o,end:a}}(t,n,a,u);else if({"'":!0,'"':!0,"`":!0}[a])s=function(e,t,n,r){var o,a,s,u,c=te(t),l=e.getLine(c.line).split(""),p=l.indexOf(n);if(c.ch-1&&!o;s--)l[s]==n&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,u=l.length;st.lastLine()&&n.linewise&&!h?t.replaceRange("",d,c):t.replaceRange("",u,c),n.linewise&&(h||(t.setCursor(d),e.commands.newlineAndIndent(t)),u.ch=Number.MAX_VALUE),o=u}N.registerController.pushText(n.registerName,"change",a,n.linewise,r.length>1),Q.enterInsertMode(t,{head:o},t.state.vim)},delete:function(e,t,n){var r,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=K("",n.length);e.replaceSelections(s),r=n[0].anchor}else{var u=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&u.line==e.lastLine()&&u.line==c.line-1&&(u.line==e.firstLine()?u.ch=0:u=i(u.line-1,se(e,u.line-1))),o=e.getRange(u,c),e.replaceRange("",u,c),r=u,t.linewise&&(r=G.moveToFirstNonWhiteSpaceCharacter(e,u))}return N.registerController.pushText(t.registerName,"delete",o,t.linewise,a.visualBlock),Y(e,r)},indent:function(e,t,n){var r=e.state.vim,i=n[0].anchor.line,o=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var u=0;uc.top?(u.line+=(s-c.top)/i,u.line=Math.ceil(u.line),e.setCursor(u),c=e.charCoords(u,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var l=s+e.getScrollInfo().clientHeight;l=a.anchor.line?X(a.head,0,1):i(a.anchor.line,0)}else if("inplace"==o){if(r.visualMode)return}else"lastEdit"==o&&(s=We(t)||s);t.setOption("disableInput",!1),n&&n.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})),N.macroModeState.isPlaying||(t.on("change",Xe),e.on(t.getInputField(),"keydown",rt)),r.visualMode&&me(t),pe(t,s,u)}},toggleVisualMode:function(t,n,r){var o,a=n.repeat,s=t.getCursor();r.visualMode?r.visualLine^n.linewise||r.visualBlock^n.blockwise?(r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),de(t)):me(t):(r.visualMode=!0,r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,o=Y(t,i(s.line,s.ch+a-1)),r.sel={anchor:s,head:o},e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),de(t),we(t,r,"<",ie(s,o)),we(t,r,">",oe(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&fe(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,de(t),we(t,r,"<",ie(o,a)),we(t,r,">",oe(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),re(o=e.getCursor("head"),r)){var a=o;o=r,r=a}o.ch=se(e,o.line)-1}else{var s=Math.max(t.repeat,2);r=e.getCursor(),o=Y(e,i(r.line+s-1,1/0))}for(var u=0,c=r.line;c1&&(d=Array(t.repeat+1).join(d));var h,m,g=o.linewise,y=o.blockwise;if(y){d=d.split("\n"),g&&d.pop();for(var v=0;ve.lastLine()&&e.replaceRange("\n",i(k,0)),se(e,k)l.length&&(o=l.length),a=i(u.line,o)}if("\n"==s)r.visualMode||t.replaceRange("",u,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var p=t.getRange(u,a);if(p=p.replace(/[^\n]/g,s),r.visualBlock){var f=new Array(t.getOption("tabSize")+1).join(" ");p=(p=t.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(p)}else t.replaceRange(p,u,a);r.visualMode?(u=re(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(u),me(t,!1)):t.setCursor(X(a,0,-1))}},incrementNumberToken:function(e,t){for(var n,r,o,a,s=e.getCursor(),u=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=c.exec(u))&&(o=(r=n.index)+n[0].length,!(s.ch"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,n){return function(){for(var r=0;r2&&(t=ie.apply(void 0,Array.prototype.slice.call(arguments,1))),re(e,t)?e:t}function oe(e,t){return arguments.length>2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),re(e,t)?t:e}function ae(e,t,n){var r=re(e,t),i=re(t,n);return r&&i}function se(e,t){return e.getLine(t).length}function ue(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ce(e,t,n){var r=se(e,t),o=new Array(n-r+1).join(" ");e.setCursor(i(t,r)),e.replaceRange(o,e.getCursor())}function le(e,t){var n=[],r=e.listSelections(),o=te(e.clipPos(t)),a=!ne(t,o),s=function(e,t,n){for(var r=0;rs?c:0,p=r[l].anchor,f=Math.min(p.line,o.line),d=Math.max(p.line,o.line),h=p.ch,m=o.ch,g=r[l].head.ch-h,y=m-h;g>0&&y<=0?(h++,a||m--):g<0&&y>=0?(h--,u||m++):g<0&&-1==y&&(h--,m++);for(var v=f;v<=d;v++){var b={anchor:new i(v,h),head:new i(v,m)};n.push(b)}return e.setSelections(n),t.ch=m,p.ch=h,p}function pe(e,t,n){for(var r=[],i=0;ic&&(o.line=c),o.ch=se(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==n){for(var l=Math.min(a.line,o.line),p=Math.min(a.ch,o.ch),f=Math.max(a.line,o.line),d=Math.max(a.ch,o.ch)+1,h=f-l+1,m=o.line==l?0:h-1,g=[],y=0;y=s.length)return null;r?c=m[0]:(c=h[0])(s.charAt(u))||(c=h[1]);for(var l=u,p=u;c(s.charAt(l))&&l=0;)p--;if(p++,t){for(var f=l;/\s/.test(s.charAt(l))&&l0;)p--;p||(p=d)}}return{start:i(a.line,p),end:i(a.line,l)}}function ve(e,t,n){ne(t,n)||N.jumpList.add(e,t,n)}function be(e,t){N.lastCharacterSearch.increment=e,N.lastCharacterSearch.forward=t.forward,N.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var Ee={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},xe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function De(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),u=n?1:-1,c=r?m:h;if(i&&""==s){if(o+=u,s=e.getLine(o),!D(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var l=u>0?s.length:-1,p=l,f=l;a!=l;){for(var d=!1,g=0;g0?0:s.length}}function Ce(e,t,n,r){for(var o,a=e.getCursor(),s=a.ch,u=0;u0;)f(l,r)&&n--,l+=r;return new i(l,0)}var d=e.state.vim;if(d.visualLine&&f(s,1,!0)){var h=d.sel.anchor;f(h.line,-1,!0)&&(o&&h.line==s||(s+=1))}var m=p(s);for(l=s;l<=c&&n;l++)f(l,1,!0)&&(o&&p(l)==m||n--);for(a=new i(l,0),l>c&&!m?m=!0:o=!1,l=s;l>u&&(o&&p(l)!=m&&l!=s||!f(l,-1,!0));l--);return{start:new i(l,0),end:a}}function Ae(){}function Te(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Ae)}function _e(e,t,n,r,i){e.openDialog?e.openDialog(t,r,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp,selectValueOnOpen:!1}):r(prompt(n,""))}function Oe(e,t){var n=Fe(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var i=0;i'+t+"",{bottom:!0,duration:5e3}):alert(t)}var Le="(Javascript regexp)";function Pe(e,t){var n,r,i,o=(t.prefix||"")+" "+(t.desc||"");_e(e,(n=t.prefix,r=t.desc,i=''+(n||"")+'',r&&(i+=' '+r+""),i),o,t.onClose,t)}function Re(e,t,n,r){if(t){var i=Te(e),o=Me(t,!!n,!!r);if(o)return Ue(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=He(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=ue(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
    ";if(n){n=n.join("");for(var o=0;o")}else for(var a in r){var s=r[a].toString();s.length&&(i+='"'+a+" "+s+"
    ")}je(e,i)},sort:function(t,n){var r,o,a,s,u,c=function(){if(n.argString){var t=new e.StringStream(n.argString);if(t.eat("!")&&(r=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var i=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!i&&!t.eol())return"Invalid arguments";if(i[1]){o=-1!=i[1].indexOf("i"),a=-1!=i[1].indexOf("u");var c=-1!=i[1].indexOf("d")||-1!=i[1].indexOf("n")&&1,l=-1!=i[1].indexOf("x")&&1,p=-1!=i[1].indexOf("o")&&1;if(c+l+p>1)return"Invalid arguments";s=(c?"decimal":l&&"hex")||p&&"octal"}i[2]&&(u=new RegExp(i[2].substr(1,i[2].length-2),o?"i":""))}}();if(c)je(t,c+": "+n.argString);else{var l=n.line||t.firstLine(),p=n.lineEnd||n.line||t.lastLine();if(l!=p){var f=i(l,0),d=i(p,se(t,p)),h=t.getRange(f,d).split("\n"),m=u||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),g="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,y=[],v=[];if(s||u)for(var b=0;b");if(r){var f=0,d=function(){if(f=n&&e<=s:e==n);)if(r||!p||a.from().line!=p.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),p=a.from(),void(l=!1);var e,n,s;l=!0}function m(e){if(e&&e(),t.focus(),p){t.setCursor(p);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=p.ch}c&&c()}if(h(),!l)return n?void Pe(t,{prefix:"replace with "+u+" (y/n/a/q/l)",onKeyDown:function(n,r,i){switch(e.e_stop(n),e.keyName(n)){case"Y":d(),h();break;case"N":h();break;case"A":var o=c;c=void 0,t.operation(f),c=o;break;case"L":d();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(i)}return l&&m(i),!0}}):(f(),void(c&&c()));je(t,"No matches for "+s.source)}(t,p,f,m,g,v,h,l,n.callback)}else je(t,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){Ve(e)},yank:function(e){var t=te(e.getCursor()).line,n=e.getLine(t);N.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(t,n){if(n.argString&&ue(n.argString))for(var r=t.state.vim,i=new e.StringStream(ue(n.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void je(t,"Invalid argument: "+n.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void je(t,"Invalid argument: "+n.argString.substring(o));var s=a,u=i.next();if(!(C(s)&&C(u)||w(s)&&w(u)))return void je(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),l=u.charCodeAt(0);if(c>=l)return void je(t,"Invalid argument: "+n.argString.substring(o));for(var p=0;p<=l-c;p++){var f=String.fromCharCode(c+p);delete r.marks[f]}}else delete r.marks[a]}else je(t,"Argument required")}},Je=new Ge;function Qe(t){var n=t.state.vim,r=N.macroModeState,i=N.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges;o||(t.off("change",Xe),e.off(t.getInputField(),"keydown",rt)),!o&&n.insertModeRepeat>1&&(it(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,n=N.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function Ye(e){t.unshift(e)}function $e(t,n,r,i){var o=N.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Je.processCommand(t,o.keyBuffer[0]),void(r.isPlaying=!1);var a=o.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var u=0;u|<\w+>|./.exec(p))[0],p=p.substring(c.index+l.length),e.Vim.handleKey(t,l,"macro"),n.insertMode){var f=o.insertModeChanges[s++].changes;N.macroModeState.lastInsertModeChanges.changes=f,ot(t,f,1),Qe(t)}r.isPlaying=!1}function Xe(e,t){var n=N.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(r.ignoreCount=i);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o))}t=t.next}}function Ze(t){var n=t.state.vim;if(n.insertMode){var r=N.macroModeState;if(r.isPlaying)return;var i=r.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else t.curOp.isVimOp||function(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?me(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=re(i,r)?0:-1,a=re(i,r)?-1:0;i=X(i,0,o),r=X(r,0,a),n.sel={anchor:r,head:i},we(t,n,"<",ie(i,r)),we(t,n,">",oe(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}(t,n);n.visualMode&&et(t)}function et(e){var t=e.state.vim,n=Y(e,te(t.sel.head)),r=X(n,0,1);if(tt(t),n.ch==e.getLine(n.line).length){var i=document.createElement("span");i.textContent=" ",i.className="cm-animate-fat-cursor",t.fakeCursorBookmark=e.setBookmark(n,{widget:i})}else t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function tt(e){e.fakeCursor&&(e.fakeCursor.clear(),e.fakeCursor=null),e.fakeCursorBookmark&&(e.fakeCursorBookmark.clear(),e.fakeCursorBookmark=null)}function nt(e){this.keyName=e}function rt(t){var n=N.macroModeState.lastInsertModeChanges,r=e.keyName(t);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||e.lookupKey(r,"vim-insert",(function(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new nt(r)),!0})))}function it(e,t,n,r){var i=N.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?W.processAction(e,t,t.lastEditActionCommand):W.evalInput(e,t)}function u(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;ot(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c{const n=t.schema;if(!n)return;const r=e.getCursor(),s=e.getTokenAt(r),u=function(e,t,n){const r="Invalid"===n.state.kind?n.state.prevState:n.state;if(!r)return[];const i=r.kind,s=r.step,u=(0,o.getTypeInfo)(e,n.state);if("Document"===i)return(0,o.hintList)(n,[{label:"query"},{label:"mutation"},{label:"subscription"},{label:"fragment"},{label:"{"}]);if("SelectionSet"===i||"Field"===i||"AliasedField"===i)return function(e,t,n){if(t.parentType){const r=t.parentType,i=(0,a.isObjectType)(r)&&"getFields"in r?(0,o.objectValues)(r.getFields()):[];return(0,a.isCompositeType)(r)&&i.push(a.TypeNameMetaFieldDef),r===n.getQueryType()&&i.push(a.SchemaMetaFieldDef,a.TypeMetaFieldDef),(0,o.hintList)(e,i.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}}))}return[]}(n,u,e);if("Arguments"===i||"Argument"===i&&0===s){const e=u.argDefs;if(e)return(0,o.hintList)(n,e.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0}}))}if(("ObjectValue"===i||"ObjectField"===i&&0===s)&&u.objectFieldDefs){const e=(0,o.objectValues)(u.objectFieldDefs);return(0,o.hintList)(n,e.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0}}))}if("EnumValue"===i||"ListValue"===i&&1===s||"ObjectField"===i&&2===s||"Argument"===i&&2===s)return function(e,t){const n=(0,a.getNamedType)(t.inputType);if(n instanceof a.GraphQLEnumType){const t=n.getValues();return(0,o.hintList)(e,t.map(e=>{var t;return{label:e.name,type:n,documentation:null!==(t=e.description)&&void 0!==t?t:void 0,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}}))}if(n===a.GraphQLBoolean)return(0,o.hintList)(e,[{label:"true",type:a.GraphQLBoolean,documentation:"Not false."},{label:"false",type:a.GraphQLBoolean,documentation:"Not true."}]);return[]}(n,u);if("TypeCondition"===i&&1===s||"NamedType"===i&&null!=r.prevState&&"TypeCondition"===r.prevState.kind)return function(e,t,n){let r;if(t.parentType)if((0,a.isAbstractType)(t.parentType)){const e=(0,a.assertAbstractType)(t.parentType),i=n.getPossibleTypes(e),s=Object.create(null);i.forEach(e=>{e.getInterfaces().forEach(e=>{s[e.name]=e})}),r=i.concat((0,o.objectValues)(s))}else r=[t.parentType];else{const e=n.getTypeMap();r=(0,o.objectValues)(e).filter(a.isCompositeType)}return(0,o.hintList)(e,r.map(e=>{const t=(0,a.getNamedType)(e);return{label:String(e),documentation:t&&t.description||""}}))}(n,u,e);if("FragmentSpread"===i&&1===s)return function(e,t,n,r){const i=n.getTypeMap(),s=(0,o.getDefinitionState)(e.state),u=(0,o.getFragmentDefinitions)(r).filter(e=>i[e.typeCondition.name.value]&&!(s&&"FragmentDefinition"===s.kind&&s.name===e.name.value)&&(0,a.isCompositeType)(t.parentType)&&(0,a.isCompositeType)(i[e.typeCondition.name.value])&&(0,a.doTypesOverlap)(n,t.parentType,i[e.typeCondition.name.value]));return(0,o.hintList)(e,u.map(e=>({label:e.name.value,type:i[e.typeCondition.name.value],documentation:"fragment ".concat(e.name.value," on ").concat(e.typeCondition.name.value)})))}(n,u,e,t);if("VariableDefinition"===i&&2===s||"ListType"===i&&1===s||"NamedType"===i&&r.prevState&&("VariableDefinition"===r.prevState.kind||"ListType"===r.prevState.kind))return function(e,t){const n=t.getTypeMap(),r=(0,o.objectValues)(n).filter(a.isInputType);return(0,o.hintList)(e,r.map(e=>({label:e.name,documentation:e.description})))}(n,e);if("Directive"===i)return function(e,t,n){if(t.prevState&&t.prevState.kind){const r=n.getDirectives().filter(e=>(0,o.canUseDirective)(t.prevState,e));return(0,o.hintList)(e,r.map(e=>({label:e.name,documentation:e.description||""})))}return[]}(n,r,e);return[]}(n,e.getValue(),s),c=null!==s.type&&/"|\w/.test(s.string[0])?s.start:s.end,l={list:u.map(e=>({text:e.label,type:e.type,description:e.documentation,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason})),from:{line:r.line,column:c},to:{line:r.line,column:s.end}};return l&&l.list&&l.list.length>0&&(l.from=i.default.Pos(l.from.line,l.from.column),l.to=i.default.Pos(l.to.line,l.to.column),i.default.signal(e,"hasCompletion",e,l,s)),l})},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return y(i)||(i=l(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(g(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),D(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(C(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return e.stylize(Date.prototype.toString.call(n),"date");if(D(n))return p(n)}var c,E="",w=!1,S=["{","}"];(d(n)&&(w=!0,S=["[","]"]),C(n))&&(E=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(E=" "+RegExp.prototype.toString.call(n)),x(n)&&(E=" "+Date.prototype.toUTCString.call(n)),D(n)&&(E=" "+p(n)),0!==a.length||w&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=w?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,S)):S[0]+E+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return E(e)&&"[object RegExp]"===w(e)}function E(e){return"object"==typeof e&&null!==e}function x(e){return E(e)&&"[object Date]"===w(e)}function D(e){return E(e)&&("[object Error]"===w(e)||e instanceof Error)}function C(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(v(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=E,t.isDate=x,t.isError=D,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(380);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",A(),t.format.apply(t,arguments))},t.inherits=n(381),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var _="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(_&&e[_]){var t;if("function"!=typeof(t=e[_]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,_,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o{const n=t.schema;return(0,o.getDiagnostics)(e,n).map(e=>({message:e.message,severity:a[e.severity-1],type:s[e.source],from:i.default.Pos(e.range.start.line,e.range.start.character),to:i.default.Pos(e.range.end.line,e.range.end.character)}))})},function(e,t,n){"use strict";var r=n(20),i=s(n(16)),o=s(n(187)),a=n(189);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){const r=t.fieldDef.name;"__"!==r.slice(0,2)&&(p(e,t,n,t.parentType),d(e,".")),d(e,r,"field-name",n,(0,a.getFieldReference)(t))}function c(e,t,n){d(e,"@"+t.directiveDef.name,"directive-name",n,(0,a.getDirectiveReference)(t))}function l(e,t,n,r){d(e,": "),p(e,t,n,r)}function p(e,t,n,i){i instanceof r.GraphQLNonNull?(p(e,t,n,i.ofType),d(e,"!")):i instanceof r.GraphQLList?(d(e,"["),p(e,t,n,i.ofType),d(e,"]")):d(e,i.name,"type-name",n,(0,a.getTypeReference)(t,i))}function f(e,t,n){const r=n.description;if(r){const n=document.createElement("div");n.className="info-description",t.renderDescription?n.innerHTML=t.renderDescription(r):n.appendChild(document.createTextNode(r)),e.appendChild(n)}!function(e,t,n){const r=n.deprecationReason;if(r){const n=document.createElement("div");n.className="info-deprecation",t.renderDescription?n.innerHTML=t.renderDescription(r):n.appendChild(document.createTextNode(r));const i=document.createElement("span");i.className="info-deprecation-label",i.appendChild(document.createTextNode("Deprecated: ")),n.insertBefore(i,n.firstChild),e.appendChild(n)}}(e,t,n)}function d(e,t,n,r={onClick:null},i){if(n){const o=r.onClick;let a;o?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",e=>{o(i,e)})):a=document.createElement("span"),a.className=n,a.appendChild(document.createTextNode(t)),e.appendChild(a)}else e.appendChild(document.createTextNode(t))}n(384),i.default.registerHelper("info","graphql",(e,t)=>{if(!t.schema||!e.state)return;const n=e.state,r=n.kind,i=n.step,s=(0,o.default)(t.schema,e.state);if("Field"===r&&0===i&&s.fieldDef||"AliasedField"===r&&2===i&&s.fieldDef){const e=document.createElement("div");return function(e,t,n){u(e,t,n),l(e,t,n,t.type)}(e,s,t),f(e,t,s.fieldDef),e}if("Directive"===r&&1===i&&s.directiveDef){const e=document.createElement("div");return c(e,s,t),f(e,t,s.directiveDef),e}if("Argument"===r&&0===i&&s.argDef){const e=document.createElement("div");return function(e,t,n){t.directiveDef?c(e,t,n):t.fieldDef&&u(e,t,n);const r=t.argDef.name;d(e,"("),d(e,r,"arg-name",n,(0,a.getArgumentReference)(t)),l(e,t,n,t.inputType),d(e,")")}(e,s,t),f(e,t,s.argDef),e}if("EnumValue"===r&&s.enumValue&&s.enumValue.description){const e=document.createElement("div");return function(e,t,n){const r=t.enumValue.name;p(e,t,n,t.inputType),d(e,"."),d(e,r,"enum-value",n,(0,a.getEnumValueReference)(t))}(e,s,t),f(e,t,s.enumValue),e}if("NamedType"===r&&s.type&&s.type.description){const e=document.createElement("div");return p(e,s,t,s.type),f(e,t,s.type),e}})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r};function o(e,t){const n=e.state.info,r=t.target||t.srcElement;if("SPAN"!==r.nodeName||void 0!==n.hoverTimeout)return;const o=r.getBoundingClientRect(),a=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(u,c)},s=function(){i.default.off(document,"mousemove",a),i.default.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},u=function(){i.default.off(document,"mousemove",a),i.default.off(e.getWrapperElement(),"mouseout",s),n.hoverTimeout=void 0,function(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),r=e.state.info.options,o=r.render||e.getHelper(n,"info");if(o){const a=e.getTokenAt(n,!0);if(a){const s=o(a,r,e,n);s&&function(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.appendChild(n),document.body.appendChild(r);const o=r.getBoundingClientRect(),a=r.currentStyle||window.getComputedStyle(r),s=o.right-o.left+parseFloat(a.marginLeft)+parseFloat(a.marginRight),u=o.bottom-o.top+parseFloat(a.marginTop)+parseFloat(a.marginBottom);let c=t.bottom;u>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(c=t.top-u);c<0&&(c=t.bottom);let l,p=Math.max(0,window.innerWidth-s-15);p>t.left&&(p=t.left);r.style.opacity=1,r.style.top=c+"px",r.style.left=p+"px";const f=function(){clearTimeout(l)},d=function(){clearTimeout(l),l=setTimeout(h,200)},h=function(){i.default.off(r,"mouseover",f),i.default.off(r,"mouseout",d),i.default.off(e.getWrapperElement(),"mouseout",d),r.style.opacity?(r.style.opacity=0,setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r)},600)):r.parentNode&&r.parentNode.removeChild(r)};i.default.on(r,"mouseover",f),i.default.on(r,"mouseout",d),i.default.on(e.getWrapperElement(),"mouseout",d)}(e,t,s)}}}(e,o)},c=function(e){const t=e.state.info.options;return t&&t.hoverTime||500}(e);n.hoverTimeout=setTimeout(u,c),i.default.on(document,"mousemove",a),i.default.on(e.getWrapperElement(),"mouseout",s)}i.default.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.default.Init){const t=e.state.info.onMouseOver;i.default.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const n=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);n.onMouseOver=o.bind(null,e),i.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}})},function(e,t,n){"use strict";var r=a(n(16)),i=a(n(187)),o=n(189);function a(e){return e&&e.__esModule?e:{default:e}}n(386),r.default.registerHelper("jump","graphql",(e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const n=e.state,r=n.kind,a=n.step,s=(0,i.default)(t.schema,n);return"Field"===r&&0===a&&s.fieldDef||"AliasedField"===r&&2===a&&s.fieldDef?(0,o.getFieldReference)(s):"Directive"===r&&1===a&&s.directiveDef?(0,o.getDirectiveReference)(s):"Argument"===r&&0===a&&s.argDef?(0,o.getArgumentReference)(s):"EnumValue"===r&&s.enumValue?(0,o.getEnumValueReference)(s):"NamedType"===r&&s.type?(0,o.getTypeReference)(s):void 0})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r};function o(e,t){const n=t.target||t.srcElement;if("SPAN"!==n.nodeName)return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&c(e)}function a(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&l(e):e.state.jump.cursor=null}function s(e,t){if(e.state.jump.isHoldingModifier||t.key!==(u?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&c(e);const n=a=>{a.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&l(e),i.default.off(document,"keyup",n),i.default.off(document,"click",r),e.off("mousedown",o))},r=t=>{const n=e.state.jump.destination;n&&e.state.jump.options.onClick(n,t)},o=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};i.default.on(document,"keyup",n),i.default.on(document,"click",r),e.on("mousedown",o)}i.default.defineOption("jump",!1,(e,t,n)=>{if(n&&n!==i.default.Init){const t=e.state.jump.onMouseOver;i.default.off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;i.default.off(e.getWrapperElement(),"mouseout",n),i.default.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:o.bind(null,e),onMouseOut:a.bind(null,e),onKeyDown:s.bind(null,e)};i.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver),i.default.on(e.getWrapperElement(),"mouseout",n.onMouseOut),i.default.on(document,"keydown",n.onKeyDown)}});const u="undefined"!=typeof navigator&&navigator&&-1!==navigator.appVersion.indexOf("Mac");function c(e){if(e.state.jump.marker)return;const t=e.state.jump.cursor,n=e.coordsChar(t),r=e.getTokenAt(n,!0),i=e.state.jump.options,o=i.getDestination||e.getHelper(n,"jump");if(o){const t=o(r,i,e);if(t){const i=e.markText({line:n.line,ch:r.start},{line:n.line,ch:r.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=i,e.state.jump.destination=t}}}function l(e){const t=e.state.jump.marker;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(){this.sizes=[]}updateSizes(e){e.forEach((e,t)=>{const n=e.getClientHeight();t<=this.sizes.length&&n!==this.sizes[t]&&e.getCodeMirror().setSize(),this.sizes[t]=n})}}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&n.editor.execCommand("autocomplete")},n._onEdit=function(){n.ignoreChangeEvent||(n.cachedValue=n.editor.getValue(),n.props.onChange(n.cachedValue))},n._onHasCompletion=function(e,t){s.default(e,t,n.props.onHintInformationRender)},n.cachedValue=t.value||"",n.props.getRef&&n.props.getRef(n),n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=n(16);n(125),n(91),n(126),n(92),n(106),n(127),n(70),n(107),n(71),n(108),n(193),n(194),n(195),this.editor=t(this._node,{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!1,foldGutter:{minFoldSize:4},lint:{variableToType:this.props.variableToType?this.props.variableToType.toJS():void 0},hintOptions:{variableToType:this.props.variableToType?this.props.variableToType.toJS():void 0,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Shift-Ctrl-P":function(){e.props.prettifyQuery&&e.props.prettifyQuery()},"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)},t.prototype.componentDidUpdate=function(e){var t=n(16);this.ignoreChangeEvent=!0,this.props.variableToType!==e.variableToType&&(this.editor.options.lint.variableToType=this.props.variableToType?this.props.variableToType.toJS():void 0,this.editor.options.hintOptions.variableToType=this.props.variableToType?this.props.variableToType.toJS():void 0,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.componentWillUnmount=function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null},t.prototype.render=function(){var e=this;return a.createElement(y,{ref:function(t){e._node=t}})},t.prototype.getCodeMirror=function(){return this.editor},t.prototype.getClientHeight=function(){return this._node&&this._node.clientHeight},t}(a.PureComponent),h=p.createStructuredSelector({value:l.getVariables,variableToType:l.getVariableToType});t.VariableEditorComponent=u.connect(h,{onChange:c.editVariables})(d);var m=p.createStructuredSelector({value:l.getHeaders});t.HeadersEditorComponent=u.connect(m,{onChange:c.editHeaders})(d);var g,y=f.styled.div(g||(g=o(["\n flex: 1;\n height: 100%;\n position: relative;\n"],["\n flex: 1;\n height: 100%;\n position: relative;\n"])))},function(e,t,n){"use strict";function r(e,t){const n=e.filter(t);return 0===n.length?e:n}function i(e){return e.toLowerCase().replace(/\W/g,"")}function o(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){const a=function(e,t){if(!t)return r(e,e=>!e.isDeprecated);return r(r(e.map(e=>({proximity:o(i(e.text),t),entry:e})),e=>e.proximity<=2),e=>!e.entry.isDeprecated).sort((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.text.length-t.entry.text.length).map(e=>e.entry)}(n,i(t.string));if(!a)return;const s=null!==t.type&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:a,from:{line:e.line,column:s},to:{line:e.line,column:t.end}}}},function(e,t,n){"use strict";let r,i,o,a,s,u,c;function l(){const e=o,t=[];if(h("{"),!g("}")){do{t.push(p())}while(g(","));h("}")}return{kind:"Object",start:e,end:s,members:t}}function p(){const e=o,t="String"===c?d():null;h("String"),h(":");const n=f();return{kind:"Member",start:e,end:s,key:t,value:n}}function f(){switch(c){case"[":return function(){const e=o,t=[];if(h("["),!g("]")){do{t.push(f())}while(g(","));h("]")}return{kind:"Array",start:e,end:s,values:t}}();case"{":return l();case"String":case"Number":case"Boolean":case"Null":const e=d();return v(),e}return h("Value")}function d(){return{kind:c,start:o,end:a,value:JSON.parse(r.slice(o,a))}}function h(e){if(c===e)return void v();let t;if("EOF"===c)t="[end of file]";else if(a-o>1)t="`"+r.slice(o,a)+"`";else{const e=r.slice(o).match(/^.+?\b/);t="`"+(e?e[0]:r[o])+"`"}throw m("Expected ".concat(e," but found ").concat(t,"."))}function m(e){return{message:e,start:o,end:a}}function g(e){if(c===e)return v(),!0}function y(){a31;)if(92===u)switch(y(),u){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:y();break;case 117:y(),b(),b(),b(),b();break;default:throw m("Bad character escape sequence.")}else{if(a===i)throw m("Unterminated string.");y()}if(34===u)return void y();throw m("Unterminated string.")}();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c="Number",function(){45===u&&y();48===u?y():E();46===u&&(y(),E());69!==u&&101!==u||(y(),43!==u&&45!==u||y(),E())}();case 102:if("false"!==r.slice(o,o+5))break;return a+=4,y(),void(c="Boolean");case 110:if("null"!==r.slice(o,o+4))break;return a+=3,y(),void(c="Null");case 116:if("true"!==r.slice(o,o+4))break;return a+=3,y(),void(c="Boolean")}c=r[o],y()}else c="EOF"}function b(){if(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)return y();throw m("Expected hexadecimal digit.")}function E(){if(u<48||u>57)throw m("Expected decimal digit.");do{y()}while(u>=48&&u<=57)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){r=e,i=e.length,o=a=s=-1,y(),v();const t=l();return h("EOF"),t}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(404),a=n(405),s=n(30),u=n(28),c=n(32),l=n(11),p=new(n(101).ResponseRecord)({date:"",time:new Date,resultID:"default-id"}),f=u.createStructuredSelector({responses:c.getResponses});t.default=s.connect(f)((function(e){var t=e.setRef,n=e.responses,r=n.get(0)||p,s=n.size>1;return i.createElement(v,{ref:t,isSubscription:s},n.size<=1?i.createElement(b,{key:"first",isSubscription:s},n.size>1&&r.time&&i.createElement(E,null,i.createElement(x,null,o.default(r.time))),i.createElement(D,{isSubscription:s},i.createElement(a.ResultViewer,{value:r.date,isSubscription:s}))):n.map((function(e){return i.createElement(b,{key:e.resultID||String(e.time),isSubscription:s},n.size>1&&e.time&&i.createElement(E,null,i.createElement(x,null,o.default(e.time))),i.createElement(D,{isSubscription:n.size>1},i.createElement(a.ResultViewer,{value:e.date,isSubscription:s})))})))}));var d,h,m,g,y,v=l.styled("div")(d||(d=r(["\n flex: 1;\n height: ",";\n position: relative;\n overflow: ",";\n max-height: none !important;\n\n .cm-string {\n color: rgb(41, 185, 115);\n }\n\n .cm-def {\n color: rgb(241, 143, 1);\n }\n\n .cm-property {\n color: rgb(51, 147, 220);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n .CodeMirror {\n background: ",";\n }\n .CodeMirror-gutters {\n cursor: col-resize;\n }\n .CodeMirror-foldgutter,\n .CodeMirror-foldgutter-open:after,\n .CodeMirror-foldgutter-folded:after {\n padding-left: 3px;\n }\n"],["\n flex: 1;\n height: ",";\n position: relative;\n overflow: ",";\n max-height: none !important;\n\n .cm-string {\n color: rgb(41, 185, 115);\n }\n\n .cm-def {\n color: rgb(241, 143, 1);\n }\n\n .cm-property {\n color: rgb(51, 147, 220);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n .CodeMirror {\n background: ",";\n }\n .CodeMirror-gutters {\n cursor: col-resize;\n }\n .CodeMirror-foldgutter,\n .CodeMirror-foldgutter-open:after,\n .CodeMirror-foldgutter-folded:after {\n padding-left: 3px;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"auto":"visible"}),(function(e){return e.theme.editorColours.resultBackground})),b=l.styled("div")(h||(h=r(["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n flex-direction: column;\n &:not(:first-child):last-of-type {\n margin-bottom: 48px;\n }\n"],["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n flex-direction: column;\n &:not(:first-child):last-of-type {\n margin-bottom: 48px;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"})),E=l.styled.div(m||(m=r(["\n position: relative;\n height: 17px;\n margin-top: 12px;\n margin-bottom: 4px;\n &:before {\n position: absolute;\n width: 100%;\n content: '';\n top: 9px;\n left: 95px;\n border-top: 1px solid\n ",";\n }\n"],["\n position: relative;\n height: 17px;\n margin-top: 12px;\n margin-bottom: 4px;\n &:before {\n position: absolute;\n width: 100%;\n content: '';\n top: 9px;\n left: 95px;\n border-top: 1px solid\n ",";\n }\n"])),(function(e){return e.theme.editorColours.subscriptionTimeBoaderTop})),x=l.styled.div(g||(g=r(["\n font-size: 12px;\n color: ",";\n padding-left: 15px;\n"],["\n font-size: 12px;\n color: ",";\n padding-left: 15px;\n"])),(function(e){return e.theme.editorColours.subscriptionTimeText})),D=l.styled("div")(y||(y=r(["\n display: flex;\n flex: 1;\n height: ",";\n position: ",";\n"],["\n display: flex;\n flex: 1;\n height: ",";\n position: ",";\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"relative":"static"}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date,n=Math.abs(e.getTime()-t.getTime()),r=Math.floor(n/864e5),i=Math.floor(n%864e5/36e5),o=Math.round(n%864e5%36e5/6e4);if(r>0)return r+" days ago";if(i>0)return i+" h ago";if(o>0)return o+" min ago";var a=Math.round(n/1e3);return a+" sec"+(a>1?"s":"")+" ago"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setRef=function(e){t.node=e},t}return i(t,e),t.prototype.componentDidMount=function(){var e=n(16);n(106),n(92),n(71),n(186),n(70),n(107),n(108),n(406);var t=[];this.props.hideGutters||t.push("CodeMirror-foldgutter");var r={};this.props.hideGutters||(r={minFoldSize:4});var i=this.props.value||"";this.viewer=e(this.node,{lineWrapping:!0,value:i,readOnly:!0,theme:"graphiql",mode:"graphql-results",keyMap:"sublime",foldGutter:r,gutters:t,extraKeys:{"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}})},t.prototype.shouldComponentUpdate=function(e){return this.props.value!==e.value},t.prototype.componentDidUpdate=function(){var e=this.props.value||"";this.viewer.setValue(e)},t.prototype.componentWillUnmount=function(){this.viewer=null},t.prototype.render=function(){return a.createElement(l,{ref:this.setRef,isSubscription:this.props.isSubscription})},t.prototype.getCodeMirror=function(){return this.viewer},t.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},t}(a.Component);t.ResultViewer=u;var c,l=s.styled("div")(c||(c=o(["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n .CodeMirror {\n height: ",";\n position: ",";\n box-sizing: border-box;\n background: none;\n padding-left: 38px;\n }\n .CodeMirror-cursor {\n display: none !important;\n }\n .CodeMirror-scroll {\n overflow: scroll !important;\n margin-right: 10px;\n }\n .CodeMirror-sizer {\n margin-bottom: 0 !important;\n }\n .CodeMirror-lines {\n margin: 20px 0;\n padding: 0;\n }\n .cm-string {\n color: "," !important;\n }\n"],["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n .CodeMirror {\n height: ",";\n position: ",";\n box-sizing: border-box;\n background: none;\n padding-left: 38px;\n }\n .CodeMirror-cursor {\n display: none !important;\n }\n .CodeMirror-scroll {\n overflow: scroll !important;\n margin-right: 10px;\n }\n .CodeMirror-sizer {\n margin-bottom: 0 !important;\n }\n .CodeMirror-lines {\n margin: 20px 0;\n padding: 0;\n }\n .cm-string {\n color: "," !important;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"relative":"absolute%"}),(function(e){return e.theme.editorColours.property}))},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql-results",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:u,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},u={Document:[(0,o.p)("{"),(0,o.list)("Entry",(0,o.p)(",")),(0,o.p)("}")],Entry:[(0,o.t)("String","def"),(0,o.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,o.t)("Number","number")],StringValue:[(0,o.t)("String","string")],BooleanValue:[(0,o.t)("Keyword","builtin")],NullValue:[(0,o.t)("Keyword","keyword")],ListValue:[(0,o.p)("["),(0,o.list)("Value",(0,o.p)(",")),(0,o.p)("]")],ObjectValue:[(0,o.p)("{"),(0,o.list)("ObjectField",(0,o.p)(",")),(0,o.p)("}")],ObjectField:[(0,o.t)("String","property"),(0,o.p)(":"),"Value"]}},function(e,t,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a,s,u,c,l=n(3),p=n(408),f=n(103),d=n(28),h=n(32),m=n(30),g=f.default.div(a||(a=i(["\n padding-top: 6px;\n padding-left: 25px;\n padding-right: 25px;\n color: ",";\n overflow: auto;\n position: relative;\n height: 100%;\n"],["\n padding-top: 6px;\n padding-left: 25px;\n padding-right: 25px;\n color: ",";\n overflow: auto;\n position: relative;\n height: 100%;\n"])),(function(e){return e.theme.editorColours.text})),y=f.default.div(s||(s=i(["\n font-size: 14px;\n"],["\n font-size: 14px;\n"]))),v=f.default.div(u||(u=i(["\n font-size: 14px;\n color: rgba(241, 143, 1, 1);\n"],["\n font-size: 14px;\n color: rgba(241, 143, 1, 1);\n"]))),b=f.default.div(c||(c=i(["\n padding-left: 100px;\n padding-bottom: 100px;\n padding-top: 16px;\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n width: calc(100% + 100px);\n height: calc(100% + 116px);\n"],["\n padding-left: 100px;\n padding-bottom: 100px;\n padding-top: 16px;\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n width: calc(100% + 100px);\n height: calc(100% + 116px);\n"]))),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.tracing,n=e.tracingSupported,r=e.startTime,i=e.endTime,o=e.open,a=t&&r?Math.abs(new Date(t.startTime).getTime()-r.getTime()):0,s=t&&i?Math.abs(i.getTime()-new Date(t.endTime).getTime()):0,u=1e6*a;return l.createElement(g,null,t&&o?l.createElement(b,null,l.createElement(p.default,{path:["Request"],startOffset:0,duration:u}),t.execution.resolvers.map((function(e){return l.createElement(p.default,{key:e.path.join("."),path:e.path,startOffset:e.startOffset+u,duration:e.duration})})),l.createElement(p.default,{path:["Response"],startOffset:t.duration+u,duration:1e6*s})):n?l.createElement(y,null,this.props.queryRunning?"Running query ...":"Please re-run the query to show tracing results."):l.createElement(v,null,"This GraphQL server doesn’t support tracing. See the following page for instructions:",l.createElement("br",null),"https://github.com/apollographql/apollo-tracing"))},t}(l.PureComponent),x=d.createStructuredSelector({tracing:h.getTracing,startTime:h.getCurrentQueryStartTime,endTime:h.getCurrentQueryEndTime,tracingSupported:h.getTracingSupported,queryRunning:h.getQueryRunning});t.default=m.connect(x)(E)},function(e,t,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a,s,u,c,l,p=n(3),f=n(103),d=f.default.div(a||(a=i(["\n position: relative;\n font-size: 12px;\n display: table;\n padding-right: 25px;\n\n color: ",";\n"],["\n position: relative;\n font-size: 12px;\n display: table;\n padding-right: 25px;\n\n color: ",";\n"])),(function(e){return e.theme.editorColours.text})),h=f.default.span(s||(s=i(["\n display: inline-block;\n position: relative;\n margin: 0 10px;\n height: 1.5px;\n bottom: 4px;\n\n background: ",";\n"],["\n display: inline-block;\n position: relative;\n margin: 0 10px;\n height: 1.5px;\n bottom: 4px;\n\n background: ",";\n"])),(function(e){return e.theme.editorColours.text})),m=f.default.span(u||(u=i(["\n font-size: 10px;\n color: ",";\n"],["\n font-size: 10px;\n color: ",";\n"])),(function(e){return e.theme.editorColours.textInactive})),g=f.default.span(c||(c=i(["\n position: absolute;\n left: 0;\n transform: translateX(-100%);\n display: inline-flex;\n align-items: center;\n\n text-align: right;\n"],["\n position: absolute;\n left: 0;\n transform: translateX(-100%);\n display: inline-flex;\n align-items: center;\n\n text-align: right;\n"]))),y=f.default.span(l||(l=i(["\n margin-left: 10px;\n"],["\n margin-left: 10px;\n"]))),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={collapsed:!1},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.path,n=e.startOffset,r=e.duration,i=n/1e6,o=r/1e6;return p.createElement(d,{style:{transform:"translateX("+i+"px)"}},p.createElement(g,null,p.createElement(y,null,t.slice(-2).map((function(e,n){return p.createElement("span",{style:{opacity:n===t.slice(-2).length-1?1:.6},key:e},(n>0?".":"")+e)})))),p.createElement(h,{style:{width:Math.max(o,3)}}),p.createElement(m,null,this.printDuration(r)))},t.prototype.printDuration=function(e){var t=Math.round(e/1e3);return t>1e3?Math.round(t/1e3)+" ms":t+" µs"},t}(p.Component);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillLeafs=function(e,t,n){const a=[];if(!e)return{insertions:a,result:t};let s;try{s=(0,r.parse)(t)}catch(e){return{insertions:a,result:t}}const u=n||i,c=new r.TypeInfo(e);return(0,r.visit)(s,{leave(e){c.leave(e)},enter(e){if(c.enter(e),"Field"===e.kind&&!e.selectionSet){const n=function e(t,n){const i=(0,r.getNamedType)(t);if(!t||(0,r.isLeafType)(t))return;const o=n(i);if(!Array.isArray(o)||0===o.length)return;return{kind:"SelectionSet",selections:o.map(t=>{const r=i.getFields()[t],o=r?r.type:null;return{kind:"Field",name:{kind:"Name",value:t},selectionSet:e(o,n)}})}}(c.getType(),u);if(n){const i=function(e,t){let n=t,r=t;for(;n;){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.substring(n,r)}(t,e.loc.start);a.push({index:e.loc.end,string:" "+(0,r.print)(n).replace(/\n/g,"\n"+i)})}}}}),{insertions:a,result:o(t,a)}};var r=n(20);function i(e){if(!e.getFields)return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];return Object.keys(t).forEach(e=>{(0,r.isLeafType)(t[e].type)&&n.push(e)}),n}function o(e,t){if(0===t.length)return e;let n="",r=0;return t.forEach(({index:t,string:i})=>{n+=e.slice(r,t)+i,r=t}),n+=e.slice(r),n}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?n.setState({overflowY:!0}):n.setState({overflowY:!1})},n.setRef=function(e){n.node=e},n.state={overflowY:!1},n.cachedValue=e.value||"",n.props.getRef&&n.props.getRef(n),n}return i(r,t),r.prototype.componentDidMount=function(){var t=n(16);n(92),n(185),n(190);var r=[];r.push("CodeMirror-linenumbers"),this.editor=t(this.node,{autofocus:!1,value:l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])||"",lineNumbers:!1,showCursorWhenSelecting:!1,tabSize:1,mode:"graphql",theme:"graphiql",keyMap:"sublime",readOnly:!0,gutters:r}),e.editor=this.editor,this.editor.on("scroll",this.handleScroll),this.editor.refresh()},r.prototype.componentDidUpdate=function(e){var t=n(16);if((this.props.schema&&s.printSchema(this.props.schema))!==(e.schema&&s.printSchema(e.schema))){var r=this.editor.getScrollInfo();this.cachedValue=l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])||"",this.editor.setValue(l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])),this.props.isPollingSchema&&this.editor.scrollTo(r.left,r.top),t.signal(this.editor,"change",this.editor)}this.props.width!==e.width&&this.editor.refresh(),this.props.settings["schema.disableComments"]!==e.settings["schema.disableComments"]&&this.editor.refresh()},r.prototype.UNSAFE_componentWillReceiveProps=function(e){this.props.sessionId!==e.sessionId&&this.editor.scrollTo(0,0)},r.prototype.componentWillUnmount=function(){this.editor&&(this.editor.off("scroll"),this.editor=null)},r.prototype.render=function(){var e=this.state.overflowY;return a.createElement(u.default,null,e&&a.createElement(m,null),a.createElement(h,{ref:this.setRef}))},r.prototype.getCodeMirror=function(){return this.editor},r.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},r}(a.PureComponent);t.default=p;var f,d,h=c.styled.div(f||(f=o(["\n flex: 1;\n height: auto;\n overflow-x: hidden;\n overflow-y: scroll;\n .CodeMirror {\n background: ",";\n padding-left: 20px;\n }\n"],["\n flex: 1;\n height: auto;\n overflow-x: hidden;\n overflow-y: scroll;\n .CodeMirror {\n background: ",";\n padding-left: 20px;\n }\n"])),(function(e){return"dark"===e.theme.mode?e.theme.editorColours.editorBackground:"white"})),m=c.styled.div(d||(d=o(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);\n z-index: 1000;\n"],["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);\n z-index: 1000;\n"])))}).call(this,n(43))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(60),u=n(30),c=n(198),l=n(416),p=n(206),f=n(74),d=n(129),h=n(68),m=n(470),g=n(89),y=n(75),v=n(32),b=n(28),E=n(199),x=n(11),D=function(e){function t(t){var n=e.call(this,t)||this;return n.setRef=function(e){n.ref=e},n.showDocFromType=function(e){n.props.addStack(n.props.sessionId,e,0,0)},n.handleSearch=function(e){n.setState({searchValue:e})},n.handleKeyDown=function(e){if(!(e.target instanceof HTMLInputElement||e.metaKey||e.shiftKey||e.altKey||e.ctrlKey)){e.preventDefault(),n.props.changeKeyMove(n.props.sessionId,!0);var t=n.props.docs.navStack.length>0&&n.props.docs.navStack[n.props.docs.navStack.length-1],r=n.props.docs.navStack.length>0&&n.props.docs.navStack[n.props.docs.navStack.length-2],i=c(e);switch(i){case"esc":n.props.setDocsVisible(n.props.sessionId,!1);break;case"left":r&&n.props.addStack(n.props.sessionId,r.field,r.x,r.y);break;case"right":if(t){var o=g.serialize(n.props.schema,t.field),a=g.getElement(o,0);a&&n.props.addStack(n.props.sessionId,a,t.x+1,0)}else{o=g.serializeRoot(n.props.schema);(s=g.getElementRoot(o,0))&&n.props.addStack(n.props.sessionId,s,0,0)}break;case"up":case"down":if(r){o=g.serialize(n.props.schema,r.field);(s=g.getElement(o,"up"===i?t.y-1:t.y+1))&&n.props.addStack(n.props.sessionId,s,t.x,"up"===i?t.y-1:t.y+1)}else{o=g.serializeRoot(n.props.schema);var s,u=t?t.y:0;(s=g.getElementRoot(o,"up"===i?u-1:u+1))&&n.props.addStack(n.props.sessionId,s,0,"up"===i?u-1:u+1)}}}},n.state={searchValue:"",widthMap:{}},window.d=n,n}return i(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){(this.props.docs.navStack.length!==e.docs.navStack.length||this.props.docs.navStack.slice(-1)[0]!==e.docs.navStack.slice(-1)[0]||!this.props.schema&&e.schema)&&this.setWidth(e)},t.prototype.setWidth=function(e){void 0===e&&(e=this.props),this.props.setWidth(e)},t.prototype.getWidth=function(e){var t=this;void 0===e&&(e=this.props);var n=this.state.widthMap.root||h.columnWidth,r=e.docs.navStack.map((function(e){return t.state.widthMap[e.field.path]||h.columnWidth}));return[n].concat(r).reduce((function(e,t){return e+t}),0)},t.prototype.componentDidMount=function(){this.setWidth()},t.prototype.render=function(){var e,t=this,n=this.props.docs.navStack,r=this.props.schema;return void 0===r?e=a.createElement(d.default,null):null===r&&(e=a.createElement(E.ErrorContainer,null,"No Schema Available")),a.createElement(S,{onKeyDown:this.handleKeyDown,tabIndex:0,ref:this.setRef},e&&a.createElement(p.default,null,e),!e&&r&&a.createElement(m.default,{schema:r,width:this.state.widthMap.root||h.columnWidth-1,searchValue:this.state.searchValue,handleSearch:this.handleSearch,sessionId:this.props.sessionId}),n.map((function(e,n){return a.createElement(p.default,{key:n,width:t.state.widthMap[e.field.path]||h.columnWidth},a.createElement(l.default,{schema:r,field:e.field,level:n+1,sessionId:t.props.sessionId}))})))},t}(a.Component),C=b.createStructuredSelector({docs:y.getSessionDocs,sessionId:v.getSelectedSessionIdFromRoot});t.default=u.connect(C,(function(e){return s.bindActionCreators({addStack:f.addStack,toggleDocs:f.toggleDocs,changeWidthDocs:f.changeWidthDocs,changeKeyMove:f.changeKeyMove,setDocsVisible:f.setDocsVisible},e)}),null,{forwardRef:!0})(D);var w,S=x.styled.div(w||(w=o(["\n display: flex;\n position: relative;\n height: 100%;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n outline: none !important;\n"],["\n display: flex;\n position: relative;\n height: 100%;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n outline: none !important;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(417),u=n(20),c=n(419),l=n(77),p=n(466),f=n(467),d=n(468),h=n(469),m=n(89),g=n(205),y=n(11),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDeprecated:!1},t.setRef=function(e){t.ref=e},t}return i(t,e),t.prototype.componentDidMount=function(){this.scrollToRight()},t.prototype.shouldComponentUpdate=function(e){return this.props.field!==e.field&&(this.scrollToRight(),!0)},t.prototype.scrollToRight=function(){var e=this.ref,t=e.parentNode&&e.parentNode.parentNode;x(t,t.scrollWidth,50)},t.prototype.render=function(){var e=this,t=this.props,n=t.schema,r=t.field,i=t.level,o=r.type||r,c=m.serialize(n,r);o=m.getDeeperType(o);var y,v=c.fields.length+c.interfaces.length,b=c.fields.length+c.interfaces.length+c.args.length;return y=o instanceof u.GraphQLInterfaceType?"interface":o instanceof u.GraphQLUnionType?"union":o instanceof u.GraphQLEnumType?"enum":"type",a.createElement("div",{ref:this.setRef},a.createElement(D,null,a.createElement(l.default,{type:r,x:i,y:-1,clickable:!1,lastActive:!1})),a.createElement(C,{className:"doc-type-description",markdown:r.description||""}),a.createElement(g.CategoryTitle,null,y+" details"),o.description&&o.description.length>0&&a.createElement(C,{markdown:o.description||""}),o instanceof u.GraphQLScalarType&&a.createElement(f.default,{type:o}),o instanceof u.GraphQLEnumType&&a.createElement(d.default,{type:o}),o instanceof u.GraphQLUnionType&&a.createElement(h.default,{type:o,schema:n,level:i,sessionId:this.props.sessionId}),c.fields&&c.fields.length>0&&a.createElement(p.default,{type:o,fields:c.fields,interfaces:c.interfaces,level:i,sessionId:this.props.sessionId}),c.args&&c.args.length>0&&a.createElement("div",null,a.createElement(g.CategoryTitle,null,"arguments"),c.args.map((function(t,n){return a.createElement("div",{key:t.name},a.createElement("div",null,a.createElement(s.default,{arg:t,x:i,y:n+v,sessionId:e.props.sessionId})))}))),c.implementations&&c.implementations.length>0&&a.createElement("div",null,a.createElement(g.CategoryTitle,null,"implementations"),c.implementations.map((function(e,t){return a.createElement(l.default,{key:e.name,type:e,x:i,y:t+b,collapsable:!0,lastActive:!1})}))))},t}(a.Component);t.default=v;var b,E,x=function e(t,n,r){if(!(r<=0)){var i=(n-t.scrollLeft)/r*10;setTimeout((function(){t.scrollLeft=t.scrollLeft+i,t.scrollLeft!==n&&e(t,n,r-10)}),10)}},D=y.styled.div(b||(b=o(["\n background: ",";\n padding-top: 20px;\n padding-bottom: 10px;\n\n .doc-category-item {\n font-size: 14px;\n font-weight: 600;\n word-wrap: break-word;\n }\n .doc-category-item .field-name {\n color: #f25c54;\n }\n div {\n background: transparent;\n pointer-events: none;\n }\n"],["\n background: ",";\n padding-top: 20px;\n padding-bottom: 10px;\n\n .doc-category-item {\n font-size: 14px;\n font-weight: 600;\n word-wrap: break-word;\n }\n .doc-category-item .field-name {\n color: #f25c54;\n }\n div {\n background: transparent;\n pointer-events: none;\n }\n"])),(function(e){return e.theme.colours.black02})),C=y.styled(c.default)(E||(E=o(["\n font-size: 14px;\n padding: 0 16px 20px 16px;\n color: rgba(0, 0, 0, 0.5);\n"],["\n font-size: 14px;\n padding: 0 16px 20px 16px;\n color: rgba(0, 0, 0, 0.5);\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(20),o=n(77);t.default=function(e){var t=e.arg,n=e.showDefaultValue,a=e.x,s=e.y;return r.createElement("span",null,r.createElement(o.default,{type:t,x:a,y:s,lastActive:!1,afterNode:void 0!==t.defaultValue&&!1!==n&&r.createElement("span",null," = ",r.createElement("span",{className:"arg-default-value"},i.print(i.astFromValue(t.defaultValue,t.type))))}))}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(20),a=n(11);t.default=function(e){var t=e.arg,n=e.showDefaultValue;return i.createElement(u,null,i.createElement("span",{className:"arg-name"},t.name),": ",i.createElement("span",{className:"type-name"},function e(t){if(t instanceof o.GraphQLNonNull)return i.createElement("span",null,e(t.ofType),"!");if(t instanceof o.GraphQLList)return i.createElement("span",null,"[",e(t.ofType),"]");return i.createElement("span",null,t.name)}(t.type)),void 0!==t.defaultValue&&!1!==n&&i.createElement("span",null," = ",i.createElement("span",{className:"arg-default-value"},o.print(o.astFromValue(t.defaultValue,t.type)))))};var s,u=a.styled.div(s||(s=r(["\n margin-left: 16px;\n"],["\n margin-left: 16px;\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),i=o(n(7));function o(e){return e&&e.__esModule?e:{default:e}}const a=new(o(n(420)).default);class s extends r.default.Component{shouldComponentUpdate(e){return this.props.markdown!==e.markdown}render(){const e=this.props.markdown;return e?r.default.createElement("div",{className:this.props.className,dangerouslySetInnerHTML:{__html:a.render(e)}}):r.default.createElement("div",null)}}var u,c,l;t.default=s,u=s,c="propTypes",l={markdown:i.default.string,className:i.default.string},c in u?Object.defineProperty(u,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):u[c]=l},function(e,t,n){"use strict";e.exports=n(421)},function(e,t,n){"use strict";var r=n(23),i=n(423),o=n(427),a=n(428),s=n(436),u=n(450),c=n(178),l=n(105),p=n(179),f={default:n(463),zero:n(464),commonmark:n(465)},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!d.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function y(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return l.encode(l.format(t))}function v(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return l.decode(l.format(t))}function b(e,t){if(!(this instanceof b))return new b(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new u,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=m,this.normalizeLink=y,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return r.assign(this.options,e),this},b.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=f[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e,t,n){"use strict";t.parseLinkLabel=n(424),t.parseLinkDestination=n(425),t.parseLinkTitle=n(426)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s=-1,u=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos=n)return u;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return u;for(t++,40===o&&(o=41);t"+o(e[t].content)+""},a.code_block=function(e,t,n,r,i){var a=e[t];return""+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,u,c,l,p=e[t],f=p.info?i(p.info).trim():"",d="";return f&&(d=f.split(/\s+/g)[0]),0===(s=n.highlight&&n.highlight(p.content,d)||o(p.content)).indexOf(""+s+"\n"):"
    "+s+"
    \n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}e.exports=function(e){var t,n,o,a,s,u,c,l,p,f,d,h,m,g,y,v,b,E,x=e.tokens;if(e.md.options.linkify)for(n=0,o=x.length;n=0;t--)if("link_close"!==(u=a[t]).type){if("html_inline"===u.type&&(E=u.content,/^\s]/i.test(E)&&m>0&&m--,i(u.content)&&m++),!(m>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(p=u.content,b=e.md.linkify.match(p),c=[],h=u.level,d=0,l=0;ld&&((s=new e.Token("text","",0)).content=p.slice(d,f),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",y]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),d=b[l].lastIndex);d=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(o,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(e){var t,n,i=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||i||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(i.test(e.tokens[t].content)&&u(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(23).isWhiteSpace,i=n(23).isPunctChar,o=n(23).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,a,c,l,p,f,d,h,m,g,y,v,b,E,x,D,C,w,S,k,A;for(S=[],n=0;n=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===a.type){p=0,f=(c=a.content).length;e:for(;p=0)m=c.charCodeAt(l.index-1);else for(C=n-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if("text"===e[C].type){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,p=48&&m<=57&&(D=x=!1),x&&D&&(x=!1,D=v),x||D){if(D)for(C=S.length-1;C>=0&&(h=S[C],!(S[C].level=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(131);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(130),i=[["table",n(437),["paragraph","reference"]],["code",n(438)],["fence",n(439),["paragraph","reference","blockquote","list"]],["blockquote",n(440),["paragraph","reference","blockquote","list"]],["hr",n(441),["paragraph","reference","blockquote","list"]],["list",n(442),["paragraph","reference","blockquote"]],["reference",n(443)],["heading",n(444),["paragraph","reference","blockquote"]],["lheading",n(445)],["html_block",n(446),["paragraph","reference","blockquote"]],["paragraph",n(448)]];function o(){this.ruler=new r;for(var e=0;e=n))&&!(e.sCount[a]=u){e.line=n;break}for(r=0;rn)return!1;if(p=t+1,e.sCount[p]=4)return!1;if((c=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(s=e.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c=4)return!1;if((d=(f=o(u.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(a)return!0;for((h=e.push("table_open","table",1)).map=y=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l=4);p++){for(f=o(u.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),l=0;l=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c,l,p=!1,f=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>d)return!1;if(126!==(i=e.src.charCodeAt(f))&&96!==i)return!1;if(u=f,(o=(f=e.skipChars(f,i))-u)<3)return!1;if(l=e.src.slice(u,f),a=e.src.slice(f,d),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((f=u=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.sCount[s]=4||(f=e.skipChars(f,i))-u=4)return!1;if(62!==e.src.charCodeAt(k++))return!1;if(i)return!0;for(u=d=e.sCount[t]+k-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(k)?(k++,u++,d++,o=!1,E=!0):9===e.src.charCodeAt(k)?(E=!0,(e.bsCount[t]+d)%4==3?(k++,u++,d++,o=!1):o=!0):E=!1,h=[e.bMarks[t]],e.bMarks[t]=k;k=A,v=[e.sCount[t]],e.sCount[t]=d-u,b=[e.tShift[t]],e.tShift[t]=k-e.bMarks[t],D=e.md.block.ruler.getRules("blockquote"),y=e.parentType,e.parentType="blockquote",w=!1,f=t+1;f=(A=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(k++)||w){if(l)break;for(x=!1,s=0,c=D.length;s=A,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(E?1:0),v.push(e.sCount[f]),e.sCount[f]=d-u,b.push(e.tShift[f]),e.tShift[f]=k-e.bMarks[f]}for(g=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=p=[t,0],e.md.block.tokenize(e,t,f),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=y,p[1]=e.line,s=0;s=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c=a)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(M=!0),(T=o(e,t))>=0){if(f=!0,O=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(O,T-O-1)),M&&1!==v)return!1}else{if(!((T=i(e,t))>=0))return!1;f=!1}if(M&&e.skipSpaces(T)>=e.eMarks[t])return!1;if(y=e.src.charCodeAt(T-1),r)return!0;for(g=e.tokens.length,f?(I=e.push("ordered_list_open","ol",1),1!==v&&(I.attrs=[["start",v]])):I=e.push("bullet_list_open","ul",1),I.map=m=[t,0],I.markup=String.fromCharCode(y),E=t,_=!1,N=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";E=b?1:x-p)>4&&(l=1),c=p+l,(I=e.push("list_item_open","li",1)).markup=String.fromCharCode(y),I.map=d=[t,0],k=e.tight,S=e.tShift[t],w=e.sCount[t],D=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!_||(j=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=D,e.tShift[t]=S,e.sCount[t]=w,e.tight=k,(I=e.push("list_item_close","li",-1)).markup=String.fromCharCode(y),E=t=e.line,d[1]=E,s=e.bMarks[t],E>=n)break;if(e.sCount[E]=4)break;for(F=!1,u=0,h=N.length;u=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[S]<0)){for(b=!1,p=0,f=E.length;p=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=l)return!1;for(a=1,o=e.src.charCodeAt(++c);35===o&&c6||cc&&r(e.src.charCodeAt(s-1))&&(l=s),e.line=t+1,(u=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[t,e.line],(u=e.push("inline","",0)).content=e.src.slice(c,l).trim(),u.map=[t,e.line],u.children=[],(u=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,u,c,l,p,f,d=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";d3)){if(e.sCount[d]>=e.blkIndent&&(u=e.bMarks[d]+e.tShift[d])<(c=e.eMarks[d])&&(45===(p=e.src.charCodeAt(u))||61===p)&&(u=e.skipChars(u,p),(u=e.skipSpaces(u))>=c)){l=61===p?1:2;break}if(!(e.sCount[d]<0)){for(i=!1,o=0,a=h.length;o|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(u=e.src.slice(c,l),i=0;i3||e.sCount[u]<0)){for(r=!1,i=0,o=c.length;i0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,u,c,l,p,f=e;if(e>=t)return"";for(l=new Array(t-e),o=0;fn?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(130),i=[["text",n(451)],["newline",n(452)],["escape",n(453)],["backticks",n(454)],["strikethrough",n(203).tokenize],["emphasis",n(204).tokenize],["link",n(455)],["image",n(456)],["autolink",n(457)],["html_inline",n(458)],["entity",n(459)]],o=[["balance_pairs",n(460)],["strikethrough",n(203).postProcess],["emphasis",n(204).postProcess],["text_collapse",n(461)]];function a(){var e;for(this.ruler=new r,e=0;e=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=m)return!1;for(g=c,(l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?c=l.pos:d=""),g=c;c=m||41!==e.src.charCodeAt(c))&&(y=!0),c++}if(y){if(void 0===e.env.references)return!1;if(c=0?a=e.src.slice(g,c++):c=s+1):c=s+1,a||(a=e.src.slice(u,s)),!(p=e.env.references[r(a)]))return e.pos=h,!1;d=p.href,f=p.title}return t||(e.pos=u,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],f&&n.push(["title",f]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(23).normalizeReference,i=n(23).isSpace;e.exports=function(e,t){var n,o,a,s,u,c,l,p,f,d,h,m,g,y="",v=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=u+1)=b)return!1;for(g=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(y=e.md.normalizeLink(f.str),e.md.validateLink(y)?l=f.pos:y=""),g=l;l=b||41!==e.src.charCodeAt(l))return e.pos=v,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?s=e.src.slice(g,l++):l=u+1):l=u+1,s||(s=e.src.slice(c,u)),!(p=e.env.references[r(s)]))return e.pos=v,!1;y=p.href,d=p.title}return t||(a=e.src.slice(c,u),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",y],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=b,!0}},function(e,t,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,i=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,o,a,s,u,c,l=e.pos;return 60===e.src.charCodeAt(l)&&(!((n=e.src.slice(l)).indexOf(">")<0)&&(i.test(n)?(s=(o=n.match(i))[0].slice(1,-1),u=e.md.normalizeLink(s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=o[0].length,!0)):!!r.test(n)&&(s=(a=n.match(r))[0].slice(1,-1),u=e.md.normalizeLink("mailto:"+s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(202).HTML_TAG_RE;e.exports=function(e,t){var n,i,o,a=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(i=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(201),i=n(23).has,o=n(23).isValidEntityCode,a=n(23).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1a;r-=o.jump+1)if((o=t[r]).marker===i.marker&&(-1===s&&(s=r),o.open&&o.end<0&&o.level===i.level&&(u=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(u=!0)),!u))){c=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+c,i.open=!1,o.end=n,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(l[i.marker][(i.length||0)%3]=s)}}e.exports=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(0,e.delimiters),t=0;t0&&r++,"text"===i[t].type&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var n,r,s,u,c,l,p,f,d,h=e,m=!0,g=!0,y=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h0&&o.createElement("br",null),c.map((function(e,t){return o.createElement("div",{key:e.name},o.createElement(v,null,"# Deprecated: ",e.deprecationReason),o.createElement(a.default,{type:e,x:s,y:t+u.length+r.length,collapsable:!0,lastActive:!1}))})),o.createElement(m,null,o.createElement(b,null,"}")))};var u,c,l,p,f,d,h=s.styled.div(u||(u=r(["\n font-size: 14px;\n overflow: auto;\n .doc-category-item {\n padding-left: 32px;\n }\n"],["\n font-size: 14px;\n overflow: auto;\n .doc-category-item {\n padding-left: 32px;\n }\n"]))),m=s.styled.div(c||(c=r(["\n padding: 6px 16px;\n white-space: nowrap;\n"],["\n padding: 6px 16px;\n white-space: nowrap;\n"]))),g=s.styled.span(l||(l=r(["\n color: #f25c54;\n"],["\n color: #f25c54;\n"]))),y=s.styled(a.default)(p||(p=r(["\n padding-left: 16px;\n .field-name {\n color: rgb(245, 160, 0);\n }\n .type-name {\n color: #f25c54;\n }\n"],["\n padding-left: 16px;\n .field-name {\n color: rgb(245, 160, 0);\n }\n .type-name {\n color: #f25c54;\n }\n"]))),v=s.styled.p(f||(f=r(["\n color: ",";\n padding-right: 16px;\n padding-left: 32px;\n"],["\n color: ",";\n padding-right: 16px;\n padding-left: 32px;\n"])),(function(e){return e.theme.colours.black50})),b=s.styled.span(d||(d=r(["\n font-weight: 600;\n color: ",";\n"],["\n font-weight: 600;\n color: ",";\n"])),(function(e){return e.theme.colours.darkBlue50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(132);t.default=function(e){var t=e.type;return r.createElement(i.DocType,{className:"doc-type-schema"},r.createElement("span",{className:"field-name"},"scalar")," ",r.createElement("span",{className:"type-name"},t.name))}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(11),a=n(132);t.default=function(e){var t=e.type,n=e.sdlType?t._values:t.getValues(),r=n.filter((function(e){return e.isDeprecated}));return i.createElement(a.DocType,{className:"doc-type-schema"},i.createElement("span",{className:"field-name"},"enum")," ",i.createElement("span",{className:"type-name"},t.name)," ",i.createElement("span",{className:"brace"},"{"),n.filter((function(e){return!e.isDeprecated})).map((function(e,t){return i.createElement(c,{key:e.name,first:0===t,value:e})})),r.length>0&&i.createElement("br",null),r.map((function(e,t){return i.createElement(c,{first:0===t,key:e.name,value:e,isDeprecated:!0})})),i.createElement("span",{className:"brace"},"}"))};var s,u,c=function(e){var t=e.value,n=e.isDeprecated,r=e.first;return i.createElement(l,{first:r},i.createElement("div",{className:"field-name"},t.name),t.description&&i.createElement(p,null,t.description),n&&i.createElement(p,null,"Deprecated: ",t.deprecationReason))},l=o.styled("div")(s||(s=r(["\n margin-top: ","px;\n .field-name {\n padding: 0 16px;\n color: red;\n }\n"],["\n margin-top: ","px;\n .field-name {\n padding: 0 16px;\n color: red;\n }\n"])),(function(e){return e.first?0:6})),p=o.styled.div(u||(u=r(["\n padding: 0 16px;\n color: ",";\n"],["\n padding: 0 16px;\n color: ",";\n"])),(function(e){return e.theme.colours.black50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77),i=n(3),o=n(132);t.default=function(e){var t=e.schema,n=e.type,a=e.level,s=e.sessionId,u=t.getPossibleTypes(n);return i.createElement(o.DocType,{className:"doc-type-schema"},i.createElement("span",{className:"field-name"},"union")," ",i.createElement("span",{className:"type-name"},n.name)," = ",u.map((function(e,t){return i.createElement(r.default,{key:e.name,type:e,x:a,y:t+1,collapsable:!0,sessionId:s,lastActive:!1})})))}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(206),u=n(471),c=n(472),l=n(207),p=n(11),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.searchValue,n=e.schema,r=e.width,i=e.sessionId,o=e.handleSearch;return a.createElement(s.default,{width:r,overflow:!1},a.createElement(l.default,{onSearch:o}),a.createElement(h,null,t&&a.createElement(u.default,{searchValue:t,schema:n,level:0,sessionId:i}),!t&&a.createElement(c.default,{schema:n,sessionId:i})))},t}(a.PureComponent);t.default=f;var d,h=p.styled.div(d||(d=o(["\n overflow: auto;\n"],["\n overflow: auto;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(77),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue},t.prototype.render=function(){var e=this.props.level,t=this.props.searchValue,n=this.props.withinType,r=this.props.schema,i=[],o=[],s=[],c=r.getTypeMap(),p=Object.keys(c);n&&(p=p.filter((function(e){return e!==n.name}))).unshift(n.name);for(var d=0,h=function(r){if(i.length+o.length+s.length>=100)return"break";var p=c[r];if(n!==p&&l(r,t)&&o.push(a.createElement("div",{className:"doc-category-item",key:r},a.createElement(u.default,{type:p,x:e,y:d++,lastActive:!1}))),p.getFields){var f=p.getFields();Object.keys(f).forEach((function(o){var c=f[o];if(c.parent=p,!l(o,t)){if(!c.args||!c.args.length)return;if(0===c.args.filter((function(e){return l(e.name,t)})).length)return}var h=a.createElement("div",{className:"doc-category-item",key:r+"."+o},a.createElement(u.default,{key:"type",type:c,x:e,y:d++,showParentName:!0,lastActive:!1}));n===p?i.push(h):s.push(h)}))}},m=0,g=p;m0?a.createElement("div",null,i,a.createElement("div",{className:"doc-category"},a.createElement("div",{className:"doc-category-title"},"other results"),o,s)):a.createElement("div",null,i,o,s)},t}(a.Component);function l(e,t){try{var n=t.replace(/[^_0-9A-Za-z]/g,(function(e){return"\\"+e}));return-1!==e.search(new RegExp(n,"i"))}catch(n){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}}t.default=c;var p,f=s.styled.span(p||(p=o(["\n display: block;\n margin-top: 16px;\n margin-left: 16px;\n"],["\n display: block;\n margin-top: 16px;\n margin-left: 16px;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(77),u=n(89),c=n(205),l=n(11),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.schema,n=e.sessionId,r=u.serializeRoot(t);return a.createElement(m,{className:"doc-root"},a.createElement(f,{name:"Queries",fields:r.queries,offset:0,sessionId:n}),r.mutations.length>0&&a.createElement(f,{name:"Mutations",fields:r.mutations,offset:r.queries.length,sessionId:n}),r.subscriptions.length>0&&a.createElement(f,{name:"Subscriptions",fields:r.subscriptions,offset:r.queries.length+r.mutations.length,sessionId:n}))},t}(a.PureComponent);function f(e){var t=e.name,n=e.fields,r=e.offset,i=n.filter((function(e){return!e.isDeprecated})),o=n.filter((function(e){return e.isDeprecated}));return a.createElement("div",null,a.createElement(c.CategoryTitle,null,t),i.map((function(e,t){return a.createElement(s.default,{key:e.name,type:e,x:0,y:r+t,collapsable:!0,lastActive:!1})})),o.length>0&&a.createElement("br",null),o.map((function(e,t){return a.createElement("div",{key:e.name},a.createElement(g,null,"# Deprecated: ",e.deprecationReason),a.createElement(s.default,{type:e,x:0,y:r+t+i.length,collapsable:!0,lastActive:!1}))})))}t.default=p;var d,h,m=l.styled.div(d||(d=o(["\n padding-left: 6px;\n\n .doc-category-item .field-name {\n color: #f25c54;\n }\n"],["\n padding-left: 6px;\n\n .doc-category-item .field-name {\n color: #f25c54;\n }\n"]))),g=l.styled.p(h||(h=o(["\n color: ",";\n padding-right: 16px;\n padding-left: 16px;\n"],["\n color: ",";\n padding-right: 16px;\n padding-left: 16px;\n"])),(function(e){return e.theme.colours.black50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n;return function(){clearTimeout(n),n=setTimeout(()=>{n=null,t.apply(this,arguments)},e)}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(52),c=n(475),l=n(30),p=n(28),f=n(32),d=n(38),h=n(157),m=h.SortableElement(c.default),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={sorting:!1},t.onSortStart=function(e){e.index;t.setState({sorting:!0})},t.onSortEnd=function(e){var n=e.oldIndex,r=e.newIndex;t.props.reorderTabs(n,r),t.setState({sorting:!1})},t.getHelperDimensions=function(e){var t=e.node.getBoundingClientRect();return{width:t.width,height:t.height}},t}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.sessions,n=e.isApp,r=e.selectedSessionId,i=e.onNewSession,o=this.state.sorting;return a.createElement(D,{onSortStart:this.onSortStart,onSortEnd:this.onSortEnd,getHelperDimensions:this.getHelperDimensions,axis:"x",lockAxis:"x",lockToContainerEdges:!0,distance:10,transitionDuration:200},a.createElement(C,{isApp:n},t.map((function(e,t){return a.createElement(m,{key:e.id,session:e,selectedSessionId:r,index:t})})),a.createElement(w,{onClick:i,sorting:o},a.createElement(u.AddIcon,{width:34,height:34,strokeWidth:4,title:"Opens a New Tab"}))))},t}(a.PureComponent),y=p.createStructuredSelector({sessions:f.getSessionsArray,selectedSessionId:f.getSelectedSessionIdFromRoot});t.default=l.connect(y,{reorderTabs:d.reorderTabs})(g);var v,b,E,x=s.styled.div(v||(v=o(["\n color: white;\n height: 57px;\n background: ",";\n overflow: hidden;\n -webkit-app-region: drag;\n &:hover {\n overflow-x: overlay;\n }\n"],["\n color: white;\n height: 57px;\n background: ",";\n overflow: hidden;\n -webkit-app-region: drag;\n &:hover {\n overflow-x: overlay;\n }\n"])),(function(e){return e.theme.editorColours.background})),D=h.SortableContainer(x),C=s.styled("div")(b||(b=o(["\n display: flex;\n align-items: center;\n margin-top: 16px;\n padding-left: ",";\n"],["\n display: flex;\n align-items: center;\n margin-top: 16px;\n padding-left: ",";\n"])),(function(e){return e.isApp?"43px":"0"})),w=s.styled("div")(E||(E=o(["\n -webkit-app-region: no-drag;\n box-sizing: border-box;\n display: flex;\n visibility: ","\n height: 43px;\n width: 43px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n background: ",";\n justify-content: center;\n align-items: center;\n svg {\n stroke: ",";\n }\n &:hover {\n background: ",";\n }\n"],["\n -webkit-app-region: no-drag;\n box-sizing: border-box;\n display: flex;\n visibility: ","\n height: 43px;\n width: 43px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n background: ",";\n justify-content: center;\n align-items: center;\n svg {\n stroke: ",";\n }\n &:hover {\n background: ",";\n }\n"])),(function(e){return e.sorting?"hidden":"visible"}),(function(e){return e.theme.editorColours.navigationBar}),(function(e){return e.theme.editorColours.tabInactive}),(function(e){return e.theme.editorColours.icon}),(function(e){return e.theme.editorColours.tab}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(52),u=n(30),c=n(38),l=n(11),p=n(476),f=function(e){function t(t){var n=e.call(this,t)||this;return n.startEditName=function(){n.setState({editingName:!0})},n.stopEditName=function(){n.setState({editingName:!1})},n.handleKeyDown=function(e){13===e.keyCode&&n.setState({editingName:!1})},n.handleMouseOverCross=function(){n.setState({overCross:!0})},n.handleMouseOutCross=function(){n.setState({overCross:!1})},n.handleSelectSession=function(){n.props.selectTab(n.props.session.id)},n.handleCloseSession=function(e){e.stopPropagation(),n.props.closeTab(n.props.session.id)},n.handleEditName=function(e){n.props.editName(e.target.value)},n.state={overCross:!1,editingName:!1},n}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.session,n=e.selectedSessionId,r=t.queryTypes,i=t.id===n,o=t.name||t.operationName||r.firstOperationName||"New Tab";return a.createElement(S,{active:i,onMouseDown:this.handleSelectSession},a.createElement(T,{active:i},t.subscriptionActive&&a.createElement(M,null),a.createElement(_,null,r.query&&a.createElement(F,null,"Q"),(t.isSettingsTab||t.isConfigTab)&&a.createElement(F,null,a.createElement(s.SettingsIcon,{width:12,height:12,fill:"white"})),r.mutation&&a.createElement(N,null,"M"),r.subscription&&a.createElement(I,null,"S"))),this.state.editingName?a.createElement(A,{value:t.name||"",onChange:this.handleEditName,onBlur:this.stopEditName,onKeyDown:this.handleKeyDown,autoFocus:!0}):a.createElement(k,{active:i,onDoubleClick:this.startEditName},o),a.createElement(L,{className:"close",active:i,hasCircle:t.isFile&&t.changed&&!this.state.overCross,onClick:this.handleCloseSession,onMouseEnter:this.handleMouseOverCross,onMouseLeave:this.handleMouseOutCross},t.isFile&&t.changed&&!this.state.overCross?a.createElement(j,null,"⬤"):a.createElement(s.CrossIcon,{width:12,height:11,strokeWidth:7,title:"Close Tab"})))},t}(a.PureComponent);t.default=u.connect(null,{closeTab:c.closeTab,selectTab:c.selectTab,editName:c.editName})(f);var d,h,m,g,y,v,b,E,x,D,C,w,S=l.styled("div")(d||(d=o(["\n -webkit-app-region: no-drag;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n height: 43px;\n padding: 10px;\n padding-top: 9px;\n margin-right: 10px;\n font-size: 14px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n background: ",";\n &:hover {\n background: ",";\n .close {\n opacity: 1;\n }\n }\n"],["\n -webkit-app-region: no-drag;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n height: 43px;\n padding: 10px;\n padding-top: 9px;\n margin-right: 10px;\n font-size: 14px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n background: ",";\n &:hover {\n background: ",";\n .close {\n opacity: 1;\n }\n }\n"])),(function(e){return e.theme.editorColours.navigationBar}),(function(e){return e.active?e.theme.editorColours.tab:e.theme.editorColours.tabInactive}),(function(e){return e.theme.editorColours.tab})),k=l.styled("div")(h||(h=o(["\n opacity: ",";\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n"],["\n opacity: ",";\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n"])),(function(e){return e.active?1:.5}),(function(e){return e.theme.editorColours.tabText})),A=l.styled(p.default)(m||(m=o(["\n input {\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n }\n"],["\n input {\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n }\n"])),(function(e){return e.theme.editorColours.tabText})),T=l.styled("div")(g||(g=o(["\n display: flex;\n align-items: center;\n opacity: ",";\n"],["\n display: flex;\n align-items: center;\n opacity: ",";\n"])),(function(e){return e.active?1:.5})),_=l.styled.div(y||(y=o(["\n display: flex;\n color: white;\n"],["\n display: flex;\n color: white;\n"]))),O=l.styled.div(v||(v=o(["\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 4px;\n font-size: 12px;\n font-weight: 700;\n border-radius: 2px;\n"],["\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 4px;\n font-size: 12px;\n font-weight: 700;\n border-radius: 2px;\n"]))),F=l.styled(O)(b||(b=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.blue})),N=l.styled(O)(E||(E=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.orange})),I=l.styled(O)(x||(x=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.purple})),M=l.styled.div(D||(D=o(["\n width: 7px;\n height: 7px;\n background: rgba(242, 92, 84, 1);\n border-radius: 100%;\n margin-right: 10px;\n"],["\n width: 7px;\n height: 7px;\n background: rgba(242, 92, 84, 1);\n border-radius: 100%;\n margin-right: 10px;\n"]))),j=l.styled.div(C||(C=o(["\n position: relative;\n top: -2px;\n font-size: 9px;\n background: ",";\n"],["\n position: relative;\n top: -2px;\n font-size: 9px;\n background: ",";\n"])),(function(e){return e.theme.editorColours.circle})),L=l.styled("div")(w||(w=o(["\n position: relative;\n display: flex;\n margin-left: 10px;\n top: 1px;\n height: 13px;\n width: 13px;\n opacity: ",";\n svg {\n stroke: ",";\n }\n"],["\n position: relative;\n display: flex;\n margin-left: 10px;\n top: 1px;\n height: 13px;\n width: 13px;\n opacity: ",";\n svg {\n stroke: ",";\n }\n"])),(function(e){return e.active||e.hasCircle?1:0}),(function(e){return e.theme.editorColours.icon}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(252),u=n(478),c=n(480),l=n(68),p=n(121),f=n(11),d=n(30),h=n(28),m=n(481),g=n(109),y=n(98),v=n(38),b=n(118),E=n(69),x=n(52),D=function(e){function t(t){var n=e.call(this,t)||this;n.handleClickUse=function(){var e=n.props.items.get(n.state.selectedItemIndex);n.props.duplicateSession(e),n.props.closeHistory()},n.handleItemSelect=function(e){n.setState({selectedItemIndex:e})},n.handleSelectFilter=function(e){n.setState({selectedFilter:e})},n.handleSearch=function(e){n.setState({searchTerm:e})};var r=t.items.keySeq().first()||"";return n.state={selectedFilter:"HISTORY",selectedItemIndex:r,searchTerm:""},n}return i(t,e),t.prototype.render=function(){var e=this.state,t=e.searchTerm,n=e.selectedFilter,r=this.props.items.filter((function(e){return"STARRED"===n?e.starred:!(t&&t.length>0)||e.query.toLowerCase().includes(t.toLowerCase())})),i=this.props.items.get(this.state.selectedItemIndex);return i=i&&i.toJS?i.toJS():void 0,a.createElement(s,{isOpen:this.props.isOpen,onRequestClose:this.props.closeHistory,contentLabel:"GraphiQL Session History",style:l.modalStyle,ariaHideApp:!1},a.createElement(L,null,a.createElement(P,null,a.createElement(u.default,{onSelectFilter:this.handleSelectFilter,selectedFilter:this.state.selectedFilter,onSearch:this.handleSearch}),a.createElement(c.default,{items:r,selectedItemIndex:this.state.selectedItemIndex,searchTerm:this.state.searchTerm,onItemSelect:this.handleItemSelect,onItemStarToggled:this.props.toggleHistoryItemStarring})),Boolean(i)?a.createElement(R,null,a.createElement(B,null,a.createElement(V,null),a.createElement(q,{onClick:this.handleClickUse},a.createElement(H,null,"Use"),a.createElement(x.ArrowRight,{color:"white",width:13,height:13}))),a.createElement(W,null,a.createElement(G,null,a.createElement(E.Container,null,a.createElement(K,null,a.createElement(p.QueryEditor,{value:i.query})))))):a.createElement(R,null,a.createElement(U,null,a.createElement(z,null,"No History yet")))))},t}(a.Component),C=h.createStructuredSelector({items:m.getHistory,isOpen:g.getHistoryOpen});t.default=d.connect(C,{closeHistory:y.closeHistory,openHistory:y.openHistory,duplicateSession:v.duplicateSession,toggleHistoryItemStarring:b.toggleHistoryItemStarring})(D);var w,S,k,A,T,_,O,F,N,I,M,j,L=f.styled.div(w||(w=o(["\n display: flex;\n min-height: 500px;\n"],["\n display: flex;\n min-height: 500px;\n"]))),P=f.styled.div(S||(S=o(["\n flex: 1;\n\n background: white;\n"],["\n flex: 1;\n\n background: white;\n"]))),R=f.styled.div(k||(k=o(["\n flex: 0 0 464px;\n z-index: 2;\n"],["\n flex: 0 0 464px;\n z-index: 2;\n"]))),B=f.styled.div(A||(A=o(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n padding-left: ",";\n padding-right: ",";\n padding-top: 20px;\n padding-bottom: 20px;\n\n background: ",";\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n padding-left: ",";\n padding-right: ",";\n padding-top: 20px;\n padding-bottom: 20px;\n\n background: ",";\n"])),(function(e){return e.theme.sizes.medium25}),(function(e){return e.theme.sizes.medium25}),(function(e){return e.theme.editorColours.resultBackground})),U=f.styled.div(T||(T=o(["\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n background: ",";\n"],["\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n background: ",";\n"])),(function(e){return e.theme.editorColours.resultBackground})),z=f.styled.div(_||(_=o(["\n font-size: 16px;\n color: ",";\n"],["\n font-size: 16px;\n color: ",";\n"])),(function(e){return e.theme.editorColours.text})),V=f.styled.div(O||(O=o(["\n font-size: ",";\n font-weight: ",";\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.4);\n"],["\n font-size: ",";\n font-weight: ",";\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.4);\n"])),(function(e){return e.theme.sizes.fontSmall}),(function(e){return e.theme.sizes.fontSemiBold})),q=f.styled.div(F||(F=o(["\n display: flex;\n align-items: center;\n\n padding-top: ",";\n padding-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n font-size: ",";\n font-weight: ",";\n\n border-radius: ",";\n background: ",";\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ",";\n padding-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n font-size: ",";\n font-weight: ",";\n\n border-radius: ",";\n background: ",";\n cursor: pointer;\n"])),(function(e){return e.theme.sizes.small10}),(function(e){return e.theme.sizes.small10}),(function(e){return e.theme.sizes.small16}),(function(e){return e.theme.sizes.small16}),(function(e){return e.theme.sizes.fontSmall}),(function(e){return e.theme.sizes.fontSemiBold}),(function(e){return e.theme.sizes.smallRadius}),(function(e){return e.theme.colours.green})),H=f.styled.div(N||(N=o(["\n margin-right: ",";\n color: white;\n"],["\n margin-right: ",";\n color: white;\n"])),(function(e){return e.theme.sizes.small6})),W=f.styled.div(I||(I=o(["\n height: calc(100% - 81px);\n display: flex;\n flex: 1 1 auto;\n"],["\n height: calc(100% - 81px);\n display: flex;\n flex: 1 1 auto;\n"]))),G=f.styled(W)(M||(M=o(["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n flex: 1 1 auto;\n"],["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n flex: 1 1 auto;\n"]))),K=f.styled.div(j||(j=o(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"],["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(479),a=n(11),s=n(207);t.default=function(e){return i.createElement(c,null,i.createElement(o.default,{onSelectFilter:e.onSelectFilter,selectedFilter:e.selectedFilter}),i.createElement(s.default,{placeholder:"Search the history...",onSearch:e.onSearch,clean:!0}))};var u,c=a.styled.div(u||(u=r(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n background: ",";\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n background: ",";\n"])),(function(e){return e.theme.colours.black02}))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(11),a=n(52);t.default=o.withTheme((function(e){var t=e.selectedFilter,n=e.onSelectFilter,r=e.theme;return i.createElement(l,null,i.createElement(p,{active:"HISTORY"===t,onClick:function(){return n("HISTORY")}},i.createElement(a.History,{color:"HISTORY"===t?r.colours.white:r.colours.black30,strokeWidth:3,width:25,height:25}),i.createElement(f,null,"History")),i.createElement(p,{active:"STARRED"===t,onClick:function(){return n("STARRED")}},i.createElement(a.Star,{color:"STARRED"===t?r.colours.white:r.colours.black30,width:16,height:16}),i.createElement(f,null,"Starred")))}));var s,u,c,l=o.styled.div(s||(s=r(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),p=o.styled("div")(u||(u=r(["\n box-sizing: content-box;\n height: 24px;\n z-index: ",";\n display: flex;\n align-items: center;\n margin: 0 -2px;\n padding: ",";\n background: ",";\n\n color: ",";\n font-size: 14px;\n font-weight: 600;\n text-transform: uppercase;\n border-radius: 2px;\n cursor: pointer;\n"],["\n box-sizing: content-box;\n height: 24px;\n z-index: ",";\n display: flex;\n align-items: center;\n margin: 0 -2px;\n padding: ",";\n background: ",";\n\n color: ",";\n font-size: 14px;\n font-weight: 600;\n text-transform: uppercase;\n border-radius: 2px;\n cursor: pointer;\n"])),(function(e){return e.active?2:0}),(function(e){return e.active?"7px 9px 8px 9px":"5px 13px 6px 13px"}),(function(e){return e.active?e.theme.colours.green:e.theme.colours.black07}),(function(e){return e.active?e.theme.colours.white:e.theme.colours.black30})),f=o.styled.p(c||(c=r(["\n margin-left: 6px;\n"],["\n margin-left: 6px;\n"])))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(52),a=n(11);t.default=a.withTheme((function(e){var t=e.items,n=e.onItemSelect,r=e.selectedItemIndex,a=e.onItemStarToggled;e.theme;return i.createElement(y,null,t.map((function(e,t){return i.createElement(v,{key:e.id,active:r===t,onClick:function(){return n(t)}},i.createElement(E,null,i.createElement(o.Star,{onClick:function(){return a(e.id)},stroke:e.starred?void 0:"rgb(221,171,0)",fill:e.starred?"rgb(221,171,0)":void 0,strokeWidth:.5,width:25,height:25}),i.createElement(b,null,i.createElement(x,null,e.operationName||e.queryTypes.firstOperationName||"New Session"),e.queryTypes.query&&i.createElement(C,null,"Q"),e.queryTypes.mutation&&i.createElement(w,null,"M"),e.queryTypes.subscription&&i.createElement(S,null,"S"))),i.createElement(E,null,e.date&&i.createElement(k,null,"function"==typeof e.date.getMonth&&e.date.getMonth()+1,"/",e.date.getDate(),"/",e.date.getFullYear().toString().slice(2,4))))})).toArray().map((function(e){return e[1]})))}));var s,u,c,l,p,f,d,h,m,g,y=a.styled.div(s||(s=r(["\n overflow-y: scroll;\n max-height: calc(100vh - 121px);\n"],["\n overflow-y: scroll;\n max-height: calc(100vh - 121px);\n"]))),v=a.styled("div")(u||(u=r(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 25px 20px;\n cursor: pointer;\n border-bottom: 1px solid;\n border-color: ",";\n background: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 25px 20px;\n cursor: pointer;\n border-bottom: 1px solid;\n border-color: ",";\n background: ",";\n"])),(function(e){return e.theme.colours.black10}),(function(e){return e.active?e.theme.colours.black04:e.theme.colours.white})),b=a.styled.div(c||(c=r(["\n display: flex;\n align-items: center;\n margin-left: 20px;\n"],["\n display: flex;\n align-items: center;\n margin-left: 20px;\n"]))),E=a.styled.div(l||(l=r(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),x=a.styled.p(p||(p=r(["\n font-weight: 300;\n font-size: 20px;\n margin-right: 16px;\n"],["\n font-weight: 300;\n font-size: 20px;\n margin-right: 16px;\n"]))),D=a.styled.div(f||(f=r(["\n height: 21px;\n width: 21px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 4px;\n border-radius: 2px;\n font-weight: 700;\n font-size: 12px;\n color: ",";\n"],["\n height: 21px;\n width: 21px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 4px;\n border-radius: 2px;\n font-weight: 700;\n font-size: 12px;\n color: ",";\n"])),(function(e){return e.theme.colours.white})),C=a.styled(D)(d||(d=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.blue})),w=a.styled(D)(h||(h=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.orange})),S=a.styled(D)(m||(m=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.purple})),k=a.styled.time(g||(g=r(["\n color: ",";\n font-size: 14px;\n margin-left: 16px;\n"],["\n color: ",";\n font-size: 14px;\n margin-left: 16px;\n"])),(function(e){return e.theme.colours.black40}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(42);t.getHistory=r.createSelector([i.getSelectedWorkspace],(function(e){return e.history}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(52),u=n(11),c=n(38),l=n(30),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return a.createElement(h,null,a.createElement(m,null,a.createElement(s.SettingsIcon,{width:23,height:23,onClick:this.props.onClick,title:"Settings"})))},t}(a.Component);t.default=l.connect(null,{onClick:c.openSettingsTab})(p);var f,d,h=u.styled.div(f||(f=o(["\n position: absolute;\n z-index: 1005;\n right: 20px;\n top: 17px;\n"],["\n position: absolute;\n z-index: 1005;\n right: 20px;\n top: 17px;\n"]))),m=u.styled.div(d||(d=o(["\n position: relative;\n cursor: pointer;\n\n svg {\n fill: ",";\n transition: 0.1s linear fill;\n }\n\n &:hover {\n svg {\n fill: ",";\n }\n }\n"],["\n position: relative;\n cursor: pointer;\n\n svg {\n fill: ",";\n transition: 0.1s linear fill;\n }\n\n &:hover {\n svg {\n fill: ",";\n }\n }\n"])),(function(e){return e.theme.editorColours.icon}),(function(e){return e.theme.editorColours.iconHover}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(128),c=n(484),l=n(30),p=n(28),f=n(109),d=n(98),h=n(38),m=n(42),g=n(69),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){"s"===e.key&&e.metaKey&&(e.preventDefault(),t.props.onSave())},t}return i(t,e),t.prototype.componentDidMount=function(){window.addEventListener("keydown",this.handleKeydown,!0)},t.prototype.render=function(){var e=this.props.isConfig;return a.createElement(g.Container,null,a.createElement(w,null,a.createElement(g.default,null,a.createElement(c.ConfigEditor,{value:this.props.value,onEdit:this.props.onChange,onRunQuery:this.props.onSave,isYaml:this.props.isYaml,readOnly:this.props.readOnly}),a.createElement(k,null,window.version)),!this.props.readOnly&&a.createElement(S,null,a.createElement(u.Button,{onClick:this.props.onSave},"Save ",e?"Config":"Settings"))))},t}(a.Component);t.SettingsEditor=y;var v=p.createStructuredSelector({value:m.getSettingsString}),b=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChange=function(e){n.setState({value:e}),n.props.editSettings()},n.handleSave=function(){n.props.onChange(n.state.value),n.props.saveSettings()},n.state={value:t.value},n}return i(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){return a.createElement(y,{value:this.state.value,onChange:this.handleChange,onSave:this.handleSave})},t}(a.Component);t.PlaygroundSettingsEditor=l.connect(v,{onChange:d.setSettingsString,editSettings:h.editSettings,saveSettings:h.saveSettings})(b);var E=p.createStructuredSelector({value:f.getConfigString});t.GraphQLConfigEditor=l.connect(E,{onChange:d.setConfigString})(y);var x,D,C,w=s.styled.div(x||(x=o(["\n background: ",";\n position: relative;\n display: flex;\n flex-flow: column;\n flex: 1 1 0;\n\n .CodeMirror {\n background: ",";\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"],["\n background: ",";\n position: relative;\n display: flex;\n flex-flow: column;\n flex: 1 1 0;\n\n .CodeMirror {\n background: ",";\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"])),(function(e){return e.theme.editorColours.resultBackground}),(function(e){return e.theme.editorColours.resultBackground})),S=s.styled.div(D||(D=o(["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n"],["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n"]))),k=s.styled.span(C||(C=o(["\n position: absolute;\n right: 20px;\n bottom: 17px;\n color: ",";\n font-weight: 700;\n margin-right: 14px;\n"],["\n position: absolute;\n right: 20px;\n bottom: 17px;\n color: ",";\n font-weight: 700;\n margin-right: 14px;\n"])),(function(e){return e.theme.editorColours.textInactive}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(69),u=n(11),c=function(e){function t(t){var n=e.call(this,t)||this;return n.setNode=function(e){n.node=e},n.onKeyUp=function(e,t){var r=t.keyCode;(r>=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&n.editor.execCommand("autocomplete")},n.onEdit=function(){n.ignoreChangeEvent||(n.cachedValue=n.editor.getValue(),n.props.onEdit&&n.props.onEdit(n.cachedValue))},n.cachedValue=t.value||"",n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=n(16);n(125),n(91),n(126),n(92),n(106),n(127),n(70),n(107),n(71),n(108),n(485),n(193),n(194),n(195),this.editor=t(this.node,{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:this.props.isYaml?"yaml":"graphql-variables",theme:this.props.editorTheme||"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!this.props.readOnly&&"nocursor",foldGutter:{minFoldSize:4},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Shift-Ctrl-P":function(){e.props.onPrettifyQuery&&e.props.onPrettifyQuery()},"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this.onEdit),this.editor.on("keyup",this.onKeyUp)},t.prototype.componentDidUpdate=function(e){this.ignoreChangeEvent=!0,this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.componentWillUnmount=function(){this.editor.off("change",this.onEdit),this.editor.off("keyup",this.onKeyUp),this.editor=null},t.prototype.render=function(){return a.createElement(s.default,null,a.createElement(p,{ref:this.setNode}))},t.prototype.getCodeMirror=function(){return this.editor},t.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},t}(a.Component);t.ConfigEditor=c;var l,p=u.styled.div(l||(l=o(["\n flex: 1;\n height: 100%;\n position: relative;\n .CodeMirror-linenumbers {\n background: ",";\n }\n"],["\n flex: 1;\n height: 100%;\n position: relative;\n .CodeMirror-linenumbers {\n background: ",";\n }\n"])),(function(e){return e.theme.editorColours.resultBackground}))},function(e,t,n){!function(e){"use strict";e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def";if(t.match(/\.\.\./))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(n(16))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(121),c=n(28),l=n(32),p=n(38),f=n(69),d=n(30),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return a.createElement(f.Container,null,a.createElement(v,null,a.createElement(f.default,null,a.createElement(b,null,a.createElement(u.QueryEditor,{value:this.props.value,onChange:this.props.onChange})))))},t}(a.Component),m=c.createStructuredSelector({value:l.getFile});t.default=d.connect(m,{onChange:p.editFile})(h);var g,y,v=s.styled.div(g||(g=o(["\n background: ",";\n position: relative;\n .variable-editor {\n height: 100% !important;\n }\n .CodeMirror {\n background: none !important;\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"],["\n background: ",";\n position: relative;\n .variable-editor {\n height: 100% !important;\n }\n .CodeMirror {\n background: none !important;\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"])),(function(e){return e.theme.editorColours.resultBackground})),b=s.styled.div(y||(y=o(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"],["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])))},function(e){e.exports=JSON.parse('{"name":"graphql-playground-react","version":"1.7.26","main":"./lib/lib.js","typings":"./lib/lib.d.ts","description":"GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).","contributors":["Tim Suchanek ","Johannes Schickling ","Lukas Huvar "],"repository":{"type":"git","url":"http://github.com/graphcool/graphql-playground.git"},"license":"MIT","scripts":{"start":"node scripts/start.js","start:analyze":"ANALYZE_BUNDLE=true node scripts/start.js","start:graphql-bin":"ACTIVE_APP=graphqlbin node scripts/start.js","prepublishOnly":"yarn build","build":"rimraf dist build dist && yarn build-app && yarn build-package","tsc":"tsc -p tsconfig.build.json","build-package":"rimraf lib build/dist && npm run tsc && babel lib -d lib && cp -r ./src/assets/ ./lib/assets/ && cd lib && rimraf *.jsx;","build-app":"node scripts/build.js","test":"jest","bundlesize":"bundlesize","bump":"npm version patch --no-git-tag-version && git add package.json","graphql-faker":"graphql-faker ./tests/schema.faker.graphql","lint":"tslint \\"src/**/*.ts{,x}\\"","precommit":"lint-staged","prettier":"prettier --single-quote --no-semi --trailing-comma all --write *.{ts,tsx} \'src/**/*.{ts,tsx}\'"},"files":["build","lib","playground.css"],"bundlesize":[{"path":"build/static/js/index.js","maxSize":"674 kB"}],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/plugin-proposal-class-properties":"^7.0.0","@babel/plugin-proposal-json-strings":"^7.0.0","@babel/plugin-syntax-dynamic-import":"^7.0.0","@babel/plugin-syntax-import-meta":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-react":"^7.0.0","@types/deasync":"0.1.0","@types/jest":"22.2.3","@types/node":"12.12.34","@types/react":"16.9.32","@types/zen-observable":"^0.5.3","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.4.2","babel-loader":"^8.0.0","babel-plugin-styled-components":"^1.8.0","bundlesize":"^0.17.0","case-sensitive-paths-webpack-plugin":"2.3.0","chalk":"2.4.1","connect-history-api-fallback":"1.5.0","cross-spawn":"6.0.5","css-loader":"3.4.2","detect-port":"1.2.3","dotenv":"5.0.1","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.4","extract-text-webpack-plugin":"4.0.0-beta.0","file-loader":"6.0.0","filesize":"6.1.0","fs-extra":"5.0.0","graphql-playground-html":"1.5.6","gzip-size":"4.1.0","html-webpack-plugin":"4.0.4","http-proxy-middleware":"0.17.4","husky":"0.14.3","jest":"22.1.4","jest-localstorage-mock":"^2.2.0","json-loader":"0.5.7","lint-staged":"6.1.0","node-noop":"1.0.0","object-assign":"4.1.1","promise":"8.0.1","raw-loader":"4.0.0","react-dev-utils":"10.1.0","recursive-readdir":"2.2.2","rimraf":"3.0.2","source-map-loader":"0.2.4","strip-ansi":"4.0.0","style-loader":"1.1.3","svg-inline-loader":"0.8.2","sw-precache-webpack-plugin":"1.0.0","ts-loader":"6.2.2","tslint":"5.10.0","tslint-graphcool-frontend":"0.0.3","tslint-loader":"3.6.0","typescript":"3.8.3","typescript-styled-plugin":"^0.11.0","url-loader":"4.0.0","webpack":"4.44.1","webpack-dev-server":"3.11.0","webpack-manifest-plugin":"2.2.0","why-did-you-update":"0.1.1"},"dependencies":{"@types/lru-cache":"^4.1.1","apollo-link":"^1.2.13","apollo-link-http":"^1.5.16","apollo-link-ws":"^1.0.19","calculate-size":"^1.1.1","codemirror":"^5.52.2","codemirror-graphql":"^0.12.0-alpha.8","copy-to-clipboard":"^3.0.8","cryptiles":"4.1.2","cuid":"^1.3.8","graphiql":"^0.17.5","graphql":"^15.3.0","immutable":"^4.0.0-rc.9","isomorphic-fetch":"^2.2.1","js-yaml":"^3.10.0","json-stable-stringify":"^1.0.1","keycode":"^2.1.9","lodash":"^4.17.11","lodash.debounce":"^4.0.8","markdown-it":"^8.4.1","marked":"^0.8.2","prettier":"2.0.2","prop-types":"^15.7.2","query-string":"5","react":"16.13.1","react-addons-shallow-compare":"^15.6.2","react-codemirror":"^1.0.0","react-copy-to-clipboard":"^5.0.1","react-display-name":"^0.2.3","react-dom":"^16.13.1","react-helmet":"^5.2.0","react-input-autosize":"^2.2.1","react-modal":"^3.1.11","react-redux":"^7.2.0","react-router-dom":"^4.2.2","react-sortable-hoc":"^0.8.3","react-transition-group":"^2.2.1","react-virtualized":"^9.12.0","redux":"^4.0.5","redux-actions":"^2.6.5","redux-immutable":"^4.0.0","redux-localstorage":"^1.0.0-rc5","redux-localstorage-debounce":"^0.1.0","redux-localstorage-filter":"^0.1.1","redux-saga":"^1.1.3","reselect":"^4.0.0","seamless-immutable":"^7.0.1","styled-components":"^4.0.0","subscriptions-transport-ws":"^0.9.5","utility-types":"^1.0.0","webpack-bundle-analyzer":"^3.3.2","zen-observable":"^0.7.1"},"lint-staged":{"*.{ts,tsx}":["prettier --single-quote --no-semi --write","tslint","git add"],"gitDir":"../../"},"jest":{"collectCoverageFrom":["src/**/*.{ts,tsx}"],"setupFiles":["/config/polyfills.js"],"testPathIgnorePatterns":["[/\\\\\\\\](build|docs|node_modules)[/\\\\\\\\]"],"testEnvironment":"node","testURL":"http://localhost","transform":{"^.+\\\\.css$":"/config/jest/cssTransform.js","^.+\\\\.tsx?$":"/config/jest/typescriptTransform.js","^(?!.*\\\\.(css|json)$)":"/config/jest/fileTransform.js"},"transformIgnorePatterns":["[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx)$"],"moduleNameMapper":{"^react-native$":"react-native-web"},"moduleFileExtensions":["ts","tsx","js"],"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$"}}')},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m,g,y,v=(0,s.default)(c.reducePropsToState,c.handleClientStateChange,c.mapStateOnServer)((function(){return null})),b=(m=v,y=g=function(e){function t(){return d(this,t),h(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!(0,u.default)(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case l.TAG_NAMES.SCRIPT:case l.TAG_NAMES.NOSCRIPT:return{innerHTML:t};case l.TAG_NAMES.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,i=e.arrayTypeChildren,o=e.newChildProps,a=e.nestedChildren;return r({},i,((t={})[n.type]=[].concat(i[n.type]||[],[r({},o,this.mapNestedChildrenToProps(n,a))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,i=e.child,o=e.newProps,a=e.newChildProps,s=e.nestedChildren;switch(i.type){case l.TAG_NAMES.TITLE:return r({},o,((t={})[i.type]=s,t.titleAttributes=r({},a),t));case l.TAG_NAMES.BODY:return r({},o,{bodyAttributes:r({},a)});case l.TAG_NAMES.HTML:return r({},o,{htmlAttributes:r({},a)})}return r({},o,((n={})[i.type]=r({},a),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=r({},t);return Object.keys(e).forEach((function(t){var i;n=r({},n,((i={})[t]=e[t],i))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return o.default.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=f(i,["children"]),s=(0,c.convertReactPropstoHtmlAttributes)(a);switch(n.warnOnInvalidChildren(e,o),e.type){case l.TAG_NAMES.LINK:case l.TAG_NAMES.META:case l.TAG_NAMES.NOSCRIPT:case l.TAG_NAMES.SCRIPT:case l.TAG_NAMES.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=f(e,["children"]),i=r({},n);return t&&(i=this.mapChildrenToProps(t,i)),o.default.createElement(m,i)},i(t,null,[{key:"canUseDOM",set:function(e){m.canUseDOM=e}}]),t}(o.default.Component),g.propTypes={base:a.default.object,bodyAttributes:a.default.object,children:a.default.oneOfType([a.default.arrayOf(a.default.node),a.default.node]),defaultTitle:a.default.string,defer:a.default.bool,encodeSpecialCharacters:a.default.bool,htmlAttributes:a.default.object,link:a.default.arrayOf(a.default.object),meta:a.default.arrayOf(a.default.object),noscript:a.default.arrayOf(a.default.object),onChangeClientState:a.default.func,script:a.default.arrayOf(a.default.object),style:a.default.arrayOf(a.default.object),title:a.default.string,titleAttributes:a.default.object,titleTemplate:a.default.string},g.defaultProps={defer:!0,encodeSpecialCharacters:!0},g.peek=m.peek,g.rewind=function(){var e=m.rewind();return e||(e=(0,c.mapStateOnServer)({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},y);b.renderStatic=b.rewind,t.Helmet=b,t.default=b},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(3),o=r(i),a=r(n(491));function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var c,l=[];function p(){c=e(l.map((function(e){return e.props}))),f.canUseDOM?t(c):n&&(c=n(c))}var f=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return c},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=c;return c=void 0,l=[],e};var s=i.prototype;return s.shouldComponentUpdate=function(e){return!a(e,this.props)},s.componentWillMount=function(){l.push(this),p()},s.componentDidUpdate=function(){p()},s.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),p()},s.render=function(){return o.createElement(r,this.props)},i}(i.Component);return s(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),s(f,"canUseDOM",u),f}}},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;u1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},p=function(e){var t=g(e,s.TAG_NAMES.TITLE),n=g(e,s.HELMET_PROPS.TITLE_TEMPLATE);if(n&&t)return n.replace(/%s/g,(function(){return t}));var r=g(e,s.HELMET_PROPS.DEFAULT_TITLE);return t||r||void 0},f=function(e){return g(e,s.HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},d=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return i({},e,t)}),{})},h=function(e,t){return t.filter((function(e){return void 0!==e[s.TAG_NAMES.BASE]})).map((function(e){return e[s.TAG_NAMES.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},y=(c=Date.now(),function(e){var t=Date.now();t-c>16?(c=t,e(t)):setTimeout((function(){y(e)}),0)}),v=function(e){return clearTimeout(e)},b="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||y:e.requestAnimationFrame||y,E="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||v:e.cancelAnimationFrame||v,x=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},D=null,C=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,u=e.noscriptTags,c=e.onChangeClientState,l=e.scriptTags,p=e.styleTags,f=e.title,d=e.titleAttributes;k(s.TAG_NAMES.BODY,r),k(s.TAG_NAMES.HTML,i),S(f,d);var h={baseTag:A(s.TAG_NAMES.BASE,n),linkTags:A(s.TAG_NAMES.LINK,o),metaTags:A(s.TAG_NAMES.META,a),noscriptTags:A(s.TAG_NAMES.NOSCRIPT,u),scriptTags:A(s.TAG_NAMES.SCRIPT,l),styleTags:A(s.TAG_NAMES.STYLE,p)},m={},g={};Object.keys(h).forEach((function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(m[e]=n),r.length&&(g[e]=h[e].oldTags)})),t&&t(),c(e,m,g)},w=function(e){return Array.isArray(e)?e.join(""):e},S=function(e,t){void 0!==e&&document.title!==e&&(document.title=w(e)),k(s.TAG_NAMES.TITLE,t)},k=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(s.HELMET_ATTRIBUTE),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(t),u=0;u=0;f--)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute(s.HELMET_ATTRIBUTE):n.getAttribute(s.HELMET_ATTRIBUTE)!==a.join(",")&&n.setAttribute(s.HELMET_ATTRIBUTE,a.join(","))}},A=function(e,t){var n=document.head||document.querySelector(s.TAG_NAMES.HEAD),r=n.querySelectorAll(e+"["+s.HELMET_ATTRIBUTE+"]"),i=Array.prototype.slice.call(r),o=[],a=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===s.TAG_PROPERTIES.INNER_HTML)n.innerHTML=t.innerHTML;else if(r===s.TAG_PROPERTIES.CSS_TEXT)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var u=void 0===t[r]?"":t[r];n.setAttribute(r,u)}n.setAttribute(s.HELMET_ATTRIBUTE,"true"),i.some((function(e,t){return a=t,n.isEqualNode(e)}))?i.splice(a,1):o.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:o}},T=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[s.REACT_TAG_MAP[n]||n]=e[n],t}),t)},O=function(e,t,n){switch(e){case s.TAG_NAMES.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[s.HELMET_ATTRIBUTE]=!0,i=_(n,r),[o.default.createElement(s.TAG_NAMES.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=T(n),o=w(t);return i?"<"+e+" "+s.HELMET_ATTRIBUTE+'="true" '+i+">"+l(o,r)+"":"<"+e+" "+s.HELMET_ATTRIBUTE+'="true">'+l(o,r)+""}(e,t.title,t.titleAttributes,n)}};case s.ATTRIBUTE_NAMES.BODY:case s.ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return _(t)},toString:function(){return T(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[s.HELMET_ATTRIBUTE]=!0,r);return Object.keys(t).forEach((function(e){var n=s.REACT_TAG_MAP[e]||e;if(n===s.TAG_PROPERTIES.INNER_HTML||n===s.TAG_PROPERTIES.CSS_TEXT){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),o.default.createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===s.TAG_PROPERTIES.INNER_HTML||e===s.TAG_PROPERTIES.CSS_TEXT)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+l(r[t],n)+'"';return e?e+" "+i:i}),""),o=r.innerHTML||r.cssText||"",a=-1===s.SELF_CLOSING_TAGS.indexOf(e);return t+"<"+e+" "+s.HELMET_ATTRIBUTE+'="true" '+i+(a?"/>":">"+o+"")}),"")}(e,t,n)}}}};t.convertReactPropstoHtmlAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[s.HTML_TAG_MAP[n]||n]=e[n],t}),t)},t.handleClientStateChange=function(e){D&&E(D),e.defer?D=b((function(){C(e,(function(){D=null}))})):(C(e),D=null)},t.mapStateOnServer=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,u=e.noscriptTags,c=e.scriptTags,l=e.styleTags,p=e.title,f=void 0===p?"":p,d=e.titleAttributes;return{base:O(s.TAG_NAMES.BASE,t,r),bodyAttributes:O(s.ATTRIBUTE_NAMES.BODY,n,r),htmlAttributes:O(s.ATTRIBUTE_NAMES.HTML,i,r),link:O(s.TAG_NAMES.LINK,o,r),meta:O(s.TAG_NAMES.META,a,r),noscript:O(s.TAG_NAMES.NOSCRIPT,u,r),script:O(s.TAG_NAMES.SCRIPT,c,r),style:O(s.TAG_NAMES.STYLE,l,r),title:O(s.TAG_NAMES.TITLE,{title:f,titleAttributes:d},r)}},t.reducePropsToState=function(e){return{baseTag:h([s.TAG_PROPERTIES.HREF],e),bodyAttributes:d(s.ATTRIBUTE_NAMES.BODY,e),defer:g(e,s.HELMET_PROPS.DEFER),encode:g(e,s.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:d(s.ATTRIBUTE_NAMES.HTML,e),linkTags:m(s.TAG_NAMES.LINK,[s.TAG_PROPERTIES.REL,s.TAG_PROPERTIES.HREF],e),metaTags:m(s.TAG_NAMES.META,[s.TAG_PROPERTIES.NAME,s.TAG_PROPERTIES.CHARSET,s.TAG_PROPERTIES.HTTPEQUIV,s.TAG_PROPERTIES.PROPERTY,s.TAG_PROPERTIES.ITEM_PROP],e),noscriptTags:m(s.TAG_NAMES.NOSCRIPT,[s.TAG_PROPERTIES.INNER_HTML],e),onChangeClientState:f(e),scriptTags:m(s.TAG_NAMES.SCRIPT,[s.TAG_PROPERTIES.SRC,s.TAG_PROPERTIES.INNER_HTML],e),styleTags:m(s.TAG_NAMES.STYLE,[s.TAG_PROPERTIES.CSS_TEXT],e),title:p(e),titleAttributes:d(s.ATTRIBUTE_NAMES.TITLE,e)}},t.requestAnimationFrame=b,t.warn=x}).call(this,n(43))},function(e,t,n){"use strict";var r=n(495);e.exports=r},function(e,t,n){"use strict";var r=n(496),i=n(519);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(35),e.exports.Schema=n(79),e.exports.FAILSAFE_SCHEMA=n(134),e.exports.JSON_SCHEMA=n(211),e.exports.CORE_SCHEMA=n(210),e.exports.DEFAULT_SAFE_SCHEMA=n(94),e.exports.DEFAULT_FULL_SCHEMA=n(110),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(93),e.exports.MINIMAL_SCHEMA=n(134),e.exports.SAFE_SCHEMA=n(94),e.exports.DEFAULT_SCHEMA=n(110),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(78),i=n(93),o=n(497),a=n(94),s=n(110),u=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,l=/[\x85\u2028\u2029]/,p=/[,\[\]\{\}]/,f=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function y(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function E(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var D=new Array(256),C=new Array(256),w=0;w<256;w++)D[w]=E(w)?1:0,C[w]=E(w);function S(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function k(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function A(e,t){throw k(e,t)}function T(e,t){e.onWarning&&e.onWarning.call(null,k(e,t))}var _={YAML:function(e,t,n){var r,i,o;null!==e.version&&A(e,"duplication of %YAML directive"),1!==n.length&&A(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&A(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&A(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&T(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&A(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],f.test(r)||A(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,r)&&A(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(i)||A(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function O(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function P(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&y(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),M(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)A(e,"bad indentation of a sequence entry");else if(e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt)&&(U(e,t,4,!0,i)&&(m?d=e.result:h=e.result),m||(N(e,l,p,f,d,h,o,a),f=d=h=null),M(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)A(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?A(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?A(e,"repeat of an indentation width identifier"):(p=t+o-1,l=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(I(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),m(a))f++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:A(e,"expected hexadecimal character");e.result+=x(o),e.position++}else A(e,"unknown escape sequence");n=r=e.position}else m(s)?(O(e,n,r,!0),L(e,M(e,!1,t)),n=r=e.position):e.position===e.lineStart&&j(e)?A(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}A(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?S=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!y(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&A(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||A(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],M(e,!0,-1),!0}(e)?function(e,t,n){var r,i,o,a,s,u,c,l,p=e.kind,f=e.result;if(y(l=e.input.charCodeAt(e.position))||v(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(y(r=e.input.charCodeAt(e.position+1))||n&&v(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==l;){if(58===l){if(y(r=e.input.charCodeAt(e.position+1))||n&&v(r))break}else if(35===l){if(y(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&j(e)||n&&v(l))break;if(m(l)){if(s=e.line,u=e.lineStart,c=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=u,e.lineIndent=c;break}}a&&(O(e,i,o,!1),L(e,e.line-s),i=o=e.position,a=!1),g(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return O(e,i,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===n)&&(S=!0,null===e.tag&&(e.tag="?")):(S=!0,null===e.tag&&null===e.anchor||A(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===E&&(S=c&&P(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,p=e.implicitTypes.length;l tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result)?(e.result=f.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):A(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):A(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||S}function z(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(M(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!y(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&A(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!y(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&I(e),u.call(_,n)?_[n](e,n,r):T(e,'unknown document directive "'+n+'"')}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):a&&A(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&l.test(e.input.slice(o,e.position))&&T(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&j(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(78),i=n(35);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(78),i=n(35),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(35),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,u,c,l,p=0,f=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],u=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),l=new Date(Date.UTC(n,r,a,s,u,c,p)),f&&l.setTime(l.getTime()-f),l},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(508).Buffer}catch(e){}var i=n(35),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,u=0,c=[];for(t=0;t>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|s.indexOf(i.charAt(t));return 0===(n=a%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===n?(c.push(u>>10&255),c.push(u>>2&255)):12===n&&c.push(u>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";(function(e){ +*/!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},i={};t.add=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),n.add(e)}));var n,o},t.remove=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&n.remove(e)}));var n,o}},function(e,t,n){"use strict";var r,i=n(167),o=(r=i)&&r.__esModule?r:{default:r};var a=void 0,s=void 0,u=[];function c(){0!==u.length&&u[u.length-1].focusContent()}o.default.subscribe((function(e,t){a&&s||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",c),(s=a.cloneNode()).addEventListener("focus",c)),(u=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"createGlobalStyle",(function(){return nt})),n.d(t,"css",(function(){return be})),n.d(t,"isStyledComponent",(function(){return _})),n.d(t,"keyframes",(function(){return it})),n.d(t,"ServerStyleSheet",(function(){return Ke})),n.d(t,"StyleSheetConsumer",(function(){return Qe})),n.d(t,"StyleSheetContext",(function(){return Je})),n.d(t,"StyleSheetManager",(function(){return Ye})),n.d(t,"ThemeConsumer",(function(){return We})),n.d(t,"ThemeContext",(function(){return He})),n.d(t,"ThemeProvider",(function(){return Ge})),n.d(t,"withTheme",(function(){return ot})),n.d(t,"__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS",(function(){return at}));var r=n(148),i=n.n(r),o=n(240),a=n.n(o),s=n(3),u=n.n(s),c=n(241),l=n(78),p=n(149),f=(n(7),n(242)),d=n(243),h=function(e,t){for(var n=[e[0]],r=0,i=t.length;r1?r-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return E(a)}return b(t,e),t}(Error),N=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,I=function(e){var t=""+(e||""),n=[];return t.replace(N,(function(e,t,r){return n.push({componentId:t,matchIndex:r}),e})),n.map((function(e,r){var i=e.componentId,o=e.matchIndex,a=n[r+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}}))},M=/^\s*\/\/.*$/gm,j=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),L=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),P=[],R=function(e){if(-2===e){var t=P;return P=[],t}},B=a()((function(e){P.push(e)})),U=void 0,z=void 0,V=void 0,q=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(z)&&n.slice(t-z.length,t)!==z?"."+U:e};L.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(z)>0&&(n[0]=n[0].replace(V,q))},B,R]),j.use([B,R]);var H=function(e){return j("",e)};function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(M,""),o=t&&n?n+" "+t+" { "+i+" }":i;return U=r,z=t,V=new RegExp("\\"+z+"\\b","g"),L(n||!t?"":t,o)}var G=function(){return n.nc},K=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},J=function(e,t){e[t]=Object.create(null)},Q=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},Y=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},$=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[k]=Y(t),n["data-styled-version"]="4.4.1",n),i=G();return i&&(r.nonce=i),u.a.createElement("style",v({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},ie=function(e,t){return e.createTextNode(Z(t))},oe=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=Z(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=v({},e[n]);return t}(r),n=Object.create(null);for(var o in i)n[o]=[i[o][0]];return e(t,n)},css:a,getIds:re(i),hasNameForId:Q(r),insertMarker:o,insertRules:function(e,t,n){o(e)[0]+=t.join(" "),K(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",J(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,i){if(A&&!n){var o=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var i=r.createElement("style");i.setAttribute(k,""),i.setAttribute("data-styled-version","4.4.1");var o=G();if(o&&i.setAttribute("nonce",o),i.appendChild(r.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new F(6);t.parentNode.insertBefore(i,n?t:t.nextSibling)}return i}(e,t,r);return T?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=r[t];return void 0!==i?i:(r[t]=ie(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new F(5)},css:s,getIds:re(r),hasNameForId:Q(n),insertMarker:a,insertRules:function(e,r,s){for(var u=a(e),c=[],l=r.length,p=0;p0&&(o=!0,t().insertRules(e+"-import",c))},removeRules:function(a){var s=r[a];if(void 0!==s){var u=ie(e.ownerDocument,a);e.replaceChild(u,s),r[a]=u,J(n,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(s,n),toHTML:te(s,n)}}(o,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),J(n,e),r[e])},u=function(){var t=$(e).cssRules,n="";for(var o in r){n+=Z(o);for(var a=r[o],s=ee(i,a),u=s-i[a];u0&&(a=!0,t().insertRules(r+"-import",h)),i[l]+=d,K(n,r,c)},removeRules:function(s){var u=r[s];if(void 0!==u&&!1!==e.isConnected){var c=i[u];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}($(e),ee(i,u)-1,c),i[u]=0,J(n,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ne(u,n),toHTML:te(u,n)}}(o,i)}return oe()},se=/\s+/,ue=void 0;ue=A?T?40:1e3:-1;var ce=0,le=void 0,pe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},ce+=1,this.id=ce,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!A||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+k+'][data-styled-version="4.4.1"]'),i=r.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];le=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var n=e.getIds(),r=e.clone(),i=0;i1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function De(e){var t="",n=void 0;for(n=e;n>52;n=Math.floor(n/52))t=xe(n%52)+t;return xe(n%52)+t}function Ce(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:C,r=!!n&&e.theme===n.theme,i=e.theme&&!r?e.theme:t||n.theme;return i},Ae=/[[\].#*$><+~=|^:(),"'`-]+/g,Te=/(^-|-$)/g;function Oe(e){return e.replace(Ae,"-").replace(Te,"")}function Fe(e){return"string"==typeof e&&!0}var Ne={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Ie={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me=((we={})[l.ForwardRef]={$$typeof:!0,render:!0},we),je=Object.defineProperty,Le=Object.getOwnPropertyNames,Pe=Object.getOwnPropertySymbols,Re=void 0===Pe?function(){return[]}:Pe,Be=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,ze=Object.prototype,Ve=Array.prototype;function qe(e,t,n){if("string"!=typeof t){var r=Ue(t);r&&r!==ze&&qe(e,r,n);for(var i=Ve.concat(Le(t),Re(t)),o=Me[e.$$typeof]||Ne,a=Me[t.$$typeof]||Ne,s=i.length,u=void 0,c=void 0;s--;)if(c=i[s],!(Ie[c]||n&&n[c]||a&&a[c]||o&&o[c])&&(u=Be(t,c)))try{je(e,c,u)}catch(e){}return e}return e}var He=Object(s.createContext)(),We=He.Consumer,Ge=function(e){function t(n){g(this,t);var r=E(this,e.call(this,n));return r.getContext=Object(p.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}return b(t,e),t.prototype.render=function(){return this.props.children?u.a.createElement(He.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return u.a.createElement(He.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(w(e))return e(t);if(null===e||Array.isArray(e)||"object"!==(void 0===e?"undefined":m(e)))throw new F(8);return v({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)},t}(s.Component),Ke=function(){function e(){g(this,e),this.masterSheet=pe.master,this.instance=this.masterSheet.clone(),this.sealed=!1}return e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new F(2);return u.a.createElement(Ye,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new F(3)},e}(),Je=Object(s.createContext)(),Qe=Je.Consumer,Ye=function(e){function t(n){g(this,t);var r=E(this,e.call(this,n));return r.getContext=Object(p.a)(r.getContext),r}return b(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new pe(t);throw new F(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return u.a.createElement(Je.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),$e={};var Xe=function(e){function t(){g(this,t);var n=E(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return b(t,e),t.prototype.render=function(){return u.a.createElement(Qe,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():u.a.createElement(We,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,u=void 0;u=n.isStatic?this.generateAndInjectStyles(C,this.props):this.generateAndInjectStyles(ke(this.props,e,r)||C,this.props);var c=this.props.as||this.attrs.as||a,l=Fe(c),p={},d=v({},this.props,this.attrs),h=void 0;for(h in d)"forwardedComponent"!==h&&"as"!==h&&("forwardedRef"===h?p.ref=d[h]:"forwardedAs"===h?p.as=d[h]:l&&!Object(f.a)(h)||(p[h]=d[h]));return this.props.style&&this.attrs.style&&(p.style=v({},this.attrs.style,this.props.style)),p.className=Array.prototype.concat(i,o,u!==o?u:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(c,p)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=v({},t,{theme:e});return n.length?(this.attrs={},n.forEach((function(e){var t,n=e,o=!1,a=void 0,s=void 0;for(s in w(n)&&(n=n(i),o=!0),n)a=n[s],o||!w(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||_(a)||(a=a(i)),r.attrs[s]=a,i[s]=a})),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(C,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Ze(e,t,n){var r=_(e),i=!Fe(e),o=t.displayName,a=void 0===o?function(e){return Fe(e)?"styled."+e:"Styled("+S(e)+")"}(e):o,s=t.componentId,c=void 0===s?function(e,t,n){var r="string"!=typeof t?"sc":Oe(t),i=($e[r]||0)+1;$e[r]=i;var o=r+"-"+e.generateName(r+i);return n?n+"-"+o:o}(_e,t.displayName,t.parentComponentId):s,l=t.ParentComponent,p=void 0===l?Xe:l,f=t.attrs,h=void 0===f?D:f,m=t.displayName&&t.componentId?Oe(t.displayName)+"-"+t.componentId:t.componentId||c,g=r&&e.attrs?Array.prototype.concat(e.attrs,h).filter(Boolean):h,y=new _e(r?e.componentStyle.rules.concat(n):n,g,m),b=void 0,E=function(e,t){return u.a.createElement(p,v({},e,{forwardedComponent:b,forwardedRef:t}))};return E.displayName=a,(b=u.a.forwardRef(E)).displayName=a,b.attrs=g,b.componentStyle=y,b.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):D,b.styledComponentId=m,b.target=r?e.target:e,b.withComponent=function(e){var r=t.componentId,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["componentId"]),o=r&&r+"-"+(Fe(e)?e:Oe(S(e)));return Ze(e,v({},i,{attrs:g,componentId:o,ParentComponent:p}),n)},Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(d.a)(e.defaultProps,t):t}}),b.toString=function(){return"."+b.styledComponentId},i&&qe(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),b}var et=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;if(!Object(l.isValidElementType)(n))throw new F(1,String(n));var i=function(){return t(n,r,be.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,v({},r,i))},i.attrs=function(i){return e(t,n,v({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Ze,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){et[e]=et(e)}));var tt=function(){function e(t,n){g(this,e),this.rules=t,this.componentId=n,this.isStatic=Ce(t,D),pe.master.hasId(n)||pe.master.deferredInject(n,[])}return e.prototype.createStyles=function(e,t){var n=W(ve(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)},e}();function nt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(localStorage.setItem("platform-token",e),window.location.replace(window.location.origin+window.location.pathname))},n.prototype.componentDidMount=function(){var e=this;if(""===this.state.subscriptionEndpoint&&this.updateSubscriptionsUrl(),setTimeout((function(){e.removePlaygroundInClass()}),5e3),this.setInitialWorkspace(),this.props.tabs)this.props.injectTabs(this.props.tabs);else{var t=x("query");if(t){var n=x("endpoint")||this.state.endpoint;this.props.injectTabs([{query:t,endpoint:n}])}else{var r=x("tabs");if(r)try{var i=JSON.parse(r);this.props.injectTabs(i)}catch(e){}}}this.props.schema&&("string"==typeof this.props.schema?this.setState({schema:E.buildSchema(this.props.schema)}):this.setState({schema:E.buildClientSchema(this.props.schema)}))},n.prototype.setInitialWorkspace=function(e){if(void 0===e&&(e=this.props),e.config){var t=this.getInitialActiveEnv(e.config),n=g.getActiveEndpoints(e.config,t.activeEnv,t.projectName),r=n.endpoint,i=n.subscriptionEndpoint||this.normalizeSubscriptionUrl(r,n.subscriptionEndpoint),o=n.headers;this.setState({endpoint:r,subscriptionEndpoint:i,headers:o,activeEnv:t.activeEnv,activeProjectName:t.projectName})}},n.prototype.removePlaygroundInClass=function(){var e=document.getElementById("root");e&&e.classList.remove("playgroundIn")},n.prototype.render=function(){var e=this.props.setTitle?c.createElement(p.Helmet,null,c.createElement("title",null,this.getTitle())):null,t=this.props.headers||{},n=this.state.headers||{},r=a(a({},t),n),i=this.props.theme;return c.createElement("div",null,e,c.createElement(h.ThemeProvider,{theme:a(a({},h.theme),{mode:i,colours:"dark"===i?m.darkColours:m.lightColours,editorColours:a(a({},"dark"===i?m.darkEditorColours:m.lightEditorColours),this.props.codeTheme),settings:this.props.settings})},c.createElement(k,null,this.props.config&&this.state.activeEnv&&c.createElement(d.default,{config:this.props.config,folderName:this.props.folderName||"GraphQL App",theme:i,activeEnv:this.state.activeEnv,onSelectEnv:this.handleSelectEnv,onNewWorkspace:this.props.onNewWorkspace,showNewWorkspace:Boolean(this.props.showNewWorkspace),isElectron:Boolean(this.props.isElectron),activeProjectName:this.state.activeProjectName,configPath:this.props.configPath}),c.createElement(l.default,{endpoint:this.state.endpoint,shareEnabled:this.props.shareEnabled,subscriptionEndpoint:this.state.subscriptionEndpoint,shareUrl:this.state.shareUrl,onChangeEndpoint:this.handleChangeEndpoint,onChangeSubscriptionsEndpoint:this.handleChangeSubscriptionsEndpoint,getRef:this.getPlaygroundRef,config:this.props.config,configString:this.state.configString,configIsYaml:this.state.configIsYaml,canSaveConfig:Boolean(this.props.canSaveConfig),onChangeConfig:this.handleChangeConfig,onSaveConfig:this.handleSaveConfig,onUpdateSessionCount:this.handleUpdateSessionCount,fixedEndpoints:Boolean(this.state.configString),fixedEndpoint:this.props.fixedEndpoint,headers:r,configPath:this.props.configPath,workspaceName:this.props.workspaceName||this.state.activeProjectName,createApolloLink:this.props.createApolloLink,schema:this.state.schema}))))},n.prototype.getTitle=function(){if(this.state.platformToken||this.state.endpoint.includes("api.graph.cool")){var e=this.getProjectId(this.state.endpoint);return(this.state.endpoint.includes("api.graph.cool")?"shared":"local")+"/"+e+" - Playground"}return"Playground - "+this.state.endpoint},n.prototype.updateSubscriptionsUrl=function(){return s(this,void 0,void 0,(function(){var e,t=this;return u(this,(function(n){switch(n.label){case 0:return[4,C(this.getSubscriptionsUrlCandidated(this.state.endpoint),(function(e){return t.wsEndpointValid(e)}))];case 1:return(e=n.sent())&&this.setState({subscriptionEndpoint:e}),[2]}}))}))},n.prototype.getSubscriptionsUrlCandidated=function(e){var t=[];if(t.push(e.replace("https","wss").replace("http","ws")),e.includes("graph.cool")&&t.push("wss://subscriptions.graph.cool/v1/"+this.getProjectId(e)),e.includes("/simple/v1/")){var n=e.match(/https?:\/\/(.*?)\//);t.push("ws://"+n[1]+"/subscriptions/v1/"+this.getProjectId(e))}return t},n.prototype.wsEndpointValid=function(e){return new Promise((function(t){var n=new WebSocket(e,"graphql-ws");n.addEventListener("open",(function(e){n.send(JSON.stringify({type:"connection_init"}))})),n.addEventListener("message",(function(e){"connection_ack"===JSON.parse(e.data).type&&t(!0)})),n.addEventListener("error",(function(e){t(!1)})),setTimeout((function(){t(!1)}),1e3)}))},n.prototype.getProjectId=function(e){return e.split("/").slice(-1)[0]},n}(c.Component);function C(e,t){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)throw new N.InvalidSchemaError(i)}return r.state={schema:n.schema},e.p=r,"function"==typeof r.props.getRef&&r.props.getRef(r),_.setLinkCreator(n.createApolloLink),r.getSchema(),_.setSubscriptionEndpoint(n.subscriptionEndpoint),r}return i(n,t),n.prototype.UNSAFE_componentWillMount=function(){this.props.initState(k.getWorkspaceId(this.props),this.props.endpoint),this.props.setConfigString(this.props.configString),this.props.injectHeaders(this.props.headers,this.props.endpoint)},n.prototype.componentDidMount=function(){this.initialIndex>-1&&this.setState({selectedSessionIndex:this.initialIndex}),this.mounted=!0},n.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this;if(this.props.createApolloLink!==e.createApolloLink&&_.setLinkCreator(e.createApolloLink),e.headers===this.props.headers&&e.endpoint===this.props.endpoint&&e.workspaceName===this.props.workspaceName&&e.sessionHeaders===this.props.sessionHeaders&&e.sessionEndpoint===this.props.sessionEndpoint||this.getSchema(e),this.props.isReloadingSchema&&!e.isReloadingSchema&&setTimeout((function(){t.getSchema(e)})),this.props.endpoint===e.endpoint&&this.props.configPath===e.configPath&&e.workspaceName===this.props.workspaceName||this.props.initState(k.getWorkspaceId(e),e.endpoint),this.props.subscriptionEndpoint!==e.subscriptionEndpoint&&_.setSubscriptionEndpoint(e.subscriptionEndpoint),e.headers!==this.props.headers&&this.props.injectHeaders(e.headers,e.endpoint),e.configString!==this.props.configString&&this.props.setConfigString(e.configString),e.schema!==this.props.schema){var n=D.validateSchema(e.schema);if(n&&n.length>0)throw new N.InvalidSchemaError(n);this.setState({schema:e.schema})}},n.prototype.schemaGetter=function(e){return s(this,void 0,void 0,(function(){var t,n,r,i,o,s,c,l=this;return u(this,(function(u){switch(u.label){case 0:t=e||this.props,n=t.sessionEndpoint||t.endpoint,r=this.state.schema,i=t.settings["request.globalHeaders"],u.label=1;case 1:return u.trys.push([1,3,,4]),o={endpoint:n,headers:t.sessionHeaders&&t.sessionHeaders.length>0?JSON.stringify(a(a({},i),JSON.parse(t.sessionHeaders))):JSON.stringify(a(a({},i),t.headers)),credentials:t.settings["request.credentials"],useTracingHeader:!this.initialSchemaFetch&&t.settings["tracing.tracingSupported"]},[4,_.schemaFetcher.fetch(o)];case 2:return s=u.sent(),_.schemaFetcher.subscribe(o,(function(e){o.endpoint!==l.props.endpoint&&o.endpoint!==l.props.sessionEndpoint||l.updateSchema(r,e,t)})),s&&(this.updateSchema(r,s.schema,t),this.initialSchemaFetch&&(this.props.schemaFetchingSuccess(o.endpoint,s.tracingSupported,t.isPollingSchema),this.initialSchemaFetch=!1),this.backoff.stop()),[3,4];case 3:return c=u.sent(),console.error(c),this.props.schemaFetchingError(n,c.message),[3,4];case 4:return[2]}}))}))},n.prototype.render=function(){var e=y.version;return window.version=e,c.createElement(R,{className:"playground"},c.createElement(p.default,{onNewSession:this.createSession,isApp:this.props.isApp}),c.createElement(B,null,c.createElement(U,{className:"graphiql-wrapper active"},this.props.isConfigTab?c.createElement(m.GraphQLConfigEditor,{onSave:this.handleSaveConfig,isYaml:this.props.configIsYaml,isConfig:!0,readOnly:!this.props.canSaveConfig}):this.props.isSettingsTab?c.createElement(m.PlaygroundSettingsEditor,{onSave:this.handleSaveSettings}):this.props.isFile&&this.props.file?c.createElement(g.default,null):c.createElement(l.default,{shareEnabled:this.props.shareEnabled,fixedEndpoint:this.props.fixedEndpoint,schema:this.state.schema}))),c.createElement(h.default,null),this.props.historyOpen&&this.renderHistoryPopup())},n.prototype.renderHistoryPopup=function(){return c.createElement(f.default,null)},n.prototype.updateSchema=function(e,t,n){if(e!==t){var r=e?F.cachedPrintSchema(e):null;F.cachedPrintSchema(t)===r&&n.isPollingSchema||this.setState({schema:t})}},Object.defineProperty(n.prototype,"httpApiPrefix",{get:function(){return this.props.endpoint.match(/(https?:\/\/.*?)\/?/)[1]},enumerable:!0,configurable:!0}),n.defaultProps={shareEnabled:!1},n}(c.PureComponent);t.Playground=I;var M=C.createStructuredSelector({isConfigTab:w.getIsConfigTab,isSettingsTab:w.getIsSettingsTab,isFile:w.getIsFile,historyOpen:S.getHistoryOpen,file:w.getFile,sessionHeaders:w.getHeaders,settings:A.getSettings,settingsString:A.getSettingsString,isReloadingSchema:w.getIsReloadingSchema,isPollingSchema:w.getIsPollingSchema,sessionEndpoint:w.getEndpoint});t.default=v.connect(M,{selectTabIndex:b.selectTabIndex,selectNextTab:b.selectNextTab,selectPrevTab:b.selectPrevTab,newSession:b.newSession,closeSelectedTab:b.closeSelectedTab,initState:x.initState,saveSettings:b.saveSettings,saveConfig:b.saveConfig,setTracingSupported:b.setTracingSupported,injectHeaders:b.injectHeaders,setConfigString:E.setConfigString,schemaFetchingError:b.schemaFetchingError,schemaFetchingSuccess:b.schemaFetchingSuccess})(I);var j,L,P,R=d.styled.div(j||(j=o(["\n flex: 1;\n display: flex;\n flex-direction: column;\n\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n margin-right: -1px !important;\n\n line-height: 1.5;\n font-family: 'Open Sans', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n letter-spacing: 0.53px;\n color: rgba(0, 0, 0, 0.8);\n\n a:active,\n a:focus,\n button:focus,\n input:focus {\n outline: none;\n }\n"],["\n flex: 1;\n display: flex;\n flex-direction: column;\n\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n margin-right: -1px !important;\n\n line-height: 1.5;\n font-family: 'Open Sans', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n letter-spacing: 0.53px;\n color: rgba(0, 0, 0, 0.8);\n\n a:active,\n a:focus,\n button:focus,\n input:focus {\n outline: none;\n }\n"]))),B=d.styled.div(L||(L=o(["\n height: calc(100vh - 57px);\n position: relative;\n overflow: hidden;\n"],["\n height: calc(100vh - 57px);\n position: relative;\n overflow: hidden;\n"]))),U=d.styled.div(P||(P=o(["\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n visibility: hidden;\n &.active {\n visibility: visible;\n }\n"],["\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n visibility: hidden;\n &.active {\n visibility: visible;\n }\n"])))}).call(this,n(42))},function(e,t,n){"use strict";(function(e){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0?"("+this.props.headersCount+")":""))),this.props.queryVariablesActive?s.createElement(m.VariableEditorComponent,{getRef:this.setVariableEditorComponent,onHintInformationRender:this.props.queryVariablesActive?this.handleHintInformationRender:void 0,onRunQuery:this.runQueryAtCursor}):s.createElement(m.HeadersEditorComponent,{getRef:this.setVariableEditorComponent,onHintInformationRender:this.props.queryVariablesActive?this.handleHintInformationRender:void 0,onRunQuery:this.runQueryAtCursor})),s.createElement(X,{ref:this.setQueryResizer})),s.createElement(Y,null,s.createElement(Z,{ref:this.setResponseResizer}),s.createElement(l.default,null),this.props.queryRunning&&0===this.props.responses.size&&s.createElement(g.default,null),s.createElement(y.default,{setRef:this.setResultComponent}),!this.props.queryRunning&&(!this.props.responses||0===this.props.responses.size)&&s.createElement(ue,null,"Press the Play Button to get a response here"),this.props.subscriptionActive&&s.createElement(ce,null,"Listening …"),s.createElement(oe,{isOpen:this.props.responseTracingOpen,height:this.props.responseTracingHeight},s.createElement(ae,{isOpen:this.props.responseTracingOpen,onMouseDown:this.handleTracingResizeStart},s.createElement(ie,{isOpen:!1},"Tracing")),s.createElement(v.default,{open:this.props.responseTracingOpen}))))),s.createElement(D.default,{sessionId:this.props.sessionId,schema:this.props.schema,setActiveContentRef:this.setSideTabActiveContentRef,setWidth:this.setDocsWidth,maxWidth:1e4},s.createElement(x.default,{label:"Docs",activeColor:"green",tabWidth:"49px"},s.createElement(w.default,{schema:this.props.schema,ref:this.setDocExplorerRef})),s.createElement(x.default,{label:"Schema",activeColor:"blue",tabWidth:"65px"},s.createElement(C.default,{schema:this.props.schema,ref:this.setSchemaExplorerRef,sessionId:this.props.sessionId,setWidth:this.setDocsWidth}))))},n.prototype.autoCompleteLeafs=function(){var e=b.fillLeafs(this.props.schema,this.props.query),t=e.insertions,n=e.result;if(t&&t.length>0){var r=this.queryEditorComponent.getCodeMirror();r.operation((function(){var e=r.getCursor(),i=r.indexFromPos(e);r.setValue(n);var o=0;try{var a=t.map((function(e){var t=e.index,n=e.string;return r.markText(r.posFromIndex(t+o),r.posFromIndex(t+(o+=n.length)),{className:"autoInsertedLeaf",clearOnEnter:!0,title:"Automatically added leaf fields"})}));setTimeout((function(){return a.forEach((function(e){return e.clear()}))}),7e3)}catch(e){}var s=i;t.forEach((function(e){var t=e.index,n=e.string;t1,u=null;if(o&&i){var c=this.state.highlight;u=a.createElement(C,null,a.createElement(w,null,r.map((function(e){return a.createElement(s.default,{operation:e,onMouseOver:n.handleMouseOver,onMouseOut:n.handleMouseOut,onMouseUp:n.handleMouseUp,highlight:c,key:e.name?e.name.value:"*"})}))))}!this.props.queryRunning&&o||(e=this.onClick),this.props.queryRunning||!o||i||(t=this.onOptionsOpen);var l=this.props.queryRunning?a.createElement("rect",{fill:"#FFFFFF",x:"10",y:"10",width:"13",height:"13",rx:"1"}):a.createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"});return a.createElement(x,null,a.createElement(D,{isRunning:this.props.queryRunning,onMouseDown:t,onClick:e,title:"Execute Query (Ctrl-Enter)"},a.createElement("svg",{width:"35",height:"35",viewBox:(this.props.queryRunning?4:3)+".5,4.5,24,24"},l)),u)},t}(a.Component),g=p.createStructuredSelector({queryRunning:f.getQueryRunning,operations:f.getOperations,sessionId:f.getSelectedSessionIdFromRoot});t.default=c.connect(g,{runQuery:l.runQuery,stopQuery:l.stopQuery})(d.toJS(m));var y,v,b,E,x=u.styled.div(y||(y=o(["\n position: absolute;\n left: -62px;\n z-index: 5;\n top: 15px;\n margin: 0 14px 0 28px;\n"],["\n position: absolute;\n left: -62px;\n z-index: 5;\n top: 15px;\n margin: 0 14px 0 28px;\n"]))),D=u.styled("div")(v||(v=o(["\n width: 60px;\n height: 60px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: 100%;\n transition: background-color 100ms;\n background-color: ",";\n border: 6px solid ",";\n cursor: pointer;\n user-select: none;\n\n svg {\n fill: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"],["\n width: 60px;\n height: 60px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: 100%;\n transition: background-color 100ms;\n background-color: ",";\n border: 6px solid ",";\n cursor: pointer;\n user-select: none;\n\n svg {\n fill: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"])),(function(e){return e.isRunning?e.theme.editorColours.executeButtonSubscription:e.theme.editorColours.executeButton}),(function(e){return e.theme.editorColours.executeButtonBorder}),(function(e){return"light"===e.theme.mode?"white":"inherit"}),(function(e){return e.isRunning?e.theme.editorColours.executeButtonSubscriptionHover:e.theme.editorColours.executeButtonHover})),C=u.styled.div(b||(b=o(["\n background: #fff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.25);\n padding: 8px 0;\n left: -1px;\n margin: 0;\n position: absolute;\n top: 78px;\n z-index: 100;\n user-select: none;\n\n &:before {\n position: absolute;\n background: white;\n content: '';\n top: -4px;\n left: 34px;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n }\n"],["\n background: #fff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.25);\n padding: 8px 0;\n left: -1px;\n margin: 0;\n position: absolute;\n top: 78px;\n z-index: 100;\n user-select: none;\n\n &:before {\n position: absolute;\n background: white;\n content: '';\n top: -4px;\n left: 34px;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n }\n"]))),w=u.styled.ul(E||(E=o(["\n max-height: 270px;\n overflow: scroll;\n\n li {\n cursor: pointer;\n list-style: none;\n min-width: 100px;\n padding: 2px 30px 4px 10px;\n }\n\n li.selected {\n background: rgb(39, 174, 96);\n color: white;\n }\n"],["\n max-height: 270px;\n overflow: scroll;\n\n li {\n cursor: pointer;\n list-style: none;\n min-width: 100px;\n padding: 2px 30px 4px 10px;\n }\n\n li.selected {\n background: rgb(39, 174, 96);\n color: white;\n }\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(){t.props.onMouseOver(t.props.operation)},t.onMouseUp=function(){t.props.onMouseUp(t.props.operation)},t}return i(t,e),t.prototype.render=function(){return o.createElement("li",{key:this.props.operation.name?this.props.operation.name.value:"*",className:this.props.operation===this.props.highlight?"selected":"",onMouseOver:this.onMouseOver,onMouseOut:this.props.onMouseOut,onMouseUp:this.onMouseUp},this.props.operation.name?this.props.operation.name.value:"")},t}(o.PureComponent);t.default=a},function(e,t,n){"use strict";var r=n(22),i=n(321),o=n(325),a=n(326),s=n(334),u=n(348),c=n(361),l=n(102),p=n(176),f={default:n(363),zero:n(364),commonmark:n(365)},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!d.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function y(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return l.encode(l.format(t))}function v(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return l.decode(l.format(t),l.decode.defaultChars+"%")}function b(e,t){if(!(this instanceof b))return new b(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new u,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=m,this.normalizeLink=y,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return r.assign(this.options,e),this},b.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=f[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e,t,n){"use strict";var r={};function i(e,t,n){var o,a,s,u,c,l="";for("string"!=typeof t&&(n=t,t=i.defaultChars),void 0===n&&(n=!0),c=function(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){l+=encodeURIComponent(e[o]+e[o+1]),o++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[o]);return l}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},function(e,t,n){"use strict";var r={};function i(e,t){var n;return"string"!=typeof t&&(t=i.defaultChars),n=function(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),i.push(n);for(t=0;t=55296&&u<=57343?"���":String.fromCharCode(u),t+=6):240==(248&i)&&t+91114111?c+="����":(u-=65536,c+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),t+=9):c+="�";return c}))}i.defaultChars=";/?:@&=+$,#",i.componentChars="",e.exports=i},function(e,t,n){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),c=["%","/","?",";","#"].concat(u),l=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){var n,r,o,s,u,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var g=a.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var y=i.exec(m);if(y&&(o=(y=y[0]).toLowerCase(),this.protocol=y,m=m.substr(y.length)),(t||y||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(u="//"===m.substr(0,2))||y&&d[y]||(m=m.substr(2),this.slashes=!0)),!d[y]&&(u||y&&!h[y])){var v,b,E=-1;for(n=0;n127?S+="x":S+=w[_];if(!S.match(p)){var A=C.slice(0,n),T=C.slice(n+1),O=w.match(f);O&&(A.push(O[1]),T.unshift(O[2])),T.length&&(m=T.join(".")+m),this.hostname=A.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var F=m.indexOf("#");-1!==F&&(this.hash=m.substr(F),m=m.slice(0,F));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),h[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}},function(e,t){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){"use strict";t.parseLinkLabel=n(322),t.parseLinkDestination=n(323),t.parseLinkTitle=n(324)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s=-1,u=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos32)return s;if(41===i){if(0===o)break;o--}t++}return a===t||0!==o||(s.str=r(e.slice(a,t)),s.lines=0,s.pos=t,s.ok=!0),s}},function(e,t,n){"use strict";var r=n(22).unescapeAll;e.exports=function(e,t,n){var i,o,a=0,s=t,u={ok:!1,pos:0,lines:0,str:""};if(t>=n)return u;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return u;for(t++,40===o&&(o=41);t"+o(e[t].content)+""},a.code_block=function(e,t,n,r,i){var a=e[t];return""+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,u,c,l,p,f=e[t],d=f.info?i(f.info).trim():"",h="",m="";return d&&(h=(c=d.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(f.content,h,m)||o(f.content)).indexOf(""+s+"\n"):"
    "+s+"
    \n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}e.exports=function(e){var t,n,o,a,s,u,c,l,p,f,d,h,m,g,y,v,b,E,x=e.tokens;if(e.md.options.linkify)for(n=0,o=x.length;n=0;t--)if("link_close"!==(u=a[t]).type){if("html_inline"===u.type&&(E=u.content,/^\s]/i.test(E)&&m>0&&m--,i(u.content)&&m++),!(m>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(p=u.content,b=e.md.linkify.match(p),c=[],h=u.level,d=0,l=0;ld&&((s=new e.Token("text","",0)).content=p.slice(d,f),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",y]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),d=b[l].lastIndex);d=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(o,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(e){var t,n,i=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||i||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(i.test(e.tokens[t].content)&&u(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(22).isWhiteSpace,i=n(22).isPunctChar,o=n(22).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,a,c,l,p,f,d,h,m,g,y,v,b,E,x,D,C,w,S,_,k;for(S=[],n=0;n=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===a.type){p=0,f=(c=a.content).length;e:for(;p=0)m=c.charCodeAt(l.index-1);else for(C=n-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if(e[C].content){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,p=48&&m<=57&&(D=x=!1),x&&D&&(x=y,D=v),x||D){if(D)for(C=S.length-1;C>=0&&(h=S[C],!(S[C].level=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(124);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(123),i=[["table",n(335),["paragraph","reference"]],["code",n(336)],["fence",n(337),["paragraph","reference","blockquote","list"]],["blockquote",n(338),["paragraph","reference","blockquote","list"]],["hr",n(339),["paragraph","reference","blockquote","list"]],["list",n(340),["paragraph","reference","blockquote"]],["reference",n(341)],["html_block",n(342),["paragraph","reference","blockquote"]],["heading",n(344),["paragraph","reference","blockquote"]],["lheading",n(345)],["paragraph",n(346)]];function o(){this.ruler=new r;for(var e=0;e=n))&&!(e.sCount[a]=u){e.line=n;break}for(r=0;rn)return!1;if(f=t+1,e.sCount[f]=4)return!1;if((c=e.bMarks[f]+e.tShift[f])>=e.eMarks[f])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C)return!1;if(c>=e.eMarks[f])return!1;if(124!==(w=e.src.charCodeAt(c++))&&45!==w&&58!==w&&!r(w))return!1;if(45===C&&r(w))return!1;for(;c=4)return!1;if((d=o(u)).length&&""===d[0]&&d.shift(),d.length&&""===d[d.length-1]&&d.pop(),0===(h=d.length)||h!==g.length)return!1;if(a)return!0;for(E=e.parentType,e.parentType="table",D=e.md.block.ruler.getRules("blockquote"),(m=e.push("table_open","table",1)).map=v=[t,0],(m=e.push("thead_open","thead",1)).map=[t,t+1],(m=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l=4)break;for((d=o(u)).length&&""===d[0]&&d.shift(),d.length&&""===d[d.length-1]&&d.pop(),f===t+2&&((m=e.push("tbody_open","tbody",1)).map=b=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[f,f+1],l=0;l=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c,l,p=!1,f=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>d)return!1;if(126!==(i=e.src.charCodeAt(f))&&96!==i)return!1;if(u=f,(o=(f=e.skipChars(f,i))-u)<3)return!1;if(l=e.src.slice(u,f),a=e.src.slice(f,d),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((f=u=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.sCount[s]=4||(f=e.skipChars(f,i))-u=4)return!1;if(62!==e.src.charCodeAt(_++))return!1;if(i)return!0;for(u=d=e.sCount[t]+1,32===e.src.charCodeAt(_)?(_++,u++,d++,o=!1,E=!0):9===e.src.charCodeAt(_)?(E=!0,(e.bsCount[t]+d)%4==3?(_++,u++,d++,o=!1):o=!0):E=!1,h=[e.bMarks[t]],e.bMarks[t]=_;_=k,v=[e.sCount[t]],e.sCount[t]=d-u,b=[e.tShift[t]],e.tShift[t]=_-e.bMarks[t],D=e.md.block.ruler.getRules("blockquote"),y=e.parentType,e.parentType="blockquote",f=t+1;f=(k=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(_++)||w){if(l)break;for(x=!1,s=0,c=D.length;s=k,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(E?1:0),v.push(e.sCount[f]),e.sCount[f]=d-u,b.push(e.tShift[f]),e.tShift[f]=_-e.bMarks[f]}for(g=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=p=[t,0],e.md.block.tokenize(e,t,f),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=y,p[1]=e.line,s=0;s=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c=a)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(M=!0),(A=o(e,t))>=0){if(f=!0,O=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(O,A-1)),M&&1!==v)return!1}else{if(!((A=i(e,t))>=0))return!1;f=!1}if(M&&e.skipSpaces(A)>=e.eMarks[t])return!1;if(y=e.src.charCodeAt(A-1),r)return!0;for(g=e.tokens.length,f?(I=e.push("ordered_list_open","ol",1),1!==v&&(I.attrs=[["start",v]])):I=e.push("bullet_list_open","ul",1),I.map=m=[t,0],I.markup=String.fromCharCode(y),E=t,T=!1,N=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";E=b?1:x-p)>4&&(l=1),c=p+l,(I=e.push("list_item_open","li",1)).markup=String.fromCharCode(y),I.map=d=[t,0],f&&(I.info=e.src.slice(O,A-1)),_=e.tight,S=e.tShift[t],w=e.sCount[t],D=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(j=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=D,e.tShift[t]=S,e.sCount[t]=w,e.tight=_,(I=e.push("list_item_close","li",-1)).markup=String.fromCharCode(y),E=t=e.line,d[1]=E,s=e.bMarks[t],E>=n)break;if(e.sCount[E]=4)break;for(F=!1,u=0,h=N.length;u=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[S]<0)){for(b=!1,p=0,f=E.length;p|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(u=e.src.slice(c,l),i=0;i=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=l)return!1;for(a=1,o=e.src.charCodeAt(++c);35===o&&c6||cc&&r(e.src.charCodeAt(s-1))&&(l=s),e.line=t+1,(u=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[t,e.line],(u=e.push("inline","",0)).content=e.src.slice(c,l).trim(),u.map=[t,e.line],u.children=[],(u=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,u,c,l,p,f,d=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";d3)){if(e.sCount[d]>=e.blkIndent&&(u=e.bMarks[d]+e.tShift[d])<(c=e.eMarks[d])&&(45===(p=e.src.charCodeAt(u))||61===p)&&(u=e.skipChars(u,p),(u=e.skipSpaces(u))>=c)){l=61===p?1:2;break}if(!(e.sCount[d]<0)){for(i=!1,o=0,a=h.length;o3||e.sCount[u]<0)){for(r=!1,i=0,o=c.length;i0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,u,c,l,p,f=e;if(e>=t)return"";for(l=new Array(t-e),o=0;fn?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(123),i=[["text",n(349)],["newline",n(350)],["escape",n(351)],["backticks",n(352)],["strikethrough",n(174).tokenize],["emphasis",n(175).tokenize],["link",n(353)],["image",n(354)],["autolink",n(355)],["html_inline",n(356)],["entity",n(357)]],o=[["balance_pairs",n(358)],["strikethrough",n(174).postProcess],["emphasis",n(175).postProcess],["text_collapse",n(359)]];function a(){var e;for(this.ruler=new r,e=0;e=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=m)return!1;if(g=c,(l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(f=e.md.normalizeLink(l.str),e.md.validateLink(f)?c=l.pos:f="",g=c;c=m||41!==e.src.charCodeAt(c))&&(y=!0),c++}if(y){if(void 0===e.env.references)return!1;if(c=0?a=e.src.slice(g,c++):c=s+1):c=s+1,a||(a=e.src.slice(u,s)),!(p=e.env.references[r(a)]))return e.pos=h,!1;f=p.href,d=p.title}return t||(e.pos=u,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",f]],d&&n.push(["title",d]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(22).normalizeReference,i=n(22).isSpace;e.exports=function(e,t){var n,o,a,s,u,c,l,p,f,d,h,m,g,y="",v=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=u+1)=b)return!1;for(g=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(y=e.md.normalizeLink(f.str),e.md.validateLink(y)?l=f.pos:y=""),g=l;l=b||41!==e.src.charCodeAt(l))return e.pos=v,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?s=e.src.slice(g,l++):l=u+1):l=u+1,s||(s=e.src.slice(c,u)),!(p=e.env.references[r(s)]))return e.pos=v,!1;y=p.href,d=p.title}return t||(a=e.src.slice(c,u),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",y],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=b,!0}},function(e,t,n){"use strict";var r=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,i=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,t){var n,o,a,s,u,c,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(u=e.pos,c=e.posMax;;){if(++l>=c)return!1;if(60===(s=e.src.charCodeAt(l)))return!1;if(62===s)break}return n=e.src.slice(u+1,l),i.test(n)?(o=e.md.normalizeLink(n),!!e.md.validateLink(o)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",o]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0)):!!r.test(n)&&(o=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(o)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",o]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0))}},function(e,t,n){"use strict";var r=n(173).HTML_TAG_RE;e.exports=function(e,t){var n,i,o,a=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(i=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(171),i=n(22).has,o=n(22).isValidEntityCode,a=n(22).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1a;r-=o.jump+1)if((o=t[r]).marker===i.marker&&o.open&&o.end<0&&(u=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(u=!0)),!u)){c=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+c,i.open=!1,o.end=n,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(l[i.marker][(i.open?3:0)+(i.length||0)%3]=s)}}e.exports=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(0,e.delimiters),t=0;t0&&r++,"text"===i[t].type&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var n,r,s,u,c,l,p,f,d,h=e,m=!0,g=!0,y=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function l(e){var t=e.re=n(362)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var u=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===i(n))return!function(e){return"[object RegExp]"===i(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(n)?c(t,n):u.push(t)}})),u.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function f(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function d(e,t){if(!(this instanceof d))return new d(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},u,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}d.prototype.add=function(e,t){return this.__schemas__[e]=t,l(this),this},d.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},d.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,u;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},d.prototype.pretest=function(e){return this.re.pretest.test(e)},d.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},d.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(f(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),l(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,l(this),this)},d.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},d.prototype.onCompile=function(){},e.exports=d},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(120).source,t.src_Cc=n(121).source,t.src_Z=n(122).source,t.src_P=n(88).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e,t,n){"use strict"; +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,i=r.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;at.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==o){var l=function(e,t,n){var i=r(e,t,"widget");if("function"==typeof i&&(i=i(n.from,n.to)),"string"==typeof i){var o=document.createTextNode(i);(i=document.createElement("span")).appendChild(o),i.className="CodeMirror-foldmarker"}else i&&(i=i.cloneNode(!0));return i}(t,i,c);e.on(l,"mousedown",(function(t){p.clear(),e.e_preventDefault(t)}));var p=t.markText(c.from,c.to,{replacedWith:l,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});p.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,c.from,c.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=t.length,r=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],i=e.Pos;e.Vim=function(){function o(t,n){this==e.keyMap.vim&&(e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){u(e),e.off("cursorActivity",s),e.state.fatCursorMarks=null}(t),t.getInputField().style.caretColor="")),n&&n.attach==a||function(t){t.setOption("disableInput",!1),t.off("cursorActivity",et),e.off(t.getInputField(),"paste",f(t)),t.state.vim=null}(t)}function a(t,n){this==e.keyMap.vim&&(e.addClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){e.state.fatCursorMarks=[],s(e),e.on("cursorActivity",s)}(t),t.getInputField().style.caretColor="transparent")),n&&n.attach==a||function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",et),P(t),e.on(t.getInputField(),"paste",f(t))}(t)}function s(e){if(e.state.fatCursorMarks){u(e);for(var t=e.listSelections(),n=[],r=0;r")}(t);if(!r)return!1;var i=e.Vim.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}e.defineOption("vimMode",!1,(function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var l={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},p={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function f(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(X(e.getCursor(),0,1)),Q.enterInsertMode(e,{},t))}),t.onPasteFn}var d=/[\d]/,h=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],m=[function(e){return/\S/.test(e)}];function g(e,t){for(var n=[],r=e;r"]),x=[].concat(y,v,b,["-",'"',".",":","_","/"]);function D(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function w(e){return/^[A-Z]$/.test(e)}function S(e){return/^\s*$/.test(e)}function _(e){return-1!=".?!".indexOf(e)}function k(e,t){for(var n=0;nt?e=t:e0?1:-1,c=i.getCursor();do{if((a=r[(100+(e+=u))%100])&&(s=a.find())&&!ne(c,s))break}while(en)}return a}return{cachedCursor:void 0,add:function(i,o,a){var s=r[e%100];function u(t){var n=++e%100,o=r[n];o&&o.clear(),r[n]=i.setBookmark(t)}if(s){var c=s.find();c&&!ne(c,o)&&u(o)}else u(o);u(a),t=e,(n=e-100+1)<0&&(n=0)},find:function(t,n){var r=e,o=i(t,n);return e=r,o&&o.find()},move:i}},j=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function L(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=j()}function P(e){return e.state.vim||(e.state.vim={inputState:new U,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function R(){for(var e in N={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:M(),macroModeState:new L,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new H,exCommandHistoryController:new H},A){var t=A[e];t.value=t.defaultValue}}L.prototype={exitMacroRecordMode:function(){var e=N.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=N.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var B={buildKeyMap:function(){},getRegisterController:function(){return N.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return N},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:rt,map:function(e,t,n){Qe.map(e,t,n)},unmap:function(e,t){Qe.unmap(e,t)},noremap:function(e,r,i){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(i),s=t.length,u=s-n;u=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var u=["normal","insert","visual"];for(var c in u)if(u[c]!==e){var l={};for(var p in s)l[p]=s[p];l.context=u[c],this._mapCommand(l)}}}},setOption:O,getOption:F,defineOption:T,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Je[e]=n,Qe.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,i){var o,a=P(n);function s(){var e=N.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),z(n),!0;"mapping"!=i&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=N.registerController.getRegister(n);r&&r.pushText(t)}}(e,r)}}function u(){if(""==r)return z(n),a.visualMode?me(n):a.insertMode&&Ye(n),!0}return!1===(o=a.insertMode?function(){if(u())return!0;for(var e=a.inputState.keyBuffer=a.inputState.keyBuffer+r,i=1==r.length,o=W.matchCommand(e,t,a.inputState,"insert");e.length>1&&"full"!=o.type;){e=a.inputState.keyBuffer=e.slice(1);var s=W.matchCommand(e,t,a.inputState,"insert");"none"!=s.type&&(o=s)}if("none"==o.type)return z(n),!1;if("partial"==o.type)return I&&window.clearTimeout(I),I=window.setTimeout((function(){a.insertMode&&a.inputState.keyBuffer&&z(n)}),F("insertModeEscKeysTimeout")),!i;if(I&&window.clearTimeout(I),i){for(var c=n.listSelections(),l=0;l|<\w+>|./.exec(t),r=i[0],t=t.substring(i.index+r.length),e.Vim.handleKey(n,r,"mapping")}(o.toKeys):W.processCommand(n,a,o)}catch(t){throw n.state.vim=void 0,P(n),e.Vim.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Qe.processCommand(e,t)},defineMotion:function(e,t){G[e]=t},defineAction:function(e,t){Q[e]=t},defineOperator:function(e,t){J[e]=t},mapCommand:function(e,t,n,r,i){var o={keys:e,type:t};for(var a in o[t]=n,o[t+"Args"]=r,i)o[a]=i[a];$e(o)},_mapCommand:$e,defineRegister:function(e,t){var n=N.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,x.push(e)},exitVisualMode:me,exitInsertMode:Ye};function U(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function z(t,n){t.state.vim.inputState=new U,e.signal(t,"vim-command-done",n)}function V(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function q(e){this.registers=e,this.unnamedRegister=e['"']=new V,e["."]=new V,e[":"]=new V,e["/"]=new V}function H(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}U.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},U.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},V.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(j(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(e,t,n,r,i){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)w(e)?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r);else{switch(t){case"yank":this.registers[0]=new V(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new V(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new V(n,r))}this.unnamedRegister.setText(n,r,i)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new V),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&k(e,x)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},H.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var W={matchCommand:function(e,t,n,r){var i,o=function(e,t,n,r){for(var i,o=[],a=[],s=0;s"==i.keys.slice(-11)){var u=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}(e);if(!u)return{type:"none"};n.selectedCharacter=u}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=$(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);z(e)}r.operator=n.operator,r.operatorArgs=$(n.operatorArgs),n.exitVisualBlock&&(t.visualBlock=!1,de(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=$(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=$(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,z(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Q[n.action](e,a,t)},processSearch:function(t,n,r){if(t.getSearchCursor){var i=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;Te(t).setReversed(!i);var a=i?"/":"?",s=Te(t).getQuery(),u=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var c=N.macroModeState;c.isPlaying?d(f=c.replaySearchQueries.shift(),!0,!1):Re(t,{onClose:function(e){t.scrollTo(u.left,u.top),d(e,!0,!0);var n=N.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=N.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}(n,e)},prefix:a,desc:Pe,onKeyUp:function(n,r,o){var a,s,c,l=e.keyName(n);"Up"==l||"Down"==l?(a="Up"==l,s=n.target?n.target.selectionEnd:0,o(r=N.searchHistoryController.nextMatch(r,a)||""),s&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(s,n.target.value.length))):"Left"!=l&&"Right"!=l&&"Ctrl"!=l&&"Alt"!=l&&"Shift"!=l&&N.searchHistoryController.reset();try{c=Be(t,r,!0,!0)}catch(n){}c?t.scrollIntoView(Ve(t,!i,c),30):(qe(t),t.scrollTo(u.left,u.top))},onKeyDown:function(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(N.searchHistoryController.pushInput(r),N.searchHistoryController.reset(),Be(t,s),qe(t),t.scrollTo(u.left,u.top),e.e_stop(n),z(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}});break;case"wordUnderCursor":var l=ye(t,!1,0,!1,!0),p=!0;if(l||(l=ye(t,!1,0,!1,!1),p=!1),!l)return;var f=t.getLine(l.start.line).substring(l.start.ch,l.end.ch);f=p&&o?"\\b"+f+"\\b":f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),N.jumpList.cachedCursor=t.getCursor(),t.setCursor(l.start),d(f,!0,!1)}}function d(e,i,o){N.searchHistoryController.pushInput(e),N.searchHistoryController.reset();try{Be(t,e,i,o)}catch(n){return Le(t,"Invalid regex: "+e),void z(t)}W.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}},processEx:function(t,n,r){function i(e){N.exCommandHistoryController.pushInput(e),N.exCommandHistoryController.reset(),Qe.processCommand(t,e)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(N.exCommandHistoryController.pushInput(r),N.exCommandHistoryController.reset(),e.e_stop(n),z(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,i(r=N.exCommandHistoryController.nextMatch(r,o)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&N.exCommandHistoryController.reset()}"keyToEx"==r.type?Qe.processCommand(t,r.exArgs.input):n.visualMode?Re(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):Re(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,r,o,a=t.inputState,s=a.motion,u=a.motionArgs||{},c=a.operator,l=a.operatorArgs||{},p=a.registerName,f=t.sel,d=te(t.visualMode?Y(e,f.head):e.getCursor("head")),h=te(t.visualMode?Y(e,f.anchor):e.getCursor("anchor")),m=te(d),g=te(h);if(c&&this.recordLastEdit(t,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&u.explicitRepeat?u.repeatIsExplicit=!0:(u.noRepeat||!u.explicitRepeat&&0===o)&&(o=1,u.repeatIsExplicit=!1),a.selectedCharacter&&(u.selectedCharacter=l.selectedCharacter=a.selectedCharacter),u.repeat=o,z(e),s){var y=G[s](e,d,u,t,a);if(t.lastMotion=G[s],!y)return;if(u.toJumplist){var v=N.jumpList,b=v.cachedCursor;b?(ve(e,b,y),delete v.cachedCursor):ve(e,d,y)}y instanceof Array?(r=y[0],n=y[1]):n=y,n||(n=te(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=Y(e,n)),r&&(r=Y(e,r)),r=r||g,f.anchor=r,f.head=n,de(e),Se(e,t,"<",re(r,n)?r:n),Se(e,t,">",re(r,n)?n:r)):c||(n=Y(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){r=g;var E=l.lastSel,x=Math.abs(E.head.line-E.anchor.line),D=Math.abs(E.head.ch-E.anchor.ch);n=E.visualLine?i(g.line+x,g.ch):E.visualBlock?i(g.line+x,g.ch+D):E.head.line==E.anchor.line?i(g.line,g.ch+D):i(g.line+x,g.ch),t.visualMode=!0,t.visualLine=E.visualLine,t.visualBlock=E.visualBlock,f=t.sel={anchor:r,head:n},de(e)}else t.visualMode&&(l.lastSel={anchor:te(f.anchor),head:te(f.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,w,_,k,A;if(t.visualMode){if(C=ie(f.head,f.anchor),w=oe(f.head,f.anchor),_=t.visualLine||l.linewise,A=he(e,{anchor:C,head:w},k=t.visualBlock?"block":_?"line":"char"),_){var T=A.ranges;if("block"==k)for(var O=0;O0&&o&&S(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=se(e,n.line)):n.ch=0}}(e,C,w),A=he(e,{anchor:C,head:w},k="char",!u.inclusive||_)}e.setSelections(A.ranges,A.primary),t.lastMotion=null,l.repeat=o,l.registerName=p,l.linewise=_;var I=J[c](e,l,A.ranges,g,n);t.visualMode&&me(e,null!=I),I&&e.setCursor(I)}},recordLastEdit:function(e,t,n){var r=N.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},G={moveToTopLine:function(e,t,n){var r=He(e).top+n.repeat-1;return i(r,ge(e.getLine(r)))},moveToMiddleLine:function(e){var t=He(e),n=Math.floor(.5*(t.top+t.bottom));return i(n,ge(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=He(e).bottom-n.repeat+1;return i(r,ge(e.getLine(r)))},expandToLine:function(e,t,n){return i(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var r=Te(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,ze(e,i),Ve(e,o,i,n.repeat)}},findAndSelectNextInclusive:function(t,n,r,o,a){var s=Te(t),u=s.getQuery();if(u){var c=!r.forward,l=function(e,t,n,r,o){return void 0===r&&(r=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(n,a),u=s.find(!t);!o.visualMode&&u&&ne(s.from(),a)&&s.find(!t);for(var c=0;cu:p.linel&&o.line==l?Ce(e,t,n,r,!0):(n.toFirstChar&&(a=ge(e.getLine(u)),r.lastHPos=a),r.lastHSPos=e.charCoords(i(u,a),"div").left,i(u,a))},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left}var a=n.repeat;if((u=e.findPosV(o,n.forward?a:-a,"line",r.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(u,"div").top+8,left:r.lastHSPos},u=e.coordsChar(s,"div");else{var c=e.charCoords(i(e.firstLine(),0),"div");c.left=r.lastHSPos,u=e.coordsChar(c,"div")}return r.lastHPos=u.ch,u},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return ke(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return function(e,t,n,r){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!D(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,n,r){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},u=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!u)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!S(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!_(a.line[a.pos])||i||a.pos!==a.line.length-1&&!S(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var l=c.length-1;l>=0;--l)if(!S(c[l])){s.pos=l;break}return s}function s(e,t,n,r){var i={line:u=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(_(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||S(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var u=e.getLine(a.ln);a.pos=0;for(var c=0;c0;)u=r<0?s(e,u.ln,u.pos,r):a(e,u.ln,u.pos,r),n--;return i(u.ln,u.pos)}(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(o=G.moveByDisplayLines(e,t,n,r)))return null;var u=e.charCoords(o,"local");return e.scrollTo(null,i.top+u.top-s.top),o},moveByWords:function(e,t,n){return function(e,t,n,r,o,a){var s=te(t),u=[];(r&&!o||!r&&o)&&n++;for(var c=!(r&&o),l=0;l0)p.index=0;else{var m=p.lineText.length;p.index=m>0?m-1:0}p.nextCh=p.lineText.charAt(p.index)}h(p)&&(o.line=c,o.ch=p.index,t--)}return p.nextCh||p.curMoveThrough?i(c,p.index):o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return Y(e,i(n,t-1))}(e,o)},moveToEol:function(e,t,n,r){return Ce(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return i(n.line,ge(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,r=t,o=r.line,a=r.ch,s=e.getLine(o);a"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(i(o,a),{bracketRegex:c}).to}return r},moveToStartOfLine:function(e,t){return i(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),i(r,ge(e.getLine(r)))},textObjectManipulation:function(t,n,r,o){var a=r.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,u=!r.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[a])s=function(e,t,n,r){var o,a,s=t,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],l=e.getLine(s.line).charAt(s.ch)===c?1:0;if(o=e.scanForBracket(i(s.line,s.ch+l),-1,void 0,{bracketRegex:u}),a=e.scanForBracket(i(s.line,s.ch+l),1,void 0,{bracketRegex:u}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var p=o;o=a,a=p}return r?a.ch+=1:o.ch+=1,{start:o,end:a}}(t,n,a,u);else if({"'":!0,'"':!0,"`":!0}[a])s=function(e,t,n,r){var o,a,s,u,c=te(t),l=e.getLine(c.line).split(""),p=l.indexOf(n);if(c.ch-1&&!o;s--)l[s]==n&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,u=l.length;st.lastLine()&&n.linewise&&!h?t.replaceRange("",d,c):t.replaceRange("",u,c),n.linewise&&(h||(t.setCursor(d),e.commands.newlineAndIndent(t)),u.ch=Number.MAX_VALUE),o=u}N.registerController.pushText(n.registerName,"change",a,n.linewise,r.length>1),Q.enterInsertMode(t,{head:o},t.state.vim)},delete:function(e,t,n){var r,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=K("",n.length);e.replaceSelections(s),r=n[0].anchor}else{var u=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&u.line==e.lastLine()&&u.line==c.line-1&&(u.line==e.firstLine()?u.ch=0:u=i(u.line-1,se(e,u.line-1))),o=e.getRange(u,c),e.replaceRange("",u,c),r=u,t.linewise&&(r=G.moveToFirstNonWhiteSpaceCharacter(e,u))}return N.registerController.pushText(t.registerName,"delete",o,t.linewise,a.visualBlock),Y(e,r)},indent:function(e,t,n){var r=e.state.vim,i=n[0].anchor.line,o=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var u=0;uc.top?(u.line+=(s-c.top)/i,u.line=Math.ceil(u.line),e.setCursor(u),c=e.charCoords(u,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var l=s+e.getScrollInfo().clientHeight;l=a.anchor.line?X(a.head,0,1):i(a.anchor.line,0)}else if("inplace"==o){if(r.visualMode)return}else"lastEdit"==o&&(s=Ge(t)||s);t.setOption("disableInput",!1),n&&n.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})),N.macroModeState.isPlaying||(t.on("change",Ze),e.on(t.getInputField(),"keydown",it)),r.visualMode&&me(t),pe(t,s,u)}},toggleVisualMode:function(t,n,r){var o,a=n.repeat,s=t.getCursor();r.visualMode?r.visualLine^n.linewise||r.visualBlock^n.blockwise?(r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),de(t)):me(t):(r.visualMode=!0,r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,o=Y(t,i(s.line,s.ch+a-1)),r.sel={anchor:s,head:o},e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),de(t),Se(t,r,"<",ie(s,o)),Se(t,r,">",oe(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&fe(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,de(t),Se(t,r,"<",ie(o,a)),Se(t,r,">",oe(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),re(o=e.getCursor("head"),r)){var a=o;o=r,r=a}o.ch=se(e,o.line)-1}else{var s=Math.max(t.repeat,2);r=e.getCursor(),o=Y(e,i(r.line+s-1,1/0))}for(var u=0,c=r.line;c1&&(d=Array(t.repeat+1).join(d));var h,m,g=o.linewise,y=o.blockwise;if(y){d=d.split("\n"),g&&d.pop();for(var v=0;ve.lastLine()&&e.replaceRange("\n",i(_,0)),se(e,_)l.length&&(o=l.length),a=i(u.line,o)}if("\n"==s)r.visualMode||t.replaceRange("",u,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var p=t.getRange(u,a);if(p=p.replace(/[^\n]/g,s),r.visualBlock){var f=new Array(t.getOption("tabSize")+1).join(" ");p=(p=t.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(p)}else t.replaceRange(p,u,a);r.visualMode?(u=re(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(u),me(t,!1)):t.setCursor(X(a,0,-1))}},incrementNumberToken:function(e,t){for(var n,r,o,a,s=e.getCursor(),u=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=c.exec(u))&&(o=(r=n.index)+n[0].length,!(s.ch"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,n){return function(){for(var r=0;r2&&(t=ie.apply(void 0,Array.prototype.slice.call(arguments,1))),re(e,t)?e:t}function oe(e,t){return arguments.length>2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),re(e,t)?t:e}function ae(e,t,n){var r=re(e,t),i=re(t,n);return r&&i}function se(e,t){return e.getLine(t).length}function ue(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ce(e,t,n){var r=se(e,t),o=new Array(n-r+1).join(" ");e.setCursor(i(t,r)),e.replaceRange(o,e.getCursor())}function le(e,t){var n=[],r=e.listSelections(),o=te(e.clipPos(t)),a=!ne(t,o),s=function(e,t,n){for(var r=0;rs?c:0,p=r[l].anchor,f=Math.min(p.line,o.line),d=Math.max(p.line,o.line),h=p.ch,m=o.ch,g=r[l].head.ch-h,y=m-h;g>0&&y<=0?(h++,a||m--):g<0&&y>=0?(h--,u||m++):g<0&&-1==y&&(h--,m++);for(var v=f;v<=d;v++){var b={anchor:new i(v,h),head:new i(v,m)};n.push(b)}return e.setSelections(n),t.ch=m,p.ch=h,p}function pe(e,t,n){for(var r=[],i=0;ic&&(o.line=c),o.ch=se(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==n){for(var l=Math.min(a.line,o.line),p=Math.min(a.ch,o.ch),f=Math.max(a.line,o.line),d=Math.max(a.ch,o.ch)+1,h=f-l+1,m=o.line==l?0:h-1,g=[],y=0;y=s.length)return null;r?c=m[0]:(c=h[0])(s.charAt(u))||(c=h[1]);for(var l=u,p=u;c(s.charAt(l))&&l=0;)p--;if(p++,t){for(var f=l;/\s/.test(s.charAt(l))&&l0;)p--;p||(p=d)}}return{start:i(a.line,p),end:i(a.line,l)}}function ve(e,t,n){ne(t,n)||N.jumpList.add(e,t,n)}function be(e,t){N.lastCharacterSearch.increment=e,N.lastCharacterSearch.forward=t.forward,N.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var Ee={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},xe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function De(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),u=n?1:-1,c=r?m:h;if(i&&""==s){if(o+=u,s=e.getLine(o),!D(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var l=u>0?s.length:-1,p=l,f=l;a!=l;){for(var d=!1,g=0;g0?0:s.length}}function Ce(e,t,n,r,o){var a=i(t.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(r.lastHPos=1/0,r.lastHSPos=e.charCoords(s,"div").left),a}function we(e,t,n,r){for(var o,a=e.getCursor(),s=a.ch,u=0;u0;)f(l,r)&&n--,l+=r;return new i(l,0)}var d=e.state.vim;if(d.visualLine&&f(s,1,!0)){var h=d.sel.anchor;f(h.line,-1,!0)&&(o&&h.line==s||(s+=1))}var m=p(s);for(l=s;l<=c&&n;l++)f(l,1,!0)&&(o&&p(l)==m||n--);for(a=new i(l,0),l>c&&!m?m=!0:o=!1,l=s;l>u&&(o&&p(l)!=m&&l!=s||!f(l,-1,!0));l--);return{start:new i(l,0),end:a}}function Ae(){}function Te(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Ae)}function Oe(e,t,n,r,i){e.openDialog?e.openDialog(t,r,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp,selectValueOnOpen:!1}):r(prompt(n,""))}function Fe(e,t){var n=Ne(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var i=0;i'+t+"",{bottom:!0,duration:5e3}):alert(t)}var Pe="(Javascript regexp)";function Re(e,t){var n,r,i,o=(t.prefix||"")+" "+(t.desc||"");Oe(e,(n=t.prefix,r=t.desc,i=''+(n||"")+'',r&&(i+=' '+r+""),i),o,t.onClose,t)}function Be(e,t,n,r){if(t){var i=Te(e),o=je(t,!!n,!!r);if(o)return ze(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=We(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=ue(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
    ";if(n){n=n.join("");for(var o=0;o")}else for(var a in r){var s=r[a].toString();s.length&&(i+='"'+a+" "+s+"
    ")}Le(e,i)},sort:function(t,n){var r,o,a,s,u,c=function(){if(n.argString){var t=new e.StringStream(n.argString);if(t.eat("!")&&(r=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var i=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!i&&!t.eol())return"Invalid arguments";if(i[1]){o=-1!=i[1].indexOf("i"),a=-1!=i[1].indexOf("u");var c=-1!=i[1].indexOf("d")||-1!=i[1].indexOf("n")&&1,l=-1!=i[1].indexOf("x")&&1,p=-1!=i[1].indexOf("o")&&1;if(c+l+p>1)return"Invalid arguments";s=(c?"decimal":l&&"hex")||p&&"octal"}i[2]&&(u=new RegExp(i[2].substr(1,i[2].length-2),o?"i":""))}}();if(c)Le(t,c+": "+n.argString);else{var l=n.line||t.firstLine(),p=n.lineEnd||n.line||t.lastLine();if(l!=p){var f=i(l,0),d=i(p,se(t,p)),h=t.getRange(f,d).split("\n"),m=u||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),g="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,y=[],v=[];if(s||u)for(var b=0;b");if(r){var f=0,d=function(){if(f=n&&e<=s:e==n);)if(r||!p||a.from().line!=p.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),p=a.from(),void(l=!1);var e,n,s;l=!0}function m(e){if(e&&e(),t.focus(),p){t.setCursor(p);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=p.ch}c&&c()}if(h(),!l)return n?void Re(t,{prefix:"replace with "+u+" (y/n/a/q/l)",onKeyDown:function(n,r,i){switch(e.e_stop(n),e.keyName(n)){case"Y":d(),h();break;case"N":h();break;case"A":var o=c;c=void 0,t.operation(f),c=o;break;case"L":d();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(i)}return l&&m(i),!0}}):(f(),void(c&&c()));Le(t,"No matches for "+s.source)}(t,p,f,m,g,v,h,l,n.callback)}else Le(t,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){qe(e)},yank:function(e){var t=te(e.getCursor()).line,n=e.getLine(t);N.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(t,n){if(n.argString&&ue(n.argString))for(var r=t.state.vim,i=new e.StringStream(ue(n.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Le(t,"Invalid argument: "+n.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Le(t,"Invalid argument: "+n.argString.substring(o));var s=a,u=i.next();if(!(C(s)&&C(u)||w(s)&&w(u)))return void Le(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),l=u.charCodeAt(0);if(c>=l)return void Le(t,"Invalid argument: "+n.argString.substring(o));for(var p=0;p<=l-c;p++){var f=String.fromCharCode(c+p);delete r.marks[f]}}else delete r.marks[a]}else Le(t,"Argument required")}},Qe=new Ke;function Ye(t){var n=t.state.vim,r=N.macroModeState,i=N.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges;o||(t.off("change",Ze),e.off(t.getInputField(),"keydown",it)),!o&&n.insertModeRepeat>1&&(ot(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,n=N.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function $e(e){t.unshift(e)}function Xe(t,n,r,i){var o=N.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Qe.processCommand(t,o.keyBuffer[0]),void(r.isPlaying=!1);var a=o.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var u=0;u|<\w+>|./.exec(p))[0],p=p.substring(c.index+l.length),e.Vim.handleKey(t,l,"macro"),n.insertMode){var f=o.insertModeChanges[s++].changes;N.macroModeState.lastInsertModeChanges.changes=f,at(t,f,1),Ye(t)}r.isPlaying=!1}function Ze(e,t){var n=N.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(r.ignoreCount=i);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o))}t=t.next}}function et(t){var n=t.state.vim;if(n.insertMode){var r=N.macroModeState;if(r.isPlaying)return;var i=r.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else t.curOp.isVimOp||function(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?me(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=re(i,r)?0:-1,a=re(i,r)?-1:0;i=X(i,0,o),r=X(r,0,a),n.sel={anchor:r,head:i},Se(t,n,"<",ie(i,r)),Se(t,n,">",oe(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}(t,n);n.visualMode&&tt(t)}function tt(e){var t=e.state.vim,n=Y(e,te(t.sel.head)),r=X(n,0,1);if(nt(t),n.ch==e.getLine(n.line).length){var i=document.createElement("span");i.textContent=" ",i.className="cm-animate-fat-cursor",t.fakeCursorBookmark=e.setBookmark(n,{widget:i})}else t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function nt(e){e.fakeCursor&&(e.fakeCursor.clear(),e.fakeCursor=null),e.fakeCursorBookmark&&(e.fakeCursorBookmark.clear(),e.fakeCursorBookmark=null)}function rt(e){this.keyName=e}function it(t){var n=N.macroModeState.lastInsertModeChanges,r=e.keyName(t);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||e.lookupKey(r,"vim-insert",(function(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new rt(r)),!0})))}function ot(e,t,n,r){var i=N.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?W.processAction(e,t,t.lastEditActionCommand):W.evalInput(e,t)}function u(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;at(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c{const n=t.schema;if(!n)return;const r=e.getCursor(),s=e.getTokenAt(r),u=function(e,t,n){const r="Invalid"===n.state.kind?n.state.prevState:n.state;if(!r)return[];const i=r.kind,s=r.step,u=(0,o.getTypeInfo)(e,n.state);if("Document"===i)return(0,o.hintList)(n,[{label:"query"},{label:"mutation"},{label:"subscription"},{label:"fragment"},{label:"{"}]);if("SelectionSet"===i||"Field"===i||"AliasedField"===i)return function(e,t,n){if(t.parentType){const r=t.parentType,i=(0,a.isObjectType)(r)||(0,a.isInterfaceType)(r)?(0,o.objectValues)(r.getFields()):[];return(0,a.isCompositeType)(r)&&i.push(a.TypeNameMetaFieldDef),r===n.getQueryType()&&i.push(a.SchemaMetaFieldDef,a.TypeMetaFieldDef),(0,o.hintList)(e,i.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}}))}return[]}(n,u,e);if("Arguments"===i||"Argument"===i&&0===s){const e=u.argDefs;if(e)return(0,o.hintList)(n,e.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0}}))}if(("ObjectValue"===i||"ObjectField"===i&&0===s)&&u.objectFieldDefs){const e=(0,o.objectValues)(u.objectFieldDefs);return(0,o.hintList)(n,e.map(e=>{var t;return{label:e.name,type:e.type,documentation:null!==(t=e.description)&&void 0!==t?t:void 0}}))}if("EnumValue"===i||"ListValue"===i&&1===s||"ObjectField"===i&&2===s||"Argument"===i&&2===s)return function(e,t){const n=(0,a.getNamedType)(t.inputType);if(n instanceof a.GraphQLEnumType){const t=n.getValues();return(0,o.hintList)(e,t.map(e=>{var t;return{label:e.name,type:n,documentation:null!==(t=e.description)&&void 0!==t?t:void 0,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}}))}if(n===a.GraphQLBoolean)return(0,o.hintList)(e,[{label:"true",type:a.GraphQLBoolean,documentation:"Not false."},{label:"false",type:a.GraphQLBoolean,documentation:"Not true."}]);return[]}(n,u);if("TypeCondition"===i&&1===s||"NamedType"===i&&null!=r.prevState&&"TypeCondition"===r.prevState.kind)return function(e,t,n){let r;if(t.parentType)if((0,a.isAbstractType)(t.parentType)){const e=(0,a.assertAbstractType)(t.parentType),i=n.getPossibleTypes(e),s=Object.create(null);i.forEach(e=>{e.getInterfaces().forEach(e=>{s[e.name]=e})}),r=i.concat((0,o.objectValues)(s))}else r=[t.parentType];else{const e=n.getTypeMap();r=(0,o.objectValues)(e).filter(a.isCompositeType)}return(0,o.hintList)(e,r.map(e=>{const t=(0,a.getNamedType)(e);return{label:String(e),documentation:t&&t.description||""}}))}(n,u,e);if("FragmentSpread"===i&&1===s)return function(e,t,n,r){const i=n.getTypeMap(),s=(0,o.getDefinitionState)(e.state),u=(0,o.getFragmentDefinitions)(r).filter(e=>i[e.typeCondition.name.value]&&!(s&&"FragmentDefinition"===s.kind&&s.name===e.name.value)&&(0,a.isCompositeType)(t.parentType)&&(0,a.isCompositeType)(i[e.typeCondition.name.value])&&(0,a.doTypesOverlap)(n,t.parentType,i[e.typeCondition.name.value]));return(0,o.hintList)(e,u.map(e=>({label:e.name.value,type:i[e.typeCondition.name.value],documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`})))}(n,u,e,t);if("VariableDefinition"===i&&2===s||"ListType"===i&&1===s||"NamedType"===i&&r.prevState&&("VariableDefinition"===r.prevState.kind||"ListType"===r.prevState.kind))return function(e,t){const n=t.getTypeMap(),r=(0,o.objectValues)(n).filter(a.isInputType);return(0,o.hintList)(e,r.map(e=>({label:e.name,documentation:e.description})))}(n,e);if("Directive"===i)return function(e,t,n){if(t.prevState&&t.prevState.kind){const r=n.getDirectives().filter(e=>(0,o.canUseDirective)(t.prevState,e));return(0,o.hintList)(e,r.map(e=>({label:e.name,documentation:e.description||""})))}return[]}(n,r,e);return[]}(n,e.getValue(),s),c=null!==s.type&&/"|\w/.test(s.string[0])?s.start:s.end,l={list:u.map(e=>({text:e.label,type:e.type,description:e.documentation,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason})),from:{line:r.line,column:c},to:{line:r.line,column:s.end}};return l&&l.list&&l.list.length>0&&(l.from=i.default.Pos(l.from.line,l.from.column),l.to=i.default.Pos(l.to.line,l.to.column),i.default.signal(e,"hasCompletion",e,l,s)),l})},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return y(i)||(i=l(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(g(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),D(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(C(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return e.stylize(Date.prototype.toString.call(n),"date");if(D(n))return p(n)}var c,E="",w=!1,S=["{","}"];(d(n)&&(w=!0,S=["[","]"]),C(n))&&(E=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(E=" "+RegExp.prototype.toString.call(n)),x(n)&&(E=" "+Date.prototype.toUTCString.call(n)),D(n)&&(E=" "+p(n)),0!==a.length||w&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=w?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,S)):S[0]+E+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),A(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return E(e)&&"[object RegExp]"===w(e)}function E(e){return"object"==typeof e&&null!==e}function x(e){return E(e)&&"[object Date]"===w(e)}function D(e){return E(e)&&("[object Error]"===w(e)||e instanceof Error)}function C(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(v(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=E,t.isDate=x,t.isError=D,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(371);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",k(),t.format.apply(t,arguments))},t.inherits=n(372),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o{const n=t.schema;return(0,o.getDiagnostics)(e,n).map(e=>({message:e.message,severity:a[e.severity-1],type:s[e.source],from:i.default.Pos(e.range.start.line,e.range.start.character),to:i.default.Pos(e.range.end.line,e.range.end.character)}))})},function(e,t,n){"use strict";var r=n(17),i=s(n(16)),o=s(n(180)),a=n(182);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){const r=t.fieldDef.name;"__"!==r.slice(0,2)&&(p(e,t,n,t.parentType),d(e,".")),d(e,r,"field-name",n,(0,a.getFieldReference)(t))}function c(e,t,n){d(e,"@"+t.directiveDef.name,"directive-name",n,(0,a.getDirectiveReference)(t))}function l(e,t,n,r){d(e,": "),p(e,t,n,r)}function p(e,t,n,i){i instanceof r.GraphQLNonNull?(p(e,t,n,i.ofType),d(e,"!")):i instanceof r.GraphQLList?(d(e,"["),p(e,t,n,i.ofType),d(e,"]")):d(e,i.name,"type-name",n,(0,a.getTypeReference)(t,i))}function f(e,t,n){const r=n.description;if(r){const n=document.createElement("div");n.className="info-description",t.renderDescription?n.innerHTML=t.renderDescription(r):n.appendChild(document.createTextNode(r)),e.appendChild(n)}!function(e,t,n){const r=n.deprecationReason;if(r){const n=document.createElement("div");n.className="info-deprecation",t.renderDescription?n.innerHTML=t.renderDescription(r):n.appendChild(document.createTextNode(r));const i=document.createElement("span");i.className="info-deprecation-label",i.appendChild(document.createTextNode("Deprecated: ")),n.insertBefore(i,n.firstChild),e.appendChild(n)}}(e,t,n)}function d(e,t,n,r={onClick:null},i){if(n){const o=r.onClick;let a;o?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",e=>{o(i,e)})):a=document.createElement("span"),a.className=n,a.appendChild(document.createTextNode(t)),e.appendChild(a)}else e.appendChild(document.createTextNode(t))}n(375),i.default.registerHelper("info","graphql",(e,t)=>{if(!t.schema||!e.state)return;const n=e.state,r=n.kind,i=n.step,s=(0,o.default)(t.schema,e.state);if("Field"===r&&0===i&&s.fieldDef||"AliasedField"===r&&2===i&&s.fieldDef){const e=document.createElement("div");return function(e,t,n){u(e,t,n),l(e,t,n,t.type)}(e,s,t),f(e,t,s.fieldDef),e}if("Directive"===r&&1===i&&s.directiveDef){const e=document.createElement("div");return c(e,s,t),f(e,t,s.directiveDef),e}if("Argument"===r&&0===i&&s.argDef){const e=document.createElement("div");return function(e,t,n){t.directiveDef?c(e,t,n):t.fieldDef&&u(e,t,n);const r=t.argDef.name;d(e,"("),d(e,r,"arg-name",n,(0,a.getArgumentReference)(t)),l(e,t,n,t.inputType),d(e,")")}(e,s,t),f(e,t,s.argDef),e}if("EnumValue"===r&&s.enumValue&&s.enumValue.description){const e=document.createElement("div");return function(e,t,n){const r=t.enumValue.name;p(e,t,n,t.inputType),d(e,"."),d(e,r,"enum-value",n,(0,a.getEnumValueReference)(t))}(e,s,t),f(e,t,s.enumValue),e}if("NamedType"===r&&s.type&&s.type.description){const e=document.createElement("div");return p(e,s,t,s.type),f(e,t,s.type),e}})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r};function o(e,t){const n=e.state.info,r=t.target||t.srcElement;if("SPAN"!==r.nodeName||void 0!==n.hoverTimeout)return;const o=r.getBoundingClientRect(),a=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(u,c)},s=function(){i.default.off(document,"mousemove",a),i.default.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},u=function(){i.default.off(document,"mousemove",a),i.default.off(e.getWrapperElement(),"mouseout",s),n.hoverTimeout=void 0,function(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),r=e.state.info.options,o=r.render||e.getHelper(n,"info");if(o){const a=e.getTokenAt(n,!0);if(a){const s=o(a,r,e,n);s&&function(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.appendChild(n),document.body.appendChild(r);const o=r.getBoundingClientRect(),a=r.currentStyle||window.getComputedStyle(r),s=o.right-o.left+parseFloat(a.marginLeft)+parseFloat(a.marginRight),u=o.bottom-o.top+parseFloat(a.marginTop)+parseFloat(a.marginBottom);let c=t.bottom;u>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(c=t.top-u);c<0&&(c=t.bottom);let l,p=Math.max(0,window.innerWidth-s-15);p>t.left&&(p=t.left);r.style.opacity=1,r.style.top=c+"px",r.style.left=p+"px";const f=function(){clearTimeout(l)},d=function(){clearTimeout(l),l=setTimeout(h,200)},h=function(){i.default.off(r,"mouseover",f),i.default.off(r,"mouseout",d),i.default.off(e.getWrapperElement(),"mouseout",d),r.style.opacity?(r.style.opacity=0,setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r)},600)):r.parentNode&&r.parentNode.removeChild(r)};i.default.on(r,"mouseover",f),i.default.on(r,"mouseout",d),i.default.on(e.getWrapperElement(),"mouseout",d)}(e,t,s)}}}(e,o)},c=function(e){const t=e.state.info.options;return t&&t.hoverTime||500}(e);n.hoverTimeout=setTimeout(u,c),i.default.on(document,"mousemove",a),i.default.on(e.getWrapperElement(),"mouseout",s)}i.default.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.default.Init){const t=e.state.info.onMouseOver;i.default.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const n=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);n.onMouseOver=o.bind(null,e),i.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}})},function(e,t,n){"use strict";var r=a(n(16)),i=a(n(180)),o=n(182);function a(e){return e&&e.__esModule?e:{default:e}}n(377),r.default.registerHelper("jump","graphql",(e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const n=e.state,r=n.kind,a=n.step,s=(0,i.default)(t.schema,n);return"Field"===r&&0===a&&s.fieldDef||"AliasedField"===r&&2===a&&s.fieldDef?(0,o.getFieldReference)(s):"Directive"===r&&1===a&&s.directiveDef?(0,o.getDirectiveReference)(s):"Argument"===r&&0===a&&s.argDef?(0,o.getArgumentReference)(s):"EnumValue"===r&&s.enumValue?(0,o.getEnumValueReference)(s):"NamedType"===r&&s.type?(0,o.getTypeReference)(s):void 0})},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r};function o(e,t){const n=t.target||t.srcElement;if("SPAN"!==n.nodeName)return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&c(e)}function a(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&l(e):e.state.jump.cursor=null}function s(e,t){if(e.state.jump.isHoldingModifier||t.key!==(u?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&c(e);const n=a=>{a.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&l(e),i.default.off(document,"keyup",n),i.default.off(document,"click",r),e.off("mousedown",o))},r=t=>{const n=e.state.jump.destination;n&&e.state.jump.options.onClick(n,t)},o=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};i.default.on(document,"keyup",n),i.default.on(document,"click",r),e.on("mousedown",o)}i.default.defineOption("jump",!1,(e,t,n)=>{if(n&&n!==i.default.Init){const t=e.state.jump.onMouseOver;i.default.off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;i.default.off(e.getWrapperElement(),"mouseout",n),i.default.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:o.bind(null,e),onMouseOut:a.bind(null,e),onKeyDown:s.bind(null,e)};i.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver),i.default.on(e.getWrapperElement(),"mouseout",n.onMouseOut),i.default.on(document,"keydown",n.onKeyDown)}});const u="undefined"!=typeof navigator&&navigator&&-1!==navigator.appVersion.indexOf("Mac");function c(e){if(e.state.jump.marker)return;const t=e.state.jump.cursor,n=e.coordsChar(t),r=e.getTokenAt(n,!0),i=e.state.jump.options,o=i.getDestination||e.getHelper(n,"jump");if(o){const t=o(r,i,e);if(t){const i=e.markText({line:n.line,ch:r.start},{line:n.line,ch:r.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=i,e.state.jump.destination=t}}}function l(e){const t=e.state.jump.marker;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(){this.sizes=[]}updateSizes(e){e.forEach((e,t)=>{const n=e.getClientHeight();t<=this.sizes.length&&n!==this.sizes[t]&&e.getCodeMirror().setSize(),this.sizes[t]=n})}}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&n.editor.execCommand("autocomplete")},n._onEdit=function(){n.ignoreChangeEvent||(n.cachedValue=n.editor.getValue(),n.props.onChange(n.cachedValue))},n._onHasCompletion=function(e,t){s.default(e,t,n.props.onHintInformationRender)},n.cachedValue=t.value||"",n.props.getRef&&n.props.getRef(n),n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=n(16);n(125),n(89),n(126),n(90),n(103),n(127),n(69),n(104),n(70),n(105),n(186),n(187),n(188),this.editor=t(this._node,{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!1,foldGutter:{minFoldSize:4},lint:{variableToType:this.props.variableToType?this.props.variableToType.toJS():void 0},hintOptions:{variableToType:this.props.variableToType?this.props.variableToType.toJS():void 0,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Shift-Ctrl-P":function(){e.props.prettifyQuery&&e.props.prettifyQuery()},"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)},t.prototype.componentDidUpdate=function(e){var t=n(16);this.ignoreChangeEvent=!0,this.props.variableToType!==e.variableToType&&(this.editor.options.lint.variableToType=this.props.variableToType?this.props.variableToType.toJS():void 0,this.editor.options.hintOptions.variableToType=this.props.variableToType?this.props.variableToType.toJS():void 0,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.componentWillUnmount=function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null},t.prototype.render=function(){var e=this;return a.createElement(y,{ref:function(t){e._node=t}})},t.prototype.getCodeMirror=function(){return this.editor},t.prototype.getClientHeight=function(){return this._node&&this._node.clientHeight},t}(a.PureComponent),h=p.createStructuredSelector({value:l.getVariables,variableToType:l.getVariableToType});t.VariableEditorComponent=u.connect(h,{onChange:c.editVariables})(d);var m=p.createStructuredSelector({value:l.getHeaders});t.HeadersEditorComponent=u.connect(m,{onChange:c.editHeaders})(d);var g,y=f.styled.div(g||(g=o(["\n flex: 1;\n height: 100%;\n position: relative;\n"],["\n flex: 1;\n height: 100%;\n position: relative;\n"])))},function(e,t,n){"use strict";function r(e,t){const n=e.filter(t);return 0===n.length?e:n}function i(e){return e.toLowerCase().replace(/\W/g,"")}function o(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){const a=function(e,t){if(!t)return r(e,e=>!e.isDeprecated);return r(r(e.map(e=>({proximity:o(i(e.text),t),entry:e})),e=>e.proximity<=2),e=>!e.entry.isDeprecated).sort((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.text.length-t.entry.text.length).map(e=>e.entry)}(n,i(t.string));if(!a)return;const s=null!==t.type&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:a,from:{line:e.line,column:s},to:{line:e.line,column:t.end}}}},function(e,t,n){"use strict";let r,i,o,a,s,u,c;function l(){const e=o,t=[];if(h("{"),!g("}")){do{t.push(p())}while(g(","));h("}")}return{kind:"Object",start:e,end:s,members:t}}function p(){const e=o,t="String"===c?d():null;h("String"),h(":");const n=f();return{kind:"Member",start:e,end:s,key:t,value:n}}function f(){switch(c){case"[":return function(){const e=o,t=[];if(h("["),!g("]")){do{t.push(f())}while(g(","));h("]")}return{kind:"Array",start:e,end:s,values:t}}();case"{":return l();case"String":case"Number":case"Boolean":case"Null":const e=d();return v(),e}return h("Value")}function d(){return{kind:c,start:o,end:a,value:JSON.parse(r.slice(o,a))}}function h(e){if(c===e)return void v();let t;if("EOF"===c)t="[end of file]";else if(a-o>1)t="`"+r.slice(o,a)+"`";else{const e=r.slice(o).match(/^.+?\b/);t="`"+(e?e[0]:r[o])+"`"}throw m(`Expected ${e} but found ${t}.`)}function m(e){return{message:e,start:o,end:a}}function g(e){if(c===e)return v(),!0}function y(){a31;)if(92===u)switch(y(),u){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:y();break;case 117:y(),b(),b(),b(),b();break;default:throw m("Bad character escape sequence.")}else{if(a===i)throw m("Unterminated string.");y()}if(34===u)return void y();throw m("Unterminated string.")}();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c="Number",function(){45===u&&y();48===u?y():E();46===u&&(y(),E());69!==u&&101!==u||(y(),43!==u&&45!==u||y(),E())}();case 102:if("false"!==r.slice(o,o+5))break;return a+=4,y(),void(c="Boolean");case 110:if("null"!==r.slice(o,o+4))break;return a+=3,y(),void(c="Null");case 116:if("true"!==r.slice(o,o+4))break;return a+=3,y(),void(c="Boolean")}c=r[o],y()}else c="EOF"}function b(){if(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)return y();throw m("Expected hexadecimal digit.")}function E(){if(u<48||u>57)throw m("Expected decimal digit.");do{y()}while(u>=48&&u<=57)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){r=e,i=e.length,o=a=s=-1,y(),v();const t=l();return h("EOF"),t}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(395),a=n(396),s=n(30),u=n(28),c=n(32),l=n(11),p=new(n(99).ResponseRecord)({date:"",time:new Date,resultID:"default-id"}),f=u.createStructuredSelector({responses:c.getResponses});t.default=s.connect(f)((function(e){var t=e.setRef,n=e.responses,r=n.get(0)||p,s=n.size>1;return i.createElement(v,{ref:t,isSubscription:s},n.size<=1?i.createElement(b,{key:"first",isSubscription:s},n.size>1&&r.time&&i.createElement(E,null,i.createElement(x,null,o.default(r.time))),i.createElement(D,{isSubscription:s},i.createElement(a.ResultViewer,{value:r.date,isSubscription:s}))):n.map((function(e){return i.createElement(b,{key:e.resultID||String(e.time),isSubscription:s},n.size>1&&e.time&&i.createElement(E,null,i.createElement(x,null,o.default(e.time))),i.createElement(D,{isSubscription:n.size>1},i.createElement(a.ResultViewer,{value:e.date,isSubscription:s})))})))}));var d,h,m,g,y,v=l.styled("div")(d||(d=r(["\n flex: 1;\n height: ",";\n position: relative;\n overflow: ",";\n max-height: none !important;\n\n .cm-string {\n color: rgb(41, 185, 115);\n }\n\n .cm-def {\n color: rgb(241, 143, 1);\n }\n\n .cm-property {\n color: rgb(51, 147, 220);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n .CodeMirror {\n background: ",";\n }\n .CodeMirror-gutters {\n cursor: col-resize;\n }\n .CodeMirror-foldgutter,\n .CodeMirror-foldgutter-open:after,\n .CodeMirror-foldgutter-folded:after {\n padding-left: 3px;\n }\n"],["\n flex: 1;\n height: ",";\n position: relative;\n overflow: ",";\n max-height: none !important;\n\n .cm-string {\n color: rgb(41, 185, 115);\n }\n\n .cm-def {\n color: rgb(241, 143, 1);\n }\n\n .cm-property {\n color: rgb(51, 147, 220);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n .CodeMirror {\n background: ",";\n }\n .CodeMirror-gutters {\n cursor: col-resize;\n }\n .CodeMirror-foldgutter,\n .CodeMirror-foldgutter-open:after,\n .CodeMirror-foldgutter-folded:after {\n padding-left: 3px;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"auto":"visible"}),(function(e){return e.theme.editorColours.resultBackground})),b=l.styled("div")(h||(h=r(["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n flex-direction: column;\n &:not(:first-child):last-of-type {\n margin-bottom: 48px;\n }\n"],["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n flex-direction: column;\n &:not(:first-child):last-of-type {\n margin-bottom: 48px;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"})),E=l.styled.div(m||(m=r(["\n position: relative;\n height: 17px;\n margin-top: 12px;\n margin-bottom: 4px;\n &:before {\n position: absolute;\n width: 100%;\n content: '';\n top: 9px;\n left: 95px;\n border-top: 1px solid\n ",";\n }\n"],["\n position: relative;\n height: 17px;\n margin-top: 12px;\n margin-bottom: 4px;\n &:before {\n position: absolute;\n width: 100%;\n content: '';\n top: 9px;\n left: 95px;\n border-top: 1px solid\n ",";\n }\n"])),(function(e){return e.theme.editorColours.subscriptionTimeBoaderTop})),x=l.styled.div(g||(g=r(["\n font-size: 12px;\n color: ",";\n padding-left: 15px;\n"],["\n font-size: 12px;\n color: ",";\n padding-left: 15px;\n"])),(function(e){return e.theme.editorColours.subscriptionTimeText})),D=l.styled("div")(y||(y=r(["\n display: flex;\n flex: 1;\n height: ",";\n position: ",";\n"],["\n display: flex;\n flex: 1;\n height: ",";\n position: ",";\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"relative":"static"}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date,n=Math.abs(e.getTime()-t.getTime()),r=Math.floor(n/864e5),i=Math.floor(n%864e5/36e5),o=Math.round(n%864e5%36e5/6e4);if(r>0)return r+" days ago";if(i>0)return i+" h ago";if(o>0)return o+" min ago";var a=Math.round(n/1e3);return a+" sec"+(a>1?"s":"")+" ago"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setRef=function(e){t.node=e},t}return i(t,e),t.prototype.componentDidMount=function(){var e=n(16);n(103),n(90),n(70),n(179),n(69),n(104),n(105),n(397);var t=[];this.props.hideGutters||t.push("CodeMirror-foldgutter");var r={};this.props.hideGutters||(r={minFoldSize:4});var i=this.props.value||"";this.viewer=e(this.node,{lineWrapping:!0,value:i,readOnly:!0,theme:"graphiql",mode:"graphql-results",keyMap:"sublime",foldGutter:r,gutters:t,extraKeys:{"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}})},t.prototype.shouldComponentUpdate=function(e){return this.props.value!==e.value},t.prototype.componentDidUpdate=function(){var e=this.props.value||"";this.viewer.setValue(e)},t.prototype.componentWillUnmount=function(){this.viewer=null},t.prototype.render=function(){return a.createElement(l,{ref:this.setRef,isSubscription:this.props.isSubscription})},t.prototype.getCodeMirror=function(){return this.viewer},t.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},t}(a.Component);t.ResultViewer=u;var c,l=s.styled("div")(c||(c=o(["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n .CodeMirror {\n height: ",";\n position: ",";\n box-sizing: border-box;\n background: none;\n padding-left: 38px;\n }\n .CodeMirror-cursor {\n display: none !important;\n }\n .CodeMirror-scroll {\n overflow: scroll !important;\n margin-right: 10px;\n }\n .CodeMirror-sizer {\n margin-bottom: 0 !important;\n }\n .CodeMirror-lines {\n margin: 20px 0;\n padding: 0;\n }\n .cm-string {\n color: "," !important;\n }\n"],["\n position: relative;\n display: flex;\n flex: 1;\n height: ",";\n .CodeMirror {\n height: ",";\n position: ",";\n box-sizing: border-box;\n background: none;\n padding-left: 38px;\n }\n .CodeMirror-cursor {\n display: none !important;\n }\n .CodeMirror-scroll {\n overflow: scroll !important;\n margin-right: 10px;\n }\n .CodeMirror-sizer {\n margin-bottom: 0 !important;\n }\n .CodeMirror-lines {\n margin: 20px 0;\n padding: 0;\n }\n .cm-string {\n color: "," !important;\n }\n"])),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"auto":"100%"}),(function(e){return e.isSubscription?"relative":"absolute%"}),(function(e){return e.theme.editorColours.property}))},function(e,t,n){"use strict";var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=n(135);function a(e,t){const n=e.levels;return(n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel)*this.config.indentUnit}i.default.defineMode("graphql-results",e=>{const t=(0,o.onlineParser)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:u,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},u={Document:[(0,o.p)("{"),(0,o.list)("Entry",(0,o.p)(",")),(0,o.p)("}")],Entry:[(0,o.t)("String","def"),(0,o.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,o.t)("Number","number")],StringValue:[(0,o.t)("String","string")],BooleanValue:[(0,o.t)("Keyword","builtin")],NullValue:[(0,o.t)("Keyword","keyword")],ListValue:[(0,o.p)("["),(0,o.list)("Value",(0,o.p)(",")),(0,o.p)("]")],ObjectValue:[(0,o.p)("{"),(0,o.list)("ObjectField",(0,o.p)(",")),(0,o.p)("}")],ObjectField:[(0,o.t)("String","property"),(0,o.p)(":"),"Value"]}},function(e,t,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a,s,u,c,l=n(3),p=n(399),f=n(101),d=n(28),h=n(32),m=n(30),g=f.default.div(a||(a=i(["\n padding-top: 6px;\n padding-left: 25px;\n padding-right: 25px;\n color: ",";\n overflow: auto;\n position: relative;\n height: 100%;\n"],["\n padding-top: 6px;\n padding-left: 25px;\n padding-right: 25px;\n color: ",";\n overflow: auto;\n position: relative;\n height: 100%;\n"])),(function(e){return e.theme.editorColours.text})),y=f.default.div(s||(s=i(["\n font-size: 14px;\n"],["\n font-size: 14px;\n"]))),v=f.default.div(u||(u=i(["\n font-size: 14px;\n color: rgba(241, 143, 1, 1);\n"],["\n font-size: 14px;\n color: rgba(241, 143, 1, 1);\n"]))),b=f.default.div(c||(c=i(["\n padding-left: 100px;\n padding-bottom: 100px;\n padding-top: 16px;\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n width: calc(100% + 100px);\n height: calc(100% + 116px);\n"],["\n padding-left: 100px;\n padding-bottom: 100px;\n padding-top: 16px;\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n width: calc(100% + 100px);\n height: calc(100% + 116px);\n"]))),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.tracing,n=e.tracingSupported,r=e.startTime,i=e.endTime,o=e.open,a=t&&r?Math.abs(new Date(t.startTime).getTime()-r.getTime()):0,s=t&&i?Math.abs(i.getTime()-new Date(t.endTime).getTime()):0,u=1e6*a;return l.createElement(g,null,t&&o?l.createElement(b,null,l.createElement(p.default,{path:["Request"],startOffset:0,duration:u}),t.execution.resolvers.map((function(e){return l.createElement(p.default,{key:e.path.join("."),path:e.path,startOffset:e.startOffset+u,duration:e.duration})})),l.createElement(p.default,{path:["Response"],startOffset:t.duration+u,duration:1e6*s})):n?l.createElement(y,null,this.props.queryRunning?"Running query ...":"Please re-run the query to show tracing results."):l.createElement(v,null,"This GraphQL server doesn’t support tracing. See the following page for instructions:",l.createElement("br",null),"https://github.com/apollographql/apollo-tracing"))},t}(l.PureComponent),x=d.createStructuredSelector({tracing:h.getTracing,startTime:h.getCurrentQueryStartTime,endTime:h.getCurrentQueryEndTime,tracingSupported:h.getTracingSupported,queryRunning:h.getQueryRunning});t.default=m.connect(x)(E)},function(e,t,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a,s,u,c,l,p=n(3),f=n(101),d=f.default.div(a||(a=i(["\n position: relative;\n font-size: 12px;\n display: table;\n padding-right: 25px;\n\n color: ",";\n"],["\n position: relative;\n font-size: 12px;\n display: table;\n padding-right: 25px;\n\n color: ",";\n"])),(function(e){return e.theme.editorColours.text})),h=f.default.span(s||(s=i(["\n display: inline-block;\n position: relative;\n margin: 0 10px;\n height: 1.5px;\n bottom: 4px;\n\n background: ",";\n"],["\n display: inline-block;\n position: relative;\n margin: 0 10px;\n height: 1.5px;\n bottom: 4px;\n\n background: ",";\n"])),(function(e){return e.theme.editorColours.text})),m=f.default.span(u||(u=i(["\n font-size: 10px;\n color: ",";\n"],["\n font-size: 10px;\n color: ",";\n"])),(function(e){return e.theme.editorColours.textInactive})),g=f.default.span(c||(c=i(["\n position: absolute;\n left: 0;\n transform: translateX(-100%);\n display: inline-flex;\n align-items: center;\n\n text-align: right;\n"],["\n position: absolute;\n left: 0;\n transform: translateX(-100%);\n display: inline-flex;\n align-items: center;\n\n text-align: right;\n"]))),y=f.default.span(l||(l=i(["\n margin-left: 10px;\n"],["\n margin-left: 10px;\n"]))),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={collapsed:!1},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.path,n=e.startOffset,r=e.duration,i=n/1e6,o=r/1e6;return p.createElement(d,{style:{transform:"translateX("+i+"px)"}},p.createElement(g,null,p.createElement(y,null,t.slice(-2).map((function(e,n){return p.createElement("span",{style:{opacity:n===t.slice(-2).length-1?1:.6},key:e},(n>0?".":"")+e)})))),p.createElement(h,{style:{width:Math.max(o,3)}}),p.createElement(m,null,this.printDuration(r)))},t.prototype.printDuration=function(e){var t=Math.round(e/1e3);return t>1e3?Math.round(t/1e3)+" ms":t+" µs"},t}(p.Component);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillLeafs=function(e,t,n){const a=[];if(!e)return{insertions:a,result:t};let s;try{s=(0,r.parse)(t)}catch(e){return{insertions:a,result:t}}const u=n||i,c=new r.TypeInfo(e);return(0,r.visit)(s,{leave(e){c.leave(e)},enter(e){if(c.enter(e),"Field"===e.kind&&!e.selectionSet){const n=function e(t,n){const i=(0,r.getNamedType)(t);if(!t||(0,r.isLeafType)(t))return;const o=n(i);if(!Array.isArray(o)||0===o.length)return;return{kind:"SelectionSet",selections:o.map(t=>{const r=i.getFields()[t],o=r?r.type:null;return{kind:"Field",name:{kind:"Name",value:t},selectionSet:e(o,n)}})}}(c.getType(),u);if(n){const i=function(e,t){let n=t,r=t;for(;n;){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.substring(n,r)}(t,e.loc.start);a.push({index:e.loc.end,string:" "+(0,r.print)(n).replace(/\n/g,"\n"+i)})}}}}),{insertions:a,result:o(t,a)}};var r=n(17);function i(e){if(!e.getFields)return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];return Object.keys(t).forEach(e=>{(0,r.isLeafType)(t[e].type)&&n.push(e)}),n}function o(e,t){if(0===t.length)return e;let n="",r=0;return t.forEach(({index:t,string:i})=>{n+=e.slice(r,t)+i,r=t}),n+=e.slice(r),n}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?n.setState({overflowY:!0}):n.setState({overflowY:!1})},n.setRef=function(e){n.node=e},n.state={overflowY:!1},n.cachedValue=e.value||"",n.props.getRef&&n.props.getRef(n),n}return i(r,t),r.prototype.componentDidMount=function(){var t=n(16);n(90),n(178),n(183);var r=[];r.push("CodeMirror-linenumbers"),this.editor=t(this.node,{autofocus:!1,value:l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])||"",lineNumbers:!1,showCursorWhenSelecting:!1,tabSize:1,mode:"graphql",theme:"graphiql",keyMap:"sublime",readOnly:!0,gutters:r}),e.editor=this.editor,this.editor.on("scroll",this.handleScroll),this.editor.refresh()},r.prototype.componentDidUpdate=function(e){var t=n(16);if((this.props.schema&&s.printSchema(this.props.schema))!==(e.schema&&s.printSchema(e.schema))){var r=this.editor.getScrollInfo();this.cachedValue=l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])||"",this.editor.setValue(l.getSDL(this.props.schema,this.props.settings["schema.disableComments"])),this.props.isPollingSchema&&this.editor.scrollTo(r.left,r.top),t.signal(this.editor,"change",this.editor)}this.props.width!==e.width&&this.editor.refresh(),this.props.settings["schema.disableComments"]!==e.settings["schema.disableComments"]&&this.editor.refresh()},r.prototype.UNSAFE_componentWillReceiveProps=function(e){this.props.sessionId!==e.sessionId&&this.editor.scrollTo(0,0)},r.prototype.componentWillUnmount=function(){this.editor&&(this.editor.off("scroll"),this.editor=null)},r.prototype.render=function(){var e=this.state.overflowY;return a.createElement(u.default,null,e&&a.createElement(m,null),a.createElement(h,{ref:this.setRef}))},r.prototype.getCodeMirror=function(){return this.editor},r.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},r}(a.PureComponent);t.default=p;var f,d,h=c.styled.div(f||(f=o(["\n flex: 1;\n height: auto;\n overflow-x: hidden;\n overflow-y: scroll;\n .CodeMirror {\n background: ",";\n padding-left: 20px;\n }\n"],["\n flex: 1;\n height: auto;\n overflow-x: hidden;\n overflow-y: scroll;\n .CodeMirror {\n background: ",";\n padding-left: 20px;\n }\n"])),(function(e){return"dark"===e.theme.mode?e.theme.editorColours.editorBackground:"white"})),m=c.styled.div(d||(d=o(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);\n z-index: 1000;\n"],["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);\n z-index: 1000;\n"])))}).call(this,n(42))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(59),u=n(30),c=n(191),l=n(407),p=n(199),f=n(73),d=n(129),h=n(67),m=n(463),g=n(87),y=n(74),v=n(32),b=n(28),E=n(192),x=n(11),D=function(e){function t(t){var n=e.call(this,t)||this;return n.setRef=function(e){n.ref=e},n.showDocFromType=function(e){n.props.addStack(n.props.sessionId,e,0,0)},n.handleSearch=function(e){n.setState({searchValue:e})},n.handleKeyDown=function(e){if(!(e.target instanceof HTMLInputElement||e.metaKey||e.shiftKey||e.altKey||e.ctrlKey)){e.preventDefault(),n.props.changeKeyMove(n.props.sessionId,!0);var t=n.props.docs.navStack.length>0&&n.props.docs.navStack[n.props.docs.navStack.length-1],r=n.props.docs.navStack.length>0&&n.props.docs.navStack[n.props.docs.navStack.length-2],i=c(e);switch(i){case"esc":n.props.setDocsVisible(n.props.sessionId,!1);break;case"left":r&&n.props.addStack(n.props.sessionId,r.field,r.x,r.y);break;case"right":if(t){var o=g.serialize(n.props.schema,t.field),a=g.getElement(o,0);a&&n.props.addStack(n.props.sessionId,a,t.x+1,0)}else{o=g.serializeRoot(n.props.schema);(s=g.getElementRoot(o,0))&&n.props.addStack(n.props.sessionId,s,0,0)}break;case"up":case"down":if(r){o=g.serialize(n.props.schema,r.field);(s=g.getElement(o,"up"===i?t.y-1:t.y+1))&&n.props.addStack(n.props.sessionId,s,t.x,"up"===i?t.y-1:t.y+1)}else{o=g.serializeRoot(n.props.schema);var s,u=t?t.y:0;(s=g.getElementRoot(o,"up"===i?u-1:u+1))&&n.props.addStack(n.props.sessionId,s,0,"up"===i?u-1:u+1)}}}},n.state={searchValue:"",widthMap:{}},window.d=n,n}return i(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){(this.props.docs.navStack.length!==e.docs.navStack.length||this.props.docs.navStack.slice(-1)[0]!==e.docs.navStack.slice(-1)[0]||!this.props.schema&&e.schema)&&this.setWidth(e)},t.prototype.setWidth=function(e){void 0===e&&(e=this.props),this.props.setWidth(e)},t.prototype.getWidth=function(e){var t=this;void 0===e&&(e=this.props);var n=this.state.widthMap.root||h.columnWidth,r=e.docs.navStack.map((function(e){return t.state.widthMap[e.field.path]||h.columnWidth}));return[n].concat(r).reduce((function(e,t){return e+t}),0)},t.prototype.componentDidMount=function(){this.setWidth()},t.prototype.render=function(){var e,t=this,n=this.props.docs.navStack,r=this.props.schema;return void 0===r?e=a.createElement(d.default,null):null===r&&(e=a.createElement(E.ErrorContainer,null,"No Schema Available")),a.createElement(S,{onKeyDown:this.handleKeyDown,tabIndex:0,ref:this.setRef},e&&a.createElement(p.default,null,e),!e&&r&&a.createElement(m.default,{schema:r,width:this.state.widthMap.root||h.columnWidth-1,searchValue:this.state.searchValue,handleSearch:this.handleSearch,sessionId:this.props.sessionId}),n.map((function(e,n){return a.createElement(p.default,{key:n,width:t.state.widthMap[e.field.path]||h.columnWidth},a.createElement(l.default,{schema:r,field:e.field,level:n+1,sessionId:t.props.sessionId}))})))},t}(a.Component),C=b.createStructuredSelector({docs:y.getSessionDocs,sessionId:v.getSelectedSessionIdFromRoot});t.default=u.connect(C,(function(e){return s.bindActionCreators({addStack:f.addStack,toggleDocs:f.toggleDocs,changeWidthDocs:f.changeWidthDocs,changeKeyMove:f.changeKeyMove,setDocsVisible:f.setDocsVisible},e)}),null,{forwardRef:!0})(D);var w,S=x.styled.div(w||(w=o(["\n display: flex;\n position: relative;\n height: 100%;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n outline: none !important;\n"],["\n display: flex;\n position: relative;\n height: 100%;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n outline: none !important;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(408),u=n(17),c=n(410),l=n(75),p=n(459),f=n(460),d=n(461),h=n(462),m=n(87),g=n(198),y=n(11),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDeprecated:!1},t.setRef=function(e){t.ref=e},t}return i(t,e),t.prototype.componentDidMount=function(){this.scrollToRight()},t.prototype.shouldComponentUpdate=function(e){return this.props.field!==e.field&&(this.scrollToRight(),!0)},t.prototype.scrollToRight=function(){var e=this.ref,t=e.parentNode&&e.parentNode.parentNode;x(t,t.scrollWidth,50)},t.prototype.render=function(){var e=this,t=this.props,n=t.schema,r=t.field,i=t.level,o=r.type||r,c=m.serialize(n,r);o=m.getDeeperType(o);var y,v=c.fields.length+c.interfaces.length,b=c.fields.length+c.interfaces.length+c.args.length;return y=o instanceof u.GraphQLInterfaceType?"interface":o instanceof u.GraphQLUnionType?"union":o instanceof u.GraphQLEnumType?"enum":"type",a.createElement("div",{ref:this.setRef},a.createElement(D,null,a.createElement(l.default,{type:r,x:i,y:-1,clickable:!1,lastActive:!1})),a.createElement(C,{className:"doc-type-description",markdown:r.description||""}),a.createElement(g.CategoryTitle,null,y+" details"),o.description&&o.description.length>0&&a.createElement(C,{markdown:o.description||""}),o instanceof u.GraphQLScalarType&&a.createElement(f.default,{type:o}),o instanceof u.GraphQLEnumType&&a.createElement(d.default,{type:o}),o instanceof u.GraphQLUnionType&&a.createElement(h.default,{type:o,schema:n,level:i,sessionId:this.props.sessionId}),c.fields&&c.fields.length>0&&a.createElement(p.default,{type:o,fields:c.fields,interfaces:c.interfaces,level:i,sessionId:this.props.sessionId}),c.args&&c.args.length>0&&a.createElement("div",null,a.createElement(g.CategoryTitle,null,"arguments"),c.args.map((function(t,n){return a.createElement("div",{key:t.name},a.createElement("div",null,a.createElement(s.default,{arg:t,x:i,y:n+v,sessionId:e.props.sessionId})))}))),c.implementations&&c.implementations.length>0&&a.createElement("div",null,a.createElement(g.CategoryTitle,null,"implementations"),c.implementations.map((function(e,t){return a.createElement(l.default,{key:e.name,type:e,x:i,y:t+b,collapsable:!0,lastActive:!1})}))))},t}(a.Component);t.default=v;var b,E,x=function e(t,n,r){if(!(r<=0)){var i=(n-t.scrollLeft)/r*10;setTimeout((function(){t.scrollLeft=t.scrollLeft+i,t.scrollLeft!==n&&e(t,n,r-10)}),10)}},D=y.styled.div(b||(b=o(["\n background: ",";\n padding-top: 20px;\n padding-bottom: 10px;\n\n .doc-category-item {\n font-size: 14px;\n font-weight: 600;\n word-wrap: break-word;\n }\n .doc-category-item .field-name {\n color: #f25c54;\n }\n div {\n background: transparent;\n pointer-events: none;\n }\n"],["\n background: ",";\n padding-top: 20px;\n padding-bottom: 10px;\n\n .doc-category-item {\n font-size: 14px;\n font-weight: 600;\n word-wrap: break-word;\n }\n .doc-category-item .field-name {\n color: #f25c54;\n }\n div {\n background: transparent;\n pointer-events: none;\n }\n"])),(function(e){return e.theme.colours.black02})),C=y.styled(c.default)(E||(E=o(["\n font-size: 14px;\n padding: 0 16px 20px 16px;\n color: rgba(0, 0, 0, 0.5);\n"],["\n font-size: 14px;\n padding: 0 16px 20px 16px;\n color: rgba(0, 0, 0, 0.5);\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(17),o=n(75);t.default=function(e){var t=e.arg,n=e.showDefaultValue,a=e.x,s=e.y;return r.createElement("span",null,r.createElement(o.default,{type:t,x:a,y:s,lastActive:!1,afterNode:void 0!==t.defaultValue&&!1!==n&&r.createElement("span",null," = ",r.createElement("span",{className:"arg-default-value"},i.print(i.astFromValue(t.defaultValue,t.type))))}))}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(17),a=n(11);t.default=function(e){var t=e.arg,n=e.showDefaultValue;return i.createElement(u,null,i.createElement("span",{className:"arg-name"},t.name),": ",i.createElement("span",{className:"type-name"},function e(t){if(t instanceof o.GraphQLNonNull)return i.createElement("span",null,e(t.ofType),"!");if(t instanceof o.GraphQLList)return i.createElement("span",null,"[",e(t.ofType),"]");return i.createElement("span",null,t.name)}(t.type)),void 0!==t.defaultValue&&!1!==n&&i.createElement("span",null," = ",i.createElement("span",{className:"arg-default-value"},o.print(o.astFromValue(t.defaultValue,t.type)))))};var s,u=a.styled.div(s||(s=r(["\n margin-left: 16px;\n"],["\n margin-left: 16px;\n"])))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),i=o(n(7));function o(e){return e&&e.__esModule?e:{default:e}}const a=new(o(n(411)).default);class s extends r.default.Component{shouldComponentUpdate(e){return this.props.markdown!==e.markdown}render(){const e=this.props.markdown;return e?r.default.createElement("div",{className:this.props.className,dangerouslySetInnerHTML:{__html:a.render(e)}}):r.default.createElement("div",null)}}var u,c,l;t.default=s,u=s,c="propTypes",l={markdown:i.default.string,className:i.default.string},c in u?Object.defineProperty(u,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):u[c]=l},function(e,t,n){"use strict";e.exports=n(412)},function(e,t,n){"use strict";var r=n(23),i=n(414),o=n(418),a=n(419),s=n(427),u=n(441),c=n(454),l=n(102),p=n(176),f={default:n(456),zero:n(457),commonmark:n(458)},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!d.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function y(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return l.encode(l.format(t))}function v(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return l.decode(l.format(t))}function b(e,t){if(!(this instanceof b))return new b(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new u,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=m,this.normalizeLink=y,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return r.assign(this.options,e),this},b.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=f[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e,t,n){"use strict";t.parseLinkLabel=n(415),t.parseLinkDestination=n(416),t.parseLinkTitle=n(417)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s=-1,u=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos=n)return u;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return u;for(t++,40===o&&(o=41);t"+o(e[t].content)+""},a.code_block=function(e,t,n,r,i){var a=e[t];return""+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,u,c,l,p=e[t],f=p.info?i(p.info).trim():"",d="";return f&&(d=f.split(/\s+/g)[0]),0===(s=n.highlight&&n.highlight(p.content,d)||o(p.content)).indexOf(""+s+"\n"):"
    "+s+"
    \n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}e.exports=function(e){var t,n,o,a,s,u,c,l,p,f,d,h,m,g,y,v,b,E,x=e.tokens;if(e.md.options.linkify)for(n=0,o=x.length;n=0;t--)if("link_close"!==(u=a[t]).type){if("html_inline"===u.type&&(E=u.content,/^\s]/i.test(E)&&m>0&&m--,i(u.content)&&m++),!(m>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(p=u.content,b=e.md.linkify.match(p),c=[],h=u.level,d=0,l=0;ld&&((s=new e.Token("text","",0)).content=p.slice(d,f),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",y]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),d=b[l].lastIndex);d=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(o,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(e){var t,n,i=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||i||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(i.test(e.tokens[t].content)&&u(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(23).isWhiteSpace,i=n(23).isPunctChar,o=n(23).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,a,c,l,p,f,d,h,m,g,y,v,b,E,x,D,C,w,S,_,k;for(S=[],n=0;n=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===a.type){p=0,f=(c=a.content).length;e:for(;p=0)m=c.charCodeAt(l.index-1);else for(C=n-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if("text"===e[C].type){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,p=48&&m<=57&&(D=x=!1),x&&D&&(x=!1,D=v),x||D){if(D)for(C=S.length-1;C>=0&&(h=S[C],!(S[C].level=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(131);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(130),i=[["table",n(428),["paragraph","reference"]],["code",n(429)],["fence",n(430),["paragraph","reference","blockquote","list"]],["blockquote",n(431),["paragraph","reference","blockquote","list"]],["hr",n(432),["paragraph","reference","blockquote","list"]],["list",n(433),["paragraph","reference","blockquote"]],["reference",n(434)],["heading",n(435),["paragraph","reference","blockquote"]],["lheading",n(436)],["html_block",n(437),["paragraph","reference","blockquote"]],["paragraph",n(439)]];function o(){this.ruler=new r;for(var e=0;e=n))&&!(e.sCount[a]=u){e.line=n;break}for(r=0;rn)return!1;if(p=t+1,e.sCount[p]=4)return!1;if((c=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(s=e.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c=4)return!1;if((d=(f=o(u.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(a)return!0;for((h=e.push("table_open","table",1)).map=y=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l=4);p++){for(f=o(u.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),l=0;l=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c,l,p=!1,f=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>d)return!1;if(126!==(i=e.src.charCodeAt(f))&&96!==i)return!1;if(u=f,(o=(f=e.skipChars(f,i))-u)<3)return!1;if(l=e.src.slice(u,f),a=e.src.slice(f,d),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((f=u=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.sCount[s]=4||(f=e.skipChars(f,i))-u=4)return!1;if(62!==e.src.charCodeAt(_++))return!1;if(i)return!0;for(u=d=e.sCount[t]+_-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(_)?(_++,u++,d++,o=!1,E=!0):9===e.src.charCodeAt(_)?(E=!0,(e.bsCount[t]+d)%4==3?(_++,u++,d++,o=!1):o=!0):E=!1,h=[e.bMarks[t]],e.bMarks[t]=_;_=k,v=[e.sCount[t]],e.sCount[t]=d-u,b=[e.tShift[t]],e.tShift[t]=_-e.bMarks[t],D=e.md.block.ruler.getRules("blockquote"),y=e.parentType,e.parentType="blockquote",w=!1,f=t+1;f=(k=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(_++)||w){if(l)break;for(x=!1,s=0,c=D.length;s=k,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(E?1:0),v.push(e.sCount[f]),e.sCount[f]=d-u,b.push(e.tShift[f]),e.tShift[f]=_-e.bMarks[f]}for(g=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=p=[t,0],e.md.block.tokenize(e,t,f),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=y,p[1]=e.line,s=0;s=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c=a)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(M=!0),(A=o(e,t))>=0){if(f=!0,O=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(O,A-O-1)),M&&1!==v)return!1}else{if(!((A=i(e,t))>=0))return!1;f=!1}if(M&&e.skipSpaces(A)>=e.eMarks[t])return!1;if(y=e.src.charCodeAt(A-1),r)return!0;for(g=e.tokens.length,f?(I=e.push("ordered_list_open","ol",1),1!==v&&(I.attrs=[["start",v]])):I=e.push("bullet_list_open","ul",1),I.map=m=[t,0],I.markup=String.fromCharCode(y),E=t,T=!1,N=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";E=b?1:x-p)>4&&(l=1),c=p+l,(I=e.push("list_item_open","li",1)).markup=String.fromCharCode(y),I.map=d=[t,0],_=e.tight,S=e.tShift[t],w=e.sCount[t],D=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(j=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=D,e.tShift[t]=S,e.sCount[t]=w,e.tight=_,(I=e.push("list_item_close","li",-1)).markup=String.fromCharCode(y),E=t=e.line,d[1]=E,s=e.bMarks[t],E>=n)break;if(e.sCount[E]=4)break;for(F=!1,u=0,h=N.length;u=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[S]<0)){for(b=!1,p=0,f=E.length;p=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=l)return!1;for(a=1,o=e.src.charCodeAt(++c);35===o&&c6||cc&&r(e.src.charCodeAt(s-1))&&(l=s),e.line=t+1,(u=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[t,e.line],(u=e.push("inline","",0)).content=e.src.slice(c,l).trim(),u.map=[t,e.line],u.children=[],(u=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,u,c,l,p,f,d=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";d3)){if(e.sCount[d]>=e.blkIndent&&(u=e.bMarks[d]+e.tShift[d])<(c=e.eMarks[d])&&(45===(p=e.src.charCodeAt(u))||61===p)&&(u=e.skipChars(u,p),(u=e.skipSpaces(u))>=c)){l=61===p?1:2;break}if(!(e.sCount[d]<0)){for(i=!1,o=0,a=h.length;o|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(u=e.src.slice(c,l),i=0;i3||e.sCount[u]<0)){for(r=!1,i=0,o=c.length;i0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,u,c,l,p,f=e;if(e>=t)return"";for(l=new Array(t-e),o=0;fn?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(130),i=[["text",n(442)],["newline",n(443)],["escape",n(444)],["backticks",n(445)],["strikethrough",n(196).tokenize],["emphasis",n(197).tokenize],["link",n(446)],["image",n(447)],["autolink",n(448)],["html_inline",n(449)],["entity",n(450)]],o=[["balance_pairs",n(451)],["strikethrough",n(196).postProcess],["emphasis",n(197).postProcess],["text_collapse",n(452)]];function a(){var e;for(this.ruler=new r,e=0;e=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=m)return!1;for(g=c,(l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?c=l.pos:d=""),g=c;c=m||41!==e.src.charCodeAt(c))&&(y=!0),c++}if(y){if(void 0===e.env.references)return!1;if(c=0?a=e.src.slice(g,c++):c=s+1):c=s+1,a||(a=e.src.slice(u,s)),!(p=e.env.references[r(a)]))return e.pos=h,!1;d=p.href,f=p.title}return t||(e.pos=u,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],f&&n.push(["title",f]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(23).normalizeReference,i=n(23).isSpace;e.exports=function(e,t){var n,o,a,s,u,c,l,p,f,d,h,m,g,y="",v=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=u+1)=b)return!1;for(g=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(y=e.md.normalizeLink(f.str),e.md.validateLink(y)?l=f.pos:y=""),g=l;l=b||41!==e.src.charCodeAt(l))return e.pos=v,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?s=e.src.slice(g,l++):l=u+1):l=u+1,s||(s=e.src.slice(c,u)),!(p=e.env.references[r(s)]))return e.pos=v,!1;y=p.href,d=p.title}return t||(a=e.src.slice(c,u),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",y],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=b,!0}},function(e,t,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,i=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,o,a,s,u,c,l=e.pos;return 60===e.src.charCodeAt(l)&&(!((n=e.src.slice(l)).indexOf(">")<0)&&(i.test(n)?(s=(o=n.match(i))[0].slice(1,-1),u=e.md.normalizeLink(s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=o[0].length,!0)):!!r.test(n)&&(s=(a=n.match(r))[0].slice(1,-1),u=e.md.normalizeLink("mailto:"+s),!!e.md.validateLink(u)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(195).HTML_TAG_RE;e.exports=function(e,t){var n,i,o,a=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(i=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(194),i=n(23).has,o=n(23).isValidEntityCode,a=n(23).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1a;r-=o.jump+1)if((o=t[r]).marker===i.marker&&(-1===s&&(s=r),o.open&&o.end<0&&o.level===i.level&&(u=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(u=!0)),!u))){c=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+c,i.open=!1,o.end=n,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(l[i.marker][(i.length||0)%3]=s)}}e.exports=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(0,e.delimiters),t=0;t0&&r++,"text"===i[t].type&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var n,r,s,u,c,l,p,f,d,h=e,m=!0,g=!0,y=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function l(e){var t=e.re=n(455)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var u=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===i(n))return!function(e){return"[object RegExp]"===i(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(n)?c(t,n):u.push(t)}})),u.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function f(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function d(e,t){if(!(this instanceof d))return new d(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},u,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}d.prototype.add=function(e,t){return this.__schemas__[e]=t,l(this),this},d.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},d.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,u;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},d.prototype.pretest=function(e){return this.re.pretest.test(e)},d.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},d.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(f(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),l(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,l(this),this)},d.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},d.prototype.onCompile=function(){},e.exports=d},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(120).source,t.src_Cc=n(121).source,t.src_Z=n(122).source,t.src_P=n(88).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(3),a=n(75),s=n(11);t.default=function(e){var t=e.type,n=e.fields,r=e.interfaces,s=e.level,u=n.filter((function(e){return!e.isDeprecated})),c=n.filter((function(e){return e.isDeprecated})),l=t instanceof i.GraphQLInterfaceType?"interface ":"type";return o.createElement(h,null,o.createElement(m,null,o.createElement("span",{className:"field-name"},l)," ",o.createElement(g,null,t.name)," ",0===r.length&&o.createElement(b,null,"{")),r.map((function(e,t){return o.createElement(y,{key:e.name,type:e,x:s,y:t,collapsable:!0,beforeNode:o.createElement("span",{className:"field-name"},"implements"),afterNode:t===r.length-1?o.createElement(b,null,"{"):null,lastActive:!1})})),u.map((function(e,t){return o.createElement(a.default,{key:e.name,type:e,x:s,y:t+r.length,collapsable:!0,lastActive:!1})})),c.length>0&&o.createElement("br",null),c.map((function(e,t){return o.createElement("div",{key:e.name},o.createElement(v,null,"# Deprecated: ",e.deprecationReason),o.createElement(a.default,{type:e,x:s,y:t+u.length+r.length,collapsable:!0,lastActive:!1}))})),o.createElement(m,null,o.createElement(b,null,"}")))};var u,c,l,p,f,d,h=s.styled.div(u||(u=r(["\n font-size: 14px;\n overflow: auto;\n .doc-category-item {\n padding-left: 32px;\n }\n"],["\n font-size: 14px;\n overflow: auto;\n .doc-category-item {\n padding-left: 32px;\n }\n"]))),m=s.styled.div(c||(c=r(["\n padding: 6px 16px;\n white-space: nowrap;\n"],["\n padding: 6px 16px;\n white-space: nowrap;\n"]))),g=s.styled.span(l||(l=r(["\n color: #f25c54;\n"],["\n color: #f25c54;\n"]))),y=s.styled(a.default)(p||(p=r(["\n padding-left: 16px;\n .field-name {\n color: rgb(245, 160, 0);\n }\n .type-name {\n color: #f25c54;\n }\n"],["\n padding-left: 16px;\n .field-name {\n color: rgb(245, 160, 0);\n }\n .type-name {\n color: #f25c54;\n }\n"]))),v=s.styled.p(f||(f=r(["\n color: ",";\n padding-right: 16px;\n padding-left: 32px;\n"],["\n color: ",";\n padding-right: 16px;\n padding-left: 32px;\n"])),(function(e){return e.theme.colours.black50})),b=s.styled.span(d||(d=r(["\n font-weight: 600;\n color: ",";\n"],["\n font-weight: 600;\n color: ",";\n"])),(function(e){return e.theme.colours.darkBlue50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(132);t.default=function(e){var t=e.type;return r.createElement(i.DocType,{className:"doc-type-schema"},r.createElement("span",{className:"field-name"},"scalar")," ",r.createElement("span",{className:"type-name"},t.name))}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(11),a=n(132);t.default=function(e){var t=e.type,n=e.sdlType?t._values:t.getValues(),r=n.filter((function(e){return e.isDeprecated}));return i.createElement(a.DocType,{className:"doc-type-schema"},i.createElement("span",{className:"field-name"},"enum")," ",i.createElement("span",{className:"type-name"},t.name)," ",i.createElement("span",{className:"brace"},"{"),n.filter((function(e){return!e.isDeprecated})).map((function(e,t){return i.createElement(c,{key:e.name,first:0===t,value:e})})),r.length>0&&i.createElement("br",null),r.map((function(e,t){return i.createElement(c,{first:0===t,key:e.name,value:e,isDeprecated:!0})})),i.createElement("span",{className:"brace"},"}"))};var s,u,c=function(e){var t=e.value,n=e.isDeprecated,r=e.first;return i.createElement(l,{first:r},i.createElement("div",{className:"field-name"},t.name),t.description&&i.createElement(p,null,t.description),n&&i.createElement(p,null,"Deprecated: ",t.deprecationReason))},l=o.styled("div")(s||(s=r(["\n margin-top: ","px;\n .field-name {\n padding: 0 16px;\n color: red;\n }\n"],["\n margin-top: ","px;\n .field-name {\n padding: 0 16px;\n color: red;\n }\n"])),(function(e){return e.first?0:6})),p=o.styled.div(u||(u=r(["\n padding: 0 16px;\n color: ",";\n"],["\n padding: 0 16px;\n color: ",";\n"])),(function(e){return e.theme.colours.black50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(75),i=n(3),o=n(132);t.default=function(e){var t=e.schema,n=e.type,a=e.level,s=e.sessionId,u=t.getPossibleTypes(n);return i.createElement(o.DocType,{className:"doc-type-schema"},i.createElement("span",{className:"field-name"},"union")," ",i.createElement("span",{className:"type-name"},n.name)," = ",u.map((function(e,t){return i.createElement(r.default,{key:e.name,type:e,x:a,y:t+1,collapsable:!0,sessionId:s,lastActive:!1})})))}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(199),u=n(464),c=n(465),l=n(200),p=n(11),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.searchValue,n=e.schema,r=e.width,i=e.sessionId,o=e.handleSearch;return a.createElement(s.default,{width:r,overflow:!1},a.createElement(l.default,{onSearch:o}),a.createElement(h,null,t&&a.createElement(u.default,{searchValue:t,schema:n,level:0,sessionId:i}),!t&&a.createElement(c.default,{schema:n,sessionId:i})))},t}(a.PureComponent);t.default=f;var d,h=p.styled.div(d||(d=o(["\n overflow: auto;\n"],["\n overflow: auto;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(75),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue},t.prototype.render=function(){var e=this.props.level,t=this.props.searchValue,n=this.props.withinType,r=this.props.schema,i=[],o=[],s=[],c=r.getTypeMap(),p=Object.keys(c);n&&(p=p.filter((function(e){return e!==n.name}))).unshift(n.name);for(var d=0,h=function(r){if(i.length+o.length+s.length>=100)return"break";var p=c[r];if(n!==p&&l(r,t)&&o.push(a.createElement("div",{className:"doc-category-item",key:r},a.createElement(u.default,{type:p,x:e,y:d++,lastActive:!1}))),p.getFields){var f=p.getFields();Object.keys(f).forEach((function(o){var c=f[o];if(c.parent=p,!l(o,t)){if(!c.args||!c.args.length)return;if(0===c.args.filter((function(e){return l(e.name,t)})).length)return}var h=a.createElement("div",{className:"doc-category-item",key:r+"."+o},a.createElement(u.default,{key:"type",type:c,x:e,y:d++,showParentName:!0,lastActive:!1}));n===p?i.push(h):s.push(h)}))}},m=0,g=p;m0?a.createElement("div",null,i,a.createElement("div",{className:"doc-category"},a.createElement("div",{className:"doc-category-title"},"other results"),o,s)):a.createElement("div",null,i,o,s)},t}(a.Component);function l(e,t){try{var n=t.replace(/[^_0-9A-Za-z]/g,(function(e){return"\\"+e}));return-1!==e.search(new RegExp(n,"i"))}catch(n){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}}t.default=c;var p,f=s.styled.span(p||(p=o(["\n display: block;\n margin-top: 16px;\n margin-left: 16px;\n"],["\n display: block;\n margin-top: 16px;\n margin-left: 16px;\n"])))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(75),u=n(87),c=n(198),l=n(11),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.schema,n=e.sessionId,r=u.serializeRoot(t);return a.createElement(m,{className:"doc-root"},a.createElement(f,{name:"Queries",fields:r.queries,offset:0,sessionId:n}),r.mutations.length>0&&a.createElement(f,{name:"Mutations",fields:r.mutations,offset:r.queries.length,sessionId:n}),r.subscriptions.length>0&&a.createElement(f,{name:"Subscriptions",fields:r.subscriptions,offset:r.queries.length+r.mutations.length,sessionId:n}))},t}(a.PureComponent);function f(e){var t=e.name,n=e.fields,r=e.offset,i=n.filter((function(e){return!e.isDeprecated})),o=n.filter((function(e){return e.isDeprecated}));return a.createElement("div",null,a.createElement(c.CategoryTitle,null,t),i.map((function(e,t){return a.createElement(s.default,{key:e.name,type:e,x:0,y:r+t,collapsable:!0,lastActive:!1})})),o.length>0&&a.createElement("br",null),o.map((function(e,t){return a.createElement("div",{key:e.name},a.createElement(g,null,"# Deprecated: ",e.deprecationReason),a.createElement(s.default,{type:e,x:0,y:r+t+i.length,collapsable:!0,lastActive:!1}))})))}t.default=p;var d,h,m=l.styled.div(d||(d=o(["\n padding-left: 6px;\n\n .doc-category-item .field-name {\n color: #f25c54;\n }\n"],["\n padding-left: 6px;\n\n .doc-category-item .field-name {\n color: #f25c54;\n }\n"]))),g=l.styled.p(h||(h=o(["\n color: ",";\n padding-right: 16px;\n padding-left: 16px;\n"],["\n color: ",";\n padding-right: 16px;\n padding-left: 16px;\n"])),(function(e){return e.theme.colours.black50}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n;return function(){clearTimeout(n),n=setTimeout(()=>{n=null,t.apply(this,arguments)},e)}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(51),c=n(468),l=n(30),p=n(28),f=n(32),d=n(37),h=n(156),m=h.SortableElement(c.default),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={sorting:!1},t.onSortStart=function(e){e.index;t.setState({sorting:!0})},t.onSortEnd=function(e){var n=e.oldIndex,r=e.newIndex;t.props.reorderTabs(n,r),t.setState({sorting:!1})},t.getHelperDimensions=function(e){var t=e.node.getBoundingClientRect();return{width:t.width,height:t.height}},t}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.sessions,n=e.isApp,r=e.selectedSessionId,i=e.onNewSession,o=this.state.sorting;return a.createElement(D,{onSortStart:this.onSortStart,onSortEnd:this.onSortEnd,getHelperDimensions:this.getHelperDimensions,axis:"x",lockAxis:"x",lockToContainerEdges:!0,distance:10,transitionDuration:200},a.createElement(C,{isApp:n},t.map((function(e,t){return a.createElement(m,{key:e.id,session:e,selectedSessionId:r,index:t})})),a.createElement(w,{onClick:i,sorting:o},a.createElement(u.AddIcon,{width:34,height:34,strokeWidth:4,title:"Opens a New Tab"}))))},t}(a.PureComponent),y=p.createStructuredSelector({sessions:f.getSessionsArray,selectedSessionId:f.getSelectedSessionIdFromRoot});t.default=l.connect(y,{reorderTabs:d.reorderTabs})(g);var v,b,E,x=s.styled.div(v||(v=o(["\n color: white;\n height: 57px;\n background: ",";\n overflow: hidden;\n -webkit-app-region: drag;\n &:hover {\n overflow-x: overlay;\n }\n"],["\n color: white;\n height: 57px;\n background: ",";\n overflow: hidden;\n -webkit-app-region: drag;\n &:hover {\n overflow-x: overlay;\n }\n"])),(function(e){return e.theme.editorColours.background})),D=h.SortableContainer(x),C=s.styled("div")(b||(b=o(["\n display: flex;\n align-items: center;\n margin-top: 16px;\n padding-left: ",";\n"],["\n display: flex;\n align-items: center;\n margin-top: 16px;\n padding-left: ",";\n"])),(function(e){return e.isApp?"43px":"0"})),w=s.styled("div")(E||(E=o(["\n -webkit-app-region: no-drag;\n box-sizing: border-box;\n display: flex;\n visibility: ","\n height: 43px;\n width: 43px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n background: ",";\n justify-content: center;\n align-items: center;\n svg {\n stroke: ",";\n }\n &:hover {\n background: ",";\n }\n"],["\n -webkit-app-region: no-drag;\n box-sizing: border-box;\n display: flex;\n visibility: ","\n height: 43px;\n width: 43px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n background: ",";\n justify-content: center;\n align-items: center;\n svg {\n stroke: ",";\n }\n &:hover {\n background: ",";\n }\n"])),(function(e){return e.sorting?"hidden":"visible"}),(function(e){return e.theme.editorColours.navigationBar}),(function(e){return e.theme.editorColours.tabInactive}),(function(e){return e.theme.editorColours.icon}),(function(e){return e.theme.editorColours.tab}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(51),u=n(30),c=n(37),l=n(11),p=n(469),f=function(e){function t(t){var n=e.call(this,t)||this;return n.startEditName=function(){n.setState({editingName:!0})},n.stopEditName=function(){n.setState({editingName:!1})},n.handleKeyDown=function(e){13===e.keyCode&&n.setState({editingName:!1})},n.handleMouseOverCross=function(){n.setState({overCross:!0})},n.handleMouseOutCross=function(){n.setState({overCross:!1})},n.handleSelectSession=function(){n.props.selectTab(n.props.session.id)},n.handleCloseSession=function(e){e.stopPropagation(),n.props.closeTab(n.props.session.id)},n.handleEditName=function(e){n.props.editName(e.target.value)},n.state={overCross:!1,editingName:!1},n}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.session,n=e.selectedSessionId,r=t.queryTypes,i=t.id===n,o=t.name||t.operationName||r.firstOperationName||"New Tab";return a.createElement(S,{active:i,onMouseDown:this.handleSelectSession},a.createElement(A,{active:i},t.subscriptionActive&&a.createElement(M,null),a.createElement(T,null,r.query&&a.createElement(F,null,"Q"),(t.isSettingsTab||t.isConfigTab)&&a.createElement(F,null,a.createElement(s.SettingsIcon,{width:12,height:12,fill:"white"})),r.mutation&&a.createElement(N,null,"M"),r.subscription&&a.createElement(I,null,"S"))),this.state.editingName?a.createElement(k,{value:t.name||"",onChange:this.handleEditName,onBlur:this.stopEditName,onKeyDown:this.handleKeyDown,autoFocus:!0}):a.createElement(_,{active:i,onDoubleClick:this.startEditName},o),a.createElement(L,{className:"close",active:i,hasCircle:t.isFile&&t.changed&&!this.state.overCross,onClick:this.handleCloseSession,onMouseEnter:this.handleMouseOverCross,onMouseLeave:this.handleMouseOutCross},t.isFile&&t.changed&&!this.state.overCross?a.createElement(j,null,"⬤"):a.createElement(s.CrossIcon,{width:12,height:11,strokeWidth:7,title:"Close Tab"})))},t}(a.PureComponent);t.default=u.connect(null,{closeTab:c.closeTab,selectTab:c.selectTab,editName:c.editName})(f);var d,h,m,g,y,v,b,E,x,D,C,w,S=l.styled("div")(d||(d=o(["\n -webkit-app-region: no-drag;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n height: 43px;\n padding: 10px;\n padding-top: 9px;\n margin-right: 10px;\n font-size: 14px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n background: ",";\n &:hover {\n background: ",";\n .close {\n opacity: 1;\n }\n }\n"],["\n -webkit-app-region: no-drag;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n height: 43px;\n padding: 10px;\n padding-top: 9px;\n margin-right: 10px;\n font-size: 14px;\n border-radius: 2px;\n border-bottom: 2px solid ",";\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n background: ",";\n &:hover {\n background: ",";\n .close {\n opacity: 1;\n }\n }\n"])),(function(e){return e.theme.editorColours.navigationBar}),(function(e){return e.active?e.theme.editorColours.tab:e.theme.editorColours.tabInactive}),(function(e){return e.theme.editorColours.tab})),_=l.styled("div")(h||(h=o(["\n opacity: ",";\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n"],["\n opacity: ",";\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n"])),(function(e){return e.active?1:.5}),(function(e){return e.theme.editorColours.tabText})),k=l.styled(p.default)(m||(m=o(["\n input {\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n }\n"],["\n input {\n background: transparent;\n color: ",";\n font-size: 14px;\n margin-left: 2px;\n display: inline;\n letter-spacing: 0.53px;\n }\n"])),(function(e){return e.theme.editorColours.tabText})),A=l.styled("div")(g||(g=o(["\n display: flex;\n align-items: center;\n opacity: ",";\n"],["\n display: flex;\n align-items: center;\n opacity: ",";\n"])),(function(e){return e.active?1:.5})),T=l.styled.div(y||(y=o(["\n display: flex;\n color: white;\n"],["\n display: flex;\n color: white;\n"]))),O=l.styled.div(v||(v=o(["\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 4px;\n font-size: 12px;\n font-weight: 700;\n border-radius: 2px;\n"],["\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 4px;\n font-size: 12px;\n font-weight: 700;\n border-radius: 2px;\n"]))),F=l.styled(O)(b||(b=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.blue})),N=l.styled(O)(E||(E=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.orange})),I=l.styled(O)(x||(x=o(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.purple})),M=l.styled.div(D||(D=o(["\n width: 7px;\n height: 7px;\n background: rgba(242, 92, 84, 1);\n border-radius: 100%;\n margin-right: 10px;\n"],["\n width: 7px;\n height: 7px;\n background: rgba(242, 92, 84, 1);\n border-radius: 100%;\n margin-right: 10px;\n"]))),j=l.styled.div(C||(C=o(["\n position: relative;\n top: -2px;\n font-size: 9px;\n background: ",";\n"],["\n position: relative;\n top: -2px;\n font-size: 9px;\n background: ",";\n"])),(function(e){return e.theme.editorColours.circle})),L=l.styled("div")(w||(w=o(["\n position: relative;\n display: flex;\n margin-left: 10px;\n top: 1px;\n height: 13px;\n width: 13px;\n opacity: ",";\n svg {\n stroke: ",";\n }\n"],["\n position: relative;\n display: flex;\n margin-left: 10px;\n top: 1px;\n height: 13px;\n width: 13px;\n opacity: ",";\n svg {\n stroke: ",";\n }\n"])),(function(e){return e.active||e.hasCircle?1:0}),(function(e){return e.theme.editorColours.icon}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(245),u=n(471),c=n(473),l=n(67),p=n(119),f=n(11),d=n(30),h=n(28),m=n(474),g=n(106),y=n(96),v=n(37),b=n(116),E=n(68),x=n(51),D=function(e){function t(t){var n=e.call(this,t)||this;n.handleClickUse=function(){var e=n.props.items.get(n.state.selectedItemIndex);n.props.duplicateSession(e),n.props.closeHistory()},n.handleItemSelect=function(e){n.setState({selectedItemIndex:e})},n.handleSelectFilter=function(e){n.setState({selectedFilter:e})},n.handleSearch=function(e){n.setState({searchTerm:e})};var r=t.items.keySeq().first()||"";return n.state={selectedFilter:"HISTORY",selectedItemIndex:r,searchTerm:""},n}return i(t,e),t.prototype.render=function(){var e=this.state,t=e.searchTerm,n=e.selectedFilter,r=this.props.items.filter((function(e){return"STARRED"===n?e.starred:!(t&&t.length>0)||e.query.toLowerCase().includes(t.toLowerCase())})),i=this.props.items.get(this.state.selectedItemIndex);return i=i&&i.toJS?i.toJS():void 0,a.createElement(s,{isOpen:this.props.isOpen,onRequestClose:this.props.closeHistory,contentLabel:"GraphiQL Session History",style:l.modalStyle,ariaHideApp:!1},a.createElement(L,null,a.createElement(P,null,a.createElement(u.default,{onSelectFilter:this.handleSelectFilter,selectedFilter:this.state.selectedFilter,onSearch:this.handleSearch}),a.createElement(c.default,{items:r,selectedItemIndex:this.state.selectedItemIndex,searchTerm:this.state.searchTerm,onItemSelect:this.handleItemSelect,onItemStarToggled:this.props.toggleHistoryItemStarring})),Boolean(i)?a.createElement(R,null,a.createElement(B,null,a.createElement(V,null),a.createElement(q,{onClick:this.handleClickUse},a.createElement(H,null,"Use"),a.createElement(x.ArrowRight,{color:"white",width:13,height:13}))),a.createElement(W,null,a.createElement(G,null,a.createElement(E.Container,null,a.createElement(K,null,a.createElement(p.QueryEditor,{value:i.query})))))):a.createElement(R,null,a.createElement(U,null,a.createElement(z,null,"No History yet")))))},t}(a.Component),C=h.createStructuredSelector({items:m.getHistory,isOpen:g.getHistoryOpen});t.default=d.connect(C,{closeHistory:y.closeHistory,openHistory:y.openHistory,duplicateSession:v.duplicateSession,toggleHistoryItemStarring:b.toggleHistoryItemStarring})(D);var w,S,_,k,A,T,O,F,N,I,M,j,L=f.styled.div(w||(w=o(["\n display: flex;\n min-height: 500px;\n"],["\n display: flex;\n min-height: 500px;\n"]))),P=f.styled.div(S||(S=o(["\n flex: 1;\n\n background: white;\n"],["\n flex: 1;\n\n background: white;\n"]))),R=f.styled.div(_||(_=o(["\n flex: 0 0 464px;\n z-index: 2;\n"],["\n flex: 0 0 464px;\n z-index: 2;\n"]))),B=f.styled.div(k||(k=o(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n padding-left: ",";\n padding-right: ",";\n padding-top: 20px;\n padding-bottom: 20px;\n\n background: ",";\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n padding-left: ",";\n padding-right: ",";\n padding-top: 20px;\n padding-bottom: 20px;\n\n background: ",";\n"])),(function(e){return e.theme.sizes.medium25}),(function(e){return e.theme.sizes.medium25}),(function(e){return e.theme.editorColours.resultBackground})),U=f.styled.div(A||(A=o(["\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n background: ",";\n"],["\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n background: ",";\n"])),(function(e){return e.theme.editorColours.resultBackground})),z=f.styled.div(T||(T=o(["\n font-size: 16px;\n color: ",";\n"],["\n font-size: 16px;\n color: ",";\n"])),(function(e){return e.theme.editorColours.text})),V=f.styled.div(O||(O=o(["\n font-size: ",";\n font-weight: ",";\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.4);\n"],["\n font-size: ",";\n font-weight: ",";\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.4);\n"])),(function(e){return e.theme.sizes.fontSmall}),(function(e){return e.theme.sizes.fontSemiBold})),q=f.styled.div(F||(F=o(["\n display: flex;\n align-items: center;\n\n padding-top: ",";\n padding-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n font-size: ",";\n font-weight: ",";\n\n border-radius: ",";\n background: ",";\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ",";\n padding-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n font-size: ",";\n font-weight: ",";\n\n border-radius: ",";\n background: ",";\n cursor: pointer;\n"])),(function(e){return e.theme.sizes.small10}),(function(e){return e.theme.sizes.small10}),(function(e){return e.theme.sizes.small16}),(function(e){return e.theme.sizes.small16}),(function(e){return e.theme.sizes.fontSmall}),(function(e){return e.theme.sizes.fontSemiBold}),(function(e){return e.theme.sizes.smallRadius}),(function(e){return e.theme.colours.green})),H=f.styled.div(N||(N=o(["\n margin-right: ",";\n color: white;\n"],["\n margin-right: ",";\n color: white;\n"])),(function(e){return e.theme.sizes.small6})),W=f.styled.div(I||(I=o(["\n height: calc(100% - 81px);\n display: flex;\n flex: 1 1 auto;\n"],["\n height: calc(100% - 81px);\n display: flex;\n flex: 1 1 auto;\n"]))),G=f.styled(W)(M||(M=o(["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n flex: 1 1 auto;\n"],["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n flex: 1 1 auto;\n"]))),K=f.styled.div(j||(j=o(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"],["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(472),a=n(11),s=n(200);t.default=function(e){return i.createElement(c,null,i.createElement(o.default,{onSelectFilter:e.onSelectFilter,selectedFilter:e.selectedFilter}),i.createElement(s.default,{placeholder:"Search the history...",onSearch:e.onSearch,clean:!0}))};var u,c=a.styled.div(u||(u=r(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n background: ",";\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n background: ",";\n"])),(function(e){return e.theme.colours.black02}))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(11),a=n(51);t.default=o.withTheme((function(e){var t=e.selectedFilter,n=e.onSelectFilter,r=e.theme;return i.createElement(l,null,i.createElement(p,{active:"HISTORY"===t,onClick:function(){return n("HISTORY")}},i.createElement(a.History,{color:"HISTORY"===t?r.colours.white:r.colours.black30,strokeWidth:3,width:25,height:25}),i.createElement(f,null,"History")),i.createElement(p,{active:"STARRED"===t,onClick:function(){return n("STARRED")}},i.createElement(a.Star,{color:"STARRED"===t?r.colours.white:r.colours.black30,width:16,height:16}),i.createElement(f,null,"Starred")))}));var s,u,c,l=o.styled.div(s||(s=r(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),p=o.styled("div")(u||(u=r(["\n box-sizing: content-box;\n height: 24px;\n z-index: ",";\n display: flex;\n align-items: center;\n margin: 0 -2px;\n padding: ",";\n background: ",";\n\n color: ",";\n font-size: 14px;\n font-weight: 600;\n text-transform: uppercase;\n border-radius: 2px;\n cursor: pointer;\n"],["\n box-sizing: content-box;\n height: 24px;\n z-index: ",";\n display: flex;\n align-items: center;\n margin: 0 -2px;\n padding: ",";\n background: ",";\n\n color: ",";\n font-size: 14px;\n font-weight: 600;\n text-transform: uppercase;\n border-radius: 2px;\n cursor: pointer;\n"])),(function(e){return e.active?2:0}),(function(e){return e.active?"7px 9px 8px 9px":"5px 13px 6px 13px"}),(function(e){return e.active?e.theme.colours.green:e.theme.colours.black07}),(function(e){return e.active?e.theme.colours.white:e.theme.colours.black30})),f=o.styled.p(c||(c=r(["\n margin-left: 6px;\n"],["\n margin-left: 6px;\n"])))},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(51),a=n(11);t.default=a.withTheme((function(e){var t=e.items,n=e.onItemSelect,r=e.selectedItemIndex,a=e.onItemStarToggled;e.theme;return i.createElement(y,null,t.map((function(e,t){return i.createElement(v,{key:e.id,active:r===t,onClick:function(){return n(t)}},i.createElement(E,null,i.createElement(o.Star,{onClick:function(){return a(e.id)},stroke:e.starred?void 0:"rgb(221,171,0)",fill:e.starred?"rgb(221,171,0)":void 0,strokeWidth:.5,width:25,height:25}),i.createElement(b,null,i.createElement(x,null,e.operationName||e.queryTypes.firstOperationName||"New Session"),e.queryTypes.query&&i.createElement(C,null,"Q"),e.queryTypes.mutation&&i.createElement(w,null,"M"),e.queryTypes.subscription&&i.createElement(S,null,"S"))),i.createElement(E,null,e.date&&i.createElement(_,null,"function"==typeof e.date.getMonth&&e.date.getMonth()+1,"/",e.date.getDate(),"/",e.date.getFullYear().toString().slice(2,4))))})).toArray().map((function(e){return e[1]})))}));var s,u,c,l,p,f,d,h,m,g,y=a.styled.div(s||(s=r(["\n overflow-y: scroll;\n max-height: calc(100vh - 121px);\n"],["\n overflow-y: scroll;\n max-height: calc(100vh - 121px);\n"]))),v=a.styled("div")(u||(u=r(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 25px 20px;\n cursor: pointer;\n border-bottom: 1px solid;\n border-color: ",";\n background: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 25px 20px;\n cursor: pointer;\n border-bottom: 1px solid;\n border-color: ",";\n background: ",";\n"])),(function(e){return e.theme.colours.black10}),(function(e){return e.active?e.theme.colours.black04:e.theme.colours.white})),b=a.styled.div(c||(c=r(["\n display: flex;\n align-items: center;\n margin-left: 20px;\n"],["\n display: flex;\n align-items: center;\n margin-left: 20px;\n"]))),E=a.styled.div(l||(l=r(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),x=a.styled.p(p||(p=r(["\n font-weight: 300;\n font-size: 20px;\n margin-right: 16px;\n"],["\n font-weight: 300;\n font-size: 20px;\n margin-right: 16px;\n"]))),D=a.styled.div(f||(f=r(["\n height: 21px;\n width: 21px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 4px;\n border-radius: 2px;\n font-weight: 700;\n font-size: 12px;\n color: ",";\n"],["\n height: 21px;\n width: 21px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 4px;\n border-radius: 2px;\n font-weight: 700;\n font-size: 12px;\n color: ",";\n"])),(function(e){return e.theme.colours.white})),C=a.styled(D)(d||(d=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.blue})),w=a.styled(D)(h||(h=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.orange})),S=a.styled(D)(m||(m=r(["\n background: ",";\n"],["\n background: ",";\n"])),(function(e){return e.theme.colours.purple})),_=a.styled.time(g||(g=r(["\n color: ",";\n font-size: 14px;\n margin-left: 16px;\n"],["\n color: ",";\n font-size: 14px;\n margin-left: 16px;\n"])),(function(e){return e.theme.colours.black40}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=n(41);t.getHistory=r.createSelector([i.getSelectedWorkspace],(function(e){return e.history}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(51),u=n(11),c=n(37),l=n(30),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return a.createElement(h,null,a.createElement(m,null,a.createElement(s.SettingsIcon,{width:23,height:23,onClick:this.props.onClick,title:"Settings"})))},t}(a.Component);t.default=l.connect(null,{onClick:c.openSettingsTab})(p);var f,d,h=u.styled.div(f||(f=o(["\n position: absolute;\n z-index: 1005;\n right: 20px;\n top: 17px;\n"],["\n position: absolute;\n z-index: 1005;\n right: 20px;\n top: 17px;\n"]))),m=u.styled.div(d||(d=o(["\n position: relative;\n cursor: pointer;\n\n svg {\n fill: ",";\n transition: 0.1s linear fill;\n }\n\n &:hover {\n svg {\n fill: ",";\n }\n }\n"],["\n position: relative;\n cursor: pointer;\n\n svg {\n fill: ",";\n transition: 0.1s linear fill;\n }\n\n &:hover {\n svg {\n fill: ",";\n }\n }\n"])),(function(e){return e.theme.editorColours.icon}),(function(e){return e.theme.editorColours.iconHover}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(128),c=n(477),l=n(30),p=n(28),f=n(106),d=n(96),h=n(37),m=n(41),g=n(68),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){"s"===e.key&&e.metaKey&&(e.preventDefault(),t.props.onSave())},t}return i(t,e),t.prototype.componentDidMount=function(){window.addEventListener("keydown",this.handleKeydown,!0)},t.prototype.render=function(){var e=this.props.isConfig;return a.createElement(g.Container,null,a.createElement(w,null,a.createElement(g.default,null,a.createElement(c.ConfigEditor,{value:this.props.value,onEdit:this.props.onChange,onRunQuery:this.props.onSave,isYaml:this.props.isYaml,readOnly:this.props.readOnly}),a.createElement(_,null,window.version)),!this.props.readOnly&&a.createElement(S,null,a.createElement(u.Button,{onClick:this.props.onSave},"Save ",e?"Config":"Settings"))))},t}(a.Component);t.SettingsEditor=y;var v=p.createStructuredSelector({value:m.getSettingsString}),b=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChange=function(e){n.setState({value:e}),n.props.editSettings()},n.handleSave=function(){n.props.onChange(n.state.value),n.props.saveSettings()},n.state={value:t.value},n}return i(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){return a.createElement(y,{value:this.state.value,onChange:this.handleChange,onSave:this.handleSave})},t}(a.Component);t.PlaygroundSettingsEditor=l.connect(v,{onChange:d.setSettingsString,editSettings:h.editSettings,saveSettings:h.saveSettings})(b);var E=p.createStructuredSelector({value:f.getConfigString});t.GraphQLConfigEditor=l.connect(E,{onChange:d.setConfigString})(y);var x,D,C,w=s.styled.div(x||(x=o(["\n background: ",";\n position: relative;\n display: flex;\n flex-flow: column;\n flex: 1 1 0;\n\n .CodeMirror {\n background: ",";\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"],["\n background: ",";\n position: relative;\n display: flex;\n flex-flow: column;\n flex: 1 1 0;\n\n .CodeMirror {\n background: ",";\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"])),(function(e){return e.theme.editorColours.resultBackground}),(function(e){return e.theme.editorColours.resultBackground})),S=s.styled.div(D||(D=o(["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n"],["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n"]))),_=s.styled.span(C||(C=o(["\n position: absolute;\n right: 20px;\n bottom: 17px;\n color: ",";\n font-weight: 700;\n margin-right: 14px;\n"],["\n position: absolute;\n right: 20px;\n bottom: 17px;\n color: ",";\n font-weight: 700;\n margin-right: 14px;\n"])),(function(e){return e.theme.editorColours.textInactive}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(68),u=n(11),c=function(e){function t(t){var n=e.call(this,t)||this;return n.setNode=function(e){n.node=e},n.onKeyUp=function(e,t){var r=t.keyCode;(r>=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&n.editor.execCommand("autocomplete")},n.onEdit=function(){n.ignoreChangeEvent||(n.cachedValue=n.editor.getValue(),n.props.onEdit&&n.props.onEdit(n.cachedValue))},n.cachedValue=t.value||"",n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=n(16);n(125),n(89),n(126),n(90),n(103),n(127),n(69),n(104),n(70),n(105),n(478),n(186),n(187),n(188),this.editor=t(this.node,{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:this.props.isYaml?"yaml":"graphql-variables",theme:this.props.editorTheme||"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!this.props.readOnly&&"nocursor",foldGutter:{minFoldSize:4},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Shift-Ctrl-P":function(){e.props.onPrettifyQuery&&e.props.onPrettifyQuery()},"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this.onEdit),this.editor.on("keyup",this.onKeyUp)},t.prototype.componentDidUpdate=function(e){this.ignoreChangeEvent=!0,this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.componentWillUnmount=function(){this.editor.off("change",this.onEdit),this.editor.off("keyup",this.onKeyUp),this.editor=null},t.prototype.render=function(){return a.createElement(s.default,null,a.createElement(p,{ref:this.setNode}))},t.prototype.getCodeMirror=function(){return this.editor},t.prototype.getClientHeight=function(){return this.node&&this.node.clientHeight},t}(a.Component);t.ConfigEditor=c;var l,p=u.styled.div(l||(l=o(["\n flex: 1;\n height: 100%;\n position: relative;\n .CodeMirror-linenumbers {\n background: ",";\n }\n"],["\n flex: 1;\n height: 100%;\n position: relative;\n .CodeMirror-linenumbers {\n background: ",";\n }\n"])),(function(e){return e.theme.editorColours.resultBackground}))},function(e,t,n){!function(e){"use strict";e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def";if(t.match(/\.\.\./))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(n(16))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(11),u=n(119),c=n(28),l=n(32),p=n(37),f=n(68),d=n(30),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return a.createElement(f.Container,null,a.createElement(v,null,a.createElement(f.default,null,a.createElement(b,null,a.createElement(u.QueryEditor,{value:this.props.value,onChange:this.props.onChange})))))},t}(a.Component),m=c.createStructuredSelector({value:l.getFile});t.default=d.connect(m,{onChange:p.editFile})(h);var g,y,v=s.styled.div(g||(g=o(["\n background: ",";\n position: relative;\n .variable-editor {\n height: 100% !important;\n }\n .CodeMirror {\n background: none !important;\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"],["\n background: ",";\n position: relative;\n .variable-editor {\n height: 100% !important;\n }\n .CodeMirror {\n background: none !important;\n .CodeMirror-code {\n color: rgba(255, 255, 255, 0.7);\n }\n .cm-atom {\n color: rgba(42, 126, 210, 1);\n }\n }\n"])),(function(e){return e.theme.editorColours.resultBackground})),b=s.styled.div(y||(y=o(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"],["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])))},function(e){e.exports=JSON.parse('{"name":"graphql-playground-react","version":"1.7.28","main":"./lib/lib.js","typings":"./lib/lib.d.ts","description":"GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).","contributors":["Tim Suchanek ","Johannes Schickling ","Lukas Huvar "],"repository":{"type":"git","url":"http://github.com/graphcool/graphql-playground.git"},"license":"MIT","scripts":{"start":"node scripts/start.js","start:analyze":"ANALYZE_BUNDLE=true node scripts/start.js","start:graphql-bin":"ACTIVE_APP=graphqlbin node scripts/start.js","prepublishOnly":"yarn build","build":"rimraf dist build dist && yarn build-app && yarn build-package","tsc":"tsc -p tsconfig.build.json","build-package":"rimraf lib build/dist && npm run tsc && babel lib -d lib && cp -r ./src/assets/ ./lib/assets/ && cd lib && rimraf *.jsx;","build-app":"node scripts/build.js","test":"jest","bundlesize":"bundlesize","bump":"npm version patch --no-git-tag-version && git add package.json","graphql-faker":"graphql-faker ./tests/schema.faker.graphql","lint":"tslint \\"src/**/*.ts{,x}\\"","precommit":"lint-staged","prettier":"prettier --single-quote --no-semi --trailing-comma all --write *.{ts,tsx} \'src/**/*.{ts,tsx}\'"},"files":["build","lib","playground.css"],"bundlesize":[{"path":"build/static/js/index.js","maxSize":"674 kB"}],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/plugin-proposal-class-properties":"^7.0.0","@babel/plugin-proposal-json-strings":"^7.0.0","@babel/plugin-syntax-dynamic-import":"^7.0.0","@babel/plugin-syntax-import-meta":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-react":"^7.0.0","@types/deasync":"0.1.0","@types/escape-html":"^1.0.1","@types/jest":"22.2.3","@types/markdown-it":"^12.2.3","@types/node":"12.12.34","@types/react":"16.9.32","@types/zen-observable":"^0.5.3","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.4.2","babel-loader":"^8.0.0","babel-plugin-styled-components":"^1.8.0","bundlesize":"^0.17.0","case-sensitive-paths-webpack-plugin":"2.3.0","chalk":"2.4.1","connect-history-api-fallback":"1.5.0","cross-spawn":"6.0.5","css-loader":"3.4.2","detect-port":"1.2.3","dotenv":"5.0.1","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.4","extract-text-webpack-plugin":"4.0.0-beta.0","file-loader":"6.0.0","filesize":"6.1.0","fs-extra":"5.0.0","graphql-playground-html":"1.5.6","gzip-size":"4.1.0","html-webpack-plugin":"4.0.4","http-proxy-middleware":"0.17.4","husky":"0.14.3","jest":"22.1.4","jest-localstorage-mock":"^2.2.0","json-loader":"0.5.7","lint-staged":"6.1.0","node-noop":"1.0.0","object-assign":"4.1.1","promise":"8.0.1","raw-loader":"4.0.0","react-dev-utils":"10.1.0","recursive-readdir":"2.2.2","rimraf":"3.0.2","source-map-loader":"0.2.4","strip-ansi":"4.0.0","style-loader":"1.1.3","svg-inline-loader":"0.8.2","sw-precache-webpack-plugin":"1.0.0","ts-loader":"6.2.2","tslint":"5.10.0","tslint-graphcool-frontend":"0.0.3","tslint-loader":"3.6.0","typescript":"3.8.3","typescript-styled-plugin":"^0.11.0","url-loader":"4.0.0","webpack":"4.44.1","webpack-dev-server":"3.11.0","webpack-manifest-plugin":"2.2.0","why-did-you-update":"0.1.1"},"dependencies":{"@types/lru-cache":"^4.1.1","apollo-link":"^1.2.13","apollo-link-http":"^1.5.16","apollo-link-ws":"^1.0.19","calculate-size":"^1.1.1","codemirror":"^5.58.1","codemirror-graphql":"^0.12.3","copy-to-clipboard":"^3.0.8","cryptiles":"4.1.2","cuid":"^1.3.8","escape-html":"^1.0.3","graphiql":"^0.17.5","graphql":"^15.3.0","immutable":"^4.0.0-rc.9","isomorphic-fetch":"^2.2.1","js-yaml":"^3.10.0","json-stable-stringify":"^1.0.1","keycode":"^2.1.9","lodash":"^4.17.11","lodash.debounce":"^4.0.8","lru-cache":"^6.0.0","markdown-it":"^12.2.0","prettier":"2.0.2","prop-types":"^15.7.2","query-string":"5","react":"16.13.1","react-addons-shallow-compare":"^15.6.2","react-codemirror":"^1.0.0","react-copy-to-clipboard":"^5.0.1","react-display-name":"^0.2.3","react-dom":"^16.13.1","react-helmet":"^5.2.0","react-input-autosize":"^2.2.1","react-modal":"^3.1.11","react-redux":"^7.2.1","react-router-dom":"^4.2.2","react-sortable-hoc":"^0.8.3","react-transition-group":"^2.2.1","react-virtualized":"^9.12.0","redux":"^4.0.5","redux-actions":"^2.6.5","redux-immutable":"^4.0.0","redux-localstorage":"^1.0.0-rc5","redux-localstorage-debounce":"^0.1.0","redux-localstorage-filter":"^0.1.1","redux-saga":"^1.1.3","reselect":"^4.0.0","seamless-immutable":"^7.0.1","styled-components":"^4.0.0","subscriptions-transport-ws":"^0.9.5","utility-types":"^1.0.0","webpack-bundle-analyzer":"^3.3.2","zen-observable":"^0.7.1"},"lint-staged":{"*.{ts,tsx}":["prettier --single-quote --no-semi --write","tslint","git add"],"gitDir":"../../"},"jest":{"collectCoverageFrom":["src/**/*.{ts,tsx}"],"setupFiles":["/config/polyfills.js"],"testPathIgnorePatterns":["[/\\\\\\\\](build|docs|node_modules)[/\\\\\\\\]"],"testEnvironment":"node","testURL":"http://localhost","transform":{"^.+\\\\.css$":"/config/jest/cssTransform.js","^.+\\\\.tsx?$":"/config/jest/typescriptTransform.js","^(?!.*\\\\.(css|json)$)":"/config/jest/fileTransform.js"},"transformIgnorePatterns":["[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx)$"],"moduleNameMapper":{"^react-native$":"react-native-web"},"moduleFileExtensions":["ts","tsx","js"],"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$"},"gitHead":"220a7c19030fe15fc309082c3163b109a72a1551"}')},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m,g,y,v=(0,s.default)(c.reducePropsToState,c.handleClientStateChange,c.mapStateOnServer)((function(){return null})),b=(m=v,y=g=function(e){function t(){return d(this,t),h(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!(0,u.default)(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case l.TAG_NAMES.SCRIPT:case l.TAG_NAMES.NOSCRIPT:return{innerHTML:t};case l.TAG_NAMES.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,i=e.arrayTypeChildren,o=e.newChildProps,a=e.nestedChildren;return r({},i,((t={})[n.type]=[].concat(i[n.type]||[],[r({},o,this.mapNestedChildrenToProps(n,a))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,i=e.child,o=e.newProps,a=e.newChildProps,s=e.nestedChildren;switch(i.type){case l.TAG_NAMES.TITLE:return r({},o,((t={})[i.type]=s,t.titleAttributes=r({},a),t));case l.TAG_NAMES.BODY:return r({},o,{bodyAttributes:r({},a)});case l.TAG_NAMES.HTML:return r({},o,{htmlAttributes:r({},a)})}return r({},o,((n={})[i.type]=r({},a),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=r({},t);return Object.keys(e).forEach((function(t){var i;n=r({},n,((i={})[t]=e[t],i))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return o.default.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=f(i,["children"]),s=(0,c.convertReactPropstoHtmlAttributes)(a);switch(n.warnOnInvalidChildren(e,o),e.type){case l.TAG_NAMES.LINK:case l.TAG_NAMES.META:case l.TAG_NAMES.NOSCRIPT:case l.TAG_NAMES.SCRIPT:case l.TAG_NAMES.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=f(e,["children"]),i=r({},n);return t&&(i=this.mapChildrenToProps(t,i)),o.default.createElement(m,i)},i(t,null,[{key:"canUseDOM",set:function(e){m.canUseDOM=e}}]),t}(o.default.Component),g.propTypes={base:a.default.object,bodyAttributes:a.default.object,children:a.default.oneOfType([a.default.arrayOf(a.default.node),a.default.node]),defaultTitle:a.default.string,defer:a.default.bool,encodeSpecialCharacters:a.default.bool,htmlAttributes:a.default.object,link:a.default.arrayOf(a.default.object),meta:a.default.arrayOf(a.default.object),noscript:a.default.arrayOf(a.default.object),onChangeClientState:a.default.func,script:a.default.arrayOf(a.default.object),style:a.default.arrayOf(a.default.object),title:a.default.string,titleAttributes:a.default.object,titleTemplate:a.default.string},g.defaultProps={defer:!0,encodeSpecialCharacters:!0},g.peek=m.peek,g.rewind=function(){var e=m.rewind();return e||(e=(0,c.mapStateOnServer)({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},y);b.renderStatic=b.rewind,t.Helmet=b,t.default=b},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(3),o=r(i),a=r(n(484));function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var c,l=[];function p(){c=e(l.map((function(e){return e.props}))),f.canUseDOM?t(c):n&&(c=n(c))}var f=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return c},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=c;return c=void 0,l=[],e};var s=i.prototype;return s.shouldComponentUpdate=function(e){return!a(e,this.props)},s.componentWillMount=function(){l.push(this),p()},s.componentDidUpdate=function(){p()},s.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),p()},s.render=function(){return o.createElement(r,this.props)},i}(i.Component);return s(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),s(f,"canUseDOM",u),f}}},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;u1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},p=function(e){var t=g(e,s.TAG_NAMES.TITLE),n=g(e,s.HELMET_PROPS.TITLE_TEMPLATE);if(n&&t)return n.replace(/%s/g,(function(){return t}));var r=g(e,s.HELMET_PROPS.DEFAULT_TITLE);return t||r||void 0},f=function(e){return g(e,s.HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},d=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return i({},e,t)}),{})},h=function(e,t){return t.filter((function(e){return void 0!==e[s.TAG_NAMES.BASE]})).map((function(e){return e[s.TAG_NAMES.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},y=(c=Date.now(),function(e){var t=Date.now();t-c>16?(c=t,e(t)):setTimeout((function(){y(e)}),0)}),v=function(e){return clearTimeout(e)},b="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||y:e.requestAnimationFrame||y,E="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||v:e.cancelAnimationFrame||v,x=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},D=null,C=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,u=e.noscriptTags,c=e.onChangeClientState,l=e.scriptTags,p=e.styleTags,f=e.title,d=e.titleAttributes;_(s.TAG_NAMES.BODY,r),_(s.TAG_NAMES.HTML,i),S(f,d);var h={baseTag:k(s.TAG_NAMES.BASE,n),linkTags:k(s.TAG_NAMES.LINK,o),metaTags:k(s.TAG_NAMES.META,a),noscriptTags:k(s.TAG_NAMES.NOSCRIPT,u),scriptTags:k(s.TAG_NAMES.SCRIPT,l),styleTags:k(s.TAG_NAMES.STYLE,p)},m={},g={};Object.keys(h).forEach((function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(m[e]=n),r.length&&(g[e]=h[e].oldTags)})),t&&t(),c(e,m,g)},w=function(e){return Array.isArray(e)?e.join(""):e},S=function(e,t){void 0!==e&&document.title!==e&&(document.title=w(e)),_(s.TAG_NAMES.TITLE,t)},_=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(s.HELMET_ATTRIBUTE),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(t),u=0;u=0;f--)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute(s.HELMET_ATTRIBUTE):n.getAttribute(s.HELMET_ATTRIBUTE)!==a.join(",")&&n.setAttribute(s.HELMET_ATTRIBUTE,a.join(","))}},k=function(e,t){var n=document.head||document.querySelector(s.TAG_NAMES.HEAD),r=n.querySelectorAll(e+"["+s.HELMET_ATTRIBUTE+"]"),i=Array.prototype.slice.call(r),o=[],a=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===s.TAG_PROPERTIES.INNER_HTML)n.innerHTML=t.innerHTML;else if(r===s.TAG_PROPERTIES.CSS_TEXT)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var u=void 0===t[r]?"":t[r];n.setAttribute(r,u)}n.setAttribute(s.HELMET_ATTRIBUTE,"true"),i.some((function(e,t){return a=t,n.isEqualNode(e)}))?i.splice(a,1):o.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:o}},A=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[s.REACT_TAG_MAP[n]||n]=e[n],t}),t)},O=function(e,t,n){switch(e){case s.TAG_NAMES.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[s.HELMET_ATTRIBUTE]=!0,i=T(n,r),[o.default.createElement(s.TAG_NAMES.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=A(n),o=w(t);return i?"<"+e+" "+s.HELMET_ATTRIBUTE+'="true" '+i+">"+l(o,r)+"":"<"+e+" "+s.HELMET_ATTRIBUTE+'="true">'+l(o,r)+""}(e,t.title,t.titleAttributes,n)}};case s.ATTRIBUTE_NAMES.BODY:case s.ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return T(t)},toString:function(){return A(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[s.HELMET_ATTRIBUTE]=!0,r);return Object.keys(t).forEach((function(e){var n=s.REACT_TAG_MAP[e]||e;if(n===s.TAG_PROPERTIES.INNER_HTML||n===s.TAG_PROPERTIES.CSS_TEXT){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),o.default.createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===s.TAG_PROPERTIES.INNER_HTML||e===s.TAG_PROPERTIES.CSS_TEXT)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+l(r[t],n)+'"';return e?e+" "+i:i}),""),o=r.innerHTML||r.cssText||"",a=-1===s.SELF_CLOSING_TAGS.indexOf(e);return t+"<"+e+" "+s.HELMET_ATTRIBUTE+'="true" '+i+(a?"/>":">"+o+"")}),"")}(e,t,n)}}}};t.convertReactPropstoHtmlAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[s.HTML_TAG_MAP[n]||n]=e[n],t}),t)},t.handleClientStateChange=function(e){D&&E(D),e.defer?D=b((function(){C(e,(function(){D=null}))})):(C(e),D=null)},t.mapStateOnServer=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,u=e.noscriptTags,c=e.scriptTags,l=e.styleTags,p=e.title,f=void 0===p?"":p,d=e.titleAttributes;return{base:O(s.TAG_NAMES.BASE,t,r),bodyAttributes:O(s.ATTRIBUTE_NAMES.BODY,n,r),htmlAttributes:O(s.ATTRIBUTE_NAMES.HTML,i,r),link:O(s.TAG_NAMES.LINK,o,r),meta:O(s.TAG_NAMES.META,a,r),noscript:O(s.TAG_NAMES.NOSCRIPT,u,r),script:O(s.TAG_NAMES.SCRIPT,c,r),style:O(s.TAG_NAMES.STYLE,l,r),title:O(s.TAG_NAMES.TITLE,{title:f,titleAttributes:d},r)}},t.reducePropsToState=function(e){return{baseTag:h([s.TAG_PROPERTIES.HREF],e),bodyAttributes:d(s.ATTRIBUTE_NAMES.BODY,e),defer:g(e,s.HELMET_PROPS.DEFER),encode:g(e,s.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:d(s.ATTRIBUTE_NAMES.HTML,e),linkTags:m(s.TAG_NAMES.LINK,[s.TAG_PROPERTIES.REL,s.TAG_PROPERTIES.HREF],e),metaTags:m(s.TAG_NAMES.META,[s.TAG_PROPERTIES.NAME,s.TAG_PROPERTIES.CHARSET,s.TAG_PROPERTIES.HTTPEQUIV,s.TAG_PROPERTIES.PROPERTY,s.TAG_PROPERTIES.ITEM_PROP],e),noscriptTags:m(s.TAG_NAMES.NOSCRIPT,[s.TAG_PROPERTIES.INNER_HTML],e),onChangeClientState:f(e),scriptTags:m(s.TAG_NAMES.SCRIPT,[s.TAG_PROPERTIES.SRC,s.TAG_PROPERTIES.INNER_HTML],e),styleTags:m(s.TAG_NAMES.STYLE,[s.TAG_PROPERTIES.CSS_TEXT],e),title:p(e),titleAttributes:d(s.ATTRIBUTE_NAMES.TITLE,e)}},t.requestAnimationFrame=b,t.warn=x}).call(this,n(42))},function(e,t,n){"use strict";var r=n(488);e.exports=r},function(e,t,n){"use strict";var r=n(489),i=n(512);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(35),e.exports.Schema=n(77),e.exports.FAILSAFE_SCHEMA=n(134),e.exports.JSON_SCHEMA=n(204),e.exports.CORE_SCHEMA=n(203),e.exports.DEFAULT_SAFE_SCHEMA=n(92),e.exports.DEFAULT_FULL_SCHEMA=n(107),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(91),e.exports.MINIMAL_SCHEMA=n(134),e.exports.SAFE_SCHEMA=n(92),e.exports.DEFAULT_SCHEMA=n(107),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(76),i=n(91),o=n(490),a=n(92),s=n(107),u=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,l=/[\x85\u2028\u2029]/,p=/[,\[\]\{\}]/,f=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function y(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function E(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var D=new Array(256),C=new Array(256),w=0;w<256;w++)D[w]=E(w)?1:0,C[w]=E(w);function S(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function k(e,t){throw _(e,t)}function A(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var T={YAML:function(e,t,n){var r,i,o;null!==e.version&&k(e,"duplication of %YAML directive"),1!==n.length&&k(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&k(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&k(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&A(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&k(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],f.test(r)||k(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,r)&&k(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(i)||k(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function O(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function P(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&y(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),M(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)k(e,"bad indentation of a sequence entry");else if(e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt)&&(U(e,t,4,!0,i)&&(m?d=e.result:h=e.result),m||(N(e,l,p,f,d,h,o,a),f=d=h=null),M(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)k(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?k(e,"repeat of an indentation width identifier"):(p=t+o-1,l=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(I(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),m(a))f++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:k(e,"expected hexadecimal character");e.result+=x(o),e.position++}else k(e,"unknown escape sequence");n=r=e.position}else m(s)?(O(e,n,r,!0),L(e,M(e,!1,t)),n=r=e.position):e.position===e.lineStart&&j(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?S=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!y(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||k(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],M(e,!0,-1),!0}(e)?function(e,t,n){var r,i,o,a,s,u,c,l,p=e.kind,f=e.result;if(y(l=e.input.charCodeAt(e.position))||v(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(y(r=e.input.charCodeAt(e.position+1))||n&&v(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==l;){if(58===l){if(y(r=e.input.charCodeAt(e.position+1))||n&&v(r))break}else if(35===l){if(y(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&j(e)||n&&v(l))break;if(m(l)){if(s=e.line,u=e.lineStart,c=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=u,e.lineIndent=c;break}}a&&(O(e,i,o,!1),L(e,e.line-s),i=o=e.position,a=!1),g(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return O(e,i,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===n)&&(S=!0,null===e.tag&&(e.tag="?")):(S=!0,null===e.tag&&null===e.anchor||k(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===E&&(S=c&&P(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,p=e.implicitTypes.length;l tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result)?(e.result=f.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):k(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||S}function z(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(M(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!y(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&k(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!y(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&I(e),u.call(T,n)?T[n](e,n,r):A(e,'unknown document directive "'+n+'"')}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):a&&k(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&l.test(e.input.slice(o,e.position))&&A(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&j(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(76),i=n(35);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(76),i=n(35),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(35),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,u,c,l,p=0,f=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],u=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),l=new Date(Date.UTC(n,r,a,s,u,c,p)),f&&l.setTime(l.getTime()-f),l},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(35);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(501).Buffer}catch(e){}var i=n(35),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,u=0,c=[];for(t=0;t>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|s.indexOf(i.charAt(t));return 0===(n=a%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===n?(c.push(u>>10&255),c.push(u>>2&255)):12===n&&c.push(u>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var r=n(509),i=n(510),o=n(511);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var p=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return D(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(43))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,p=s>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,l=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(35),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(518)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(35);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},u="function"==typeof n?s:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&((a=new r.CommentHandler).attach=l,t.comment=!0,u=s)}var p,f=!1;t&&"string"==typeof t.sourceType&&(f="module"===t.sourceType),p=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,u):new o.Parser(e,t,u);var d=f?p.parseModule():p.parseScript();return c&&a&&(d.comments=a.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset);)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),u=n(7),c=n(8),l=n(13),p=n(14);function f(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=f(n.namespace)+":"+f(n.name);break;case s.JSXSyntax.JSXMemberExpression:var r=e;t=f(r.object)+"."+f(r.property)}return t}l.TokenName[100]="JSXIdentifier",l.TokenName[101]="JSXText";var d=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!a);break;default:n=(n=n&&!(i&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):a&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||a||!p.XHTMLEntities[u]||(t=p.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)r+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var i=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===i&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new a.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(c.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=i;var o=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var u=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=u;var c=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=c;var l=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=l;var p=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=p;var f=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=f;var d=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=d;var h=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=i;var o=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var u=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=u;var c=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=c;var l=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=l;var p=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=p;var f=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=f;var d=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=d;var h=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var m=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var y=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=y;var v=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassBody=v;var b=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var E=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=E;var x=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var D=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=D;var C=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=C;var w=function(){this.type=r.Syntax.DebuggerStatement};t.DebuggerStatement=w;var S=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=S;var k=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=k;var A=function(){this.type=r.Syntax.EmptyStatement};t.EmptyStatement=A;var T=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var _=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=_;var O=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=O;var F=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=F;var N=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=N;var I=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=I;var M=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=M;var j=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.ForStatement=j;var L=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionDeclaration=L;var P=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=P;var R=function(e){this.type=r.Syntax.Identifier,this.name=e};t.Identifier=R;var B=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=B;var U=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=U;var z=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=z;var V=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=V;var q=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=q;var H=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=H;var W=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.Literal=W;var G=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=G;var K=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.MethodDefinition=K;var J=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=J;var Q=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=Q;var Y=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var $=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var X=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.Property=X;var Z=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RegexLiteral=Z;var ee=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var re=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=re;var ie=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.SpreadElement=ie;var oe=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=r.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var ue=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=ue;var ce=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ce;var le=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=le;var pe=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=pe;var fe=function(){this.type=r.Syntax.ThisExpression};t.ThisExpression=fe;var de=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=de;var he=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var me=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ye=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ye;var ve=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ve;var be=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Ee=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Ee;var xe=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),u=n(2),c=n(13),l=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,u=!1,c=!1,l=!1,p=!1;if(3===r.type){var f=r.value;this.nextToken(),u=this.match("["),i=(p=!(this.hasLineTerminator||"async"!==f||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(f))}else this.match("*")?this.nextToken():(u=this.match("["),i=this.parseObjectPropertyKey());var d=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!p&&"get"===r.value&&d)t="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!p&&"set"===r.value&&d)t="set",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&d)t="init",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!p)!u&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===r.type)if(f=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),l=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(f,h))}else l=!0,s=f;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,u,s,c,l))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(o=0;o")){for(var u=0;u0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[o,n.value,s],c=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&r<=c[c.length-1];){s=u.pop();var l=u.pop();c.pop(),o=u.pop(),i.pop();var p=this.startNode(i[i.length-1]);u.push(this.finalize(p,new a.BinaryExpression(l,o,s)))}u.push(this.nextToken().value),c.push(r),i.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var f=u.length-1;t=u[f];for(var d=i.pop();f>1;){var h=i.pop(),m=d&&d.lineStart;p=this.startNode(h,m),l=u[f-1],t=this.finalize(p,new a.BinaryExpression(l,u[f-2],t)),f-=2,d=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var p=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=i;var d=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=m}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=h.type!==u.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(d,new a.AsyncArrowFunctionExpression(s.params,h,g)):this.finalize(d,new a.ArrowFunctionExpression(s.params,h,g)),this.context.strict=c,this.context.allowStrictDirective=l,this.context.allowYield=p,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var v=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(v,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(i,new a.Identifier(u.value));if(this.match("=")){e.push(u),s=!0,this.nextToken();var l=this.parseAssignmentExpression();r=this.finalize(this.startNode(u),new a.AssignmentPattern(c,l))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(u),s=!0,r=c)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,c=!0,l=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var f=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===f.length&&this.matchKeyword("in")){var d=f[0];d.init&&(d.id.type===u.Syntax.ArrayPattern||d.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===f.length&&null===f[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(p=this.context.allowIn,this.context.allowIn=!1,f=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=p,1===f.length&&null===f[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(f,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===f.length&&null===f[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(f,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(f,h)))):(r=this.finalize(r,new a.Identifier(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(p=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,c=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var y=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=y}return void 0===e?this.finalize(l,new a.ForStatement(r,i,s,n)):c?this.finalize(l,new a.ForInStatement(e,t,n)):this.finalize(l,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,l=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,o.Messages.StrictFunction):l.generator&&this.tolerateUnexpectedToken(c,o.Messages.GeneratorInLegacyContext),s=l}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,u=!1,c=!1,l=!1,p=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,l=!0,u=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var f=this.lookahead.value;":"!==f&&"("!==f&&"*"!==f&&(p=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var d=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&d?(r="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&d&&(r="set",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&d&&(r="init",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0),!r&&i&&this.match("(")&&(r="init",s=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),u||(l&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!l&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!c||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,u,s,r,l))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):c?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,u))}return e},e}();t.Parser=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[p+1],p=o);else if(!g(a))return 5;f=f&&y(a)}c=c||l&&o-p-1>r&&" "!==e[p+1]}return u||c?n>9&&v(e)?5:c?4:3:f&&!i(e)?1:2}function E(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==l.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+x(t,e.indent)+D(d(function(e,t){var n,r,i=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,C(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;r=i.exec(e);){var u=r[1],c=r[2];n=" "===c[0],o+=u+(a||n||""===c?"":"\n")+C(c,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=p(1024*(t-55296)+n-56320+65536),o++):(r=c[t],i+=!r&&g(t)?e[o]:r||p(t));return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function x(e,t){var n=v(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function D(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function C(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,u="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,u+="\n"+e.slice(o,r),o=r+1),a=s;return u+="\n",e.length-o>t&&a>o?u+=e.slice(o,a)+"\n"+e.slice(a+1):u+=e.slice(o),u.slice(1)}function w(e,t,n){var r,o,a,c,l,p;for(a=0,c=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+p+'" style');r=l.represent[p](t,p)}e.dump=r}return!0}return!1}function S(e,t,n,r,o,a){e.tag=null,e.dump=n,w(e,n,!1)||w(e,n,!0);var u=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var c,l,p="[object Object]"===u||"[object Array]"===u;if(p&&(l=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(o=!1),l&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(p&&l&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,s,u,c,l,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=d.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=h(e,t)),S(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",p+=l+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,o),l&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,n){var r,i,o,a,s,u="",c=e.tag,l=Object.keys(n);for(r=0,i=l.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),S(e,t,a,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),l&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u){var f=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(!function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function k(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o=300&&c(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||c(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map((function(e){return e.operationName})):r.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){v&&v.abort()}}))}))};var f=function(e){function t(t){return e.call(this,p(t).request)||this}return Object(r.b)(t,e),t}(i.ApolloLink)},,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(66),i=n(245);function o(e,t){return Object(r.c)(e,t,[i.a])}},,,,function(e,t,n){n(255),e.exports=n(543)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var p=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return D(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(42))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,p=s>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,l=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(35),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(511)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(35);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},u="function"==typeof n?s:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&((a=new r.CommentHandler).attach=l,t.comment=!0,u=s)}var p,f=!1;t&&"string"==typeof t.sourceType&&(f="module"===t.sourceType),p=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,u):new o.Parser(e,t,u);var d=f?p.parseModule():p.parseScript();return c&&a&&(d.comments=a.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset);)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),u=n(7),c=n(8),l=n(13),p=n(14);function f(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=f(n.namespace)+":"+f(n.name);break;case s.JSXSyntax.JSXMemberExpression:var r=e;t=f(r.object)+"."+f(r.property)}return t}l.TokenName[100]="JSXIdentifier",l.TokenName[101]="JSXText";var d=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!a);break;default:n=(n=n&&!(i&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):a&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||a||!p.XHTMLEntities[u]||(t=p.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)r+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var i=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===i&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new a.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(c.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=i;var o=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var u=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=u;var c=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=c;var l=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=l;var p=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=p;var f=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=f;var d=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=d;var h=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=i;var o=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var u=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=u;var c=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=c;var l=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=l;var p=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=p;var f=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=f;var d=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=d;var h=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var m=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var y=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=y;var v=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassBody=v;var b=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var E=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=E;var x=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var D=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=D;var C=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=C;var w=function(){this.type=r.Syntax.DebuggerStatement};t.DebuggerStatement=w;var S=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=S;var _=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=_;var k=function(){this.type=r.Syntax.EmptyStatement};t.EmptyStatement=k;var A=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=A;var T=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=T;var O=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=O;var F=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=F;var N=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=N;var I=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=I;var M=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=M;var j=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.ForStatement=j;var L=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionDeclaration=L;var P=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=P;var R=function(e){this.type=r.Syntax.Identifier,this.name=e};t.Identifier=R;var B=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=B;var U=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=U;var z=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=z;var V=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=V;var q=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=q;var H=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=H;var W=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.Literal=W;var G=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=G;var K=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.MethodDefinition=K;var J=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=J;var Q=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=Q;var Y=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var $=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var X=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.Property=X;var Z=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RegexLiteral=Z;var ee=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var re=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=re;var ie=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.SpreadElement=ie;var oe=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=r.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var ue=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=ue;var ce=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ce;var le=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=le;var pe=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=pe;var fe=function(){this.type=r.Syntax.ThisExpression};t.ThisExpression=fe;var de=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=de;var he=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var me=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ye=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ye;var ve=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ve;var be=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Ee=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Ee;var xe=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),u=n(2),c=n(13),l=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,u=!1,c=!1,l=!1,p=!1;if(3===r.type){var f=r.value;this.nextToken(),u=this.match("["),i=(p=!(this.hasLineTerminator||"async"!==f||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(f))}else this.match("*")?this.nextToken():(u=this.match("["),i=this.parseObjectPropertyKey());var d=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!p&&"get"===r.value&&d)t="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!p&&"set"===r.value&&d)t="set",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&d)t="init",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!p)!u&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===r.type)if(f=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),l=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(f,h))}else l=!0,s=f;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,u,s,c,l))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(o=0;o")){for(var u=0;u0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[o,n.value,s],c=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&r<=c[c.length-1];){s=u.pop();var l=u.pop();c.pop(),o=u.pop(),i.pop();var p=this.startNode(i[i.length-1]);u.push(this.finalize(p,new a.BinaryExpression(l,o,s)))}u.push(this.nextToken().value),c.push(r),i.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var f=u.length-1;t=u[f];for(var d=i.pop();f>1;){var h=i.pop(),m=d&&d.lineStart;p=this.startNode(h,m),l=u[f-1],t=this.finalize(p,new a.BinaryExpression(l,u[f-2],t)),f-=2,d=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var p=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=i;var d=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=m}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=h.type!==u.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(d,new a.AsyncArrowFunctionExpression(s.params,h,g)):this.finalize(d,new a.ArrowFunctionExpression(s.params,h,g)),this.context.strict=c,this.context.allowStrictDirective=l,this.context.allowYield=p,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var v=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(v,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(i,new a.Identifier(u.value));if(this.match("=")){e.push(u),s=!0,this.nextToken();var l=this.parseAssignmentExpression();r=this.finalize(this.startNode(u),new a.AssignmentPattern(c,l))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(u),s=!0,r=c)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,c=!0,l=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var f=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===f.length&&this.matchKeyword("in")){var d=f[0];d.init&&(d.id.type===u.Syntax.ArrayPattern||d.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===f.length&&null===f[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(r=this.finalize(r,new a.VariableDeclaration(f,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(p=this.context.allowIn,this.context.allowIn=!1,f=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=p,1===f.length&&null===f[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(f,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===f.length&&null===f[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(f,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(f,h)))):(r=this.finalize(r,new a.Identifier(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(p=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,c=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var y=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=y}return void 0===e?this.finalize(l,new a.ForStatement(r,i,s,n)):c?this.finalize(l,new a.ForInStatement(e,t,n)):this.finalize(l,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,l=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,o.Messages.StrictFunction):l.generator&&this.tolerateUnexpectedToken(c,o.Messages.GeneratorInLegacyContext),s=l}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,u=!1,c=!1,l=!1,p=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,l=!0,u=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var f=this.lookahead.value;":"!==f&&"("!==f&&"*"!==f&&(p=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var d=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&d?(r="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&d&&(r="set",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&d&&(r="init",u=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0),!r&&i&&this.match("(")&&(r="init",s=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),u||(l&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!l&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!c||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,u,s,r,l))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):c?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,u))}return e},e}();t.Parser=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[p+1],p=o);else if(!g(a))return 5;f=f&&y(a)}c=c||l&&o-p-1>r&&" "!==e[p+1]}return u||c?n>9&&v(e)?5:c?4:3:f&&!i(e)?1:2}function E(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==l.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+x(t,e.indent)+D(d(function(e,t){var n,r,i=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,C(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;r=i.exec(e);){var u=r[1],c=r[2];n=" "===c[0],o+=u+(a||n||""===c?"":"\n")+C(c,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=p(1024*(t-55296)+n-56320+65536),o++):(r=c[t],i+=!r&&g(t)?e[o]:r||p(t));return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function x(e,t){var n=v(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function D(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function C(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,u="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,u+="\n"+e.slice(o,r),o=r+1),a=s;return u+="\n",e.length-o>t&&a>o?u+=e.slice(o,a)+"\n"+e.slice(a+1):u+=e.slice(o),u.slice(1)}function w(e,t,n){var r,o,a,c,l,p;for(a=0,c=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+p+'" style');r=l.represent[p](t,p)}e.dump=r}return!0}return!1}function S(e,t,n,r,o,a){e.tag=null,e.dump=n,w(e,n,!1)||w(e,n,!0);var u=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var c,l,p="[object Object]"===u||"[object Array]"===u;if(p&&(l=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(o=!1),l&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(p&&l&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,s,u,c,l,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=d.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=h(e,t)),S(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",p+=l+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,o),l&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,n){var r,i,o,a,s,u="",c=e.tag,l=Object.keys(n);for(r=0,i=l.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),S(e,t,a,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),l&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u){var f=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(!function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function _(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o=300&&c(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||c(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map((function(e){return e.operationName})):r.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){v&&v.abort()}}))}))};var f=function(e){function t(t){return e.call(this,p(t).request)||this}return Object(r.b)(t,e),t}(i.ApolloLink)},,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(65),i=n(238);function o(e,t){return Object(r.c)(e,t,[i.a])}},,,,function(e,t,n){n(248),e.exports=n(536)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t>>1,d=a[c];if(0>>1;cD(l,e))fD(g,l)?(a[c]=g,a[f]=e,c=f):(a[c]=l,a[h]=e,c=h);else if(fD(g,e))a[c]=g,a[f]=e,c=f;else break a}}return b} -function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,R(S);else{var b=p(r);null!==b&&T(Q,b.startTime-a)}}function S(a,b){u=!1;z&&(z=!1,ea(A),A=-1);F=!0;var c=k;try{P(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!fa());){var m=n.callback;if("function"===typeof m){n.callback=null; -k=n.priorityLevel;var d=m(n.expirationTime<=b);b=v();"function"===typeof d?n.callback=d:n===p(q)&&E(q);P(b)}else E(q);n=p(q)}if(null!==n)var g=!0;else{var h=p(r);null!==h&&T(Q,h.startTime-b);g=!1}return g}finally{n=null,k=c,F=!1}}function fa(){return v()-hae?(a.sortIndex=c,O(r,a),null===p(q)&&a===p(r)&&(z?(ea(A),A=-1):z=!0,T(Q,c-e))):(a.sortIndex=d,O(q,a),u||F||(u=!0,R(S)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b= -k;return function(){var c=k;k=b;try{return a.apply(this,arguments)}finally{k=c}}},unstable_getCurrentPriorityLevel:function(){return k},unstable_shouldYield:fa,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,R(S))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0>a||1250&&((0,l.walkDocument)({document:t,rootType:w.Root,normalizedVisitors:(0,a.normalizeVisitors)(k,w),resolvedRefMap:E,ctx:O}),E=yield(0,o.resolveDocument)({rootDocument:t,rootType:w.Root,externalRefResolver:i}));const _=(0,a.normalizeVisitors)([{severity:"error",ruleId:"bundler",visitor:x(b,u,d,t,E,h)},...S],w);return(0,l.walkDocument)({document:t,rootType:w.Root,normalizedVisitors:_,resolvedRefMap:E,ctx:O}),{bundle:t,problems:O.problems.map((e=>n.addProblemToIgnore(e))),fileDependencies:i.getFiles(),rootType:w.Root,refTypes:O.refTypes,visitorsData:O.visitorsData}}))}function v(e,t){switch(t){case c.SpecMajorVersion.OAS3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case c.SpecMajorVersion.OAS2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case c.SpecMajorVersion.Async2:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}}}function x(e,t,n,r,a,s){let l,p;const m={ref:{leave(i,l,c){if(!c.location||void 0===c.node)return void(0,d.reportUnresolvedRef)(c,l.report,l.location);if(c.location.source===r.source&&c.location.source===l.location.source&&"scalar"!==l.type.name&&!t)return;if(n&&(0,h.isRedoclyRegistryURL)(i.$ref))return;if(s&&(0,u.isAbsoluteUrl)(i.$ref))return;const p=v(l.type.name,e);p?t?(y(p,c,l),g(i,c,l)):(i.$ref=y(p,c,l),function(e,t,n){const i=(0,o.makeRefId)(n.location.source.absoluteRef,e.$ref);a.set(i,{document:r,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(i,c,l)):g(i,c,l)}},Root:{enter(t,n){p=n.location,e===c.SpecMajorVersion.OAS3?l=t.components=t.components||{}:e===c.SpecMajorVersion.OAS2&&(l=t)}}};function g(e,t,n){if((0,f.isPlainObject)(t.node)){delete e.$ref;const n=Object.assign({},t.node,e);Object.assign(e,n)}else n.parent[n.key]=t.node}function y(t,n,r){l[t]=l[t]||{};const i=function(e,t,n){const[r,i]=[e.location.source.absoluteRef,e.location.pointer],o=l[t];let a="";const s=i.slice(2).split("/").filter(f.isTruthy);for(;s.length>0;)if(a=s.pop()+(a?`-${a}`:""),!o||!o[a]||b(o[a],e,n))return a;if(a=(0,u.refBaseName)(r)+(a?`_${a}`:""),!o[a]||b(o[a],e,n))return a;const c=a;let p=2;for(;o[a]&&!b(o[a],e,n);)a=`${c}-${p}`,p++;return o[a]||n.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${a}.`,location:n.location,forceSeverity:"warn"}),a}(n,t,r);return l[t][i]=n.node,e===c.SpecMajorVersion.OAS3?`#/components/${t}/${i}`:`#/${t}/${i}`}function b(e,t,n){var r;return!(!(0,u.isRef)(e)||(null===(r=n.resolve(e,p.absolutePointer).location)||void 0===r?void 0:r.absolutePointer)!==t.location.absolutePointer)||i(e,t.node)}return e===c.SpecMajorVersion.OAS3&&(m.DiscriminatorMapping={leave(n,r){for(const i of Object.keys(n)){const o=n[i],a=r.resolve({$ref:o});if(!a.location||void 0===a.node)return void(0,d.reportUnresolvedRef)(a,r.report,r.location.child(i));const s=v("Schema",e);t?y(s,a,r):n[i]=y(s,a,r)}}}),m}!function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(y||(t.OasVersion=y={})),t.bundle=function(e){return r(this,void 0,void 0,(function*(){const{ref:t,doc:n,externalRefResolver:r=new o.BaseResolver(e.config.resolve),base:i=null}=e;if(!t&&!n)throw new Error("Document or reference is required.\n");const a=void 0===n?yield r.resolveDocument(i,t,!0):n;if(a instanceof Error)throw a;return b(Object.assign(Object.assign({document:a},e),{config:e.config.styleguide,externalRefResolver:r}))}))},t.bundleFromString=function(e){return r(this,void 0,void 0,(function*(){const{source:t,absoluteRef:n,externalRefResolver:r=new o.BaseResolver(e.config.resolve)}=e,i=(0,o.makeDocumentFromString)(t,n||"/");return b(Object.assign(Object.assign({document:i},e),{externalRefResolver:r,config:e.config.styleguide}))}))},t.bundleDocument=b,t.mapTypeToComponent=v},3777:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.StyleguideConfig=t.AVAILABLE_REGIONS=t.DOMAINS=t.DEFAULT_REGION=t.IGNORE_FILE=void 0;const r=n(5101),i=n(6470),o=n(5273),a=n(771),s=n(1510),l=n(8005),c=n(2565),u=n(7468);t.IGNORE_FILE=".redocly.lint-ignore.yaml",t.DEFAULT_REGION="us",t.DOMAINS=function(){const e={us:"redocly.com",eu:"eu.redocly.com"},t=l.env.REDOCLY_DOMAIN;return(null==t?void 0:t.endsWith(".redocly.host"))&&(e[t.split(".")[0]]=t),"redoc.online"===t&&(e[t]=t),e}(),t.AVAILABLE_REGIONS=Object.keys(t.DOMAINS);class p{constructor(e,n){this.rawConfig=e,this.configFile=n,this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.plugins=e.plugins||[],this.doNotResolveExamples=!!e.doNotResolveExamples,this.recommendedFallback=e.recommendedFallback||!1,this.rules={[s.SpecVersion.OAS2]:Object.assign(Object.assign({},e.rules),e.oas2Rules),[s.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.rules),e.oas3_0Rules),[s.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.rules),e.oas3_1Rules),[s.SpecVersion.Async2]:Object.assign(Object.assign({},e.rules),e.async2Rules)},this.preprocessors={[s.SpecVersion.OAS2]:Object.assign(Object.assign({},e.preprocessors),e.oas2Preprocessors),[s.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.preprocessors),e.oas3_0Preprocessors),[s.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.preprocessors),e.oas3_1Preprocessors),[s.SpecVersion.Async2]:Object.assign(Object.assign({},e.preprocessors),e.async2Preprocessors)},this.decorators={[s.SpecVersion.OAS2]:Object.assign(Object.assign({},e.decorators),e.oas2Decorators),[s.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.decorators),e.oas3_0Decorators),[s.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.decorators),e.oas3_1Decorators),[s.SpecVersion.Async2]:Object.assign(Object.assign({},e.decorators),e.async2Decorators)},this.extendPaths=e.extendPaths||[],this.pluginPaths=e.pluginPaths||[],this.resolveIgnore(function(e){return e?(0,a.doesYamlFileExist)(e)?i.join(i.dirname(e),t.IGNORE_FILE):i.join(e,t.IGNORE_FILE):l.isBrowser?void 0:i.join(process.cwd(),t.IGNORE_FILE)}(n))}resolveIgnore(e){if(e&&(0,a.doesYamlFileExist)(e)){this.ignore=(0,o.parseYaml)(r.readFileSync(e,"utf-8"))||{};for(const t of Object.keys(this.ignore)){this.ignore[(0,u.isAbsoluteUrl)(t)?t:i.resolve(i.dirname(e),t)]=this.ignore[t];for(const e of Object.keys(this.ignore[t]))this.ignore[t][e]=new Set(this.ignore[t][e]);(0,u.isAbsoluteUrl)(t)||delete this.ignore[t]}}}saveIgnore(){const e=this.configFile?i.dirname(this.configFile):process.cwd(),n=i.join(e,t.IGNORE_FILE),s={};for(const t of Object.keys(this.ignore)){const n=s[(0,u.isAbsoluteUrl)(t)?t:(0,a.slash)(i.relative(e,t))]=this.ignore[t];for(const e of Object.keys(n))n[e]=Array.from(n[e])}r.writeFileSync(n,"# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n# See https://redoc.ly/docs/cli/ for more information.\n"+(0,o.stringifyYaml)(s))}addIgnore(e){const t=this.ignore,n=e.location[0];if(void 0===n.pointer)return;const r=t[n.source.absoluteRef]=t[n.source.absoluteRef]||{};(r[e.ruleId]=r[e.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(e){const t=e.location[0];if(void 0===t.pointer)return e;const n=(this.ignore[t.source.absoluteRef]||{})[e.ruleId],r=n&&n.has(t.pointer);return r?Object.assign(Object.assign({},e),{ignored:r}):e}extendTypes(e,t){let n=e;for(const e of this.plugins)if(void 0!==e.typeExtension)switch(t){case s.SpecVersion.OAS3_0:case s.SpecVersion.OAS3_1:if(!e.typeExtension.oas3)continue;n=e.typeExtension.oas3(n,t);break;case s.SpecVersion.OAS2:if(!e.typeExtension.oas2)continue;n=e.typeExtension.oas2(n,t);break;case s.SpecVersion.Async2:if(!e.typeExtension.async2)continue;n=e.typeExtension.async2(n,t);break;default:throw new Error("Not implemented")}return n}getRuleSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.rules[t][e]||"off";return"string"==typeof n?{severity:n}:Object.assign({severity:"error"},n)}getPreprocessorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.preprocessors[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getDecoratorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.decorators[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getUnusedRules(){const e=[],t=[],n=[];for(const r of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[r]).filter((e=>!this._usedRules.has(e)))),t.push(...Object.keys(this.decorators[r]).filter((e=>!this._usedRules.has(e)))),n.push(...Object.keys(this.preprocessors[r]).filter((e=>!this._usedRules.has(e))));return{rules:e,preprocessors:n,decorators:t}}getRulesForOasVersion(e){switch(e){case s.SpecMajorVersion.OAS3:const e=[];return this.plugins.forEach((t=>{var n;return(null===(n=t.preprocessors)||void 0===n?void 0:n.oas3)&&e.push(t.preprocessors.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.rules)||void 0===n?void 0:n.oas3)&&e.push(t.rules.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.decorators)||void 0===n?void 0:n.oas3)&&e.push(t.decorators.oas3)})),e;case s.SpecMajorVersion.OAS2:const t=[];return this.plugins.forEach((e=>{var n;return(null===(n=e.preprocessors)||void 0===n?void 0:n.oas2)&&t.push(e.preprocessors.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.rules)||void 0===n?void 0:n.oas2)&&t.push(e.rules.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.decorators)||void 0===n?void 0:n.oas2)&&t.push(e.decorators.oas2)})),t;case s.SpecMajorVersion.Async2:const n=[];return this.plugins.forEach((e=>{var t;return(null===(t=e.preprocessors)||void 0===t?void 0:t.async2)&&n.push(e.preprocessors.async2)})),this.plugins.forEach((e=>{var t;return(null===(t=e.rules)||void 0===t?void 0:t.async2)&&n.push(e.rules.async2)})),this.plugins.forEach((e=>{var t;return(null===(t=e.decorators)||void 0===t?void 0:t.async2)&&n.push(e.decorators.async2)})),n}}skipRules(e){for(const t of e||[])for(const e of Object.values(s.SpecVersion))this.rules[e][t]&&(this.rules[e][t]="off")}skipPreprocessors(e){for(const t of e||[])for(const e of Object.values(s.SpecVersion))this.preprocessors[e][t]&&(this.preprocessors[e][t]="off")}skipDecorators(e){for(const t of e||[])for(const e of Object.values(s.SpecVersion))this.decorators[e][t]&&(this.decorators[e][t]="off")}}t.StyleguideConfig=p,t.Config=class{constructor(e,t){this.rawConfig=e,this.configFile=t,this.apis=e.apis||{},this.styleguide=new p(e.styleguide||{},t),this.theme=e.theme||{},this.resolve=(0,c.getResolveConfig)(null==e?void 0:e.resolve),this.region=e.region,this.organization=e.organization,this.files=e.files||[],this.telemetry=e.telemetry}}},5030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRules=void 0;const r=n(771);t.initRules=function(e,t,n,i){return e.flatMap((e=>Object.keys(e).map((r=>{const o=e[r],a="rules"===n?t.getRuleSettings(r,i):"preprocessors"===n?t.getPreprocessorSettings(r,i):t.getDecoratorSettings(r,i);if("off"===a.severity)return;const s=a.severity,l=o(a);return Array.isArray(l)?l.map((e=>({severity:s,ruleId:r,visitor:e}))):{severity:s,ruleId:r,visitor:l}})))).flatMap((e=>e)).filter(r.isDefined)}},2565:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);it[e]));n[e]&&null===t&&(0,i.showWarningForDeprecatedField)(e),n[e]&&t&&n[t]&&(0,i.showErrorForDeprecatedField)(e,t),n[e]&&r&&n[r]&&(0,i.showErrorForDeprecatedField)(e,t,r),(n[e]||o)&&(0,i.showWarningForDeprecatedField)(e,t,r)}t.parsePresetName=function(e){if(e.indexOf("/")>-1){const[t,n]=e.split("/");return{pluginId:t,configName:n}}return{pluginId:"",configName:e}},t.transformApiDefinitionsToApis=s,t.prefixRules=function(e,t){if(!t)return e;const n={};for(const r of Object.keys(e))n[`${t}/${r}`]=e[r];return n},t.mergeExtends=function(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},async2Rules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},async2Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},async2Decorators:{},plugins:[],pluginPaths:[],extendPaths:[]};for(const n of e){if(n.extends)throw new Error(`'extends' is not supported in shared configs yet: ${JSON.stringify(n,null,2)}.`);Object.assign(t.rules,n.rules),Object.assign(t.oas2Rules,n.oas2Rules),(0,i.assignExisting)(t.oas2Rules,n.rules||{}),Object.assign(t.oas3_0Rules,n.oas3_0Rules),(0,i.assignExisting)(t.oas3_0Rules,n.rules||{}),Object.assign(t.oas3_1Rules,n.oas3_1Rules),(0,i.assignExisting)(t.oas3_1Rules,n.rules||{}),Object.assign(t.async2Rules,n.async2Rules),(0,i.assignExisting)(t.async2Rules,n.rules||{}),Object.assign(t.preprocessors,n.preprocessors),Object.assign(t.oas2Preprocessors,n.oas2Preprocessors),(0,i.assignExisting)(t.oas2Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_0Preprocessors,n.oas3_0Preprocessors),(0,i.assignExisting)(t.oas3_0Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_1Preprocessors,n.oas3_1Preprocessors),(0,i.assignExisting)(t.oas3_1Preprocessors,n.preprocessors||{}),Object.assign(t.async2Preprocessors,n.async2Preprocessors),(0,i.assignExisting)(t.async2Preprocessors,n.preprocessors||{}),Object.assign(t.decorators,n.decorators),Object.assign(t.oas2Decorators,n.oas2Decorators),(0,i.assignExisting)(t.oas2Decorators,n.decorators||{}),Object.assign(t.oas3_0Decorators,n.oas3_0Decorators),(0,i.assignExisting)(t.oas3_0Decorators,n.decorators||{}),Object.assign(t.oas3_1Decorators,n.oas3_1Decorators),(0,i.assignExisting)(t.oas3_1Decorators,n.decorators||{}),Object.assign(t.async2Decorators,n.async2Decorators),(0,i.assignExisting)(t.async2Decorators,n.decorators||{}),t.plugins.push(...n.plugins||[]),t.pluginPaths.push(...n.pluginPaths||[]),t.extendPaths.push(...new Set(n.extendPaths))}return t},t.getMergedConfig=function(e,t){var n,r,a,s,l,c,u,p;const d=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.extendPaths})),null===(r=null===(n=e.rawConfig)||void 0===n?void 0:n.styleguide)||void 0===r?void 0:r.extendPaths].flat().filter(i.isTruthy),f=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.pluginPaths})),null===(s=null===(a=e.rawConfig)||void 0===a?void 0:a.styleguide)||void 0===s?void 0:s.pluginPaths].flat().filter(i.isTruthy);return t?new o.Config(Object.assign(Object.assign({},e.rawConfig),{styleguide:Object.assign(Object.assign({},e.apis[t]?e.apis[t].styleguide:e.rawConfig.styleguide),{extendPaths:d,pluginPaths:f}),theme:Object.assign(Object.assign({},e.rawConfig.theme),null===(l=e.apis[t])||void 0===l?void 0:l.theme),files:[...e.files,...null!==(p=null===(u=null===(c=e.apis)||void 0===c?void 0:c[t])||void 0===u?void 0:u.files)&&void 0!==p?p:[]]}),e.configFile):e},t.checkForDeprecatedFields=u,t.transformConfig=function(e){var t,n;const i=[["apiDefinitions","apis",void 0],["referenceDocs","openapi","theme"],["lint",void 0,void 0],["styleguide",void 0,void 0],["features.openapi","openapi","theme"]];for(const[t,n,r]of i)u(t,n,e,r);const{apis:o,apiDefinitions:p,referenceDocs:d,lint:f}=e,h=r(e,["apis","apiDefinitions","referenceDocs","lint"]),{styleguideConfig:m,rawConfigRest:g}=l(h),y=Object.assign({theme:{openapi:Object.assign(Object.assign(Object.assign({},d),e["features.openapi"]),null===(t=e.theme)||void 0===t?void 0:t.openapi),mockServer:Object.assign(Object.assign({},e["features.mockServer"]),null===(n=e.theme)||void 0===n?void 0:n.mockServer)},apis:c(o)||s(p),styleguide:m||f},g);return function(e){var t,n;let r=Object.assign({},null===(t=e.styleguide)||void 0===t?void 0:t.rules);for(const t of Object.values(e.apis||{}))r=Object.assign(Object.assign({},r),null===(n=null==t?void 0:t.styleguide)||void 0===n?void 0:n.rules);for(const e of Object.keys(r))e.startsWith("assert/")&&a.logger.warn(`\nThe 'assert/' syntax in ${e} is deprecated. Update your configuration to use 'rule/' instead. Examples and more information: https://redocly.com/docs/cli/rules/configurable-rules/\n`)}(y),y},t.getResolveConfig=function(e){var t,n;return{http:{headers:null!==(n=null===(t=null==e?void 0:e.http)||void 0===t?void 0:t.headers)&&void 0!==n?n:[],customFetch:void 0}}},t.getUniquePlugins=function(e){const t=new Set,n=[];for(const r of e)t.has(r.id)?r.id&&a.logger.warn(`Duplicate plugin id "${a.colorize.red(r.id)}".\n`):(n.push(r),t.add(r.id));return n};class p extends Error{}t.ConfigValidationError=p},8005:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window||"undefined"!=typeof self||"undefined"==typeof process,t.env=t.isBrowser?{}:{}||{}},5273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyYaml=t.parseYaml=void 0;const r=n(3320),i=r.JSON_SCHEMA.extend({implicit:[r.types.merge],explicit:[r.types.binary,r.types.omap,r.types.pairs,r.types.set]});t.parseYaml=(e,t)=>(0,r.load)(e,Object.assign({schema:i},t)),t.stringifyYaml=(e,t)=>(0,r.dump)(e,t)},3065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.colorize=t.colorOptions=void 0;const r=n(4819);var i=n(4819);Object.defineProperty(t,"colorOptions",{enumerable:!0,get:function(){return i.options}});const o=n(8005),a=n(771);t.colorize=new Proxy(r,{get(e,t){return o.isBrowser?a.identity:e[t]}}),t.logger=new class{stderr(e){return process.stderr.write(e)}info(e){return o.isBrowser?console.log(e):this.stderr(e)}warn(e){return o.isBrowser?console.warn(e):this.stderr(t.colorize.yellow(e))}error(e){return o.isBrowser?console.error(e):this.stderr(t.colorize.red(e))}}},1510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTypes=t.getMajorSpecVersion=t.detectSpec=t.SpecMajorVersion=t.SpecVersion=void 0;const r=n(388),i=n(5241),o=n(2608),a=n(1576);var s,l;!function(e){e.OAS2="oas2",e.OAS3_0="oas3_0",e.OAS3_1="oas3_1",e.Async2="async2"}(s||(t.SpecVersion=s={})),function(e){e.OAS2="oas2",e.OAS3="oas3",e.Async2="async2"}(l||(t.SpecMajorVersion=l={}));const c={[s.OAS2]:r.Oas2Types,[s.OAS3_0]:i.Oas3Types,[s.OAS3_1]:o.Oas3_1Types,[s.Async2]:a.AsyncApi2Types};t.detectSpec=function(e){if("object"!=typeof e)throw new Error("Document must be JSON object, got "+typeof e);if(e.openapi&&"string"!=typeof e.openapi)throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof e.openapi}"`);if(e.openapi&&e.openapi.startsWith("3.0"))return s.OAS3_0;if(e.openapi&&e.openapi.startsWith("3.1"))return s.OAS3_1;if(e.swagger&&"2.0"===e.swagger)return s.OAS2;if(e.openapi||e.swagger)throw new Error(`Unsupported OpenAPI version: ${e.openapi||e.swagger}`);if(e.asyncapi&&e.asyncapi.startsWith("2."))return s.Async2;if(e.asyncapi)throw new Error(`Unsupported AsyncAPI version: ${e.asyncapi}`);throw new Error("Unsupported specification")},t.getMajorSpecVersion=function(e){return e===s.OAS2?l.OAS2:e===s.Async2?l.Async2:l.OAS3},t.getTypes=function(e){return c[e]}},1094:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isRedoclyRegistryURL=t.RedoclyClient=void 0;const i=n(2116),o=n(6470),a=n(6918),s=n(1390),l=n(3777),c=n(8005),u=n(771),p=n(3065),d=".redocly-config.json";t.RedoclyClient=class{constructor(e){this.accessTokens={},this.region=this.loadRegion(e),this.loadTokens(),this.domain=e?l.DOMAINS[e]:c.env.REDOCLY_DOMAIN||l.DOMAINS[l.DEFAULT_REGION],c.env.REDOCLY_DOMAIN=this.domain,this.registryApi=new s.RegistryApi(this.accessTokens,this.region)}loadRegion(e){if(e&&!l.DOMAINS[e])throw new Error(`Invalid argument: region in config file.\nGiven: ${p.colorize.green(e)}, choices: "us", "eu".`);return c.env.REDOCLY_DOMAIN?l.AVAILABLE_REGIONS.find((e=>l.DOMAINS[e]===c.env.REDOCLY_DOMAIN))||l.DEFAULT_REGION:e||l.DEFAULT_REGION}getRegion(){return this.region}hasTokens(){return(0,u.isNotEmptyObject)(this.accessTokens)}hasToken(){return!!this.accessTokens[this.region]}getAuthorizationHeader(){return r(this,void 0,void 0,(function*(){return this.accessTokens[this.region]}))}setAccessTokens(e){this.accessTokens=e}loadTokens(){const e=(0,o.resolve)((0,a.homedir)(),d),t=this.readCredentialsFile(e);(0,u.isNotEmptyObject)(t)&&this.setAccessTokens(Object.assign(Object.assign({},t),t.token&&!t[this.region]&&{[this.region]:t.token})),c.env.REDOCLY_AUTHORIZATION&&this.setAccessTokens(Object.assign(Object.assign({},this.accessTokens),{[this.region]:c.env.REDOCLY_AUTHORIZATION}))}getAllTokens(){return Object.entries(this.accessTokens).filter((([e])=>l.AVAILABLE_REGIONS.includes(e))).map((([e,t])=>({region:e,token:t})))}getValidTokens(){return r(this,void 0,void 0,(function*(){const e=this.getAllTokens(),t=yield Promise.allSettled(e.map((({token:e,region:t})=>this.verifyToken(e,t))));return e.filter(((e,n)=>"fulfilled"===t[n].status)).map((({token:e,region:t})=>({token:e,region:t,valid:!0})))}))}getTokens(){return r(this,void 0,void 0,(function*(){return this.hasTokens()?yield this.getValidTokens():[]}))}isAuthorizedWithRedoclyByRegion(){return r(this,void 0,void 0,(function*(){if(!this.hasTokens())return!1;const e=this.accessTokens[this.region];if(!e)return!1;try{return yield this.verifyToken(e,this.region),!0}catch(e){return!1}}))}isAuthorizedWithRedocly(){return r(this,void 0,void 0,(function*(){return this.hasTokens()&&(0,u.isNotEmptyObject)(yield this.getValidTokens())}))}readCredentialsFile(e){return(0,i.existsSync)(e)?JSON.parse((0,i.readFileSync)(e,"utf-8")):{}}verifyToken(e,t,n=!1){return r(this,void 0,void 0,(function*(){return this.registryApi.authStatus(e,t,n)}))}login(e,t=!1){return r(this,void 0,void 0,(function*(){const n=(0,o.resolve)((0,a.homedir)(),d);try{yield this.verifyToken(e,this.region,t)}catch(e){throw new Error("Authorization failed. Please check if you entered a valid API key.")}const r=Object.assign(Object.assign({},this.readCredentialsFile(n)),{[this.region]:e,token:e});this.accessTokens=r,this.registryApi.setAccessTokens(r),(0,i.writeFileSync)(n,JSON.stringify(r,null,2))}))}logout(){const e=(0,o.resolve)((0,a.homedir)(),d);(0,i.existsSync)(e)&&(0,i.unlinkSync)(e)}},t.isRedoclyRegistryURL=function(e){const t=c.env.REDOCLY_DOMAIN||l.DOMAINS[l.DEFAULT_REGION],n="redocly.com"===t?"redoc.ly":t;return!(!e.startsWith(`https://api.${t}/registry/`)&&!e.startsWith(`https://api.${n}/registry/`))}},1390:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryApi=void 0;const i=n(8150),o=n(3777),a=n(771),s=n(3244).i8;t.RegistryApi=class{constructor(e,t){this.accessTokens=e,this.region=t}get accessToken(){return(0,a.isNotEmptyObject)(this.accessTokens)&&this.accessTokens[this.region]}getBaseUrl(e=o.DEFAULT_REGION){return`https://api.${o.DOMAINS[e]}/registry`}setAccessTokens(e){return this.accessTokens=e,this}request(e="",t={},n){var o,a;return r(this,void 0,void 0,(function*(){const r="undefined"!=typeof process&&(null===(o={})||void 0===o?void 0:o.REDOCLY_CLI_COMMAND)||"",l="undefined"!=typeof process&&(null===(a={})||void 0===a?void 0:a.REDOCLY_ENVIRONMENT)||"",c=Object.assign({},t.headers||{},{"x-redocly-cli-version":s,"user-agent":`redocly-cli / ${s} ${r} ${l}`});if(!c.hasOwnProperty("authorization"))throw new Error("Unauthorized");const u=yield(0,i.default)(`${this.getBaseUrl(n)}${e}`,Object.assign({},t,{headers:c}));if(401===u.status)throw new Error("Unauthorized");if(404===u.status){const e=yield u.json();throw new Error(e.code)}return u}))}authStatus(e,t,n=!1){return r(this,void 0,void 0,(function*(){try{const n=yield this.request("",{headers:{authorization:e}},t);return yield n.json()}catch(e){throw n&&console.log(e),e}}))}prepareFileUpload({organizationId:e,name:t,version:n,filesHash:i,filename:o,isUpsert:a}){return r(this,void 0,void 0,(function*(){const r=yield this.request(`/${e}/${t}/${n}/prepare-file-upload`,{method:"POST",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({filesHash:i,filename:o,isUpsert:a})},this.region);if(r.ok)return r.json();throw new Error("Could not prepare file upload")}))}pushApi({organizationId:e,name:t,version:n,rootFilePath:i,filePaths:o,branch:a,isUpsert:s,isPublic:l,batchId:c,batchSize:u}){return r(this,void 0,void 0,(function*(){if(!(yield this.request(`/${e}/${t}/${n}`,{method:"PUT",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({rootFilePath:i,filePaths:o,branch:a,isUpsert:s,isPublic:l,batchId:c,batchSize:u})},this.region)).ok)throw new Error("Could not push api")}))}}},7468:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAnchor=t.isMappingRef=t.isAbsoluteUrl=t.refBaseName=t.pointerBaseName=t.parsePointer=t.parseRef=t.escapePointer=t.unescapePointer=t.Location=t.isRef=t.joinPointer=void 0;const r=n(771);function i(e,t){return""===e&&(e="#/"),"/"===e[e.length-1]?e+t:e+"/"+t}t.joinPointer=i,t.isRef=function(e){return e&&"string"==typeof e.$ref};class o{constructor(e,t){this.source=e,this.pointer=t}child(e){return new o(this.source,i(this.pointer,(Array.isArray(e)?e:[e]).map(s).join("/")))}key(){return Object.assign(Object.assign({},this),{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+("#/"===this.pointer?"":this.pointer)}}function a(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function s(e){return"number"==typeof e?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}t.Location=o,t.unescapePointer=a,t.escapePointer=s,t.parseRef=function(e){const[t,n]=e.split("#/");return{uri:t||null,pointer:n?n.split("/").map(a).filter(r.isTruthy):[]}},t.parsePointer=function(e){return e.substr(2).split("/").map(a)},t.pointerBaseName=function(e){const t=e.split("/");return t[t.length-1]},t.refBaseName=function(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")},t.isAbsoluteUrl=function(e){return e.startsWith("http://")||e.startsWith("https://")},t.isMappingRef=function(e){return e.startsWith("#")||e.startsWith("https://")||e.startsWith("http://")||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1},t.isAnchor=function(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}},4182:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDocument=t.BaseResolver=t.makeDocumentFromString=t.makeRefId=t.YamlParseError=t.ResolveError=t.Source=void 0;const i=n(3197),o=n(6470),a=n(7468),s=n(5220),l=n(771);class c{constructor(e,t,n){this.absoluteRef=e,this.body=t,this.mimeType=n}getAst(e){var t;return void 0===this._ast&&(this._ast=null!==(t=e(this.body,{filename:this.absoluteRef}))&&void 0!==t?t:void 0,this._ast&&0===this._ast.kind&&""===this._ast.value&&1!==this._ast.startPosition&&(this._ast.startPosition=1,this._ast.endPosition=1)),this._ast}getLines(){return void 0===this._lines&&(this._lines=this.body.split(/\r\n|[\n\r]/g)),this._lines}}t.Source=c;class u extends Error{constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,u.prototype)}}t.ResolveError=u;const p=/\((\d+):(\d+)\)$/;class d extends Error{constructor(e,t){super(e.message.split("\n")[0]),this.originalError=e,this.source=t,Object.setPrototypeOf(this,d.prototype);const[,n,r]=this.message.match(p)||[];this.line=parseInt(n,10),this.col=parseInt(r,10)}}function f(e,t){return e+"::"+t}function h(e,t){return{prev:e,node:t}}t.YamlParseError=d,t.makeRefId=f,t.makeDocumentFromString=function(e,t){const n=new c(t,e);try{return{source:n,parsed:(0,l.parseYaml)(e,{filename:t})}}catch(e){throw new d(e,n)}},t.BaseResolver=class{constructor(e={http:{headers:[]}}){this.config=e,this.cache=new Map}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,t){return(0,a.isAbsoluteUrl)(t)?t:e&&(0,a.isAbsoluteUrl)(e)?new URL(t,e).href:o.resolve(e?o.dirname(e):process.cwd(),t)}loadExternalRef(e){return r(this,void 0,void 0,(function*(){try{if((0,a.isAbsoluteUrl)(e)){const{body:t,mimeType:n}=yield(0,l.readFileFromUrl)(e,this.config.http);return new c(e,t,n)}{if(i.lstatSync(e).isDirectory())throw new Error(`Expected a file but received a folder at ${e}`);const t=yield i.promises.readFile(e,"utf-8");return new c(e,t.replace(/\r\n/g,"\n"))}}catch(e){throw e.message=e.message.replace(", lstat",""),new u(e)}}))}parseDocument(e,t=!1){var n;const r=e.absoluteRef.substr(e.absoluteRef.lastIndexOf("."));if(![".json",".json",".yml",".yaml"].includes(r)&&!(null===(n=e.mimeType)||void 0===n?void 0:n.match(/(json|yaml|openapi)/))&&!t)return{source:e,parsed:e.body};try{return{source:e,parsed:(0,l.parseYaml)(e.body,{filename:e.absoluteRef})}}catch(t){throw new d(t,e)}}resolveDocument(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=this.resolveExternalRef(e,t),i=this.cache.get(r);if(i)return i;const o=this.loadExternalRef(r).then((e=>this.parseDocument(e,n)));return this.cache.set(r,o),o}))}};const m={name:"unknown",properties:{}},g={name:"scalar",properties:{}};t.resolveDocument=function(e){return r(this,void 0,void 0,(function*(){const{rootDocument:t,externalRefResolver:n,rootType:i}=e,o=new Map,c=new Set,u=[];let p;!function e(t,i,p,d){const y=i.source.absoluteRef,b=new Map;function v(e,t,i){return r(this,void 0,void 0,(function*(){if(function(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}(i.prev,t))throw new Error("Self-referencing circular pointer");if((0,a.isAnchor)(t.$ref)){yield(0,l.nextTick)();const n={resolved:!0,isRemote:!1,node:b.get(t.$ref),document:e,nodePointer:t.$ref},r=f(e.source.absoluteRef,t.$ref);return o.set(r,n),n}const{uri:r,pointer:s}=(0,a.parseRef)(t.$ref),c=null!==r;let u;try{u=c?yield n.resolveDocument(e.source.absoluteRef,r):e}catch(n){const r={resolved:!1,isRemote:c,document:void 0,error:n},i=f(e.source.absoluteRef,t.$ref);return o.set(i,r),r}let p={resolved:!0,document:u,isRemote:c,node:e.parsed,nodePointer:"#/"},d=u.parsed;const m=s;for(const e of m){if("object"!=typeof d){d=void 0;break}if(void 0!==d[e])d=d[e],p.nodePointer=(0,a.joinPointer)(p.nodePointer,(0,a.escapePointer)(e));else{if(!(0,a.isRef)(d)){d=void 0;break}if(p=yield v(u,d,h(i,d)),u=p.document||u,"object"!=typeof p.node){d=void 0;break}d=p.node[e],p.nodePointer=(0,a.joinPointer)(p.nodePointer,(0,a.escapePointer)(e))}}p.node=d,p.document=u;const g=f(e.source.absoluteRef,t.$ref);return p.document&&(0,a.isRef)(d)&&(p=yield v(p.document,d,h(i,d))),o.set(g,p),Object.assign({},p)}))}!function t(n,r,o){if("object"!=typeof n||null===n)return;const l=`${r.name}::${o}`;if(c.has(l))return;c.add(l);const[p,d]=Object.entries(n).find((([e])=>"$anchor"===e))||[];if(d&&b.set(`#${d}`,n),Array.isArray(n)){const e=r.items;if(void 0===e&&r!==m&&r!==s.SpecExtension)return;for(let r=0;r{t.resolved&&e(t.node,t.document,t.nodePointer,r)}));u.push(t)}}}(t,d,y+p)}(t.parsed,t,"#/",i);do{p=yield Promise.all(u)}while(u.length!==p.length);return o}))}},348:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnresolvedRef=t.NoUnresolvedRefs=void 0;const r=n(4182);function i(e,t,n){var i;const o=e.error;o instanceof r.YamlParseError&&t({message:"Failed to parse: "+o.message,location:{source:o.source,pointer:void 0,start:{col:o.col,line:o.line}}});const a=null===(i=e.error)||void 0===i?void 0:i.message;t({location:n,message:"Can't resolve $ref"+(a?": "+a:"")})}t.NoUnresolvedRefs=()=>({ref:{leave(e,{report:t,location:n},r){void 0===r.node&&i(r,t,n)}},DiscriminatorMapping(e,{report:t,resolve:n,location:r}){for(const o of Object.keys(e)){const a=n({$ref:e[o]});if(void 0!==a.node)return;i(a,t,r.child(o))}}}),t.reportUnresolvedRef=i},4508:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(771);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,n,r){var i;e.set(t.absolutePointer,{used:(null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:i}){if(["Schema","Parameter","Response","SecurityScheme"].includes(n.name)){const n=r(t);if(!n.location)return;const[o,a]=n.location.absolutePointer.split("#",2),s=`${o}#${a.split("/").slice(0,3).join("/")}`;e.set(s,{used:!0,name:i.toString()})}}},Root:{leave(t,n){const i=n.getVisitorData();i.removedCount=0;const o=new Set;e.forEach((e=>{const{used:n,name:r,componentType:a}=e;!n&&a&&(o.add(a),delete t[a][r],i.removedCount++)}));for(const e of o)(0,r.isEmptyObject)(t[e])&&delete t[e]}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"definitions",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedSecuritySchemes:{SecurityScheme(e,{location:n,key:r}){t(n,"securityDefinitions",r.toString())}}}}},6350:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(771);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,n,r){var i;e.set(t.absolutePointer,{used:(null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:i}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(n.name)){const n=r(t);if(!n.location)return;const[o,a]=n.location.absolutePointer.split("#",2),s=`${o}#${a.split("/").slice(0,4).join("/")}`;e.set(s,{used:!0,name:i.toString()})}}},Root:{leave(t,n){const i=n.getVisitorData();i.removedCount=0,e.forEach((e=>{const{used:n,componentType:o,name:a}=e;if(!n&&o&&t.components){const e=t.components[o];delete e[a],i.removedCount++,(0,r.isEmptyObject)(e)&&delete t.components[o]}})),(0,r.isEmptyObject)(t.components)&&delete t.components}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"schemas",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedExamples:{Example(e,{location:n,key:r}){t(n,"examples",r.toString())}},NamedRequestBodies:{RequestBody(e,{location:n,key:r}){t(n,"requestBodies",r.toString())}},NamedHeaders:{Header(e,{location:n,key:r}){t(n,"headers",r.toString())}}}}},1576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncApi2Types=void 0;const r=n(5220),i=n(7468),o={properties:{},allowed(){return["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"]},additionalProperties:{type:"object"}},a={properties:{},allowed(){return["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"]},additionalProperties:{type:"object"}},s={properties:{},allowed(){return["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"]},additionalProperties:{type:"object"}},l={properties:{},allowed(){return["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"]},additionalProperties:{type:"object"}},c={properties:{$id:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",myArbitraryKeyword:{type:"boolean"},title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,r.listOf)("Schema"),anyOf:(0,r.listOf)("Schema"),oneOf:(0,r.listOf)("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:(0,r.listOf)("Schema"),prefixItems:(0,r.listOf)("Schema"),contains:"Schema",minContains:{type:"integer",minimum:0},maxContains:{type:"integer",minimum:0},patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"},dependencies:{type:"object"}}},u={properties:{},additionalProperties:e=>(0,i.isMappingRef)(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},p={properties:{type:{enum:["userPassword","apiKey","X509","symmetricEncryption","asymmetricEncryption","httpApiKey","http","oauth2","openIdConnect","plain","scramSha256","scramSha512","gssapi"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie","user","password"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","in"];case"httpApiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","in","description"];case"httpApiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"},d={properties:{}};o.properties.http=d;const f={properties:{}};a.properties.http=f;const h={properties:{headers:"Schema",bindingVersion:{type:"string"}}};s.properties.http=h;const m={properties:{type:{type:"string"},method:{type:"string",enum:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"]},headers:"Schema",bindingVersion:{type:"string"}}};l.properties.http=m;const g={properties:{method:{type:"string"},query:"Schema",headers:"Schema",bindingVersion:{type:"string"}}};o.properties.ws=g;const y={properties:{}};a.properties.ws=y;const b={properties:{}};s.properties.ws=b;const v={properties:{}};l.properties.ws=v;const x={properties:{topic:{type:"string"},partitions:{type:"integer"},replicas:{type:"integer"},topicConfiguration:"KafkaTopicConfiguration",bindingVersion:{type:"string"}}};o.properties.kafka=x;const w={properties:{}};a.properties.kafka=w;const k={properties:{key:"Schema",schemaIdLocation:{type:"string"},schemaIdPayloadEncoding:{type:"string"},schemaLookupStrategy:{type:"string"},bindingVersion:{type:"string"}}};s.properties.kafka=k;const S={properties:{groupId:"Schema",clientId:"Schema",bindingVersion:{type:"string"}}};l.properties.kafka=S;const O={properties:{destination:{type:"string"},destinationType:{type:"string"},bindingVersion:{type:"string"}}};o.properties.anypointmq=O;const E={properties:{}};a.properties.anypointmq=E;const _={properties:{headers:"Schema",bindingVersion:{type:"string"}}};s.properties.anypointmq=_;const A={properties:{}};l.properties.anypointmq=A;const j={properties:{}};o.properties.amqp=j;const C={properties:{}};a.properties.amqp=C;const P={properties:{contentEncoding:{type:"string"},messageType:{type:"string"},bindingVersion:{type:"string"}}};s.properties.amqp=P;const T={properties:{expiration:{type:"integer"},userId:{type:"string"},cc:{type:"array",items:{type:"string"}},priority:{type:"integer"},deliveryMode:{type:"integer"},mandatory:{type:"boolean"},bcc:{type:"array",items:{type:"string"}},replyTo:{type:"string"},timestamp:{type:"boolean"},ack:{type:"boolean"},bindingVersion:{type:"string"}}};l.properties.amqp=T;const R={properties:{}};o.properties.amqp1=R;const I={properties:{}};a.properties.amqp1=I;const N={properties:{}};s.properties.amqp1=N;const $={properties:{}};l.properties.amqp1=$;const L={properties:{qos:{type:"integer"},retain:{type:"boolean"},bindingVersion:{type:"string"}}};o.properties.mqtt=L;const D={properties:{clientId:{type:"string"},cleanSession:{type:"boolean"},lastWill:"MqttServerBindingLastWill",keepAlive:{type:"integer"},bindingVersion:{type:"string"}}};a.properties.mqtt=D;const M={properties:{bindingVersion:{type:"string"}}};s.properties.mqtt=M;const F={properties:{qos:{type:"integer"},retain:{type:"boolean"},bindingVersion:{type:"string"}}};l.properties.mqtt=F;const z={properties:{}};o.properties.mqtt5=z;const U={properties:{}};a.properties.mqtt5=U;const B={properties:{}};s.properties.mqtt5=B;const q={properties:{}};l.properties.mqtt5=q;const W={properties:{}};o.properties.nats=W;const V={properties:{}};a.properties.nats=V;const H={properties:{}};s.properties.nats=H;const Y={properties:{queue:{type:"string"},bindingVersion:{type:"string"}}};l.properties.nats=Y;const G={properties:{destination:{type:"string"},destinationType:{type:"string"},bindingVersion:{type:"string"}}};o.properties.jms=G;const Q={properties:{}};a.properties.jms=Q;const X={properties:{headers:"Schema",bindingVersion:{type:"string"}}};s.properties.jms=X;const K={properties:{headers:"Schema",bindingVersion:{type:"string"}}};l.properties.jms=K;const Z={properties:{}};o.properties.solace=Z;const J={properties:{bindingVersion:{type:"string"},msgVpn:{type:"string"}}};a.properties.solace=J;const ee={properties:{}};s.properties.solace=ee;const te={properties:{bindingVersion:{type:"string"},destinations:(0,r.listOf)("SolaceDestination")}};l.properties.solace=te;const ne={properties:{}};o.properties.stomp=ne;const re={properties:{}};a.properties.stomp=re;const ie={properties:{}};s.properties.stomp=ie;const oe={properties:{}};l.properties.stomp=oe;const ae={properties:{}};o.properties.redis=ae;const se={properties:{}};a.properties.redis=se;const le={properties:{}};s.properties.redis=le;const ce={properties:{}};l.properties.redis=ce;const ue={properties:{}};o.properties.mercure=ue;const pe={properties:{}};a.properties.mercure=pe;const de={properties:{}};s.properties.mercure=de;const fe={properties:{}};l.properties.mercure=fe,t.AsyncApi2Types={Root:{properties:{asyncapi:null,info:"Info",id:{type:"string"},servers:"ServerMap",channels:"ChannelMap",components:"Components",tags:"TagList",externalDocs:"ExternalDocs",defaultContentType:{type:"string"}},required:["asyncapi","channels","info"]},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},TagList:(0,r.listOf)("Tag"),ServerMap:{properties:{},additionalProperties:(e,t)=>t.match(/^[A-Za-z0-9_\-]+$/)?"Server":void 0},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},Server:{properties:{url:{type:"string"},protocol:{type:"string"},protocolVersion:{type:"string"},description:{type:"string"},variables:"ServerVariablesMap",security:"SecurityRequirementList",bindings:"ServerBindings",tags:"TagList"},required:["url","protocol"]},ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}},required:[]},ServerVariablesMap:(0,r.mapOf)("ServerVariable"),SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,r.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},HttpServerBinding:f,HttpChannelBinding:d,HttpMessageBinding:h,HttpOperationBinding:m,WsServerBinding:y,WsChannelBinding:g,WsMessageBinding:b,WsOperationBinding:v,KafkaServerBinding:w,KafkaTopicConfiguration:{properties:{"cleanup.policy":{type:"array",items:{enum:["delete","compact"]}},"retention.ms":{type:"integer"},"retention.bytes":{type:"integer"},"delete.retention.ms":{type:"integer"},"max.message.bytes":{type:"integer"}}},KafkaChannelBinding:x,KafkaMessageBinding:k,KafkaOperationBinding:S,AnypointmqServerBinding:E,AnypointmqChannelBinding:O,AnypointmqMessageBinding:_,AnypointmqOperationBinding:A,AmqpServerBinding:C,AmqpChannelBinding:j,AmqpMessageBinding:P,AmqpOperationBinding:T,Amqp1ServerBinding:I,Amqp1ChannelBinding:R,Amqp1MessageBinding:N,Amqp1OperationBinding:$,MqttServerBindingLastWill:{properties:{topic:{type:"string"},qos:{type:"integer"},message:{type:"string"},retain:{type:"boolean"}}},MqttServerBinding:D,MqttChannelBinding:L,MqttMessageBinding:M,MqttOperationBinding:F,Mqtt5ServerBinding:U,Mqtt5ChannelBinding:z,Mqtt5MessageBinding:B,Mqtt5OperationBinding:q,NatsServerBinding:V,NatsChannelBinding:W,NatsMessageBinding:H,NatsOperationBinding:Y,JmsServerBinding:Q,JmsChannelBinding:G,JmsMessageBinding:X,JmsOperationBinding:K,SolaceServerBinding:J,SolaceChannelBinding:Z,SolaceMessageBinding:ee,SolaceDestination:{properties:{destinationType:{type:"string",enum:["queue","topic"]},deliveryMode:{type:"string",enum:["direct","persistent"]},"queue.name":{type:"string"},"queue.topicSubscriptions":{type:"array",items:{type:"string"}},"queue.accessType":{type:"string",enum:["exclusive","nonexclusive"]},"queue.maxMsgSpoolSize":{type:"string"},"queue.maxTtl":{type:"string"},"topic.topicSubscriptions":{type:"array",items:{type:"string"}}}},SolaceOperationBinding:te,StompServerBinding:re,StompChannelBinding:ne,StompMessageBinding:ie,StompOperationBinding:oe,RedisServerBinding:se,RedisChannelBinding:ae,RedisMessageBinding:le,RedisOperationBinding:ce,MercureServerBinding:pe,MercureChannelBinding:ue,MercureMessageBinding:de,MercureOperationBinding:fe,ServerBindings:a,ChannelBindings:o,ChannelMap:{properties:{},additionalProperties:"Channel"},Channel:{properties:{description:{type:"string"},subscribe:"Operation",publish:"Operation",parameters:"ParametersMap",bindings:"ChannelBindings",servers:{type:"array",items:{type:"string"}}}},Parameter:{properties:{description:{type:"string"},schema:"Schema",location:{type:"string"}}},ParametersMap:(0,r.mapOf)("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},security:"SecurityRequirementList",bindings:"OperationBindings",traits:"OperationTraitList",message:"Message"},required:[]},Schema:c,MessageExample:{properties:{payload:{isExample:!0},summary:{type:"string"},name:{type:"string"},headers:{type:"object"}}},SchemaProperties:{properties:{},additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema"},DiscriminatorMapping:u,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"]},Components:{properties:{messages:"NamedMessages",parameters:"NamedParameters",schemas:"NamedSchemas",correlationIds:"NamedCorrelationIds",messageTraits:"NamedMessageTraits",operationTraits:"NamedOperationTraits",streamHeaders:"NamedStreamHeaders",securitySchemes:"NamedSecuritySchemes",servers:"ServerMap",serverVariables:"ServerVariablesMap",channels:"ChannelMap",serverBindings:"ServerBindings",channelBindings:"ChannelBindings",operationBindings:"OperationBindings",messageBindings:"MessageBindings"}},NamedSchemas:(0,r.mapOf)("Schema"),NamedMessages:(0,r.mapOf)("Message"),NamedMessageTraits:(0,r.mapOf)("MessageTrait"),NamedOperationTraits:(0,r.mapOf)("OperationTrait"),NamedParameters:(0,r.mapOf)("Parameter"),NamedSecuritySchemes:(0,r.mapOf)("SecurityScheme"),NamedCorrelationIds:(0,r.mapOf)("CorrelationId"),NamedStreamHeaders:(0,r.mapOf)("StreamHeader"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"]},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["authorizationUrl","tokenUrl","scopes"]},SecuritySchemeFlows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"}},SecurityScheme:p,Message:{properties:{messageId:{type:"string"},headers:"Schema",payload:"Schema",correlationId:"CorrelationId",schemaFormat:{type:"string"},contentType:{type:"string"},name:{type:"string"},title:{type:"string"},summary:{type:"string"},description:{type:"string"},tags:"TagList",externalDocs:"ExternalDocs",bindings:"MessageBindings",traits:"MessageTraitList"},additionalProperties:{}},MessageBindings:s,OperationBindings:l,OperationTrait:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},security:"SecurityRequirementList",bindings:"OperationBindings"},required:[]},OperationTraitList:(0,r.listOf)("OperationTrait"),MessageTrait:{properties:{messageId:{type:"string"},headers:"Schema",correlationId:"CorrelationId",schemaFormat:{type:"string"},contentType:{type:"string"},name:{type:"string"},title:{type:"string"},summary:{type:"string"},description:{type:"string"},tags:"TagList",externalDocs:"ExternalDocs",bindings:"MessageBindings"},additionalProperties:{}},MessageTraitList:(0,r.listOf)("MessageTrait"),CorrelationId:{properties:{description:{type:"string"},location:{type:"string"}},required:["location"]}}},5220:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedType=t.normalizeTypes=t.SpecExtension=t.mapOf=t.listOf=void 0,t.listOf=function(e){return{name:`${e}List`,properties:{},items:e}},t.mapOf=function(e){return{name:`${e}Map`,properties:{},additionalProperties:()=>e}},t.SpecExtension={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}},t.normalizeTypes=function(e,n={}){const r={};for(const t of Object.keys(e))r[t]=Object.assign(Object.assign({},e[t]),{name:t});for(const e of Object.values(r))i(e);return r.SpecExtension=t.SpecExtension,r;function i(e){if(e.additionalProperties&&(e.additionalProperties=o(e.additionalProperties)),e.items&&(e.items=o(e.items)),e.properties){const t={};for(const[r,i]of Object.entries(e.properties))t[r]=o(i),n.doNotResolveExamples&&i&&i.isExample&&(t[r]=Object.assign(Object.assign({},i),{resolvable:!1}));e.properties=t}}function o(e){if("string"==typeof e){if(!r[e])throw new Error(`Unknown type name found: ${e}`);return r[e]}return"function"==typeof e?(t,n)=>o(e(t,n)):e&&e.name?(i(e=Object.assign({},e)),e):e&&e.directResolveAs?Object.assign(Object.assign({},e),{directResolveAs:o(e.directResolveAs)}):e}},t.isNamedType=function(e){return"string"==typeof(null==e?void 0:e.name)}},388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas2Types=void 0;const r=n(5220),i=/^[0-9][0-9Xx]{2}$/,o={properties:{name:{type:"string"},in:{type:"string",enum:["query","header","path","formData","body"]},description:{type:"string"},required:{type:"boolean"},schema:"Schema",type:{type:"string",enum:["string","number","integer","boolean","array","file"]},format:{type:"string"},allowEmptyValue:{type:"boolean"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"},"x-example":"Example","x-examples":"ExamplesMap"},required(e){return e&&e.in?"body"===e.in?["name","in","schema"]:"array"===e.type?["name","in","type","items"]:["name","in","type"]:["name","in"]},extensionsPrefix:"x-"},a={properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required(e){return e&&"array"===e.type?["type","items"]:["type"]},extensionsPrefix:"x-"},s={properties:{default:"Response"},additionalProperties:(e,t)=>i.test(t)?"Response":void 0},l={properties:{description:{type:"string"},schema:"Schema",headers:(0,r.mapOf)("Header"),examples:"Examples","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},c={properties:{description:{type:"string"},type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required(e){return e&&"array"===e.type?["type","items"]:["type"]},extensionsPrefix:"x-"},u={properties:{format:{type:"string"},title:{type:"string"},description:{type:"string"},default:null,multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{type:"string",enum:["object","array","string","number","integer","boolean","null"]},items:e=>Array.isArray(e)?(0,r.listOf)("Schema"):"Schema",allOf:(0,r.listOf)("Schema"),properties:"SchemaProperties",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",discriminator:{type:"string"},readOnly:{type:"boolean"},xml:"Xml",externalDocs:"ExternalDocs",example:{isExample:!0},"x-tags":{type:"array",items:{type:"string"}},"x-nullable":{type:"boolean"},"x-extendedDiscriminator":{type:"string"},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"},"x-enumDescriptions":"EnumDescriptions"},extensionsPrefix:"x-"},p={properties:{type:{enum:["basic","apiKey","oauth2"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header"]},flow:{enum:["implicit","password","application","accessCode"]},authorizationUrl:{type:"string"},tokenUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","scopes"];case"application":case"password":return["type","flow","tokenUrl","scopes"];default:return["type","flow","scopes"]}default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"basic":return["type","description"];case"apiKey":return["type","name","in","description"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","description","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","description","scopes"];case"application":case"password":return["type","flow","tokenUrl","description","scopes"];default:return["type","flow","tokenUrl","authorizationUrl","description","scopes"]}default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas2Types={Root:{properties:{swagger:{type:"string"},info:"Info",host:{type:"string"},basePath:{type:"string"},schemes:{type:"array",items:{type:"string"}},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},paths:"Paths",definitions:"NamedSchemas",parameters:"NamedParameters",responses:"NamedResponses",securityDefinitions:"NamedSecuritySchemes",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs","x-servers":"XServerList","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["swagger","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:(0,r.listOf)("Tag"),TagGroups:(0,r.listOf)("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}}},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:(0,r.mapOf)("Example"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,r.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License",version:{type:"string"},"x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}},extensionsPrefix:"x-"},Paths:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:{properties:{$ref:{type:"string"},parameters:"ParameterList",get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation"},extensionsPrefix:"x-"},Parameter:o,ParameterItems:a,ParameterList:(0,r.listOf)("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},parameters:"ParameterList",responses:"Responses",schemes:{type:"array",items:{type:"string"}},deprecated:{type:"boolean"},security:"SecurityRequirementList","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Examples:{properties:{},additionalProperties:{isExample:!0}},Header:c,Responses:s,Response:l,Schema:u,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},NamedSchemas:(0,r.mapOf)("Schema"),NamedResponses:(0,r.mapOf)("Response"),NamedParameters:(0,r.mapOf)("Parameter"),NamedSecuritySchemes:(0,r.mapOf)("SecurityScheme"),SecurityScheme:p,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:(0,r.listOf)("XCodeSample"),XServerList:(0,r.listOf)("XServer"),XServer:{properties:{url:{type:"string"},description:{type:"string"}},required:["url"]}}},5241:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3Types=void 0;const r=n(5220),i=n(7468),o=/^[0-9][0-9Xx]{2}$/,a={properties:{default:"Response"},additionalProperties:(e,t)=>o.test(t)?"Response":void 0},s={properties:{externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,r.listOf)("Schema"),anyOf:(0,r.listOf)("Schema"),oneOf:(0,r.listOf)("Schema"),not:"Schema",properties:"SchemaProperties",items:e=>Array.isArray(e)?(0,r.listOf)("Schema"):"Schema",additionalItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},default:null,nullable:{type:"boolean"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",example:{isExample:!0},deprecated:{type:"boolean"},"x-tags":{type:"array",items:{type:"string"}},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"}},extensionsPrefix:"x-"},l={properties:{},additionalProperties:e=>(0,i.isMappingRef)(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},c={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3Types={Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",components:"Components","x-webhooks":"WebhooksMap","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["openapi","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:(0,r.listOf)("Tag"),TagGroups:(0,r.listOf)("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Server:{properties:{url:{type:"string"},description:{type:"string"},variables:"ServerVariablesMap"},required:["url"],extensionsPrefix:"x-"},ServerList:(0,r.listOf)("Server"),ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},required:["default"],extensionsPrefix:"x-"},ServerVariablesMap:(0,r.mapOf)("ServerVariable"),SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,r.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Paths:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:{properties:{$ref:{type:"string"},servers:"ServerList",parameters:"ParameterList",summary:{type:"string"},description:{type:"string"},get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation",trace:"Operation"},extensionsPrefix:"x-"},Parameter:{properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},required:["name","in"],requiredOneOf:["schema","content"],extensionsPrefix:"x-"},ParameterList:(0,r.listOf)("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Callback:(0,r.mapOf)("PathItem"),CallbacksMap:(0,r.mapOf)("Callback"),RequestBody:{properties:{description:{type:"string"},required:{type:"boolean"},content:"MediaTypesMap"},required:["content"],extensionsPrefix:"x-"},MediaTypesMap:{properties:{},additionalProperties:"MediaType"},MediaType:{properties:{schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",encoding:"EncodingMap"},extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:(0,r.mapOf)("Example"),Encoding:{properties:{contentType:{type:"string"},headers:"HeadersMap",style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"}},extensionsPrefix:"x-"},EncodingMap:(0,r.mapOf)("Encoding"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},Header:{properties:{description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},requiredOneOf:["schema","content"],extensionsPrefix:"x-"},HeadersMap:(0,r.mapOf)("Header"),Responses:a,Response:{properties:{description:{type:"string"},headers:"HeadersMap",content:"MediaTypesMap",links:"LinksMap","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},Link:{properties:{operationRef:{type:"string"},operationId:{type:"string"},parameters:null,requestBody:null,description:{type:"string"},server:"Server"},extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}}},Schema:s,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},DiscriminatorMapping:l,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks"},extensionsPrefix:"x-"},LinksMap:(0,r.mapOf)("Link"),NamedSchemas:(0,r.mapOf)("Schema"),NamedResponses:(0,r.mapOf)("Response"),NamedParameters:(0,r.mapOf)("Parameter"),NamedExamples:(0,r.mapOf)("Example"),NamedRequestBodies:(0,r.mapOf)("RequestBody"),NamedHeaders:(0,r.mapOf)("Header"),NamedSecuritySchemes:(0,r.mapOf)("SecurityScheme"),NamedLinks:(0,r.mapOf)("Link"),NamedCallbacks:(0,r.mapOf)("Callback"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"],extensionsPrefix:"x-"},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"},"x-usePkce":e=>"boolean"==typeof e?{type:"boolean"}:"XUsePkce"},required:["authorizationUrl","tokenUrl","scopes"],extensionsPrefix:"x-"},OAuth2Flows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"},extensionsPrefix:"x-"},SecurityScheme:c,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:(0,r.listOf)("XCodeSample"),XUsePkce:{properties:{disableManualConfiguration:{type:"boolean"},hideClientSecretInput:{type:"boolean"}}},WebhooksMap:{properties:{},additionalProperties:()=>"PathItem"}}},2608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3_1Types=void 0;const r=n(5220),i=n(5241),o={properties:{$id:{type:"string"},$anchor:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,r.listOf)("Schema"),anyOf:(0,r.listOf)("Schema"),oneOf:(0,r.listOf)("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:(0,r.listOf)("Schema"),prefixItems:(0,r.listOf)("Schema"),contains:"Schema",minContains:{type:"integer",minimum:0},maxContains:{type:"integer",minimum:0},patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"},"x-tags":{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},a={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect","mutualTLS"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":switch(null==e?void 0:e.flows){case"implicit":return["type","flows","authorizationUrl","refreshUrl","description","scopes"];case"password":case"clientCredentials":return["type","flows","tokenUrl","refreshUrl","description","scopes"];default:return["type","flows","authorizationUrl","refreshUrl","tokenUrl","description","scopes"]}case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3_1Types=Object.assign(Object.assign({},i.Oas3Types),{Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},summary:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",webhooks:"WebhooksMap",components:"Components",jsonSchemaDialect:{type:"string"}},required:["openapi","info"],requiredOneOf:["paths","components","webhooks"],extensionsPrefix:"x-"},Schema:o,License:{properties:{name:{type:"string"},url:{type:"string"},identifier:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks",pathItems:"NamedPathItems"},extensionsPrefix:"x-"},NamedPathItems:(0,r.mapOf)("PathItem"),SecurityScheme:a,Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},extensionsPrefix:"x-"}})},771:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.nextTick=t.pickDefined=t.keysOf=t.identity=t.isTruthy=t.showErrorForDeprecatedField=t.showWarningForDeprecatedField=t.doesYamlFileExist=t.isCustomRuleId=t.getMatchingStatusCodeRange=t.assignExisting=t.isNotString=t.isString=t.isNotEmptyObject=t.slash=t.isPathParameter=t.yamlAndJsonSyncReader=t.readFileAsStringSync=t.isSingular=t.validateMimeTypeOAS3=t.validateMimeType=t.splitCamelCaseIntoWords=t.omitObjectProps=t.pickObjectProps=t.readFileFromUrl=t.isEmptyArray=t.isEmptyObject=t.isPlainObject=t.isDefined=t.loadYaml=t.popStack=t.pushStack=t.stringifyYaml=t.parseYaml=void 0;const i=n(3197),o=n(6470),a=n(4099),s=n(8150),l=n(3450),c=n(5273),u=n(8005),p=n(3065);var d=n(5273);function f(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function h(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),a(e,t)}function m(e){return"string"==typeof e}function g(e){return!!e}function y(e,t){return`${void 0!==t?`${t}.`:""}${e}`}Object.defineProperty(t,"parseYaml",{enumerable:!0,get:function(){return d.parseYaml}}),Object.defineProperty(t,"stringifyYaml",{enumerable:!0,get:function(){return d.stringifyYaml}}),t.pushStack=function(e,t){return{prev:e,value:t}},t.popStack=function(e){var t;return null!==(t=null==e?void 0:e.prev)&&void 0!==t?t:null},t.loadYaml=function(e){return r(this,void 0,void 0,(function*(){const t=yield i.promises.readFile(e,"utf-8");return(0,c.parseYaml)(t)}))},t.isDefined=function(e){return void 0!==e},t.isPlainObject=f,t.isEmptyObject=function(e){return f(e)&&0===Object.keys(e).length},t.isEmptyArray=function(e){return Array.isArray(e)&&0===e.length},t.readFileFromUrl=function(e,t){return r(this,void 0,void 0,(function*(){const n={};for(const r of t.headers)h(e,r.matches)&&(n[r.name]=void 0!==r.envVariable?u.env[r.envVariable]||"":r.value);const r=yield(t.customFetch||s.default)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:yield r.text(),mimeType:r.headers.get("content-type")}}))},t.pickObjectProps=function(e,t){return Object.fromEntries(t.filter((t=>t in e)).map((t=>[t,e[t]])))},t.omitObjectProps=function(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))},t.splitCamelCaseIntoWords=function(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(g).map((e=>e.toLocaleLowerCase())),n=e.split(/([A-Z]{2,})/).filter((e=>e&&e===e.toUpperCase())).map((e=>e.toLocaleLowerCase()));return new Set([...t,...n])},t.validateMimeType=function({type:e,value:t},{report:n,location:r},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t[e])for(const o of t[e])i.includes(o)||n({message:`Mime type "${o}" is not allowed`,location:r.child(t[e].indexOf(o)).key()})},t.validateMimeTypeOAS3=function({type:e,value:t},{report:n,location:r},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t.content)for(const e of Object.keys(t.content))i.includes(e)||n({message:`Mime type "${e}" is not allowed`,location:r.child("content").child(e).key()})},t.isSingular=function(e){return l.isSingular(e)},t.readFileAsStringSync=function(e){return i.readFileSync(e,"utf-8")},t.yamlAndJsonSyncReader=function(e){const t=i.readFileSync(e,"utf-8");return(0,c.parseYaml)(t)},t.isPathParameter=function(e){return e.startsWith("{")&&e.endsWith("}")},t.slash=function(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")},t.isNotEmptyObject=function(e){return!!e&&Object.keys(e).length>0},t.isString=m,t.isNotString=function(e){return!m(e)},t.assignExisting=function(e,t){for(const n of Object.keys(t))e.hasOwnProperty(n)&&(e[n]=t[n])},t.getMatchingStatusCodeRange=function(e){return`${e}`.replace(/^(\d)\d\d$/,((e,t)=>`${t}XX`))},t.isCustomRuleId=function(e){return e.includes("/")},t.doesYamlFileExist=function(e){return(".yaml"===(0,o.extname)(e)||".yml"===(0,o.extname)(e))&&i.hasOwnProperty("existsSync")&&i.existsSync(e)},t.showWarningForDeprecatedField=function(e,t,n){p.logger.warn(`The '${p.colorize.red(e)}' field is deprecated. ${t?`Use ${p.colorize.green(y(t,n))} instead. `:""}Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`)},t.showErrorForDeprecatedField=function(e,t,n){throw new Error(`Do not use '${e}' field. ${t?`Use '${y(t,n)}' instead. `:""}\n`)},t.isTruthy=g,t.identity=function(e){return e},t.keysOf=function(e){return e?Object.keys(e):[]},t.pickDefined=function(e){if(!e)return;const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t},t.nextTick=function(){new Promise((e=>{setTimeout(e)}))}},8065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVisitors=void 0;const r=n(5220),i={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};t.normalizeVisitors=function(e,t){const n={any:{enter:[],leave:[]}};for(const e of Object.keys(t))n[e]={enter:[],leave:[]};n.ref={enter:[],leave:[]};for(const{ruleId:t,severity:n,visitor:r}of e)s({ruleId:t,severity:n},r,null);for(const e of Object.keys(n))n[e].enter.sort(((e,t)=>t.depth-e.depth)),n[e].leave.sort(((e,t)=>e.depth-t.depth));return n;function o(e,t,i,a,s=[]){if(s.includes(t))return;s=[...s,t];const l=new Set;for(const n of Object.values(t.properties))n!==i?"object"==typeof n&&null!==n&&n.name&&l.add(n):c(e,s);t.additionalProperties&&"function"!=typeof t.additionalProperties&&(t.additionalProperties===i?c(e,s):void 0!==t.additionalProperties.name&&l.add(t.additionalProperties)),t.items&&(t.items===i?c(e,s):void 0!==t.items.name&&l.add(t.items)),t.extensionsPrefix&&l.add(r.SpecExtension);for(const t of Array.from(l.values()))o(e,t,i,a,s);function c(e,t){for(const r of t.slice(1))n[r.name]=n[r.name]||{enter:[],leave:[]},n[r.name].enter.push(Object.assign(Object.assign({},e),{visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:a}}))}}function a(e,t){if(Array.isArray(t)){const n=t.find((t=>e[t]))||void 0;return n&&e[n]}return e[t]}function s(e,r,l,c=0){const u=Object.keys(t);if(0===c)u.push("any"),u.push("ref");else{if(r.any)throw new Error("any() is allowed only on top level");if(r.ref)throw new Error("ref() is allowed only on top level")}for(const p of u){const u=r[p]||a(r,i[p]),d=n[p];if(!u)continue;let f,h,m;const g="object"==typeof u;if("ref"===p&&g&&u.skip)throw new Error("ref() visitor does not support skip");"function"==typeof u?f=u:g&&(f=u.enter,h=u.leave,m=u.skip);const y={activatedOn:null,type:t[p],parent:l,isSkippedLevel:!1};if("object"==typeof u&&s(e,u,y,c+1),l&&o(e,l.type,t[p],l),f||g){if(f&&"function"!=typeof f)throw new Error("DEV: should be function");d.enter.push(Object.assign(Object.assign({},e),{visit:f||(()=>{}),skip:m,depth:c,context:y}))}if(h){if("function"!=typeof h)throw new Error("DEV: should be function");d.leave.push(Object.assign(Object.assign({},e),{visit:h,depth:c,context:y}))}}}}},9443:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkDocument=void 0;const r=n(7468),i=n(771),o=n(4182),a=n(5220);function s(e){var t,n;const r={};for(;e.parent;)(null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.location)&&(r[e.parent.type.name]=null===(n=e.parent.activatedOn)||void 0===n?void 0:n.value.location),e=e.parent;return r}t.walkDocument=function(e){const{document:t,rootType:n,normalizedVisitors:l,resolvedRefMap:c,ctx:u}=e,p={},d=new Set;!function e(t,n,f,h,m){var g,y,b,v,x,w,k,S,O,E,_;const A=(e,t=C.source.absoluteRef)=>{if(!(0,r.isRef)(e))return{location:f,node:e};const n=(0,o.makeRefId)(t,e.$ref),i=c.get(n);if(!i)return{location:void 0,node:void 0};const{resolved:a,node:s,document:l,nodePointer:u,error:p}=i;return{location:a?new r.Location(l.source,u):p instanceof o.YamlParseError?new r.Location(p.source,""):void 0,node:s,error:p}},j=f;let C=f;const{node:P,location:T,error:R}=A(t),I=new Set;if((0,r.isRef)(t)){const e=l.ref.enter;for(const{visit:r,ruleId:i,severity:o,context:a}of e)I.add(a),r(t,{report:$.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:j,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:L.bind(void 0,i)},{node:P,location:T,error:R}),(null==T?void 0:T.source.absoluteRef)&&u.refTypes&&u.refTypes.set(null==T?void 0:T.source.absoluteRef,n)}if(void 0!==P&&T&&"scalar"!==n.name){C=T;const o=null===(y=null===(g=p[n.name])||void 0===g?void 0:g.has)||void 0===y?void 0:y.call(g,P);let s=!1;const c=l.any.enter.concat((null===(b=l[n.name])||void 0===b?void 0:b.enter)||[]),u=[];for(const{context:e,visit:r,skip:a,ruleId:l,severity:p}of c){if(d.has(C.pointer))break;if(e.isSkippedLevel)!e.parent.activatedOn||e.parent.activatedOn.value.nextLevelTypeActivated||e.seen.has(t)||(e.seen.add(t),s=!0,u.push(e));else if(e.parent&&e.parent.activatedOn&&(null===(v=e.activatedOn)||void 0===v?void 0:v.value.withParentNode)!==e.parent.activatedOn.value.node&&(null===(x=e.parent.activatedOn.value.nextLevelTypeActivated)||void 0===x?void 0:x.value)!==n||!e.parent&&!o){u.push(e);const o={node:P,location:T,nextLevelTypeActivated:null,withParentNode:null===(k=null===(w=e.parent)||void 0===w?void 0:w.activatedOn)||void 0===k?void 0:k.value.node,skipped:null!==(E=(null===(O=null===(S=e.parent)||void 0===S?void 0:S.activatedOn)||void 0===O?void 0:O.value.skipped)||(null==a?void 0:a(P,m,{location:f,rawLocation:j,resolve:A,rawNode:t})))&&void 0!==E&&E};e.activatedOn=(0,i.pushStack)(e.activatedOn,o);let c=e.parent;for(;c;)c.activatedOn.value.nextLevelTypeActivated=(0,i.pushStack)(c.activatedOn.value.nextLevelTypeActivated,n),c=c.parent;o.skipped||(s=!0,I.add(e),N(r,P,t,e,l,p))}}if(s||!o)if(p[n.name]=p[n.name]||new Set,p[n.name].add(P),Array.isArray(P)){const t=n.items;if(void 0!==t)for(let n=0;n!i.includes(e)))):n.extensionsPrefix&&i.push(...Object.keys(P).filter((e=>e.startsWith(n.extensionsPrefix)))),(0,r.isRef)(t)&&i.push(...Object.keys(t).filter((e=>"$ref"!==e&&!i.includes(e))));for(const o of i){let i=P[o],s=T;void 0===i&&(i=t[o],s=f);let l=n.properties[o];void 0===l&&(l=n.additionalProperties),"function"==typeof l&&(l=l(i,o)),void 0===l&&n.extensionsPrefix&&o.startsWith(n.extensionsPrefix)&&(l=a.SpecExtension),!(0,a.isNamedType)(l)&&(null==l?void 0:l.directResolveAs)&&(l=l.directResolveAs,i={$ref:i}),l&&void 0===l.name&&!1!==l.resolvable&&(l={name:"scalar",properties:{}}),(0,a.isNamedType)(l)&&("scalar"!==l.name||(0,r.isRef)(i))&&e(i,l,s.child([o]),P,o)}}const h=l.any.leave,R=((null===(_=l[n.name])||void 0===_?void 0:_.leave)||[]).concat(h);for(const e of u.reverse())if(e.isSkippedLevel)e.seen.delete(P);else if(e.activatedOn=(0,i.popStack)(e.activatedOn),e.parent){let t=e.parent;for(;t;)t.activatedOn.value.nextLevelTypeActivated=(0,i.popStack)(t.activatedOn.value.nextLevelTypeActivated),t=t.parent}for(const{context:e,visit:n,ruleId:r,severity:i}of R)!e.isSkippedLevel&&I.has(e)&&N(n,P,t,e,r,i)}if(C=f,(0,r.isRef)(t)){const e=l.ref.leave;for(const{visit:r,ruleId:i,severity:o,context:a}of e)I.has(a)&&r(t,{report:$.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:j,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:L.bind(void 0,i)},{node:P,location:T,error:R})}function N(e,t,r,i,o,a){e(t,{report:$.bind(void 0,o,a),resolve:A,rawNode:r,location:C,rawLocation:j,type:n,parent:h,key:m,parentLocations:s(i),oasVersion:u.oasVersion,ignoreNextVisitorsOnNode:()=>{d.add(C.pointer)},getVisitorData:L.bind(void 0,o)},function(e){var t;const n={};for(;e.parent;)n[e.parent.type.name]=null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.node,e=e.parent;return n}(i),i)}function $(e,t,n){const r=(n.location?Array.isArray(n.location)?n.location:[n.location]:[Object.assign(Object.assign({},C),{reportOnKey:!1})]).map((e=>Object.assign(Object.assign(Object.assign({},C),{reportOnKey:!1}),e))),i=n.forceSeverity||t;"off"!==i&&u.problems.push(Object.assign(Object.assign({ruleId:n.ruleId||e,severity:i},n),{suggest:n.suggest||[],location:r}))}function L(e){return u.visitorsData[e]=u.visitorsData[e]||{},u.visitorsData[e]}}(t.parsed,n,new r.Location(t.source,"#/"),void 0,"")}},5019:function(e,t,n){var r=n(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(u)):[]};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join("\\").split(o).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,o=n.body,a=n.post,s=i.split(",");s[s.length-1]+="{"+o+"}";var l=p(a);return a.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function m(e,t){return e>=t}function g(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var o=i.pre,s=i.post.length?g(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l=0;if(!w&&!k)return i.post.match(/,.*\}/)?g(e=i.pre+"{"+i.body+a+i.post):[e];if(w)y=i.body.split(/\.\./);else if(1===(y=p(i.body)).length&&1===(y=g(y[0],!1).map(d)).length)return s.map((function(e){return i.pre+y[0]+e}));if(w){var S=c(y[0]),O=c(y[1]),E=Math.max(y[0].length,y[1].length),_=3==y.length?Math.abs(c(y[2])):1,A=h;O0){var R=new Array(T+1).join("0");P=C<0?"-"+R+P.slice(1):R+P}}b.push(P)}}else{b=[];for(var I=0;I(g(t),!(!n.nocomment&&"#"===t.charAt(0))&&new v(t,n).match(e));e.exports=r;const i=n(5751);r.sep=i.sep;const o=Symbol("globstar **");r.GLOBSTAR=o;const a=n(5019),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c=l+"*?",u=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),p=u("().*{}+?[]^$\\!"),d=u("[.("),f=/\/+/;r.filter=(e,t={})=>(n,i,o)=>r(n,e,t);const h=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};r.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return r;const t=r,n=(n,r,i)=>t(n,r,h(e,i));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}}).defaults=n=>t.defaults(h(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,h(e,r)),n.defaults=n=>t.defaults(h(e,n)),n.makeRe=(n,r)=>t.makeRe(n,h(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),n.match=(n,r,i)=>t.match(n,r,h(e,i)),n},r.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(g(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)),g=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");r.makeRe=(e,t)=>new v(e,t||{}).makeRe(),r.match=(e,t,n={})=>{const r=new v(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const b=e=>e.replace(/[[\]\\]/g,"\\$&");class v{constructor(e,t){g(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(f))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r>> no match, partial?",e,d,t,f),d!==s))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(i===s&&a===l)return!0;if(i===s)return n;if(a===l)return i===s-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){g(e);const n=this.options;if("**"===e){if(!n.noglobstar)return o;e="*"}if(""===e)return"";let r="",i=!1,a=!1;const u=[],f=[];let h,m,v,x,w=!1,k=-1,S=-1,O="."===e.charAt(0),E=n.dot||O;const _=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",A=()=>{if(h){switch(h){case"*":r+=c,i=!0;break;case"?":r+=l,i=!0;break;default:r+="\\"+h}this.debug("clearStateChar %j %j",h,r),h=!1}};for(let t,o=0;o(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,v,r);const t="*"===v.type?c:"?"===v.type?l:"\\"+v.type;i=!0,r=r.slice(0,v.reStart)+t+"\\("+e}A(),a&&(r+="\\\\");const j=d[r.charAt(0)];for(let e=f.length-1;e>-1;e--){const n=f[e],i=r.slice(0,n.reStart),o=r.slice(n.reStart,n.reEnd-8);let a=r.slice(n.reEnd);const s=r.slice(n.reEnd-8,n.reEnd)+a,l=i.split(")").length,c=i.split("(").length-l;let u=a;for(let e=0;ee.replace(/\\(.)/g,"$1"))(e);const C=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",C),{_glob:e,_src:r})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"";let i=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===o?o:e._src)).reduce(((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e)),[]),e.forEach(((t,r)=>{t===o&&e[r-1]!==o&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=o))})),e.filter((e=>e!==o)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);const r=this.set;let o;this.debug(this.pattern,"set",r);for(let t=e.length-1;t>=0&&(o=e[t],!o);t--);for(let i=0;i=0&&c>0){if(e===t)return[l,c];for(r=[],o=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?s=[r.pop(),c]:((i=r.pop())=0?l:c;r.length&&(s=[o,a])}return s}e.exports=t,t.range=r},472:function(e,t,n){"use strict";var r=n(4663);e.exports=function(e,t){return e?void t.then((function(t){r((function(){e(null,t)}))}),(function(t){r((function(){e(t)}))})):t}},4663:function(e){"use strict";e.exports="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)}},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;tu;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),s=n(5417),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,p=6==e,d=7==e,f=5==e||p;return function(h,m,g,y){for(var b,v,x=o(h),w=i(x),k=r(m,g,3),S=a(w.length),O=0,E=y||s,_=t?E(h,S):n||d?E(h,0):void 0;S>O;O++)if((f||O in w)&&(v=k(b=w[O],O,x),e))if(t)_[O]=v;else if(v)switch(e){case 3:return!0;case 5:return b;case 6:return O;case 2:l.call(_,b)}else switch(e){case 4:return!1;case 7:l.call(_,b)}return p?-1:c||u?u:_}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,c=0;c=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),l=n(9920),c=n(4705);e.exports=function(e,t){var n,u,p,d,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(u in t){if(d=t[u],p=e.noTargetGet?(f=i(n,u))&&f.value:n[u],!c(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;l(d,p)}(e.sham||p&&p.sham)&&o(d,"sham",!0),a(n,u,d,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e,t,n){var r=n(7908),i={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return i.call(r(e),t)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),s=n(7854),l=n(111),c=n(8880),u=n(6656),p=n(5465),d=n(6200),f=n(3501),h="Object already initialized",m=s.WeakMap;if(a||p.state){var g=p.state||(p.state=new m),y=g.get,b=g.has,v=g.set;r=function(e,t){if(b.call(g,e))throw new TypeError(h);return t.facade=e,v.call(g,e,t),t},i=function(e){return y.call(g,e)||{}},o=function(e){return b.call(g,e)}}else{var x=d("state");f[x]=!0,r=function(e,t){if(u(e,x))throw new TypeError(h);return t.facade=e,c(e,x,t),t},i=function(e){return u(e,x)?e[x]:{}},o=function(e){return u(e,x)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},133:function(e,t,n){var r=n(7392),i=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),l=n(490),c=n(317),u=n(6200),p="prototype",d="script",f=u("IE_PROTO"),h=function(){},m=function(e){return"<"+d+">"+e+""},g=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g=r?function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):(t=c("iframe"),n="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete g[p][a[i]];return g()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[p]=i(e),n=new h,h[p]=null,n[f]=e):n=g(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},3070:function(e,t,n){var r=n(9781),i=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(7593),l=n(6656),c=n(4664),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},1156:function(e,t,n){var r=n(5656),i=n(8006).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},8006:function(e,t,n){var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},6324:function(e,t,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},1956:function(e,t,n){var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},288:function(e,t,n){"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(e,t,n){var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},1320:function(e,t,n){var r=n(7854),i=n(8880),o=n(6656),a=n(3505),s=n(2788),l=n(9909),c=l.get,u=l.enforce,p=String(String).split("String");(e.exports=function(e,t,n,s){var l,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(l=u(n)).source||(l.source=p.join("string"==typeof t?t:""))),e!==r?(c?!f&&e[t]&&(d=!0):delete e[t],d?e[t]=n:i(e,t,n)):d?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},3505:function(e,t,n){var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},8003:function(e,t,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:function(e,t,n){var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:function(e,t,n){var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},1400:function(e,t,n){var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:function(e,t,n){var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488);e.exports=function(e){return Object(r(e))}},7593:function(e,t,n){var r=n(111);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(e,t,n){var r=n(5112);t.f=r},5112:function(e,t,n){var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),l=n(3307),c=i("wks"),u=r.Symbol,p=l?u:u&&u.withoutSetter||a;e.exports=function(e){return o(c,e)&&(s||"string"==typeof c[e])||(s&&o(u,e)?c[e]=u[e]:c[e]=p("Symbol."+e)),c[e]}},2222:function(e,t,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),l=n(7466),c=n(6135),u=n(5417),p=n(1194),d=n(5112),f=n(7392),h=d("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",y=f>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),b=p("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!b},{concat:function(e){var t,n,r,i,o,a=s(this),p=u(a,0),d=0;for(t=-1,r=arguments.length;tm)throw TypeError(g);for(n=0;n=m)throw TypeError(g);c(p,d++,o)}return p.length=d,p}})},3706:function(e,t,n){var r=n(7854);n(8003)(r.JSON,"JSON",!0)},408:function(e,t,n){n(8003)(Math,"Math",!0)},1539:function(e,t,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},1299:function(e,t,n){var r=n(2109),i=n(7854),o=n(8003);r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},2443:function(e,t,n){n(7235)("asyncIterator")},1817:function(e,t,n){"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(6656),s=n(111),l=n(3070).f,c=n(9920),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var p={},d=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof d?new u(e):void 0===e?u():u(e);return""===e&&(p[t]=!0),t};c(d,u);var f=d.prototype=u.prototype;f.constructor=d;var h=f.toString,m="Symbol(test)"==String(u("test")),g=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(p,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},2401:function(e,t,n){n(7235)("hasInstance")},8722:function(e,t,n){n(7235)("isConcatSpreadable")},2165:function(e,t,n){n(7235)("iterator")},2526:function(e,t,n){"use strict";var r=n(2109),i=n(7854),o=n(5005),a=n(1913),s=n(9781),l=n(133),c=n(3307),u=n(7293),p=n(6656),d=n(3157),f=n(111),h=n(9670),m=n(7908),g=n(5656),y=n(7593),b=n(9114),v=n(30),x=n(1956),w=n(8006),k=n(1156),S=n(5181),O=n(1236),E=n(3070),_=n(5296),A=n(8880),j=n(1320),C=n(2309),P=n(6200),T=n(3501),R=n(9711),I=n(5112),N=n(6061),$=n(7235),L=n(8003),D=n(9909),M=n(2092).forEach,F=P("hidden"),z="Symbol",U="prototype",B=I("toPrimitive"),q=D.set,W=D.getterFor(z),V=Object[U],H=i.Symbol,Y=o("JSON","stringify"),G=O.f,Q=E.f,X=k.f,K=_.f,Z=C("symbols"),J=C("op-symbols"),ee=C("string-to-symbol-registry"),te=C("symbol-to-string-registry"),ne=C("wks"),re=i.QObject,ie=!re||!re[U]||!re[U].findChild,oe=s&&u((function(){return 7!=v(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=G(V,t);r&&delete V[t],Q(e,t,n),r&&e!==V&&Q(V,t,r)}:Q,ae=function(e,t){var n=Z[e]=v(H[U]);return q(n,{type:z,tag:e,description:t}),s||(n.description=t),n},se=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},le=function(e,t,n){e===V&&le(J,t,n),h(e);var r=y(t,!0);return h(n),p(Z,r)?(n.enumerable?(p(e,F)&&e[F][r]&&(e[F][r]=!1),n=v(n,{enumerable:b(0,!1)})):(p(e,F)||Q(e,F,b(1,{})),e[F][r]=!0),oe(e,r,n)):Q(e,r,n)},ce=function(e,t){h(e);var n=g(t),r=x(n).concat(fe(n));return M(r,(function(t){s&&!ue.call(n,t)||le(e,t,n[t])})),e},ue=function(e){var t=y(e,!0),n=K.call(this,t);return!(this===V&&p(Z,t)&&!p(J,t))&&(!(n||!p(this,t)||!p(Z,t)||p(this,F)&&this[F][t])||n)},pe=function(e,t){var n=g(e),r=y(t,!0);if(n!==V||!p(Z,r)||p(J,r)){var i=G(n,r);return!i||!p(Z,r)||p(n,F)&&n[F][r]||(i.enumerable=!0),i}},de=function(e){var t=X(g(e)),n=[];return M(t,(function(e){p(Z,e)||p(T,e)||n.push(e)})),n},fe=function(e){var t=e===V,n=X(t?J:g(e)),r=[];return M(n,(function(e){!p(Z,e)||t&&!p(V,e)||r.push(Z[e])})),r};l||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e),n=function(e){this===V&&n.call(J,e),p(this,F)&&p(this[F],t)&&(this[F][t]=!1),oe(this,t,b(1,e))};return s&&ie&&oe(V,t,{configurable:!0,set:n}),ae(t,e)},j(H[U],"toString",(function(){return W(this).tag})),j(H,"withoutSetter",(function(e){return ae(R(e),e)})),_.f=ue,E.f=le,O.f=pe,w.f=k.f=de,S.f=fe,N.f=function(e){return ae(I(e),e)},s&&(Q(H[U],"description",{configurable:!0,get:function(){return W(this).description}}),a||j(V,"propertyIsEnumerable",ue,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),M(x(ne),(function(e){$(e)})),r({target:z,stat:!0,forced:!l},{for:function(e){var t=String(e);if(p(ee,t))return ee[t];var n=H(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!se(e))throw TypeError(e+" is not a symbol");if(p(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?v(e):ce(v(e),t)},defineProperty:le,defineProperties:ce,getOwnPropertyDescriptor:pe}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:de,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:u((function(){S.f(1)}))},{getOwnPropertySymbols:function(e){return S.f(m(e))}}),Y&&r({target:"JSON",stat:!0,forced:!l||u((function(){var e=H();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(f(t)||void 0!==e)&&!se(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!se(t))return t}),i[1]=t,Y.apply(null,i)}}),H[U][B]||A(H[U],B,H[U].valueOf),L(H,z),T[F]=!0},6066:function(e,t,n){n(7235)("matchAll")},9007:function(e,t,n){n(7235)("match")},3510:function(e,t,n){n(7235)("replace")},1840:function(e,t,n){n(7235)("search")},6982:function(e,t,n){n(7235)("species")},2159:function(e,t,n){n(7235)("split")},6649:function(e,t,n){n(7235)("toPrimitive")},9341:function(e,t,n){n(7235)("toStringTag")},543:function(e,t,n){n(7235)("unscopables")},8260:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y,.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y{opacity:.6}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x:hover>.ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x{background-color:#999;height:11px}.ps__rail-y:hover>.ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style: none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ps{overflow:auto!important}}\n","",{version:3,sources:["webpack://./node_modules/perfect-scrollbar/css/perfect-scrollbar.css"],names:[],mappings:"AAGA,IACE,yBAAA,CACA,oBAAA,CACA,uBAAA,CACA,iBAAA,CACA,qBAAA,CAMF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,WAAA,CAEA,QAAA,CAEA,iBAAA,CAGF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,UAAA,CAEA,OAAA,CAEA,iBAAA,CAGF,oDAEE,aAAA,CACA,4BAAA,CAGF,oJAME,UAAA,CAGF,kJAME,qBAAA,CACA,UAAA,CAMF,aACE,qBAAA,CAnEF,iBAAA,CAqEE,6DAAA,CACA,qEAAA,CACA,UAAA,CAEA,UAAA,CAEA,iBAAA,CAGF,aACE,qBAAA,CA/EF,iBAAA,CAiFE,4DAAA,CACA,oEAAA,CACA,SAAA,CAEA,SAAA,CAEA,iBAAA,CAGF,oGAGE,qBAAA,CACA,WAAA,CAGF,oGAGE,qBAAA,CACA,UAAA,CAIF,qCACE,IACE,uBAAA,CAAA,CAIJ,wEACE,IACE,uBAAA,CAAA",sourcesContent:["/*\n * Container style\n */\n.ps {\n overflow: hidden !important;\n overflow-anchor: none;\n -ms-overflow-style: none;\n touch-action: auto;\n -ms-touch-action: auto;\n}\n\n/*\n * Scrollbar rail styles\n */\n.ps__rail-x {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n height: 15px;\n /* there must be 'bottom' or 'top' for ps__rail-x */\n bottom: 0px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-y {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n width: 15px;\n /* there must be 'right' or 'left' for ps__rail-y */\n right: 0;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps--active-x > .ps__rail-x,\n.ps--active-y > .ps__rail-y {\n display: block;\n background-color: transparent;\n}\n\n.ps:hover > .ps__rail-x,\n.ps:hover > .ps__rail-y,\n.ps--focus > .ps__rail-x,\n.ps--focus > .ps__rail-y,\n.ps--scrolling-x > .ps__rail-x,\n.ps--scrolling-y > .ps__rail-y {\n opacity: 0.6;\n}\n\n.ps .ps__rail-x:hover,\n.ps .ps__rail-y:hover,\n.ps .ps__rail-x:focus,\n.ps .ps__rail-y:focus,\n.ps .ps__rail-x.ps--clicking,\n.ps .ps__rail-y.ps--clicking {\n background-color: #eee;\n opacity: 0.9;\n}\n\n/*\n * Scrollbar thumb styles\n */\n.ps__thumb-x {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, height .2s ease-in-out;\n -webkit-transition: background-color .2s linear, height .2s ease-in-out;\n height: 6px;\n /* there must be 'bottom' for ps__thumb-x */\n bottom: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__thumb-y {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, width .2s ease-in-out;\n -webkit-transition: background-color .2s linear, width .2s ease-in-out;\n width: 6px;\n /* there must be 'right' for ps__thumb-y */\n right: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-x:hover > .ps__thumb-x,\n.ps__rail-x:focus > .ps__thumb-x,\n.ps__rail-x.ps--clicking .ps__thumb-x {\n background-color: #999;\n height: 11px;\n}\n\n.ps__rail-y:hover > .ps__thumb-y,\n.ps__rail-y:focus > .ps__thumb-y,\n.ps__rail-y.ps--clicking .ps__thumb-y {\n background-color: #999;\n width: 11px;\n}\n\n/* MS supports */\n@supports (-ms-overflow-style: none) {\n .ps {\n overflow: auto !important;\n }\n}\n\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n .ps {\n overflow: auto !important;\n }\n}\n"],sourceRoot:""}]),t.Z=a},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n2?r:e).apply(void 0,i)}}e.memoize=a,e.debounce=s,e.bind=l,e.default={memoize:a,debounce:s,bind:l}},void 0===(r=n.apply(t,[t]))||(e.exports=r)},7856:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=k(Array.prototype.forEach),p=k(Array.prototype.pop),d=k(Array.prototype.push),f=k(String.prototype.toLowerCase),h=k(String.prototype.toString),m=k(String.prototype.match),g=k(String.prototype.replace),y=k(String.prototype.indexOf),b=k(String.prototype.trim),v=k(RegExp.prototype.test),x=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=i(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function O(t){const n=s(null);for(const[r,o]of e(t))void 0!==i(t,r)&&(n[r]=o);return n}function E(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const _=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),A=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),T=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=o(["#text"]),I=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),N=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),L=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=a(/<%[\w\W]*|[\w\W]*%>/gm),F=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),B=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=a(/^html$/i);var H=Object.freeze({__proto__:null,MUSTACHE_EXPR:D,ERB_EXPR:M,TMPLIT_EXPR:F,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:W,DOCTYPE_NAME:V});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:i}=n;const a=i,l=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:w,Node:k,Element:D,NodeFilter:M,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:U,trustedTypes:q}=n,W=D.prototype,G=E(W,"cloneNode"),Q=E(W,"nextSibling"),X=E(W,"childNodes"),K=E(W,"parentNode");if("function"==typeof w){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let Z,J="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=i,{importNode:ie}=a;let oe={};r.isSupported="function"==typeof e&&"function"==typeof K&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:se,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de}=H;let{IS_ALLOWED_URI:fe}=H,he=null;const me=S({},[..._,...A,...j,...P,...R]);let ge=null;const ye=S({},[...I,...N,...$,...L]);let be=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,xe=null,we=!0,ke=!0,Se=!1,Oe=!0,Ee=!1,_e=!1,Ae=!1,je=!1,Ce=!1,Pe=!1,Te=!1,Re=!0,Ie=!1,Ne=!0,$e=!1,Le={},De=null;const Me=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const ze=S({},["audio","video","img","source","image","track"]);let Ue=null;const Be=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let He=Ve,Ye=!1,Ge=null;const Qe=S({},[qe,We,Ve],h);let Xe=null;const Ke=["application/xhtml+xml","text/html"];let Ze=null,Je=null;const et=i.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=O(e),Xe=Xe=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Xe?h:f,he="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):me,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):ye,Ge="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,h):Qe,Ue="ADD_URI_SAFE_ATTR"in e?S(O(Be),e.ADD_URI_SAFE_ATTR,Ze):Be,Fe="ADD_DATA_URI_TAGS"in e?S(O(ze),e.ADD_DATA_URI_TAGS,Ze):ze,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Me,ve="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},xe="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,_e=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Te=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Re=!1!==e.SANITIZE_DOM,Ie=e.SANITIZE_NAMED_PROPS||!1,Ne=!1!==e.KEEP_CONTENT,$e=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||B,He=e.NAMESPACE||Ve,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(ke=!1),Pe&&(Ce=!0),Le&&(he=S({},[...R]),ge=[],!0===Le.html&&(S(he,_),S(ge,I)),!0===Le.svg&&(S(he,A),S(ge,N),S(ge,L)),!0===Le.svgFilters&&(S(he,j),S(ge,N),S(ge,L)),!0===Le.mathMl&&(S(he,P),S(ge,$),S(ge,L))),e.ADD_TAGS&&(he===me&&(he=O(he)),S(he,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===ye&&(ge=O(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Ue,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Me&&(De=O(De)),S(De,e.FORBID_CONTENTS,Ze)),Ne&&(he["#text"]=!0),_e&&S(he,["html","head","body"]),he.table&&(S(he,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,J=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(q,l)),null!==Z&&"string"==typeof J&&(J=Z.createHTML(""));o&&o(e),Je=e}},rt=S({},["mi","mo","mn","ms","mtext"]),it=S({},["foreignobject","desc","title","annotation-xml"]),ot=S({},["title","style","font","a","script"]),at=S({},A);S(at,j),S(at,C);const st=S({},P);S(st,T);const lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Pe)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(je)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&He===Ve&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(He===Ve)try{t=(new U).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(He,"template",null);try{t.documentElement.innerHTML=Ye?J:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),He===Ve?re.call(t,_e?"html":"body")[0]:_e?t.documentElement:o},pt=function(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},dt=function(e){return"function"==typeof k&&e instanceof k},ft=function(e,t,n){oe[e]&&u(oe[e],(e=>{e.call(r,t,n,Je)}))},ht=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof z&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof F)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const i=Ze(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:i,allowedTags:he}),e.hasChildNodes()&&!dt(e.firstElementChild)&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return lt(e),!0;if(!he[i]||ve[i]){if(!ve[i]&>(i)){if(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,i))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(i))return!1}if(Ne&&!De[i]){const t=K(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),Q(e))}return lt(e),!0}return e instanceof D&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:He,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ge[e.namespaceURI]&&(e.namespaceURI===We?t.namespaceURI===Ve?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(at[n]):e.namespaceURI===qe?t.namespaceURI===Ve?"math"===n:t.namespaceURI===We?"math"===n&&it[r]:Boolean(st[n]):e.namespaceURI===Ve?!(t.namespaceURI===We&&!it[r])&&!(t.namespaceURI===qe&&!rt[r])&&!st[n]&&(ot[n]||!at[n]):!("application/xhtml+xml"!==Xe||!Ge[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ae,se,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},mt=function(e,t,n){if(Re&&("id"===t||"name"===t)&&(n in i||n in et))return!1;if(ke&&!xe[t]&&v(ce,t));else if(we&&v(ue,t));else if(!ge[t]||xe[t]){if(!(gt(e)&&(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&v(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Ue[t]);else if(v(fe,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Fe[e])if(Se&&!v(pe,g(n,de,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},yt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=Ze(a);let d="value"===a?l:b(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ct(a,e),!n.keepAttr)continue;if(!Oe&&v(/\/>/i,d)){ct(a,e);continue}Ee&&u([ae,se,le],(e=>{d=g(d,e," ")}));const f=Ze(e.nodeName);if(mt(f,c,d)){if(!Ie||"id"!==c&&"name"!==c||(ct(a,e),d="user-content-"+d),Z&&"object"==typeof q&&"function"==typeof q.getAttributeType)if(s);else switch(q.getAttributeType(f,c)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),p(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const r=pt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof c&&e(n.content),yt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,o=null,s=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!dt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||nt(t),r.removed=[],"string"==typeof e&&($e=!1),$e){if(e.nodeName){const t=Ze(e.nodeName);if(!he[t]||ve[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof k)n=ut("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Ce&&!Ee&&!_e&&-1===e.indexOf("<"))return Z&&Te?Z.createHTML(e):e;if(n=ut(e),!n)return Ce?null:Te?J:""}n&&je&<(n.firstChild);const l=pt($e?e:n);for(;o=l.nextNode();)ht(o)||(o.content instanceof c&&bt(o.content),yt(o));if($e)return e;if(Ce){if(Pe)for(s=ne.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ge.shadowroot||ge.shadowrootmode)&&(s=ie.call(a,s,!0)),s}let p=_e?n.outerHTML:n.innerHTML;return _e&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&v(V,n.ownerDocument.doctype.name)&&(p="\n"+p),Ee&&u([ae,se,le],(e=>{p=g(p,e," ")})),Z&&Te?Z.createHTML(p):p},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ae=!0},r.clearConfig=function(){Je=null,Ae=!1},r.isValidAttribute=function(e,t,n){Je||nt({});const r=Ze(e),i=Ze(t);return mt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],d(oe[e],t))},r.removeHook=function(e){if(oe[e])return p(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},3825:function(e){e.exports={}},6729:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);iu.depthLimit)return void s(t,e,r,a);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void s(t,e,r,a);if(o.push(e),Array.isArray(e))for(p=0;pt?1:0}function u(e,t,n,a){void 0===a&&(a=o());var s,l=p(e,"",0,[],void 0,0,a)||e;try{s=0===i.length?JSON.stringify(l,t,n):JSON.stringify(l,d(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function p(e,i,o,a,l,u,d){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;fd.depthLimit)return void s(t,e,i,l);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void s(t,e,i,l);if(a.push(e),Array.isArray(e))for(f=0;f0)for(var r=0;r=55296&&r<=56319&&t+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function H(e){return/^\n* /.test(e)}var Y=1,G=2,Q=3,X=4,K=5;function Z(e,t,n,r,o){e.dump=function(){if(0===t.length)return e.quotingType===D?'""':"''";if(!e.noCompatMode&&(-1!==N.indexOf(t)||$.test(t)))return e.quotingType===D?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,i,o,a,s){var c,p,d=0,I=null,N=!1,$=!1,L=-1!==r,M=-1,F=B(p=V(e,0))&&p!==l&&!U(p)&&p!==w&&p!==E&&p!==k&&p!==x&&p!==A&&p!==j&&p!==P&&p!==R&&p!==m&&p!==y&&p!==v&&p!==f&&p!==T&&p!==S&&p!==O&&p!==b&&p!==h&&p!==g&&p!==_&&p!==C&&function(e){return!U(e)&&e!==k}(V(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!B(d=V(e,c)))return K;F=F&&W(d,I,s),I=d}else{for(c=0;c=65536?c+=2:c++){if((d=V(e,c))===u)N=!0,L&&($=$||c-M-1>r&&" "!==e[M+1],M=c);else if(!B(d))return K;F=F&&W(d,I,s),I=d}$=$||L&&c-M-1>r&&" "!==e[M+1]}return N||$?n>9&&H(e)?K:a?o===D?K:G:$?X:Q:!F||a||i(e)?o===D?K:G:Y}(t,c,e.indent,s,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+J(t,e.indent)+ee(F(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,te(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],c=r[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+te(c,t),s=n}return a}(t,s),a));case K:return'"'+function(e){for(var t,n="",r=0,i=0;i=65536?i+=2:i++)r=V(e,i),!(t=I[r])&&B(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||L(r);return n}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function J(e,t){var n=H(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function ee(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function te(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function ne(e,t,n,r){var i,o,a,s="",l=e.tag;for(i=0,o=n.length;i tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function ie(e,t,n,r,o,s,l){e.tag=null,e.dump=n,re(e,n,!1)||re(e,n,!0);var c,p=a.call(e.dump),d=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var f,h,m="[object Object]"===p||"[object Array]"===p;if(m&&(h=-1!==(f=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&t>0)&&(o=!1),h&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(m&&h&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),"[object Object]"===p)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,c,p,d="",f=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=h.length;o1024)&&(e.dump&&u===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,c&&(p+=z(e,t)),ie(e,t+1,l,!0,c)&&(e.dump&&u===e.dump.charCodeAt(0)?p+=":":p+=": ",d+=p+=e.dump));e.tag=f,e.dump=d||"{}"}(e,t,e.dump,o),h&&(e.dump="&ref_"+f+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ie(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if("[object Array]"===p)r&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?ne(e,t-1,e.dump,o):ne(e,t,e.dump,o),h&&(e.dump="&ref_"+f+e.dump)):(function(e,t,n){var r,i,o,a="",s=e.tag;for(r=0,i=n.length;r",e.dump=c+" "+e.dump)}return!0}function oe(e,t){var n,r,i=[],o=[];for(ae(e,i,o),n=0,r=o.length;n>10),56320+(e-65536&1023))}for(var j=new Array(256),C=new Array(256),P=0;P<256;P++)j[P]=_(P)?1:0,C[P]=_(P);function T(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function R(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=o(n),new i(t,n)}function I(e,t){throw R(e,t)}function N(e,t){e.onWarning&&e.onWarning.call(null,R(e,t))}var $={YAML:function(e,t,n){var r,i,o;null!==e.version&&I(e,"duplication of %YAML directive"),1!==n.length&&I(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&I(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&I(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&N(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&I(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],b.test(r)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),s.call(e.tagMap,r)&&I(e,'there is a previously declared suffix for "'+r+'" tag handle'),v.test(i)||I(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){I(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function L(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function q(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),45===r)&&S(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,z(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,H(e,t,u,!1,!0),a.push(e.result),z(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)I(e,"bad indentation of a sequence entry");else if(e.lineIndentt?T=1:e.lineIndent===t?T=0:e.lineIndentt?T=1:e.lineIndent===t?T=0:e.lineIndentt)&&(v&&(a=e.line,s=e.lineStart,l=e.position),H(e,t,p,!0,i)&&(v?y=e.result:b=e.result),v||(M(e,h,m,g,y,b,a,s,l),g=y=b=null),z(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)I(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?I(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?I(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(k(a)){do{a=e.input.charCodeAt(++e.position)}while(k(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!w(a)&&0!==a)}for(;0!==a;){for(F(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),w(a))m++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=E(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:I(e,"expected hexadecimal character");e.result+=A(o),e.position++}else I(e,"unknown escape sequence");n=r=e.position}else w(s)?(L(e,n,r,!0),B(e,z(e,!1,t)),n=r=e.position):e.position===e.lineStart&&U(e)?I(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}I(e,"unexpected end of the stream within a double quoted scalar")}(e,_)?N=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!S(r)&&!O(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&I(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),s.call(e.anchorMap,n)||I(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],z(e,!0,-1),!0}(e)?(N=!0,null===e.tag&&null===e.anchor||I(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,c,u,p=e.kind,d=e.result;if(S(u=e.input.charCodeAt(e.position))||O(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(S(r=e.input.charCodeAt(e.position+1))||n&&O(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(S(r=e.input.charCodeAt(e.position+1))||n&&O(r))break}else if(35===u){if(S(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&U(e)||n&&O(u))break;if(w(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,z(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(L(e,i,o,!1),B(e,e.line-s),i=o=e.position,a=!1),k(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return L(e,i,o,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,_,l===n)&&(N=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===T&&(N=g&&q(e,P))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&I(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),y=0,b=e.implicitTypes.length;y"),null!==e.result&&x.kind!==e.kind&&I(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):I(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||N}function Y(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(z(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!S(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&I(e,"directive name must not be less than one character in length");0!==i;){for(;k(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!w(i));break}if(w(i))break;for(t=e.position;0!==i&&!S(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&F(e),s.call($,n)?$[n](e,n,r):N(e,'unknown document directive "'+n+'"')}z(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,z(e,!0,-1)):a&&I(e,"directives end mark is expected"),H(e,e.lineIndent-1,p,!1,!0),z(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(o,e.position))&&N(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&U(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,z(e,!0,-1)):e.positions&&(t=r-s+(o=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function o(e,t){return r.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,a=/\r?\n|\r|\0/g,s=[0],l=[],c=-1;n=a.exec(e.buffer);)l.push(n.index),s.push(n.index+n[0].length),e.position<=n.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,l.length).toString().length,h=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=i(e.buffer,s[c-u],l[c-u],e.position-(s[c]-s[c-u]),h),d=r.repeat(" ",t.indent)+o((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=i(e.buffer,s[c],l[c],e.position,h),d+=r.repeat(" ",t.indent)+o((e.line+1).toString(),f)+" | "+p.str+"\n",d+=r.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=l.length);u++)p=i(e.buffer,s[c+u],l[c+u],e.position-(s[c]-s[c+u]),h),d+=r.repeat(" ",t.indent)+o((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")}},1364:function(e,t,n){"use strict";var r=n(8425),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},3531:function(e,t,n){"use strict";var r=n(1364),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=i;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=i,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|a.indexOf(r.charAt(t));return 0==(n=o%4*6)?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===n?(l.push(s>>10&255),l.push(s>>2&255)):12===n&&l.push(s>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,s=i;for(t=0;t>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]),o=(o<<8)+e[t];return 0==(n=a%3)?(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]):2===n?(r+=s[o>>10&63],r+=s[o>>4&63],r+=s[o<<2&63],r+=s[64]):1===n&&(r+=s[o>>2&63],r+=s[o<<4&63],r+=s[64],r+=s[64]),r}})},8771:function(e,t,n){"use strict";var r=n(1364);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},5215:function(e,t,n){"use strict";var r=n(8347),i=n(1364),o=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},1518:function(e,t,n){"use strict";var r=n(8347),i=n(1364);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},945:function(e,t,n){"use strict";var r=n(1364);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},7452:function(e,t,n){"use strict";var r=n(1364);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},151:function(e,t,n){"use strict";var r=n(1364);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},1605:function(e,t,n){"use strict";var r=n(1364),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],c=e;for(t=0,n=c.length;tc))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,f=!0,h=n&o?new Ae:void 0;for(s.set(e,t),s.set(t,e);++d-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},_e.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(de||Ee),string:new Oe}},_e.prototype.delete=function(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t},_e.prototype.get=function(e){return $e(this,e).get(e)},_e.prototype.has=function(e){return $e(this,e).has(e)},_e.prototype.set=function(e,t){var n=$e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,r),this},Ae.prototype.has=function(e){return this.__data__.has(e)},je.prototype.clear=function(){this.__data__=new Ee,this.size=0},je.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},je.prototype.get=function(e){return this.__data__.get(e)},je.prototype.has=function(e){return this.__data__.has(e)},je.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _e(r)}return n.set(e,t),this.size=n.size,this};var De=le?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,o=0,a=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Qe=F?function(e){return function(t){return e(t)}}(F):function(e){return Ge(e)&&He(e.length)&&!!P[Pe(e)]};function Xe(e){return null!=(t=e)&&He(t.length)&&!Ve(t)?function(e,t){var n=qe(e),r=!n&&Be(e),i=!n&&!r&&We(e),o=!n&&!r&&!i&&Qe(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,a=function a(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),o=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,l=0;a=Array.prototype.slice.call(a);var c=function(){--s<=0&&o(l)};s||c(),a.forEach((function(t){e.matches(t,i.exclude)?c():i.onIframeReady(t,(function(e){n(t)&&(l++,r(e)),c()}),c)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach((function(e,t){e.val===n&&(i=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o=this,a=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0;p=void 0,p=o.getIteratorNode(a),u=p.prevNode,c=p.node;)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(c,u,e,s)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return l.push(e)}),r)})),l.push(c);var p;l.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(s,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),a=o.length;a||i(),o.forEach((function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,(function(){--a<=0&&i()}))};r.iframes?r.waitForIframes(o,s):s()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every((function(t){return!r.call(e,t)||(i=!0,!1)})),i}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==a&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(a)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(a)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach((function(i){n.every((function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="string"==typeof n?[]:n.limiters,o="";switch(i.forEach((function(e){o+="|"+t.escapeStr(e)})),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(o="\\s"+(o||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+o+"]*)";case"exactly":return"(^|\\s"+o+")("+e+")(?=$|\\s"+o+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,a=i.end;i.valid&&(e.start=o,e.length=a-o,n.push(e),r=a)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,a=t-o,s=parseInt(e.start,10)-a;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=i.textContent,i.parentNode.replaceChild(a,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every((function(a,s){var l=e.nodes[s+1];if(void 0===l||l.start>t){if(!r(a.node))return!1;var c=t-a.start,u=(n>a.end?a.end:n)-a.start,p=e.value.substr(0,a.start),d=e.value.substr(u+a.start);if(a.node=o.wrapRangeInTextNode(a.node,c,u),e.value=p+d,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=u),e.nodes[n].end-=u)})),n-=u,i(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[a];)if(n(i[a],t)){var s=i.index;if(0!==a)for(var l=1;l1&&console.warn("Replacing with",t),m++}}else{let i=u(l(t,e[n]));if(a.verbose>1&&console.warn((!1===i?f.colour.red:f.colour.green)+"Fragment resolution",e[n],f.colour.normal),!1===i){if(r.parent[r.pkey]={},a.fatal){let t=new Error("Fragment $ref resolution failed "+e[n]);if(!a.promise)throw t;a.promise.reject(t)}}else m++,r.parent[r.pkey]=i,h[e[n]]=r.path.replace("/%24ref","")}else if(p.protocol){let t=o.resolve(i,e[n]).toString();a.verbose>1&&console.warn(f.colour.yellow+"Rewriting external url ref",e[n],"as",t,f.colour.normal),e["x-miro"]=e[n],a.externalRefs[e[n]]&&(a.externalRefs[t]||(a.externalRefs[t]=a.externalRefs[e[n]]),a.externalRefs[t].failed=a.externalRefs[e[n]].failed),e[n]=t}else if(!e["x-miro"]){let t=o.resolve(i,e[n]).toString(),r=!1;a.externalRefs[e[n]]&&(r=a.externalRefs[e[n]].failed),r||(a.verbose>1&&console.warn(f.colour.yellow+"Rewriting external ref",e[n],"as",t,f.colour.normal),e["x-miro"]=e[n],e[n]=t)}}));return c(e,{},(function(e,t,n){d(e,t)&&void 0!==e.$fixed&&delete e.$fixed})),a.verbose>1&&console.warn("Finished fragment resolution"),e}function m(e,t){if(!t.filters||!t.filters.length)return e;for(let n of t.filters)e=n(e,t);return e}function g(e,t,n,a){var c=o.parse(n.source),p=n.source.split("\\").join("/").split("/");p.pop()||p.pop();let d="",f=t.split("#");f.length>1&&(d="#"+f[1],t=f[0]),p=p.join("/");let g=(y=o.parse(t).protocol,b=c.protocol,y&&y.length>2?y:b&&b.length>2?b:"file:");var y,b;let v;if(v="file:"===g?i.resolve(p?p+"/":"",t):o.resolve(p?p+"/":"",t),n.cache[v]){n.verbose&&console.warn("CACHED",v,d);let e=u(n.cache[v]),r=n.externalRef=e;if(d&&(r=l(r,d),!1===r&&(r={},n.fatal))){let e=new Error("Cached $ref resolution failed "+v+d);if(!n.promise)throw e;n.promise.reject(e)}return r=h(r,e,t,d,v,n),r=m(r,n),a(u(r),v,n),Promise.resolve(r)}if(n.verbose&&console.warn("GET",v,d),n.handlers&&n.handlers[g])return n.handlers[g](p,t,d,n).then((function(e){return n.externalRef=e,e=m(e,n),n.cache[v]=e,a(e,v,n),e})).catch((function(e){throw n.verbose&&console.warn(e),e}));if(g&&g.startsWith("http")){const e=Object.assign({},n.fetchOptions,{agent:n.agent});return n.fetch(v,e).then((function(e){if(200!==e.status){if(n.ignoreIOErrors)return n.verbose&&console.warn("FAILED",t),n.externalRefs[t].failed=!0,'{"$ref":"'+t+'"}';throw new Error(`Received status code ${e.status}: ${v}`)}return e.text()})).then((function(e){try{let r=s.parse(e,{schema:"core",prettyErrors:!0});if(e=n.externalRef=r,n.cache[v]=u(e),d&&!1===(e=l(e,d))&&(e={},n.fatal)){let e=new Error("Remote $ref resolution failed "+v+d);if(!n.promise)throw e;n.promise.reject(e)}e=m(e=h(e,r,t,d,v,n),n)}catch(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}return a(e,v,n),e})).catch((function(e){if(n.verbose&&console.warn(e),n.cache[v]={},!n.promise||!n.fatal)throw e;n.promise.reject(e)}))}{const e='{"$ref":"'+t+'"}';return function(e,t,n,i,o){return new Promise((function(a,s){r.readFile(e,t,(function(e,t){e?n.ignoreIOErrors&&o?(n.verbose&&console.warn("FAILED",i),n.externalRefs[i].failed=!0,a(o)):s(e):a(t)}))}))}(v,n.encoding||"utf8",n,t,e).then((function(e){try{let r=s.parse(e,{schema:"core",prettyErrors:!0});if(e=n.externalRef=r,n.cache[v]=u(e),d&&!1===(e=l(e,d))&&(e={},n.fatal)){let e=new Error("File $ref resolution failed "+v+d);if(!n.promise)throw e;n.promise.reject(e)}e=m(e=h(e,r,t,d,v,n),n)}catch(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}return a(e,v,n),e})).catch((function(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}))}}function y(e){return new Promise((function(t,n){(function(e){return new Promise((function(t,n){function r(t,n,r){if(t[n]&&d(t[n],"$ref")){let o=t[n].$ref;if(!o.startsWith("#")){let a="";if(!i[o]){let t=Object.keys(i).find((function(e,t,n){return o.startsWith(e+"/")}));t&&(e.verbose&&console.warn("Found potential subschema at",t),a="/"+(o.split("#")[1]||"").replace(t.split("#")[1]||""),a=a.split("/undefined").join(""),o=t)}if(i[o]||(i[o]={resolved:!1,paths:[],extras:{},description:t[n].description}),i[o].resolved)if(i[o].failed);else if(e.rewriteRefs){let r=i[o].resolvedAt;e.verbose>1&&console.warn("Rewriting ref",o,r),t[n]["x-miro"]=o,t[n].$ref=r+a}else t[n]=u(i[o].data);else i[o].paths.push(r.path),i[o].extras[r.path]=a}}}let i=e.externalRefs;if(e.resolver.depth>0&&e.source===e.resolver.base)return t(i);c(e.openapi.definitions,{identityDetection:!0,path:"#/definitions"},r),c(e.openapi.components,{identityDetection:!0,path:"#/components"},r),c(e.openapi,{identityDetection:!0},r),t(i)}))})(e).then((function(t){for(let n in t)if(!t[n].resolved){let r=e.resolver.depth;r>0&&r++,e.resolver.actions[r].push((function(){return g(e.openapi,n,e,(function(e,r,i){if(!t[n].resolved){let o={};o.context=t[n],o.$ref=n,o.original=u(e),o.updated=e,o.source=r,i.externals.push(o),t[n].resolved=!0}let o=Object.assign({},i,{source:"",resolver:{actions:i.resolver.actions,depth:i.resolver.actions.length-1,base:i.resolver.base}});i.patch&&t[n].description&&!e.description&&"object"==typeof e&&(e.description=t[n].description),t[n].data=e;let a=(s=t[n].paths,[...new Set(s)]);var s;a=a.sort((function(e,t){const n=e.startsWith("#/components/")||e.startsWith("#/definitions/"),r=t.startsWith("#/components/")||t.startsWith("#/definitions/");return n&&!r?-1:r&&!n?1:0}));for(let r of a)if(t[n].resolvedAt&&r!==t[n].resolvedAt&&r.indexOf("x-ms-examples/")<0)i.verbose>1&&console.warn("Creating pointer to data at",r),l(i.openapi,r,{$ref:t[n].resolvedAt+t[n].extras[r],"x-miro":n+t[n].extras[r]});else{t[n].resolvedAt?i.verbose>1&&console.warn("Avoiding circular reference"):(t[n].resolvedAt=r,i.verbose>1&&console.warn("Creating initial clone of data at",r));let o=u(e);l(i.openapi,r,o)}0===i.resolver.actions[o.resolver.depth].length&&i.resolver.actions[o.resolver.depth].push((function(){return y(o)}))}))}))}})).catch((function(t){e.verbose&&console.warn(t),n(t)}));let r={options:e};r.actions=e.resolver.actions[e.resolver.depth],t(r)}))}function b(e,t,n){e.resolver.actions.push([]),y(e).then((function(r){var i;(i=r.actions,i.reduce(((e,t)=>e.then((e=>t().then(Array.prototype.concat.bind(e))))),Promise.resolve([]))).then((function(){if(e.resolver.depth>=e.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),t(!0);e.resolver.depth++,e.resolver.actions[e.resolver.depth].length?setTimeout((function(){b(r.options,t,n)}),0):(e.verbose>1&&console.warn(f.colour.yellow+"Finished external resolution!",f.colour.normal),e.resolveInternal&&(e.verbose>1&&console.warn(f.colour.yellow+"Starting internal resolution!",f.colour.normal),e.openapi=p(e.openapi,e.original,{verbose:e.verbose-1}),e.verbose>1&&console.warn(f.colour.yellow+"Finished internal resolution!",f.colour.normal)),c(e.openapi,{},(function(t,n,r){d(t,n)&&(e.preserveMiro||delete t["x-miro"])})),t(e))})).catch((function(t){e.verbose&&console.warn(t),n(t)}))})).catch((function(t){e.verbose&&console.warn(t),n(t)}))}function v(e){if(e.cache||(e.cache={}),e.fetch||(e.fetch=a),e.source){let t=o.parse(e.source);(!t.protocol||t.protocol.length<=2)&&(e.source=i.resolve(e.source))}e.externals=[],e.externalRefs={},e.rewriteRefs=!0,e.resolver={},e.resolver.depth=0,e.resolver.base=e.source,e.resolver.actions=[[]]}e.exports={optionalResolve:function(e){return v(e),new Promise((function(t,n){e.resolve?b(e,t,n):t(e)}))},resolve:function(e,t,n){return n||(n={}),n.openapi=e,n.source=t,n.resolve=!0,v(n),new Promise((function(e,t){b(n,e,t)}))}}},1804:function(e){"use strict";function t(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}e.exports={getDefaultState:t,walkSchema:function e(n,r,i,o){if(void 0===i.depth&&(i=t()),null==n)return n;if(void 0!==n.$ref){let e={$ref:n.$ref};return i.allowRefSiblings&&n.description&&(e.description=n.description),o(e,r,i),e}if(i.combine&&(n.allOf&&Array.isArray(n.allOf)&&1===n.allOf.length&&delete(n=Object.assign({},n.allOf[0],n)).allOf,n.anyOf&&Array.isArray(n.anyOf)&&1===n.anyOf.length&&delete(n=Object.assign({},n.anyOf[0],n)).anyOf,n.oneOf&&Array.isArray(n.oneOf)&&1===n.oneOf.length&&delete(n=Object.assign({},n.oneOf[0],n)).oneOf),o(n,r,i),i.seen.has(n))return n;if("object"==typeof n&&null!==n&&i.seen.set(n,!0),i.top=!1,i.depth++,void 0!==n.items&&(i.property="items",e(n.items,n,i,o)),n.additionalItems&&"object"==typeof n.additionalItems&&(i.property="additionalItems",e(n.additionalItems,n,i,o)),n.additionalProperties&&"object"==typeof n.additionalProperties&&(i.property="additionalProperties",e(n.additionalProperties,n,i,o)),n.properties)for(let t in n.properties){let r=n.properties[t];i.property="properties/"+t,e(r,n,i,o)}if(n.patternProperties)for(let t in n.patternProperties){let r=n.patternProperties[t];i.property="patternProperties/"+t,e(r,n,i,o)}if(n.allOf)for(let t in n.allOf){let r=n.allOf[t];i.property="allOf/"+t,e(r,n,i,o)}if(n.anyOf)for(let t in n.anyOf){let r=n.anyOf[t];i.property="anyOf/"+t,e(r,n,i,o)}if(n.oneOf)for(let t in n.oneOf){let r=n.oneOf[t];i.property="oneOf/"+t,e(r,n,i,o)}return n.not&&(i.property="not",e(n.not,n,i,o)),i.depth--,n}}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(s+p))return n.slice(s+p+1);if(0===p)return n.slice(s+p)}else a>c&&(47===e.charCodeAt(i+p)?u=p:0===p&&(u=0));break}var d=e.charCodeAt(i+p);if(d!==n.charCodeAt(s+p))break;47===d&&(u=p)}var f="";for(p=i+u+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(s+u):(s+=u,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,o=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){i=r+1;break}}else-1===l&&(a=!1,l=r+1),s>=0&&(c===n.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===i&&(o=!1,i=s+1),46===l?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!o){r=s+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var a=-1,s=0,l=-1,c=!0,u=e.length-1,p=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===a?a=u:1!==p&&(p=1):-1!==a&&(p=-1);else if(!c){s=u+1;break}return-1===a||-1===l||0===p||1===p&&a===l-1&&a===s+1?-1!==l&&(n.base=n.name=0===s&&o?e.slice(1,l):e.slice(s,l)):(0===s&&o?(n.name=e.slice(1,a),n.base=e.slice(1,l)):(n.name=e.slice(s,a),n.base=e.slice(s,l)),n.ext=e.slice(a,l)),s>0?n.dir=e.slice(0,s-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},3450:function(e){e.exports=function(){var e=[],t=[],n={},r={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(t[0],(function(n,r){var i,o,s=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return a(""===n?e[r-1]:n,s)}))}function l(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var i=r.length;i--;){var o=r[i];if(o[0].test(t))return s(t,o)}return t}function c(e,t,n){return function(r){var i=r.toLowerCase();return t.hasOwnProperty(i)?a(r,i):e.hasOwnProperty(i)?a(r,e[i]):l(i,r,n)}}function u(e,t,n,r){return function(r){var i=r.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&l(i,i,n)===i}}function p(e,t,n){return(n?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=c(i,r,e),p.isPlural=u(i,r,e),p.singular=c(r,i,t),p.isSingular=u(r,i,t),p.addPluralRule=function(t,n){e.push([o(t),n])},p.addSingularRule=function(e,n){t.push([o(e),n])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()},7874:function(){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,a=0;a>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean},5433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},6213:function(){!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism)},2731:function(){!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)},9016:function(){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(o),u=RegExp(l(i+" "+o+" "+a+" "+s)),p=l(o+" "+a+" "+s),d=l(i+" "+o+" "+s),f=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=r(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[p,g]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,b]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),k=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,y,b]),S={keyword:u,punctuation:/[<>()?,.:[\]]/},O=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,_=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,k]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:S},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:S},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:S},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[k,d,m]),inside:S}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:S},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[k,y]),inside:S,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[k]),lookbehind:!0,inside:S,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:S}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,m,k,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(k),greedy:!0,inside:S},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var A=E+"|"+O,j=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[A]),C=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[j]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,T=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,C]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,T]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[C]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var R=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[j]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,R]),$=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[A]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[$,R]);function D(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,R]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:D(N,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:D(L,$)}],char:{pattern:RegExp(O),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},7899:function(){Prism.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}},7046:function(){Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},57:function(){!function(e){function t(e){return RegExp("(^(?:"+e+"):[ \t]*(?![ \t]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var n,r=e.languages,i={"application/javascript":r.javascript,"application/json":r.json||r.javascript,"application/xml":r.xml,"text/xml":r.xml,"text/html":r.html,"text/css":r.css,"text/plain":r.plain},o={"application/json":!0,"application/xml":!0};function a(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-]))"}for(var s in i)if(i[s]){n=n||{};var l=o[s]?a(s):s;n[s.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+l+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:i[s]}}n&&e.languages.insertBefore("http","header",n)}(Prism)},2503:function(){!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},6841:function(){Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},6854:function(){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof o&&!o(e))return e;for(var i,s=a.length;-1!==n.code.indexOf(i=t(r,s));)++s;return a[s]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);!function a(s){for(var l=0;l=o.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[i],p=n.tokenStack[u],d="string"==typeof c?c:c.content,f=t(r,u),h=d.indexOf(f);if(h>-1){++i;var m=d.substring(0,h),g=new e.Token(r,e.tokenize(p,n.grammar),"language-"+r,p),y=d.substring(h+f.length),b=[];m&&b.push.apply(b,a([m])),b.push(g),y&&b.push.apply(b,a([y])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&a(c.content)}return s}(n.tokens)}}}})}(Prism)},4335:function(){Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},1426:function(){Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec},8246:function(){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism)},9945:function(){!function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)},366:function(){Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},2939:function(){Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}},9385:function(){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)},2886:function(){Prism.languages.scala=Prism.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),Prism.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:Prism.languages.scala}}},string:/[\s\S]+/}}}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function,delete Prism.languages.scala.constant},5266:function(){Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},874:function(){Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},3358:function(){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(o),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism)},5660:function(e,t,n){var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=p.reach);S+=k.value.length,k=k.next){var O=k.value;if(t.length>e.length)return;if(!(O instanceof o)){var E,_=1;if(b){if(!(E=a(w,S,e,y))||E.index>=e.length)break;var A=E.index,j=E.index+E[0].length,C=S;for(C+=k.value.length;A>=C;)C+=(k=k.next).value.length;if(S=C-=k.value.length,k.value instanceof o)continue;for(var P=k;P!==t.tail&&(Cp.reach&&(p.reach=N);var $=k.prev;if(R&&($=c(t,$,R),S+=R.length),u(t,$,_),k=c(t,$,new o(d,g?i.tokenize(T,g):T,v,T)),I&&c(t,k,I),_>1){var L={cause:d+","+h,reach:N};s(e,t,n,k.prev,S,L),p&&L.reach>p.reach&&(p.reach=L.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+o.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()}),!1),i):i;var p=i.util.currentScript();function d(){i.manual||i.highlightAll()}if(p&&(i.filename=p.src,p.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var f=document.readyState;"loading"===f||"interactive"===f&&p&&p.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",i="loaded",o="pre[data-src]:not(["+t+'="'+i+'"]):not(['+t+'="'+n+'"])';r.hooks.add("before-highlightall",(function(e){e.selector+=", "+o})),r.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(o)){a.code="",s.setAttribute(t,n);var l=s.appendChild(document.createElement("CODE"));l.textContent="Loading…";var c=s.getAttribute("data-src"),u=a.language;if("none"===u){var p=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[p]||p}r.util.setLanguage(l,u),r.util.setLanguage(s,u);var d=r.plugins.autoloader;d&&d.loadLanguages(u),function(e,n,o){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4==a.readyState&&(a.status<400&&a.responseText?function(e){s.setAttribute(t,i);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(n){var o=e.split(/\r\n?|\n/g),a=n[0],c=null==n[1]?o.length:n[1];a<0&&(a+=o.length),a=Math.max(0,Math.min(a-1,o.length)),c<0&&(c+=o.length),c=Math.max(0,Math.min(c,o.length)),e=o.slice(a,c).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}l.textContent=e,r.highlightElement(l)}(a.responseText):a.status>=400?o("✖ Error "+a.status+" while fetching file: "+a.statusText):o("✖ Error: File does not exist or is empty"))},a.send(null)}(c,0,(function(e){s.setAttribute(t,"failed"),l.textContent=e}))}})),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(o),i=0;t=n[i++];)r.highlightElement(t)}};var a=!1;r.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},2703:function(e,t,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),i=n(7418),o=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n