apollo-client-devtools
Advanced tools
Comparing version 4.17.2 to 4.17.3
@@ -1,1 +0,1 @@ | ||
(()=>{var e={6815:function(e,o){var n,t,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,t=[e],n=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const o="The message port closed before a response was received.",n=e=>{const n={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(n).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class t extends WeakMap{constructor(e,o=void 0){super(o),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const r=e=>e&&"object"==typeof e&&"function"==typeof e.then,s=(o,n)=>(...t)=>{e.runtime.lastError?o.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||t.length<=1&&!1!==n.singleCallbackArg?o.resolve(t[0]):o.resolve(t)},i=e=>1==e?"argument":"arguments",a=(e,o)=>function(n,...t){if(t.length<o.minArgs)throw new Error(`Expected at least ${o.minArgs} ${i(o.minArgs)} for ${e}(), got ${t.length}`);if(t.length>o.maxArgs)throw new Error(`Expected at most ${o.maxArgs} ${i(o.maxArgs)} for ${e}(), got ${t.length}`);return new Promise(((r,i)=>{if(o.fallbackToNoCallback)try{n[e](...t,s({resolve:r,reject:i},o))}catch(s){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,s),n[e](...t),o.fallbackToNoCallback=!1,o.noCallback=!0,r()}else o.noCallback?(n[e](...t),r()):n[e](...t,s({resolve:r,reject:i},o))}))},g=(e,o,n)=>new Proxy(o,{apply:(o,t,r)=>n.call(t,e,...r)});let l=Function.call.bind(Object.prototype.hasOwnProperty);const E=(e,o={},n={})=>{let t=Object.create(null),r={has:(o,n)=>n in e||n in t,get(r,s,i){if(s in t)return t[s];if(!(s in e))return;let c=e[s];if("function"==typeof c)if("function"==typeof o[s])c=g(e,e[s],o[s]);else if(l(n,s)){let o=a(s,n[s]);c=g(e,e[s],o)}else c=c.bind(e);else if("object"==typeof c&&null!==c&&(l(o,s)||l(n,s)))c=E(c,o[s],n[s]);else{if(!l(n,"*"))return Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e[s],set(o){e[s]=o}}),c;c=E(c,o[s],n["*"])}return t[s]=c,c},set:(o,n,r,s)=>(n in t?t[n]=r:e[n]=r,!0),defineProperty:(e,o,n)=>Reflect.defineProperty(t,o,n),deleteProperty:(e,o)=>Reflect.deleteProperty(t,o)},s=Object.create(e);return new Proxy(s,r)},c=e=>({addListener(o,n,...t){o.addListener(e.get(n),...t)},hasListener:(o,n)=>o.hasListener(e.get(n)),removeListener(o,n){o.removeListener(e.get(n))}}),m=new t((e=>"function"!=typeof e?e:function(o){const n=E(o,{},{getContent:{minArgs:0,maxArgs:0}});e(n)})),A=new t((e=>"function"!=typeof e?e:function(o,n,t){let s,i,a=!1,g=new Promise((e=>{s=function(o){a=!0,e(o)}}));try{i=e(o,n,s)}catch(e){i=Promise.reject(e)}const l=!0!==i&&r(i);if(!0!==i&&!l&&!a)return!1;const E=e=>{e.then((e=>{t(e)}),(e=>{let o;o=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",t({__mozWebExtensionPolyfillReject__:!0,message:o})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return E(l?i:g),!0})),u=({reject:n,resolve:t},r)=>{e.runtime.lastError?e.runtime.lastError.message===o?t():n(new Error(e.runtime.lastError.message)):r&&r.__mozWebExtensionPolyfillReject__?n(new Error(r.message)):t(r)},h=(e,o,n,...t)=>{if(t.length<o.minArgs)throw new Error(`Expected at least ${o.minArgs} ${i(o.minArgs)} for ${e}(), got ${t.length}`);if(t.length>o.maxArgs)throw new Error(`Expected at most ${o.maxArgs} ${i(o.maxArgs)} for ${e}(), got ${t.length}`);return new Promise(((e,o)=>{const r=u.bind(null,{resolve:e,reject:o});t.push(r),n.sendMessage(...t)}))},p={devtools:{network:{onRequestFinished:c(m)}},runtime:{onMessage:c(A),onMessageExternal:c(A),sendMessage:h.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:h.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},d={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return n.privacy={network:{"*":d},services:{"*":d},websites:{"*":d}},E(e,p,n)};e.exports=n(chrome)}},void 0===(r="function"==typeof n?n.apply(o,t):n)||(e.exports=r)}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{"use strict";var e=n(6815),o=n.n(e);function t(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=new Uint8Array(10);return crypto.getRandomValues(o),Array.from(o).map((o=>e[o%62])).join("")}[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,o)=>e.set(o.name,o)),new Map);function r(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function s(e){return r(e)&&"rpcRequest"===e.type}function i(e){const o=new Map;let n=null;function r(e){s(e)&&o.get(e.name)?.(e)}return function(s,i){if(o.has(s))throw new Error("Only one rpc handler can be registered per type");return o.set(s,(async({id:o,params:n})=>{try{const r=await Promise.resolve(i(...n));e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:t(),sourceId:o,result:r})}catch(n){e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:t(),sourceId:o,error:(r=n,r instanceof Error?{name:r.name,message:r.message,stack:r.stack}:{message:String(r)})})}var r})),n||(n=e.addListener(r)),()=>{o.delete(s),0===o.size&&n&&(n(),n=null)}}}const a=JSON.parse('{"allMessages":[null,"store.merge expects a string ID","Missing field \'%s\' while extracting keyFields from %s","Cannot change root %s __typename more than once","Inferring subtype %s of supertype %s","Undefined \'from\' passed to readField with arguments %s","Cannot automatically merge arrays","No fragment named %s","Missing selection set for object of type %s returned for query field %s","Could not identify object %s","Missing field \'%s\' while writing result %o","Cache data may be lost when replacing the %s field of a %s object.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %s\\n incoming: %s\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","To initialize Apollo Client, you must specify a \'cache\' property in the options object. \\nFor more information, please visit: https://go.apollo.dev/c/docs","Download the Apollo DevTools for a better development experience: %s","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only.","In client.refetchQueries, Promise.all promise rejected with error %o","`getCacheKey` must return an array or undefined","Called refetch(%o) for query %o, which does not declare a $variables variable.\\nDid you mean to call refetch(variables) instead of refetch({ variables })?","Unhandled GraphQL subscription error","Attempted to start a polling query without a polling interval.","Unhandled error","Missing cache result fields: %o","QueryManager stopped while query was in flight","mutation option is required. You must specify your GraphQL document in the mutation option.","Mutations support only \'network-only\' or \'no-cache\' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write.","query option is required. You must specify your GraphQL document in the query option.","You must wrap the query string in a \\"gql\\" tag.","returnPartialData option only supported on watchQuery.","pollInterval option only supported on watchQuery.","Store reset while query was in flight (not completed in link chain)","Unknown query named \\"%s\\" requested in refetchQueries options.include array","Unknown query %s requested in refetchQueries options.include array","You are calling concat on a terminating link, which will have no effect %o","request is not implemented","\\n\\"fetch\\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\\n\\nimport fetch from \'cross-fetch\';\\nimport { ApolloClient, HttpLink } from \'@apollo/client\';\\nconst client = new ApolloClient({\\n link: new HttpLink({ uri: \'/graphql\', fetch })\\n});\\n ","Multipart-subscriptions do not support @defer","Network request failed. %s is not serializable: %s","Missing/invalid \\"sha256\\" or \\"generateHash\\" function. Please configure one using the \\"createPersistedQueryLink(options)\\" options parameter.","PersistedQueryLink cannot be the last link in the chain.","Promise Wrapper does not support multiple results from Observable","illegal argument: %s","Could not find \\"client\\" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.","Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\nThe Apollo Client functionality you are trying to use is only available in React Client Components.\\nPlease make sure to add \\"use client\\" at the top of your file.\\nFor more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components","ApolloProvider was not passed a client instance. Make sure you pass in your client via the \\"client\\" prop.","To access the wrapped instance, you need to specify { withRef: true } in the options","Could not find \\"client\\" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.","It appears that `useReadQuery` was used outside of `useBackgroundQuery`. `useReadQuery` is only supported for use with `useBackgroundQuery`. Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`.","Calling default no-op implementation of InternalState#forceUpdate","\'useSubscription\' supports only the \'onSubscriptionData\' or \'onData\' option, but not both. Only the \'onData\' option will be used.","\'onSubscriptionData\' is deprecated and will be removed in a future major version. Please use the \'onData\' option instead.","\'useSubscription\' supports only the \'onSubscriptionComplete\' or \'onComplete\' option, but not both. Only the \'onComplete\' option will be used.","\'onSubscriptionComplete\' is deprecated and will be removed in a future major version. Please use the \'onComplete\' option instead.","Could not find a \\"suspenseCache\\" in the context or passed in as an option. Wrap the root component in an <ApolloProvider> and provide a suspenseCache, or pass a SuspenseCache instance in via options.","The fetch policy `%s` is not supported with suspense.","Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy.","The result of getSnapshot should be cached to avoid an infinite loop","Argument of %s passed to parser was not a valid GraphQL DocumentNode. You may need to use \'graphql-tag\' or another method to convert your operation into a document","Passing only a fragment to \'graphql\' is not yet supported. You must include a query, subscription or mutation as well","react-apollo only supports a query, subscription, or a mutation per HOC. %s had %s queries, %s subscriptions and %s mutations. You can use \'compose\' to join multiple operation types to a component","react-apollo only supports one definition per HOC. %s had %s definitions. You can use \'compose\' to join multiple operation types to a component","Running a %s requires a graphql %s, but a %s was used instead.","query is required","Invalid variable referenced in @%s directive.","Incorrect number of arguments for the @%s directive.","Invalid argument for the @%s directive.","Argument for the @%s directive must be a variable or a boolean value.","Found a %s operation%s. No operations are allowed when using a fragment as a query. Only fragments are allowed.","Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.","Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\"gql\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql","Schema type definitions not allowed in queries. Found: \\"%s\\"","Ambiguous GraphQL document: contains %s operations","Must contain a query definition.","Fragment must have exactly one definition.","Must be a fragment definition.","Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.","The inline argument \\"%s\\" of kind \\"%s\\"is not supported. Use variables instead of inline arguments to overcome this limitation.","Could not find operation or fragment","Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.","Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %s\\n incoming: %s\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","cache.modify: You are trying to write a Reference that is not part of the store: %o\\nPlease make sure to set the `mergeIntoStore` parameter to `true` when creating a Reference that is not part of the store yet:\\n`toReference(object, true)`","cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\\nPlease convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`.","Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %o\\n incoming: %o\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","Mock response maxUsageCount must be greater than 0, %s given","useLoadableQuery: \'loadQuery\' should not be called during render. To start a query during render, use the \'useBackgroundQuery\' hook.","Unknown query %o requested in refetchQueries options.include array","Expected a QueryRef object, but got something else instead.","The query has not been loaded. Please load the query.","A subscription that is skipped cannot be restarted."],"allConditions":[null,"typeof dataId === \\"string\\"","extracted !== void 0","!old || old === which",null,"!isReference(value)","options.fetchPolicy !== \'cache-and-network\'","Array.isArray(cacheKeys)","fragment","pollInterval","mutation","fetchPolicy === \'network-only\' ||\\n fetchPolicy === \'no-cache\'","options.query","options.query.kind === \'Document\'","!options.returnPartialData","!options.pollInterval","options && (typeof options.sha256 === \'function\' ||\\n typeof options.generateHash === \'function\')","forward","context && context.client","\'createContext\' in React","context.client","this.withRef","operationOptions.withRef","!!client","queryRef.promiseCache","suspenseCache","supportedFetchPolicies.includes(fetchPolicy)","!!document && !!document.kind","!fragments.length ||\\n (queries.length || mutations.length || subscriptions.length)","queries.length + mutations.length + subscriptions.length <= 1","definitions.length === 1","operation.type === type","queryWithoutConnection","evaledValue !== void 0","directiveArguments && directiveArguments.length === 1","ifArgument.name && ifArgument.name.value === \'if\'","ifValue &&\\n (ifValue.kind === \'Variable\' || ifValue.kind === \'BooleanValue\')","fragments.length === 1","doc && doc.kind === \'Document\'","operations.length <= 1","queryDef && queryDef.operation === \'query\'","doc.kind === \'Document\'","doc.definitions.length <= 1","fragmentDef.kind === \'FragmentDefinition\'","internalQueryRef.promiseCache","\\"createContext\\" in React","!fragments.length ||\\n queries.length ||\\n mutations.length ||\\n subscriptions.length","options.fetchPolicy !== \\"cache-and-network\\"","fetchPolicy === \\"network-only\\" || fetchPolicy === \\"no-cache\\"","options.query.kind === \\"Document\\"","options &&\\n (typeof options.sha256 === \\"function\\" ||\\n typeof options.generateHash === \\"function\\")","ifArgument.name && ifArgument.name.value === \\"if\\"","ifValue &&\\n (ifValue.kind === \\"Variable\\" || ifValue.kind === \\"BooleanValue\\")","doc && doc.kind === \\"Document\\"","queryDef && queryDef.operation === \\"query\\"","doc.kind === \\"Document\\"","fragmentDef.kind === \\"FragmentDefinition\\"","mockedResponse.maxUsageCount > 0","!calledDuringRender()","!queryRef || QUERY_REFERENCE_SYMBOL in queryRef","queryWithoutClientOnlyDirectives","internalQueryRef","!optionsRef.current.skip"],"allFiles":[null,"@apollo/client/cache/inmemory/entityStore.js","@apollo/client/cache/inmemory/key-extractor.js","@apollo/client/cache/inmemory/policies.js","@apollo/client/cache/inmemory/readFromStore.js","@apollo/client/cache/inmemory/writeToStore.js","@apollo/client/core/ApolloClient.js","@apollo/client/core/DocumentTransform.js","@apollo/client/core/LocalState.js","@apollo/client/core/ObservableQuery.js","@apollo/client/core/QueryManager.js","@apollo/client/link/core/ApolloLink.js","@apollo/client/link/http/checkFetcher.js","@apollo/client/link/http/createHttpLink.js","@apollo/client/link/http/serializeFetchParameter.js","@apollo/client/link/persisted-queries/index.js","@apollo/client/link/utils/toPromise.js","@apollo/client/link/utils/validateOperation.js","@apollo/client/react/context/ApolloConsumer.js","@apollo/client/react/context/ApolloContext.js","@apollo/client/react/context/ApolloProvider.js","@apollo/client/react/hoc/hoc-utils.js","@apollo/client/react/hoc/withApollo.js","@apollo/client/react/hooks/useApolloClient.js","@apollo/client/react/hooks/useBackgroundQuery.js","@apollo/client/react/hooks/useQuery.js","@apollo/client/react/hooks/useSubscription.js","@apollo/client/react/hooks/useSuspenseCache.js","@apollo/client/react/hooks/useSuspenseQuery.js","@apollo/client/react/hooks/useSyncExternalStore.js","@apollo/client/react/parser/index.js","@apollo/client/testing/core/mocking/mockLink.js","@apollo/client/utilities/graphql/directives.js","@apollo/client/utilities/graphql/fragments.js","@apollo/client/utilities/graphql/getFromAST.js","@apollo/client/utilities/graphql/storeUtils.js","@apollo/client/utilities/graphql/transform.js","@apollo/client/utilities/graphql/DocumentTransform.js","@apollo/client/react/hooks/useReadQuery.js","@apollo/client/react/hooks/useLoadableQuery.js","@apollo/client/react/internal/cache/QueryReference.js"],"byVersion":{"3.8.0-beta.0":"1","3.8.0-beta.1":"2","3.8.0-beta.2":"2","3.8.0-beta.3":"2","3.8.0-beta.4":"2","3.8.0-beta.5":"3","3.8.0-beta.6":"4","3.8.0-beta.7":"4","3.8.0-rc.0":"5","3.8.0-rc.1":"5","3.8.0-rc.2":"6","3.8.0":"6","3.8.1":"6","3.8.2":"7","3.8.3":"7","3.8.4":"7","3.8.5":"7","3.8.6":"8","3.8.7":"8","3.8.8":"8","3.8.9":"8","3.8.10":"9","3.9.0-alpha.0":"7","3.9.0-alpha.1":"10","3.9.0-alpha.2":"10","3.9.0-alpha.3":"11","3.9.0-alpha.4":"11","3.9.0-alpha.5":"12","3.9.0-beta.0":"12","3.9.0-beta.1":"12","3.9.0-rc.0":"12","3.9.0-rc.1":"13","3.9.0":"13","3.9.1":"14","3.9.2":"14","3.9.3":"14","3.9.4":"14","3.9.5":"14","3.9.6":"14","3.9.7":"14","3.9.8":"14","3.9.9":"14","3.9.10":"14","3.9.11":"14","3.10.0-alpha.1":"14","3.10.0-rc.0":"14","3.10.0-rc.1":"14","3.10.0":"14","3.10.1":"14","3.10.2":"14","3.10.3":"14","3.10.4":"15","3.10.5":"15","3.10.6":"15","3.10.7":"15","3.10.8":"15","3.11.0-rc.0":"16","3.11.0-rc.1":"16","3.11.0-rc.2":"16","3.11.0":"16","3.11.1":"16"},"errors":{"1":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEEAcHBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLhgYLxkEMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","2":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLhgYLxkEMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","3":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","4":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","5":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","6":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","7":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","8":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","9":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","10":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","11":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","12":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","13":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","14":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","15":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EVSg7OB4bOR4uOh4dOx4ePB4fPR88Uh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","16":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6Vic9MBoEMRoEMhoEMxoEVxo+NRwaNhwENx0EVSg7OB4bOR4uOh4dOx4ePB4fPR88Uh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE"}}');function g({allMessages:e,allConditions:o,allFiles:n,byVersion:t,errors:r},s){const i={},a=function(e){const o=atob(e),n=new Uint16Array(o.length);for(let e=0;e<o.length;e++)n[e]=o.charCodeAt(e);return n}(r[t[s]]);for(let t=0;t<a.length/3;t++){const r=i[t+1]={},s=n[a[3*t+1]];void 0!==s&&(r.file=s);const g=o[a[3*t+2]];void 0!==g&&(r.condition=g);const l=e[a[3*t]];void 0!==l&&(r.message=l)}return i}o().runtime.onConnect.addListener((e=>{if("tab"===e.name){const o=i(function(e){let o=e();const n=new Set;function t(){n.forEach((e=>{o.onMessage.removeListener(e)})),o.onDisconnect.removeListener(t),o=e(),r()}function r(){n.forEach((e=>o.onMessage.addListener(e))),o.onDisconnect.addListener(t)}return r(),{addListener:e=>(n.add(e),o.onMessage.addListener(e),()=>{n.delete(e),o.onMessage.removeListener(e)}),postMessage:e=>o.postMessage(e)}}((()=>e)));o("getErrorCodes",(e=>{if(e in a.byVersion)return g(a,e)}))}}));const l={};function E(e){l[e]||(l[e]={tab:null,extension:null,disconnectPorts:null})}function c(e){if(!l[e])throw new Error("Attempted to connect to a tab that has not been registered");const o=l[e].extension,n=l[e].tab;if(!o)throw new Error("Attempted to connect extension port which does not exist");if(!n)throw new Error("Attempted to connect tab port which does not exist");if(l[e].disconnectPorts)throw new Error(`Attempted to connect already connected ports for tab ${e}`);function t(e){try{n.postMessage(e)}catch(e){0,s()}}function r(e){try{o.postMessage(e)}catch(e){0,s()}}function s(){o.onMessage.removeListener(t),n.onMessage.removeListener(r),l[e].disconnectPorts=null}l[e].disconnectPorts=s,o.onMessage.addListener(t),o.onDisconnect.addListener(s),n.onMessage.addListener(r),n.onDisconnect.addListener(s)}function m(e){if(null==e.sender?.tab?.id)return;const o=e.sender.tab.id;l[o]?.tab&&(l[o].disconnectPorts?.(),l[o].tab?.disconnect()),E(o),function(e,o){l[e].tab=o,o.onDisconnect.addListener((()=>{l[e].disconnectPorts?.(),l[e].tab=null}))}(o,e),l[o].extension&&c(o)}function A(e){const o=+e.name;E(o),function(e,o){l[e].extension=o,o.onDisconnect.addListener((()=>{l[e].disconnectPorts?.(),l[e].extension=null}))}(o,e),l[o].tab&&c(o)}o().runtime.onConnect.addListener((e=>{if("tab"===e.name)return m(e);if(!isNaN(+e.name))return A(e);throw new Error(`Unknown port ${e.name} connected`)}))})()})(); | ||
(()=>{var e={6815:function(e,o){var n,t,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,t=[e],n=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const o="The message port closed before a response was received.",n=e=>{const n={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(n).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class t extends WeakMap{constructor(e,o=void 0){super(o),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const r=e=>e&&"object"==typeof e&&"function"==typeof e.then,s=(o,n)=>(...t)=>{e.runtime.lastError?o.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||t.length<=1&&!1!==n.singleCallbackArg?o.resolve(t[0]):o.resolve(t)},i=e=>1==e?"argument":"arguments",a=(e,o)=>function(n,...t){if(t.length<o.minArgs)throw new Error(`Expected at least ${o.minArgs} ${i(o.minArgs)} for ${e}(), got ${t.length}`);if(t.length>o.maxArgs)throw new Error(`Expected at most ${o.maxArgs} ${i(o.maxArgs)} for ${e}(), got ${t.length}`);return new Promise(((r,i)=>{if(o.fallbackToNoCallback)try{n[e](...t,s({resolve:r,reject:i},o))}catch(s){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,s),n[e](...t),o.fallbackToNoCallback=!1,o.noCallback=!0,r()}else o.noCallback?(n[e](...t),r()):n[e](...t,s({resolve:r,reject:i},o))}))},g=(e,o,n)=>new Proxy(o,{apply:(o,t,r)=>n.call(t,e,...r)});let l=Function.call.bind(Object.prototype.hasOwnProperty);const E=(e,o={},n={})=>{let t=Object.create(null),r={has:(o,n)=>n in e||n in t,get(r,s,i){if(s in t)return t[s];if(!(s in e))return;let c=e[s];if("function"==typeof c)if("function"==typeof o[s])c=g(e,e[s],o[s]);else if(l(n,s)){let o=a(s,n[s]);c=g(e,e[s],o)}else c=c.bind(e);else if("object"==typeof c&&null!==c&&(l(o,s)||l(n,s)))c=E(c,o[s],n[s]);else{if(!l(n,"*"))return Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e[s],set(o){e[s]=o}}),c;c=E(c,o[s],n["*"])}return t[s]=c,c},set:(o,n,r,s)=>(n in t?t[n]=r:e[n]=r,!0),defineProperty:(e,o,n)=>Reflect.defineProperty(t,o,n),deleteProperty:(e,o)=>Reflect.deleteProperty(t,o)},s=Object.create(e);return new Proxy(s,r)},c=e=>({addListener(o,n,...t){o.addListener(e.get(n),...t)},hasListener:(o,n)=>o.hasListener(e.get(n)),removeListener(o,n){o.removeListener(e.get(n))}}),m=new t((e=>"function"!=typeof e?e:function(o){const n=E(o,{},{getContent:{minArgs:0,maxArgs:0}});e(n)})),A=new t((e=>"function"!=typeof e?e:function(o,n,t){let s,i,a=!1,g=new Promise((e=>{s=function(o){a=!0,e(o)}}));try{i=e(o,n,s)}catch(e){i=Promise.reject(e)}const l=!0!==i&&r(i);if(!0!==i&&!l&&!a)return!1;const E=e=>{e.then((e=>{t(e)}),(e=>{let o;o=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",t({__mozWebExtensionPolyfillReject__:!0,message:o})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return E(l?i:g),!0})),u=({reject:n,resolve:t},r)=>{e.runtime.lastError?e.runtime.lastError.message===o?t():n(new Error(e.runtime.lastError.message)):r&&r.__mozWebExtensionPolyfillReject__?n(new Error(r.message)):t(r)},h=(e,o,n,...t)=>{if(t.length<o.minArgs)throw new Error(`Expected at least ${o.minArgs} ${i(o.minArgs)} for ${e}(), got ${t.length}`);if(t.length>o.maxArgs)throw new Error(`Expected at most ${o.maxArgs} ${i(o.maxArgs)} for ${e}(), got ${t.length}`);return new Promise(((e,o)=>{const r=u.bind(null,{resolve:e,reject:o});t.push(r),n.sendMessage(...t)}))},p={devtools:{network:{onRequestFinished:c(m)}},runtime:{onMessage:c(A),onMessageExternal:c(A),sendMessage:h.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:h.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},d={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return n.privacy={network:{"*":d},services:{"*":d},websites:{"*":d}},E(e,p,n)};e.exports=n(chrome)}},void 0===(r="function"==typeof n?n.apply(o,t):n)||(e.exports=r)}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{"use strict";var e=n(6815),o=n.n(e);function t(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=new Uint8Array(10);return crypto.getRandomValues(o),Array.from(o).map((o=>e[o%62])).join("")}[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,o)=>e.set(o.name,o)),new Map);function r(e){const o=new Map;let n=null;function r(e){(function(e){return function(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}(e)&&"rpcRequest"===e.type})(e)&&o.get(e.name)?.(e)}return function(s,i){if(o.has(s))throw new Error("Only one rpc handler can be registered per type");return o.set(s,(async({id:o,params:n})=>{try{const r=await Promise.resolve(i(...n));e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:t(),sourceId:o,result:r})}catch(n){e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:t(),sourceId:o,error:(r=n,r instanceof Error?{name:r.name,message:r.message,stack:r.stack}:{message:String(r)})})}var r})),n||(n=e.addListener(r)),()=>{o.delete(s),0===o.size&&n&&(n(),n=null)}}}const s=JSON.parse('{"allMessages":[null,"store.merge expects a string ID","Missing field \'%s\' while extracting keyFields from %s","Cannot change root %s __typename more than once","Inferring subtype %s of supertype %s","Undefined \'from\' passed to readField with arguments %s","Cannot automatically merge arrays","No fragment named %s","Missing selection set for object of type %s returned for query field %s","Could not identify object %s","Missing field \'%s\' while writing result %o","Cache data may be lost when replacing the %s field of a %s object.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %s\\n incoming: %s\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","To initialize Apollo Client, you must specify a \'cache\' property in the options object. \\nFor more information, please visit: https://go.apollo.dev/c/docs","Download the Apollo DevTools for a better development experience: %s","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only.","In client.refetchQueries, Promise.all promise rejected with error %o","`getCacheKey` must return an array or undefined","Called refetch(%o) for query %o, which does not declare a $variables variable.\\nDid you mean to call refetch(variables) instead of refetch({ variables })?","Unhandled GraphQL subscription error","Attempted to start a polling query without a polling interval.","Unhandled error","Missing cache result fields: %o","QueryManager stopped while query was in flight","mutation option is required. You must specify your GraphQL document in the mutation option.","Mutations support only \'network-only\' or \'no-cache\' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write.","query option is required. You must specify your GraphQL document in the query option.","You must wrap the query string in a \\"gql\\" tag.","returnPartialData option only supported on watchQuery.","pollInterval option only supported on watchQuery.","Store reset while query was in flight (not completed in link chain)","Unknown query named \\"%s\\" requested in refetchQueries options.include array","Unknown query %s requested in refetchQueries options.include array","You are calling concat on a terminating link, which will have no effect %o","request is not implemented","\\n\\"fetch\\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\\n\\nimport fetch from \'cross-fetch\';\\nimport { ApolloClient, HttpLink } from \'@apollo/client\';\\nconst client = new ApolloClient({\\n link: new HttpLink({ uri: \'/graphql\', fetch })\\n});\\n ","Multipart-subscriptions do not support @defer","Network request failed. %s is not serializable: %s","Missing/invalid \\"sha256\\" or \\"generateHash\\" function. Please configure one using the \\"createPersistedQueryLink(options)\\" options parameter.","PersistedQueryLink cannot be the last link in the chain.","Promise Wrapper does not support multiple results from Observable","illegal argument: %s","Could not find \\"client\\" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.","Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\nThe Apollo Client functionality you are trying to use is only available in React Client Components.\\nPlease make sure to add \\"use client\\" at the top of your file.\\nFor more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components","ApolloProvider was not passed a client instance. Make sure you pass in your client via the \\"client\\" prop.","To access the wrapped instance, you need to specify { withRef: true } in the options","Could not find \\"client\\" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.","It appears that `useReadQuery` was used outside of `useBackgroundQuery`. `useReadQuery` is only supported for use with `useBackgroundQuery`. Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`.","Calling default no-op implementation of InternalState#forceUpdate","\'useSubscription\' supports only the \'onSubscriptionData\' or \'onData\' option, but not both. Only the \'onData\' option will be used.","\'onSubscriptionData\' is deprecated and will be removed in a future major version. Please use the \'onData\' option instead.","\'useSubscription\' supports only the \'onSubscriptionComplete\' or \'onComplete\' option, but not both. Only the \'onComplete\' option will be used.","\'onSubscriptionComplete\' is deprecated and will be removed in a future major version. Please use the \'onComplete\' option instead.","Could not find a \\"suspenseCache\\" in the context or passed in as an option. Wrap the root component in an <ApolloProvider> and provide a suspenseCache, or pass a SuspenseCache instance in via options.","The fetch policy `%s` is not supported with suspense.","Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy.","The result of getSnapshot should be cached to avoid an infinite loop","Argument of %s passed to parser was not a valid GraphQL DocumentNode. You may need to use \'graphql-tag\' or another method to convert your operation into a document","Passing only a fragment to \'graphql\' is not yet supported. You must include a query, subscription or mutation as well","react-apollo only supports a query, subscription, or a mutation per HOC. %s had %s queries, %s subscriptions and %s mutations. You can use \'compose\' to join multiple operation types to a component","react-apollo only supports one definition per HOC. %s had %s definitions. You can use \'compose\' to join multiple operation types to a component","Running a %s requires a graphql %s, but a %s was used instead.","query is required","Invalid variable referenced in @%s directive.","Incorrect number of arguments for the @%s directive.","Invalid argument for the @%s directive.","Argument for the @%s directive must be a variable or a boolean value.","Found a %s operation%s. No operations are allowed when using a fragment as a query. Only fragments are allowed.","Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.","Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\"gql\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql","Schema type definitions not allowed in queries. Found: \\"%s\\"","Ambiguous GraphQL document: contains %s operations","Must contain a query definition.","Fragment must have exactly one definition.","Must be a fragment definition.","Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.","The inline argument \\"%s\\" of kind \\"%s\\"is not supported. Use variables instead of inline arguments to overcome this limitation.","Could not find operation or fragment","Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.","Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %s\\n incoming: %s\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","cache.modify: You are trying to write a Reference that is not part of the store: %o\\nPlease make sure to set the `mergeIntoStore` parameter to `true` when creating a Reference that is not part of the store yet:\\n`toReference(object, true)`","cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\\nPlease convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`.","Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %o\\n incoming: %o\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n","Mock response maxUsageCount must be greater than 0, %s given","useLoadableQuery: \'loadQuery\' should not be called during render. To start a query during render, use the \'useBackgroundQuery\' hook.","Unknown query %o requested in refetchQueries options.include array","Expected a QueryRef object, but got something else instead.","The query has not been loaded. Please load the query.","A subscription that is skipped cannot be restarted."],"allConditions":[null,"typeof dataId === \\"string\\"","extracted !== void 0","!old || old === which",null,"!isReference(value)","options.fetchPolicy !== \'cache-and-network\'","Array.isArray(cacheKeys)","fragment","pollInterval","mutation","fetchPolicy === \'network-only\' ||\\n fetchPolicy === \'no-cache\'","options.query","options.query.kind === \'Document\'","!options.returnPartialData","!options.pollInterval","options && (typeof options.sha256 === \'function\' ||\\n typeof options.generateHash === \'function\')","forward","context && context.client","\'createContext\' in React","context.client","this.withRef","operationOptions.withRef","!!client","queryRef.promiseCache","suspenseCache","supportedFetchPolicies.includes(fetchPolicy)","!!document && !!document.kind","!fragments.length ||\\n (queries.length || mutations.length || subscriptions.length)","queries.length + mutations.length + subscriptions.length <= 1","definitions.length === 1","operation.type === type","queryWithoutConnection","evaledValue !== void 0","directiveArguments && directiveArguments.length === 1","ifArgument.name && ifArgument.name.value === \'if\'","ifValue &&\\n (ifValue.kind === \'Variable\' || ifValue.kind === \'BooleanValue\')","fragments.length === 1","doc && doc.kind === \'Document\'","operations.length <= 1","queryDef && queryDef.operation === \'query\'","doc.kind === \'Document\'","doc.definitions.length <= 1","fragmentDef.kind === \'FragmentDefinition\'","internalQueryRef.promiseCache","\\"createContext\\" in React","!fragments.length ||\\n queries.length ||\\n mutations.length ||\\n subscriptions.length","options.fetchPolicy !== \\"cache-and-network\\"","fetchPolicy === \\"network-only\\" || fetchPolicy === \\"no-cache\\"","options.query.kind === \\"Document\\"","options &&\\n (typeof options.sha256 === \\"function\\" ||\\n typeof options.generateHash === \\"function\\")","ifArgument.name && ifArgument.name.value === \\"if\\"","ifValue &&\\n (ifValue.kind === \\"Variable\\" || ifValue.kind === \\"BooleanValue\\")","doc && doc.kind === \\"Document\\"","queryDef && queryDef.operation === \\"query\\"","doc.kind === \\"Document\\"","fragmentDef.kind === \\"FragmentDefinition\\"","mockedResponse.maxUsageCount > 0","!calledDuringRender()","!queryRef || QUERY_REFERENCE_SYMBOL in queryRef","queryWithoutClientOnlyDirectives","internalQueryRef","!optionsRef.current.skip"],"allFiles":[null,"@apollo/client/cache/inmemory/entityStore.js","@apollo/client/cache/inmemory/key-extractor.js","@apollo/client/cache/inmemory/policies.js","@apollo/client/cache/inmemory/readFromStore.js","@apollo/client/cache/inmemory/writeToStore.js","@apollo/client/core/ApolloClient.js","@apollo/client/core/DocumentTransform.js","@apollo/client/core/LocalState.js","@apollo/client/core/ObservableQuery.js","@apollo/client/core/QueryManager.js","@apollo/client/link/core/ApolloLink.js","@apollo/client/link/http/checkFetcher.js","@apollo/client/link/http/createHttpLink.js","@apollo/client/link/http/serializeFetchParameter.js","@apollo/client/link/persisted-queries/index.js","@apollo/client/link/utils/toPromise.js","@apollo/client/link/utils/validateOperation.js","@apollo/client/react/context/ApolloConsumer.js","@apollo/client/react/context/ApolloContext.js","@apollo/client/react/context/ApolloProvider.js","@apollo/client/react/hoc/hoc-utils.js","@apollo/client/react/hoc/withApollo.js","@apollo/client/react/hooks/useApolloClient.js","@apollo/client/react/hooks/useBackgroundQuery.js","@apollo/client/react/hooks/useQuery.js","@apollo/client/react/hooks/useSubscription.js","@apollo/client/react/hooks/useSuspenseCache.js","@apollo/client/react/hooks/useSuspenseQuery.js","@apollo/client/react/hooks/useSyncExternalStore.js","@apollo/client/react/parser/index.js","@apollo/client/testing/core/mocking/mockLink.js","@apollo/client/utilities/graphql/directives.js","@apollo/client/utilities/graphql/fragments.js","@apollo/client/utilities/graphql/getFromAST.js","@apollo/client/utilities/graphql/storeUtils.js","@apollo/client/utilities/graphql/transform.js","@apollo/client/utilities/graphql/DocumentTransform.js","@apollo/client/react/hooks/useReadQuery.js","@apollo/client/react/hooks/useLoadableQuery.js","@apollo/client/react/internal/cache/QueryReference.js"],"byVersion":{"3.8.0-beta.0":"1","3.8.0-beta.1":"2","3.8.0-beta.2":"2","3.8.0-beta.3":"2","3.8.0-beta.4":"2","3.8.0-beta.5":"3","3.8.0-beta.6":"4","3.8.0-beta.7":"4","3.8.0-rc.0":"5","3.8.0-rc.1":"5","3.8.0-rc.2":"6","3.8.0":"6","3.8.1":"6","3.8.2":"7","3.8.3":"7","3.8.4":"7","3.8.5":"7","3.8.6":"8","3.8.7":"8","3.8.8":"8","3.8.9":"8","3.8.10":"9","3.9.0-alpha.0":"7","3.9.0-alpha.1":"10","3.9.0-alpha.2":"10","3.9.0-alpha.3":"11","3.9.0-alpha.4":"11","3.9.0-alpha.5":"12","3.9.0-beta.0":"12","3.9.0-beta.1":"12","3.9.0-rc.0":"12","3.9.0-rc.1":"13","3.9.0":"13","3.9.1":"14","3.9.2":"14","3.9.3":"14","3.9.4":"14","3.9.5":"14","3.9.6":"14","3.9.7":"14","3.9.8":"14","3.9.9":"14","3.9.10":"14","3.9.11":"14","3.10.0-alpha.1":"14","3.10.0-rc.0":"14","3.10.0-rc.1":"14","3.10.0":"14","3.10.1":"14","3.10.2":"14","3.10.3":"14","3.10.4":"15","3.10.5":"15","3.10.6":"15","3.10.7":"15","3.10.8":"15","3.11.0-rc.0":"16","3.11.0-rc.1":"16","3.11.0-rc.2":"16","3.11.0":"16","3.11.1":"16"},"errors":{"1":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEEAcHBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLhgYLxkEMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","2":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLhgYLxkEMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","3":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUECwUEDAYEDQYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","4":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENBsZNRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","5":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMTKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4cOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","6":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYGDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAoLGQoMGgoNGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8QJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAjQSAkQiEEQyElByEIRCImRSIERiInRyIoRCIpSCIqSSIrSiIESyMETCQETSQE","7":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","8":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","9":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","10":"AQEBAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","11":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXLxkELiYsMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","12":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUETgUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","13":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEHwoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","14":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EOB4bOR4uOh4dOx4ePB4fPR8gUh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","15":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6LxkEMBoEMRoEMhoEMxoENRwaNhwENx0EVSg7OB4bOR4uOh4dOx4ePB4fPR88Uh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE","16":"AQEBTwEEUAEEAgICAwMDBAMEBQMEBgMEBwQECAQFCQUECgUEBwUEUQUEDAYEDgYvDwYEBwgIBwgIEQkEEgkEEwkJFAkEFQkEFgoEFwoKGAowGQoMGgoxGwoOHAoPHQoEHgoEVAoEIAsEIQsEIgwEIw0EJA4EJQ8yJg8RJxAEKBEEKRISKhMtKxQULBUVLBYWLRcXUyc6Vic9MBoEMRoEMhoEMxoEVxo+NRwaNhwENx0EVSg7OB4bOR4uOh4dOx4ePB4fPR88Uh85ECUHPiAhPyAiQCAzQSA0QiEEQyElByEIRCI1RSIERiInRyI2RCI3SCIqSSI4SiIESyMETCQETSQE"}}');function i({allMessages:e,allConditions:o,allFiles:n,byVersion:t,errors:r},s){const i={},a=function(e){const o=atob(e),n=new Uint16Array(o.length);for(let e=0;e<o.length;e++)n[e]=o.charCodeAt(e);return n}(r[t[s]]);for(let t=0;t<a.length/3;t++){const r=i[t+1]={},s=n[a[3*t+1]];void 0!==s&&(r.file=s);const g=o[a[3*t+2]];void 0!==g&&(r.condition=g);const l=e[a[3*t]];void 0!==l&&(r.message=l)}return i}o().runtime.onConnect.addListener((e=>{if("tab"===e.name){const o=r(function(e){let o=e();const n=new Set;function t(){n.forEach((e=>{o.onMessage.removeListener(e)})),o.onDisconnect.removeListener(t),o=e(),r()}function r(){n.forEach((e=>o.onMessage.addListener(e))),o.onDisconnect.addListener(t)}return r(),{addListener:e=>(n.add(e),o.onMessage.addListener(e),()=>{n.delete(e),o.onMessage.removeListener(e)}),postMessage:e=>o.postMessage(e)}}((()=>e)));o("getErrorCodes",(e=>{if(e in s.byVersion)return i(s,e)}))}}));const a={};function g(e){a[e]||(a[e]={tab:null,extension:null,disconnectPorts:null})}function l(e){if(!a[e])throw new Error("Attempted to connect to a tab that has not been registered");const o=a[e].extension,n=a[e].tab;if(!o)throw new Error("Attempted to connect extension port which does not exist");if(!n)throw new Error("Attempted to connect tab port which does not exist");if(a[e].disconnectPorts)throw new Error(`Attempted to connect already connected ports for tab ${e}`);function t(e){try{n.postMessage(e)}catch(e){0,s()}}function r(e){try{o.postMessage(e)}catch(e){0,s()}}function s(){o.onMessage.removeListener(t),n.onMessage.removeListener(r),a[e].disconnectPorts=null}a[e].disconnectPorts=s,o.onMessage.addListener(t),o.onDisconnect.addListener(s),n.onMessage.addListener(r),n.onDisconnect.addListener(s)}function E(e){if(null==e.sender?.tab?.id)return;const o=e.sender.tab.id;a[o]?.tab&&(a[o].disconnectPorts?.(),a[o].tab?.disconnect()),g(o),function(e,o){a[e].tab=o,o.onDisconnect.addListener((()=>{a[e].disconnectPorts?.(),a[e].tab=null}))}(o,e),a[o].extension&&l(o)}function c(e){const o=+e.name;g(o),function(e,o){a[e].extension=o,o.onDisconnect.addListener((()=>{a[e].disconnectPorts?.(),a[e].extension=null}))}(o,e),a[o].tab&&l(o)}o().runtime.onConnect.addListener((e=>{if("tab"===e.name)return E(e);if(!isNaN(+e.name))return c(e);throw new Error(`Unknown port ${e.name} connected`)}))})()})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e={6815:function(e,r){var s,n,t;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=[e],s=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const r="The message port closed before a response was received.",s=e=>{const s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(s).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class n extends WeakMap{constructor(e,r=void 0){super(r),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const t=e=>e&&"object"==typeof e&&"function"==typeof e.then,a=(r,s)=>(...n)=>{e.runtime.lastError?r.reject(new Error(e.runtime.lastError.message)):s.singleCallbackArg||n.length<=1&&!1!==s.singleCallbackArg?r.resolve(n[0]):r.resolve(n)},g=e=>1==e?"argument":"arguments",m=(e,r)=>function(s,...n){if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${g(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${g(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((t,g)=>{if(r.fallbackToNoCallback)try{s[e](...n,a({resolve:t,reject:g},r))}catch(a){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,a),s[e](...n),r.fallbackToNoCallback=!1,r.noCallback=!0,t()}else r.noCallback?(s[e](...n),t()):s[e](...n,a({resolve:t,reject:g},r))}))},o=(e,r,s)=>new Proxy(r,{apply:(r,n,t)=>s.call(n,e,...t)});let i=Function.call.bind(Object.prototype.hasOwnProperty);const A=(e,r={},s={})=>{let n=Object.create(null),t={has:(r,s)=>s in e||s in n,get(t,a,g){if(a in n)return n[a];if(!(a in e))return;let l=e[a];if("function"==typeof l)if("function"==typeof r[a])l=o(e,e[a],r[a]);else if(i(s,a)){let r=m(a,s[a]);l=o(e,e[a],r)}else l=l.bind(e);else if("object"==typeof l&&null!==l&&(i(r,a)||i(s,a)))l=A(l,r[a],s[a]);else{if(!i(s,"*"))return Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:()=>e[a],set(r){e[a]=r}}),l;l=A(l,r[a],s["*"])}return n[a]=l,l},set:(r,s,t,a)=>(s in n?n[s]=t:e[s]=t,!0),defineProperty:(e,r,s)=>Reflect.defineProperty(n,r,s),deleteProperty:(e,r)=>Reflect.deleteProperty(n,r)},a=Object.create(e);return new Proxy(a,t)},l=e=>({addListener(r,s,...n){r.addListener(e.get(s),...n)},hasListener:(r,s)=>r.hasListener(e.get(s)),removeListener(r,s){r.removeListener(e.get(s))}}),c=new n((e=>"function"!=typeof e?e:function(r){const s=A(r,{},{getContent:{minArgs:0,maxArgs:0}});e(s)})),x=new n((e=>"function"!=typeof e?e:function(r,s,n){let a,g,m=!1,o=new Promise((e=>{a=function(r){m=!0,e(r)}}));try{g=e(r,s,a)}catch(e){g=Promise.reject(e)}const i=!0!==g&&t(g);if(!0!==g&&!i&&!m)return!1;const A=e=>{e.then((e=>{n(e)}),(e=>{let r;r=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",n({__mozWebExtensionPolyfillReject__:!0,message:r})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return A(i?g:o),!0})),d=({reject:s,resolve:n},t)=>{e.runtime.lastError?e.runtime.lastError.message===r?n():s(new Error(e.runtime.lastError.message)):t&&t.__mozWebExtensionPolyfillReject__?s(new Error(t.message)):n(t)},u=(e,r,s,...n)=>{if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${g(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${g(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((e,r)=>{const t=d.bind(null,{resolve:e,reject:r});n.push(t),s.sendMessage(...n)}))},p={devtools:{network:{onRequestFinished:l(c)}},runtime:{onMessage:l(x),onMessageExternal:l(x),sendMessage:u.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:u.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},f={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":f},services:{"*":f},websites:{"*":f}},A(e,p,s)};e.exports=s(chrome)}},void 0===(t="function"==typeof s?s.apply(r,n):s)||(e.exports=t)}},r={};function s(n){var t=r[n];if(void 0!==t)return t.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,s),a.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var n in r)s.o(r,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";var e=s(6815),r=s.n(e);function n(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function t(e){return function(e){return n(e)&&"rpcRequest"===e.type}(e)||function(e){return n(e)&&"rpcResponse"===e.type}(e)}function a(e){const r=new Set;return{addListener(s){function n({data:e}){if(r.has(e.id))return r.delete(e.id);s(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(s){r.add(s.id),setTimeout((()=>r.delete(s.id)),10),e.postMessage(s,"*")}}}function g(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(10);return crypto.getRandomValues(r),Array.from(r).map((r=>e[r%62])).join("")}function m(e){let r=null;const s=new Map;function t(e){if(!function(e){return n(e)&&"event"===e.type}(e))return;const r=s.get(e.message.type);if(r)for(const s of r)s(e.message)}const a=(n,a)=>{let g=s.get(n);return g||(g=new Set,s.set(n,g)),g.add(a),r||(r=e.addListener(t)),()=>{g.delete(a),0===g.size&&s.delete(n),0===s.size&&r&&(r(),r=null)}};return{on:a,send:r=>{e.postMessage({id:g(),source:"apollo-client-devtools",type:"event",message:r})},forward:(e,r)=>a(e,r.send)}}let o=null;const i=e=>o||=function(e){return m(a(e))}(e);[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,r)=>e.set(r.name,r)),new Map);const A=r().devtools.inspectedWindow.tabId,l=function(e){let r=e();const s=new Set;function n(){s.forEach((e=>{r.onMessage.removeListener(e)})),r.onDisconnect.removeListener(n),r=e(),t()}function t(){s.forEach((e=>r.onMessage.addListener(e))),r.onDisconnect.addListener(n)}return t(),{addListener:e=>(s.add(e),r.onMessage.addListener(e),()=>{s.delete(e),r.onMessage.removeListener(e)}),postMessage:e=>r.postMessage(e)}}((()=>r().runtime.connect({name:A.toString()}))),c=m(l);let x,d=!1;!async function(){const e=await r().devtools.panels.create("Apollo","","panel.html");e.onShown.addListener((e=>{x=i(e),d?x.send({type:"panelShown"}):(!function(e,r){const s=e.addListener((e=>{t(e)&&r.postMessage(e)})),n=r.addListener((r=>{t(r)&&e.postMessage(r)}))}(a(e),l),c.forward("explorerResponse",x),c.forward("registerClient",x),c.forward("clientTerminated",x),c.forward("connectToDevtools",x),x.forward("connectToClient",c),x.forward("explorerRequest",c),x.forward("explorerSubscriptionTermination",c),x.send({type:"initializePanel"}),d=!0)})),e.onHidden.addListener((()=>{x.send({type:"panelHidden"})}))}(),r().devtools.network.onNavigated.addListener((()=>{x?.send({type:"pageNavigated"})}))})()})(); | ||
(()=>{var e={6815:function(e,r){var s,n,a;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=[e],s=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const r="The message port closed before a response was received.",s=e=>{const s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(s).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class n extends WeakMap{constructor(e,r=void 0){super(r),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const a=e=>e&&"object"==typeof e&&"function"==typeof e.then,g=(r,s)=>(...n)=>{e.runtime.lastError?r.reject(new Error(e.runtime.lastError.message)):s.singleCallbackArg||n.length<=1&&!1!==s.singleCallbackArg?r.resolve(n[0]):r.resolve(n)},t=e=>1==e?"argument":"arguments",m=(e,r)=>function(s,...n){if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${t(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${t(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((a,t)=>{if(r.fallbackToNoCallback)try{s[e](...n,g({resolve:a,reject:t},r))}catch(g){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,g),s[e](...n),r.fallbackToNoCallback=!1,r.noCallback=!0,a()}else r.noCallback?(s[e](...n),a()):s[e](...n,g({resolve:a,reject:t},r))}))},i=(e,r,s)=>new Proxy(r,{apply:(r,n,a)=>s.call(n,e,...a)});let o=Function.call.bind(Object.prototype.hasOwnProperty);const A=(e,r={},s={})=>{let n=Object.create(null),a={has:(r,s)=>s in e||s in n,get(a,g,t){if(g in n)return n[g];if(!(g in e))return;let l=e[g];if("function"==typeof l)if("function"==typeof r[g])l=i(e,e[g],r[g]);else if(o(s,g)){let r=m(g,s[g]);l=i(e,e[g],r)}else l=l.bind(e);else if("object"==typeof l&&null!==l&&(o(r,g)||o(s,g)))l=A(l,r[g],s[g]);else{if(!o(s,"*"))return Object.defineProperty(n,g,{configurable:!0,enumerable:!0,get:()=>e[g],set(r){e[g]=r}}),l;l=A(l,r[g],s["*"])}return n[g]=l,l},set:(r,s,a,g)=>(s in n?n[s]=a:e[s]=a,!0),defineProperty:(e,r,s)=>Reflect.defineProperty(n,r,s),deleteProperty:(e,r)=>Reflect.deleteProperty(n,r)},g=Object.create(e);return new Proxy(g,a)},l=e=>({addListener(r,s,...n){r.addListener(e.get(s),...n)},hasListener:(r,s)=>r.hasListener(e.get(s)),removeListener(r,s){r.removeListener(e.get(s))}}),c=new n((e=>"function"!=typeof e?e:function(r){const s=A(r,{},{getContent:{minArgs:0,maxArgs:0}});e(s)})),x=new n((e=>"function"!=typeof e?e:function(r,s,n){let g,t,m=!1,i=new Promise((e=>{g=function(r){m=!0,e(r)}}));try{t=e(r,s,g)}catch(e){t=Promise.reject(e)}const o=!0!==t&&a(t);if(!0!==t&&!o&&!m)return!1;const A=e=>{e.then((e=>{n(e)}),(e=>{let r;r=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",n({__mozWebExtensionPolyfillReject__:!0,message:r})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return A(o?t:i),!0})),d=({reject:s,resolve:n},a)=>{e.runtime.lastError?e.runtime.lastError.message===r?n():s(new Error(e.runtime.lastError.message)):a&&a.__mozWebExtensionPolyfillReject__?s(new Error(a.message)):n(a)},u=(e,r,s,...n)=>{if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${t(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${t(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((e,r)=>{const a=d.bind(null,{resolve:e,reject:r});n.push(a),s.sendMessage(...n)}))},p={devtools:{network:{onRequestFinished:l(c)}},runtime:{onMessage:l(x),onMessageExternal:l(x),sendMessage:u.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:u.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},f={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":f},services:{"*":f},websites:{"*":f}},A(e,p,s)};e.exports=s(chrome)}},void 0===(a="function"==typeof s?s.apply(r,n):s)||(e.exports=a)}},r={};function s(n){var a=r[n];if(void 0!==a)return a.exports;var g=r[n]={exports:{}};return e[n].call(g.exports,g,g.exports,s),g.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var n in r)s.o(r,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";var e=s(6815),r=s.n(e);function n(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function a(e){const r=new Set;return{addListener(s){function n({data:e}){if(r.has(e.id))return r.delete(e.id);s(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(s){r.add(s.id),setTimeout((()=>r.delete(s.id)),10),e.postMessage(s,"*")}}}function g(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(10);return crypto.getRandomValues(r),Array.from(r).map((r=>e[r%62])).join("")}function t(e){let r=null;const s=new Map;function a(e){if(!function(e){return n(e)&&"actor"===e.type}(e))return;const r=s.get(e.message.type);if(r)for(const s of r)s(e.message)}return{on:(n,g)=>{let t=s.get(n);return t||(t=new Set,s.set(n,t)),t.add(g),r||(r=e.addListener(a)),()=>{t.delete(g),0===t.size&&s.delete(n),0===s.size&&r&&(r(),r=null)}},send:r=>{e.postMessage({id:g(),source:"apollo-client-devtools",type:"actor",message:r})}}}let m=null;const i=e=>m||=function(e){return t(a(e))}(e),o=r().devtools.inspectedWindow.tabId,A=function(e){let r=e();const s=new Set;function n(){s.forEach((e=>{r.onMessage.removeListener(e)})),r.onDisconnect.removeListener(n),r=e(),a()}function a(){s.forEach((e=>r.onMessage.addListener(e))),r.onDisconnect.addListener(n)}return a(),{addListener:e=>(s.add(e),r.onMessage.addListener(e),()=>{s.delete(e),r.onMessage.removeListener(e)}),postMessage:e=>r.postMessage(e)}}((()=>r().runtime.connect({name:o.toString()})));let l,c=!1;!async function(){const e=await r().devtools.panels.create("Apollo","","panel.html");e.onShown.addListener((e=>{l=i(e),c?l.send({type:"panelShown"}):(!function(e,r){const s=e.addListener((e=>{n(e)&&r.postMessage(e)})),a=r.addListener((r=>{n(r)&&e.postMessage(r)}))}(a(e),A),l.send({type:"initializePanel"}),c=!0)})),e.onHidden.addListener((()=>{l.send({type:"panelHidden"})}))}(),r().devtools.network.onNavigated.addListener((()=>{l?.send({type:"pageNavigated"})}))})()})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={6064:(e,t,r)=>{e.exports=r(3619).Observable},3619:(e,t)=>{"use strict";t.Observable=void 0;const r=e=>Boolean(Symbol[e]),n=e=>r(e)?Symbol[e]:"@@"+e,o=n("iterator"),i=n("observable"),s=n("species");function c(e,t){let r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function a(e){let t=e.constructor;return void 0!==t&&(t=t[s],null===t&&(t=void 0)),void 0!==t?t:h}function u(e){u.log?u.log(e):setTimeout((()=>{throw e}))}function l(e){Promise.resolve().then((()=>{try{e()}catch(e){u(e)}}))}function f(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=c(t,"unsubscribe");e&&e.call(t)}}catch(e){u(e)}}function p(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function d(e,t,r){e._state="running";let n=e._observer;try{let o=c(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(p(e),!o)throw r;o.call(n,r);break;case"complete":p(e),o&&o.call(n)}}catch(e){u(e)}"closed"===e._state?f(e):"running"===e._state&&(e._state="ready")}function y(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void l((()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(d(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)))):void d(e,t,r);e._queue.push({type:t,value:r})}}class g{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let r=this,n={get closed(){return"closed"===r._state},next(e){y(r,"next",e)},error(e){y(r,"error",e)},complete(){y(r,"complete")}};try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(p(this),f(this))}}class h{constructor(e){if(!(this instanceof h))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new g(e,this._subscriber)}forEach(e){return new Promise(((t,r)=>{if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));function n(){o.unsubscribe(),t()}let o=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),o.unsubscribe()}},error:r,complete:t})}))}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))((t=>this.subscribe({next(r){try{r=e(r)}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))((t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=a(this),r=arguments.length>1,n=!1,o=arguments[1];return new t((t=>this.subscribe({next(i){let s=!n;if(n=!0,!s||r)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!n&&!r)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}})))}async all(){let e=[];return await this.forEach((t=>e.push(t))),e}concat(...e){let t=a(this);return new t((r=>{let n,o=0;return function i(s){n=s.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){o===e.length?(n=void 0,r.complete()):i(t.from(e[o++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}}))}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=a(this);return new t((r=>{let n=[],o=this.subscribe({next(o){if(e)try{o=e(o)}catch(e){return r.error(e)}let s=t.from(o).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){let e=n.indexOf(s);e>=0&&n.splice(e,1),i()}});n.push(s)},error(e){r.error(e)},complete(){i()}});function i(){o.closed&&0===n.length&&r.complete()}return()=>{n.forEach((e=>e.unsubscribe())),o.unsubscribe()}}))}[i](){return this}static from(e){let t="function"==typeof this?this:h;if(null==e)throw new TypeError(e+" is not an object");let n=c(e,i);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof h}(r)&&r.constructor===t?r:new t((e=>r.subscribe(e)))}if(r("iterator")&&(n=c(e,o),n))return new t((t=>{l((()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}}))}));if(Array.isArray(e))return new t((t=>{l((()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}));throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:h)((t=>{l((()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}))}static get[s](){return this}}t.Observable=h,Object.defineProperty(h,Symbol("extensions"),{value:{symbol:i,hostReportError:u},configurable:!0})}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var c=2&n&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,o.d(i,s),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=o(6064),t=o.n(e);const r={version:"4.17.2"};var n=o.t(r,2);var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var c="Invariant Violation",a=Object.setPrototypeOf,u=void 0===a?function(e,t){return e.__proto__=t,e}:a,l=function(e){function t(r){void 0===r&&(r=c);var n=e.call(this,"number"==typeof r?c+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=c,u(n,t.prototype),n}return s(t,e),t}(Error);function f(e,t){if(!e)throw new l(t)}var p=["debug","log","warn","error","silent"],d=p.indexOf("log");function y(e){return function(){if(p.indexOf(e)>=d)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=y("debug"),e.log=y("log"),e.warn=y("warn"),e.error=y("error")}(f||(f={}));var g="3.11.0";function h(e){try{return e()}catch(e){}}const b=h((function(){return globalThis}))||h((function(){return window}))||h((function(){return self}))||h((function(){return global}))||h((function(){return h.constructor("return this")()}));var m=new Map;function v(e,t){void 0===t&&(t=0);var r,n,o=(r="stringifyForDisplay",n=m.get(r)||1,m.set(r,n+1),"".concat(r,":").concat(n,":").concat(Math.random().toString(36).slice(2)));return JSON.stringify(e,(function(e,t){return void 0===t?o:t}),t).split(JSON.stringify(o)).join("<undefined>")}function w(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if("number"==typeof t){var o=t;(t=E(o))||(t=x(o,r),r=[])}e.apply(void 0,[t].concat(r))}}Object.assign((function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];e||f(e,E(t,r)||x(t,r))}),{debug:w(f.debug),log:w(f.log),warn:w(f.warn),error:w(f.error)});var _=Symbol.for("ApolloErrorMessageHandler_"+g);function O(e){if("string"==typeof e)return e;try{return v(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function E(e,t){if(void 0===t&&(t=[]),e)return b[_]&&b[_](e,t.map(O))}function x(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:g,message:e,args:t.map(O)})))}globalThis.__DEV__;function L(e){return{clientErrors:e.clientErrors.map((e=>e.message)),name:"ApolloError",networkError:e.networkError?T(e.networkError):void 0,message:e.message,graphQLErrors:e.graphQLErrors,protocolErrors:e.protocolErrors.map((e=>e.message))}}function S(e){const{options:t}=e,r={...(n=t,o=["context","pollInterval","partialRefetch","canonizeResults","returnPartialData","refetchWritePolicy","notifyOnNetworkStatusChange","fetchPolicy","errorPolicy"],o.reduce(((e,t)=>t in n?{...e,[t]:n[t]}:e),{})),nextFetchPolicy:"function"==typeof t.nextFetchPolicy?"<function>":t.nextFetchPolicy};var n,o;return null==r.nextFetchPolicy&&delete r.nextFetchPolicy,r.context&&(r.context=JSON.parse(JSON.stringify(r.context,((e,t)=>"function"==typeof t?"<function>":t)))),r}function T(e){return"object"!=typeof e?{message:String(e),name:typeof e}:{message:e.message,name:e.name,stack:e.stack}}function P(e){return e?function(e){return"ApolloError"===e.name}(e)?L(e):T(e):null}function k(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function A(e){return k(e)&&"rpcRequest"===e.type}function j(e){return k(e)&&"rpcResponse"===e.type}function M(e){const t=new Set;return{addListener(r){function n({data:e}){if(t.has(e.id))return t.delete(e.id);r(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(r){t.add(r.id),setTimeout((()=>t.delete(r.id)),10),e.postMessage(r,"*")}}}function C(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=new Uint8Array(10);return crypto.getRandomValues(t),Array.from(t).map((t=>e[t%62])).join("")}function q(e){let t=null;const r=new Map;function n(e){if(!function(e){return k(e)&&"event"===e.type}(e))return;const t=r.get(e.message.type);if(t)for(const r of t)r(e.message)}const o=(o,i)=>{let s=r.get(o);return s||(s=new Set,r.set(o,s)),s.add(i),t||(t=e.addListener(n)),()=>{s.delete(i),0===s.size&&r.delete(o),0===r.size&&t&&(t(),t=null)}};return{on:o,send:t=>{e.postMessage({id:C(),source:"apollo-client-devtools",type:"event",message:t})},forward:(e,t)=>o(e,t.send)}}const D=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,t)=>e.set(t.name,t)),new Map);const{version:I}=n,R=Symbol.for("apollo.devtools"),N=function(e){return q(M(e))}(window),Q=M(window),z=function(e){const t=new Map;let r=null;function n(e){A(e)&&t.get(e.name)?.(e)}return function(o,i){if(t.has(o))throw new Error("Only one rpc handler can be registered per type");return t.set(o,(async({id:t,params:r})=>{try{const n=await Promise.resolve(i(...r));e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:C(),sourceId:t,result:n})}catch(r){e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:C(),sourceId:t,error:(n=r,n instanceof Error?{name:n.name,message:n.message,stack:n.stack}:{message:String(n)})})}var n})),r||(r=e.addListener(n)),()=>{t.delete(o),0===t.size&&r&&(r(),r=null)}}}(Q),F=(V=Q,{timeout:3e4,withTimeout(e){return{...this,timeout:e}},request(e,...t){return new Promise(((r,n)=>{const o=C(),i=setTimeout((()=>{s(),n(new Error("RPC_MESSAGE_TIMEOUT"))}),this.timeout),s=V.addListener((e=>{j(e)&&e.sourceId===o&&("error"in e?n(function({name:e,message:t,stack:r}){const n=new(e?D.get(e)??Error:Error)(t);return e&&n.name!==e&&(n.name=e),r&&(n.stack=r),n}(e.error)):r(e.result),clearTimeout(i),s())}));V.postMessage({source:"apollo-client-devtools",type:"rpcRequest",id:o,name:e,params:t})}))}});var V;function G(e){const t=e;return t?.queryManager.getObservableQueries?function(e){const t=[];return e&&e.forEach(((e,r)=>{const n=e,{document:o,variables:i}=n.queryInfo,s=n.queryInfo.getDiff();if(!o)return;if("IntrospectionQuery"===(o.definitions.filter((function(e){return"OperationDefinition"===e.kind&&!!e.name})).map((function(e){return e.name.value}))[0]||null))return;const{pollingInfo:c}=n,{networkStatus:a,error:u}=n.getCurrentResult(!1);t.push({id:r,document:o,variables:i,cachedData:s.result,options:S(e),networkStatus:a,error:u?L(u):void 0,pollInterval:c&&Math.floor(c.interval)})})),t}(t.queryManager.getObservableQueries("active")):function(e){let t=[];return e&&(t=[...e.entries()].map((([e,{document:t,variables:r,diff:n,networkStatus:o}])=>({id:e,document:t,variables:r,cachedData:n?.result,networkStatus:o??1})))),t}(t?.queryManager.queries)}function H(e){const t=e;return function(e){const t=Object.keys(e);return 0===t.length?[]:t.map((t=>{const{mutation:r,variables:n,loading:o,error:i}=e[t];return{document:r,variables:n,loading:o,error:P(i)}}))}((t?.queryManager.mutationStore?.getStore?t.queryManager.mutationStore?.getStore():t?.queryManager.mutationStore)??{})}const J=new Map,B={get ApolloClient(){return Y("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient"),X},version:I,getQueries:()=>(Y("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getQueries()"),G(B.ApolloClient)),getMutations:()=>(Y("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getMutations()"),H(B.ApolloClient)),getCache:()=>(Y("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getCache()"),B.ApolloClient?.cache.extract(!0)??{})};function K(e){return{id:J.get(e),name:"devtoolsConfig"in e?e.devtoolsConfig.name:void 0,version:e.version,queryCount:G(e).length,mutationCount:H(e).length}}function U(e){const[t]=[...J.entries()].find((([,t])=>t===e))??[];return t}function W(e){if(!J.has(e)){const t=C();J.set(e,t),function(e){const t=e.stop;e.stop=()=>{const r=J.get(e);J.delete(e),window.__APOLLO_CLIENT__===e&&(window.__APOLLO_CLIENT__=void 0),N.send({type:"clientTerminated",clientId:r}),t.call(e)}}(e),N.send({type:"registerClient",payload:K(e)})}!function(e,t){e.request("getErrorCodes",t).catch((()=>{})).then((e=>{if(!e)return;const r=Symbol.for("ApolloErrorMessageHandler_"+t),n=globalThis;function o(e,t){if("number"==typeof e){const t=n[r][e];if(!e||!t?.message)return;e=t.message}return t.reduce(((e,t)=>e.replace(/%[sdfo]/,String(t))),String(e))}n[r]||(n[r]=o);const i=n[r];(i===o||Object.keys(i).some((e=>/^\d+$/.test(e))))&&Object.assign(i,e,{...i})}))}(F,e.version)}Object.defineProperty(window,"__APOLLO_DEVTOOLS_GLOBAL_HOOK__",{get:()=>B,configurable:!0}),z("getClients",(()=>[...J.keys()].map(K))),z("getClient",(e=>{const t=U(e);return t?K(t):null})),z("getQueries",(e=>G(U(e)))),z("getMutations",(e=>H(U(e)))),z("getCache",(e=>JSON.parse(JSON.stringify(U(e)?.cache.extract(!0)??{})))),N.on("connectToClient",(()=>{X&&N.send({type:"connectToDevtools"})})),N.on("explorerRequest",(e=>{const{clientId:r,operation:n,operationName:o,fetchPolicy:i,variables:s}=e.payload,c=U(r);if(!c)throw new Error("Could not find selected client");const a=structuredClone(n),u=a.definitions.reduce(((e,t)=>(("OperationDefinition"===t.kind&&t.name?.value===o||"OperationDefinition"!==t.kind)&&e.push(t),e)),[]);a.definitions=u;const l=function(e){let t;for(const r of e.definitions){if("OperationDefinition"===r.kind){const e=r.operation;if("query"===e||"mutation"===e||"subscription"===e)return r}"FragmentDefinition"!==r.kind||t||(t=r)}if(t)return t;throw new Error("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.")}(a),f="OperationDefinition"===l.kind&&"mutation"===l.operation?new(t())((e=>{c.mutate({mutation:a,variables:s}).then((t=>{e.next(t)}))})):c.watchQuery({query:a,variables:s,fetchPolicy:i}),p=f?.subscribe((e=>{N.send({type:"explorerResponse",payload:{operationName:o,response:e}})}),(e=>{N.send({type:"explorerResponse",payload:{operationName:o,response:{errors:e.graphQLErrors.length?e.graphQLErrors:e.networkError&&"result"in e.networkError?"string"==typeof e.networkError?.result?e.networkError?.result:e.networkError?.result.errors??[]:[],error:e,data:null,loading:!1,networkStatus:8}}})}));"OperationDefinition"===l.kind&&"subscription"===l.operation&&N.on("explorerSubscriptionTermination",(()=>{p?.unsubscribe()}))}));const $=window[R];window[R]={push:W},Array.isArray($)&&$.forEach(W);let X=window.__APOLLO_CLIENT__;function Y(e){console.warn(`[Apollo Client Devtools]: '${e}' is deprecated and will be removed in a future version.`)}Object.defineProperty(window,"__APOLLO_CLIENT__",{get:()=>X,set(e){e&&setTimeout((()=>W(e))),X=e},configurable:!0}),X&&W(X)})()})(); | ||
(()=>{var e,t,r={6064:(e,t,r)=>{e.exports=r(3619).Observable},3619:(e,t)=>{"use strict";t.Observable=void 0;const r=e=>Boolean(Symbol[e]),n=e=>r(e)?Symbol[e]:"@@"+e,o=n("iterator"),i=n("observable"),s=n("species");function c(e,t){let r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function a(e){let t=e.constructor;return void 0!==t&&(t=t[s],null===t&&(t=void 0)),void 0!==t?t:h}function u(e){u.log?u.log(e):setTimeout((()=>{throw e}))}function l(e){Promise.resolve().then((()=>{try{e()}catch(e){u(e)}}))}function f(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=c(t,"unsubscribe");e&&e.call(t)}}catch(e){u(e)}}function p(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function d(e,t,r){e._state="running";let n=e._observer;try{let o=c(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(p(e),!o)throw r;o.call(n,r);break;case"complete":p(e),o&&o.call(n)}}catch(e){u(e)}"closed"===e._state?f(e):"running"===e._state&&(e._state="ready")}function y(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void l((()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(d(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)))):void d(e,t,r);e._queue.push({type:t,value:r})}}class g{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let r=this,n={get closed(){return"closed"===r._state},next(e){y(r,"next",e)},error(e){y(r,"error",e)},complete(){y(r,"complete")}};try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(p(this),f(this))}}class h{constructor(e){if(!(this instanceof h))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new g(e,this._subscriber)}forEach(e){return new Promise(((t,r)=>{if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));function n(){o.unsubscribe(),t()}let o=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),o.unsubscribe()}},error:r,complete:t})}))}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))((t=>this.subscribe({next(r){try{r=e(r)}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))((t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=a(this),r=arguments.length>1,n=!1,o=arguments[1];return new t((t=>this.subscribe({next(i){let s=!n;if(n=!0,!s||r)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!n&&!r)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}})))}async all(){let e=[];return await this.forEach((t=>e.push(t))),e}concat(...e){let t=a(this);return new t((r=>{let n,o=0;return function i(s){n=s.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){o===e.length?(n=void 0,r.complete()):i(t.from(e[o++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}}))}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=a(this);return new t((r=>{let n=[],o=this.subscribe({next(o){if(e)try{o=e(o)}catch(e){return r.error(e)}let s=t.from(o).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){let e=n.indexOf(s);e>=0&&n.splice(e,1),i()}});n.push(s)},error(e){r.error(e)},complete(){i()}});function i(){o.closed&&0===n.length&&r.complete()}return()=>{n.forEach((e=>e.unsubscribe())),o.unsubscribe()}}))}[i](){return this}static from(e){let t="function"==typeof this?this:h;if(null==e)throw new TypeError(e+" is not an object");let n=c(e,i);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof h}(r)&&r.constructor===t?r:new t((e=>r.subscribe(e)))}if(r("iterator")&&(n=c(e,o),n))return new t((t=>{l((()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}}))}));if(Array.isArray(e))return new t((t=>{l((()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}));throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:h)((t=>{l((()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}))}static get[s](){return this}}t.Observable=h,Object.defineProperty(h,Symbol("extensions"),{value:{symbol:i,hostReportError:u},configurable:!0})}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var c=2&n&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,o.d(i,s),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=o(6064),t=o.n(e);const r={version:"4.17.3"};var n=o.t(r,2);var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var c="Invariant Violation",a=Object.setPrototypeOf,u=void 0===a?function(e,t){return e.__proto__=t,e}:a,l=function(e){function t(r){void 0===r&&(r=c);var n=e.call(this,"number"==typeof r?c+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=c,u(n,t.prototype),n}return s(t,e),t}(Error);function f(e,t){if(!e)throw new l(t)}var p=["debug","log","warn","error","silent"],d=p.indexOf("log");function y(e){return function(){if(p.indexOf(e)>=d)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=y("debug"),e.log=y("log"),e.warn=y("warn"),e.error=y("error")}(f||(f={}));var g="3.11.0";function h(e){try{return e()}catch(e){}}const b=h((function(){return globalThis}))||h((function(){return window}))||h((function(){return self}))||h((function(){return global}))||h((function(){return h.constructor("return this")()}));var m=new Map;function w(e,t){void 0===t&&(t=0);var r,n,o=(r="stringifyForDisplay",n=m.get(r)||1,m.set(r,n+1),"".concat(r,":").concat(n,":").concat(Math.random().toString(36).slice(2)));return JSON.stringify(e,(function(e,t){return void 0===t?o:t}),t).split(JSON.stringify(o)).join("<undefined>")}function _(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if("number"==typeof t){var o=t;(t=E(o))||(t=x(o,r),r=[])}e.apply(void 0,[t].concat(r))}}Object.assign((function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];e||f(e,E(t,r)||x(t,r))}),{debug:_(f.debug),log:_(f.log),warn:_(f.warn),error:_(f.error)});var v=Symbol.for("ApolloErrorMessageHandler_"+g);function O(e){if("string"==typeof e)return e;try{return w(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function E(e,t){if(void 0===t&&(t=[]),e)return b[v]&&b[v](e,t.map(O))}function x(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:g,message:e,args:t.map(O)})))}globalThis.__DEV__;function L(e){return{clientErrors:e.clientErrors.map((e=>e.message)),name:"ApolloError",networkError:e.networkError?P(e.networkError):void 0,message:e.message,graphQLErrors:e.graphQLErrors,protocolErrors:e.protocolErrors.map((e=>e.message))}}function S(e){const{options:t}=e,r={...(n=t,o=["context","pollInterval","partialRefetch","canonizeResults","returnPartialData","refetchWritePolicy","notifyOnNetworkStatusChange","fetchPolicy","errorPolicy"],o.reduce(((e,t)=>t in n?{...e,[t]:n[t]}:e),{})),nextFetchPolicy:"function"==typeof t.nextFetchPolicy?"<function>":t.nextFetchPolicy};var n,o;return null==r.nextFetchPolicy&&delete r.nextFetchPolicy,r.context&&(r.context=JSON.parse(JSON.stringify(r.context,((e,t)=>"function"==typeof t?"<function>":t)))),r}function P(e){return"object"!=typeof e?{message:String(e),name:typeof e}:{message:e.message,name:e.name,stack:e.stack}}function T(e){return e?function(e){return"ApolloError"===e.name}(e)?L(e):P(e):null}function k(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function A(e){const t=new Set;return{addListener(r){function n({data:e}){if(t.has(e.id))return t.delete(e.id);r(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(r){t.add(r.id),setTimeout((()=>t.delete(r.id)),10),e.postMessage(r,"*")}}}function j(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=new Uint8Array(10);return crypto.getRandomValues(t),Array.from(t).map((t=>e[t%62])).join("")}function M(e){let t=null;const r=new Map;function n(e){if(!function(e){return k(e)&&"actor"===e.type}(e))return;const t=r.get(e.message.type);if(t)for(const r of t)r(e.message)}return{on:(o,i)=>{let s=r.get(o);return s||(s=new Set,r.set(o,s)),s.add(i),t||(t=e.addListener(n)),()=>{s.delete(i),0===s.size&&r.delete(o),0===r.size&&t&&(t(),t=null)}},send:t=>{e.postMessage({id:j(),source:"apollo-client-devtools",type:"actor",message:t})}}}const C=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,t)=>e.set(t.name,t)),new Map);const{version:q}=n,D=Symbol.for("apollo.devtools"),I=function(e){return M(A(e))}(window),R=A(window),N=function(e){const t=new Map;let r=null;function n(e){(function(e){return k(e)&&"rpcRequest"===e.type})(e)&&t.get(e.name)?.(e)}return function(o,i){if(t.has(o))throw new Error("Only one rpc handler can be registered per type");return t.set(o,(async({id:t,params:r})=>{try{const n=await Promise.resolve(i(...r));e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:j(),sourceId:t,result:n})}catch(r){e.postMessage({source:"apollo-client-devtools",type:"rpcResponse",id:j(),sourceId:t,error:(n=r,n instanceof Error?{name:n.name,message:n.message,stack:n.stack}:{message:String(n)})})}var n})),r||(r=e.addListener(n)),()=>{t.delete(o),0===t.size&&r&&(r(),r=null)}}}(R),Q=(z=R,{timeout:3e4,withTimeout(e){return{...this,timeout:e}},request(e,...t){return new Promise(((r,n)=>{const o=j(),i=setTimeout((()=>{s(),n(new Error("RPC_MESSAGE_TIMEOUT"))}),this.timeout),s=z.addListener((e=>{(function(e){return k(e)&&"rpcResponse"===e.type})(e)&&e.sourceId===o&&("error"in e?n(function({name:e,message:t,stack:r}){const n=new(e?C.get(e)??Error:Error)(t);return e&&n.name!==e&&(n.name=e),r&&(n.stack=r),n}(e.error)):r(e.result),clearTimeout(i),s())}));z.postMessage({source:"apollo-client-devtools",type:"rpcRequest",id:o,name:e,params:t})}))}});var z;function F(e){const t=e;return t?.queryManager.getObservableQueries?function(e){const t=[];return e&&e.forEach(((e,r)=>{const n=e,{document:o,variables:i}=n.queryInfo,s=n.queryInfo.getDiff();if(!o)return;if("IntrospectionQuery"===(o.definitions.filter((function(e){return"OperationDefinition"===e.kind&&!!e.name})).map((function(e){return e.name.value}))[0]||null))return;const{pollingInfo:c}=n,{networkStatus:a,error:u}=n.getCurrentResult(!1);t.push({id:r,document:o,variables:i,cachedData:s.result,options:S(e),networkStatus:a,error:u?L(u):void 0,pollInterval:c&&Math.floor(c.interval)})})),t}(t.queryManager.getObservableQueries("active")):function(e){let t=[];return e&&(t=[...e.entries()].map((([e,{document:t,variables:r,diff:n,networkStatus:o}])=>({id:e,document:t,variables:r,cachedData:n?.result,networkStatus:o??1})))),t}(t?.queryManager.queries)}function V(e){const t=e;return function(e){const t=Object.keys(e);return 0===t.length?[]:t.map((t=>{const{mutation:r,variables:n,loading:o,error:i}=e[t];return{document:r,variables:n,loading:o,error:T(i)}}))}((t?.queryManager.mutationStore?.getStore?t.queryManager.mutationStore?.getStore():t?.queryManager.mutationStore)??{})}const G=new Map,H={get ApolloClient(){return $("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient"),W},version:q,getQueries:()=>($("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getQueries()"),F(H.ApolloClient)),getMutations:()=>($("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getMutations()"),V(H.ApolloClient)),getCache:()=>($("window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.getCache()"),H.ApolloClient?.cache.extract(!0)??{})};function J(e){return{id:G.get(e),name:"devtoolsConfig"in e?e.devtoolsConfig.name:void 0,version:e.version,queryCount:F(e).length,mutationCount:V(e).length}}function B(e){const[t]=[...G.entries()].find((([,t])=>t===e))??[];return t}function K(e){if(!G.has(e)){const t=j();G.set(e,t),function(e){const t=e.stop;e.stop=()=>{const r=G.get(e);G.delete(e),window.__APOLLO_CLIENT__===e&&(window.__APOLLO_CLIENT__=void 0),I.send({type:"clientTerminated",clientId:r}),t.call(e)}}(e),I.send({type:"registerClient",payload:J(e)})}!function(e,t){e.request("getErrorCodes",t).catch((()=>{})).then((e=>{if(!e)return;const r=Symbol.for("ApolloErrorMessageHandler_"+t),n=globalThis;function o(e,t){if("number"==typeof e){const t=n[r][e];if(!e||!t?.message)return;e=t.message}return t.reduce(((e,t)=>e.replace(/%[sdfo]/,String(t))),String(e))}n[r]||(n[r]=o);const i=n[r];(i===o||Object.keys(i).some((e=>/^\d+$/.test(e))))&&Object.assign(i,e,{...i})}))}(Q,e.version)}Object.defineProperty(window,"__APOLLO_DEVTOOLS_GLOBAL_HOOK__",{get:()=>H,configurable:!0}),N("getClients",(()=>[...G.keys()].map(J))),N("getClient",(e=>{const t=B(e);return t?J(t):null})),N("getQueries",(e=>F(B(e)))),N("getMutations",(e=>V(B(e)))),N("getCache",(e=>JSON.parse(JSON.stringify(B(e)?.cache.extract(!0)??{})))),I.on("explorerRequest",(e=>{const{clientId:r,operation:n,operationName:o,fetchPolicy:i,variables:s}=e.payload,c=B(r);if(!c)throw new Error("Could not find selected client");const a=structuredClone(n),u=a.definitions.reduce(((e,t)=>(("OperationDefinition"===t.kind&&t.name?.value===o||"OperationDefinition"!==t.kind)&&e.push(t),e)),[]);a.definitions=u;const l=function(e){let t;for(const r of e.definitions){if("OperationDefinition"===r.kind){const e=r.operation;if("query"===e||"mutation"===e||"subscription"===e)return r}"FragmentDefinition"!==r.kind||t||(t=r)}if(t)return t;throw new Error("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.")}(a),f="OperationDefinition"===l.kind&&"mutation"===l.operation?new(t())((e=>{c.mutate({mutation:a,variables:s}).then((t=>{e.next(t)}))})):c.watchQuery({query:a,variables:s,fetchPolicy:i}),p=f?.subscribe((e=>{I.send({type:"explorerResponse",payload:{operationName:o,response:e}})}),(e=>{I.send({type:"explorerResponse",payload:{operationName:o,response:{errors:e.graphQLErrors.length?e.graphQLErrors:e.networkError&&"result"in e.networkError?"string"==typeof e.networkError?.result?e.networkError?.result:e.networkError?.result.errors??[]:[],error:e,data:null,loading:!1,networkStatus:8}}})}));"OperationDefinition"===l.kind&&"subscription"===l.operation&&I.on("explorerSubscriptionTermination",(()=>{p?.unsubscribe()}))}));const U=window[D];window[D]={push:K},Array.isArray(U)&&U.forEach(K);let W=window.__APOLLO_CLIENT__;function $(e){console.warn(`[Apollo Client Devtools]: '${e}' is deprecated and will be removed in a future version.`)}Object.defineProperty(window,"__APOLLO_CLIENT__",{get:()=>W,set(e){e&&setTimeout((()=>K(e))),W=e},configurable:!0}),W&&K(W)})()})(); |
{ | ||
"version": "4.17.2", | ||
"version": "4.17.3", | ||
"author": "Apollo", | ||
@@ -4,0 +4,0 @@ "name": "Apollo Client Devtools", |
@@ -1,1 +0,1 @@ | ||
(()=>{var e={6815:function(e,r){var s,n,t;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=[e],s=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const r="The message port closed before a response was received.",s=e=>{const s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(s).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class n extends WeakMap{constructor(e,r=void 0){super(r),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const t=e=>e&&"object"==typeof e&&"function"==typeof e.then,a=(r,s)=>(...n)=>{e.runtime.lastError?r.reject(new Error(e.runtime.lastError.message)):s.singleCallbackArg||n.length<=1&&!1!==s.singleCallbackArg?r.resolve(n[0]):r.resolve(n)},g=e=>1==e?"argument":"arguments",m=(e,r)=>function(s,...n){if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${g(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${g(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((t,g)=>{if(r.fallbackToNoCallback)try{s[e](...n,a({resolve:t,reject:g},r))}catch(a){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,a),s[e](...n),r.fallbackToNoCallback=!1,r.noCallback=!0,t()}else r.noCallback?(s[e](...n),t()):s[e](...n,a({resolve:t,reject:g},r))}))},o=(e,r,s)=>new Proxy(r,{apply:(r,n,t)=>s.call(n,e,...t)});let i=Function.call.bind(Object.prototype.hasOwnProperty);const A=(e,r={},s={})=>{let n=Object.create(null),t={has:(r,s)=>s in e||s in n,get(t,a,g){if(a in n)return n[a];if(!(a in e))return;let l=e[a];if("function"==typeof l)if("function"==typeof r[a])l=o(e,e[a],r[a]);else if(i(s,a)){let r=m(a,s[a]);l=o(e,e[a],r)}else l=l.bind(e);else if("object"==typeof l&&null!==l&&(i(r,a)||i(s,a)))l=A(l,r[a],s[a]);else{if(!i(s,"*"))return Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:()=>e[a],set(r){e[a]=r}}),l;l=A(l,r[a],s["*"])}return n[a]=l,l},set:(r,s,t,a)=>(s in n?n[s]=t:e[s]=t,!0),defineProperty:(e,r,s)=>Reflect.defineProperty(n,r,s),deleteProperty:(e,r)=>Reflect.deleteProperty(n,r)},a=Object.create(e);return new Proxy(a,t)},l=e=>({addListener(r,s,...n){r.addListener(e.get(s),...n)},hasListener:(r,s)=>r.hasListener(e.get(s)),removeListener(r,s){r.removeListener(e.get(s))}}),c=new n((e=>"function"!=typeof e?e:function(r){const s=A(r,{},{getContent:{minArgs:0,maxArgs:0}});e(s)})),x=new n((e=>"function"!=typeof e?e:function(r,s,n){let a,g,m=!1,o=new Promise((e=>{a=function(r){m=!0,e(r)}}));try{g=e(r,s,a)}catch(e){g=Promise.reject(e)}const i=!0!==g&&t(g);if(!0!==g&&!i&&!m)return!1;const A=e=>{e.then((e=>{n(e)}),(e=>{let r;r=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",n({__mozWebExtensionPolyfillReject__:!0,message:r})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return A(i?g:o),!0})),d=({reject:s,resolve:n},t)=>{e.runtime.lastError?e.runtime.lastError.message===r?n():s(new Error(e.runtime.lastError.message)):t&&t.__mozWebExtensionPolyfillReject__?s(new Error(t.message)):n(t)},u=(e,r,s,...n)=>{if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${g(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${g(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((e,r)=>{const t=d.bind(null,{resolve:e,reject:r});n.push(t),s.sendMessage(...n)}))},f={devtools:{network:{onRequestFinished:l(c)}},runtime:{onMessage:l(x),onMessageExternal:l(x),sendMessage:u.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:u.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},p={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":p},services:{"*":p},websites:{"*":p}},A(e,f,s)};e.exports=s(chrome)}},void 0===(t="function"==typeof s?s.apply(r,n):s)||(e.exports=t)}},r={};function s(n){var t=r[n];if(void 0!==t)return t.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,s),a.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var n in r)s.o(r,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";var e=s(6815),r=s.n(e);function n(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}function t(e){return function(e){return n(e)&&"rpcRequest"===e.type}(e)||function(e){return n(e)&&"rpcResponse"===e.type}(e)}function a(e){const r=new Set;return{addListener(s){function n({data:e}){if(r.has(e.id))return r.delete(e.id);s(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(s){r.add(s.id),setTimeout((()=>r.delete(s.id)),10),e.postMessage(s,"*")}}}function g(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(10);return crypto.getRandomValues(r),Array.from(r).map((r=>e[r%62])).join("")}function m(e){let r=null;const s=new Map;function t(e){if(!function(e){return n(e)&&"event"===e.type}(e))return;const r=s.get(e.message.type);if(r)for(const s of r)s(e.message)}const a=(n,a)=>{let g=s.get(n);return g||(g=new Set,s.set(n,g)),g.add(a),r||(r=e.addListener(t)),()=>{g.delete(a),0===g.size&&s.delete(n),0===s.size&&r&&(r(),r=null)}};return{on:a,send:r=>{e.postMessage({id:g(),source:"apollo-client-devtools",type:"event",message:r})},forward:(e,r)=>a(e,r.send)}}[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].reduce(((e,r)=>e.set(r.name,r)),new Map);const o=function(e){let r=e();const s=new Set;function n(){s.forEach((e=>{r.onMessage.removeListener(e)})),r.onDisconnect.removeListener(n),r=e(),t()}function t(){s.forEach((e=>r.onMessage.addListener(e))),r.onDisconnect.addListener(n)}return t(),{addListener:e=>(s.add(e),r.onMessage.addListener(e),()=>{s.delete(e),r.onMessage.removeListener(e)}),postMessage:e=>r.postMessage(e)}}((()=>r().runtime.connect({name:"tab"}))),i=function(e){return m(a(e))}(window),A=m(o);!function(e,r){const s=e.addListener((e=>{t(e)&&r.postMessage(e)})),n=r.addListener((r=>{t(r)&&e.postMessage(r)}))}(o,a(window)),A.forward("connectToClient",i),A.forward("explorerSubscriptionTermination",i),A.forward("explorerRequest",i),i.forward("registerClient",A),i.forward("connectToDevtools",A),i.forward("clientTerminated",A),i.forward("explorerResponse",A);{function l(e){let r="";const s=new XMLHttpRequest;s.addEventListener("load",(function(){r=this.responseText})),s.open("GET",e,!1),s.send();const n=document.createElement("script");n.textContent=r,"object"==typeof document&&document instanceof Document&&(document.documentElement.appendChild(n),n.parentNode?.removeChild(n))}l(r().runtime.getURL("hook.js"))}})()})(); | ||
(()=>{var e={6815:function(e,r){var s,n,g;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=[e],s=function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{const r="The message port closed before a response was received.",s=e=>{const s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(s).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class n extends WeakMap{constructor(e,r=void 0){super(r),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const g=e=>e&&"object"==typeof e&&"function"==typeof e.then,a=(r,s)=>(...n)=>{e.runtime.lastError?r.reject(new Error(e.runtime.lastError.message)):s.singleCallbackArg||n.length<=1&&!1!==s.singleCallbackArg?r.resolve(n[0]):r.resolve(n)},t=e=>1==e?"argument":"arguments",m=(e,r)=>function(s,...n){if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${t(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${t(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((g,t)=>{if(r.fallbackToNoCallback)try{s[e](...n,a({resolve:g,reject:t},r))}catch(a){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,a),s[e](...n),r.fallbackToNoCallback=!1,r.noCallback=!0,g()}else r.noCallback?(s[e](...n),g()):s[e](...n,a({resolve:g,reject:t},r))}))},i=(e,r,s)=>new Proxy(r,{apply:(r,n,g)=>s.call(n,e,...g)});let o=Function.call.bind(Object.prototype.hasOwnProperty);const A=(e,r={},s={})=>{let n=Object.create(null),g={has:(r,s)=>s in e||s in n,get(g,a,t){if(a in n)return n[a];if(!(a in e))return;let l=e[a];if("function"==typeof l)if("function"==typeof r[a])l=i(e,e[a],r[a]);else if(o(s,a)){let r=m(a,s[a]);l=i(e,e[a],r)}else l=l.bind(e);else if("object"==typeof l&&null!==l&&(o(r,a)||o(s,a)))l=A(l,r[a],s[a]);else{if(!o(s,"*"))return Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:()=>e[a],set(r){e[a]=r}}),l;l=A(l,r[a],s["*"])}return n[a]=l,l},set:(r,s,g,a)=>(s in n?n[s]=g:e[s]=g,!0),defineProperty:(e,r,s)=>Reflect.defineProperty(n,r,s),deleteProperty:(e,r)=>Reflect.deleteProperty(n,r)},a=Object.create(e);return new Proxy(a,g)},l=e=>({addListener(r,s,...n){r.addListener(e.get(s),...n)},hasListener:(r,s)=>r.hasListener(e.get(s)),removeListener(r,s){r.removeListener(e.get(s))}}),c=new n((e=>"function"!=typeof e?e:function(r){const s=A(r,{},{getContent:{minArgs:0,maxArgs:0}});e(s)})),x=new n((e=>"function"!=typeof e?e:function(r,s,n){let a,t,m=!1,i=new Promise((e=>{a=function(r){m=!0,e(r)}}));try{t=e(r,s,a)}catch(e){t=Promise.reject(e)}const o=!0!==t&&g(t);if(!0!==t&&!o&&!m)return!1;const A=e=>{e.then((e=>{n(e)}),(e=>{let r;r=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",n({__mozWebExtensionPolyfillReject__:!0,message:r})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return A(o?t:i),!0})),d=({reject:s,resolve:n},g)=>{e.runtime.lastError?e.runtime.lastError.message===r?n():s(new Error(e.runtime.lastError.message)):g&&g.__mozWebExtensionPolyfillReject__?s(new Error(g.message)):n(g)},u=(e,r,s,...n)=>{if(n.length<r.minArgs)throw new Error(`Expected at least ${r.minArgs} ${t(r.minArgs)} for ${e}(), got ${n.length}`);if(n.length>r.maxArgs)throw new Error(`Expected at most ${r.maxArgs} ${t(r.maxArgs)} for ${e}(), got ${n.length}`);return new Promise(((e,r)=>{const g=d.bind(null,{resolve:e,reject:r});n.push(g),s.sendMessage(...n)}))},p={devtools:{network:{onRequestFinished:l(c)}},runtime:{onMessage:l(x),onMessageExternal:l(x),sendMessage:u.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:u.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},f={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":f},services:{"*":f},websites:{"*":f}},A(e,p,s)};e.exports=s(chrome)}},void 0===(g="function"==typeof s?s.apply(r,n):s)||(e.exports=g)}},r={};function s(n){var g=r[n];if(void 0!==g)return g.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,s),a.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var n in r)s.o(r,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";var e=s(6815),r=s.n(e);function n(e){return"object"==typeof e&&null!==e&&"source"in e&&"apollo-client-devtools"===e.source}!function(e,r){const s=e.addListener((e=>{n(e)&&r.postMessage(e)})),g=r.addListener((r=>{n(r)&&e.postMessage(r)}))}(function(e){let r=e();const s=new Set;function n(){s.forEach((e=>{r.onMessage.removeListener(e)})),r.onDisconnect.removeListener(n),r=e(),g()}function g(){s.forEach((e=>r.onMessage.addListener(e))),r.onDisconnect.addListener(n)}return g(),{addListener:e=>(s.add(e),r.onMessage.addListener(e),()=>{s.delete(e),r.onMessage.removeListener(e)}),postMessage:e=>r.postMessage(e)}}((()=>r().runtime.connect({name:"tab"}))),function(e){const r=new Set;return{addListener(s){function n({data:e}){if(r.has(e.id))return r.delete(e.id);s(e)}return e.addEventListener("message",n),()=>{e.removeEventListener("message",n)}},postMessage(s){r.add(s.id),setTimeout((()=>r.delete(s.id)),10),e.postMessage(s,"*")}}}(window));{function g(e){let r="";const s=new XMLHttpRequest;s.addEventListener("load",(function(){r=this.responseText})),s.open("GET",e,!1),s.send();const n=document.createElement("script");n.textContent=r,"object"==typeof document&&document instanceof Document&&(document.documentElement.appendChild(n),n.parentNode?.removeChild(n))}g(r().runtime.getURL("hook.js"))}})()})(); |
# Changelog | ||
## 4.17.3 | ||
### Patch Changes | ||
- [#1461](https://github.com/apollographql/apollo-client-devtools/pull/1461) [`36cd3bb`](https://github.com/apollographql/apollo-client-devtools/commit/36cd3bb30750401d52edcfd0baab506f26ed694a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Create a universal message bridge to handle both actor and rpc messages. | ||
- [#1460](https://github.com/apollographql/apollo-client-devtools/pull/1460) [`4a58340`](https://github.com/apollographql/apollo-client-devtools/commit/4a5834064e64724589b2922b72a1e72dcffdf196) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove unneeded initialization message to determine if page had a client instance. | ||
- [#1460](https://github.com/apollographql/apollo-client-devtools/pull/1460) [`4a58340`](https://github.com/apollographql/apollo-client-devtools/commit/4a5834064e64724589b2922b72a1e72dcffdf196) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue when disconnecting from the client that would show stale data until reconnected. | ||
## 4.17.2 | ||
@@ -4,0 +14,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "4.17.2", | ||
"version": "4.17.3", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "repository": { |
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { useEffect, useLayoutEffect, useRef } from "react"; | ||
import type { PanelMessage } from "../../extension/messages"; | ||
import { getPanelActor } from "../../extension/devtools/panelActor"; | ||
import type { ActorMessage } from "../../extension/actor"; | ||
export function useActorEvent<TName extends PanelMessage["type"]>( | ||
export function useActorEvent<TName extends ActorMessage["type"]>( | ||
name: TName, | ||
callback: Extract<PanelMessage, { type: TName }> extends infer Message | ||
callback: Extract<ActorMessage, { type: TName }> extends infer Message | ||
? (message: Message) => void | ||
@@ -10,0 +10,0 @@ : never |
@@ -1,2 +0,1 @@ | ||
import type { DevtoolsRPCMessage } from "../extension/messages"; | ||
import type { RpcClient } from "../extension/rpc"; | ||
@@ -9,5 +8,3 @@ import typeDefs from "./localSchema.graphql"; | ||
export function createSchemaWithRpcClient( | ||
rpcClient: RpcClient<DevtoolsRPCMessage> | ||
) { | ||
export function createSchemaWithRpcClient(rpcClient: RpcClient) { | ||
return makeExecutableSchema({ | ||
@@ -19,3 +16,3 @@ typeDefs, | ||
function createResolvers(client: RpcClient<DevtoolsRPCMessage>): Resolvers { | ||
function createResolvers(client: RpcClient): Resolvers { | ||
const rpcClient = client.withTimeout(3000); | ||
@@ -22,0 +19,0 @@ |
import { createActor } from "../actor"; | ||
import { MessageType } from "../messages"; | ||
function createTestAdapter<Messages = unknown>() { | ||
function createTestAdapter() { | ||
let listener: ((message: unknown) => void) | null; | ||
@@ -15,6 +15,6 @@ const removeListener = jest.fn(() => { | ||
}, | ||
simulateDevtoolsMessage: (message: Messages) => { | ||
simulateDevtoolsMessage: (message: Record<string, unknown>) => { | ||
listener?.({ | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
type: MessageType.Actor, | ||
message, | ||
@@ -33,8 +33,6 @@ }); | ||
test("sends messages to specified adapter in devtools message format", () => { | ||
type Message = { type: "test"; payload: string }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor<Message>(adapter); | ||
const actor = createActor(adapter); | ||
actor.send({ type: "test", payload: "Hello" }); | ||
actor.send({ type: "clientTerminated", clientId: "1" }); | ||
@@ -44,6 +42,6 @@ expect(adapter.postMessage).toHaveBeenCalledWith({ | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
type: MessageType.Actor, | ||
message: { | ||
type: "test", | ||
payload: "Hello", | ||
type: "clientTerminated", | ||
clientId: "1", | ||
}, | ||
@@ -54,38 +52,35 @@ }); | ||
test("calls message callback when subscribing to a message", () => { | ||
type Message = { type: "connect"; payload: string } | { type: "disconnect" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor(adapter); | ||
const adapter = createTestAdapter<Message>(); | ||
const actor = createActor<Message>(adapter); | ||
const handleConnect = jest.fn(); | ||
const handleDisconnect = jest.fn(); | ||
actor.on("connect", handleConnect); | ||
actor.on("disconnect", handleDisconnect); | ||
actor.on("initializePanel", handleConnect); | ||
actor.on("clientTerminated", handleDisconnect); | ||
adapter.simulateDevtoolsMessage({ | ||
type: "connect", | ||
payload: "Connected!", | ||
}); | ||
adapter.simulateDevtoolsMessage({ type: "initializePanel" }); | ||
expect(handleConnect).toHaveBeenCalledTimes(1); | ||
expect(handleConnect).toHaveBeenCalledWith({ | ||
type: "connect", | ||
payload: "Connected!", | ||
}); | ||
expect(handleConnect).toHaveBeenCalledWith({ type: "initializePanel" }); | ||
expect(handleDisconnect).not.toHaveBeenCalled(); | ||
adapter.simulateDevtoolsMessage({ type: "disconnect" }); | ||
adapter.simulateDevtoolsMessage({ type: "disconnect" }); | ||
adapter.simulateDevtoolsMessage({ type: "clientTerminated", clientId: "1" }); | ||
adapter.simulateDevtoolsMessage({ type: "clientTerminated", clientId: "2" }); | ||
expect(handleDisconnect).toHaveBeenCalledTimes(2); | ||
expect(handleDisconnect).toHaveBeenCalledWith({ type: "disconnect" }); | ||
expect(handleDisconnect).toHaveBeenCalledWith({ | ||
type: "clientTerminated", | ||
clientId: "1", | ||
}); | ||
expect(handleDisconnect).toHaveBeenCalledWith({ | ||
type: "clientTerminated", | ||
clientId: "2", | ||
}); | ||
}); | ||
test("calls all listeners for the same message", () => { | ||
type Message = { type: "test" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor(adapter); | ||
const adapter = createTestAdapter<Message>(); | ||
const actor = createActor<Message>(adapter); | ||
const handleMessage = jest.fn(); | ||
@@ -95,7 +90,7 @@ const handleMessage2 = jest.fn(); | ||
actor.on("test", handleMessage); | ||
actor.on("test", handleMessage2); | ||
actor.on("test", handleMessage3); | ||
actor.on("initializePanel", handleMessage); | ||
actor.on("initializePanel", handleMessage2); | ||
actor.on("initializePanel", handleMessage3); | ||
adapter.simulateDevtoolsMessage({ type: "test" }); | ||
adapter.simulateDevtoolsMessage({ type: "initializePanel" }); | ||
@@ -108,10 +103,9 @@ expect(handleMessage).toHaveBeenCalledTimes(1); | ||
test("ignores messages that don't originate from devtools", () => { | ||
type Message = { type: "test" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor<Message>(adapter); | ||
const actor = createActor(adapter); | ||
const handleMessage = jest.fn(); | ||
actor.on("test", handleMessage); | ||
actor.on("initializePanel", handleMessage); | ||
adapter.simulatePlainMessage({ type: "test" }); | ||
adapter.simulatePlainMessage({ type: "initializePanel" }); | ||
@@ -124,8 +118,7 @@ expect(handleMessage).not.toHaveBeenCalled(); | ||
(messageType) => { | ||
type Message = { type: "test" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor<Message>(adapter); | ||
const actor = createActor(adapter); | ||
const handleMessage = jest.fn(); | ||
actor.on("test", handleMessage); | ||
actor.on("initializePanel", handleMessage); | ||
@@ -135,3 +128,3 @@ adapter.simulatePlainMessage({ | ||
type: messageType, | ||
message: { type: "test" }, | ||
message: { type: "initializePanel" }, | ||
}); | ||
@@ -144,13 +137,11 @@ | ||
test("does not add listener to adapter until first subscribed actor listener", () => { | ||
type Message = { type: "test" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor<Message>(adapter); | ||
const actor = createActor(adapter); | ||
expect(adapter.addListener).not.toHaveBeenCalled(); | ||
actor.send({ type: "test" }); | ||
actor.send({ type: "initializePanel" }); | ||
expect(adapter.addListener).not.toHaveBeenCalled(); | ||
actor.on("test", () => {}); | ||
actor.on("initializePanel", () => {}); | ||
expect(adapter.addListener).toHaveBeenCalledTimes(1); | ||
@@ -160,15 +151,9 @@ }); | ||
test("adds a single listener to adapter regardless of subscribed actor listeners", () => { | ||
type Message = | ||
| { type: "test" } | ||
| { type: "greet" } | ||
| { type: "connect" } | ||
| { type: "disconnect" }; | ||
const adapter = createTestAdapter(); | ||
const actor = createActor<Message>(adapter); | ||
const actor = createActor(adapter); | ||
actor.on("test", () => {}); | ||
actor.on("greet", () => {}); | ||
actor.on("disconnect", () => {}); | ||
actor.on("connect", () => {}); | ||
actor.on("initializePanel", () => {}); | ||
actor.on("registerClient", () => {}); | ||
actor.on("clientTerminated", () => {}); | ||
actor.on("panelShown", () => {}); | ||
@@ -179,10 +164,9 @@ expect(adapter.addListener).toHaveBeenCalledTimes(1); | ||
test("can unsubscribe from a message by calling the returned function", () => { | ||
type Message = { type: "test" }; | ||
const adapter = createTestAdapter<Message>(); | ||
const actor = createActor<Message>(adapter); | ||
const adapter = createTestAdapter(); | ||
const actor = createActor(adapter); | ||
const handleMessage = jest.fn(); | ||
const unsubscribe = actor.on("test", handleMessage); | ||
const unsubscribe = actor.on("initializePanel", handleMessage); | ||
adapter.simulateDevtoolsMessage({ type: "test" }); | ||
adapter.simulateDevtoolsMessage({ type: "initializePanel" }); | ||
@@ -194,3 +178,3 @@ expect(handleMessage).toHaveBeenCalledTimes(1); | ||
adapter.simulateDevtoolsMessage({ type: "test" }); | ||
adapter.simulateDevtoolsMessage({ type: "initializePanel" }); | ||
@@ -201,10 +185,9 @@ expect(handleMessage).not.toHaveBeenCalled(); | ||
test("removes listener on adapter when unsubscribing from last actor listener", () => { | ||
type Message = { type: "connect" } | { type: "disconnect" }; | ||
const adapter = createTestAdapter<Message>(); | ||
const actor = createActor<Message>(adapter); | ||
const adapter = createTestAdapter(); | ||
const actor = createActor(adapter); | ||
const handleConnect = jest.fn(); | ||
const handleDisconnect = jest.fn(); | ||
const unsubscribeConnect = actor.on("connect", handleConnect); | ||
const unsubscribeDisconnect = actor.on("connect", handleDisconnect); | ||
const unsubscribeConnect = actor.on("initializePanel", handleConnect); | ||
const unsubscribeDisconnect = actor.on("clientTerminated", handleDisconnect); | ||
@@ -221,8 +204,7 @@ unsubscribeConnect(); | ||
test("re-adds listener on adapter when subscribing actor listener after disconnecting", () => { | ||
type Message = { type: "connect" }; | ||
const adapter = createTestAdapter<Message>(); | ||
const actor = createActor<Message>(adapter); | ||
const adapter = createTestAdapter(); | ||
const actor = createActor(adapter); | ||
const handleConnect = jest.fn(); | ||
const unsubscribeConnect = actor.on("connect", handleConnect); | ||
const unsubscribeConnect = actor.on("initializePanel", handleConnect); | ||
@@ -236,39 +218,4 @@ expect(adapter.addListener).toHaveBeenCalledTimes(1); | ||
actor.on("connect", handleConnect); | ||
actor.on("initializePanel", handleConnect); | ||
expect(adapter.addListener).toHaveBeenCalledTimes(1); | ||
}); | ||
test("forwards messages to another actor", () => { | ||
type Message = { type: "connect"; payload: string } | { type: "disconnect" }; | ||
const proxyAdapter = createTestAdapter<Message>(); | ||
const actorAdapter = createTestAdapter<Message>(); | ||
const proxy = createActor<Message>(proxyAdapter); | ||
const actor = createActor<Message>(actorAdapter); | ||
proxy.forward("connect", actor); | ||
proxy.forward("disconnect", actor); | ||
proxyAdapter.simulateDevtoolsMessage({ type: "connect", payload: "Hello!" }); | ||
expect(actorAdapter.postMessage).toHaveBeenCalledTimes(1); | ||
expect(actorAdapter.postMessage).toHaveBeenCalledWith({ | ||
id: expect.any(String), | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
message: { | ||
type: "connect", | ||
payload: "Hello!", | ||
}, | ||
}); | ||
proxyAdapter.simulateDevtoolsMessage({ type: "disconnect" }); | ||
expect(actorAdapter.postMessage).toHaveBeenCalledTimes(2); | ||
expect(actorAdapter.postMessage).toHaveBeenCalledWith({ | ||
id: expect.any(String), | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
message: { type: "disconnect" }, | ||
}); | ||
}); |
@@ -1,9 +0,12 @@ | ||
import type { DistributiveOmit } from "../../types"; | ||
import type { ApolloClientInfo, DistributiveOmit } from "../../types"; | ||
import { RPC_MESSAGE_TIMEOUT } from "../errorMessages"; | ||
import type { MessageAdapter } from "../messageAdapters"; | ||
import type { RPCMessage, RPCRequestMessage } from "../messages"; | ||
import { createMessageBridge } from "../messageAdapters"; | ||
import { MessageType } from "../messages"; | ||
import { createRPCBridge, createRpcClient, createRpcHandler } from "../rpc"; | ||
import type { RPCRequestMessage, RPCResponseMessage } from "../rpc"; | ||
import { createRpcClient, createRpcHandler } from "../rpc"; | ||
interface TestAdapter extends MessageAdapter<RPCMessage> { | ||
type RPCMessage = RPCRequestMessage | RPCResponseMessage; | ||
interface TestAdapter extends MessageAdapter { | ||
mocks: { listeners: Set<(message: unknown) => void>; messages: unknown[] }; | ||
@@ -58,6 +61,13 @@ simulateMessage: (message: unknown) => void; | ||
function defaultGetClient(id: string) { | ||
return { | ||
id, | ||
name: "Test", | ||
version: "3.11.0", | ||
queryCount: 0, | ||
mutationCount: 0, | ||
} satisfies ApolloClientInfo; | ||
} | ||
test("can send and receive rpc messages", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
// Since these are sent over separate instances in the real world, we want to | ||
@@ -69,16 +79,13 @@ // simulate that as best as we can with separate adapters | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", (x, y) => x + y); | ||
handle("getClient", defaultGetClient); | ||
const result = await client.request("add", 1, 2); | ||
const result = await client.request("getClient", "1"); | ||
expect(result).toBe(3); | ||
expect(result).toEqual(defaultGetClient("1")); | ||
}); | ||
test("resolves async handlers", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
// Since these are sent over separate instances in the real world, we want to | ||
@@ -90,9 +97,9 @@ // simulate that as best as we can with separate adapters | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", (x, y) => { | ||
return new Promise<number>((resolve) => { | ||
handle("getClient", (id) => { | ||
return new Promise<ApolloClientInfo>((resolve) => { | ||
setTimeout(() => { | ||
resolve(x + y); | ||
resolve(defaultGetClient(id)); | ||
}, 10); | ||
@@ -102,15 +109,12 @@ }); | ||
const result = await client.request("add", 1, 2); | ||
const result = await client.request("getClient", "1"); | ||
expect(result).toBe(3); | ||
expect(result).toEqual(defaultGetClient("1")); | ||
}); | ||
test("does not mistakenly handle messages from different rpc calls", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const clientAdapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const promise = client.request("add", 1, 2); | ||
const promise = client.request("getClient", "1"); | ||
@@ -123,3 +127,9 @@ const { id } = clientAdapter.mocks.messages[0] as RPCRequestMessage; | ||
sourceId: id + "zzz", | ||
result: 4, | ||
result: { | ||
id: "2", | ||
name: "Nope", | ||
version: "3.7.0", | ||
queryCount: 10, | ||
mutationCount: 20, | ||
}, | ||
}); | ||
@@ -131,12 +141,9 @@ | ||
sourceId: id, | ||
result: 3, | ||
result: defaultGetClient("1"), | ||
}); | ||
await expect(promise).resolves.toBe(3); | ||
await expect(promise).resolves.toEqual(defaultGetClient("1")); | ||
}); | ||
test("rejects when handler throws error", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
// Since these are sent over separate instances in the real world, we want to | ||
@@ -148,11 +155,11 @@ // simulate that as best as we can with separate adapters | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", () => { | ||
throw new Error("Could not add"); | ||
handle("getClient", () => { | ||
throw new Error("Could not get client"); | ||
}); | ||
await expect(client.request("add", 1, 2)).rejects.toEqual( | ||
new Error("Could not add") | ||
await expect(client.request("getClient", "1")).rejects.toEqual( | ||
new Error("Could not get client") | ||
); | ||
@@ -162,5 +169,2 @@ }); | ||
test("rejects when async handler rejects", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
// Since these are sent over separate instances in the real world, we want to | ||
@@ -172,9 +176,9 @@ // simulate that as best as we can with separate adapters | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", () => Promise.reject(new Error("Could not add"))); | ||
handle("getClient", () => Promise.reject(new Error("Could not get client"))); | ||
await expect(client.request("add", 1, 2)).rejects.toEqual( | ||
new Error("Could not add") | ||
await expect(client.request("getClient", "1")).rejects.toEqual( | ||
new Error("Could not get client") | ||
); | ||
@@ -184,6 +188,2 @@ }); | ||
test("maintains error name", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const handlerAdapter = createTestAdapter(); | ||
@@ -193,9 +193,9 @@ const clientAdapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", () => Promise.reject(new SyntaxError())); | ||
handle("getClient", () => Promise.reject(new SyntaxError())); | ||
try { | ||
await client.request("add", 1, 2); | ||
await client.request("getClient", "1"); | ||
throw new Error("Should not reach"); | ||
@@ -209,9 +209,2 @@ } catch (e) { | ||
test("can handle multiple rpc messages", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
// while we're at it, let's have this one return a Promise in the definition | ||
// it should not matter for the implementation | ||
shout(text: string): Promise<string>; | ||
}; | ||
const handlerAdapter = createTestAdapter(); | ||
@@ -221,79 +214,72 @@ const clientAdapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
const client = createRpcClient(clientAdapter); | ||
const handle = createRpcHandler(handlerAdapter); | ||
handle("add", (x, y) => x + y); | ||
handle("shout", (text) => Promise.resolve(text.toUpperCase())); | ||
handle("getClient", defaultGetClient); | ||
handle("getQueries", () => Promise.resolve([])); | ||
const result = await client.request("add", 1, 2); | ||
const uppercase = await client.request("shout", "hello"); | ||
const result = await client.request("getClient", "1"); | ||
const queries = await client.request("getQueries", "1"); | ||
expect(result).toBe(3); | ||
expect(uppercase).toBe("HELLO"); | ||
expect(result).toEqual(defaultGetClient("1")); | ||
expect(queries).toEqual([]); | ||
}); | ||
test("only allows one handler per type", async () => { | ||
type Message = { | ||
add({ x, y }: { x: number; y: number }): number; | ||
}; | ||
const handle = createRpcHandler(createTestAdapter()); | ||
const handle = createRpcHandler<Message>(createTestAdapter()); | ||
handle("getClient", defaultGetClient); | ||
handle("add", ({ x, y }) => x + y); | ||
expect(() => { | ||
handle("add", ({ x, y }) => x - y); | ||
handle("getClient", defaultGetClient); | ||
}).toThrow(new Error("Only one rpc handler can be registered per type")); | ||
}); | ||
test("can handle any parameter format", async () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
shout(text: string): string; | ||
join(strings: string[], delimeter: string): string; | ||
getFullName(user: { firstName: string; lastName: string }): string; | ||
getStoredValues(): number[]; | ||
}; | ||
const handlerAdapter = createTestAdapter(); | ||
const clientAdapter = createTestAdapter(); | ||
createBridge(clientAdapter, handlerAdapter); | ||
const client = createRpcClient<Message>(clientAdapter); | ||
const handle = createRpcHandler<Message>(handlerAdapter); | ||
handle("add", (x, y) => x + y); | ||
handle("shout", (text) => text.toUpperCase()); | ||
handle("join", (strings, delimeter) => strings.join(delimeter)); | ||
handle("getFullName", (user) => user.firstName + " " + user.lastName); | ||
handle("getStoredValues", () => [1, 2, 3]); | ||
const result = await client.request("add", 1, 2); | ||
const uppercase = await client.request("shout", "hello"); | ||
const joined = await client.request("join", ["a", "b", "c"], ","); | ||
const fullName = await client.request("getFullName", { | ||
firstName: "John", | ||
lastName: "Doe", | ||
}); | ||
const storedValues = await client.request("getStoredValues"); | ||
expect(result).toBe(3); | ||
expect(uppercase).toBe("HELLO"); | ||
expect(joined).toEqual("a,b,c"); | ||
expect(fullName).toEqual("John Doe"); | ||
expect(storedValues).toEqual([1, 2, 3]); | ||
// Would love to contineu to test this, but our current messages don't allow for this. | ||
test.skip("can handle any parameter format", async () => { | ||
// type Message = { | ||
// add(x: number, y: number): number; | ||
// shout(text: string): string; | ||
// join(strings: string[], delimeter: string): string; | ||
// getFullName(user: { firstName: string; lastName: string }): string; | ||
// getStoredValues(): number[]; | ||
// }; | ||
// | ||
// const handlerAdapter = createTestAdapter(); | ||
// const clientAdapter = createTestAdapter(); | ||
// createBridge(clientAdapter, handlerAdapter); | ||
// | ||
// const client = createRpcClient<Message>(clientAdapter); | ||
// const handle = createRpcHandler<Message>(handlerAdapter); | ||
// | ||
// handle("add", (x, y) => x + y); | ||
// handle("shout", (text) => text.toUpperCase()); | ||
// handle("join", (strings, delimeter) => strings.join(delimeter)); | ||
// handle("getFullName", (user) => user.firstName + " " + user.lastName); | ||
// handle("getStoredValues", () => [1, 2, 3]); | ||
// | ||
// const result = await client.request("add", 1, 2); | ||
// const uppercase = await client.request("shout", "hello"); | ||
// const joined = await client.request("join", ["a", "b", "c"], ","); | ||
// const fullName = await client.request("getFullName", { | ||
// firstName: "John", | ||
// lastName: "Doe", | ||
// }); | ||
// const storedValues = await client.request("getStoredValues"); | ||
// | ||
// expect(result).toBe(3); | ||
// expect(uppercase).toBe("HELLO"); | ||
// expect(joined).toEqual("a,b,c"); | ||
// expect(fullName).toEqual("John Doe"); | ||
// expect(storedValues).toEqual([1, 2, 3]); | ||
}); | ||
test("ignores messages that don't originate from devtools", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
const callback = jest.fn(); | ||
handle("add", callback); | ||
handle("getClient", callback); | ||
adapter.simulateMessage({ type: "add", x: 1, y: 2 }); | ||
adapter.simulateMessage({ type: "getClient", clientId: "1" }); | ||
@@ -307,32 +293,24 @@ expect(callback).not.toHaveBeenCalled(); | ||
test("ignores messages that aren't rpc messages", () => { | ||
type Message = { | ||
add({ x, y }: { x: number; y: number }): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
const callback = jest.fn(); | ||
handle("add", callback); | ||
const getClient = jest.fn(); | ||
handle("getClient", getClient); | ||
adapter.simulateMessage({ | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
payload: { type: "add", x: 1, y: 2 }, | ||
type: MessageType.Actor, | ||
payload: { type: "getClient", clientId: "1" }, | ||
}); | ||
expect(callback).not.toHaveBeenCalled(); | ||
expect(getClient).not.toHaveBeenCalled(); | ||
}); | ||
test("does not add listener to adapter until first subscribed handler", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
expect(adapter.addListener).not.toHaveBeenCalled(); | ||
handle("add", (x, y) => x + y); | ||
handle("getClient", defaultGetClient); | ||
@@ -343,16 +321,10 @@ expect(adapter.addListener).toHaveBeenCalled(); | ||
test("adds a single listener regardless of active handlers", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
subtract(x: number, y: number): number; | ||
shout(text: string): string; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
expect(adapter.addListener).not.toHaveBeenCalled(); | ||
handle("add", (x, y) => x + y); | ||
handle("subtract", (x, y) => x - y); | ||
handle("shout", (text) => text.toUpperCase()); | ||
handle("getClient", defaultGetClient); | ||
handle("getQueries", () => []); | ||
handle("getMutations", () => []); | ||
@@ -363,11 +335,7 @@ expect(adapter.addListener).toHaveBeenCalledTimes(1); | ||
test("can unsubscribe from a handler by calling the returned function", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
const add = jest.fn(); | ||
const unsubscribe = handle("add", add); | ||
const getClient = jest.fn(); | ||
const unsubscribe = handle("getClient", getClient); | ||
@@ -377,9 +345,9 @@ adapter.simulateRPCMessage({ | ||
type: MessageType.RPCRequest, | ||
name: "add", | ||
params: [{ x: 1, y: 2 }], | ||
name: "getClient", | ||
params: ["1"], | ||
}); | ||
expect(add).toHaveBeenCalledTimes(1); | ||
expect(getClient).toHaveBeenCalledTimes(1); | ||
add.mockClear(); | ||
getClient.mockClear(); | ||
unsubscribe(); | ||
@@ -390,25 +358,20 @@ | ||
type: MessageType.RPCRequest, | ||
name: "add", | ||
params: [{ x: 1, y: 2 }], | ||
name: "getClient", | ||
params: ["2"], | ||
}); | ||
expect(add).not.toHaveBeenCalled(); | ||
expect(getClient).not.toHaveBeenCalled(); | ||
}); | ||
test("removes listener on adapter when unsubscribing from last handler", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
shout({ text }: { text: string }): string; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
const unsubscribeAdd = handle("add", (x, y) => x + y); | ||
const unsubscribeShout = handle("shout", ({ text }) => text.toUpperCase()); | ||
const unsubscribeGetClient = handle("getClient", defaultGetClient); | ||
const unsubscribeGetQueries = handle("getQueries", () => []); | ||
unsubscribeAdd(); | ||
unsubscribeGetClient(); | ||
expect(adapter.mocks.listeners.size).toBe(1); | ||
unsubscribeShout(); | ||
unsubscribeGetQueries(); | ||
expect(adapter.mocks.listeners.size).toBe(0); | ||
@@ -418,11 +381,6 @@ }); | ||
test("re-adds listener on adapter when subscribing after unsubscribing", () => { | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const handle = createRpcHandler<Message>(adapter); | ||
const handle = createRpcHandler(adapter); | ||
const add = (x: number, y: number) => x + y; | ||
const unsubscribe = handle("add", add); | ||
const unsubscribe = handle("getClient", defaultGetClient); | ||
@@ -432,3 +390,3 @@ unsubscribe(); | ||
handle("add", add); | ||
handle("getClient", defaultGetClient); | ||
expect(adapter.mocks.listeners.size).toBe(1); | ||
@@ -439,10 +397,7 @@ }); | ||
jest.useFakeTimers(); | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(adapter); | ||
const client = createRpcClient(adapter); | ||
const promise = client.request("add", 1, 2); | ||
const promise = client.request("getClient", "1"); | ||
@@ -458,10 +413,7 @@ jest.advanceTimersByTime(30_000); | ||
jest.useFakeTimers(); | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(adapter); | ||
const client = createRpcClient(adapter); | ||
const promise = client.withTimeout(1000).request("add", 1, 2); | ||
const promise = client.withTimeout(1000).request("getClient", "1"); | ||
@@ -477,8 +429,5 @@ jest.advanceTimersByTime(1000); | ||
jest.useFakeTimers(); | ||
type Message = { | ||
add(x: number, y: number): number; | ||
}; | ||
const adapter = createTestAdapter(); | ||
const client = createRpcClient<Message>(adapter); | ||
const client = createRpcClient(adapter); | ||
@@ -492,5 +441,5 @@ const t1 = client.withTimeout(1000); | ||
const finished = new Set<Promise<number>>(); | ||
const finished = new Set<Promise<ApolloClientInfo | null>>(); | ||
const promise1 = t1.request("add", 1, 2); | ||
const promise1 = t1.request("getClient", "1"); | ||
promise1 | ||
@@ -502,3 +451,3 @@ .finally(() => finished.add(promise1)) | ||
const promise2 = t2.request("add", 1, 2); | ||
const promise2 = t2.request("getClient", "2"); | ||
promise2 | ||
@@ -525,3 +474,3 @@ .finally(() => finished.add(promise2)) | ||
const promise3 = client.request("add", 1, 2); | ||
const promise3 = client.request("getClient", "1"); | ||
promise3 | ||
@@ -553,3 +502,3 @@ .finally(() => finished.add(promise3)) | ||
createRPCBridge(adapter1, adapter2); | ||
createMessageBridge(adapter1, adapter2); | ||
@@ -593,3 +542,3 @@ adapter1.simulateRPCMessage({ | ||
const unsubscribe = createRPCBridge(adapter1, adapter2); | ||
const unsubscribe = createMessageBridge(adapter1, adapter2); | ||
@@ -632,19 +581,1 @@ adapter1.simulateRPCMessage({ | ||
}); | ||
test.each([MessageType.Event])( | ||
"does not forward %s messages", | ||
(messageType) => { | ||
const adapter1 = createTestAdapter(); | ||
const adapter2 = createTestAdapter(); | ||
createRPCBridge(adapter1, adapter2); | ||
adapter1.simulateMessage({ | ||
id: 1, | ||
type: messageType, | ||
payload: { type: "add", params: { x: 1, y: 2 } }, | ||
}); | ||
expect(adapter2.postMessage).not.toHaveBeenCalled(); | ||
} | ||
); |
@@ -1,40 +0,55 @@ | ||
import type { | ||
ApolloClientDevtoolsEventMessage, | ||
MessageFormat, | ||
} from "./messages"; | ||
import { MessageType, isEventMessage } from "./messages"; | ||
import type { NoInfer } from "../types"; | ||
import { MessageType, isDevtoolsMessage } from "./messages"; | ||
import type { MessageAdapter } from "./messageAdapters"; | ||
import { createWindowMessageAdapter } from "./messageAdapters"; | ||
import { createId } from "../utils/createId"; | ||
import type { ApolloClientInfo, ExplorerResponse } from "../types"; | ||
import type { DocumentNode, FetchPolicy } from "@apollo/client"; | ||
import type { JSONObject } from "../application/types/json"; | ||
export interface Actor<Messages extends MessageFormat> { | ||
on: <TName extends Messages["type"]>( | ||
export type ActorMessage = | ||
| { type: "registerClient"; payload: ApolloClientInfo } | ||
| { type: "clientTerminated"; clientId: string } | ||
| { | ||
type: "explorerRequest"; | ||
payload: { | ||
clientId: string; | ||
operation: DocumentNode; | ||
operationName: string | undefined; | ||
variables: JSONObject | undefined; | ||
fetchPolicy: FetchPolicy; | ||
}; | ||
} | ||
| { type: "explorerResponse"; payload: ExplorerResponse } | ||
| { type: "explorerSubscriptionTermination" } | ||
| { type: "pageNavigated" } | ||
| { type: "initializePanel" } | ||
| { type: "panelHidden" } | ||
| { type: "panelShown" }; | ||
export type ApolloClientDevtoolsActorMessage = { | ||
id: string; | ||
source: "apollo-client-devtools"; | ||
type: MessageType.Actor; | ||
message: ActorMessage; | ||
}; | ||
export interface Actor { | ||
on: <TName extends ActorMessage["type"]>( | ||
name: TName, | ||
callback: Extract<Messages, { type: TName }> extends infer Message | ||
callback: Extract<ActorMessage, { type: TName }> extends infer Message | ||
? (message: Message) => void | ||
: never | ||
) => () => void; | ||
send: (message: Messages) => void; | ||
forward: <TName extends Messages["type"]>( | ||
name: TName, | ||
actor: Actor<Extract<Messages, { type: NoInfer<TName> }>> | ||
) => () => void; | ||
send: (message: ActorMessage) => void; | ||
} | ||
export function createActor< | ||
Messages extends MessageFormat = { | ||
type: "Error: Pass <Messages> to `createActor<Messages>()`"; | ||
}, | ||
>( | ||
adapter: MessageAdapter<ApolloClientDevtoolsEventMessage<Messages>> | ||
): Actor<Messages> { | ||
export function createActor(adapter: MessageAdapter): Actor { | ||
let removeListener: (() => void) | null = null; | ||
const messageListeners = new Map< | ||
Messages["type"], | ||
Set<(message: Messages) => void> | ||
ActorMessage["type"], | ||
Set<(message: ActorMessage) => void> | ||
>(); | ||
function handleMessage(message: unknown) { | ||
if (!isEventMessage<Messages>(message)) { | ||
if (!isActorMessage(message)) { | ||
return; | ||
@@ -65,3 +80,3 @@ } | ||
const on: Actor<Messages>["on"] = (name, callback) => { | ||
const on: Actor["on"] = (name, callback) => { | ||
let listeners = messageListeners.get(name) as Set<typeof callback>; | ||
@@ -71,3 +86,3 @@ | ||
listeners = new Set(); | ||
messageListeners.set(name, listeners as Set<(message: Messages) => void>); | ||
messageListeners.set(name, listeners); | ||
} | ||
@@ -97,17 +112,17 @@ | ||
source: "apollo-client-devtools", | ||
type: MessageType.Event, | ||
type: MessageType.Actor, | ||
message, | ||
}); | ||
}, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
forward: (name, actor) => on(name, actor.send as unknown as any), | ||
}; | ||
} | ||
export function createWindowActor< | ||
Messages extends MessageFormat = { | ||
type: "Error: Pass <Messages> to `createWindowActor<Messages>()`"; | ||
}, | ||
>(window: Window) { | ||
return createActor<Messages>(createWindowMessageAdapter(window)); | ||
export function createWindowActor(window: Window) { | ||
return createActor(createWindowMessageAdapter(window)); | ||
} | ||
function isActorMessage( | ||
message: unknown | ||
): message is ApolloClientDevtoolsActorMessage { | ||
return isDevtoolsMessage(message) && message.type === MessageType.Actor; | ||
} |
import browser from "webextension-polyfill"; | ||
import { createRpcHandler } from "../rpc"; | ||
import { createPortMessageAdapter } from "../messageAdapters"; | ||
import type { ErrorCodes } from "@apollo/client/invariantErrorCodes.js"; | ||
import allErrorCodes from "../../../all-clients/errorcodes.json"; | ||
import { restoreErrorCodes } from "../../../all-clients/restore-errorcodes.mjs"; | ||
export type ErrorCodesHandler = { | ||
getErrorCodes(version: string): Promise<ErrorCodes | undefined>; | ||
}; | ||
browser.runtime.onConnect.addListener((port) => { | ||
if (port.name === "tab") { | ||
const handleRpc = createRpcHandler<ErrorCodesHandler>( | ||
createPortMessageAdapter(() => port) | ||
); | ||
const handleRpc = createRpcHandler(createPortMessageAdapter(() => port)); | ||
handleRpc("getErrorCodes", (version) => { | ||
@@ -17,0 +12,0 @@ if (version in allErrorCodes.byVersion) { |
{ | ||
"version": "4.17.2", | ||
"version": "4.17.3", | ||
"author": "Apollo", | ||
@@ -4,0 +4,0 @@ "name": "Apollo Client Devtools", |
import { createTestAdapter } from "../../../testUtils/testMessageAdapter"; | ||
import type { DevtoolsRPCMessage } from "../../messages"; | ||
import { createRpcClient } from "../../rpc"; | ||
const adapter = createTestAdapter(); | ||
const rpcClient = createRpcClient<DevtoolsRPCMessage>(adapter); | ||
const rpcClient = createRpcClient(adapter); | ||
@@ -8,0 +7,0 @@ export type GetRpcClientMock = typeof getRpcClient; |
import browser from "webextension-polyfill"; | ||
import type { Actor } from "../actor"; | ||
import { createActor } from "../actor"; | ||
import type { ClientMessage, PanelMessage } from "../messages"; | ||
import { getPanelActor } from "./panelActor"; | ||
import { | ||
createMessageBridge, | ||
createPortMessageAdapter, | ||
createWindowMessageAdapter, | ||
} from "../messageAdapters"; | ||
import { createRPCBridge } from "../rpc"; | ||
@@ -18,6 +16,4 @@ const inspectedTabId = browser.devtools.inspectedWindow.tabId; | ||
const clientPort = createActor<ClientMessage>(portAdapter); | ||
let connectedToPanel = false; | ||
let panelWindow: Actor<PanelMessage>; | ||
let panelWindow: Actor; | ||
@@ -37,13 +33,4 @@ async function createDevtoolsPanel() { | ||
} else { | ||
createRPCBridge(createWindowMessageAdapter(window), portAdapter); | ||
createMessageBridge(createWindowMessageAdapter(window), portAdapter); | ||
clientPort.forward("explorerResponse", panelWindow); | ||
clientPort.forward("registerClient", panelWindow); | ||
clientPort.forward("clientTerminated", panelWindow); | ||
clientPort.forward("connectToDevtools", panelWindow); | ||
panelWindow.forward("connectToClient", clientPort); | ||
panelWindow.forward("explorerRequest", clientPort); | ||
panelWindow.forward("explorerSubscriptionTermination", clientPort); | ||
panelWindow.send({ type: "initializePanel" }); | ||
@@ -50,0 +37,0 @@ |
import type { Actor } from "../actor"; | ||
import { createWindowActor } from "../actor"; | ||
import type { PanelMessage } from "../messages"; | ||
let panelActor: Actor<PanelMessage> | null = null; | ||
let panelActor: Actor | null = null; | ||
export const getPanelActor = (window: Window) => { | ||
return (panelActor ||= createWindowActor<PanelMessage>(window)); | ||
return (panelActor ||= createWindowActor(window)); | ||
}; |
import { createWindowMessageAdapter } from "../messageAdapters"; | ||
import type { DevtoolsRPCMessage } from "../messages"; | ||
import { createRpcClient, type RpcClient } from "../rpc"; | ||
let rpcClient: RpcClient<DevtoolsRPCMessage> | null = null; | ||
let rpcClient: RpcClient | null = null; | ||
export function getRpcClient() { | ||
return (rpcClient ||= createRpcClient<DevtoolsRPCMessage>( | ||
createWindowMessageAdapter(window) | ||
)); | ||
return (rpcClient ||= createRpcClient(createWindowMessageAdapter(window))); | ||
} |
{ | ||
"version": "4.17.2", | ||
"version": "4.17.3", | ||
"author": "Apollo", | ||
@@ -4,0 +4,0 @@ "name": "Apollo Client Devtools", |
import type browser from "webextension-polyfill"; | ||
import { isDevtoolsMessage } from "./messages"; | ||
import type { ApolloClientDevtoolsMessage } from "./messages"; | ||
export interface MessageAdapter< | ||
PostMessageFormat extends ApolloClientDevtoolsMessage< | ||
Record<string, unknown> | ||
>, | ||
> { | ||
export interface MessageAdapter { | ||
addListener: (listener: (message: unknown) => void) => () => void; | ||
postMessage: (message: PostMessageFormat) => void; | ||
postMessage: (message: ApolloClientDevtoolsMessage) => void; | ||
} | ||
export function createPortMessageAdapter< | ||
PostMessageFormat extends Record<string, unknown> = Record<string, unknown>, | ||
>( | ||
export function createPortMessageAdapter( | ||
createPort: () => browser.Runtime.Port | ||
): MessageAdapter<ApolloClientDevtoolsMessage<PostMessageFormat>> { | ||
): MessageAdapter { | ||
let port = createPort(); | ||
@@ -55,7 +50,3 @@ const listeners = new Set<(message: unknown) => void>(); | ||
export function createWindowMessageAdapter< | ||
PostMessageFormat extends Record<string, unknown> = Record<string, unknown>, | ||
>( | ||
window: Window | ||
): MessageAdapter<ApolloClientDevtoolsMessage<PostMessageFormat>> { | ||
export function createWindowMessageAdapter(window: Window): MessageAdapter { | ||
const sentMessageIds = new Set<string>(); | ||
@@ -92,1 +83,23 @@ | ||
} | ||
export function createMessageBridge( | ||
adapter1: MessageAdapter, | ||
adapter2: MessageAdapter | ||
) { | ||
const removeListener1 = adapter1.addListener((message) => { | ||
if (isDevtoolsMessage(message)) { | ||
adapter2.postMessage(message); | ||
} | ||
}); | ||
const removeListener2 = adapter2.addListener((message) => { | ||
if (isDevtoolsMessage(message)) { | ||
adapter1.postMessage(message); | ||
} | ||
}); | ||
return () => { | ||
removeListener1(); | ||
removeListener2(); | ||
}; | ||
} |
@@ -1,129 +0,18 @@ | ||
import type { ApolloClientInfo, ExplorerResponse, SafeAny } from "../types"; | ||
import type { JSONObject } from "../application/types/json"; | ||
import type { FetchPolicy, DocumentNode } from "@apollo/client"; | ||
import type { MutationDetails, QueryDetails } from "./tab/helpers"; | ||
import type { ApolloClientDevtoolsActorMessage } from "./actor"; | ||
import type { RPCRequestMessage, RPCResponseMessage } from "./rpc"; | ||
export interface MessageFormat { | ||
type: string; | ||
[key: string]: unknown; | ||
} | ||
export const enum MessageType { | ||
RPCRequest = "rpcRequest", | ||
RPCResponse = "rpcResponse", | ||
Event = "event", | ||
Actor = "actor", | ||
} | ||
export type RPCRequestMessage<Params extends SafeAny[] = unknown[]> = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCRequest; | ||
id: string; | ||
name: string; | ||
params: Params; | ||
}; | ||
export type RPCErrorResponseMessage = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCResponse; | ||
id: string; | ||
sourceId: string; | ||
error: { name?: string; message: string; stack?: string }; | ||
}; | ||
export type RPCSuccessResponseMessage<Result = unknown> = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCResponse; | ||
id: string; | ||
sourceId: string; | ||
result: Result; | ||
}; | ||
export type RPCResponseMessage<Result = unknown> = | ||
| RPCSuccessResponseMessage<Result> | ||
| RPCErrorResponseMessage; | ||
export type RPCMessage< | ||
Params extends SafeAny[] = unknown[], | ||
Result = unknown, | ||
> = RPCRequestMessage<Params> | RPCResponseMessage<Result>; | ||
export type ApolloClientDevtoolsEventMessage< | ||
Message extends Record<string, unknown> = Record<string, unknown>, | ||
> = { | ||
id: string; | ||
source: "apollo-client-devtools"; | ||
type: MessageType.Event; | ||
message: Message; | ||
}; | ||
export type ApolloClientDevtoolsMessage< | ||
Message extends Record<string, unknown> = Record<string, unknown>, | ||
> = | ||
| ApolloClientDevtoolsEventMessage<Message> | ||
export type ApolloClientDevtoolsMessage = | ||
| ApolloClientDevtoolsActorMessage | ||
| RPCRequestMessage | ||
| RPCResponseMessage; | ||
type ExplorerRequestMessage = { | ||
type: "explorerRequest"; | ||
payload: { | ||
clientId: string; | ||
operation: DocumentNode; | ||
operationName: string | undefined; | ||
variables: JSONObject | undefined; | ||
fetchPolicy: FetchPolicy; | ||
}; | ||
}; | ||
type ExplorerResponseMessage = { | ||
type: "explorerResponse"; | ||
payload: ExplorerResponse; | ||
}; | ||
type ExplorerSubscriptionTerminationMessage = { | ||
type: "explorerSubscriptionTermination"; | ||
}; | ||
type RegisterClientMessage = { | ||
type: "registerClient"; | ||
payload: ApolloClientInfo; | ||
}; | ||
type ClientTerminatedMessage = { | ||
type: "clientTerminated"; | ||
clientId: string; | ||
}; | ||
export type ClientMessage = | ||
| RegisterClientMessage | ||
| { type: "connectToClient" } | ||
| { type: "connectToDevtools" } | ||
| ClientTerminatedMessage | ||
| ExplorerRequestMessage | ||
| ExplorerResponseMessage | ||
| ExplorerSubscriptionTerminationMessage; | ||
export type PanelMessage = | ||
| RegisterClientMessage | ||
| ClientTerminatedMessage | ||
| ExplorerRequestMessage | ||
| ExplorerResponseMessage | ||
| ExplorerSubscriptionTerminationMessage | ||
| { type: "connectToDevtools" } | ||
| { type: "pageNavigated" } | ||
| { type: "connectToClient" } | ||
| { type: "initializePanel" } | ||
| { type: "panelHidden" } | ||
| { type: "panelShown" }; | ||
export type DevtoolsRPCMessage = { | ||
getClients(): ApolloClientInfo[]; | ||
getClient(id: string): ApolloClientInfo | null; | ||
getQueries(clientId: string): QueryDetails[]; | ||
getMutations(clientId: string): MutationDetails[]; | ||
getCache(clientId: string): JSONObject; | ||
}; | ||
function isDevtoolsMessage<Message extends Record<string, unknown>>( | ||
export function isDevtoolsMessage( | ||
message: unknown | ||
): message is ApolloClientDevtoolsMessage<Message> { | ||
): message is ApolloClientDevtoolsMessage { | ||
return ( | ||
@@ -136,23 +25,1 @@ typeof message === "object" && | ||
} | ||
export function isRPCRequestMessage( | ||
message: unknown | ||
): message is RPCRequestMessage { | ||
return isDevtoolsMessage(message) && message.type === MessageType.RPCRequest; | ||
} | ||
export function isRPCResponseMessage( | ||
message: unknown | ||
): message is RPCResponseMessage { | ||
return isDevtoolsMessage(message) && message.type === MessageType.RPCResponse; | ||
} | ||
export function isRPCMessage(message: unknown): message is RPCMessage { | ||
return isRPCRequestMessage(message) || isRPCResponseMessage(message); | ||
} | ||
export function isEventMessage<Message extends Record<string, unknown>>( | ||
message: unknown | ||
): message is ApolloClientDevtoolsEventMessage<Message> { | ||
return isDevtoolsMessage(message) && message.type === MessageType.Event; | ||
} |
@@ -1,2 +0,4 @@ | ||
import type { NoInfer, SafeAny } from "../types"; | ||
import type { ErrorCodes } from "@apollo/client/invariantErrorCodes"; | ||
import type { JSONObject } from "../application/types/json"; | ||
import type { ApolloClientInfo, NoInfer, SafeAny } from "../types"; | ||
import { createId } from "../utils/createId"; | ||
@@ -6,30 +8,54 @@ import { RPC_MESSAGE_TIMEOUT } from "./errorMessages"; | ||
import type { MessageAdapter } from "./messageAdapters"; | ||
import type { | ||
RPCMessage, | ||
RPCRequestMessage, | ||
RPCResponseMessage, | ||
} from "./messages"; | ||
import { | ||
MessageType, | ||
isRPCMessage, | ||
isRPCRequestMessage, | ||
isRPCResponseMessage, | ||
} from "./messages"; | ||
import { MessageType, isDevtoolsMessage } from "./messages"; | ||
import type { MutationDetails, QueryDetails } from "./tab/helpers"; | ||
type MessageCollection = Record<string, (...parameters: SafeAny[]) => SafeAny>; | ||
export type RPCRequest = { | ||
getClients(): ApolloClientInfo[]; | ||
getClient(id: string): ApolloClientInfo | null; | ||
getQueries(clientId: string): QueryDetails[]; | ||
getMutations(clientId: string): MutationDetails[]; | ||
getCache(clientId: string): JSONObject; | ||
getErrorCodes(version: string): Promise<ErrorCodes | undefined>; | ||
}; | ||
export interface RpcClient<Messages extends MessageCollection> { | ||
export interface RpcClient { | ||
readonly timeout: number; | ||
withTimeout: (timeoutMs: number) => RpcClient<Messages>; | ||
request: <TName extends keyof Messages & string>( | ||
withTimeout: (timeoutMs: number) => RpcClient; | ||
request: <TName extends keyof RPCRequest & string>( | ||
name: TName, | ||
...params: Parameters<Messages[TName]> | ||
) => Promise<Awaited<ReturnType<Messages[TName]>>>; | ||
...params: Parameters<RPCRequest[TName]> | ||
) => Promise<Awaited<ReturnType<RPCRequest[TName]>>>; | ||
} | ||
type RPCErrorResponseMessage = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCResponse; | ||
id: string; | ||
sourceId: string; | ||
error: { name?: string; message: string; stack?: string }; | ||
}; | ||
type RPCSuccessResponseMessage<Result = unknown> = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCResponse; | ||
id: string; | ||
sourceId: string; | ||
result: Result; | ||
}; | ||
export type RPCRequestMessage<Params extends SafeAny[] = unknown[]> = { | ||
source: "apollo-client-devtools"; | ||
type: MessageType.RPCRequest; | ||
id: string; | ||
name: string; | ||
params: Params; | ||
}; | ||
export type RPCResponseMessage<Result = unknown> = | ||
| RPCSuccessResponseMessage<Result> | ||
| RPCErrorResponseMessage; | ||
const DEFAULT_TIMEOUT = 30_000; | ||
export function createRpcClient<Messages extends MessageCollection>( | ||
adapter: MessageAdapter<RPCRequestMessage> | ||
): RpcClient<Messages> { | ||
export function createRpcClient(adapter: MessageAdapter): RpcClient { | ||
return { | ||
@@ -76,5 +102,3 @@ timeout: DEFAULT_TIMEOUT, | ||
export function createRpcHandler<Messages extends MessageCollection>( | ||
adapter: MessageAdapter<RPCResponseMessage> | ||
) { | ||
export function createRpcHandler(adapter: MessageAdapter) { | ||
const listeners = new Map<string, (message: RPCRequestMessage) => void>(); | ||
@@ -102,9 +126,9 @@ let removeListener: (() => void) | null = null; | ||
return function <TName extends keyof Messages & string>( | ||
return function <TName extends keyof RPCRequest & string>( | ||
name: TName, | ||
handler: ( | ||
...params: Parameters<Messages[TName]> | ||
...params: Parameters<RPCRequest[TName]> | ||
) => | ||
| NoInfer<Awaited<ReturnType<Messages[TName]>>> | ||
| Promise<NoInfer<Awaited<ReturnType<Messages[TName]>>>> | ||
| NoInfer<Awaited<ReturnType<RPCRequest[TName]>>> | ||
| Promise<NoInfer<Awaited<ReturnType<RPCRequest[TName]>>>> | ||
) { | ||
@@ -118,3 +142,3 @@ if (listeners.has(name)) { | ||
const result = await Promise.resolve( | ||
handler(...(params as Parameters<Messages[TName]>)) | ||
handler(...(params as Parameters<RPCRequest[TName]>)) | ||
); | ||
@@ -152,22 +176,10 @@ | ||
export function createRPCBridge( | ||
adapter1: MessageAdapter<RPCMessage>, | ||
adapter2: MessageAdapter<RPCMessage> | ||
) { | ||
const removeListener1 = adapter1.addListener((message) => { | ||
if (isRPCMessage(message)) { | ||
adapter2.postMessage(message); | ||
} | ||
}); | ||
export function isRPCRequestMessage( | ||
message: unknown | ||
): message is RPCRequestMessage { | ||
return isDevtoolsMessage(message) && message.type === MessageType.RPCRequest; | ||
} | ||
const removeListener2 = adapter2.addListener((message) => { | ||
if (isRPCMessage(message)) { | ||
adapter1.postMessage(message); | ||
} | ||
}); | ||
return () => { | ||
removeListener1(); | ||
removeListener2(); | ||
}; | ||
function isRPCResponseMessage(message: unknown): message is RPCResponseMessage { | ||
return isDevtoolsMessage(message) && message.type === MessageType.RPCResponse; | ||
} |
@@ -26,6 +26,4 @@ import type { ApolloClient, ApolloError } from "@apollo/client"; | ||
import { createWindowActor } from "../actor"; | ||
import type { ClientMessage, DevtoolsRPCMessage } from "../messages"; | ||
import { createWindowMessageAdapter } from "../messageAdapters"; | ||
import { createRpcClient, createRpcHandler } from "../rpc"; | ||
import type { ErrorCodesHandler } from "../background/errorcodes"; | ||
import { loadErrorCodes } from "./loadErrorCodes"; | ||
@@ -55,6 +53,6 @@ import { createId } from "../../utils/createId"; | ||
const tab = createWindowActor<ClientMessage>(window); | ||
const tab = createWindowActor(window); | ||
const messageAdapter = createWindowMessageAdapter(window); | ||
const handleRpc = createRpcHandler<DevtoolsRPCMessage>(messageAdapter); | ||
const rpcClient = createRpcClient<ErrorCodesHandler>(messageAdapter); | ||
const handleRpc = createRpcHandler(messageAdapter); | ||
const rpcClient = createRpcClient(messageAdapter); | ||
@@ -165,8 +163,2 @@ function getQueriesForClient(client: ApolloClient<unknown> | undefined) { | ||
tab.on("connectToClient", () => { | ||
if (globalClient) { | ||
tab.send({ type: "connectToDevtools" }); | ||
} | ||
}); | ||
tab.on("explorerRequest", (message) => { | ||
@@ -173,0 +165,0 @@ const { |
import type { ErrorCodes } from "@apollo/client/invariantErrorCodes"; | ||
import type { RpcClient } from "../rpc"; | ||
import type { ErrorCodesHandler } from "../background/errorcodes"; | ||
export function loadErrorCodes( | ||
rpcClient: RpcClient<ErrorCodesHandler>, | ||
version: string | ||
) { | ||
export function loadErrorCodes(rpcClient: RpcClient, version: string) { | ||
rpcClient | ||
@@ -10,0 +6,0 @@ .request("getErrorCodes", version) |
// This script is injected into each tab. | ||
import browser from "webextension-polyfill"; | ||
import type { ClientMessage } from "../messages"; | ||
import { createActor, createWindowActor } from "../actor"; | ||
import { | ||
createMessageBridge, | ||
createPortMessageAdapter, | ||
createWindowMessageAdapter, | ||
} from "../messageAdapters"; | ||
import { createRPCBridge } from "../rpc"; | ||
@@ -17,16 +15,4 @@ declare const __IS_FIREFOX__: boolean; | ||
const tab = createWindowActor<ClientMessage>(window); | ||
const devtools = createActor<ClientMessage>(portAdapter); | ||
createMessageBridge(portAdapter, createWindowMessageAdapter(window)); | ||
createRPCBridge(portAdapter, createWindowMessageAdapter(window)); | ||
devtools.forward("connectToClient", tab); | ||
devtools.forward("explorerSubscriptionTermination", tab); | ||
devtools.forward("explorerRequest", tab); | ||
tab.forward("registerClient", devtools); | ||
tab.forward("connectToDevtools", devtools); | ||
tab.forward("clientTerminated", devtools); | ||
tab.forward("explorerResponse", devtools); | ||
// We run the hook.js script on the page as a content script in Manifest v3 | ||
@@ -33,0 +19,0 @@ // extensions (chrome for now). We do this using execution world MAIN. |
import type { MessageAdapter } from "../extension/messageAdapters"; | ||
import { isRPCRequestMessage, MessageType } from "../extension/messages"; | ||
import type { | ||
DevtoolsRPCMessage, | ||
RPCRequestMessage, | ||
RPCResponseMessage, | ||
} from "../extension/messages"; | ||
import { MessageType } from "../extension/messages"; | ||
import type { RPCRequestMessage, RPCResponseMessage } from "../extension/rpc"; | ||
import { isRPCRequestMessage, type RPCRequest } from "../extension/rpc"; | ||
import type { SafeAny } from "../types"; | ||
import { createId } from "../utils/createId"; | ||
interface TestAdapter extends MessageAdapter<RPCResponseMessage> { | ||
interface TestAdapter extends MessageAdapter { | ||
mocks: { messages: unknown[] }; | ||
postMessage: jest.Mock<void, [message: unknown]>; | ||
mockClear: () => void; | ||
handleRpcRequest: <TName extends keyof DevtoolsRPCMessage>( | ||
handleRpcRequest: <TName extends keyof RPCRequest>( | ||
name: TName, | ||
callback: ( | ||
...args: Parameters<DevtoolsRPCMessage[TName]> | ||
) => ReturnType<DevtoolsRPCMessage[TName]> | ||
...args: Parameters<RPCRequest[TName]> | ||
) => ReturnType<RPCRequest[TName]> | ||
) => void; | ||
@@ -21,0 +18,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4679608
73129