Socket
Socket
Sign inDemoInstall

@urql/exchange-graphcache

Package Overview
Dependencies
Maintainers
35
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urql/exchange-graphcache - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

10

CHANGELOG.md
# @urql/exchange-graphcache
## 3.0.1
### Patch Changes
- Add warning for queries that traverse an Operation Root Type (Mutation / Subscription types occuring in a query result), by [@kitten](https://github.com/kitten) (See [#859](https://github.com/FormidableLabs/urql/pull/859))
- ⚠️ Fix storage implementation not preserving deleted values correctly or erroneously checking optimistically written entries for changes. This is fixed by adding a new default serializer to the `@urql/exchange-graphcache/default-storage` implementation, which will be incompatible with the old one, by [@kitten](https://github.com/kitten) (See [#866](https://github.com/FormidableLabs/urql/pull/866))
- Replace unnecessary `scheduleTask` polyfill with inline `Promise.resolve().then(fn)` calls, by [@kitten](https://github.com/kitten) (See [#861](https://github.com/FormidableLabs/urql/pull/861))
- Updated dependencies (See [#860](https://github.com/FormidableLabs/urql/pull/860) and [#861](https://github.com/FormidableLabs/urql/pull/861))
- @urql/core@1.12.1
## 3.0.0

@@ -4,0 +14,0 @@

2

default-storage/package.json

@@ -18,5 +18,5 @@ {

"dependencies": {
"@urql/core": ">=1.12.0",
"@urql/core": ">=1.12.1",
"wonka": "^4.0.14"
}
}
import { ExecutableDefinitionNode, InlineFragmentNode } from 'graphql';
export declare type ErrorCode = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
export declare type ErrorCode = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25;
declare type DebugNode = ExecutableDefinitionNode | InlineFragmentNode;

@@ -4,0 +4,0 @@ export declare const currentDebugStack: string[];

"use strict";
function _ref(a) {
try {
return JSON.parse("{" + a.slice(0, -1) + "}");
} catch (c) {
return {};
}
return a.replace(/:/g, "%3a");
}
function _ref4() {
function _ref2(a) {
return a.replace(/%3a/g, ":");
}
function _ref5() {
return null;
}
function _ref5() {}
function _ref6() {}
function _ref7() {}
function _onOnline(a) {

@@ -25,20 +25,20 @@ window.addEventListener("online", (function() {

var _rollupPluginBabelHelpers = require("./7832a774.js"), core = require("@urql/core"), getRequestPromise = function(a) {
return new Promise((function(c, d) {
var _rollupPluginBabelHelpers = require("./7832a774.js"), getRequestPromise = function(a) {
return new Promise((function(d, e) {
a.onerror = function() {
d(a.error);
e(a.error);
};
a.onsuccess = function() {
c(a.result);
d(a.result);
};
}));
}, getTransactionPromise = function(a) {
return new Promise((function(c, d) {
return new Promise((function(d, e) {
a.onerror = function() {
d(a.error);
e(a.error);
};
a.oncomplete = c;
a.oncomplete = d;
}));
}, makeDefaultStorage = function(a) {
function c(b) {
function d(b) {
(b = b.transaction("metadata", "readwrite")).objectStore("metadata").clear();

@@ -48,60 +48,71 @@ b.objectStore("entries").clear();

}
function d(b) {
function e(b) {
return getRequestPromise(b.transaction("metadata", "readonly").objectStore("metadata").get("metadata"));
}
function m(b) {
return getRequestPromise(b.transaction("entries", "readwrite").objectStore("entries").put(n(), k));
function r(b) {
return getRequestPromise(b.transaction("entries", "readwrite").objectStore("entries").put(t(), l));
}
function p() {
function u() {
return g;
}
var q, g, k, r, h, f, n, l;
var v, g, l, w, k, h, n, p, t, q;
a || (a = {});
q = a.idbName || "graphcache-v3", g = Object.create(null), k = Math.floor((new Date).valueOf() / 864e5),
r = k - (a.maxAge || 7), h = indexedDB.open(q, 1), f = getRequestPromise(h);
h.onupgradeneeded = function() {
h.result.createObjectStore("entries");
h.result.createObjectStore("metadata");
v = a.idbName || "graphcache-v4", g = Object.create(null), l = Math.floor((new Date).valueOf() / 864e5),
w = l - (a.maxAge || 7), k = indexedDB.open(v, 1), h = getRequestPromise(k);
k.onupgradeneeded = function() {
k.result.createObjectStore("entries");
k.result.createObjectStore("metadata");
};
n = function() {
var a, e, b = "";
n = _ref, p = _ref2, t = function() {
var a, c, b = "";
for (a in g) {
e = g[a];
b += core.stringifyVariables(a) + ":" + (void 0 !== e ? core.stringifyVariables(e) : "null") + ",";
c = g[a];
b += n(a);
b += ":";
c && (b += n(c));
b += ":";
}
return b;
}, l = _ref;
}, q = function(b) {
for (var f, a = {}, c = "", d = "", m = 0, e = 0; e < b.length; ) {
for (f = ""; ":" !== (c = b[e++]) && c; ) {
f += c;
}
m ? (a[d] = p(f) || void 0, m = 0) : (d = p(f), m = 1);
}
return a;
};
return {
clear: function() {
return f.then(c);
return h.then(d);
},
readMetadata: function() {
return f.then(d, _ref4);
return h.then(e, _ref5);
},
writeMetadata: function(b) {
f.then((function(a) {
h.then((function(a) {
return getRequestPromise(a.transaction("metadata", "readwrite").objectStore("metadata").put(b, "metadata"));
}), _ref5);
}), _ref6);
},
writeData: function(b) {
_rollupPluginBabelHelpers._extends(g, b);
b = _ref6;
return f.then(m).then(b, b);
b = _ref7;
return h.then(r).then(b, b);
},
readData: function() {
var b = [];
return f.then((function(a) {
var e = (a = a.transaction("entries", "readwrite")).objectStore("entries");
(e.openKeyCursor || e.openCursor).call(e).onsuccess = function() {
var c, d, f;
return h.then((function(a) {
var c = (a = a.transaction("entries", "readwrite")).objectStore("entries");
(c.openKeyCursor || c.openCursor).call(c).onsuccess = function() {
var f, d, e;
if (this.result) {
if ("number" != typeof (c = this.result.key) || c < r) {
e.delete(c);
if ("number" != typeof (f = this.result.key) || f < w) {
c.delete(f);
} else {
d = e.get(c), f = b.length;
d = c.get(f), e = b.length;
b.push("");
d.onsuccess = function a() {
var a = "" + d.result;
c === k && _rollupPluginBabelHelpers._extends(g, l(a));
b[f] = a;
f === l && _rollupPluginBabelHelpers._extends(g, q(a));
b[e] = a;
};

@@ -114,4 +125,4 @@ }

})).then((function() {
return l(b.join(""));
}), p);
return q(b.join(""));
}), u);
},

@@ -118,0 +129,0 @@ onOnline: _onOnline

@@ -1,2 +0,2 @@

"use strict";var e=require("./1cc90026.min.js"),t=require("@urql/core"),n=function(e){return new Promise((function(t,n){e.onerror=function(){n(e.error)},e.onsuccess=function(){t(e.result)}}))},r=function(e){return new Promise((function(t,n){e.onerror=function(){n(e.error)},e.oncomplete=t}))};function a(e){try{return JSON.parse("{"+e.slice(0,-1)+"}")}catch(e){return{}}}function o(){return null}function i(){}function u(){}function c(e){window.addEventListener("online",(function(){e()}))}exports.makeDefaultStorage=function(s){function f(e){return(e=e.transaction("metadata","readwrite")).objectStore("metadata").clear(),e.objectStore("entries").clear(),r(e)}function l(e){return n(e.transaction("metadata","readonly").objectStore("metadata").get("metadata"))}function d(e){return n(e.transaction("entries","readwrite").objectStore("entries").put(S(),b))}function m(){return v}s||(s={});var h=s.idbName||"graphcache-v3",v=Object.create(null),b=Math.floor((new Date).valueOf()/864e5),p=b-(s.maxAge||7),j=indexedDB.open(h,1),w=n(j);j.onupgradeneeded=function(){j.result.createObjectStore("entries"),j.result.createObjectStore("metadata")};var S=function(){var e,n="";for(e in v){var r=v[e];n+=t.stringifyVariables(e)+":"+(void 0!==r?t.stringifyVariables(r):"null")+","}return n},g=a;return{clear:function(){return w.then(f)},readMetadata:function(){return w.then(l,o)},writeMetadata:function(e){w.then((function(t){return n(t.transaction("metadata","readwrite").objectStore("metadata").put(e,"metadata"))}),i)},writeData:function(t){return e._extends(v,t),t=u,w.then(d).then(t,t)},readData:function(){var t=[];return w.then((function(n){var a=(n=n.transaction("entries","readwrite")).objectStore("entries");return(a.openKeyCursor||a.openCursor).call(a).onsuccess=function(){if(this.result){var n=this.result.key;if("number"!=typeof n||n<p)a.delete(n);else{var r=a.get(n),o=t.length;t.push(""),r.onsuccess=function(){var a=""+r.result;n===b&&e._extends(v,g(a)),t[o]=a}}this.result.continue()}},r(n)})).then((function(){return g(t.join(""))}),m)},onOnline:c}};
"use strict";var e=require("./1cc90026.min.js"),t=function(e){return new Promise((function(t,n){e.onerror=function(){n(e.error)},e.onsuccess=function(){t(e.result)}}))},n=function(e){return new Promise((function(t,n){e.onerror=function(){n(e.error)},e.oncomplete=t}))};function r(e){return e.replace(/:/g,"%3a")}function a(e){return e.replace(/%3a/g,":")}function o(){return null}function u(){}function i(){}function c(e){window.addEventListener("online",(function(){e()}))}exports.makeDefaultStorage=function(s){function f(e){return(e=e.transaction("metadata","readwrite")).objectStore("metadata").clear(),e.objectStore("entries").clear(),n(e)}function d(e){return t(e.transaction("metadata","readonly").objectStore("metadata").get("metadata"))}function l(e){return t(e.transaction("entries","readwrite").objectStore("entries").put(x(),p))}function m(){return v}s||(s={});var h=s.idbName||"graphcache-v4",v=Object.create(null),p=Math.floor((new Date).valueOf()/864e5),b=p-(s.maxAge||7),j=indexedDB.open(h,1),w=t(j);j.onupgradeneeded=function(){j.result.createObjectStore("entries"),j.result.createObjectStore("metadata")};var g=r,S=a,x=function(){var e,t="";for(e in v){var n=v[e];t+=g(e),t+=":",n&&(t+=g(n)),t+=":"}return t},D=function(e){for(var t,n={},r="",a="",o=0,u=0;u<e.length;){for(t="";":"!==(r=e[u++])&&r;)t+=r;o?(n[a]=S(t)||void 0,o=0):(a=S(t),o=1)}return n};return{clear:function(){return w.then(f)},readMetadata:function(){return w.then(d,o)},writeMetadata:function(e){w.then((function(n){return t(n.transaction("metadata","readwrite").objectStore("metadata").put(e,"metadata"))}),u)},writeData:function(t){return e._extends(v,t),t=i,w.then(l).then(t,t)},readData:function(){var t=[];return w.then((function(r){var a=(r=r.transaction("entries","readwrite")).objectStore("entries");return(a.openKeyCursor||a.openCursor).call(a).onsuccess=function(){if(this.result){var n=this.result.key;if("number"!=typeof n||n<b)a.delete(n);else{var r=a.get(n),o=t.length;t.push(""),r.onsuccess=function(){var a=""+r.result;n===p&&e._extends(v,D(a)),t[o]=a}}this.result.continue()}},n(r)})).then((function(){return D(t.join(""))}),m)},onOnline:c}};
//# sourceMappingURL=urql-exchange-graphcache-default-storage.min.js.map

@@ -32,8 +32,8 @@ "use strict";

function _ref2$1(a, b, c) {
var e, d;
var d, e;
if (0 < (currentData.refCount[a] || 0)) {
c.delete(a);
} else {
for (e in currentData.refLock) {
if (0 < ((b = currentData.refLock[e])[a] || 0)) {
for (d in currentData.refLock) {
if (0 < ((b = currentData.refLock[d])[a] || 0)) {
return;

@@ -46,6 +46,6 @@ }

currentData.records.base.delete(a);
if (e = currentData.links.base.get(a)) {
if (d = currentData.links.base.get(a)) {
currentData.links.base.delete(a);
for (d in e) {
updateRCForLink(c, currentData.refCount, e[d], -1);
for (e in d) {
updateRCForLink(c, currentData.refCount, d[e], -1);
}

@@ -102,15 +102,15 @@ }

}, getFieldArguments = function(a, b) {
var d, f, g, h, c = {}, e = 0;
var e, f, g, h, c = {}, d = 0;
if (a.arguments && a.arguments.length) {
for (d = 0, f = a.arguments.length; d < f; d++) {
null != (h = valueFromASTUntyped.valueFromASTUntyped((g = a.arguments[d]).value, b)) && (c[getName(g)] = h,
e++);
for (e = 0, f = a.arguments.length; e < f; e++) {
null != (h = valueFromASTUntyped.valueFromASTUntyped((g = a.arguments[e]).value, b)) && (c[getName(g)] = h,
d++);
}
}
return 0 < e ? c : null;
return 0 < d ? c : null;
}, filterVariables = function(a, b) {
var c, e, d, f;
var c, d, e, f;
if (b && a.variableDefinitions) {
for (c = {}, e = 0, d = a.variableDefinitions.length; e < d; e++) {
c[f = getName(a.variableDefinitions[e].variable)] = b[f];
for (c = {}, d = 0, e = a.variableDefinitions.length; d < e; d++) {
c[f = getName(a.variableDefinitions[d].variable)] = b[f];
}

@@ -120,3 +120,3 @@ return c;

}, normalizeVariables = function(a, b) {
var e, d, f, g, h, c = {};
var d, e, f, g, h, c = {};
if (!b) {

@@ -126,4 +126,4 @@ return c;

if (a.variableDefinitions) {
for (e = 0, d = a.variableDefinitions.length; e < d; e++) {
c[g = getName((f = a.variableDefinitions[e]).variable)] = void 0 === b[g] && f.defaultValue ? valueFromASTUntyped.valueFromASTUntyped(f.defaultValue, b) : b[g];
for (d = 0, e = a.variableDefinitions.length; d < e; d++) {
c[g = getName((f = a.variableDefinitions[d]).variable)] = void 0 === b[g] && f.defaultValue ? valueFromASTUntyped.valueFromASTUntyped(f.defaultValue, b) : b[g];
}

@@ -151,8 +151,8 @@ }

}, shouldInclude = function(a, b) {
var e, d, f, c = a.directives;
var d, e, f, c = a.directives;
if (!c) {
return !0;
}
for (e = 0, d = c.length; e < d; e++) {
if (("include" === (a = getName(f = c[e])) || "skip" === a) && f.arguments && f.arguments[0] && "if" === getName(f.arguments[0])) {
for (d = 0, e = c.length; d < e; d++) {
if (("include" === (a = getName(f = c[d])) || "skip" === a) && f.arguments && f.arguments[0] && "if" === getName(f.arguments[0])) {
return b = valueFromASTUntyped.valueFromASTUntyped(f.arguments[0].value, b), "include" === a ? !!b : !b;

@@ -179,11 +179,11 @@ }

}
var e = a.getType(b), d = a.getType(c);
if (e instanceof definition.GraphQLObjectType) {
return e === d;
var d = a.getType(b), e = a.getType(c);
if (d instanceof definition.GraphQLObjectType) {
return d === e;
}
!function expectAbstractType(a, b) {
invariant(a instanceof definition.GraphQLInterfaceType || a instanceof definition.GraphQLUnionType, "production" !== process.env.NODE_ENV ? "Invalid Abstract type: The type `" + b + "` is not an Interface or Union type in the defined schema, but a fragment in the GraphQL document is using it as a type condition." : "", 5);
}(e, b);
expectObjectType(d, c);
return a.isPossibleType(e, d);
}(d, b);
expectObjectType(e, c);
return a.isPossibleType(d, e);
}, getField = function(a, b, c) {

@@ -224,4 +224,2 @@ expectObjectType(a = a.getType(b), b);

return !0;
}, scheduleTask = "production" === process.env.NODE_ENV && "undefined" != typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : function(a) {
return setTimeout(a, 0);
}, currentOperation = null, currentData = null, currentDependencies = null, currentOptimisticKey = null, currentIgnoreOptimistic = !1, makeNodeMap = function() {

@@ -232,9 +230,9 @@ return {

};
}, initDataState = function(a, b, c, e) {
}, initDataState = function(a, b, c, d) {
currentOperation = a;
currentData = b;
currentDependencies = makeDict();
currentIgnoreOptimistic = !1;
currentIgnoreOptimistic = !!d;
"production" !== process.env.NODE_ENV && (currentDebugStack.length = 0);
c ? e || 0 < b.optimisticOrder.length ? (e || b.commutativeKeys.has(c) ? e && b.commutativeKeys.delete(c) : reserveLayer(b, c),
c ? d || 0 < b.optimisticOrder.length ? (d || b.commutativeKeys.has(c) ? d && b.commutativeKeys.delete(c) : reserveLayer(b, c),
currentOptimisticKey = c, createLayer(b, c)) : (currentOptimisticKey = null, deleteLayer(b, c)) : currentOptimisticKey = null;

@@ -244,2 +242,3 @@ }, clearDataState = function() {

var b = currentData, c = currentOptimisticKey;
currentIgnoreOptimistic = !1;
currentOptimisticKey = null;

@@ -251,3 +250,5 @@ if (c && -1 < b.optimisticOrder.indexOf(c)) {

}
"test" === process.env.NODE_ENV || b.defer || (b.defer = !0, scheduleTask((function a() {
currentDependencies = currentData = currentOperation = null;
"production" !== process.env.NODE_ENV && (currentDebugStack.length = 0);
"test" === process.env.NODE_ENV || b.defer || (b.defer = !0, Promise.resolve().then((function a() {
initDataState("write", b, null);

@@ -259,4 +260,2 @@ gc();

})));
currentDependencies = currentData = currentOperation = null;
"production" !== process.env.NODE_ENV && (currentDebugStack.length = 0);
}, noopDataState = function(a, b, c) {

@@ -285,25 +284,25 @@ initDataState("read", a, b, c);

};
}, setNode = function(a, b, c, e) {
var d = (a = currentOptimisticKey ? a.optimistic[currentOptimisticKey] : a.base).get(b);
void 0 === d && a.set(b, d = makeDict());
void 0 !== e || currentOptimisticKey ? d[c] = e : delete d[c];
}, setNode = function(a, b, c, d) {
var e = (a = currentOptimisticKey ? a.optimistic[currentOptimisticKey] : a.base).get(b);
void 0 === e && a.set(b, e = makeDict());
void 0 !== d || currentOptimisticKey ? e[c] = d : delete e[c];
}, getNode = function(a, b, c) {
var e, d, f, g, h;
for (d = 0, f = currentData.optimisticOrder.length; d < f; d++) {
if ((h = a.optimistic[g = currentData.optimisticOrder[d]]) && (!currentIgnoreOptimistic || currentData.commutativeKeys.has(g)) && void 0 !== (e = h.get(b)) && c in e) {
return e[c];
var d, e, f, g, h;
for (e = 0, f = currentData.optimisticOrder.length; e < f; e++) {
if ((h = a.optimistic[g = currentData.optimisticOrder[e]]) && (!currentIgnoreOptimistic || currentData.commutativeKeys.has(g)) && void 0 !== (d = h.get(b)) && c in d) {
return d[c];
}
}
return void 0 !== (e = a.base.get(b)) ? e[c] : void 0;
}, updateRCForEntity = function(a, b, c, e) {
var d = void 0 !== b[c] ? b[c] : 0;
b = b[c] = d + e | 0;
void 0 !== a && (0 >= b ? a.add(c) : 0 >= d && 0 < b && a.delete(c));
}, updateRCForLink = function(a, b, c, e) {
var d, f, g;
return void 0 !== (d = a.base.get(b)) ? d[c] : void 0;
}, updateRCForEntity = function(a, b, c, d) {
var e = void 0 !== b[c] ? b[c] : 0;
b = b[c] = e + d | 0;
void 0 !== a && (0 >= b ? a.add(c) : 0 >= e && 0 < b && a.delete(c));
}, updateRCForLink = function(a, b, c, d) {
var e, f, g;
if ("string" == typeof c) {
updateRCForEntity(a, b, c, e);
updateRCForEntity(a, b, c, d);
} else if (Array.isArray(c)) {
for (d = 0, f = c.length; d < f; d++) {
(g = c[d]) && updateRCForEntity(a, b, g, e);
for (e = 0, f = c.length; e < f; e++) {
(g = c[e]) && updateRCForEntity(a, b, g, d);
}

@@ -313,11 +312,11 @@ }

if (void 0 !== c) {
for (var e in c) {
b.has(e) || (a.push(fieldInfoOfKey(e)), b.add(e));
for (var d in c) {
b.has(d) || (a.push(fieldInfoOfKey(d)), b.add(d));
}
}
}, extractNodeMapFields = function(a, b, c, e) {
var d, f, g;
extractNodeFields(a, b, e.base.get(c));
for (d = 0, f = currentData.optimisticOrder.length; d < f; d++) {
void 0 !== (g = e.optimistic[currentData.optimisticOrder[d]]) && extractNodeFields(a, b, g.get(c));
}, extractNodeMapFields = function(a, b, c, d) {
var e, f, g;
extractNodeFields(a, b, d.base.get(c));
for (e = 0, f = currentData.optimisticOrder.length; e < f; e++) {
void 0 !== (g = d.optimistic[currentData.optimisticOrder[e]]) && extractNodeFields(a, b, g.get(c));
}

@@ -329,3 +328,3 @@ }, gc = function() {

}, updatePersist = function(a, b) {
currentData.storage && currentData.persist.add(serializeKeys(a, b));
!currentIgnoreOptimistic && currentData.storage && currentData.persist.add(serializeKeys(a, b));
}, readRecord = function(a, b) {

@@ -344,10 +343,10 @@ updateDependencies(a, b);

}, writeLink = function(a, b, c) {
var d, f, g, e = currentData;
var e, f, g, d = currentData;
if (currentOptimisticKey) {
d = e.refLock[currentOptimisticKey] || (e.refLock[currentOptimisticKey] = makeDict());
f = e.links.optimistic[currentOptimisticKey];
e = d.refLock[currentOptimisticKey] || (d.refLock[currentOptimisticKey] = makeDict());
f = d.links.optimistic[currentOptimisticKey];
} else {
d = e.refCount;
f = e.links.base;
g = e.gc;
e = d.refCount;
f = d.links.base;
g = d.gc;
}

@@ -357,5 +356,5 @@ f = (f = f && f.get(a)) && f[b];

updatePersist(a, b);
setNode(e.links, a, b, c);
updateRCForLink(g, d, f, -1);
updateRCForLink(g, d, c, 1);
setNode(d.links, a, b, c);
updateRCForLink(g, e, f, -1);
updateRCForLink(g, e, c, 1);
}, reserveLayer = function(a, b) {

@@ -383,14 +382,14 @@ var c = a.optimisticOrder.indexOf(b);

}, inspectFields = function(a) {
var b = currentData.links, c = currentData.records, e = [], d = new Set;
var b = currentData.links, c = currentData.records, d = [], e = new Set;
updateDependencies(a);
extractNodeMapFields(e, d, a, b);
extractNodeMapFields(e, d, a, c);
return e;
extractNodeMapFields(d, e, a, b);
extractNodeMapFields(d, e, a, c);
return d;
}, persistData = function() {
if (currentData.storage) {
currentIgnoreOptimistic = !0;
var b = makeDict();
currentIgnoreOptimistic = !0;
currentData.persist.forEach((function a(a) {
var f, c = deserializeKeyInfo(a), d = c.entityKey;
void 0 !== (f = readLink(d, c = c.fieldKey)) ? b[a] = ":" + core.stringifyVariables(f) : void 0 !== (f = readRecord(d, c)) ? b[a] = core.stringifyVariables(f) : b[a] = void 0;
var f, c = deserializeKeyInfo(a), e = c.entityKey;
void 0 !== (f = readLink(e, c = c.fieldKey)) ? b[a] = ":" + core.stringifyVariables(f) : void 0 !== (f = readRecord(e, c)) ? b[a] = core.stringifyVariables(f) : b[a] = void 0;
}));

@@ -402,9 +401,9 @@ currentIgnoreOptimistic = !1;

}, hydrateData = function(a, b, c) {
var e, d, f, g;
var d, e, f, g;
initDataState("read", a, null);
for (e in c) {
if (void 0 !== (d = c[e])) {
g = (f = deserializeKeyInfo(e)).entityKey;
for (d in c) {
if (void 0 !== (e = c[d])) {
g = (f = deserializeKeyInfo(d)).entityKey;
f = f.fieldKey;
":" === d[0] ? writeLink(g, f, JSON.parse(d.slice(1))) : writeRecord(g, f, JSON.parse(d));
":" === e[0] ? writeLink(g, f, JSON.parse(e.slice(1))) : writeRecord(g, f, JSON.parse(e));
}

@@ -414,3 +413,3 @@ }

a.storage = b;
}, makeContext = function(a, b, c, e, d, f) {
}, makeContext = function(a, b, c, d, e, f) {
return {

@@ -420,4 +419,4 @@ store: a,

fragments: c,
parentTypeName: e,
parentKey: d,
parentTypeName: d,
parentKey: e,
parentFieldKey: "",

@@ -428,16 +427,16 @@ fieldName: "",

};
}, updateContext = function(a, b, c, e, d) {
}, updateContext = function(a, b, c, d, e) {
a.parentTypeName = b;
a.parentKey = c;
a.parentFieldKey = e;
a.fieldName = d;
}, isFragmentHeuristicallyMatching = function(a, b, c, e) {
a.parentFieldKey = d;
a.fieldName = e;
}, isFragmentHeuristicallyMatching = function(a, b, c, d) {
if (!b) {
return !1;
}
var d = getTypeCondition(a);
if (b === d) {
var e = getTypeCondition(a);
if (b === e) {
return !0;
}
"production" !== process.env.NODE_ENV && warn("Heuristic Fragment Matching: A fragment is trying to match against the `" + b + "` type, but the type condition is `" + d + "`. Since GraphQL allows for interfaces `" + d + "` may be aninterface.\nA schema needs to be defined for this match to be deterministic, otherwise the fragment will be matched heuristically!", 16);
"production" !== process.env.NODE_ENV && warn("Heuristic Fragment Matching: A fragment is trying to match against the `" + b + "` type, but the type condition is `" + e + "`. Since GraphQL allows for interfaces `" + e + "` may be aninterface.\nA schema needs to be defined for this match to be deterministic, otherwise the fragment will be matched heuristically!", 16);
return !getSelectionSet(a).some((function(a) {

@@ -447,14 +446,14 @@ if (!isFieldNode(a)) {

}
a = keyOfField(getName(a), getFieldArguments(a, e));
a = keyOfField(getName(a), getFieldArguments(a, d));
return !hasField(c, a);
}));
}, makeSelectionIterator = function(a, b, c, e) {
var d = [ 0 ], f = [ c ];
}, makeSelectionIterator = function(a, b, c, d) {
var e = [ 0 ], f = [ c ];
return {
next: function() {
for (;0 !== d.length; ) {
var c = d[d.length - 1]++, h = f[f.length - 1];
for (;0 !== e.length; ) {
var c = e[e.length - 1]++, h = f[f.length - 1];
if (c >= h.length) {
d.pop(), f.pop(), "production" !== process.env.NODE_ENV && popDebugNode();
} else if (shouldInclude(c = h[c], e.variables)) {
e.pop(), f.pop(), "production" !== process.env.NODE_ENV && popDebugNode();
} else if (shouldInclude(c = h[c], d.variables)) {
if (isFieldNode(c)) {

@@ -464,5 +463,5 @@ if ("__typename" !== getName(c)) {

}
} else if (void 0 !== (c = isInlineFragment(c) ? c : e.fragments[getName(c)]) && ("production" !== process.env.NODE_ENV && pushDebugNode(a, c),
e.store.schema ? isInterfaceOfType(e.store.schema, getTypeCondition(c), a) : isFragmentHeuristicallyMatching(c, a, b, e.variables))) {
d.push(0), f.push(getSelectionSet(c));
} else if (void 0 !== (c = isInlineFragment(c) ? c : d.fragments[getName(c)]) && ("production" !== process.env.NODE_ENV && pushDebugNode(a, c),
d.store.schema ? isInterfaceOfType(d.store.schema, getTypeCondition(c), a) : isFragmentHeuristicallyMatching(c, a, b, d.variables))) {
e.push(0), f.push(getSelectionSet(c));
}

@@ -475,4 +474,4 @@ }

return void 0 === a ? null : a;
}, write = function(a, b, c, e) {
initDataState("write", a.data, e || null);
}, write = function(a, b, c, d) {
initDataState("write", a.data, d || null);
a = startWrite(a, b, c);

@@ -482,31 +481,31 @@ clearDataState();

}, startWrite = function(a, b, c) {
var e = getMainOperation(b.query), d = {
var d = getMainOperation(b.query), e = {
data: c,
dependencies: getCurrentDependencies()
}, f = a.rootFields[e.operation];
a = makeContext(a, normalizeVariables(e, b.variables), getFragments(b.query), f, f);
"production" !== process.env.NODE_ENV && pushDebugNode(f, e);
writeSelection(a, f, getSelectionSet(e), c);
}, f = a.rootFields[d.operation];
a = makeContext(a, normalizeVariables(d, b.variables), getFragments(b.query), f, f);
"production" !== process.env.NODE_ENV && pushDebugNode(f, d);
writeSelection(a, f, getSelectionSet(d), c);
"production" !== process.env.NODE_ENV && popDebugNode();
return d;
return e;
}, writeOptimistic = function(a, b, c) {
initDataState("write", a.data, c, !0);
c = getMainOperation(b.query);
var e = {
var d = {
data: {},
dependencies: getCurrentDependencies()
}, d = a.rootFields[c.operation];
invariant(d === a.rootFields.mutation, "production" !== process.env.NODE_ENV ? "writeOptimistic(...) was called with an operation that is not a mutation.\nThis case is unsupported and should never occur." : "", 10);
"production" !== process.env.NODE_ENV && pushDebugNode(d, c);
a = makeContext(a, normalizeVariables(c, b.variables), getFragments(b.query), d, d, !0);
writeSelection(a, d, getSelectionSet(c), e.data);
}, e = a.rootFields[c.operation];
invariant(e === a.rootFields.mutation, "production" !== process.env.NODE_ENV ? "writeOptimistic(...) was called with an operation that is not a mutation.\nThis case is unsupported and should never occur." : "", 10);
"production" !== process.env.NODE_ENV && pushDebugNode(e, c);
a = makeContext(a, normalizeVariables(c, b.variables), getFragments(b.query), e, e, !0);
writeSelection(a, e, getSelectionSet(c), d.data);
"production" !== process.env.NODE_ENV && popDebugNode();
clearDataState();
return e;
}, writeFragment = function(a, b, c, e) {
var d, f, g;
if (void 0 === (d = (b = getFragments(b))[(d = Object.keys(b))[0]])) {
return d;
}, writeFragment = function(a, b, c, d) {
var e, f, g;
if (void 0 === (e = (b = getFragments(b))[(e = Object.keys(b))[0]])) {
return "production" !== process.env.NODE_ENV ? warn("writeFragment(...) was called with an empty fragment.\nYou have to call it with at least one fragment in your GraphQL document.", 11) : void 0;
}
f = getFragmentTypeName(d);
f = getFragmentTypeName(e);
c = _rollupPluginBabelHelpers._extends({}, {

@@ -518,15 +517,15 @@ __typename: f

}
"production" !== process.env.NODE_ENV && pushDebugNode(f, d);
a = makeContext(a, e || {}, b, f, g);
writeSelection(a, g, getSelectionSet(d), c);
"production" !== process.env.NODE_ENV && pushDebugNode(f, e);
a = makeContext(a, d || {}, b, f, g);
writeSelection(a, g, getSelectionSet(e), c);
"production" !== process.env.NODE_ENV && popDebugNode();
}, writeSelection = function(a, b, c, e) {
var h, k, m, p, l, d = b === a.store.rootFields.query, f = !d && !!a.store.rootNames[b], g = f || d ? b : e.__typename;
}, writeSelection = function(a, b, c, d) {
var h, k, m, p, l, e = b === a.store.rootFields.query, f = !e && !!a.store.rootNames[b], g = f || e ? b : d.__typename;
if (g) {
f || d || !b || writeRecord(b, "__typename", g);
f || e || !b || writeRecord(b, "__typename", g);
c = makeSelectionIterator(g, b || g, c, a);
for (;h = c.next(); ) {
k = getName(h), m = getFieldArguments(h, a.variables);
d = keyOfField(k, m);
l = e[p = getFieldAlias(h)];
e = keyOfField(k, m);
l = d[p = getFieldAlias(h)];
if ("production" !== process.env.NODE_ENV) {

@@ -538,3 +537,3 @@ if (f || void 0 !== l) {

m = void 0 === h.selectionSet ? "scalar (number, boolean, etc)" : "selection set";
"production" !== process.env.NODE_ENV && warn("Invalid undefined: The field at `" + d + "` is `undefined`, but the GraphQL query expects a " + m + " for this field." + k, 13);
"production" !== process.env.NODE_ENV && warn("Invalid undefined: The field at `" + e + "` is `undefined`, but the GraphQL query expects a " + m + " for this field." + k, 13);
continue;

@@ -547,20 +546,20 @@ }

}
updateContext(a, g, g, d, k);
l = e[p] = ensureData(l(m || {}, a.store, a));
updateContext(a, g, g, e, k);
l = d[p] = ensureData(l(m || {}, a.store, a));
}
h.selectionSet ? b && !f ? (p = joinKeys(b, d), h = writeField(a, getSelectionSet(h), ensureData(l), p),
writeLink(b || g, d, h)) : writeField(a, getSelectionSet(h), ensureData(l)) : b && !f && writeRecord(b || g, d, l);
f && (updateContext(a, g, g, joinKeys(g, d), k), d = a.store.updates[g][k]) && (e[k] = l,
d(e, m || {}, a.store, a));
h.selectionSet ? b && !f ? (p = joinKeys(b, e), h = writeField(a, getSelectionSet(h), ensureData(l), p),
writeLink(b || g, e, h)) : writeField(a, getSelectionSet(h), ensureData(l)) : b && !f && writeRecord(b || g, e, l);
f && (updateContext(a, g, g, joinKeys(g, e), k), e = a.store.updates[g][k]) && (d[k] = l,
e(d, m || {}, a.store, a));
}
}
}, KEYLESS_TYPE_RE = /^__|PageInfo|(Connection|Edge)$/, writeField = function(a, b, c, e) {
var d, f, g, h, k;
}, KEYLESS_TYPE_RE = /^__|PageInfo|(Connection|Edge)$/, writeField = function(a, b, c, d) {
var e, f, g, h, k;
if (Array.isArray(c)) {
for (d = Array(c.length), f = 0, g = c.length; f < g; f++) {
h = c[f], k = e ? joinKeys(e, "" + f) : void 0;
for (e = Array(c.length), f = 0, g = c.length; f < g; f++) {
h = c[f], k = d ? joinKeys(d, "" + f) : void 0;
h = writeField(a, b, h, k);
d[f] = h;
e[f] = h;
}
return d;
return e;
}

@@ -570,9 +569,9 @@ if (null === c) {

}
d = a.store.keyOfEntity(c);
e = a.store.keyOfEntity(c);
f = c.__typename;
"production" !== process.env.NODE_ENV && e && void 0 === a.store.keys[c.__typename] && null === d && "string" == typeof f && !KEYLESS_TYPE_RE.test(f) && warn("Invalid key: The GraphQL query at the field at `" + e + "` has a selection set, but no key could be generated for the data at this field.\nYou have to request `id` or `_id` fields for all selection sets or create a custom `keys` config for `" + f + "`.\nEntities without keys will be embedded directly on the parent entity. If this is intentional, create a `keys` config for `" + f + "` that always returns null.", 15);
writeSelection(a, e = d || e, b, c);
return e || null;
"production" !== process.env.NODE_ENV && d && void 0 === a.store.keys[c.__typename] && null === e && "string" == typeof f && !KEYLESS_TYPE_RE.test(f) && warn("Invalid key: The GraphQL query at the field at `" + d + "` has a selection set, but no key could be generated for the data at this field.\nYou have to request `id` or `_id` fields for all selection sets or create a custom `keys` config for `" + f + "`.\nEntities without keys will be embedded directly on the parent entity. If this is intentional, create a `keys` config for `" + f + "` that always returns null.", 15);
writeSelection(a, d = e || d, b, c);
return d || null;
}, invalidateEntity = function(a, b, c) {
var e, d;
var d, e;
b = b ? [ {

@@ -582,7 +581,7 @@ fieldKey: keyOfField(b, c)

c = 0;
for (e = b.length; c < e; c++) {
void 0 !== readLink(a, d = b[c].fieldKey) ? writeLink(a, d, void 0) : writeRecord(a, d, void 0);
for (d = b.length; c < d; c++) {
void 0 !== readLink(a, e = b[c].fieldKey) ? writeLink(a, e, void 0) : writeRecord(a, e, void 0);
}
}, Store = function(a) {
var b, c, e, d, f, g;
var b, c, d, e, f, g;
this.keyOfField = keyOfField;

@@ -597,3 +596,3 @@ a || (a = {});

};
c = "Query", e = "Mutation", d = "Subscription";
c = "Query", d = "Mutation", e = "Subscription";
if (a.schema) {

@@ -604,36 +603,36 @@ a = (f = this.schema = buildClientSchema.buildClientSchema(a.schema)).getQueryType();

a && (c = a.name);
g && (e = g.name);
f && (d = f.name);
g && (d = g.name);
f && (e = f.name);
"production" !== process.env.NODE_ENV && (this.keys && function expectValidKeyingConfig(a, b) {
if ("production" !== process.env.NODE_ENV) {
var e = Object.keys(a.getTypeMap());
var d = Object.keys(a.getTypeMap());
Object.keys(b).forEach((function c(a) {
"production" !== process.env.NODE_ENV && -1 === e.indexOf(a) && warn("Invalid Object type: The type `" + a + "` is not an object in the defined schema, but the `keys` option is referencing it.", 20);
"production" !== process.env.NODE_ENV && -1 === d.indexOf(a) && warn("Invalid Object type: The type `" + a + "` is not an object in the defined schema, but the `keys` option is referencing it.", 20);
}));
}
}(this.schema, this.keys), (0 < Object.keys(this.updates.Mutation).length || 0 < Object.keys(this.updates.Subscription).length) && function expectValidUpdatesConfig(a, b) {
var c, e, d, f;
var c, d, e, f;
if ("production" !== process.env.NODE_ENV) {
c = a.getMutationType() ? Object.keys(a.getMutationType().toConfig().fields) : [];
a = a.getSubscriptionType() ? Object.keys(a.getSubscriptionType().toConfig().fields) : [];
e = b.Mutation ? Object.keys(b.Mutation) : [];
d = b.Mutation ? Object.keys(b.Mutation) : [];
b = b.Subscription ? Object.keys(b.Subscription) : [];
for (d = 0; d < e.length; d += 1) {
f = e[d];
for (e = 0; e < d.length; e += 1) {
f = d[e];
"production" !== process.env.NODE_ENV && -1 === c.indexOf(f) && warn("Invalid mutation field: `" + f + "` is not in the defined schema, but the `updates.Mutation` option is referencing it.", 21);
}
for (c = 0; c < b.length; c += 1) {
e = b[c], "production" !== process.env.NODE_ENV && -1 === a.indexOf(e) && warn("Invalid subscription field: `" + e + "` is not in the defined schema, but the `updates.Subscription` option is referencing it.", 22);
d = b[c], "production" !== process.env.NODE_ENV && -1 === a.indexOf(d) && warn("Invalid subscription field: `" + d + "` is not in the defined schema, but the `updates.Subscription` option is referencing it.", 22);
}
}
}(this.schema, this.updates), this.resolvers && function expectValidResolversConfig(a, b) {
var c, e, d, f, g, h, k;
var c, d, e, f, g, h, k;
if ("production" !== process.env.NODE_ENV) {
c = Object.keys(a.getTypeMap());
for (e in b) {
if ("Query" === e) {
if (d = a.getQueryType()) {
d = Object.keys(d.toConfig().fields);
for (d in b) {
if ("Query" === d) {
if (e = a.getQueryType()) {
e = Object.keys(e.toConfig().fields);
for (f in b.Query) {
-1 === d.indexOf(f) && warnAboutResolver("Query." + f);
-1 === e.indexOf(f) && warnAboutResolver("Query." + f);
}

@@ -643,8 +642,8 @@ } else {

}
} else if (-1 === c.indexOf(e)) {
warnAboutResolver(e);
} else if (-1 === c.indexOf(d)) {
warnAboutResolver(d);
} else {
d = Object.keys(a.getType(e).getFields());
for (g = 0, h = Object.keys(b[e]); g < h.length; g += 1) {
-1 === d.indexOf(k = h[g]) && warnAboutResolver(e + "." + k);
e = Object.keys(a.getType(d).getFields());
for (g = 0, h = Object.keys(b[d]); g < h.length; g += 1) {
-1 === e.indexOf(k = h[g]) && warnAboutResolver(d + "." + k);
}

@@ -665,6 +664,6 @@ }

query: c,
mutation: e,
subscription: d
mutation: d,
subscription: e
};
this.rootNames = ((b = {})[c] = "query", b[e] = "mutation", b[d] = "subscription",
this.rootNames = ((b = {})[c] = "query", b[d] = "mutation", b[e] = "subscription",
b);

@@ -675,3 +674,3 @@ this.data = make(c);

Store.prototype.keyOfEntity = function(a) {
var d, b = a.__typename, c = a.id, e = a._id;
var e, b = a.__typename, c = a.id, d = a._id;
if (!b) {

@@ -683,4 +682,4 @@ return null;

}
this.keys[b] ? d = this.keys[b](a) : null != c ? d = "" + c : null != e && (d = "" + e);
return d ? b + ":" + d : null;
this.keys[b] ? e = this.keys[b](a) : null != c ? e = "" + c : null != d && (e = "" + d);
return e ? b + ":" + e : null;
};

@@ -701,5 +700,5 @@

Store.prototype.invalidate = function(a, b, c) {
var e = "string" == typeof a ? a : this.keyOfEntity(a);
invariant(e, "production" !== process.env.NODE_ENV ? "object" == "Can't generate a key for invalidate(...).\nYou have to pass an id or _id field or create a custom `keys` field for `" + typeof a ? a.__typename : a + "`." : "", 19);
invalidateEntity(e, b, c);
var d = "string" == typeof a ? a : this.keyOfEntity(a);
invariant(d, "production" !== process.env.NODE_ENV ? "object" == "Can't generate a key for invalidate(...).\nYou have to pass an id or _id field or create a custom `keys` field for `" + typeof a ? a.__typename : a + "`." : "", 19);
invalidateEntity(d, b, c);
};

@@ -734,7 +733,7 @@

}, read = function(a, b, c) {
var e = getMainOperation(b.query), d = a.rootFields[e.operation], f = getSelectionSet(e);
a = makeContext(a, normalizeVariables(e, b.variables), getFragments(b.query), d, d);
"production" !== process.env.NODE_ENV && pushDebugNode(d, e);
var d = getMainOperation(b.query), e = a.rootFields[d.operation], f = getSelectionSet(d);
a = makeContext(a, normalizeVariables(d, b.variables), getFragments(b.query), e, e);
"production" !== process.env.NODE_ENV && pushDebugNode(e, d);
c = c || {};
c = d !== a.store.rootFields.query ? readRoot(a, d, f, c) : readSelection(a, d, f, c);
c = e !== a.store.rootFields.query ? readRoot(a, e, f, c) : readSelection(a, e, f, c);
"production" !== process.env.NODE_ENV && popDebugNode();

@@ -746,12 +745,12 @@ return {

};
}, readRoot = function(a, b, c, e) {
var d, f, g;
if ("string" != typeof e.__typename) {
return e;
}, readRoot = function(a, b, c, d) {
var e, f, g;
if ("string" != typeof d.__typename) {
return d;
}
b = makeSelectionIterator(b, b, c, a);
(c = {}).__typename = e.__typename;
for (;void 0 !== (d = b.next()); ) {
g = e[f = getFieldAlias(d)];
void 0 !== d.selectionSet && null !== g ? (g = ensureData(g), c[f] = readRootField(a, getSelectionSet(d), g)) : c[f] = g;
(c = {}).__typename = d.__typename;
for (;void 0 !== (e = b.next()); ) {
g = d[f = getFieldAlias(e)];
void 0 !== e.selectionSet && null !== g ? (g = ensureData(g), c[f] = readRootField(a, getSelectionSet(e), g)) : c[f] = g;
}

@@ -761,6 +760,6 @@ return c;

if (Array.isArray(c)) {
for (var e = Array(c.length), d = 0, f = c.length; d < f; d++) {
e[d] = readRootField(a, b, c[d]);
for (var d = Array(c.length), e = 0, f = c.length; e < f; e++) {
d[e] = readRootField(a, b, c[e]);
}
return e;
return d;
}

@@ -770,10 +769,10 @@ if (null === c) {

}
return null !== (e = a.store.keyOfEntity(c)) ? void 0 === (a = readSelection(a, e, b, {})) ? null : a : readRoot(a, c.__typename, b, c);
}, readFragment = function(a, b, c, e) {
var d, f;
if (void 0 === (d = (b = getFragments(b))[(d = Object.keys(b))[0]])) {
return null !== (d = a.store.keyOfEntity(c)) ? void 0 === (a = readSelection(a, d, b, {})) ? null : a : readRoot(a, c.__typename, b, c);
}, readFragment = function(a, b, c, d) {
var e, f;
if (void 0 === (e = (b = getFragments(b))[(e = Object.keys(b))[0]])) {
return "production" !== process.env.NODE_ENV && warn("readFragment(...) was called with an empty fragment.\nYou have to call it with at least one fragment in your GraphQL document.", 6),
null;
}
f = getFragmentTypeName(d);
f = getFragmentTypeName(e);
"string" == typeof c || c.__typename || (c.__typename = f);

@@ -786,18 +785,19 @@ if (!(c = "string" != typeof c ? a.keyOfEntity(_rollupPluginBabelHelpers._extends({}, {

}
"production" !== process.env.NODE_ENV && pushDebugNode(f, d);
a = makeContext(a, e || {}, b, f, c);
a = readSelection(a, c, getSelectionSet(d), {}) || null;
"production" !== process.env.NODE_ENV && pushDebugNode(f, e);
a = makeContext(a, d || {}, b, f, c);
a = readSelection(a, c, getSelectionSet(e), {}) || null;
"production" !== process.env.NODE_ENV && popDebugNode();
return a;
}, readSelection = function(a, b, c, e, d) {
var k, m, p, l, r, n, u, t, v, w, x, q, f = a.store, g = b === f.rootFields.query, h = d && f.keyOfEntity(d) || b;
if ("string" == typeof (b = g ? b : readRecord(h, "__typename") || d && d.__typename)) {
if (d && b !== d.__typename) {
}, readSelection = function(a, b, c, d, e) {
var k, m, p, l, r, n, u, t, v, w, x, q, f = a.store, g = b === f.rootFields.query, h = e && f.keyOfEntity(e) || b;
"production" !== process.env.NODE_ENV && !g && a.store.rootNames[h] && warn("Invalid root traversal: A selection was being read on `" + h + "` which is an uncached root type.\nThe `" + a.store.rootFields.mutation + "` and `" + a.store.rootFields.subscription + "` types are special Operation Root Types and cannot be read back from the cache.", 25);
if ("string" == typeof (b = g ? b : readRecord(h, "__typename") || e && e.__typename)) {
if (e && b !== e.__typename) {
"production" !== process.env.NODE_ENV && warn("Invalid resolver data: The resolver at `" + h + "` returned an invalid typename that could not be reconciled with the cache.", 8);
} else {
e.__typename = b;
d.__typename = b;
c = makeSelectionIterator(b, h, c, a);
for (m = !1, p = !1; void 0 !== (k = c.next()); ) {
l = getName(k), r = getFieldArguments(k, a.variables), n = getFieldAlias(k), u = keyOfField(l, r),
t = joinKeys(h, u), v = readRecord(h, u), w = d ? d[l] : void 0, x = f.resolvers[b];
t = joinKeys(h, u), v = readRecord(h, u), w = e ? e[l] : void 0, x = f.resolvers[b];
"production" !== process.env.NODE_ENV && f.schema && b && isFieldAvailableOnType(f.schema, b, l);

@@ -808,4 +808,4 @@ q = void 0;

} else if ("read" === getCurrentOperation() && x && "function" == typeof x[l]) {
if (updateContext(a, b, h, t, l), void 0 !== v && (e[n] = v), q = x[l](e, r || {}, f, a),
void 0 !== k.selectionSet && (q = resolveResolverResult(a, b, l, t, getSelectionSet(k), e[n] || {}, q)),
if (updateContext(a, b, h, t, l), void 0 !== v && (d[n] = v), q = x[l](d, r || {}, f, a),
void 0 !== k.selectionSet && (q = resolveResolverResult(a, b, l, t, getSelectionSet(k), d[n] || {}, q)),
f.schema && null === q && !isFieldNullable(f.schema, b, l)) {

@@ -815,6 +815,6 @@ return;

} else {
void 0 === k.selectionSet ? q = v : void 0 !== w ? q = resolveResolverResult(a, b, l, t, getSelectionSet(k), e[n], w) : void 0 !== (r = readLink(h, u)) ? q = resolveLink(a, r, b, l, getSelectionSet(k), e[n]) : "object" == typeof v && null !== v && (q = v);
void 0 === k.selectionSet ? q = v : void 0 !== w ? q = resolveResolverResult(a, b, l, t, getSelectionSet(k), d[n], w) : void 0 !== (r = readLink(h, u)) ? q = resolveLink(a, r, b, l, getSelectionSet(k), d[n]) : "object" == typeof v && null !== v && (q = v);
}
if (void 0 === q && f.schema && isFieldNullable(f.schema, b, l)) {
p = !0, e[n] = null;
p = !0, d[n] = null;
} else {

@@ -825,10 +825,10 @@ if (void 0 === q) {

m = !0;
e[n] = q;
d[n] = q;
}
}
p && (a.partial = !0);
return g && p && !m ? void 0 : e;
return g && p && !m ? void 0 : d;
}
}
}, resolveResolverResult = function(a, b, c, e, d, f, g) {
}, resolveResolverResult = function(a, b, c, d, e, f, g) {
var h, k, m, p, l;

@@ -838,3 +838,3 @@ if (Array.isArray(g)) {

for (k = Array(g.length), m = 0, p = g.length; m < p; m++) {
if (void 0 !== (l = resolveResolverResult(a, b, c, joinKeys(e, "" + m), d, null != f ? f[m] : void 0, g[m])) || h) {
if (void 0 !== (l = resolveResolverResult(a, b, c, joinKeys(d, "" + m), e, null != f ? f[m] : void 0, g[m])) || h) {
k[m] = void 0 !== l ? l : null;

@@ -854,11 +854,11 @@ } else {

if (isDataOrKey(g)) {
return b = f || {}, "string" == typeof g ? readSelection(a, g, d, b) : readSelection(a, e, d, b, g);
return b = f || {}, "string" == typeof g ? readSelection(a, g, e, b) : readSelection(a, d, e, b, g);
}
"production" !== process.env.NODE_ENV && warn("Invalid resolver value: The field at `" + e + "` is a scalar (number, boolean, etc), but the GraphQL query expects a selection set for this field.", 9);
}, resolveLink = function(a, b, c, e, d, f) {
"production" !== process.env.NODE_ENV && warn("Invalid resolver value: The field at `" + d + "` is a scalar (number, boolean, etc), but the GraphQL query expects a selection set for this field.", 9);
}, resolveLink = function(a, b, c, d, e, f) {
var g, h, k, m, p;
if (Array.isArray(b)) {
g = (g = a.store).schema && isListNullable(g.schema, c, e);
g = (g = a.store).schema && isListNullable(g.schema, c, d);
for (h = Array(b.length), k = 0, m = b.length; k < m; k++) {
if (void 0 !== (p = resolveLink(a, b[k], c, e, d, null != f ? f[k] : void 0)) || g) {
if (void 0 !== (p = resolveLink(a, b[k], c, d, e, null != f ? f[k] : void 0)) || g) {
h[k] = void 0 !== p ? p : null;

@@ -871,3 +871,3 @@ } else {

}
return null === b || null === f ? null : readSelection(a, b, d, f || {});
return null === b || null === f ? null : readSelection(a, b, e, f || {});
}, isDataOrKey = function(a) {

@@ -893,3 +893,3 @@ return "string" == typeof a || "object" == typeof a && "string" == typeof a.__typename;

return function(b) {
function e(a) {
function d(a) {
"production" !== process.env.NODE_ENV && r({

@@ -903,7 +903,7 @@ type: "cacheMiss",

}
function d(a) {
function e(a) {
return "miss" === a.outcome && "cache-only" !== a.operation.context.requestPolicy && !B(a.dependencies);
}
function f(a) {
var b = a.operation, c = a.outcome, d = a.dependencies, e = {
var b = a.operation, c = a.outcome, e = a.dependencies, d = {
operation: addCacheOutcome(b, c),

@@ -915,3 +915,3 @@ data: a.data,

if ("cache-and-network" === b.context.requestPolicy || "cache-first" === b.context.requestPolicy && "partial" === c) {
e.stale = !0, B(d) ? "cache-and-network" === b.context.requestPolicy && q.add(b.key) : l.reexecuteOperation(toRequestPolicy(b, "network-only"));
d.stale = !0, B(e) ? "cache-and-network" === b.context.requestPolicy && q.add(b.key) : l.reexecuteOperation(toRequestPolicy(b, "network-only"));
}

@@ -923,7 +923,7 @@ "production" !== process.env.NODE_ENV && r({

data: {
value: e
value: d
},
source: "cacheExchange"
});
return e;
return d;
}

@@ -1062,3 +1062,3 @@ function g(a) {

b = wonka.filter(_ref3$1)(b);
c = wonka.map(e)(wonka.filter(d)(a));
c = wonka.map(d)(wonka.filter(e)(a));
a = wonka.map(f)(wonka.filter(_ref7)(a));

@@ -1072,9 +1072,9 @@ c = wonka.share(p(wonka.map(E)(wonka.merge([ b, c ]))));

}, isOptimisticMutation = function(a, b) {
var d, c = b.variables || makeDict(), e = getFragments(b.query);
var e, c = b.variables || makeDict(), d = getFragments(b.query);
b = [].concat(getSelectionSet(getMainOperation(b.query)));
for (;d = b.pop(); ) {
if (shouldInclude(d, c)) {
if (!isFieldNode(d)) {
(d = isInlineFragment(d) ? d : e[getName(d)]) && b.push.apply(b, getSelectionSet(d));
} else if (a[getName(d)]) {
for (;e = b.pop(); ) {
if (shouldInclude(e, c)) {
if (!isFieldNode(e)) {
(e = isInlineFragment(e) ? e : d[getName(e)]) && b.push.apply(b, getSelectionSet(e));
} else if (a[getName(e)]) {
return !0;

@@ -1091,3 +1091,3 @@ }

return function(b) {
function d(a) {
function e(a) {
return "subscription" !== a.operation.operationName && isOfflineError(a.error) ? "mutation" === a.operation.operationName ? isOptimisticMutation(l, a.operation) ? (r.push(a.operation),

@@ -1104,5 +1104,5 @@ n(), !1) : !0 : !1 : !0;

p = function f(a) {
return wonka.filter(d)(h(a));
return wonka.filter(e)(h(a));
};
m.onOnline(t = function e() {
m.onOnline(t = function d() {
for (var a; !u && (a = r.shift()); ) {

@@ -1109,0 +1109,0 @@ u = !0, k.dispatchOperation(k.createRequestOperation("mutation", a)), u = !1;

@@ -1,2 +0,2 @@

"use strict";var e=require("./1cc90026.min.js"),t=require("graphql/utilities/valueFromASTUntyped"),r=require("graphql/language/kinds"),n=require("graphql/type/definition"),i=require("@urql/core"),o=require("graphql/utilities/buildClientSchema"),a=require("wonka"),u=require("graphql/language/printer"),s=function(e){return e.name.value},f=function(e){return e.typeCondition.name.value},c=function(e){return e.alias?e.alias.value:s(e)},l=function(e){return e.selectionSet?e.selectionSet.selections:[]},d=function(e){return(e=e.typeCondition)?s(e):null},p=function(e){return e.kind===r.Kind.FIELD},v=function(e){return e.kind===r.Kind.INLINE_FRAGMENT},y=function(e,r){var n={},i=0;if(e.arguments&&e.arguments.length)for(var o=0,a=e.arguments.length;o<a;o++){var u=e.arguments[o],f=t.valueFromASTUntyped(u.value,r);null!=f&&(n[s(u)]=f,i++)}return 0<i?n:null},m=function(e,t){if(t&&e.variableDefinitions){for(var r={},n=0,i=e.variableDefinitions.length;n<i;n++){var o=s(e.variableDefinitions[n].variable);r[o]=t[o]}return r}},h=function(e,r){var n={};if(!r)return n;if(e.variableDefinitions)for(var i=0,o=e.variableDefinitions.length;i<o;i++){var a=e.variableDefinitions[i],u=s(a.variable);n[u]=void 0===r[u]&&a.defaultValue?t.valueFromASTUntyped(a.defaultValue,r):r[u]}for(var f in r)f in n||(n[f]=r[f]);return n};function g(e,t,r){if(!e)throw(e=Error((t||"Minfied Error #"+r+"\n")+"\nhttps://bit.ly/2XbVrpR#"+r)).name="Graphcache Error",e}var k=function(e){return e.kind===r.Kind.FRAGMENT_DEFINITION};function b(e){return e.kind===r.Kind.OPERATION_DEFINITION}var q=function(e){return g(!!(e=e.definitions.find(b)),"",1),e};function O(e,t){return e[s(t)]=t,e}var _=function(e){return e.definitions.filter(k).reduce(O,{})},x=function(e,r){var n=e.directives;if(!n)return!0;for(var i=0,o=n.length;i<o;i++){var a=n[i];if(("include"===(e=s(a))||"skip"===e)&&a.arguments&&a.arguments[0]&&"if"===s(a.arguments[0]))return r=t.valueFromASTUntyped(a.arguments[0].value,r),"include"===e?!!r:!r}return!0},w=function(e,t,r){return!!(e=S(e,t,r))&&n.isNullableType(e.type)},N=function(e,t,r){return!!(e=S(e,t,r))&&(e=n.isNonNullType(e.type)?e.type.ofType:e.type,n.isListType(e)&&n.isNullableType(e.ofType))},K=function(e,t,r){return!(!r||!t)&&(r===t||(t=e.getType(t),r=e.getType(r),t instanceof n.GraphQLObjectType?t===r:(function(e,t){g(e instanceof n.GraphQLInterfaceType||e instanceof n.GraphQLUnionType,"",5)}(t),T(r),e.isPossibleType(t,r))))},S=function(e,t,r){return T(e=e.getType(t)),e.getFields()[r]};function T(e,t){g(e instanceof n.GraphQLObjectType,"",3)}var E=function(e,t){return t?e+"("+i.stringifyVariables(t)+")":e},F=function(e,t){return e+"."+t},A=function(e){var t=e.indexOf("(");return-1<t?{fieldKey:e,fieldName:e.slice(0,t),arguments:JSON.parse(e.slice(t+1,-1))}:{fieldKey:e,fieldName:e,arguments:null}},M=function(e){var t=e.indexOf(".");return{entityKey:e.slice(0,t).replace(/%2e/g,"."),fieldKey:e=e.slice(t+1)}},L=function(){return Object.create(null)},D="undefined"!=typeof Promise?Promise.prototype.then.bind(Promise.resolve()):function(e){return setTimeout(e,0)},P=null,I=null,R=null,C=null,Q=!1,j=function(){return{optimistic:L(),base:new Map}},G=function(e,t,r,n){P=e,I=t,R=L(),Q=!1,r?n||0<t.optimisticOrder.length?(n||t.commutativeKeys.has(r)?n&&t.commutativeKeys.delete(r):ae(t,r),C=r,ue(t,r)):(C=null,fe(t,r)):C=null},V=function(){var e=I,t=C;if(C=null,t&&-1<e.optimisticOrder.indexOf(t))for(t=e.optimisticOrder.length;0<=--t&&e.refLock[e.optimisticOrder[t]]&&e.commutativeKeys.has(e.optimisticOrder[t]);)de(e.optimisticOrder[t]);e.defer||(e.defer=!0,D((function(){G("write",e,null),$(),ve(),V(),e.defer=!1}))),R=I=P=null},U=function(e,t,r){G("read",e,t,r),V()},J=function(){return g(null!==R,"",2),R},B=function(e,t,r,n){var i=(e=C?e.optimistic[C]:e.base).get(t);void 0===i&&e.set(t,i=L()),void 0!==n||C?i[r]=n:delete i[r]},z=function(e,t,r){for(var n,i=0,o=I.optimisticOrder.length;i<o;i++){var a=I.optimisticOrder[i],u=e.optimistic[a];if(u&&(!Q||I.commutativeKeys.has(a))&&void 0!==(n=u.get(t))&&r in n)return n[r]}return void 0!==(n=e.base.get(t))?n[r]:void 0},X=function(e,t,r,n){var i=void 0!==t[r]?t[r]:0;t=t[r]=i+n|0,void 0!==e&&(0>=t?e.add(r):0>=i&&0<t&&e.delete(r))},H=function(e,t,r,n){if("string"==typeof r)X(e,t,r,n);else if(Array.isArray(r))for(var i=0,o=r.length;i<o;i++){var a=r[i];a&&X(e,t,a,n)}},W=function(e,t,r){if(void 0!==r)for(var n in r)t.has(n)||(e.push(A(n)),t.add(n))},Y=function(e,t,r,n){W(e,t,n.base.get(r));for(var i=0,o=I.optimisticOrder.length;i<o;i++){var a=n.optimistic[I.optimisticOrder[i]];void 0!==a&&W(e,t,a.get(r))}};function Z(e,t,r){if(0<(I.refCount[e]||0))r.delete(e);else{for(var n in I.refLock){if(0<((t=I.refLock[n])[e]||0))return;delete t[e]}if(delete I.refCount[e],r.delete(e),I.records.base.delete(e),n=I.links.base.get(e))for(var i in I.links.base.delete(e),n)H(r,I.refCount,n[i],-1)}}var $=function(){I.gc.forEach(Z)},ee=function(e,t){"__typename"!==t&&(e!==I.queryRootKey?R[e]=!0:void 0!==t&&(R[F(e,t)]=!0))},te=function(e,t){I.storage&&I.persist.add(function(e,t){return e.replace(/\./g,"%2e")+"."+t}(e,t))},re=function(e,t){return ee(e,t),z(I.records,e,t)},ne=function(e,t){return ee(e,t),z(I.links,e,t)},ie=function(e,t,r){ee(e,t),te(e,t),B(I.records,e,t,r)},oe=function(e,t,r){var n=I;if(C)var i=n.refLock[C]||(n.refLock[C]=L()),o=n.links.optimistic[C];else{i=n.refCount,o=n.links.base;var a=n.gc}o=(o=o&&o.get(e))&&o[t],ee(e,t),te(e,t),B(n.links,e,t,r),H(a,i,o,-1),H(a,i,r,1)},ae=function(e,t){var r=e.optimisticOrder.indexOf(t);-1===r?e.optimisticOrder.unshift(t):e.commutativeKeys.has(t)||(se(e,t),e.optimisticOrder.splice(r,1),e.optimisticOrder.unshift(t)),e.commutativeKeys.add(t)},ue=function(e,t){-1===e.optimisticOrder.indexOf(t)&&e.optimisticOrder.unshift(t),e.refLock[t]||(e.refLock[t]=L(),e.links.optimistic[t]=new Map,e.records.optimistic[t]=new Map)},se=function(e,t){e.refLock[t]&&(delete e.refLock[t],delete e.records.optimistic[t],delete e.links.optimistic[t])},fe=function(e,t){var r=e.optimisticOrder.indexOf(t);-1<r&&(e.optimisticOrder.splice(r,1),e.commutativeKeys.delete(t)),se(e,t)};function ce(e,t){for(var r in e)oe(t,r,e[r])}function le(e,t){for(var r in e)ie(t,r,e[r])}var de=function(e){var t=R;R=L();var r=I.links.optimistic[e];r&&r.forEach(ce),(r=I.records.optimistic[e])&&r.forEach(le),R=t,fe(I,e)},pe=function(e){var t=I.links,r=I.records,n=[],i=new Set;return ee(e),Y(n,i,e,t),Y(n,i,e,r),n},ve=function(){if(I.storage){var e=L();Q=!0,I.persist.forEach((function(t){var r,n=M(t),o=n.entityKey;e[t]=void 0!==(r=ne(o,n=n.fieldKey))?":"+i.stringifyVariables(r):void 0!==(r=re(o,n))?i.stringifyVariables(r):void 0})),Q=!1,I.storage.writeData(e),I.persist.clear()}},ye=function(e,t,r,n,i,o){return{store:e,variables:t,fragments:r,parentTypeName:n,parentKey:i,parentFieldKey:"",fieldName:"",partial:!1,optimistic:!!o}},me=function(e,t,r,n,i){e.parentTypeName=t,e.parentKey=r,e.parentFieldKey=n,e.fieldName=i},he=function(e,t,r,n){return!(!t||t!==d(e)&&l(e).some((function(e){return!!p(e)&&(e=E(s(e),y(e,n)),!function(e,t){return void 0!==re(e,t)||void 0!==ne(e,t)}(r,e))})))},ge=function(e,t,r,n){var i=[0],o=[r];return{next:function(){for(;0!==i.length;){var r=i[i.length-1]++,a=o[o.length-1];if(r>=a.length)i.pop(),o.pop();else if(x(r=a[r],n.variables))if(p(r)){if("__typename"!==s(r))return r}else void 0!==(r=v(r)?r:n.fragments[s(r)])&&(n.store.schema?K(n.store.schema,d(r),e):he(r,e,t,n.variables))&&(i.push(0),o.push(l(r)))}}}},ke=function(e){return void 0===e?null:e},be=function(e,t,r,n){return G("write",e.data,n||null),e=qe(e,t,r),V(),e},qe=function(e,t,r){var n=q(t.query),i={data:r,dependencies:J()},o=e.rootFields[n.operation];return e=ye(e,h(n,t.variables),_(t.query),o,o),_e(e,o,l(n),r),i},Oe=function(e,t,r){G("write",e.data,r,!0),r=q(t.query);var n={data:{},dependencies:J()},i=e.rootFields[r.operation];return g(i===e.rootFields.mutation,"",10),e=ye(e,h(r,t.variables),_(t.query),i,i,!0),_e(e,i,l(r),n.data),V(),n},_e=function(e,t,r,n){var i=t===e.store.rootFields.query,o=!i&&!!e.store.rootNames[t],a=o||i?t:n.__typename;if(a){o||i||!t||ie(t,"__typename",a),r=ge(a,t||a,r,e);for(var u;u=r.next();){i=s(u);var f=y(u,e.variables),d=E(i,f),p=c(u),v=n[p];if(e.optimistic&&o){if(!(v=e.store.optimisticMutations[i]))continue;me(e,a,a,d,i),v=n[p]=ke(v(f||{},e.store,e))}u.selectionSet?t&&!o?(p=F(t,d),u=xe(e,l(u),ke(v),p),oe(t||a,d,u)):xe(e,l(u),ke(v)):t&&!o&&ie(t||a,d,v),o&&(me(e,a,a,F(a,d),i),d=e.store.updates[a][i])&&(n[i]=v,d(n,f||{},e.store,e))}}},xe=function(e,t,r,n){if(Array.isArray(r)){for(var i=Array(r.length),o=0,a=r.length;o<a;o++){var u=r[o],s=n?F(n,""+o):void 0;u=xe(e,t,u,s),i[o]=u}return i}return null===r?null:(n=e.store.keyOfEntity(r)||n,_e(e,n,t,r),n||null)},we=function(e){var t;this.keyOfField=E,e||(e={}),this.resolvers=e.resolvers||{},this.optimisticMutations=e.optimistic||{},this.keys=e.keys||{},this.updates={Mutation:e.updates&&e.updates.Mutation||{},Subscription:e.updates&&e.updates.Subscription||{}};var r="Query",n="Mutation",i="Subscription";if(e.schema){var a=this.schema=o.buildClientSchema(e.schema);e=a.getQueryType();var u=a.getMutationType();a=a.getSubscriptionType(),e&&(r=e.name),u&&(n=u.name),a&&(i=a.name)}this.rootFields={query:r,mutation:n,subscription:i},this.rootNames=((t={})[r]="query",t[n]="mutation",t[i]="subscription",t),this.data=function(e){return{defer:!1,gc:new Set,persist:new Set,queryRootKey:e,refCount:L(),refLock:L(),links:j(),records:j(),commutativeKeys:new Set,optimisticOrder:[],storage:null}}(r)};we.prototype.keyOfEntity=function(e){var t,r=e.__typename,n=e.id,i=e._id;return r?void 0!==this.rootNames[r]?r:(this.keys[r]?t=this.keys[r](e):null!=n?t=""+n:null!=i&&(t=""+i),t?r+":"+t:null):null},we.prototype.resolveFieldByKey=function(e,t){if(null===(e=null!==e&&"string"!=typeof e?this.keyOfEntity(e):e))return null;var r=re(e,t);return void 0!==r?r:(t=ne(e,t))?t:null},we.prototype.resolve=function(e,t,r){return this.resolveFieldByKey(e,E(t,r))},we.prototype.invalidate=function(e,t,r){g(e="string"==typeof e?e:this.keyOfEntity(e),"",19),function(e,t,r){t=t?[{fieldKey:E(t,r)}]:pe(e),r=0;for(var n=t.length;r<n;r++){var i=t[r].fieldKey;void 0!==ne(e,i)?oe(e,i,void 0):ie(e,i,void 0)}}(e,t,r)},we.prototype.inspectFields=function(e){return null!==(e=null!==e&&"string"!=typeof e?this.keyOfEntity(e):e)?pe(e):[]},we.prototype.updateQuery=function(e,t){e=i.createRequest(e.query,e.variables),null!==(t=t(this.readQuery(e)))&&qe(this,e,t)},we.prototype.readQuery=function(e){return Ke(this,i.createRequest(e.query,e.variables)).data},we.prototype.readFragment=function(e,t,r){return Ee(this,e,t,r)},we.prototype.writeFragment=function(t,r,n){!function(t,r,n,i){r=_(r);var o=Object.keys(r);if(void 0!==(o=r[o[0]])){var a=f(o);n=e._extends({},{__typename:a},n);var u=t.keyOfEntity(n);u&&(t=ye(t,i||{},r,a,u),_e(t,u,l(o),n))}}(this,t,r,n)};var Ne=function(e,t,r){return G("read",e.data,null),e=Ke(e,t,r),V(),e},Ke=function(e,t,r){var n=q(t.query),i=e.rootFields[n.operation],o=l(n);return r=r||{},r=i!==(e=ye(e,h(n,t.variables),_(t.query),i,i)).store.rootFields.query?Se(e,i,o,r):Fe(e,i,o,r),{dependencies:J(),partial:void 0!==r&&e.partial,data:void 0===r?null:r}},Se=function(e,t,r,n){if("string"!=typeof n.__typename)return n;t=ge(t,t,r,e),(r={}).__typename=n.__typename;for(var i;void 0!==(i=t.next());){var o=c(i),a=n[o];void 0!==i.selectionSet&&null!==a?(a=ke(a),r[o]=Te(e,l(i),a)):r[o]=a}return r},Te=function(e,t,r){if(Array.isArray(r)){for(var n=Array(r.length),i=0,o=r.length;i<o;i++)n[i]=Te(e,t,r[i]);return n}return null===r?null:null!==(n=e.store.keyOfEntity(r))?void 0===(e=Fe(e,n,t,{}))?null:e:Se(e,r.__typename,t,r)},Ee=function(t,r,n,i){r=_(r);var o=Object.keys(r);if(void 0===(o=r[o[0]]))return null;var a=f(o);return"string"==typeof n||n.__typename||(n.__typename=a),(n="string"!=typeof n?t.keyOfEntity(e._extends({},{__typename:a},n)):n)?(t=ye(t,i||{},r,a,n),Fe(t,n,l(o),{})||null):null},Fe=function(e,t,r,n,i){var o=e.store,a=t===o.rootFields.query,u=i&&o.keyOfEntity(i)||t;if("string"==typeof(t=a?t:re(u,"__typename")||i&&i.__typename)&&(!i||t===i.__typename)){n.__typename=t,r=ge(t,u,r,e);for(var f,d=!1,p=!1;void 0!==(f=r.next());){var v=s(f),m=y(f,e.variables),h=c(f),k=E(v,m),b=F(u,k),q=re(u,k),O=i?i[v]:void 0,_=o.resolvers[t],x=void 0;if(void 0!==O&&void 0===f.selectionSet)x=O;else if("read"===(g(null!==P,"",2),P)&&_&&"function"==typeof _[v]){if(me(e,t,u,b,v),void 0!==q&&(n[h]=q),x=_[v](n,m||{},o,e),void 0!==f.selectionSet&&(x=Ae(e,t,v,b,l(f),n[h]||{},x)),o.schema&&null===x&&!w(o.schema,t,v))return}else void 0===f.selectionSet?x=q:void 0!==O?x=Ae(e,t,v,b,l(f),n[h],O):void 0!==(m=ne(u,k))?x=Me(e,m,t,v,l(f),n[h]):"object"==typeof q&&null!==q&&(x=q);if(void 0===x&&o.schema&&w(o.schema,t,v))p=!0,n[h]=null;else{if(void 0===x)return;d=!0,n[h]=x}}return p&&(e.partial=!0),a&&p&&!d?void 0:n}},Ae=function(e,t,r,n,i,o,a){if(Array.isArray(a)){var u=e.store;u=!u.schema||N(u.schema,t,r);for(var s=Array(a.length),f=0,c=a.length;f<c;f++){var l=Ae(e,t,r,F(n,""+f),i,null!=o?o[f]:void 0,a[f]);if(void 0===l&&!u)return;s[f]=void 0!==l?l:null}return s}return null==a?a:null===o?null:Le(a)?(t=o||{},"string"==typeof a?Fe(e,a,i,t):Fe(e,n,i,t,a)):void 0},Me=function(e,t,r,n,i,o){if(Array.isArray(t)){var a=e.store;a=a.schema&&N(a.schema,r,n);for(var u=Array(t.length),s=0,f=t.length;s<f;s++){var c=Me(e,t[s],r,n,i,null!=o?o[s]:void 0);if(void 0===c&&!a)return;u[s]=void 0!==c?c:null}return u}return null===t||null===o?null:Fe(e,t,i,o||{})},Le=function(e){return"string"==typeof e||"object"==typeof e&&"string"==typeof e.__typename},De=function(t,r){return e._extends({},t,{context:e._extends({},t.context,{meta:e._extends({},t.context.meta,{cacheOutcome:r})})})},Pe=function(t,r){return e._extends({},t,{context:e._extends({},t.context,{requestPolicy:r})})};function Ie(e){return"query"===e.operationName&&"network-only"!==e.context.requestPolicy}function Re(e){return"query"!==e.operationName||"network-only"===e.context.requestPolicy}function Ce(e){return"miss"!==e.outcome||"cache-only"===e.operation.context.requestPolicy}var Qe=function(t){return function(r){function n(e){return De(e.operation,"miss")}function o(e){return"miss"===e.outcome&&"cache-only"!==e.operation.context.requestPolicy&&!x(e.dependencies)}function u(e){var t=e.operation,r=e.outcome,n=e.dependencies;return e={operation:De(t,r),data:e.data,error:e.error,extensions:e.extensions},("cache-and-network"===t.context.requestPolicy||"cache-first"===t.context.requestPolicy&&"partial"===r)&&(e.stale=!0,x(n)?"cache-and-network"===t.context.requestPolicy&&O.add(t.key):v.reexecuteOperation(Pe(t,"network-only"))),e}function s(e){var t=new Set,r=E(e,t);return N(e.operation,t),r}function f(e){return!h.has(e.operation.key)}function c(e){if(g.push(e)<h.size)return a.empty;for(var t=0;t<g.length;t++)ae(y.data,g[t].operation.key);for(var r in b)delete b[r];t=[],r=new Set;for(var n;n=g.shift();)t.push(E(n,r));return N(e.operation,r),a.fromArray(t)}function l(e){return h.has(e.operation.key)}var d,p=r.forward,v=r.client,y=new we(t);t&&t.storage&&(d=t.storage.readData().then((function(e){!function(e,t,r){for(var n in G("read",e,null),r){var i=r[n];if(void 0!==i){var o=M(n),a=o.entityKey;o=o.fieldKey,":"===i[0]?oe(a,o,JSON.parse(i.slice(1))):ie(a,o,JSON.parse(i))}}V(),e.storage=t}(y.data,t.storage,e)})));var h=new Map,g=[],k=new Map,b=L(),O=new Set,_=L(),x=function(e){for(var t in e)if(b[t])return!0;return!1},w=function(e,t){if(t)for(var r in t)if(t=_[r]){_[r]=[];for(var n=0,i=t.length;n<i;n++)e.add(t[n])}},N=function(e,t){t.forEach((function(t){if(t!==e.key){var r=k.get(t);if(r){k.delete(t);var n="cache-first";O.has(t)&&(O.delete(t),n="cache-and-network"),v.reexecuteOperation(Pe(r,n))}}}))},K=function(t){if("query"===t.operationName)ae(y.data,t.key);else if("teardown"===t.operationName)k.delete(t.key),U(y.data,t.key);else if("mutation"===t.operationName&&"network-only"!==t.context.requestPolicy){var r=Oe(y,t,t.key).dependencies;if(!function(e){for(var t in e)return!1;return!0}(r)){for(var n in r)b[n]=!0;h.set(t.key,r),n=new Set,w(n,r),N(t,n)}}return e._extends({},t,{variables:t.variables?m(q(t.query),t.variables):t.variables,query:i.formatDocument(t.query)})},S=function(e,t){for(var r in t)(_[r]||(_[r]=[])).push(e.key),k.set(e.key,e)},T=function(e){var t=Ne(y,e),r=t.data?t.partial?"partial":"hit":"miss";return S(e,t.dependencies),{outcome:r,operation:e,data:t.data,dependencies:t.dependencies}},E=function(e,t){var r=e.operation,n=e.error,i=e.extensions,o=r.key;if("mutation"===r.operationName){var a=h.get(o);w(t,a),h.delete(o)}else ae(y.data,r.key);if(e.data){if(o=be(y,r,e.data,o).dependencies,w(t,o),o=Ne(y,r,e.data),e.data=o.data,"query"===r.operationName){var u=o.dependencies;w(t,u)}}else U(y.data,r.key);return u&&S(e.operation,u),{data:e.data,error:n,extensions:i,operation:r}};return function(e){e=a.share(e);var t=d?a.mergeMap(a.fromArray)(a.take(1)(a.buffer(a.fromPromise(d))(e))):a.empty;t=a.share(a.concat([t,e])),e=a.share(a.map(T)(a.filter(Ie)(t))),t=a.filter(Re)(t);var r=a.map(n)(a.filter(o)(e));return e=a.map(u)(a.filter(Ce)(e)),r=a.share(p(a.map(K)(a.merge([t,r])))),t=a.map(s)(a.filter(f)(r)),r=a.mergeMap(c)(a.filter(l)(r)),a.merge([t,r,e])}}};function je(e){return{query:u.print(e.query),variables:e.variables}}exports.Store=we,exports.cacheExchange=Qe,exports.noopDataState=U,exports.offlineExchange=function(e){return function(t){function r(e){return"subscription"===e.operation.operationName||!function(e){return e&&e.networkError&&!e.response&&("undefined"!=typeof navigator&&!1===navigator.onLine||/request failed|failed to fetch|network\s?error/i.test(e.networkError.message))}(e.error)||"mutation"===e.operation.operationName&&(!function(e,t){var r,n=t.variables||L(),i=_(t.query);for(t=[].concat(l(q(t.query)));r=t.pop();)if(x(r,n))if(p(r)){if(e[s(r)])return!0}else(r=v(r)?r:i[s(r)])&&t.push.apply(t,l(r));return!1}(c,e.operation)||(d.push(e.operation),y(),!1))}var n=t.forward,o=t.client;t=t.dispatchDebug;var u=e.storage,f=n;if(u&&u.onOnline&&u.readMetadata&&u.writeMetadata){var c=e.optimistic||{},d=[],y=function(){u.writeMetadata(d.map(je))},m=!1,h=function(){for(var e;!m&&(e=d.shift());)m=!0,o.dispatchOperation(o.createRequestOperation("mutation",e)),m=!1;y()};f=function(e){return a.filter(r)(n(e))},u.onOnline(h),u.readMetadata().then((function(e){if(e)for(var t=0;t<e.length;t++)d.push(i.createRequest(e[t].query,e[t].variables));h()}))}return Qe(e)({forward:f,client:o,dispatchDebug:t})}},exports.query=Ne,exports.reserveLayer=ae,exports.write=be,exports.writeOptimistic=Oe;
"use strict";var e=require("./1cc90026.min.js"),t=require("graphql/utilities/valueFromASTUntyped"),r=require("graphql/language/kinds"),n=require("graphql/type/definition"),i=require("@urql/core"),o=require("graphql/utilities/buildClientSchema"),a=require("wonka"),u=require("graphql/language/printer"),s=function(e){return e.name.value},f=function(e){return e.typeCondition.name.value},l=function(e){return e.alias?e.alias.value:s(e)},c=function(e){return e.selectionSet?e.selectionSet.selections:[]},d=function(e){return(e=e.typeCondition)?s(e):null},p=function(e){return e.kind===r.Kind.FIELD},v=function(e){return e.kind===r.Kind.INLINE_FRAGMENT},y=function(e,r){var n={},i=0;if(e.arguments&&e.arguments.length)for(var o=0,a=e.arguments.length;o<a;o++){var u=e.arguments[o],f=t.valueFromASTUntyped(u.value,r);null!=f&&(n[s(u)]=f,i++)}return 0<i?n:null},m=function(e,t){if(t&&e.variableDefinitions){for(var r={},n=0,i=e.variableDefinitions.length;n<i;n++){var o=s(e.variableDefinitions[n].variable);r[o]=t[o]}return r}},h=function(e,r){var n={};if(!r)return n;if(e.variableDefinitions)for(var i=0,o=e.variableDefinitions.length;i<o;i++){var a=e.variableDefinitions[i],u=s(a.variable);n[u]=void 0===r[u]&&a.defaultValue?t.valueFromASTUntyped(a.defaultValue,r):r[u]}for(var f in r)f in n||(n[f]=r[f]);return n};function g(e,t,r){if(!e)throw(e=Error((t||"Minfied Error #"+r+"\n")+"\nhttps://bit.ly/2XbVrpR#"+r)).name="Graphcache Error",e}var k=function(e){return e.kind===r.Kind.FRAGMENT_DEFINITION};function b(e){return e.kind===r.Kind.OPERATION_DEFINITION}var q=function(e){return g(!!(e=e.definitions.find(b)),"",1),e};function O(e,t){return e[s(t)]=t,e}var _=function(e){return e.definitions.filter(k).reduce(O,{})},x=function(e,r){var n=e.directives;if(!n)return!0;for(var i=0,o=n.length;i<o;i++){var a=n[i];if(("include"===(e=s(a))||"skip"===e)&&a.arguments&&a.arguments[0]&&"if"===s(a.arguments[0]))return r=t.valueFromASTUntyped(a.arguments[0].value,r),"include"===e?!!r:!r}return!0},w=function(e,t,r){return!!(e=S(e,t,r))&&n.isNullableType(e.type)},N=function(e,t,r){return!!(e=S(e,t,r))&&(e=n.isNonNullType(e.type)?e.type.ofType:e.type,n.isListType(e)&&n.isNullableType(e.ofType))},K=function(e,t,r){return!(!r||!t)&&(r===t||(t=e.getType(t),r=e.getType(r),t instanceof n.GraphQLObjectType?t===r:(function(e,t){g(e instanceof n.GraphQLInterfaceType||e instanceof n.GraphQLUnionType,"",5)}(t),E(r),e.isPossibleType(t,r))))},S=function(e,t,r){return E(e=e.getType(t)),e.getFields()[r]};function E(e,t){g(e instanceof n.GraphQLObjectType,"",3)}var T=function(e,t){return t?e+"("+i.stringifyVariables(t)+")":e},F=function(e,t){return e+"."+t},A=function(e){var t=e.indexOf("(");return-1<t?{fieldKey:e,fieldName:e.slice(0,t),arguments:JSON.parse(e.slice(t+1,-1))}:{fieldKey:e,fieldName:e,arguments:null}},M=function(e){var t=e.indexOf(".");return{entityKey:e.slice(0,t).replace(/%2e/g,"."),fieldKey:e=e.slice(t+1)}},L=function(){return Object.create(null)},D=null,P=null,I=null,R=null,C=!1,Q=function(){return{optimistic:L(),base:new Map}},j=function(e,t,r,n){D=e,P=t,I=L(),C=!!n,r?n||0<t.optimisticOrder.length?(n||t.commutativeKeys.has(r)?n&&t.commutativeKeys.delete(r):oe(t,r),R=r,ae(t,r)):(R=null,se(t,r)):R=null},G=function(){var e=P,t=R;if(C=!1,R=null,t&&-1<e.optimisticOrder.indexOf(t))for(t=e.optimisticOrder.length;0<=--t&&e.refLock[e.optimisticOrder[t]]&&e.commutativeKeys.has(e.optimisticOrder[t]);)ce(e.optimisticOrder[t]);I=P=D=null,e.defer||(e.defer=!0,Promise.resolve().then((function(){j("write",e,null),Z(),pe(),G(),e.defer=!1})))},V=function(e,t,r){j("read",e,t,r),G()},U=function(){return g(null!==I,"",2),I},J=function(e,t,r,n){var i=(e=R?e.optimistic[R]:e.base).get(t);void 0===i&&e.set(t,i=L()),void 0!==n||R?i[r]=n:delete i[r]},B=function(e,t,r){for(var n,i=0,o=P.optimisticOrder.length;i<o;i++){var a=P.optimisticOrder[i],u=e.optimistic[a];if(u&&(!C||P.commutativeKeys.has(a))&&void 0!==(n=u.get(t))&&r in n)return n[r]}return void 0!==(n=e.base.get(t))?n[r]:void 0},z=function(e,t,r,n){var i=void 0!==t[r]?t[r]:0;t=t[r]=i+n|0,void 0!==e&&(0>=t?e.add(r):0>=i&&0<t&&e.delete(r))},X=function(e,t,r,n){if("string"==typeof r)z(e,t,r,n);else if(Array.isArray(r))for(var i=0,o=r.length;i<o;i++){var a=r[i];a&&z(e,t,a,n)}},H=function(e,t,r){if(void 0!==r)for(var n in r)t.has(n)||(e.push(A(n)),t.add(n))},W=function(e,t,r,n){H(e,t,n.base.get(r));for(var i=0,o=P.optimisticOrder.length;i<o;i++){var a=n.optimistic[P.optimisticOrder[i]];void 0!==a&&H(e,t,a.get(r))}};function Y(e,t,r){if(0<(P.refCount[e]||0))r.delete(e);else{for(var n in P.refLock){if(0<((t=P.refLock[n])[e]||0))return;delete t[e]}if(delete P.refCount[e],r.delete(e),P.records.base.delete(e),n=P.links.base.get(e))for(var i in P.links.base.delete(e),n)X(r,P.refCount,n[i],-1)}}var Z=function(){P.gc.forEach(Y)},$=function(e,t){"__typename"!==t&&(e!==P.queryRootKey?I[e]=!0:void 0!==t&&(I[F(e,t)]=!0))},ee=function(e,t){!C&&P.storage&&P.persist.add(function(e,t){return e.replace(/\./g,"%2e")+"."+t}(e,t))},te=function(e,t){return $(e,t),B(P.records,e,t)},re=function(e,t){return $(e,t),B(P.links,e,t)},ne=function(e,t,r){$(e,t),ee(e,t),J(P.records,e,t,r)},ie=function(e,t,r){var n=P;if(R)var i=n.refLock[R]||(n.refLock[R]=L()),o=n.links.optimistic[R];else{i=n.refCount,o=n.links.base;var a=n.gc}o=(o=o&&o.get(e))&&o[t],$(e,t),ee(e,t),J(n.links,e,t,r),X(a,i,o,-1),X(a,i,r,1)},oe=function(e,t){var r=e.optimisticOrder.indexOf(t);-1===r?e.optimisticOrder.unshift(t):e.commutativeKeys.has(t)||(ue(e,t),e.optimisticOrder.splice(r,1),e.optimisticOrder.unshift(t)),e.commutativeKeys.add(t)},ae=function(e,t){-1===e.optimisticOrder.indexOf(t)&&e.optimisticOrder.unshift(t),e.refLock[t]||(e.refLock[t]=L(),e.links.optimistic[t]=new Map,e.records.optimistic[t]=new Map)},ue=function(e,t){e.refLock[t]&&(delete e.refLock[t],delete e.records.optimistic[t],delete e.links.optimistic[t])},se=function(e,t){var r=e.optimisticOrder.indexOf(t);-1<r&&(e.optimisticOrder.splice(r,1),e.commutativeKeys.delete(t)),ue(e,t)};function fe(e,t){for(var r in e)ie(t,r,e[r])}function le(e,t){for(var r in e)ne(t,r,e[r])}var ce=function(e){var t=I;I=L();var r=P.links.optimistic[e];r&&r.forEach(fe),(r=P.records.optimistic[e])&&r.forEach(le),I=t,se(P,e)},de=function(e){var t=P.links,r=P.records,n=[],i=new Set;return $(e),W(n,i,e,t),W(n,i,e,r),n},pe=function(){if(P.storage){C=!0;var e=L();P.persist.forEach((function(t){var r,n=M(t),o=n.entityKey;e[t]=void 0!==(r=re(o,n=n.fieldKey))?":"+i.stringifyVariables(r):void 0!==(r=te(o,n))?i.stringifyVariables(r):void 0})),C=!1,P.storage.writeData(e),P.persist.clear()}},ve=function(e,t,r,n,i,o){return{store:e,variables:t,fragments:r,parentTypeName:n,parentKey:i,parentFieldKey:"",fieldName:"",partial:!1,optimistic:!!o}},ye=function(e,t,r,n,i){e.parentTypeName=t,e.parentKey=r,e.parentFieldKey=n,e.fieldName=i},me=function(e,t,r,n){return!(!t||t!==d(e)&&c(e).some((function(e){return!!p(e)&&(e=T(s(e),y(e,n)),!function(e,t){return void 0!==te(e,t)||void 0!==re(e,t)}(r,e))})))},he=function(e,t,r,n){var i=[0],o=[r];return{next:function(){for(;0!==i.length;){var r=i[i.length-1]++,a=o[o.length-1];if(r>=a.length)i.pop(),o.pop();else if(x(r=a[r],n.variables))if(p(r)){if("__typename"!==s(r))return r}else void 0!==(r=v(r)?r:n.fragments[s(r)])&&(n.store.schema?K(n.store.schema,d(r),e):me(r,e,t,n.variables))&&(i.push(0),o.push(c(r)))}}}},ge=function(e){return void 0===e?null:e},ke=function(e,t,r,n){return j("write",e.data,n||null),e=be(e,t,r),G(),e},be=function(e,t,r){var n=q(t.query),i={data:r,dependencies:U()},o=e.rootFields[n.operation];return e=ve(e,h(n,t.variables),_(t.query),o,o),Oe(e,o,c(n),r),i},qe=function(e,t,r){j("write",e.data,r,!0),r=q(t.query);var n={data:{},dependencies:U()},i=e.rootFields[r.operation];return g(i===e.rootFields.mutation,"",10),e=ve(e,h(r,t.variables),_(t.query),i,i,!0),Oe(e,i,c(r),n.data),G(),n},Oe=function(e,t,r,n){var i=t===e.store.rootFields.query,o=!i&&!!e.store.rootNames[t],a=o||i?t:n.__typename;if(a){o||i||!t||ne(t,"__typename",a),r=he(a,t||a,r,e);for(var u;u=r.next();){i=s(u);var f=y(u,e.variables),d=T(i,f),p=l(u),v=n[p];if(e.optimistic&&o){if(!(v=e.store.optimisticMutations[i]))continue;ye(e,a,a,d,i),v=n[p]=ge(v(f||{},e.store,e))}u.selectionSet?t&&!o?(p=F(t,d),u=_e(e,c(u),ge(v),p),ie(t||a,d,u)):_e(e,c(u),ge(v)):t&&!o&&ne(t||a,d,v),o&&(ye(e,a,a,F(a,d),i),d=e.store.updates[a][i])&&(n[i]=v,d(n,f||{},e.store,e))}}},_e=function(e,t,r,n){if(Array.isArray(r)){for(var i=Array(r.length),o=0,a=r.length;o<a;o++){var u=r[o],s=n?F(n,""+o):void 0;u=_e(e,t,u,s),i[o]=u}return i}return null===r?null:(n=e.store.keyOfEntity(r)||n,Oe(e,n,t,r),n||null)},xe=function(e){var t;this.keyOfField=T,e||(e={}),this.resolvers=e.resolvers||{},this.optimisticMutations=e.optimistic||{},this.keys=e.keys||{},this.updates={Mutation:e.updates&&e.updates.Mutation||{},Subscription:e.updates&&e.updates.Subscription||{}};var r="Query",n="Mutation",i="Subscription";if(e.schema){var a=this.schema=o.buildClientSchema(e.schema);e=a.getQueryType();var u=a.getMutationType();a=a.getSubscriptionType(),e&&(r=e.name),u&&(n=u.name),a&&(i=a.name)}this.rootFields={query:r,mutation:n,subscription:i},this.rootNames=((t={})[r]="query",t[n]="mutation",t[i]="subscription",t),this.data=function(e){return{defer:!1,gc:new Set,persist:new Set,queryRootKey:e,refCount:L(),refLock:L(),links:Q(),records:Q(),commutativeKeys:new Set,optimisticOrder:[],storage:null}}(r)};xe.prototype.keyOfEntity=function(e){var t,r=e.__typename,n=e.id,i=e._id;return r?void 0!==this.rootNames[r]?r:(this.keys[r]?t=this.keys[r](e):null!=n?t=""+n:null!=i&&(t=""+i),t?r+":"+t:null):null},xe.prototype.resolveFieldByKey=function(e,t){if(null===(e=null!==e&&"string"!=typeof e?this.keyOfEntity(e):e))return null;var r=te(e,t);return void 0!==r?r:(t=re(e,t))?t:null},xe.prototype.resolve=function(e,t,r){return this.resolveFieldByKey(e,T(t,r))},xe.prototype.invalidate=function(e,t,r){g(e="string"==typeof e?e:this.keyOfEntity(e),"",19),function(e,t,r){t=t?[{fieldKey:T(t,r)}]:de(e),r=0;for(var n=t.length;r<n;r++){var i=t[r].fieldKey;void 0!==re(e,i)?ie(e,i,void 0):ne(e,i,void 0)}}(e,t,r)},xe.prototype.inspectFields=function(e){return null!==(e=null!==e&&"string"!=typeof e?this.keyOfEntity(e):e)?de(e):[]},xe.prototype.updateQuery=function(e,t){e=i.createRequest(e.query,e.variables),null!==(t=t(this.readQuery(e)))&&be(this,e,t)},xe.prototype.readQuery=function(e){return Ne(this,i.createRequest(e.query,e.variables)).data},xe.prototype.readFragment=function(e,t,r){return Ee(this,e,t,r)},xe.prototype.writeFragment=function(t,r,n){!function(t,r,n,i){r=_(r);var o=Object.keys(r);if(void 0!==(o=r[o[0]])){var a=f(o);n=e._extends({},{__typename:a},n);var u=t.keyOfEntity(n);u&&(t=ve(t,i||{},r,a,u),Oe(t,u,c(o),n))}}(this,t,r,n)};var we=function(e,t,r){return j("read",e.data,null),e=Ne(e,t,r),G(),e},Ne=function(e,t,r){var n=q(t.query),i=e.rootFields[n.operation],o=c(n);return r=r||{},r=i!==(e=ve(e,h(n,t.variables),_(t.query),i,i)).store.rootFields.query?Ke(e,i,o,r):Te(e,i,o,r),{dependencies:U(),partial:void 0!==r&&e.partial,data:void 0===r?null:r}},Ke=function(e,t,r,n){if("string"!=typeof n.__typename)return n;t=he(t,t,r,e),(r={}).__typename=n.__typename;for(var i;void 0!==(i=t.next());){var o=l(i),a=n[o];void 0!==i.selectionSet&&null!==a?(a=ge(a),r[o]=Se(e,c(i),a)):r[o]=a}return r},Se=function(e,t,r){if(Array.isArray(r)){for(var n=Array(r.length),i=0,o=r.length;i<o;i++)n[i]=Se(e,t,r[i]);return n}return null===r?null:null!==(n=e.store.keyOfEntity(r))?void 0===(e=Te(e,n,t,{}))?null:e:Ke(e,r.__typename,t,r)},Ee=function(t,r,n,i){r=_(r);var o=Object.keys(r);if(void 0===(o=r[o[0]]))return null;var a=f(o);return"string"==typeof n||n.__typename||(n.__typename=a),(n="string"!=typeof n?t.keyOfEntity(e._extends({},{__typename:a},n)):n)?(t=ve(t,i||{},r,a,n),Te(t,n,c(o),{})||null):null},Te=function(e,t,r,n,i){var o=e.store,a=t===o.rootFields.query,u=i&&o.keyOfEntity(i)||t;if("string"==typeof(t=a?t:te(u,"__typename")||i&&i.__typename)&&(!i||t===i.__typename)){n.__typename=t,r=he(t,u,r,e);for(var f,d=!1,p=!1;void 0!==(f=r.next());){var v=s(f),m=y(f,e.variables),h=l(f),k=T(v,m),b=F(u,k),q=te(u,k),O=i?i[v]:void 0,_=o.resolvers[t],x=void 0;if(void 0!==O&&void 0===f.selectionSet)x=O;else if("read"===(g(null!==D,"",2),D)&&_&&"function"==typeof _[v]){if(ye(e,t,u,b,v),void 0!==q&&(n[h]=q),x=_[v](n,m||{},o,e),void 0!==f.selectionSet&&(x=Fe(e,t,v,b,c(f),n[h]||{},x)),o.schema&&null===x&&!w(o.schema,t,v))return}else void 0===f.selectionSet?x=q:void 0!==O?x=Fe(e,t,v,b,c(f),n[h],O):void 0!==(m=re(u,k))?x=Ae(e,m,t,v,c(f),n[h]):"object"==typeof q&&null!==q&&(x=q);if(void 0===x&&o.schema&&w(o.schema,t,v))p=!0,n[h]=null;else{if(void 0===x)return;d=!0,n[h]=x}}return p&&(e.partial=!0),a&&p&&!d?void 0:n}},Fe=function(e,t,r,n,i,o,a){if(Array.isArray(a)){var u=e.store;u=!u.schema||N(u.schema,t,r);for(var s=Array(a.length),f=0,l=a.length;f<l;f++){var c=Fe(e,t,r,F(n,""+f),i,null!=o?o[f]:void 0,a[f]);if(void 0===c&&!u)return;s[f]=void 0!==c?c:null}return s}return null==a?a:null===o?null:Me(a)?(t=o||{},"string"==typeof a?Te(e,a,i,t):Te(e,n,i,t,a)):void 0},Ae=function(e,t,r,n,i,o){if(Array.isArray(t)){var a=e.store;a=a.schema&&N(a.schema,r,n);for(var u=Array(t.length),s=0,f=t.length;s<f;s++){var l=Ae(e,t[s],r,n,i,null!=o?o[s]:void 0);if(void 0===l&&!a)return;u[s]=void 0!==l?l:null}return u}return null===t||null===o?null:Te(e,t,i,o||{})},Me=function(e){return"string"==typeof e||"object"==typeof e&&"string"==typeof e.__typename},Le=function(t,r){return e._extends({},t,{context:e._extends({},t.context,{meta:e._extends({},t.context.meta,{cacheOutcome:r})})})},De=function(t,r){return e._extends({},t,{context:e._extends({},t.context,{requestPolicy:r})})};function Pe(e){return"query"===e.operationName&&"network-only"!==e.context.requestPolicy}function Ie(e){return"query"!==e.operationName||"network-only"===e.context.requestPolicy}function Re(e){return"miss"!==e.outcome||"cache-only"===e.operation.context.requestPolicy}var Ce=function(t){return function(r){function n(e){return Le(e.operation,"miss")}function o(e){return"miss"===e.outcome&&"cache-only"!==e.operation.context.requestPolicy&&!x(e.dependencies)}function u(e){var t=e.operation,r=e.outcome,n=e.dependencies;return e={operation:Le(t,r),data:e.data,error:e.error,extensions:e.extensions},("cache-and-network"===t.context.requestPolicy||"cache-first"===t.context.requestPolicy&&"partial"===r)&&(e.stale=!0,x(n)?"cache-and-network"===t.context.requestPolicy&&O.add(t.key):v.reexecuteOperation(De(t,"network-only"))),e}function s(e){var t=new Set,r=T(e,t);return N(e.operation,t),r}function f(e){return!h.has(e.operation.key)}function l(e){if(g.push(e)<h.size)return a.empty;for(var t=0;t<g.length;t++)oe(y.data,g[t].operation.key);for(var r in b)delete b[r];t=[],r=new Set;for(var n;n=g.shift();)t.push(T(n,r));return N(e.operation,r),a.fromArray(t)}function c(e){return h.has(e.operation.key)}var d,p=r.forward,v=r.client,y=new xe(t);t&&t.storage&&(d=t.storage.readData().then((function(e){!function(e,t,r){for(var n in j("read",e,null),r){var i=r[n];if(void 0!==i){var o=M(n),a=o.entityKey;o=o.fieldKey,":"===i[0]?ie(a,o,JSON.parse(i.slice(1))):ne(a,o,JSON.parse(i))}}G(),e.storage=t}(y.data,t.storage,e)})));var h=new Map,g=[],k=new Map,b=L(),O=new Set,_=L(),x=function(e){for(var t in e)if(b[t])return!0;return!1},w=function(e,t){if(t)for(var r in t)if(t=_[r]){_[r]=[];for(var n=0,i=t.length;n<i;n++)e.add(t[n])}},N=function(e,t){t.forEach((function(t){if(t!==e.key){var r=k.get(t);if(r){k.delete(t);var n="cache-first";O.has(t)&&(O.delete(t),n="cache-and-network"),v.reexecuteOperation(De(r,n))}}}))},K=function(t){if("query"===t.operationName)oe(y.data,t.key);else if("teardown"===t.operationName)k.delete(t.key),V(y.data,t.key);else if("mutation"===t.operationName&&"network-only"!==t.context.requestPolicy){var r=qe(y,t,t.key).dependencies;if(!function(e){for(var t in e)return!1;return!0}(r)){for(var n in r)b[n]=!0;h.set(t.key,r),n=new Set,w(n,r),N(t,n)}}return e._extends({},t,{variables:t.variables?m(q(t.query),t.variables):t.variables,query:i.formatDocument(t.query)})},S=function(e,t){for(var r in t)(_[r]||(_[r]=[])).push(e.key),k.set(e.key,e)},E=function(e){var t=we(y,e),r=t.data?t.partial?"partial":"hit":"miss";return S(e,t.dependencies),{outcome:r,operation:e,data:t.data,dependencies:t.dependencies}},T=function(e,t){var r=e.operation,n=e.error,i=e.extensions,o=r.key;if("mutation"===r.operationName){var a=h.get(o);w(t,a),h.delete(o)}else oe(y.data,r.key);if(e.data){if(o=ke(y,r,e.data,o).dependencies,w(t,o),o=we(y,r,e.data),e.data=o.data,"query"===r.operationName){var u=o.dependencies;w(t,u)}}else V(y.data,r.key);return u&&S(e.operation,u),{data:e.data,error:n,extensions:i,operation:r}};return function(e){e=a.share(e);var t=d?a.mergeMap(a.fromArray)(a.take(1)(a.buffer(a.fromPromise(d))(e))):a.empty;t=a.share(a.concat([t,e])),e=a.share(a.map(E)(a.filter(Pe)(t))),t=a.filter(Ie)(t);var r=a.map(n)(a.filter(o)(e));return e=a.map(u)(a.filter(Re)(e)),r=a.share(p(a.map(K)(a.merge([t,r])))),t=a.map(s)(a.filter(f)(r)),r=a.mergeMap(l)(a.filter(c)(r)),a.merge([t,r,e])}}};function Qe(e){return{query:u.print(e.query),variables:e.variables}}exports.Store=xe,exports.cacheExchange=Ce,exports.noopDataState=V,exports.offlineExchange=function(e){return function(t){function r(e){return"subscription"===e.operation.operationName||!function(e){return e&&e.networkError&&!e.response&&("undefined"!=typeof navigator&&!1===navigator.onLine||/request failed|failed to fetch|network\s?error/i.test(e.networkError.message))}(e.error)||"mutation"===e.operation.operationName&&(!function(e,t){var r,n=t.variables||L(),i=_(t.query);for(t=[].concat(c(q(t.query)));r=t.pop();)if(x(r,n))if(p(r)){if(e[s(r)])return!0}else(r=v(r)?r:i[s(r)])&&t.push.apply(t,c(r));return!1}(l,e.operation)||(d.push(e.operation),y(),!1))}var n=t.forward,o=t.client;t=t.dispatchDebug;var u=e.storage,f=n;if(u&&u.onOnline&&u.readMetadata&&u.writeMetadata){var l=e.optimistic||{},d=[],y=function(){u.writeMetadata(d.map(Qe))},m=!1,h=function(){for(var e;!m&&(e=d.shift());)m=!0,o.dispatchOperation(o.createRequestOperation("mutation",e)),m=!1;y()};f=function(e){return a.filter(r)(n(e))},u.onOnline(h),u.readMetadata().then((function(e){if(e)for(var t=0;t<e.length;t++)d.push(i.createRequest(e[t].query,e[t].variables));h()}))}return Ce(e)({forward:f,client:o,dispatchDebug:t})}},exports.query=we,exports.reserveLayer=oe,exports.write=ke,exports.writeOptimistic=qe;
//# sourceMappingURL=urql-exchange-graphcache.min.js.map

@@ -18,5 +18,5 @@ {

"dependencies": {
"@urql/core": ">=1.12.0",
"@urql/core": ">=1.12.1",
"wonka": "^4.0.14"
}
}
{
"name": "@urql/exchange-graphcache",
"version": "3.0.0",
"version": "3.0.1",
"description": "A normalized and configurable cache exchange for urql",

@@ -68,3 +68,3 @@ "sideEffects": false,

"dependencies": {
"@urql/core": ">=1.12.0",
"@urql/core": ">=1.12.1",
"wonka": "^4.0.14"

@@ -71,0 +71,0 @@ },

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc