diff --git a/examples/swr-devtools-demo/pages/_app.tsx b/examples/swr-devtools-demo/pages/_app.tsx index 8e5b490..2151e90 100644 --- a/examples/swr-devtools-demo/pages/_app.tsx +++ b/examples/swr-devtools-demo/pages/_app.tsx @@ -20,13 +20,18 @@ const DevToolsArea = () => { ); }; +const fetcher = async (url) => { + const res = await fetch(url); + const json = await res.json(); + if (res.ok) { + return json; + } + throw new Error(json.message); +}; + function MyApp({ Component, pageProps }) { return ( - fetch(url).then((r) => r.json()), - }} - > + diff --git a/examples/swr-devtools-demo/pages/api/hello.ts b/examples/swr-devtools-demo/pages/api/hello.ts index c06fd5f..3ad7b18 100644 --- a/examples/swr-devtools-demo/pages/api/hello.ts +++ b/examples/swr-devtools-demo/pages/api/hello.ts @@ -4,5 +4,9 @@ let counter = 1; export default (req, res) => { ++counter; - res.status(200).json({ name: `Hello World ${counter}` }); + if (req.query.error) { + res.status(500).json({ message: "this is an error message" }); + } else { + res.status(200).json({ name: `Hello World ${counter}` }); + } }; diff --git a/examples/swr-devtools-demo/pages/index.tsx b/examples/swr-devtools-demo/pages/index.tsx index 7bf9872..330f9e5 100644 --- a/examples/swr-devtools-demo/pages/index.tsx +++ b/examples/swr-devtools-demo/pages/index.tsx @@ -5,7 +5,10 @@ import useSWR from "swr"; import { useEffect } from "react"; export default function Home() { - const { data, mutate } = useSWR("/api/hello"); + // const { data, mutate } = useSWR("/api/hello?error=true"); + const { data, mutate, error } = useSWR( + `/api/hello${typeof window !== "undefined" ? location.search : ""}` + ); const { data: data2 } = useSWR("/api/hello?foo"); useEffect(() => { @@ -36,7 +39,9 @@ export default function Home() {

/api/hello - {data ? data.name : "...loading"} + {!data && !error && ...loading} + {data && {data.name}} + {error && Error: {error.message}} (auto increment in 5 seconds)

diff --git a/examples/swr-devtools-demo/tsconfig.tsbuildinfo b/examples/swr-devtools-demo/tsconfig.tsbuildinfo deleted file mode 100644 index a68eee1..0000000 --- a/examples/swr-devtools-demo/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/next/dist/shared/lib/amp.d.ts","../../node_modules/next/amp.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/globals.global.d.ts","./node_modules/@types/node/index.d.ts","../../node_modules/next/dist/server/get-page-files.d.ts","../../node_modules/next/dist/compiled/webpack/webpack.d.ts","../../node_modules/next/dist/lib/load-custom-routes.d.ts","../../node_modules/next/dist/server/image-config.d.ts","../../node_modules/next/dist/server/config-shared.d.ts","../../node_modules/next/dist/server/config.d.ts","../../node_modules/@next/env/types/index.d.ts","../../node_modules/next/dist/shared/lib/mitt.d.ts","../../node_modules/next/dist/client/with-router.d.ts","../../node_modules/next/dist/client/router.d.ts","../../node_modules/next/dist/client/route-loader.d.ts","../../node_modules/next/dist/client/page-loader.d.ts","../../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.d.ts","../../node_modules/next/dist/shared/lib/router/router.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/styled-jsx/index.d.ts","../../node_modules/next/dist/server/api-utils.d.ts","../../node_modules/next/dist/server/web/next-url.d.ts","../../node_modules/next/dist/server/web/spec-extension/request.d.ts","../../node_modules/next/dist/server/web/spec-compliant/fetch-event.d.ts","../../node_modules/next/dist/server/web/spec-extension/fetch-event.d.ts","../../node_modules/next/dist/server/web/spec-extension/response.d.ts","../../node_modules/next/dist/server/web/types.d.ts","../../node_modules/next/dist/server/request-meta.d.ts","../../node_modules/next/dist/server/router.d.ts","../../node_modules/next/dist/server/font-utils.d.ts","../../node_modules/next/dist/server/load-components.d.ts","../../node_modules/next/dist/build/webpack/plugins/middleware-plugin.d.ts","../../node_modules/next/dist/shared/lib/router/utils/parse-url.d.ts","../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.d.ts","../../node_modules/next/dist/shared/lib/router/utils/parse-next-url.d.ts","../../node_modules/next/dist/build/index.d.ts","../../node_modules/next/dist/shared/lib/router/utils/route-regex.d.ts","../../node_modules/next/dist/shared/lib/router/utils/get-middleware-regex.d.ts","../../node_modules/next/dist/shared/lib/router/utils/route-matcher.d.ts","../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.d.ts","../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.d.ts","../../node_modules/next/dist/shared/lib/router/utils/index.d.ts","../../node_modules/next/dist/build/webpack/plugins/pages-manifest-plugin.d.ts","../../node_modules/next/dist/server/next-server.d.ts","../../node_modules/jest-worker/build/types.d.ts","../../node_modules/jest-worker/build/priorityqueue.d.ts","../../node_modules/jest-worker/build/fifoqueue.d.ts","../../node_modules/jest-worker/build/workers/messageparent.d.ts","../../node_modules/jest-worker/build/index.d.ts","../../node_modules/next/dist/lib/coalesced-function.d.ts","../../node_modules/next/dist/server/dev/static-paths-worker.d.ts","../../node_modules/next/dist/server/dev/next-dev-server.d.ts","../../node_modules/next/dist/server/next.d.ts","../../node_modules/next/types/index.d.ts","../../node_modules/next/dist/shared/lib/utils.d.ts","../../node_modules/next/dist/pages/_app.d.ts","../../node_modules/next/app.d.ts","../../node_modules/next/dist/shared/lib/runtime-config.d.ts","../../node_modules/next/config.d.ts","../../node_modules/next/dist/pages/_document.d.ts","../../node_modules/next/document.d.ts","../../node_modules/next/dist/shared/lib/dynamic.d.ts","../../node_modules/next/dynamic.d.ts","../../node_modules/next/dist/pages/_error.d.ts","../../node_modules/next/error.d.ts","../../node_modules/next/dist/shared/lib/head.d.ts","../../node_modules/next/head.d.ts","../../node_modules/next/dist/client/image.d.ts","../../node_modules/next/image.d.ts","../../node_modules/next/dist/client/link.d.ts","../../node_modules/next/link.d.ts","../../node_modules/next/router.d.ts","../../node_modules/next/dist/client/script.d.ts","../../node_modules/next/script.d.ts","../../node_modules/next/server.d.ts","../../node_modules/next/types/global.d.ts","../../node_modules/next/index.d.ts","../../node_modules/next/image-types/global.d.ts","./next-env.d.ts","./pages/api/hello.ts","./pages/api/list.ts","../../node_modules/swr/dist/constants/revalidate-events.d.ts","../../node_modules/swr/dist/types.d.ts","../../node_modules/swr/dist/utils/config.d.ts","../../node_modules/swr/dist/use-swr.d.ts","../../node_modules/swr/dist/utils/use-swr-config.d.ts","../../node_modules/swr/dist/index.d.ts","../../packages/swr-devtools/lib/swrdevtools.d.ts","../../packages/swr-devtools/lib/index.d.ts","../../packages/swr-devtools-panel/lib/components/swrdevtoolpanel.d.ts","../../packages/swr-devtools-panel/lib/index.d.ts","./pages/_app.tsx","../../node_modules/@types/hoist-non-react-statics/index.d.ts","../../node_modules/@types/styled-components/index.d.ts","./pages/_document.tsx","./pages/index.tsx","../../node_modules/swr/infinite/dist/infinite/types.d.ts","../../node_modules/swr/infinite/dist/infinite/index.d.ts","./pages/infinite.tsx","../../node_modules/@types/har-format/index.d.ts","../../node_modules/@types/chrome/har-format/index.d.ts","../../node_modules/@types/filewriter/index.d.ts","../../node_modules/@types/filesystem/index.d.ts","../../node_modules/@types/chrome/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/scheduler/index.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/experiments.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/manifest.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/extensiontypes.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/events.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/activitylog.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/alarms.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/bookmarks.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/runtime.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/windows.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/tabs.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/action.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/browseraction.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/types.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/browsersettings_colormanagement.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/browsersettings.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/browsingdata.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/captiveportal.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/clipboard.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/commands.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/contentscripts.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/contextualidentities.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/cookies.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/declarativecontent.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/devtools_inspectedwindow.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/devtools_network.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/devtools_panels.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/devtools.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/dns.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/downloads.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/extension.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/find.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/geckoprofiler.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/history.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/i18n.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/identity.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/idle.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/management.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/menus.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/contextmenus.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/networkstatus.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/normandyaddonstudy.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/notifications.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/omnibox.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/pageaction.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/permissions.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/pkcs11.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/privacy_network.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/privacy_services.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/privacy_websites.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/privacy.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/webrequest.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/proxy.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/scripting.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/search.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/sessions.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/sidebaraction.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/storage.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/theme.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/topsites.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/urlbar.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/userscripts.d.ts","../../node_modules/@types/webextension-polyfill/namespaces/webnavigation.d.ts","../../node_modules/@types/webextension-polyfill/index.d.ts","../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"6adbf5efd0e374ff5f427a4f26a5a413e9734eee5067a0e86da69aea41910b52","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"fe58262f1f3f9a83431292bef0cdbf508a20391eb7533df424dcdc624a9001bd","05fd364b8ef02fb1e174fbac8b825bdb1e5a36a016997c8e421f5fab0a6da0a0",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"dc5f6951bbf5b544349cbdef895c08dee6929818abd27d7d53c38cf1209091b3","affectsGlobalScope":true},"64e2803203b14d7f104f570f2152fde13abb6edc17b2ddb33d81ad86cf43d494","2c8d9e3331aec52d9a6d4040352c00282c3abaf48053ed0944528a4845c9caa3","9b2a8f604e7c0482a9061755f00b287cc99bd8718dc82d8207dd74c599b6dc43","d0fc76a91c828fbe3f0be5d683273634b7b101068333ceed975a8a9ac464137b",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","64576aba4ff801004122056ccd049f0597aa471dcfd7670a6a0b877ee8dd97c0","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"cc829932ffaf5c49092f878bec18af1fa5d8591b45a45e2b7f757f793cb3b4ed","47db10fdc4e76c4f4598cf7c91ba6bfde6cf6d8082c51860fe751643bf359739","05d7d95e24bc2897bf20ce041c3dc3cca814e07148a93999145b1a0ad491094c","d1080e49778c0b2ce656042ebfa43f89dffb96ac00f86a34762188a21857ffd4","0ce99c641ea20b0c0c09d093fc28f18f5ab31dc80033707a1ac3154399de2559","f0c33a0b325d3499cc9aded7d32886f998c9a27b465097c6cc136944d0aafdaa","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","03c91e8833eef54dc44db99d7deb469b5e3cec82f23054b4286a2380e0e00996","1606ea615c0a5ea9f5c1376a33e34c0e1112e8dee31a5b3b8a74ce781893aa6f","9fef9de633d01cb7f01f68195626a890ededd25cf96a1e785617d08c8668230d","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"bf89ceb26132596b859cd4d129ce3f447134b444dec87966ba65cd7e8e9e0cb0","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","a11d4ba43bf0825d7285d54dec6cb951685cd458a4de3c5c1800f7cbf7799009","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","82e1723b20fa0b15a7da0d1a03fec88348f82f640f7a2f308d6c0fac780cfc7c","e0202c3e09775b86b902f21623e55896cea98750efbdf0691ca7473af06fe551","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce","a2666b43d889b4882ac6ede1c48128bac351886854e94f832b20d3730e5062c5","7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"2a7d39ea70e483d3ebcde44031b6552940f295349bee8d486e8bdf6380162302","714bc11c4ece2d28d6b70207fcefce4651c138cc77ce0b8147a6bab25c66b67a","72cd580decc682538544d8507f98c38c9201f83da228d2a0c170bcaa0937a829","08935635053203ba941035573962605b91376318dbce19e97c71354f2241e0e9","4f24a713856fef84913f851b9a6929570e2417c1c949634958db3cae98f54066","5ce82d5f52e03a0198ee588c3cc2f850823f5c6e230af9744c21a8618d5c5adf","562e66c29f4c43b32c203ca892cd6d5b6fa8e70954d23b4d0e2db0eb3d6b698e","764f5b39a73fd6371e5a118ee037b685cec4ff2fc3579225eb57d0f82a38ab18","2766dee26ea113e9b491b7842cb44df57c4d79b17057b42607e09fc174bd411d","93865b0723d744eab9c00bfe7a8ccd962d1f6a2047e4c7eecd18482ef8b87e8a","72c88123ada80953914b43a0d9810bb0ce8e5b25cd8b7965bfb6842ffff74f05",{"version":"95853a3d1b9b7330c5d0fdcf6a34a205afa9f0de7fbc6a41ea7c5d2f789c84c1","affectsGlobalScope":true},{"version":"954ba49fa08a42afc900d18fcb4e7a1ed77d6d8931907a65c98c92b64605f8af","affectsGlobalScope":true},"2b4fdbc425984dc7a29c4fce80f656698363f3c9cde55fbe26e620bd3fe0da13",{"version":"a0f2339319c97a62cbd6944974bf8c413cd6c2c3868dde1c6fb6c5ca5117f42f","affectsGlobalScope":true},"45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","b514b82ee3ee4e33b40987d35ffeccfdf0cc050f9c4af29e04b50e54b5fb757c","3d0f430227f44476d4c66b603d0b7d126422a2e8978965e156f0028c6bbec9e7","f5c59784bf096818f0b727abcde077f36222da03a6664cf67152846f8bc6d112","54e13c4c7ed6ea7f1e8d05628bbc3dfa338b60ef02f2abc2f501c8711cfbc3e7","32d358fd780dfe77e0840129f0fa6bd04e59e2a8d324df42574903933e6d92b9","565f7a20504444ff94c7c2c36d83d49562e64ca46dc377e266a85ca015a77468","ae38d9472d9572bf669178fb88d1b90cf19787ce9fd97d4d253f3fde7edb52a8","70238fc242892671ae10cb50ee6b65ca044f6899f7ad3d661eddacdd48a23c43","5d7e0d8f75012b66c3d505af116568163ccd415a3b59ce51bc751d7797cc5f73","d57766da0e70a20dbff6d4f4a2ab77793302817e46f5d7ea0677cf9c9c9e0537","dd1b2492877b4d5b42fc2724d18d9805248efc5648be6ebea3c70b8bbff0a804","a2495db5f46921bbf7ebf294e0683df709f2be4d9468aa3fe2137edb5a63a03e","9008d7962fe1298800f99c5ff093d407d034bc6cadc4610cff4f7ce597d5a115","6e5f5cee603d67ee1ba6120815497909b73399842254fc1e77a0d5cdc51d8c9c","19feb76bded29cc201568f945579b8fdf6f127362934f1ba0a77a9e7143e9b99","61c414ea61cce0b5320f203678d6a0c72befad0163bfa1004df9cedfdce73985","764c0ff937e55cc5ffcfd989d461565fe50193d7e4231f68800625346e992136","ddae6e637e160dceec077487bbd9176f4a8c60b46596a86fafd3bbd1882f6232","6c129db1dc74f8a65d99f01dd9f08fe3712817b770c6fb9ff1d7686288c8d3b3","e990bfb110c37fa629d8679ac8bba89d36a566d2c0984ab0190a70e4d54f5576","d2d90639077deb5644ec7cee738126779eff847692d95ebcd9f76d6ef2f08cec","d2bd714b146c0c6c27a0bc9f16c96522ef1c829923fad14b6a33e2580a012323","9ff3163c1203fb6197f0224e546eccabd46d7892c2b2d77ff6719f304c77ab90","a8c3c3a27e8c7b93d5bec55beeb89f31c293c516e9139f4cc2eb60f5a06acd89","a6abab5f1ce40e5f2b3334aa34f38c721cebf6f3041528cf3446cf7ac2c068ef","fd0fcae20ed9dc7772bb99ba8673d89dfe512a97e8add514109f26024eefd3d1","c3e00ce4fb229d582ffcd9804e9383fb4b0aa28e2e3104bc60028372235e99df","28e5c78011a0c6a600cea81302120a3dc03fc51985f5d62040f13741f88402a9","57fe65cfb85484565fa2c56e6a905fb4c8d655223baf91175244ce4fc60c07dd","a2e4ecb8a75e93bc4df780fe3efca1727f7cc1f42060fc87c05b75a7fcab7cb4","0aef0a60e229dfeff49f68bf941d24b8338fc3d55aa7c64b1c9acbf9d3a67b46","e25cff2dda1894e35fb32d05a7d467f31c24455745ee4e7893bd2d15f2432f50","02c21069f19ba8f90a18aabe472b595bf45fe82435bda19ee498ffea831968b2","a387099dbd53d45f841d6f571716fcd942b4655caba54533953e7334afc599e5",{"version":"68883138d1fbe09c3b8456411c9b7cbae9df330cd371b9d713252a63788a7d8f","affectsGlobalScope":true},"a1c51942cc3e4e476dc8fe5246bd0ff393f5fcacd8e8a5674345232c551dd92f","6148e1cba85721ace8b3e29fae4d745b20434faec2ada3b26e9a91b9f983fce2","65c24a8baa2cca1de069a0ba9fba82a173690f52d7e2d0f1f7542d59d5eb4db0","b7fff2d004c5879cae335db8f954eb1d61242d9f2d28515e67902032723caeab","8303df69e9d100e3df8f2d67ec77348cb6494dc406356fdd9b56e61aa7c3c758","238f4bd8542cebfc0a575940f962a3c0383acda009561e60b69eec06419a40b5","4545c1a1ceca170d5d83452dd7c4994644c35cf676a671412601689d9a62da35","65b0842cef0bce65a00d4fc230c6c00b2a57542952c906ea84f4e4c825af9da0","a2d648d333cf67b9aeac5d81a1a379d563a8ffa91ddd61c6179f68de724260ff","05e5c9d6f902ab5d1eaf9e3fc566623882bf40f652b0b27e94778866175a76f3","a3f41ed1b4f2fc3049394b945a68ae4fdefd49fa1739c32f149d32c0545d67f5","c2489c80994d62e5b51370a6f02f537db4c37af5f914fcb5b2755b81f1906cae","47699512e6d8bebf7be488182427189f999affe3addc1c87c882d36b7f2d0b0e","34670c01de092a885144a33e65bede90bcd53f47b842189a74459f54fc949884","42c686ce08bf5576ed178f4a6a62d1b580d941334fb53bdff7054e0980f2dc75","ec676b2cb5cbc5532f3070c53eb560ff0564bd9843c688d6d6a488c1dfcdf48e","cdf21eee8007e339b1b9945abf4a7b44930b1d695cc528459e68a3adc39a622e","1d079c37fa53e3c21ed3fa214a27507bda9991f2a41458705b19ed8c2b61173d","31a08c9a8c836291d60d0426f1a5404941c4480d62dfb2fd912de0aae9959e9a","5835a6e0d7cd2738e56b671af0e561e7c1b4fb77751383672f4b009f4e161d70","6a95a81a7ff77b3e3b0c3d6cf943c3b9822f89e68db532176681734fcc78d965",{"version":"fd83ea3cad04f68eec8410c4a614b78899b9b19efc2327189950f52d2f54219c","affectsGlobalScope":true},"b2d48b68756afa0d35400ee55b838fde7fb8af24374c912311312e6e279b2eba",{"version":"d0d8bf23d0f82c4d630a05c27b993bbdbc2c372186f51a61aac48bd2cb306ec1","affectsGlobalScope":true},"9269d492817e359123ac64c8205e5d05dab63d71a3a7a229e68b5d9a0e8150bf","5397e52ef8be0e2e9f3c08b588979b6bb81c79aa7d52224052d6ce262a2cae5e","4acdf4557736c141e24f114b75043ca70681db2be3764e7f89d90b33d295d215","417e6f7a6942cbe58f1fbe2698a6536eb3e494432aa7b79fb9ccb38910531769","d35c7fdce8462f5e4d6a0b58983f9b2c0d97d9b7e009ecb9bf4fb6f104e31816","85767476d049597dedda5b2ecfd96b6c78e2a564ecbd03fdb9d9d431a9ff458a","7f857b80cdc609e86bd26ce6366900236338d4a9c1ea6f752c3c8e615267c659","fdd339734a8fecc64523859f7b343d9aa112b9dd95912c96c84cee760b82fcbd","68f17696d1ee88bd1d3f4c64f5a328ee410bdf757f9be6eeb751d8649852c56b","f7091c4e43f5071d4e34c8cd84789e6a5bf3b65c16c2659e09e820214c7b9236","ebe5f25cd9f5e2e4ee38943d15bfb67b47cd7288c8dcf581800a2dd8a04bf78a","b481cf5b5c5a3f4c5ccee50fc2f94489bcf39236e210889f8d10eed8e361e048","57d0f6814f4d2684a8e255058960303f0ed1cf3d3e87d0e2222b2001ba7fb9c3","47336d17f9ce17c61283d910303da7b81d369cd17328cf21236b8b6dd2941612","bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4",{"version":"aa72705b134c5670e0282c6b016e493b0ad924170e5be966c0ec990d69c55b7b","affectsGlobalScope":true},"38f8c0b5c429f2f89a7fe5afbb2c0b3d726148c07d39b5961c25ef40e22b8254","e8a9f5bad6d41b03b19009b240d083070583d759591de2def438e3de55d96cc1","4339965ce6e96508ebbb8858ff6d4c08f77bb5f9ea8fc28dfab589791bc4ff6e","1be7188c594044a6104ae3d3bfe44413447a6943af96097b65ccbb2455c2fe3e","f401ee02ae5b5c5477ab3047704a175c5f6573cc817f02b4ab0619000b1f7c2c","edaff827b058523df8cfb6d7812a5084afa6648d4ff5fb01351da8eafe2f0232",{"version":"be7abf1df570aea13a80f9e26c48e4ec51ee5b5c807326fc730eadba8a118905","affectsGlobalScope":true},{"version":"b63a86ef33f79196f0af1ddfbefbf2ec6860daa4bd34bb8f6cdf0adc69c2fb1c","affectsGlobalScope":true},{"version":"b61b844b8d784ccf5131fe9780ce8ada9a5ae2f89919e4ac241dbca817dfd980","affectsGlobalScope":true},{"version":"1e62bfec1ca6de729f220865bf1e0185ff2436c2de5186cbb812d68a33cd1c2e","affectsGlobalScope":true},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","7d7c8ef7d48a035142c07dae60545ecc0e4af4c337742760cb09726f2f8e31db","a93f2966a163982b102e5bfec0a1d0a5317f6e56ab8d59051236fffd9f675b99","82772e5d55062a042a2715a555d347275a663940926fc785705eb082010cb9f6","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","e02c20c0ad70b61bf63126117dcc2ed62bc25689990c44283642ebed04e39503","85d0b0def2a3b9a56aa3a80bcbb46ab8f05743250816c56a32e3ff9331460062","15920b35080dd61c99c42521fff8b107657fe829e1287308d95c1daef3f80970","1b99ed6d26e490a6fc7e8cde152691a1d3c741e0fd10b900d31e3c69a18268a6","b0dc38e3196f442b99ba0b39ae0fb2991a252befaccfc58c9bf6fc5501ada8ed","e7995e5a25ed9495d9031d3fd7d47ee7866cc9beffea4904daec301632cf5d4a","6b9a7368224daa569c19681a28917eb3d32e7f017684ff87768bbc7062008c09","40f89c4f4cce20a399eb9e8b73b15588a2094831664a26e2dc48db6c876fde28","64a53818a7dcc334c00795f83858af303fc0078e8854e8dd24e7f2563c0c6b40","914ca324f4e5291f1aefbd798824a6df1b4008682bdba9671199935f76985c3f","88fa6b7b093ad4906839822e87cccc1ffe66c71c35a2ecd0d89f4ddd36c4a29e","9ca22ceddce10369ce61f497989209402f6e741a4b7b09a61141020dc2e935cd","7b5ed554905a84815eb7c5c8e65de4f6aaa54f8ef9f6a464ee55a98263b5a68f","c467a2bf23c2ed325f3ec77759a5ecec9b394ab59af3c1c51e25976817853555","d9496e97c77ee8cbfa4bb9ac417e1f77271dfd895c948122e01a731860caca5b","2cc14671912be0dca3a29fabf233ab7a6cfd5b983fc1241c7a8d602c516f6ea2","08a3dc5927f8889db69274c84c4e68a0e009be46ae0661ab81010bc49692225c","326ae8e0bc14a733f2d20080dc372cebf6006f150925d64c6618da58735be6ef","8e8be697307a8a61fd2b28dd283494af65fe5dfc4a32bd4186b43519f5d8011e","8da91de5d1cc9501059eb6575f9d4608b7ae605e41d7ee7a42af4d8982e9289c","45fae79f415038b9c5a949a51dde45c24771626914cac8ae8381b8d5b592f859","9a84fc717febb18ea0c1df1c6f0b3e53d5f72d1a59aa22767ce9e97bc9d14362","c490d767dbe9cebe20bb32a58cdb540f9878dd1bba453fbb1b644c4619d15223","6d9e4528d1e71c6c68f4b9f1a15dcfa8194a7bf1f5f50e95154a1240b0237a7c","b140f2524ea328a3be144c2591aac4b953365755a793f124b1a30de943b85045","58b5d8dd5eb3c796c86dbf1ca03450cbac21eef8d98bfc0e44e2fea5b49ac8e7","3809bbb61841639a4c3fb10019bfba9eba183990e48b95a5cb19e640894c5fc5","92eff80bb43f9f47eddbb3400f60ea8cecaa0f7bfe1c7ff0c2963cc46af4c869","bd5bbdad897d3e978605bc4e704cc9f912ac7fcd78f7592ac41e693046d51f43","cfe5105cd9b5baba8c8a082d54c4eb170951b012c870eaa89dffc62f1b8293d4","37886c3376bcc55eaef72cb6d32277380f6821be2005dcdf612a5897e862bf65","6933879e7987faae7567d50440984cbe7a1afcd5e0ec43f9d28a94c485b29246","b432cdbf2a0d07c02626c46a0eb0dbafed303f4793e43e6a1f9f90a7bdf9b1e8","1bb6388344fa310be636fd4c656d7e293ecfab59b02e99c060aa297e7307a671","7658a31dca53465b7536186d7893302379f90ba1c739347bdea687420ddabe59","cf91230a97321cac8549ef3f47701bbcfb42d1a3b310326c4687a29bf4424bb3","ba17c2b50d38a8afe6563db3f20904d7227918e33d5e2f053e70d0bde5a499d1","7213fb1c52283af1821eef924823fef93e2682f3b96f84e56980b14fc1d19d6e","9cc2ba1396a7333471ec9914937dc6ed3b97188a013e5912f55155ca2966170c","ec72783c6a1aa127e65b7defeff45a93f753bb9048f494132d508984e3b79197","32e989afb6e1be9d7b277d9495ade0f299e3eb34153c5703b7cec0e594719517","06f908f6bce5f7aae6d916dc8054baf4a545a52b3bd7ccac75243cb0abf00298","11729d0032b131b0d794830f8ae3eb8b957ac577348f04e392d2f693f1c40ce5","e445051eb924ac10c3c8d29c52d73ac4aac4b498cb4335c05f9a2902d4400155","6f14f95cf406bd9ce99f41f9474638b5696cfd98fa4a38e57b29151c86453c5d","509adf251ee2e791f7af46f16a22cc26918e65c28b67f596236ff1cb87bd0a13","37c559e11d57202553a9ad685abbfd1c1378533192de8fa7c414d065f0714b12","c01750e28965f22e4d3b8da842db8d76c13917645953178eb3aa3050866fadf6","952c98d711d7919408883c1bbaba6b19a5a77f5d22676a321a1da4bf22d46fa7","ed12715e2c2aec98fc9737fa004494a2a43e30cb1bbdb97f7e11f04744f1be69","ab0af5094f92da9191b966a73af2ff2a6efc885033bc3aab8acbb74e496daae8","a1edf52f9a33b5c4d2afa13c465d1ea3bb4e25e2eb04a45cf6bb7161381b2783","cd04bef4054756739889269fd37e25bf8cb4f3cce282c511a650cf6f6074c3b5","436f60017d571a618bd2f1e603f8d3191b678b12c482a6374b9b85100cbaed9b","9c942a4c51b48e34265468584561224f6270453249f25560d95aa7a74bf54a2c","4cca78ac45c51d6a121bb74a6ab79970cb92c0d38146da168ea268ba64a06f21","c6b7cedd2f0a78e9802725bf3b776dd94647bf5a241649e359f2fac09366bfcd","3d7610d292c18159d7082d219ae06c7ae893f47904da354dc474bc87aa07bff6","242e48e021765e0c96da0a383180ee82e78a39b067716ad7c864fa5d8bd8ca02","e9c34fae7521e25d356c30b9afe54de9299391d6ebae9075152d330563dd6588","854c6158cf06dbcbe2d166bc832359d8e68aa401f24ed73464afc31ca71e92c6","4df889faa635f4f292bb08994c3c87fb44fe5bb13af7d53c9ed33d224deabffd","8d05b82a46d9308156e0562468d76dd83791b86aaec8ecb3d92eb750c142eb42","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"esModuleInterop":true,"jsx":1,"module":99,"skipLibCheck":true,"strict":false,"target":1},"fileIdsList":[[170,171],[54],[56],[57],[58,66,67,74,83],[58,59,66,74],[60,90],[61,62,67,75],[62,83],[63,64,66,74],[64],[65,66],[66],[66,67,68,83,89],[67,68],[69,74,83,89],[66,67,69,70,74,83,86,89],[69,71,83,86,89],[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],[66,72],[73,89],[64,66,74,83],[75],[76],[56,77],[78,88],[79],[80],[66,81],[81,82,90,92],[66,83],[84],[85],[74,86],[87],[74,88],[80,89],[90],[83,91],[92],[93],[66,68,83,89,92,94],[83,95],[180,182,184],[154,187],[53,160,164,169,180],[160,164,169,191],[193],[194,196],[200,201],[198,199,200],[195],[53],[49,50,51,52],[50,53,186],[209,210,211,212,213,214,215,216,217,218,219,220,221,223,224,225,226,227,228,229,230,231,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,258,259,260,261,262,263,264,265,266,267,268,269,270],[212,218],[211,212],[212],[219],[221,222],[221],[211],[212,221],[210,211],[246],[232,233,234],[210,212],[210],[209,211],[212,218,238],[255,256,257],[212,221,259],[210,212,218],[212,217,218],[211,212,216,217],[66,83,97],[138],[97,138,139,140,141],[58,66,97],[97],[47],[149],[151],[114],[99],[53,89,97],[53,108],[106,111],[53,107,148],[103],[53,148],[69,97,147,148],[99,100,101],[102],[69,80,89,97,100,114,120,122,124,128,137,142,144],[102,143,147],[53,98,147,148],[69,80,89,97,100,102,103,114,120,121,122,123,124,125,128,129,135,136],[137,145],[69,80,89,97],[69,80,97,100,121],[116,117],[102,115,120],[102,116,118,119],[53,80,89,97,103,105,107,109,110,148],[130],[130,131,132,133,134],[102,126,127],[80,97],[53,69,80,89,97,98,103,104,111,147],[153],[155],[157],[159],[161],[48,147,150,152,154,156,158,160,162,164,165,167,168,169],[163],[107],[166],[116,118,119,120],[53,69,80,97,103,112,113,114,146,148],[53,147],[176,177,178,179],[175],[53,176,177],[176],[180,190],[180],[53,180],[183],[181]],"referencedMap":[[172,1],[54,2],[56,3],[57,4],[58,5],[59,6],[60,7],[61,8],[62,9],[63,10],[64,11],[65,12],[66,13],[67,14],[68,15],[69,16],[70,17],[71,18],[97,19],[72,20],[73,21],[74,22],[75,23],[76,24],[77,25],[78,26],[79,27],[80,28],[81,29],[82,30],[83,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,37],[90,38],[91,39],[92,40],[93,41],[94,42],[95,43],[185,44],[188,45],[189,46],[192,47],[194,48],[197,49],[202,50],[201,51],[196,52],[186,53],[112,53],[53,54],[187,55],[271,56],[219,57],[213,58],[214,59],[215,59],[220,60],[223,61],[222,62],[224,63],[225,64],[227,59],[228,65],[247,66],[229,59],[230,59],[231,59],[235,67],[233,59],[234,68],[237,58],[211,69],[240,59],[241,58],[243,69],[244,59],[245,68],[210,70],[246,71],[248,59],[249,58],[250,59],[251,59],[252,57],[253,68],[258,72],[255,62],[256,62],[257,62],[260,73],[216,74],[263,75],[265,59],[218,76],[266,68],[221,59],[268,64],[269,65],[270,59],[259,59],[217,57],[272,77],[140,78],[142,79],[139,78],[138,80],[141,81],[48,82],[150,83],[152,84],[129,85],[125,86],[136,86],[161,53],[163,87],[109,88],[108,53],[107,89],[166,53],[106,90],[100,91],[149,90],[153,92],[157,92],[114,93],[102,94],[103,95],[145,96],[144,97],[124,98],[137,99],[146,100],[121,101],[122,102],[115,95],[118,103],[116,104],[119,104],[120,105],[155,53],[159,53],[111,106],[131,107],[135,108],[128,109],[110,110],[126,110],[132,107],[148,111],[154,112],[156,113],[158,114],[160,115],[162,116],[170,117],[164,118],[165,119],[167,120],[168,121],[169,81],[147,122],[113,123],[180,124],[176,125],[178,126],[177,127],[179,127],[191,128],[190,129],[183,130],[184,131],[182,132],[181,53]],"exportedModulesMap":[[172,1],[54,2],[56,3],[57,4],[58,5],[59,6],[60,7],[61,8],[62,9],[63,10],[64,11],[65,12],[66,13],[67,14],[68,15],[69,16],[70,17],[71,18],[97,19],[72,20],[73,21],[74,22],[75,23],[76,24],[77,25],[78,26],[79,27],[80,28],[81,29],[82,30],[83,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,37],[90,38],[91,39],[92,40],[93,41],[94,42],[95,43],[185,44],[188,45],[189,46],[192,47],[194,48],[197,49],[202,50],[201,51],[196,52],[186,53],[112,53],[53,54],[187,55],[271,56],[219,57],[213,58],[214,59],[215,59],[220,60],[223,61],[222,62],[224,63],[225,64],[227,59],[228,65],[247,66],[229,59],[230,59],[231,59],[235,67],[233,59],[234,68],[237,58],[211,69],[240,59],[241,58],[243,69],[244,59],[245,68],[210,70],[246,71],[248,59],[249,58],[250,59],[251,59],[252,57],[253,68],[258,72],[255,62],[256,62],[257,62],[260,73],[216,74],[263,75],[265,59],[218,76],[266,68],[221,59],[268,64],[269,65],[270,59],[259,59],[217,57],[272,77],[140,78],[142,79],[139,78],[138,80],[141,81],[48,82],[150,83],[152,84],[129,85],[125,86],[136,86],[161,53],[163,87],[109,88],[108,53],[107,89],[166,53],[106,90],[100,91],[149,90],[153,92],[157,92],[114,93],[102,94],[103,95],[145,96],[144,97],[124,98],[137,99],[146,100],[121,101],[122,102],[115,95],[118,103],[116,104],[119,104],[120,105],[155,53],[159,53],[111,106],[131,107],[135,108],[128,109],[110,110],[126,110],[132,107],[148,111],[154,112],[156,113],[158,114],[160,115],[162,116],[170,117],[164,118],[165,119],[167,120],[168,121],[169,81],[147,122],[113,123],[180,124],[176,125],[178,126],[177,127],[179,127],[191,128],[190,129],[183,130],[184,131],[182,132],[181,53]],"semanticDiagnosticsPerFile":[172,54,56,57,58,59,60,61,62,63,64,65,66,67,68,55,96,69,70,71,97,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,185,188,173,174,189,192,104,194,197,202,198,201,200,196,195,193,186,199,203,204,205,206,207,51,112,49,53,208,52,187,271,219,213,214,215,220,223,222,224,225,226,227,228,247,229,230,231,235,232,233,234,236,237,212,209,238,211,239,240,241,242,243,244,245,210,246,248,249,250,251,252,253,254,258,255,256,257,260,216,261,262,263,264,265,218,266,267,221,268,269,270,259,217,272,50,140,142,139,138,141,48,150,152,129,125,136,161,163,109,108,107,166,106,99,143,100,149,153,157,114,102,103,145,144,123,98,101,124,137,146,121,122,115,117,118,116,119,120,47,155,159,127,105,111,131,135,134,128,110,126,132,130,133,151,148,154,156,158,160,171,162,170,164,165,167,168,169,147,113,175,180,176,178,177,179,191,190,10,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,41,37,38,39,40,8,45,42,43,44,1,9,46,183,184,182,181],"affectedFilesPendingEmit":[[172,1],[54,1],[56,1],[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,1],[66,1],[67,1],[68,1],[55,1],[96,1],[69,1],[70,1],[71,1],[97,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1],[80,1],[81,1],[82,1],[83,1],[84,1],[85,1],[86,1],[87,1],[88,1],[89,1],[90,1],[91,1],[92,1],[93,1],[94,1],[95,1],[185,1],[188,1],[173,1],[174,1],[189,1],[192,1],[104,1],[194,1],[197,1],[202,1],[198,1],[201,1],[200,1],[196,1],[195,1],[193,1],[186,1],[199,1],[203,1],[204,1],[205,1],[206,1],[207,1],[51,1],[112,1],[49,1],[53,1],[208,1],[52,1],[187,1],[271,1],[219,1],[213,1],[214,1],[215,1],[220,1],[223,1],[222,1],[224,1],[225,1],[226,1],[227,1],[228,1],[247,1],[229,1],[230,1],[231,1],[235,1],[232,1],[233,1],[234,1],[236,1],[237,1],[212,1],[209,1],[238,1],[211,1],[239,1],[240,1],[241,1],[242,1],[243,1],[244,1],[245,1],[210,1],[246,1],[248,1],[249,1],[250,1],[251,1],[252,1],[253,1],[254,1],[258,1],[255,1],[256,1],[257,1],[260,1],[216,1],[261,1],[262,1],[263,1],[264,1],[265,1],[218,1],[266,1],[267,1],[221,1],[268,1],[269,1],[270,1],[259,1],[217,1],[272,1],[50,1],[140,1],[142,1],[139,1],[138,1],[141,1],[48,1],[150,1],[152,1],[129,1],[125,1],[136,1],[161,1],[163,1],[109,1],[108,1],[107,1],[166,1],[106,1],[99,1],[143,1],[100,1],[149,1],[153,1],[157,1],[114,1],[102,1],[103,1],[145,1],[144,1],[123,1],[98,1],[101,1],[124,1],[137,1],[146,1],[121,1],[122,1],[115,1],[117,1],[118,1],[116,1],[119,1],[120,1],[47,1],[155,1],[159,1],[127,1],[105,1],[111,1],[131,1],[135,1],[134,1],[128,1],[110,1],[126,1],[132,1],[130,1],[133,1],[151,1],[148,1],[154,1],[156,1],[158,1],[160,1],[171,1],[162,1],[170,1],[164,1],[165,1],[167,1],[168,1],[169,1],[147,1],[113,1],[175,1],[180,1],[176,1],[178,1],[177,1],[179,1],[191,1],[190,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[183,1],[184,1],[182,1],[181,1]]},"version":"4.5.2"} \ No newline at end of file diff --git a/packages/swr-devtools-panel/src/components/CacheData.tsx b/packages/swr-devtools-panel/src/components/CacheData.tsx index 20cbc1b..bec754f 100644 --- a/packages/swr-devtools-panel/src/components/CacheData.tsx +++ b/packages/swr-devtools-panel/src/components/CacheData.tsx @@ -1,36 +1,42 @@ import React, { lazy, Suspense } from "react"; +import { ReactJsonViewProps } from "react-json-view"; import styled from "styled-components"; import { SWRCacheData } from "swr-devtools/lib/swr-cache"; import { CacheKey } from "./CacheKey"; +import { ErrorLabel } from "./ErrorLabel"; type Props = { data: SWRCacheData; }; export const CacheData = React.memo(({ data }: Props) => ( - <> + + {data.error && <ErrorLabel />} <CacheKey cacheKey={data.key} />   <TimestampText>{data.timestampString}</TimestampText> - - {data.error && {data.error}} + {data.data && } + {data.error && } - + )); CacheData.displayName = "CacheData"; -const DataWrapper = styled.div` - border-bottom: solid 1px var(--swr-devtools-border-color); - font-size: 1rem; - height: 100%; - margin: 0; - padding: 0 0.3rem; -`; +const ErrorData = ({ error }: { error: string | ReactJsonViewProps }) => ( + + ERROR + {typeof error === "string" ? ( + {error} + ) : ( + + )} + +); -const CacheDataView = ({ data }: Props) => { +const CacheDataView = ({ data }: { data: ReactJsonViewProps }) => { if (typeof window === "undefined") return null; return ( @@ -39,7 +45,7 @@ const CacheDataView = ({ data }: Props) => { ); }; -const AsyncReactJson = ({ data }: Props) => { +const AsyncReactJson = ({ data }: { data: ReactJsonViewProps }) => { const ReactJson = lazy(() => import("react-json-view")); return ( { ); }; +const Wrapper = styled.div` + padding: 0.2rem; +`; + +const DataWrapper = styled.div` + font-size: 0.8rem; + height: 100%; + margin: 0; + padding: 0 0.3rem; +`; + +const ErrorWrapper = styled.div` + margin-top: 1rem; + padding: 0.5rem 0; +`; + const ErrorText = styled.p` - color: var(--swr-devtools-error-text-colora); + margin: 0; + color: var(--swr-devtools-text-color); +`; + +const ErrorTitle = styled.h4` + margin: 0; + padding: 0.3rem 0; + color: var(--swr-devtools-text-color); `; const Title = styled.h3` margin: 0; - padding: 1rem 0.5rem; + padding: 0.5rem 0rem; color: var(--swr-devtools-text-color); `; diff --git a/packages/swr-devtools-panel/src/components/CacheKey.tsx b/packages/swr-devtools-panel/src/components/CacheKey.tsx index 657e939..90a0594 100644 --- a/packages/swr-devtools-panel/src/components/CacheKey.tsx +++ b/packages/swr-devtools-panel/src/components/CacheKey.tsx @@ -9,15 +9,20 @@ import { export const CacheKey = ({ cacheKey }: { cacheKey: string }) => { if (isInfiniteCache(cacheKey)) { return ( - + Infinite {getInfiniteCacheKey(cacheKey)} - + ); } - return {cacheKey}; + return {cacheKey}; }; +const CacheText = styled.span` + display: inline-block; + padding: 0.3rem; +`; + const CacheTag = styled.b` margin-right: 0.3rem; padding: 0.2rem; diff --git a/packages/swr-devtools-panel/src/components/ErrorLabel.tsx b/packages/swr-devtools-panel/src/components/ErrorLabel.tsx new file mode 100644 index 0000000..a68c59d --- /dev/null +++ b/packages/swr-devtools-panel/src/components/ErrorLabel.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import styled from "styled-components"; + +export const ErrorLabel = () => ERROR; + +const ErrorLabelWrapper = styled.span` + padding: 0.2rem; + background-color: var(--swr-devtools-error-text-color); + color: var(--swr-devtools-text-color); +`; diff --git a/packages/swr-devtools-panel/src/components/Panel.tsx b/packages/swr-devtools-panel/src/components/Panel.tsx index f8946de..bc007a2 100644 --- a/packages/swr-devtools-panel/src/components/Panel.tsx +++ b/packages/swr-devtools-panel/src/components/Panel.tsx @@ -7,6 +7,7 @@ import { CacheData } from "./CacheData"; import { CacheKey } from "./CacheKey"; import { useDevToolsCache } from "../devtools-cache"; import { SearchInput } from "./SearchInput"; +import { ErrorLabel } from "./ErrorLabel"; export const Panel = ({ cache, @@ -40,7 +41,7 @@ export const Panel = ({ {cacheData .filter(({ key }) => filterText === "" || key.includes(filterText)) - .map(({ key, timestampString, timestamp }) => ( + .map(({ key, error, timestampString, timestamp }) => ( onSelectItem({ key, timestamp })} > + {error && } ({timestampString}) @@ -99,10 +101,12 @@ const CacheItem = styled.li<{ isSelected: boolean }>` `; const CacheItemButton = styled.button` - display: inline-block; + display: flex; + align-items: center; + gap: 2px; width: 100%; height: 100%; - padding: 0.5rem 0; + padding: 0.2rem 0; border: none; background: transparent; color: var(--swr-devtools-text-color); diff --git a/packages/swr-devtools-panel/src/devtools-cache.ts b/packages/swr-devtools-panel/src/devtools-cache.ts index 36b5d31..3d41d41 100644 --- a/packages/swr-devtools-panel/src/devtools-cache.ts +++ b/packages/swr-devtools-panel/src/devtools-cache.ts @@ -4,6 +4,8 @@ import { Cache } from "swr"; import { injectSWRCache, isMetaCache, + isErrorCache, + getErrorCacheKey, SWRCacheData, } from "swr-devtools/lib/swr-cache"; @@ -62,15 +64,25 @@ const sortCacheDataFromLatest = (cacheData: Map) => { .reverse(); }; +// TODO: this is a draft implementation +const toJSON = (value: any) => { + return value instanceof Error ? { message: value.message } : value; +}; + const retrieveCache = ( - key: string, + key_: string, value: any ): [SWRCacheData[], SWRCacheData[]] => { const date = new Date(); + const data = toJSON(value); + + const isErrorCache_ = isErrorCache(key_); + const key = isErrorCache_ ? getErrorCacheKey(key_) : key_; + + const payload = isErrorCache_ ? { key, error: data } : { key, data }; currentCacheData.set(key, { - key, - data: value, + ...payload, timestamp: date, timestampString: formatTime(date), }); diff --git a/packages/swr-devtools/src/SWRDevTools.tsx b/packages/swr-devtools/src/SWRDevTools.tsx index bccccb7..eb38960 100644 --- a/packages/swr-devtools/src/SWRDevTools.tsx +++ b/packages/swr-devtools/src/SWRDevTools.tsx @@ -1,7 +1,7 @@ import React, { useLayoutEffect } from "react"; import { useSWRConfig, SWRConfig, Middleware, Cache } from "swr"; -import { injectSWRCache, isMetaCache } from "./swr-cache"; +import { injectSWRCache, isMetaCache, isErrorCache } from "./swr-cache"; const injected = new WeakSet(); @@ -17,6 +17,11 @@ export type DevToolsMessage = type: "initialized"; }; +// TOOD: we have to support more types +const convertToSerializableObject = (value: any) => { + return value instanceof Error ? { message: value.message } : value; +}; + const inject = (cache: Cache) => injectSWRCache(cache, (key: string, value: any) => { if (isMetaCache(key)) { @@ -27,7 +32,7 @@ const inject = (cache: Cache) => type: "updated_swr_cache", payload: { key, - value, + value: convertToSerializableObject(value), }, }, "*" diff --git a/packages/swr-devtools/src/swr-cache.ts b/packages/swr-devtools/src/swr-cache.ts index 59a7a4c..13ceb08 100644 --- a/packages/swr-devtools/src/swr-cache.ts +++ b/packages/swr-devtools/src/swr-cache.ts @@ -28,7 +28,16 @@ export const injectSWRCache = ( }; export const isMetaCache = (key: string) => { - return /^\$(?:req|err|ctx|len)\$/.test(key); + return /^\$(?:req|ctx|len)\$/.test(key); +}; + +export const isErrorCache = (key: string) => { + return /^\$err\$/.test(key); +}; + +export const getErrorCacheKey = (key: string) => { + const match = key.match(/^\$err\$(?.*)?/); + return match?.groups?.cacheKey ?? key; }; export const isInfiniteCache = (key: string) => {