Comparing version 0.10.0 to 0.11.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],e):e(t.blips={},t.graphql)}(this,function(t,e){"use strict";function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(){}function i(){i.init.call(this)}function u(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function s(t,e,r,n){var i,s,c;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=t._events)?(s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),c=s[e]):(s=t._events=new o,t._eventsCount=0),c){if("function"==typeof c?c=s[e]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),!c.warned&&(i=u(t))&&i>0&&c.length>i){c.warned=!0;var a=Error("Possible EventEmitter memory leak detected. "+c.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=c.length,function(t){"function"==typeof console.warn?console.warn(t):console.log(t)}(a)}}else c=s[e]=r,++t._eventsCount;return t}function c(t,e,r){function n(){t.removeListener(e,n),o||(o=!0,r.apply(t,arguments))}var o=!1;return n.listener=r,n}function a(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function f(t,e){for(var r=Array(e);e--;)r[e]=t[e];return r}function l(t){return!!y(t)}function h(t){var e=null!=t&&t.length;return"number"==typeof e&&e>=0&&e%1==0}function p(t){var e=y(t);if(e)return e.call(t)}function y(t){if(null!=t){var e=B&&t[B]||t["@@iterator"];if("function"==typeof e)return e}}function v(t){if(null!=t){var e=p(t);if(e)return e;if(h(t))return new b(t)}}function b(t){this._o=t,this._i=0}function d(t){var e=g(t);if(e)return e.call(t)}function g(t){if(null!=t){var e=ot&&t[ot]||t["@@asyncIterator"];if("function"==typeof e)return e}}function m(t){if(null!=t){var e=d(t);if(e)return e;var r=v(t);if(r)return new w(r)}}function w(t){this._i=t}function _(t,e,r,n){function o(t,e){return O(t,e,r.slice(),n.slice())}var i=At(t),u=At(e);return!Tt(function(t,e){return!Tt(o,e,t)},u,i)}function O(t,e,r,n){if(It(t,e))return!0;var o=Ut(t);if(o!==Ut(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===Lt(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!It(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!It(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===t)return n[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&_(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&_(t.values(),e.values(),r.concat([t]),n.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=Mt(t);if(u.length!==Mt(e).length)return!1;var s=r.concat([t]),c=n.concat([e]);for(i=u.length-1;i>=0;){var a=u[i];if(!Ot(a,e)||!O(e[a],t[a],s,c))return!1;i-=1}return!0}function x(t,e,r){for(var n=r.next();!n.done;){if((e=t["@@transducer/step"](e,n.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n=r.next()}return t["@@transducer/result"](e)}function E(t,e,r,n){return t["@@transducer/result"](r[n](zt(t["@@transducer/step"],t),e))}function j(t){return function(t,e){var r=this[t];return ye(r,t),he(r)?_t(e)?r:function(t,e){if(!pe(e))return[];var r=Object.entries(e)[0],n=r[0],o=r[1];return t.filter(function(t){return t[n]===o})}(r,e):_t(e)?r:function(t,e){if(pe(e)){var r=Object.entries(e)[0]||{},n=r[0],o=r[1];return Object.entries(t).filter(function(t){return t[1][n]===o}).reduce(function(t,e){var r;return be({},t,(r={},r[e[0]]=e[1],r))},{})}return t[e]}(r,e)}}function S(t){return function(t,e,r){var n=this[t];return ye(n,t),he(n)?function(t,e){return this[t]=[].concat(this[t]||[],[e]),e}.call(this,t,e):function(t,e,r){var n;return G(!_t(e),"You forgot to specify the payload"),G(!_t(r),"You are trying to post to a collection object but haven't specified an identifier. Try again with \"clerk.post('"+t+"', payload, identifier)\""),this[t]=ge({},this[t]||{},(n={},n[r]=e,n)),e}.call(this,t,e,r)}}function k(t){return function(t,e,r){var n=this[t];return ye(n,t),he(n)?function(t,e,r){if(_t(r))return this[t]=[].concat(this[t],[e]),e;G(pe(r),"When updating a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[t].findIndex(function(t){return t[o]===i});return this[t]=[].concat(this[t].slice(0,u),[e],this[t].slice(u+1)),e}.call(this,t,e,r):function(t,e,r){var n;return G(!_t(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+t+"', payload, identifier)\""),this[t]=we({},this[t]||{},(n={},n[r]=e,n)),e}.call(this,t,e,r)}}function P(t){return function(t,e,r){var n=this[t];return ye(n,t),G(!_t(r),"You are trying to patch a resource but haven't specified the identifier. Try again with \"clerk.patch('"+t+"', payload, key)\""),he(n)?function(t,e,r){G(pe(r),"When patching a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[t].findIndex(function(t){return t[o]===i});if(u>=0){var s=xe(this[t][u],ve(e));return this[t]=[].concat(this[t].slice(0,u),[s],this[t].slice(u+1)),s}}.call(this,t,e,r):function(t,e,r){var n;if(G(!_t(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+t+"', payload, identifier)\""),!_t(this[t][r])){var o=xe(this[t][r],ve(e));return this[t]=Ee({},this[t]||{},(n={},n[r]=o,n)),o}}.call(this,t,e,r)}}function A(t){return function(t,e){if(!_t(e)){var r=this[t];return ye(r,t),he(r)?function(t,e){if(pe(e)){var r=Object.entries(e)[0],n=r[0],o=r[1],i=this[t].findIndex(function(t){return t[n]===o});if(i>=0){var u=this[t][i];return this[t]=[].concat(this[t].slice(0,i),this[t].slice(i+1)),u}}}.call(this,t,e):function(t,e){var r=this[t][e];if(!_t(r))return this[t]=Se([e],this[t]),r}.call(this,t,e)}}}function T(){for(var t=[],e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];for(var o=Array.isArray(u=r),i=0,u=o?u:u[Symbol.iterator]();;){var s;if(o){if(i>=u.length)break;s=u[i++]}else{if((i=u.next()).done)break;s=i.value}var c=s;if("object"===(void 0===c?"undefined":Ae(c)))for(var a=c.entries?c.entries():Object.entries(c),f=Array.isArray(a),l=0,a=f?a:a[Symbol.iterator]();;){var h;if(f){if(l>=a.length)break;h=a[l++]}else{if((l=a.next()).done)break;h=l.value}t.push(h)}}return t.reduce(function(t,e){var r;return Ie({},t,(r={},r[e[0]]=e[1],r))},{})}function L(){try{return Ue.apply(this,arguments)}catch(t){return Ye.errorObject.e=t,Ye.errorObject}}function I(t){return t.reduce(function(t,e){return t.concat(e instanceof Ve.UnsubscriptionError?e.errors:e)},[])}function C(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:nr.noop}function F(t){var e=this;return ir.create(function(r){return Le(regeneratorRuntime.mark(function n(){var o,i,u,s,c,a,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,o=!0,i=!1,u=void 0,e.prev=4,s=Te(t);case 6:return e.next=8,s.next();case 8:return c=e.sent,o=c.done,e.next=12,c.value;case 12:if(a=e.sent,o){e.next=19;break}r.next(f=a);case 16:o=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),i=!0,u=e.t0;case 25:if(e.prev=25,e.prev=26,o||!s.return){e.next=30;break}return e.next=30,s.return();case 30:if(e.prev=30,!i){e.next=33;break}throw u;case 33:return e.finish(30);case 34:return e.finish(25);case 35:e.next=41;break;case 37:e.prev=37,e.t1=e.catch(0),t.return(),r.error(e.t1);case 41:case"end":return e.stop()}},n,e,[[0,37],[4,21,25,35],[26,,30,34]])}))(),t.return})}function R(t,e){if(!e||"object"!==(void 0===e?"undefined":Ae(e)))return t;var r=e.store,n=Ce(e,["store"]);r&&console.warn('You cannot extend the context with an object containing a "store" prop. It will be omitted and the other props will be added');for(var o=Object.keys(n),i=Array.isArray(o),u=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(u>=o.length)break;s=o[u++]}else{if((u=o.next()).done)break;s=u.value}var c=s;t.hasOwnProperty(c)&&console.warn('The "'+c+"\" property already exists in the context object. Make sure you haven't replaced anything important")}return Ie({},t,n)}function q(t){return"string"==typeof t?e.parse(t):t}function M(t){return"string"==typeof t?!t:!(!t||"object"!==(void 0===t?"undefined":Ae(t)))&&!Object.values(t).length}function U(t,e){return function(r){var n=!!t;return"function"==typeof t&&(n=t(r)),n?e(r):r}}function N(t){for(var e=[],r=[],n=Array.isArray(i=t),o=0,i=n?i:i[Symbol.iterator]();;){var u;if(n){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var s=u,c=s.data,a=s.errors;a&&(e=[].concat(e,a)),c&&(r=[].concat(r,[c]))}var f=function(t){var e=t.reduce(function(t,e){return Ie({},t,e)},{});return U(M,function(){})(e)}(r),l=function(t){var e=t.reduce(function(t,e){var r,n=e.path?e.path[0]:e.constructor.name;return Ie({},t,(r={},r[n]=[].concat(t[n]||[],[e]),r))},{});return U(M,function(){})(e)}(e);return Ie({},f?{data:f}:{},l?{errors:l}:{})}function D(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.context,i=void 0===o?{}:o,u=n.networkInterface,s=void 0===u?{}:u,c=arguments[1],a=new Pe(c),f=new dt,l=V(U("function"==typeof t.resolvers,function(t){var e=t.resolvers,r=Ce(t,["resolvers"]);return Ie({},r,{resolvers:e({pubsub:f,withFilter:gt})})})(t)),h=R({store:Ie({get state(){return c},set state(t){c=t}},a)},i),p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.variables,i=n.context,u=arguments[2];return t(l,U(e,q)(r),{},R(h,i),o,u)}},y=function(t){return function(r,n,o){if(o)return p(e.graphql)(r,n,o);return function(t){return new Promise(function(e,r){Promise.all(t).then(function(t){return e(N(t))},function(t){return r(t)})})}(q(r).definitions.filter(function(e){return e.operation===t}).map(function(t){return p(e.graphql)(r,n,t.name.value)}))}},v=y("query");return{get state(){return c},get schema(){return l},mutate:y("mutation"),query:v,subscribe:function(){var t=Le(regeneratorRuntime.mark(function t(n,o){var i,u,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=q(n),1>(u=i.definitions.filter(function(t){return"subscription"===t.operation})).length?G(!1,"No subscription operation defined in query"):u.length>1&&G(!1,"Only one subscription operation is allowed per query"),t.next=5,p(e.subscribe,!0)(i,o);case 5:return s=t.sent,s.toObservable=function(){return F(s)},t.abrupt("return",s);case 8:case"end":return t.stop()}},t,r)}));return function(e,r){return t.apply(this,arguments)}}(),graphql:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).variables,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,n=r.endpoint,o=void 0===n?s.endpoint:n,i=r.method,u=void 0===i?"POST":i,c=r.headers,a=void 0===c?{}:c,f=Ce(r,["endpoint","method","headers"]),l=arguments[3],h="GET"===u?"GET":"POST",p=Ie({method:h,headers:T({"content-type":"application/json"},a)},"POST"===h&&{body:JSON.stringify({query:t,variables:e,operationName:l})},f),y=new window.Request(o,p);return window.fetch(y)}}}var $="default"in e?e.default:e,G=function(t,e,r,n,o,i,u,s){if(!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[r,n,o,i,u,s],f=0;(c=Error(e.replace(/%s/g,function(){return a[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},Y="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=n(function(t,e){function r(t,e,r,n,o){var i={};return function(){var u=((Error().stack||"").match(/(?:\s+at\s.+){2}\s+at\s(.+)/)||[void 0,""])[1];if(!((u=/\)$/.test(u)?u.match(/[^(]+(?=\)$)/)[0]:u.trim())in i)){i[u]=!0;var s;switch(t){case"class":s="Class";break;case"property":s="Property";break;case"method":s="Method";break;case"function":s="Function"}s+=" `"+e+"` has been deprecated",n&&(s+=" since version "+n),r&&(s+=", use `"+r+"` instead"),s+=".",u&&(s+="\n at "+u),o&&(s+="\nCheck out "+o+" for more information."),console.warn(s)}}}function n(t,n,o,i,u,s){var c=(e.options.getWarner||r)(t,n,i,u,s),a={enumerable:(o=o||{writable:!0,enumerable:!1,configurable:!0}).enumerable,configurable:o.configurable};if(o.get||o.set)o.get&&(a.get=function(){return c(),o.get.call(this)}),o.set&&(a.set=function(t){return c(),o.set.call(this,t)});else{var f=o.value;a.get=function(){return c(),f},o.writable&&(a.set=function(t){c(),f=t})}return a}function o(t,n,o,i,u){for(var s=(e.options.getWarner||r)(t,n.name,o,i,u),c=function(){return s(),n.apply(this,arguments)},a=0,f=Object.getOwnPropertyNames(n);f.length>a;a++){var l=f[a],h=Object.getOwnPropertyDescriptor(n,l);h.writable?c[l]=n[l]:h.configurable&&Object.defineProperty(c,l,h)}return c}function i(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];var r=t[t.length-1];r="function"==typeof r?t.pop():void 0;var i,u,s,c=t[0];return"string"==typeof c?(i=c,u=t[1],s=t[2]):c&&(i=c.alternative,u=c.version,s=c.url),r?o("function",r,i,u,s):function(t,e,r){if("string"==typeof e){return n(r&&"function"==typeof r.value?"method":"property",e,r,i,u,s)}if("function"==typeof t){for(var c=o("class",t,i,u,s),a=t.name,f=0,l=Object.getOwnPropertyNames(c);l.length>f;f++){var h=l[f],p=Object.getOwnPropertyDescriptor(c,h);(p=n("class",a,p,i,u,s)).writable?c[h]=t[h]:p.configurable&&Object.defineProperty(c,h,p)}return c}}}e.options={getWarner:void 0},e.deprecated=i,Object.defineProperty(e,"__esModule",{value:!0}),e.default=i});r(W);var Q=n(function(t,e){function r(t){var e=t.resolvers,r=void 0===e?{}:e,n=t.connectors,o=t.allowUndefinedInResolve,u=t.resolverValidationOptions,s=function(t,e,r,n,o){if("object"!=typeof o)throw new m("Expected `resolverValidationOptions` to be an object");if(!t)throw new m("Must provide typeDefs");if(!e)throw new m("Must provide resolvers");var u=i(t);return a(u,e),l(u,o),n||v(u),r&&p(u,r),u}(t.typeDefs,r,t.logger,void 0===o||o,void 0===u?{}:u);return"function"==typeof r.__schema&&c(s,r.__schema),n&&w(s,n),s}function n(t){return void 0!==t.kind}function o(t,e){void 0===e&&(e=[]);var r=[];return t.forEach(function(t){if(n(t)&&(t=$.print(t)),"function"==typeof t)-1===e.indexOf(t)&&(e.push(t),r=r.concat(o(t(),e)));else{if("string"!=typeof t){throw new m("typeDef array must contain only strings and functions, got "+typeof t)}r.push(t.trim())}}),function(t){return t.reduce(function(t,e){return-1===t.indexOf(e)?t.concat([e]):t},[])}(r.map(function(t){return t.trim()})).join("\n")}function i(t){var e,r=t;if(n(t))e=t;else if("string"!=typeof r){if(!Array.isArray(r)){throw new m("typeDefs must be a string, array or schema AST, got "+typeof r)}r=o(r)}"string"==typeof r&&(e=$.parse(r));var i=d.buildASTSchema(e),s=u(e);return s.definitions.length>0&&(i=d.extendSchema(i,s)),i}function u(t){var e=t.definitions.filter(function(t){return t.kind===$.Kind.TYPE_EXTENSION_DEFINITION});return Object.assign({},t,{definitions:e})}function s(t,e){var r=t.getTypeMap();Object.keys(r).forEach(function(t){var n=r[t];if(!g.getNamedType(n).name.startsWith("__")&&n instanceof g.GraphQLObjectType){var o=n.getFields();Object.keys(o).forEach(function(r){e(o[r],t,r)})}})}function c(t,e){[t.getQueryType(),t.getMutationType(),t.getSubscriptionType()].filter(function(t){return!!t}).forEach(function(r){var n=function(t){var e,r=Math.random();return function(n,o,i,u){return u.operation.__runAtMostOnce||(u.operation.__runAtMostOnce={}),u.operation.__runAtMostOnce[r]||(u.operation.__runAtMostOnce[r]=!0,e=t(n,o,i,u)),e}}(e),o=r.getFields();Object.keys(o).forEach(function(i){o[i].resolve=r===t.getSubscriptionType()?y(o[i].resolve,e):y(o[i].resolve,n)})})}function a(t,e){Object.keys(e).forEach(function(r){var n=t.getType(r);if(!n&&"__schema"!==r)throw new m('"'+r+'" defined in resolvers, but not in schema');Object.keys(e[r]).forEach(function(t){if(t.startsWith("__"))n[t.substring(2)]=e[r][t];else if(n instanceof g.GraphQLScalarType)n[t]=e[r][t];else{var o=function(t){return t instanceof g.GraphQLObjectType||t instanceof g.GraphQLInterfaceType?t.getFields():void 0}(n);if(!o)throw new m(r+" was defined in resolvers, but it's not an object");if(!o[t])throw new m(r+"."+t+" defined in resolvers, but not in schema");var i=o[t],u=e[r][t];if("function"==typeof u)f(i,{resolve:u});else{if("object"!=typeof u)throw new m("Resolver "+r+"."+t+" must be object or function");f(i,u)}}})})}function f(t,e){Object.keys(e).forEach(function(r){t[r]=e[r]})}function l(t,e){void 0===e&&(e={});var r=e.requireResolversForArgs,n=void 0!==r&&r,o=e.requireResolversForNonScalar,i=void 0!==o&&o,u=e.requireResolversForAllFields,c=void 0!==u&&u;if(c&&(n||i))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");s(t,function(t,e,r){c&&h(t,e,r),n&&t.args.length>0&&h(t,e,r),!i||g.getNamedType(t.type)instanceof g.GraphQLScalarType||h(t,e,r)})}function h(t,e,r){if(t.resolve){if("function"!=typeof t.resolve)throw new m('Resolver "'+e+"."+r+'" must be a function')}else console.warn('Resolve function missing for "'+e+"."+r+'". To disable this warning check https://github.com/apollostack/graphql-tools/issues/131')}function p(t,e){if(!e)throw Error("Must provide a logger");if("function"!=typeof e.log)throw Error("Logger.log must be a function");s(t,function(t,r,n){t.resolve=function(t,e,r){void 0===t&&(t=$.defaultFieldResolver);var n=function(t){var n=Error();n.stack=t.stack,r&&(n.originalMessage=t.message,n.message="Error in resolver "+r+"\n"+t.message),e.log(n)};return function(e,r,o,i){try{var u=t(e,r,o,i);return u&&"function"==typeof u.then&&"function"==typeof u.catch&&u.catch(function(t){return n(t instanceof Error?t:Error(t)),t}),u}catch(t){throw n(t),t}}}(t.resolve,e,r+"."+n)})}function y(t,e){return function(r,n,o,i){return Promise.resolve(e(r,n,o,i)).then(function(e){return t?t(e,n,o,i):$.defaultFieldResolver(e,n,o,i)})}}function v(t){s(t,function(t,e,r){t.resolve=function(t,e){void 0===t&&(t=$.defaultFieldResolver);return function(r,n,o,i){var u=t(r,n,o,i);if(void 0===u)throw Error('Resolve function for "'+e+'" returned undefined');return u}}(t.resolve,e+"."+r)})}var b=Y&&Y.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var d=$,g=$,m=function(t){function e(e){var r=t.call(this,e)||this;return r.message=e,Error.captureStackTrace(r,r.constructor),r}return b(e,t),e}(Error);e.SchemaError=m,e.makeExecutableSchema=r,e.concatenateTypeDefs=o,e.buildSchemaFromTypeDefinitions=i,e.extractExtensionDefinitions=u,e.forEachField=s;var w=W.deprecated({version:"0.7.0",url:"https://github.com/apollostack/graphql-tools/issues/140"},function(t,e){if(!(t&&t instanceof g.GraphQLSchema))throw Error("schema must be an instance of GraphQLSchema. This error could be caused by installing more than one version of GraphQL-JS");if("object"!=typeof e){throw Error("Expected connectors to be of type object, got "+typeof e)}if(0===Object.keys(e).length)throw Error("Expected connectors to not be an empty object");if(Array.isArray(e))throw Error("Expected connectors to be of type object, got Array");if(t._apolloConnectorsAttached)throw Error("Connectors already attached to context, cannot attach more than once");t._apolloConnectorsAttached=!0;c(t,function(t,r,n){if("object"!=typeof n)throw Error("Cannot attach connector because context is not an object: "+typeof n);return void 0===n.connectors&&(n.connectors={}),Object.keys(e).forEach(function(t){var r=e[t];if(!r.prototype)throw Error("Connector must be a function or an class");n.connectors[t]=new r(n)}),t})});e.attachConnectorsToContext=w,e.addSchemaLevelResolveFunction=c,e.addResolveFunctionsToSchema=a,e.assertResolveFunctionsPresent=l,e.addErrorLoggingToSchema=p,e.chainResolvers=function(t){return function(e,r,n,o){return t.reduce(function(t,e){return e?e(t,r,n,o):$.defaultFieldResolver(t,r,n,o)},e)}},e.addCatchUndefinedToSchema=v});r(Q);var V=Q.makeExecutableSchema;o.prototype=Object.create(null),i.EventEmitter=i,i.usingDomains=!1,i.prototype.domain=void 0,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.init=function(){this.domain=null,i.usingDomains&&(!(void 0).active||this instanceof(void 0).Domain||(this.domain=(void 0).active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new o,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||0>t||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(t){var e,r,n,o,i,u,s,c="error"===t;if(u=this._events)c=c&&null==u.error;else if(!c)return!1;if(s=this.domain,c){if(e=arguments[1],!s){if(e instanceof Error)throw e;var a=Error('Uncaught, unspecified "error" event. ('+e+")");throw a.context=e,a}return e||(e=Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=s,e.domainThrown=!1,s.emit("error",e),!1}if(!(r=u[t]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,o=f(t,n),i=0;n>i;++i)o[i].call(r)}(r,l,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=f(t,o),u=0;o>u;++u)i[u].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,u=f(t,i),s=0;i>s;++s)u[s].call(r,n,o)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var u=t.length,s=f(t,u),c=0;u>c;++c)s[c].call(r,n,o,i)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=Array(n-1),i=1;n>i;i++)o[i-1]=arguments[i];!function(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=f(t,o),u=0;o>u;++u)i[u].apply(r,n)}(r,l,this,o)}return!0},i.prototype.on=i.prototype.addListener=function(t,e){return s(this,t,e,!1)},i.prototype.prependListener=function(t,e){return s(this,t,e,!0)},i.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,c(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,c(this,t,e)),this},i.prototype.removeListener=function(t,e){var r,n,i,u,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new o:(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,u=r.length;u-- >0;)if(r[u]===e||r[u].listener&&r[u].listener===e){s=r[u].listener,i=u;break}if(0>i)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new o,this;delete n[t]}else!function(t,e){for(var r=e,n=r+1,o=t.length;o>n;r+=1,n+=1)t[r]=t[n];t.pop()}(r,i);n.removeListener&&this.emit("removeListener",t,s||e)}return this},i.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new o,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new o:delete r[t]),this;if(0===arguments.length){for(var n,i=Object.keys(r),u=0;i.length>u;++u)"removeListener"!==(n=i[u])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new o,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},i.prototype.listeners=function(t){var e,r=this._events;return r&&(e=r[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=Array(t.length),r=0;e.length>r;++r)e[r]=t[r].listener||t[r];return e}(e):[]},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):a.call(t,e)},i.prototype.listenerCount=a,i.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var z=Object.freeze({default:i,EventEmitter:i}),B="function"==typeof Symbol&&Symbol.iterator,J=B||"@@iterator",K=J,X=l,H=h,Z=function(t){return Object(t)===t&&(h(t)||l(t))},tt=p,et=y,rt=v;b.prototype[J]=function(){return this},b.prototype.next=function(){return void 0!==this._o&&this._o.length>this._i?{value:this._o[this._i++],done:!1}:(this._o=void 0,{value:void 0,done:!0})};var nt=function(t,e,r){if(null!=t){if("function"==typeof t.forEach)return t.forEach(e,r);var n=0,o=p(t);if(o){for(var i;!(i=o.next()).done;)if(e.call(r,i.value,n++,t),n>9999999)throw new TypeError("Near-infinite iteration.")}else if(h(t))for(;t.length>n;n++)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}},ot="function"==typeof Symbol&&Symbol.asyncIterator,it=ot||"@@asyncIterator",ut=it,st=function(t){return!!g(t)},ct=d,at=g,ft=m;w.prototype[it]=function(){return this},w.prototype.next=function(){var t=this._i.next();return Promise.resolve(t.value).then(function(e){return{value:e,done:t.done}})};var lt={$$iterator:K,isIterable:X,isArrayLike:H,isCollection:Z,getIterator:tt,getIteratorMethod:et,createIterator:rt,forEach:nt,$$asyncIterator:ut,isAsyncIterable:st,getAsyncIterator:ct,getAsyncIteratorMethod:at,createAsyncIterator:ft,forAwaitEach:function(t,e,r){var n=m(t);if(n){var o=0;return new Promise(function(i,u){function s(){return n.next().then(function(n){n.done?i():Promise.resolve(e.call(r,n.value,o++,t)).then(s).catch(u)}).catch(u)}s()})}}},ht=n(function(t,e){function r(t,e){var r=[],n=[],o="string"==typeof e?[e]:e,i=!0,u=function(t){0!==r.length?r.shift()({value:t,done:!1}):n.push(t)},s=function(){i&&(i=!1,c(),r.forEach(function(t){return t({value:void 0,done:!0})}),r.length=0,n.length=0)},c=function(){for(var e=0,r=o;r.length>e;e++){t.removeListener(r[e],u)}};return function(){for(var e=0,r=o;r.length>e;e++)t.addListener(r[e],u)}(),a={next:function(){return i?new Promise(function(t){0!==n.length?t({value:n.shift(),done:!1}):r.push(t)}):this.return()},return:function(){return s(),Promise.resolve({value:void 0,done:!0})},throw:function(t){return s(),Promise.reject(t)}},a[lt.$$asyncIterator]=function(){return this},a;var a}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitterAsyncIterator=r});r(ht);var pt=z&&i||z,yt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.ee=new pt.EventEmitter,this.subscriptions={},this.subIdCounter=0}return t.prototype.publish=function(t,e){return this.ee.emit(t,e),!0},t.prototype.subscribe=function(t,e){return this.ee.addListener(t,e),this.subIdCounter=this.subIdCounter+1,this.subscriptions[this.subIdCounter]=[t,e],Promise.resolve(this.subIdCounter)},t.prototype.unsubscribe=function(t){var e=this.subscriptions[t],r=e[0],n=e[1];delete this.subscriptions[t],this.ee.removeListener(r,n)},t.prototype.asyncIterator=function(t){return ht.eventEmitterAsyncIterator(this.ee,t)},t}();e.PubSub=r});r(yt);var vt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.withFilter=function(t,e){return function(r,n,o,i){var u=t(r,n,o,i),s=function(){return u.next().then(function(t){return Promise.all([t,Promise.resolve(e(t.value,n,o,i)).catch(function(){return!1})])}).then(function(t){var e=t[0];return!0===t[1]||!0===e.done?e:s()})};return c={next:function(){return s()},return:function(){return u.return()},throw:function(t){return u.throw(t)}},c[lt.$$asyncIterator]=function(){return this},c;var c}}});r(vt);var bt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PubSub=yt.PubSub,e.withFilter=vt.withFilter});r(bt);var dt=bt.PubSub,gt=bt.withFilter,mt=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},wt=function(t){return function e(r){return 0===arguments.length||mt(r)?e:t.apply(this,arguments)}},_t=wt(function(t){return null==t}),Ot=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},xt=Object.prototype.toString,Et=function(){return"[object Arguments]"===xt.call(arguments)?function(t){return"[object Arguments]"===xt.call(t)}:function(t){return Ot("callee",t)}},jt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},St=function(t){return"[object Object]"===Object.prototype.toString.call(t)},kt=function(t){return"[object String]"===Object.prototype.toString.call(t)},Pt=function(t){return function e(r,n){switch(arguments.length){case 0:return e;case 1:return mt(r)?e:wt(function(e){return t(r,e)});default:return mt(r)&&mt(n)?e:mt(r)?wt(function(e){return t(e,n)}):mt(n)?wt(function(e){return t(r,e)}):t(r,n)}}},At=function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r},Tt=function(t,e,r){for(var n=0,o=r.length;o>n;){if(t(e,r[n]))return!0;n+=1}return!1},Lt=function(t){var e=(t+"").match(/^function (\w*)/);return null==e?"":e[1]},It=Pt(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}),Ct=!{toString:null}.propertyIsEnumerable("toString"),Ft=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Rt=function(){return arguments.propertyIsEnumerable("length")}(),qt=function(t,e){for(var r=0;t.length>r;){if(t[r]===e)return!0;r+=1}return!1},Mt=wt("function"!=typeof Object.keys||Rt?function(t){if(Object(t)!==t)return[];var e,r,n=[],o=Rt&&Et(t);for(e in t)!Ot(e,t)||o&&"length"===e||(n[n.length]=e);if(Ct)for(r=Ft.length-1;r>=0;)Ot(e=Ft[r],t)&&!qt(n,e)&&(n[n.length]=e),r-=1;return n}:function(t){return Object(t)!==t?[]:Object.keys(t)}),Ut=wt(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),Nt=O,Dt=Pt(function(t,e){return Nt(t,e,[],[])}),$t=function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,r){return e.apply(this,arguments)};case 3:return function(t,r,n){return e.apply(this,arguments)};case 4:return function(t,r,n,o){return e.apply(this,arguments)};case 5:return function(t,r,n,o,i){return e.apply(this,arguments)};case 6:return function(t,r,n,o,i,u){return e.apply(this,arguments)};case 7:return function(t,r,n,o,i,u,s){return e.apply(this,arguments)};case 8:return function(t,r,n,o,i,u,s,c){return e.apply(this,arguments)};case 9:return function(t,r,n,o,i,u,s,c,a){return e.apply(this,arguments)};case 10:return function(t,r,n,o,i,u,s,c,a,f){return e.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},Gt=function(t,e){return function(){return e.call(this,t.apply(this,arguments))}},Yt=function(t){return function e(r,n,o){switch(arguments.length){case 0:return e;case 1:return mt(r)?e:Pt(function(e,n){return t(r,e,n)});case 2:return mt(r)&&mt(n)?e:mt(r)?Pt(function(e,r){return t(e,n,r)}):mt(n)?Pt(function(e,n){return t(r,e,n)}):wt(function(e){return t(r,n,e)});default:return mt(r)&&mt(n)&&mt(o)?e:mt(r)&&mt(n)?Pt(function(e,r){return t(e,r,o)}):mt(r)&&mt(o)?Pt(function(e,r){return t(e,n,r)}):mt(n)&&mt(o)?Pt(function(e,n){return t(r,e,n)}):mt(r)?wt(function(e){return t(e,n,o)}):mt(n)?wt(function(e){return t(r,e,o)}):mt(o)?wt(function(e){return t(r,n,e)}):t(r,n,o)}}},Wt=wt(function(t){return!!jt(t)||!!t&&("object"==typeof t&&(!kt(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),Qt=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),Vt=function(t){return new Qt(t)},zt=Pt(function(t,e){return $t(t.length,function(){return t.apply(e,arguments)})}),Bt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Jt=function(t,e,r){if("function"==typeof t&&(t=Vt(t)),Wt(r))return function(t,e,r){for(var n=0,o=r.length;o>n;){if((e=t["@@transducer/step"](e,r[n]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n+=1}return t["@@transducer/result"](e)}(t,e,r);if("function"==typeof r["fantasy-land/reduce"])return E(t,e,r,"fantasy-land/reduce");if(null!=r[Bt])return x(t,e,r[Bt]());if("function"==typeof r.next)return x(t,e,r);if("function"==typeof r.reduce)return E(t,e,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},Kt=Yt(Jt),Xt=function(t,e){return function(){var r=arguments.length;if(0===r)return e();var n=arguments[r-1];return jt(n)||"function"!=typeof n[t]?e.apply(this,arguments):n[t].apply(n,Array.prototype.slice.call(arguments,0,r-1))}},Ht=wt(Xt("tail",Yt(Xt("slice",function(t,e,r){return Array.prototype.slice.call(r,t,e)}))(1,1/0))),Zt=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return $t(arguments[0].length,Kt(Gt,arguments[0],Ht(arguments)))},te=wt(function(t){return kt(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),ee=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return Zt.apply(this,te(arguments))},re=function(t){return function(){return!t.apply(this,arguments)}},ne=function(t){return"function"==typeof t["@@transducer/step"]},oe=function(t,e,r){return function(){if(0===arguments.length)return r();var n=Array.prototype.slice.call(arguments,0),o=n.pop();if(!jt(o)){for(var i=0;t.length>i;){if("function"==typeof o[t[i]])return o[t[i]].apply(o,n);i+=1}if(ne(o))return e.apply(null,n)(o)}return r.apply(this,arguments)}},ie=function(t,e){for(var r=0,n=e.length,o=[];n>r;)t(e[r])&&(o[o.length]=e[r]),r+=1;return o},ue={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},se=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=ue.init,t.prototype["@@transducer/result"]=ue.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),ce=Pt(oe(["filter"],Pt(function(t,e){return new se(t,e)}),function(t,e){return St(e)?Jt(function(r,n){return t(e[n])&&(r[n]=e[n]),r},{},Mt(e)):ie(t,e)})),ae=Pt(function(t,e){return ce(re(t),e)}),fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},le=function(t){return ee(Dt(t),Ut)},he=le("Array"),pe=le("Object"),ye=function(t,e){G(!_t(t),'The "'+e+"\" collection does not exist. You can create one using your clerk instance by running(clerk.addCollection('"+e+"'))"),G("object"===(void 0===t?"undefined":fe(t)),'"'+e+'" is not a collection. You can access it like any other property on the state object')},ve=ae(le("Undefined")),be=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},de=function(t){return j()},ge=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},me=function(t){return S()},we=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_e=function(t){return k()},Oe="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,n=arguments.length;n>r;){var o=arguments[r];if(null!=o)for(var i in o)Ot(i,o)&&(e[i]=o[i]);r+=1}return e},xe=Pt(function(t,e){return Oe({},t,e)}),Ee=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},je=function(t){return P()},Se=Pt(function(t,e){for(var r={},n={},o=0,i=t.length;i>o;)n[t[o]]=1,o+=1;for(var u in e)n.hasOwnProperty(u)||(r[u]=e[u]);return r}),ke=function(t){return A()},Pe=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.state=e,this.get=de(e).bind(e),this.post=me(e).bind(e),this.put=_e(e).bind(e),this.patch=je(e).bind(e),this.delete=ke(e).bind(e)}return t.prototype.getCollection=function(t){return this.state[t]},t.prototype.addCollection=function(t){return this.state[t]=new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object),this.state[t]},t.prototype.removeCollection=function(t){var e=this.state[t];return null!=e&&delete this.state[t],e},t}(),Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te=function(t){if("function"==typeof Symbol){if(Symbol.asyncIterator){var e=t[Symbol.asyncIterator];if(null!=e)return e.call(t)}if(Symbol.iterator)return t[Symbol.iterator]()}throw new TypeError("Object is not async iterable")},Le=(function(){function t(t){this.value=t}function e(e){function r(o,i){try{var u=e[o](i),s=u.value;s instanceof t?Promise.resolve(s.value).then(function(t){r("next",t)},function(t){r("throw",t)}):n(u.done?"return":"normal",u.value)}catch(t){n("throw",t)}}function n(t,e){switch(t){case"return":o.resolve({value:e,done:!0});break;case"throw":o.reject(e);break;default:o.resolve({value:e,done:!1})}(o=o.next)?r(o.key,o.arg):i=null}var o,i;this._invoke=function(t,e){return new Promise(function(n,u){var s={key:t,arg:e,resolve:n,reject:u,next:null};i?i=i.next=s:(o=i=s,r(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){function n(o,i){try{var u=e[o](i),s=u.value}catch(t){return void r(t)}if(!u.done)return Promise.resolve(s).then(function(t){n("next",t)},function(t){n("throw",t)});t(s)}return n("next")})}}),Ie=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ce=function(t,e){var r={};for(var n in t)0>e.indexOf(n)&&Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},Fe="undefined"!=typeof window&&window,Re="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,qe=Fe||void 0!==Y&&Y||Re,Me=qe;!function(){if(!qe)throw Error("RxJS could not find any global context (window, self, global)")}();var Ue,Ne={root:Me},De={isFunction:function(t){return"function"==typeof t}},$e={isArray:Array.isArray||function(t){return t&&"number"==typeof t.length}},Ge={isObject:function(t){return null!=t&&"object"==typeof t}},Ye={errorObject:{e:{}}},We={tryCatch:function(t){return Ue=t,L}},Qe=Y&&Y.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Ve={UnsubscriptionError:function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return Qe(e,t),e}(Error)},ze={Subscription:function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,s=n?n.length:0;r;)r.remove(this),r=++u<s&&n[u]||null;if(De.isFunction(o)){(a=We.tryCatch(o).call(this))===Ye.errorObject&&(e=!0,t=t||(Ye.errorObject.e instanceof Ve.UnsubscriptionError?I(Ye.errorObject.e.errors):[Ye.errorObject.e]))}if($e.isArray(i))for(u=-1,s=i.length;++u<s;){var c=i[u];if(Ge.isObject(c)){var a=We.tryCatch(c.unsubscribe).call(c);if(a===Ye.errorObject){e=!0,t=t||[];var f=Ye.errorObject.e;f instanceof Ve.UnsubscriptionError?t=t.concat(I(f.errors)):t.push(f)}}}if(e)throw new Ve.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this._parent,r=this._parents;e&&e!==t?r?-1===r.indexOf(t)&&r.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}()},Be={empty:{closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},Je=n(function(t,e){var r=Ne.root.Symbol;e.rxSubscriber="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber}),Ke=Y&&Y.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Xe=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Be.empty;break;case 1:if(!r){this.destination=Be.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new Ze(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new Ze(this,r,n,o)}}return Ke(e,t),e.prototype[Je.rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(ze.Subscription),He=Xe,Ze=function(t){function e(e,r,n,o){t.call(this),this._parentSubscriber=e;var i,u=this;De.isFunction(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==Be.empty&&(u=Object.create(r),De.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=i,this._error=n,this._complete=o}return Ke(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Xe),tr={Subscriber:He},er={toSubscriber:function(t,e,r){if(t){if(t instanceof tr.Subscriber)return t;if(t[Je.rxSubscriber])return t[Je.rxSubscriber]()}return t||e||r?new tr.Subscriber(t,e,r):new tr.Subscriber(Be.empty)}},rr=n(function(t,e){function r(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}e.getSymbolObservable=r,e.observable=r(Ne.root),e.$$observable=e.observable}),nr={noop:function(){}},or={pipe:function(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];return C(t)},pipeFromArray:C},ir=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=er.toSubscriber(t,e,r);if(n?n.call(o,this.source):o.add(this.source?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(Ne.root.Rx&&Ne.root.Rx.config&&Ne.root.Rx.config.Promise?e=Ne.root.Rx.config.Promise:Ne.root.Promise&&(e=Ne.root.Promise)),!e)throw Error("no Promise impl found");return new e(function(e,n){var o;o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[rr.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];return 0===t.length?this:or.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(Ne.root.Rx&&Ne.root.Rx.config&&Ne.root.Rx.config.Promise?t=Ne.root.Rx.config.Promise:Ne.root.Promise&&(t=Ne.root.Promise)),!t)throw Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();t.createStore=D,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],e):e(t.blips={},t.graphql)}(this,function(t,e){"use strict";function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(){}function i(){i.init.call(this)}function u(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function s(t,e,r,n){var i,s,c;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=t._events)?(s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),c=s[e]):(s=t._events=new o,t._eventsCount=0),c){if("function"==typeof c?c=s[e]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),!c.warned&&(i=u(t))&&i>0&&c.length>i){c.warned=!0;var a=Error("Possible EventEmitter memory leak detected. "+c.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=c.length,function(t){"function"==typeof console.warn?console.warn(t):console.log(t)}(a)}}else c=s[e]=r,++t._eventsCount;return t}function c(t,e,r){function n(){t.removeListener(e,n),o||(o=!0,r.apply(t,arguments))}var o=!1;return n.listener=r,n}function a(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function f(t,e){for(var r=Array(e);e--;)r[e]=t[e];return r}function l(t){return!!y(t)}function h(t){var e=null!=t&&t.length;return"number"==typeof e&&e>=0&&e%1==0}function p(t){var e=y(t);if(e)return e.call(t)}function y(t){if(null!=t){var e=B&&t[B]||t["@@iterator"];if("function"==typeof e)return e}}function v(t){if(null!=t){var e=p(t);if(e)return e;if(h(t))return new b(t)}}function b(t){this._o=t,this._i=0}function d(t){var e=g(t);if(e)return e.call(t)}function g(t){if(null!=t){var e=ot&&t[ot]||t["@@asyncIterator"];if("function"==typeof e)return e}}function m(t){if(null!=t){var e=d(t);if(e)return e;var r=v(t);if(r)return new w(r)}}function w(t){this._i=t}function _(t,e,r,n){function o(t,e){return O(t,e,r.slice(),n.slice())}var i=At(t),u=At(e);return!Tt(function(t,e){return!Tt(o,e,t)},u,i)}function O(t,e,r,n){if(It(t,e))return!0;var o=Ut(t);if(o!==Ut(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===Lt(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!It(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!It(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===t)return n[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&_(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&_(t.values(),e.values(),r.concat([t]),n.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=Mt(t);if(u.length!==Mt(e).length)return!1;var s=r.concat([t]),c=n.concat([e]);for(i=u.length-1;i>=0;){var a=u[i];if(!Ot(a,e)||!O(e[a],t[a],s,c))return!1;i-=1}return!0}function x(t,e,r){for(var n=r.next();!n.done;){if((e=t["@@transducer/step"](e,n.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n=r.next()}return t["@@transducer/result"](e)}function E(t,e,r,n){return t["@@transducer/result"](r[n](zt(t["@@transducer/step"],t),e))}function j(t){return function(t,e){var r=this[t];return ye(r,t),he(r)?_t(e)?r:function(t,e){if(!pe(e))return[];var r=Object.entries(e)[0],n=r[0],o=r[1];return t.filter(function(t){return t[n]===o})}(r,e):_t(e)?r:function(t,e){if(pe(e)){var r=Object.entries(e)[0]||{},n=r[0],o=r[1];return Object.entries(t).filter(function(t){return t[1][n]===o}).reduce(function(t,e){var r;return be({},t,(r={},r[e[0]]=e[1],r))},{})}return t[e]}(r,e)}}function S(t){return function(t,e,r){var n=this[t];return ye(n,t),he(n)?function(t,e){return this[t]=[].concat(this[t]||[],[e]),e}.call(this,t,e):function(t,e,r){var n;return G(!_t(e),"You forgot to specify the payload"),G(!_t(r),"You are trying to post to a collection object but haven't specified an identifier. Try again with \"clerk.post('"+t+"', payload, identifier)\""),this[t]=ge({},this[t]||{},(n={},n[r]=e,n)),e}.call(this,t,e,r)}}function k(t){return function(t,e,r){var n=this[t];return ye(n,t),he(n)?function(t,e,r){if(_t(r))return this[t]=[].concat(this[t],[e]),e;G(pe(r),"When updating a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[t].findIndex(function(t){return t[o]===i});return this[t]=[].concat(this[t].slice(0,u),[e],this[t].slice(u+1)),e}.call(this,t,e,r):function(t,e,r){var n;return G(!_t(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+t+"', payload, identifier)\""),this[t]=we({},this[t]||{},(n={},n[r]=e,n)),e}.call(this,t,e,r)}}function P(t){return function(t,e,r){var n=this[t];return ye(n,t),G(!_t(r),"You are trying to patch a resource but haven't specified the identifier. Try again with \"clerk.patch('"+t+"', payload, key)\""),he(n)?function(t,e,r){G(pe(r),"When patching a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[t].findIndex(function(t){return t[o]===i});if(u>=0){var s=xe(this[t][u],ve(e));return this[t]=[].concat(this[t].slice(0,u),[s],this[t].slice(u+1)),s}}.call(this,t,e,r):function(t,e,r){var n;if(G(!_t(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+t+"', payload, identifier)\""),!_t(this[t][r])){var o=xe(this[t][r],ve(e));return this[t]=Ee({},this[t]||{},(n={},n[r]=o,n)),o}}.call(this,t,e,r)}}function A(t){return function(t,e){if(!_t(e)){var r=this[t];return ye(r,t),he(r)?function(t,e){if(pe(e)){var r=Object.entries(e)[0],n=r[0],o=r[1],i=this[t].findIndex(function(t){return t[n]===o});if(i>=0){var u=this[t][i];return this[t]=[].concat(this[t].slice(0,i),this[t].slice(i+1)),u}}}.call(this,t,e):function(t,e){var r=this[t][e];if(!_t(r))return this[t]=Se([e],this[t]),r}.call(this,t,e)}}}function T(){for(var t=[],e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];for(var o=Array.isArray(u=r),i=0,u=o?u:u[Symbol.iterator]();;){var s;if(o){if(i>=u.length)break;s=u[i++]}else{if((i=u.next()).done)break;s=i.value}var c=s;if("object"===(void 0===c?"undefined":Ae(c)))for(var a=c.entries?c.entries():Object.entries(c),f=Array.isArray(a),l=0,a=f?a:a[Symbol.iterator]();;){var h;if(f){if(l>=a.length)break;h=a[l++]}else{if((l=a.next()).done)break;h=l.value}t.push(h)}}return t.reduce(function(t,e){var r;return Ie({},t,(r={},r[e[0]]=e[1],r))},{})}function L(){try{return Ue.apply(this,arguments)}catch(t){return Ye.errorObject.e=t,Ye.errorObject}}function I(t){return t.reduce(function(t,e){return t.concat(e instanceof Ve.UnsubscriptionError?e.errors:e)},[])}function C(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:nr.noop}function F(t){var e=this;return ir.create(function(r){return Le(regeneratorRuntime.mark(function n(){var o,i,u,s,c,a,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,o=!0,i=!1,u=void 0,e.prev=4,s=Te(t);case 6:return e.next=8,s.next();case 8:return c=e.sent,o=c.done,e.next=12,c.value;case 12:if(a=e.sent,o){e.next=19;break}r.next(f=a);case 16:o=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),i=!0,u=e.t0;case 25:if(e.prev=25,e.prev=26,o||!s.return){e.next=30;break}return e.next=30,s.return();case 30:if(e.prev=30,!i){e.next=33;break}throw u;case 33:return e.finish(30);case 34:return e.finish(25);case 35:e.next=41;break;case 37:e.prev=37,e.t1=e.catch(0),t.return(),r.error(e.t1);case 41:case"end":return e.stop()}},n,e,[[0,37],[4,21,25,35],[26,,30,34]])}))(),t.return})}function R(t,e){if(!e||"object"!==(void 0===e?"undefined":Ae(e)))return t;var r=e.store,n=Ce(e,["store"]);r&&console.warn('You cannot extend the context with an object containing a "store" prop. It will be omitted and the other props will be added');for(var o=Object.keys(n),i=Array.isArray(o),u=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(u>=o.length)break;s=o[u++]}else{if((u=o.next()).done)break;s=u.value}var c=s;t.hasOwnProperty(c)&&console.warn('The "'+c+"\" property already exists in the context object. Make sure you haven't replaced anything important")}return Ie({},t,n)}function q(t){return"string"==typeof t?e.parse(t):t}function M(t){return"string"==typeof t?!t:!(!t||"object"!==(void 0===t?"undefined":Ae(t)))&&!Object.values(t).length}function U(t,e){return function(r){var n=!!t;return"function"==typeof t&&(n=t(r)),n?e(r):r}}function N(t){for(var e=[],r=[],n=Array.isArray(i=t),o=0,i=n?i:i[Symbol.iterator]();;){var u;if(n){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var s=u,c=s.data,a=s.errors;a&&(e=[].concat(e,a)),c&&(r=[].concat(r,[c]))}var f=function(t){var e=t.reduce(function(t,e){return Ie({},t,e)},{});return U(M,function(){})(e)}(r),l=function(t){var e=t.reduce(function(t,e){var r,n=e.path?e.path[0]:e.constructor.name;return Ie({},t,(r={},r[n]=[].concat(t[n]||[],[e]),r))},{});return U(M,function(){})(e)}(e);return Ie({},f?{data:f}:{},l?{errors:l}:{})}function D(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.context,i=void 0===o?{}:o,u=n.networkInterface,s=void 0===u?{}:u,c=arguments[1],a=new Pe(c),f=new dt,l=V(U("function"==typeof t.resolvers,function(t){var e=t.resolvers,r=Ce(t,["resolvers"]);return Ie({},r,{resolvers:e({pubsub:f,withFilter:gt})})})(t)),h=R({store:Ie({get state(){return c},set state(t){c=t}},a)},i),p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.variables,i=n.context,u=arguments[2];return t(l,U(e,q)(r),{},R(h,i),o,u)}},y=function(t){return function(r,n,o){if(o)return p(e.graphql)(r,n,o);return function(t){return new Promise(function(e,r){Promise.all(t).then(function(t){return e(N(t))},function(t){return r(t)})})}(q(r).definitions.filter(function(e){return e.operation===t}).map(function(t){return p(e.graphql)(r,n,t.name.value)}))}},v=y("query");return{get state(){return c},get schema(){return l},mutate:y("mutation"),query:v,subscribe:function(){var t=Le(regeneratorRuntime.mark(function t(n,o){var i,u,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=q(n),1>(u=i.definitions.filter(function(t){return"subscription"===t.operation})).length?G(!1,"No subscription operation defined in query"):u.length>1&&G(!1,"Only one subscription operation is allowed per query"),t.next=5,p(e.subscribe,!0)(i,o);case 5:return s=t.sent,s.toObservable=function(){return F(s)},t.abrupt("return",s);case 8:case"end":return t.stop()}},t,r)}));return function(e,r){return t.apply(this,arguments)}}(),graphql:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.variables,n=e.requestConfig,o=(n=void 0===n?s:n).endpoint,i=void 0===o?s.endpoint:o,u=n.method,c=void 0===u?"POST":u,a=n.headers,f=void 0===a?{}:a,l=Ce(n,["endpoint","method","headers"]),h=arguments[2],p="GET"===c?"GET":"POST",y=new window.Request(i,Ie({method:p,headers:T({"content-type":"application/json"},f)},"POST"===p&&{body:JSON.stringify({query:t,variables:r,operationName:h})},l));return new Promise(function(t,e){window.fetch(y).then(function(t){return t.json()},function(t){return e(t)}).then(function(e){return t(e)},function(t){return e(t)})})}}}var $="default"in e?e.default:e,G=function(t,e,r,n,o,i,u,s){if(!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[r,n,o,i,u,s],f=0;(c=Error(e.replace(/%s/g,function(){return a[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},Y="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=n(function(t,e){function r(t,e,r,n,o){var i={};return function(){var u=((Error().stack||"").match(/(?:\s+at\s.+){2}\s+at\s(.+)/)||[void 0,""])[1];if(!((u=/\)$/.test(u)?u.match(/[^(]+(?=\)$)/)[0]:u.trim())in i)){i[u]=!0;var s;switch(t){case"class":s="Class";break;case"property":s="Property";break;case"method":s="Method";break;case"function":s="Function"}s+=" `"+e+"` has been deprecated",n&&(s+=" since version "+n),r&&(s+=", use `"+r+"` instead"),s+=".",u&&(s+="\n at "+u),o&&(s+="\nCheck out "+o+" for more information."),console.warn(s)}}}function n(t,n,o,i,u,s){var c=(e.options.getWarner||r)(t,n,i,u,s),a={enumerable:(o=o||{writable:!0,enumerable:!1,configurable:!0}).enumerable,configurable:o.configurable};if(o.get||o.set)o.get&&(a.get=function(){return c(),o.get.call(this)}),o.set&&(a.set=function(t){return c(),o.set.call(this,t)});else{var f=o.value;a.get=function(){return c(),f},o.writable&&(a.set=function(t){c(),f=t})}return a}function o(t,n,o,i,u){for(var s=(e.options.getWarner||r)(t,n.name,o,i,u),c=function(){return s(),n.apply(this,arguments)},a=0,f=Object.getOwnPropertyNames(n);f.length>a;a++){var l=f[a],h=Object.getOwnPropertyDescriptor(n,l);h.writable?c[l]=n[l]:h.configurable&&Object.defineProperty(c,l,h)}return c}function i(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];var r=t[t.length-1];r="function"==typeof r?t.pop():void 0;var i,u,s,c=t[0];return"string"==typeof c?(i=c,u=t[1],s=t[2]):c&&(i=c.alternative,u=c.version,s=c.url),r?o("function",r,i,u,s):function(t,e,r){if("string"==typeof e){return n(r&&"function"==typeof r.value?"method":"property",e,r,i,u,s)}if("function"==typeof t){for(var c=o("class",t,i,u,s),a=t.name,f=0,l=Object.getOwnPropertyNames(c);l.length>f;f++){var h=l[f],p=Object.getOwnPropertyDescriptor(c,h);(p=n("class",a,p,i,u,s)).writable?c[h]=t[h]:p.configurable&&Object.defineProperty(c,h,p)}return c}}}e.options={getWarner:void 0},e.deprecated=i,Object.defineProperty(e,"__esModule",{value:!0}),e.default=i});r(W);var Q=n(function(t,e){function r(t){var e=t.resolvers,r=void 0===e?{}:e,n=t.connectors,o=t.allowUndefinedInResolve,u=t.resolverValidationOptions,s=function(t,e,r,n,o){if("object"!=typeof o)throw new m("Expected `resolverValidationOptions` to be an object");if(!t)throw new m("Must provide typeDefs");if(!e)throw new m("Must provide resolvers");var u=i(t);return a(u,e),l(u,o),n||v(u),r&&p(u,r),u}(t.typeDefs,r,t.logger,void 0===o||o,void 0===u?{}:u);return"function"==typeof r.__schema&&c(s,r.__schema),n&&w(s,n),s}function n(t){return void 0!==t.kind}function o(t,e){void 0===e&&(e=[]);var r=[];return t.forEach(function(t){if(n(t)&&(t=$.print(t)),"function"==typeof t)-1===e.indexOf(t)&&(e.push(t),r=r.concat(o(t(),e)));else{if("string"!=typeof t){throw new m("typeDef array must contain only strings and functions, got "+typeof t)}r.push(t.trim())}}),function(t){return t.reduce(function(t,e){return-1===t.indexOf(e)?t.concat([e]):t},[])}(r.map(function(t){return t.trim()})).join("\n")}function i(t){var e,r=t;if(n(t))e=t;else if("string"!=typeof r){if(!Array.isArray(r)){throw new m("typeDefs must be a string, array or schema AST, got "+typeof r)}r=o(r)}"string"==typeof r&&(e=$.parse(r));var i=d.buildASTSchema(e),s=u(e);return s.definitions.length>0&&(i=d.extendSchema(i,s)),i}function u(t){var e=t.definitions.filter(function(t){return t.kind===$.Kind.TYPE_EXTENSION_DEFINITION});return Object.assign({},t,{definitions:e})}function s(t,e){var r=t.getTypeMap();Object.keys(r).forEach(function(t){var n=r[t];if(!g.getNamedType(n).name.startsWith("__")&&n instanceof g.GraphQLObjectType){var o=n.getFields();Object.keys(o).forEach(function(r){e(o[r],t,r)})}})}function c(t,e){[t.getQueryType(),t.getMutationType(),t.getSubscriptionType()].filter(function(t){return!!t}).forEach(function(r){var n=function(t){var e,r=Math.random();return function(n,o,i,u){return u.operation.__runAtMostOnce||(u.operation.__runAtMostOnce={}),u.operation.__runAtMostOnce[r]||(u.operation.__runAtMostOnce[r]=!0,e=t(n,o,i,u)),e}}(e),o=r.getFields();Object.keys(o).forEach(function(i){o[i].resolve=r===t.getSubscriptionType()?y(o[i].resolve,e):y(o[i].resolve,n)})})}function a(t,e){Object.keys(e).forEach(function(r){var n=t.getType(r);if(!n&&"__schema"!==r)throw new m('"'+r+'" defined in resolvers, but not in schema');Object.keys(e[r]).forEach(function(t){if(t.startsWith("__"))n[t.substring(2)]=e[r][t];else if(n instanceof g.GraphQLScalarType)n[t]=e[r][t];else{var o=function(t){return t instanceof g.GraphQLObjectType||t instanceof g.GraphQLInterfaceType?t.getFields():void 0}(n);if(!o)throw new m(r+" was defined in resolvers, but it's not an object");if(!o[t])throw new m(r+"."+t+" defined in resolvers, but not in schema");var i=o[t],u=e[r][t];if("function"==typeof u)f(i,{resolve:u});else{if("object"!=typeof u)throw new m("Resolver "+r+"."+t+" must be object or function");f(i,u)}}})})}function f(t,e){Object.keys(e).forEach(function(r){t[r]=e[r]})}function l(t,e){void 0===e&&(e={});var r=e.requireResolversForArgs,n=void 0!==r&&r,o=e.requireResolversForNonScalar,i=void 0!==o&&o,u=e.requireResolversForAllFields,c=void 0!==u&&u;if(c&&(n||i))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");s(t,function(t,e,r){c&&h(t,e,r),n&&t.args.length>0&&h(t,e,r),!i||g.getNamedType(t.type)instanceof g.GraphQLScalarType||h(t,e,r)})}function h(t,e,r){if(t.resolve){if("function"!=typeof t.resolve)throw new m('Resolver "'+e+"."+r+'" must be a function')}else console.warn('Resolve function missing for "'+e+"."+r+'". To disable this warning check https://github.com/apollostack/graphql-tools/issues/131')}function p(t,e){if(!e)throw Error("Must provide a logger");if("function"!=typeof e.log)throw Error("Logger.log must be a function");s(t,function(t,r,n){t.resolve=function(t,e,r){void 0===t&&(t=$.defaultFieldResolver);var n=function(t){var n=Error();n.stack=t.stack,r&&(n.originalMessage=t.message,n.message="Error in resolver "+r+"\n"+t.message),e.log(n)};return function(e,r,o,i){try{var u=t(e,r,o,i);return u&&"function"==typeof u.then&&"function"==typeof u.catch&&u.catch(function(t){return n(t instanceof Error?t:Error(t)),t}),u}catch(t){throw n(t),t}}}(t.resolve,e,r+"."+n)})}function y(t,e){return function(r,n,o,i){return Promise.resolve(e(r,n,o,i)).then(function(e){return t?t(e,n,o,i):$.defaultFieldResolver(e,n,o,i)})}}function v(t){s(t,function(t,e,r){t.resolve=function(t,e){void 0===t&&(t=$.defaultFieldResolver);return function(r,n,o,i){var u=t(r,n,o,i);if(void 0===u)throw Error('Resolve function for "'+e+'" returned undefined');return u}}(t.resolve,e+"."+r)})}var b=Y&&Y.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var d=$,g=$,m=function(t){function e(e){var r=t.call(this,e)||this;return r.message=e,Error.captureStackTrace(r,r.constructor),r}return b(e,t),e}(Error);e.SchemaError=m,e.makeExecutableSchema=r,e.concatenateTypeDefs=o,e.buildSchemaFromTypeDefinitions=i,e.extractExtensionDefinitions=u,e.forEachField=s;var w=W.deprecated({version:"0.7.0",url:"https://github.com/apollostack/graphql-tools/issues/140"},function(t,e){if(!(t&&t instanceof g.GraphQLSchema))throw Error("schema must be an instance of GraphQLSchema. This error could be caused by installing more than one version of GraphQL-JS");if("object"!=typeof e){throw Error("Expected connectors to be of type object, got "+typeof e)}if(0===Object.keys(e).length)throw Error("Expected connectors to not be an empty object");if(Array.isArray(e))throw Error("Expected connectors to be of type object, got Array");if(t._apolloConnectorsAttached)throw Error("Connectors already attached to context, cannot attach more than once");t._apolloConnectorsAttached=!0;c(t,function(t,r,n){if("object"!=typeof n)throw Error("Cannot attach connector because context is not an object: "+typeof n);return void 0===n.connectors&&(n.connectors={}),Object.keys(e).forEach(function(t){var r=e[t];if(!r.prototype)throw Error("Connector must be a function or an class");n.connectors[t]=new r(n)}),t})});e.attachConnectorsToContext=w,e.addSchemaLevelResolveFunction=c,e.addResolveFunctionsToSchema=a,e.assertResolveFunctionsPresent=l,e.addErrorLoggingToSchema=p,e.chainResolvers=function(t){return function(e,r,n,o){return t.reduce(function(t,e){return e?e(t,r,n,o):$.defaultFieldResolver(t,r,n,o)},e)}},e.addCatchUndefinedToSchema=v});r(Q);var V=Q.makeExecutableSchema;o.prototype=Object.create(null),i.EventEmitter=i,i.usingDomains=!1,i.prototype.domain=void 0,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.init=function(){this.domain=null,i.usingDomains&&(!(void 0).active||this instanceof(void 0).Domain||(this.domain=(void 0).active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new o,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||0>t||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(t){var e,r,n,o,i,u,s,c="error"===t;if(u=this._events)c=c&&null==u.error;else if(!c)return!1;if(s=this.domain,c){if(e=arguments[1],!s){if(e instanceof Error)throw e;var a=Error('Uncaught, unspecified "error" event. ('+e+")");throw a.context=e,a}return e||(e=Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=s,e.domainThrown=!1,s.emit("error",e),!1}if(!(r=u[t]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,o=f(t,n),i=0;n>i;++i)o[i].call(r)}(r,l,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=f(t,o),u=0;o>u;++u)i[u].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,u=f(t,i),s=0;i>s;++s)u[s].call(r,n,o)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var u=t.length,s=f(t,u),c=0;u>c;++c)s[c].call(r,n,o,i)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=Array(n-1),i=1;n>i;i++)o[i-1]=arguments[i];!function(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=f(t,o),u=0;o>u;++u)i[u].apply(r,n)}(r,l,this,o)}return!0},i.prototype.on=i.prototype.addListener=function(t,e){return s(this,t,e,!1)},i.prototype.prependListener=function(t,e){return s(this,t,e,!0)},i.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,c(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,c(this,t,e)),this},i.prototype.removeListener=function(t,e){var r,n,i,u,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new o:(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,u=r.length;u-- >0;)if(r[u]===e||r[u].listener&&r[u].listener===e){s=r[u].listener,i=u;break}if(0>i)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new o,this;delete n[t]}else!function(t,e){for(var r=e,n=r+1,o=t.length;o>n;r+=1,n+=1)t[r]=t[n];t.pop()}(r,i);n.removeListener&&this.emit("removeListener",t,s||e)}return this},i.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new o,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new o:delete r[t]),this;if(0===arguments.length){for(var n,i=Object.keys(r),u=0;i.length>u;++u)"removeListener"!==(n=i[u])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new o,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},i.prototype.listeners=function(t){var e,r=this._events;return r&&(e=r[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=Array(t.length),r=0;e.length>r;++r)e[r]=t[r].listener||t[r];return e}(e):[]},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):a.call(t,e)},i.prototype.listenerCount=a,i.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var z=Object.freeze({default:i,EventEmitter:i}),B="function"==typeof Symbol&&Symbol.iterator,J=B||"@@iterator",K=J,X=l,H=h,Z=function(t){return Object(t)===t&&(h(t)||l(t))},tt=p,et=y,rt=v;b.prototype[J]=function(){return this},b.prototype.next=function(){return void 0!==this._o&&this._o.length>this._i?{value:this._o[this._i++],done:!1}:(this._o=void 0,{value:void 0,done:!0})};var nt=function(t,e,r){if(null!=t){if("function"==typeof t.forEach)return t.forEach(e,r);var n=0,o=p(t);if(o){for(var i;!(i=o.next()).done;)if(e.call(r,i.value,n++,t),n>9999999)throw new TypeError("Near-infinite iteration.")}else if(h(t))for(;t.length>n;n++)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}},ot="function"==typeof Symbol&&Symbol.asyncIterator,it=ot||"@@asyncIterator",ut=it,st=function(t){return!!g(t)},ct=d,at=g,ft=m;w.prototype[it]=function(){return this},w.prototype.next=function(){var t=this._i.next();return Promise.resolve(t.value).then(function(e){return{value:e,done:t.done}})};var lt={$$iterator:K,isIterable:X,isArrayLike:H,isCollection:Z,getIterator:tt,getIteratorMethod:et,createIterator:rt,forEach:nt,$$asyncIterator:ut,isAsyncIterable:st,getAsyncIterator:ct,getAsyncIteratorMethod:at,createAsyncIterator:ft,forAwaitEach:function(t,e,r){var n=m(t);if(n){var o=0;return new Promise(function(i,u){function s(){return n.next().then(function(n){n.done?i():Promise.resolve(e.call(r,n.value,o++,t)).then(s).catch(u)}).catch(u)}s()})}}},ht=n(function(t,e){function r(t,e){var r=[],n=[],o="string"==typeof e?[e]:e,i=!0,u=function(t){0!==r.length?r.shift()({value:t,done:!1}):n.push(t)},s=function(){i&&(i=!1,c(),r.forEach(function(t){return t({value:void 0,done:!0})}),r.length=0,n.length=0)},c=function(){for(var e=0,r=o;r.length>e;e++){t.removeListener(r[e],u)}};return function(){for(var e=0,r=o;r.length>e;e++)t.addListener(r[e],u)}(),a={next:function(){return i?new Promise(function(t){0!==n.length?t({value:n.shift(),done:!1}):r.push(t)}):this.return()},return:function(){return s(),Promise.resolve({value:void 0,done:!0})},throw:function(t){return s(),Promise.reject(t)}},a[lt.$$asyncIterator]=function(){return this},a;var a}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitterAsyncIterator=r});r(ht);var pt=z&&i||z,yt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.ee=new pt.EventEmitter,this.subscriptions={},this.subIdCounter=0}return t.prototype.publish=function(t,e){return this.ee.emit(t,e),!0},t.prototype.subscribe=function(t,e){return this.ee.addListener(t,e),this.subIdCounter=this.subIdCounter+1,this.subscriptions[this.subIdCounter]=[t,e],Promise.resolve(this.subIdCounter)},t.prototype.unsubscribe=function(t){var e=this.subscriptions[t],r=e[0],n=e[1];delete this.subscriptions[t],this.ee.removeListener(r,n)},t.prototype.asyncIterator=function(t){return ht.eventEmitterAsyncIterator(this.ee,t)},t}();e.PubSub=r});r(yt);var vt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.withFilter=function(t,e){return function(r,n,o,i){var u=t(r,n,o,i),s=function(){return u.next().then(function(t){return Promise.all([t,Promise.resolve(e(t.value,n,o,i)).catch(function(){return!1})])}).then(function(t){var e=t[0];return!0===t[1]||!0===e.done?e:s()})};return c={next:function(){return s()},return:function(){return u.return()},throw:function(t){return u.throw(t)}},c[lt.$$asyncIterator]=function(){return this},c;var c}}});r(vt);var bt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PubSub=yt.PubSub,e.withFilter=vt.withFilter});r(bt);var dt=bt.PubSub,gt=bt.withFilter,mt=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},wt=function(t){return function e(r){return 0===arguments.length||mt(r)?e:t.apply(this,arguments)}},_t=wt(function(t){return null==t}),Ot=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},xt=Object.prototype.toString,Et=function(){return"[object Arguments]"===xt.call(arguments)?function(t){return"[object Arguments]"===xt.call(t)}:function(t){return Ot("callee",t)}},jt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},St=function(t){return"[object Object]"===Object.prototype.toString.call(t)},kt=function(t){return"[object String]"===Object.prototype.toString.call(t)},Pt=function(t){return function e(r,n){switch(arguments.length){case 0:return e;case 1:return mt(r)?e:wt(function(e){return t(r,e)});default:return mt(r)&&mt(n)?e:mt(r)?wt(function(e){return t(e,n)}):mt(n)?wt(function(e){return t(r,e)}):t(r,n)}}},At=function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r},Tt=function(t,e,r){for(var n=0,o=r.length;o>n;){if(t(e,r[n]))return!0;n+=1}return!1},Lt=function(t){var e=(t+"").match(/^function (\w*)/);return null==e?"":e[1]},It=Pt(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}),Ct=!{toString:null}.propertyIsEnumerable("toString"),Ft=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Rt=function(){return arguments.propertyIsEnumerable("length")}(),qt=function(t,e){for(var r=0;t.length>r;){if(t[r]===e)return!0;r+=1}return!1},Mt=wt("function"!=typeof Object.keys||Rt?function(t){if(Object(t)!==t)return[];var e,r,n=[],o=Rt&&Et(t);for(e in t)!Ot(e,t)||o&&"length"===e||(n[n.length]=e);if(Ct)for(r=Ft.length-1;r>=0;)Ot(e=Ft[r],t)&&!qt(n,e)&&(n[n.length]=e),r-=1;return n}:function(t){return Object(t)!==t?[]:Object.keys(t)}),Ut=wt(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),Nt=O,Dt=Pt(function(t,e){return Nt(t,e,[],[])}),$t=function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,r){return e.apply(this,arguments)};case 3:return function(t,r,n){return e.apply(this,arguments)};case 4:return function(t,r,n,o){return e.apply(this,arguments)};case 5:return function(t,r,n,o,i){return e.apply(this,arguments)};case 6:return function(t,r,n,o,i,u){return e.apply(this,arguments)};case 7:return function(t,r,n,o,i,u,s){return e.apply(this,arguments)};case 8:return function(t,r,n,o,i,u,s,c){return e.apply(this,arguments)};case 9:return function(t,r,n,o,i,u,s,c,a){return e.apply(this,arguments)};case 10:return function(t,r,n,o,i,u,s,c,a,f){return e.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},Gt=function(t,e){return function(){return e.call(this,t.apply(this,arguments))}},Yt=function(t){return function e(r,n,o){switch(arguments.length){case 0:return e;case 1:return mt(r)?e:Pt(function(e,n){return t(r,e,n)});case 2:return mt(r)&&mt(n)?e:mt(r)?Pt(function(e,r){return t(e,n,r)}):mt(n)?Pt(function(e,n){return t(r,e,n)}):wt(function(e){return t(r,n,e)});default:return mt(r)&&mt(n)&&mt(o)?e:mt(r)&&mt(n)?Pt(function(e,r){return t(e,r,o)}):mt(r)&&mt(o)?Pt(function(e,r){return t(e,n,r)}):mt(n)&&mt(o)?Pt(function(e,n){return t(r,e,n)}):mt(r)?wt(function(e){return t(e,n,o)}):mt(n)?wt(function(e){return t(r,e,o)}):mt(o)?wt(function(e){return t(r,n,e)}):t(r,n,o)}}},Wt=wt(function(t){return!!jt(t)||!!t&&("object"==typeof t&&(!kt(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),Qt=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),Vt=function(t){return new Qt(t)},zt=Pt(function(t,e){return $t(t.length,function(){return t.apply(e,arguments)})}),Bt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Jt=function(t,e,r){if("function"==typeof t&&(t=Vt(t)),Wt(r))return function(t,e,r){for(var n=0,o=r.length;o>n;){if((e=t["@@transducer/step"](e,r[n]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n+=1}return t["@@transducer/result"](e)}(t,e,r);if("function"==typeof r["fantasy-land/reduce"])return E(t,e,r,"fantasy-land/reduce");if(null!=r[Bt])return x(t,e,r[Bt]());if("function"==typeof r.next)return x(t,e,r);if("function"==typeof r.reduce)return E(t,e,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},Kt=Yt(Jt),Xt=function(t,e){return function(){var r=arguments.length;if(0===r)return e();var n=arguments[r-1];return jt(n)||"function"!=typeof n[t]?e.apply(this,arguments):n[t].apply(n,Array.prototype.slice.call(arguments,0,r-1))}},Ht=wt(Xt("tail",Yt(Xt("slice",function(t,e,r){return Array.prototype.slice.call(r,t,e)}))(1,1/0))),Zt=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return $t(arguments[0].length,Kt(Gt,arguments[0],Ht(arguments)))},te=wt(function(t){return kt(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),ee=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return Zt.apply(this,te(arguments))},re=function(t){return function(){return!t.apply(this,arguments)}},ne=function(t){return"function"==typeof t["@@transducer/step"]},oe=function(t,e,r){return function(){if(0===arguments.length)return r();var n=Array.prototype.slice.call(arguments,0),o=n.pop();if(!jt(o)){for(var i=0;t.length>i;){if("function"==typeof o[t[i]])return o[t[i]].apply(o,n);i+=1}if(ne(o))return e.apply(null,n)(o)}return r.apply(this,arguments)}},ie=function(t,e){for(var r=0,n=e.length,o=[];n>r;)t(e[r])&&(o[o.length]=e[r]),r+=1;return o},ue={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},se=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=ue.init,t.prototype["@@transducer/result"]=ue.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),ce=Pt(oe(["filter"],Pt(function(t,e){return new se(t,e)}),function(t,e){return St(e)?Jt(function(r,n){return t(e[n])&&(r[n]=e[n]),r},{},Mt(e)):ie(t,e)})),ae=Pt(function(t,e){return ce(re(t),e)}),fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},le=function(t){return ee(Dt(t),Ut)},he=le("Array"),pe=le("Object"),ye=function(t,e){G(!_t(t),'The "'+e+"\" collection does not exist. You can create one using your clerk instance by running(clerk.addCollection('"+e+"'))"),G("object"===(void 0===t?"undefined":fe(t)),'"'+e+'" is not a collection. You can access it like any other property on the state object')},ve=ae(le("Undefined")),be=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},de=function(t){return j()},ge=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},me=function(t){return S()},we=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_e=function(t){return k()},Oe="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,n=arguments.length;n>r;){var o=arguments[r];if(null!=o)for(var i in o)Ot(i,o)&&(e[i]=o[i]);r+=1}return e},xe=Pt(function(t,e){return Oe({},t,e)}),Ee=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},je=function(t){return P()},Se=Pt(function(t,e){for(var r={},n={},o=0,i=t.length;i>o;)n[t[o]]=1,o+=1;for(var u in e)n.hasOwnProperty(u)||(r[u]=e[u]);return r}),ke=function(t){return A()},Pe=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.state=e,this.get=de(e).bind(e),this.post=me(e).bind(e),this.put=_e(e).bind(e),this.patch=je(e).bind(e),this.delete=ke(e).bind(e)}return t.prototype.getCollection=function(t){return this.state[t]},t.prototype.addCollection=function(t){return this.state[t]=new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object),this.state[t]},t.prototype.removeCollection=function(t){var e=this.state[t];return null!=e&&delete this.state[t],e},t}(),Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te=function(t){if("function"==typeof Symbol){if(Symbol.asyncIterator){var e=t[Symbol.asyncIterator];if(null!=e)return e.call(t)}if(Symbol.iterator)return t[Symbol.iterator]()}throw new TypeError("Object is not async iterable")},Le=(function(){function t(t){this.value=t}function e(e){function r(o,i){try{var u=e[o](i),s=u.value;s instanceof t?Promise.resolve(s.value).then(function(t){r("next",t)},function(t){r("throw",t)}):n(u.done?"return":"normal",u.value)}catch(t){n("throw",t)}}function n(t,e){switch(t){case"return":o.resolve({value:e,done:!0});break;case"throw":o.reject(e);break;default:o.resolve({value:e,done:!1})}(o=o.next)?r(o.key,o.arg):i=null}var o,i;this._invoke=function(t,e){return new Promise(function(n,u){var s={key:t,arg:e,resolve:n,reject:u,next:null};i?i=i.next=s:(o=i=s,r(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){function n(o,i){try{var u=e[o](i),s=u.value}catch(t){return void r(t)}if(!u.done)return Promise.resolve(s).then(function(t){n("next",t)},function(t){n("throw",t)});t(s)}return n("next")})}}),Ie=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ce=function(t,e){var r={};for(var n in t)0>e.indexOf(n)&&Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},Fe="undefined"!=typeof window&&window,Re="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,qe=Fe||void 0!==Y&&Y||Re,Me=qe;!function(){if(!qe)throw Error("RxJS could not find any global context (window, self, global)")}();var Ue,Ne={root:Me},De={isFunction:function(t){return"function"==typeof t}},$e={isArray:Array.isArray||function(t){return t&&"number"==typeof t.length}},Ge={isObject:function(t){return null!=t&&"object"==typeof t}},Ye={errorObject:{e:{}}},We={tryCatch:function(t){return Ue=t,L}},Qe=Y&&Y.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Ve={UnsubscriptionError:function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return Qe(e,t),e}(Error)},ze={Subscription:function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,s=n?n.length:0;r;)r.remove(this),r=++u<s&&n[u]||null;if(De.isFunction(o)){(a=We.tryCatch(o).call(this))===Ye.errorObject&&(e=!0,t=t||(Ye.errorObject.e instanceof Ve.UnsubscriptionError?I(Ye.errorObject.e.errors):[Ye.errorObject.e]))}if($e.isArray(i))for(u=-1,s=i.length;++u<s;){var c=i[u];if(Ge.isObject(c)){var a=We.tryCatch(c.unsubscribe).call(c);if(a===Ye.errorObject){e=!0,t=t||[];var f=Ye.errorObject.e;f instanceof Ve.UnsubscriptionError?t=t.concat(I(f.errors)):t.push(f)}}}if(e)throw new Ve.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this._parent,r=this._parents;e&&e!==t?r?-1===r.indexOf(t)&&r.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}()},Be={empty:{closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},Je=n(function(t,e){var r=Ne.root.Symbol;e.rxSubscriber="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber}),Ke=Y&&Y.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Xe=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Be.empty;break;case 1:if(!r){this.destination=Be.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new Ze(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new Ze(this,r,n,o)}}return Ke(e,t),e.prototype[Je.rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(ze.Subscription),He=Xe,Ze=function(t){function e(e,r,n,o){t.call(this),this._parentSubscriber=e;var i,u=this;De.isFunction(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==Be.empty&&(u=Object.create(r),De.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=i,this._error=n,this._complete=o}return Ke(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Xe),tr={Subscriber:He},er={toSubscriber:function(t,e,r){if(t){if(t instanceof tr.Subscriber)return t;if(t[Je.rxSubscriber])return t[Je.rxSubscriber]()}return t||e||r?new tr.Subscriber(t,e,r):new tr.Subscriber(Be.empty)}},rr=n(function(t,e){function r(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}e.getSymbolObservable=r,e.observable=r(Ne.root),e.$$observable=e.observable}),nr={noop:function(){}},or={pipe:function(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];return C(t)},pipeFromArray:C},ir=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=er.toSubscriber(t,e,r);if(n?n.call(o,this.source):o.add(this.source?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(Ne.root.Rx&&Ne.root.Rx.config&&Ne.root.Rx.config.Promise?e=Ne.root.Rx.config.Promise:Ne.root.Promise&&(e=Ne.root.Promise)),!e)throw Error("no Promise impl found");return new e(function(e,n){var o;o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[rr.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;arguments.length>e;e++)t[e-0]=arguments[e];return 0===t.length?this:or.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(Ne.root.Rx&&Ne.root.Rx.config&&Ne.root.Rx.config.Promise?t=Ne.root.Rx.config.Promise:Ne.root.Promise&&(t=Ne.root.Promise)),!t)throw Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();t.createStore=D,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=blips.min.js.map |
@@ -132,22 +132,22 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
}(); | ||
var _graphql = function _graphql(source) { | ||
var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
variables = _ref6.variables; | ||
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _ref5 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : networkInterface; | ||
var variables = _ref5.variables, | ||
_ref5$requestConfig = _ref5.requestConfig; | ||
_ref5$requestConfig = _ref5$requestConfig === undefined ? networkInterface : _ref5$requestConfig; | ||
var _ref5$endpoint = _ref5.endpoint, | ||
endpoint = _ref5$endpoint === undefined ? networkInterface.endpoint : _ref5$endpoint, | ||
_ref5$method = _ref5.method, | ||
method = _ref5$method === undefined ? 'POST' : _ref5$method, | ||
_ref5$headers = _ref5.headers, | ||
headers = _ref5$headers === undefined ? {} : _ref5$headers, | ||
config = _objectWithoutProperties(_ref5, ['endpoint', 'method', 'headers']); | ||
var _ref5$requestConfig$e = _ref5$requestConfig.endpoint, | ||
endpoint = _ref5$requestConfig$e === undefined ? networkInterface.endpoint : _ref5$requestConfig$e, | ||
_ref5$requestConfig$m = _ref5$requestConfig.method, | ||
method = _ref5$requestConfig$m === undefined ? 'POST' : _ref5$requestConfig$m, | ||
_ref5$requestConfig$h = _ref5$requestConfig.headers, | ||
headers = _ref5$requestConfig$h === undefined ? {} : _ref5$requestConfig$h, | ||
requestConfig = _objectWithoutProperties(_ref5$requestConfig, ['endpoint', 'method', 'headers']); | ||
var operationName = arguments[3]; | ||
var operationName = arguments[2]; | ||
var _method = method === 'GET' ? 'GET' : 'POST'; | ||
var payload = _extends({ | ||
var request = new window.Request(endpoint, _extends({ | ||
method: _method, | ||
@@ -163,6 +163,15 @@ headers: mergeHeaders({ | ||
}) | ||
}, config); | ||
}, requestConfig)); | ||
var request = new window.Request(endpoint, payload); | ||
return window.fetch(request); | ||
return new Promise(function (resolve, reject) { | ||
window.fetch(request).then(function (response) { | ||
return response.json(); | ||
}, function (error) { | ||
return reject(error); | ||
}).then(function (res) { | ||
return resolve(res); | ||
}, function (err) { | ||
return reject(err); | ||
}); | ||
}); | ||
}; | ||
@@ -169,0 +178,0 @@ |
@@ -148,22 +148,22 @@ 'use strict'; | ||
}(); | ||
var _graphql = function _graphql(source) { | ||
var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
variables = _ref6.variables; | ||
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _ref5 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : networkInterface; | ||
var variables = _ref5.variables, | ||
_ref5$requestConfig = _ref5.requestConfig; | ||
_ref5$requestConfig = _ref5$requestConfig === undefined ? networkInterface : _ref5$requestConfig; | ||
var _ref5$endpoint = _ref5.endpoint, | ||
endpoint = _ref5$endpoint === undefined ? networkInterface.endpoint : _ref5$endpoint, | ||
_ref5$method = _ref5.method, | ||
method = _ref5$method === undefined ? 'POST' : _ref5$method, | ||
_ref5$headers = _ref5.headers, | ||
headers = _ref5$headers === undefined ? {} : _ref5$headers, | ||
config = _objectWithoutProperties(_ref5, ['endpoint', 'method', 'headers']); | ||
var _ref5$requestConfig$e = _ref5$requestConfig.endpoint, | ||
endpoint = _ref5$requestConfig$e === undefined ? networkInterface.endpoint : _ref5$requestConfig$e, | ||
_ref5$requestConfig$m = _ref5$requestConfig.method, | ||
method = _ref5$requestConfig$m === undefined ? 'POST' : _ref5$requestConfig$m, | ||
_ref5$requestConfig$h = _ref5$requestConfig.headers, | ||
headers = _ref5$requestConfig$h === undefined ? {} : _ref5$requestConfig$h, | ||
requestConfig = _objectWithoutProperties(_ref5$requestConfig, ['endpoint', 'method', 'headers']); | ||
var operationName = arguments[3]; | ||
var operationName = arguments[2]; | ||
var _method = method === 'GET' ? 'GET' : 'POST'; | ||
var payload = _extends({ | ||
var request = new window.Request(endpoint, _extends({ | ||
method: _method, | ||
@@ -179,6 +179,15 @@ headers: (0, _utils.mergeHeaders)({ | ||
}) | ||
}, config); | ||
}, requestConfig)); | ||
var request = new window.Request(endpoint, payload); | ||
return window.fetch(request); | ||
return new Promise(function (resolve, reject) { | ||
window.fetch(request).then(function (response) { | ||
return response.json(); | ||
}, function (error) { | ||
return reject(error); | ||
}).then(function (res) { | ||
return resolve(res); | ||
}, function (err) { | ||
return reject(err); | ||
}); | ||
}); | ||
}; | ||
@@ -185,0 +194,0 @@ |
{ | ||
"name": "blips", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "State management for the GraphQL heads", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -106,12 +106,13 @@ import invariant from 'invariant' | ||
} | ||
const _graphql = ( | ||
source, | ||
{ variables, } = {}, | ||
{ | ||
endpoint = networkInterface.endpoint, | ||
method = 'POST', | ||
headers = {}, | ||
...config | ||
} = networkInterface, | ||
variables, | ||
requestConfig: { | ||
endpoint = networkInterface.endpoint, | ||
method = 'POST', | ||
headers = {}, | ||
...requestConfig | ||
} = networkInterface, | ||
} = {}, | ||
operationName | ||
@@ -121,3 +122,3 @@ ) => { | ||
const payload = { | ||
const request = new window.Request(endpoint, { | ||
method: _method, | ||
@@ -137,7 +138,11 @@ headers: mergeHeaders( | ||
}), | ||
...config, | ||
} | ||
...requestConfig, | ||
}) | ||
const request = new window.Request(endpoint, payload) | ||
return window.fetch(request) | ||
return new Promise((resolve, reject) => { | ||
window | ||
.fetch(request) | ||
.then(response => response.json(), error => reject(error)) | ||
.then(res => resolve(res), err => reject(err)) | ||
}) | ||
} | ||
@@ -144,0 +149,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
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
790943
6054