Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-link-contentful

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-contentful - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "apollo-link-contentful",
"version": "0.1.0",
"version": "0.1.1",
"description": "Perform GraphQL queries against Contentful’s Rest API. No more, query size limits! No more, query complexities!!",

@@ -5,0 +5,0 @@ "scripts": {

@@ -9,2 +9,5 @@ # 🔗 apollo-link-contentful

> 🚨 very alpha! in active development. 🚨
> All minor version changes (0.X.0) are likely to have breaking changes.
Perform GraphQL queries against Contentful’s Rest API. No more, query size limits! No more, query complexities!!

@@ -50,3 +53,3 @@

import { ContentfulRestLink } from 'apollo-link-contentful'
import introspectionQueryResultData from 'schema/possibleTypes.json'
import possibleTypes from 'types/possibleTypes.json'

@@ -53,0 +56,0 @@ const space = process.env.CONTENTFUL_SPACE

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

/*! apollo-link-contentful v0.1.0 | (c) 2020 Ryan Hefner | MIT License | https://github.com/ryanhefner/apollo-link-contentful !*/
/*! apollo-link-contentful v0.1.1 | (c) 2020 Ryan Hefner | MIT License | https://github.com/ryanhefner/apollo-link-contentful !*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/inheritsLoose")):"function"==typeof define&&define.amd?define(["exports","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/inheritsLoose"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["apollo-link-contentful"]={},e._defineProperty$1,e._inheritsLoose)}(this,(function(e,n,t){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(n),o=r(t),u=function(e,n){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function a(e,n){function t(){this.constructor=e}u(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function l(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,i,o=t.call(e),u=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return u}function f(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function p(e){return this instanceof p?(this.v=e,this):new p(e)}var v=Object.freeze({__proto__:null,__extends:a,get __assign(){return c},__rest:function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t},__decorate:function(e,n,t,r){var i,o=arguments.length,u=o<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,n,t,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(n,t,u):i(n,t))||u);return o>3&&u&&Object.defineProperty(n,t,u),u},__param:function(e,n){return function(t,r){n(t,r,e)}},__metadata:function(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)},__awaiter:function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function u(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(u,a)}c((r=r.apply(e,n||[])).next())}))},__generator:function(e,n){var t,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(e,u)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},__createBinding:function(e,n,t,r){void 0===r&&(r=t),e[r]=n[t]},__exportStar:function(e,n){for(var t in e)"default"===t||n.hasOwnProperty(t)||(n[t]=e[t])},__values:l,__read:s,__spread:function(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(s(arguments[n]));return e},__spreadArrays:f,__await:p,__asyncGenerator:function(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=t.apply(e,n||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(n){return new Promise((function(t,r){o.push([e,n,t,r])>1||a(e,n)}))})}function a(e,n){try{(t=i[e](n)).value instanceof p?Promise.resolve(t.value.v).then(c,l):s(o[0][2],t)}catch(e){s(o[0][3],e)}var t}function c(e){a("next",e)}function l(e){a("throw",e)}function s(e,n){e(n),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var n,t;return n={},r("next"),r("throw",(function(e){throw e})),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,i){n[r]=e[r]?function(n){return(t=!t)?{value:p(e[r](n)),done:"return"===r}:i?i(n):n}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=l(e),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise((function(r,i){(function(e,n,t,r){Promise.resolve(r).then((function(n){e({value:n,done:t})}),n)})(r,i,(n=e[t](n)).done,n.value)}))}}},__makeTemplateObject:function(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e},__importStar:function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,n){if(!n.has(e))throw new TypeError("attempted to get private field on non-instance");return n.get(e)},__classPrivateFieldSet:function(e,n,t){if(!n.has(e))throw new TypeError("attempted to set private field on non-instance");return n.set(e,t),t}}),d="Invariant Violation",y=Object.setPrototypeOf,m=void 0===y?function(e,n){return e.__proto__=n,e}:y,h=function(e){function n(t){void 0===t&&(t=d);var r=e.call(this,"number"==typeof t?d+": "+t+" (see https://github.com/apollographql/invariant-packages)":t)||this;return r.framesToPop=1,r.name=d,m(r,n.prototype),r}return a(n,e),n}(Error);function b(e,n){if(!e)throw new h(n)}function g(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=g("warn"),e.error=g("error")}(b||(b={}));var O={env:{}};if("object"==typeof process)O=process;else try{Function("stub","process = stub")(O)}catch(e){}var w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e){return k(e,[])}function k(e,n){switch(_(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,n){if(-1!==n.indexOf(e))return"[Circular]";var t=[].concat(n,[e]),r=function(e){var n=e[String(w)];if("function"==typeof n)return n;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:k(i,t)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>2)return"[Array]";for(var t=Math.min(10,e.length),r=e.length-t,i=[],o=0;o<t;++o)i.push(k(e[o],n));1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,t);return function(e,n){var t=Object.keys(e);if(0===t.length)return"{}";if(n.length>2)return"["+function(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){var t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return n}(e)+"]";return"{ "+t.map((function(t){return t+": "+k(e[t],n)})).join(", ")+" }"}(e,t)}(e,n);default:return String(e)}}function E(e){var n=e.prototype.toJSON;"function"==typeof n||function(e,n){if(!Boolean(e))throw new Error(null!=n?n:"Unexpected invariant triggered.")}(0),e.prototype.inspect=n,w&&(e.prototype[w]=n)}function D(e){return null!=e&&"string"==typeof e.kind}E(function(){function e(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}()),E(function(){function e(e,n,t,r,i,o,u){this.kind=e,this.start=n,this.end=t,this.line=r,this.column=i,this.value=u,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}());var S={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},N=Object.freeze({});function x(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S,r=void 0,i=Array.isArray(e),o=[e],u=-1,a=[],c=void 0,l=void 0,s=void 0,f=[],p=[],v=e;do{var d=++u===o.length,y=d&&0!==a.length;if(d){if(l=0===p.length?void 0:f[f.length-1],c=s,s=p.pop(),y){if(i)c=c.slice();else{for(var m={},h=0,b=Object.keys(c);h<b.length;h++){var g=b[h];m[g]=c[g]}c=m}for(var O=0,w=0;w<a.length;w++){var _=a[w][0],k=a[w][1];i&&(_-=O),i&&null===k?(c.splice(_,1),O++):c[_]=k}}u=r.index,o=r.keys,a=r.edits,i=r.inArray,r=r.prev}else{if(l=s?i?u:o[u]:void 0,null==(c=s?s[l]:v))continue;s&&f.push(l)}var E,x=void 0;if(!Array.isArray(c)){if(!D(c))throw new Error("Invalid AST Node: ".concat(j(c),"."));var F=P(n,c.kind,d);if(F){if((x=F.call(n,c,l,s,f,p))===N)break;if(!1===x){if(!d){f.pop();continue}}else if(void 0!==x&&(a.push([l,x]),!d)){if(!D(x)){f.pop();continue}c=x}}}if(void 0===x&&y&&a.push([l,c]),d)f.pop();else r={inArray:i,index:u,keys:o,edits:a,prev:r},o=(i=Array.isArray(c))?c:null!==(E=t[c.kind])&&void 0!==E?E:[],u=-1,a=[],s&&p.push(s),s=c}while(void 0!==r);return 0!==a.length&&(v=a[a.length-1][1]),v}function P(e,n,t){var r=e[n];if(r){if(!t&&"function"==typeof r)return r;var i=t?r.leave:r.enter;if("function"==typeof i)return i}else{var o=t?e.leave:e.enter;if(o){if("function"==typeof o)return o;var u=o[n];if("function"==typeof u)return u}}}function F(e,n,t){return e(t={path:n,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&t.path)}},t.exports),t.exports}var V=F((function(e,n){function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,n,t){return n&&r(e.prototype,n),t&&r(e,t),e}Object.defineProperty(n,"__esModule",{value:!0}),n.Observable=void 0;var o=function(){return"function"==typeof Symbol},u=function(e){return o()&&Boolean(Symbol[e])},a=function(e){return u(e)?Symbol[e]:"@@"+e};o()&&!u("observable")&&(Symbol.observable=Symbol("observable"));var c=a("iterator"),l=a("observable"),s=a("species");function f(e,n){var t=e[n];if(null!=t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}}function p(e){var n=e.constructor;return void 0!==n&&null===(n=n[s])&&(n=void 0),void 0!==n?n:_}function v(e){return e instanceof _}function d(e){d.log?d.log(e):setTimeout((function(){throw e}))}function y(e){Promise.resolve().then((function(){try{e()}catch(e){d(e)}}))}function m(e){var n=e._cleanup;if(void 0!==n&&(e._cleanup=void 0,n))try{if("function"==typeof n)n();else{var t=f(n,"unsubscribe");t&&t.call(n)}}catch(e){d(e)}}function h(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function b(e,n,t){e._state="running";var r=e._observer;try{var i=f(r,n);switch(n){case"next":i&&i.call(r,t);break;case"error":if(h(e),!i)throw t;i.call(r,t);break;case"complete":h(e),i&&i.call(r)}}catch(e){d(e)}"closed"===e._state?m(e):"running"===e._state&&(e._state="ready")}function g(e,n,t){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:n,value:t}],void y((function(){return function(e){var n=e._queue;if(n){e._queue=void 0,e._state="ready";for(var t=0;t<n.length&&(b(e,n[t].type,n[t].value),"closed"!==e._state);++t);}}(e)}))):void b(e,n,t);e._queue.push({type:n,value:t})}}var O=function(){function e(n,r){t(this,e),this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new w(this);try{this._cleanup=r.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(h(this),m(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),w=function(){function e(n){t(this,e),this._subscription=n}return i(e,[{key:"next",value:function(e){g(this._subscription,"next",e)}},{key:"error",value:function(e){g(this._subscription,"error",e)}},{key:"complete",value:function(){g(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),_=function(){function e(n){if(t(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof n)throw new TypeError("Observable initializer must be a function");this._subscriber=n}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new O(e,this._subscriber)}},{key:"forEach",value:function(e){var n=this;return new Promise((function(t,r){if("function"==typeof e)var i=n.subscribe({next:function(n){try{e(n,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),t()}}))}},{key:"map",value:function(e){var n=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(p(this))((function(t){return n.subscribe({next:function(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error:function(e){t.error(e)},complete:function(){t.complete()}})}))}},{key:"filter",value:function(e){var n=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(p(this))((function(t){return n.subscribe({next:function(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error:function(e){t.error(e)},complete:function(){t.complete()}})}))}},{key:"reduce",value:function(e){var n=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var t=p(this),r=arguments.length>1,i=!1,o=arguments[1],u=o;return new t((function(t){return n.subscribe({next:function(n){var o=!i;if(i=!0,!o||r)try{u=e(u,n)}catch(e){return t.error(e)}else u=n},error:function(e){t.error(e)},complete:function(){if(!i&&!r)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(u),t.complete()}})}))}},{key:"concat",value:function(){for(var e=this,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];var i=p(this);return new i((function(n){var r,o=0;return function e(u){r=u.subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){o===t.length?(r=void 0,n.complete()):e(i.from(t[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var n=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var t=p(this);return new t((function(r){var i=[],o=n.subscribe({next:function(n){if(e)try{n=e(n)}catch(e){return r.error(e)}var o=t.from(n).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),u()}});i.push(o)},error:function(e){r.error(e)},complete:function(){u()}});function u(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:l,value:function(){return this}}],[{key:"from",value:function(n){var t="function"==typeof this?this:e;if(null==n)throw new TypeError(n+" is not an object");var r=f(n,l);if(r){var i=r.call(n);if(Object(i)!==i)throw new TypeError(i+" is not an object");return v(i)&&i.constructor===t?i:new t((function(e){return i.subscribe(e)}))}if(u("iterator")&&(r=f(n,c)))return new t((function(e){y((function(){if(!e.closed){var t=!0,i=!1,o=void 0;try{for(var u,a=r.call(n)[Symbol.iterator]();!(t=(u=a.next()).done);t=!0){var c=u.value;if(e.next(c),e.closed)return}}catch(e){i=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(n))return new t((function(e){y((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}));throw new TypeError(n+" is not observable")}},{key:"of",value:function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){y((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}))}},{key:s,get:function(){return this}}]),e}();n.Observable=_,o()&&Object.defineProperty(_,Symbol("extensions"),{value:{symbol:l,hostReportError:d},configurable:!0})})).Observable;!function(e){var n,t=e.Symbol;"function"==typeof t?t.observable?n=t.observable:(n=t("observable"),t.observable=n):n="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());function A(e,n,t){var r=[];e.forEach((function(e){return e[n]&&r.push(e)})),r.forEach((function(e){return e[n](t)}))}function T(e){return e&&"function"==typeof e.then}V.prototype["@@observable"]=function(){return this};var q=function(e){function n(n){var t=e.call(this,(function(e){return t.addObserver(e),function(){return t.removeObserver(e)}}))||this;return t.observers=new Set,t.promise=new Promise((function(e,n){t.resolve=e,t.reject=n})),t.handlers={next:function(e){null!==t.sub&&(t.latest=["next",e],A(t.observers,"next",e))},error:function(e){null!==t.sub&&(t.sub&&t.sub.unsubscribe(),t.sub=null,t.latest=["error",e],t.reject(e),A(t.observers,"error",e))},complete:function(){if(null!==t.sub){var e=t.sources.shift();e?T(e)?e.then((function(e){return t.sub=e.subscribe(t.handlers)})):t.sub=e.subscribe(t.handlers):(t.sub=null,t.latest&&"next"===t.latest[0]?t.resolve(t.latest[1]):t.resolve(),A(t.observers,"complete"))}}},t.cancel=function(e){t.reject(e),t.sources=[],t.handlers.complete()},t.promise.catch((function(e){})),T(n)?n.then((function(e){return t.start(e)}),t.handlers.error):t.start(n),t}return a(n,e),n.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},n.prototype.addObserver=function(e){if(!this.observers.has(e)){if(this.latest){var n=this.latest[0],t=e[n];t&&t.call(e,this.latest[1]),null===this.sub&&"next"===n&&e.complete&&e.complete()}this.observers.add(e)}},n.prototype.removeObserver=function(e,n){if(this.observers.delete(e)&&this.observers.size<1){if(n)return;this.sub&&(this.sub.unsubscribe(),this.reject(new Error("Observable cancelled prematurely"))),this.sub=null}},n.prototype.cleanup=function(e){var n=this,t=!1,r=function(){t||(t=!0,n.observers.delete(i),e())},i={next:r,error:r,complete:r};this.addObserver(i)},n}(V);function M(e,n){return n?n(e):V.of()}function I(e){return"function"==typeof e?new J(e):e}function C(e){return e.request.length<=1}"function"==typeof Symbol&&Symbol.species&&Object.defineProperty(q,Symbol.species,{value:V});var L=function(e){function n(n,t){var r=e.call(this,n)||this;return r.link=t,r}return a(n,e),n}(Error),J=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return V.of()}))},e.from=function(n){return 0===n.length?e.empty():n.map(I).reduce((function(e,n){return e.concat(n)}))},e.split=function(n,t,r){var i=I(t),o=I(r||new e(M));return C(i)&&C(o)?new e((function(e){return n(e)?i.request(e)||V.of():o.request(e)||V.of()})):new e((function(e,t){return n(e)?i.request(e,t)||V.of():o.request(e,t)||V.of()}))},e.execute=function(e,n){return e.request(function(e,n){var t=c({},e);return Object.defineProperty(n,"setContext",{enumerable:!1,value:function(e){t=c(c({},t),"function"==typeof e?e(t):e)}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:function(){return c({},t)}}),n}(n.context,function(e){var n={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return n.operationName||(n.operationName="string"!=typeof n.query?n.query.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||void 0:""),n}(function(e){for(var n=["query","operationName","variables","extensions","context"],t=0,r=Object.keys(e);t<r.length;t++){var i=r[t];if(n.indexOf(i)<0)throw"production"===process.env.NODE_ENV?new h(25):new h("illegal argument: "+i)}return e}(n))))||V.of()},e.concat=function(n,t){var r=I(n);if(C(r))return"production"===process.env.NODE_ENV||b.warn(new L("You are calling concat on a terminating link, which will have no effect",r)),r;var i=I(t);return C(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||V.of()}))||V.of()})):new e((function(e,n){return r.request(e,(function(e){return i.request(e,n)||V.of()}))||V.of()}))},e.prototype.split=function(n,t,r){return this.concat(e.split(n,t,r||new e(M)))},e.prototype.concat=function(n){return e.concat(this,n)},e.prototype.request=function(e,n){throw"production"===process.env.NODE_ENV?new h(22):new h("request is not implemented")},e.prototype.onError=function(e){throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function B(e,n){return void 0===e&&(e={}),void 0===n&&(n=[]),e=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){z(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},e),n.forEach((function(n){var t=n.indexOf(".");if(-1!==t){var r=n.slice(0,t),i=n.slice(t+1);r&&e[r]&&(e[r]=B(e[r],[i]))}else e.hasOwnProperty(n)&&delete e[n]})),e}var K=Object.prototype,Q=K.toString,W=K.hasOwnProperty,G=new Map;function U(e,n){var t=G.get(e);if(t){if(t.has(n))return!0}else G.set(e,t=new Set);return t.add(n),!1}function Y(e,n,t,r){if(function(e){return"IntValue"===e.kind}(t)||function(e){return"FloatValue"===e.kind}(t))e[n.value]=Number(t.value);else if(function(e){return"BooleanValue"===e.kind}(t)||function(e){return"StringValue"===e.kind}(t))e[n.value]=t.value;else if(function(e){return"ObjectValue"===e.kind}(t)){var i={};t.fields.map((function(e){return Y(i,e.name,e.value,r)})),e[n.value]=i}else if(function(e){return"Variable"===e.kind}(t)){var o=(r||{})[t.name.value];e[n.value]=o}else if(function(e){return"ListValue"===e.kind}(t))e[n.value]=t.values.map((function(e){var t={};return Y(t,n,e,r),t[n.value]}));else if(function(e){return"EnumValue"===e.kind}(t))e[n.value]=t.value;else{if(!function(e){return"NullValue"===e.kind}(t))throw"production"===process.env.NODE_ENV?new h(17):new h('The inline argument "'+n.value+'" of kind "'+t.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.');e[n.value]=null}}var $=["connection","include","skip","client","rest","export"];function H(e,n,t){if(t&&t.connection&&t.connection.key){if(t.connection.filter&&t.connection.filter.length>0){var r=t.connection.filter?t.connection.filter:[];r.sort();var i=n,o={};return r.forEach((function(e){o[e]=i[e]})),t.connection.key+"("+JSON.stringify(o)+")"}return t.connection.key}var u=e;if(n){var a=function(e,n){n||(n={}),"function"==typeof n&&(n={cmp:n});var t,r="boolean"==typeof n.cycles&&n.cycles,i=n.cmp&&(t=n.cmp,function(e){return function(n,r){var i={key:n,value:e[n]},o={key:r,value:e[r]};return t(i,o)}}),o=[];return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0!==n){if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);var t,u;if(Array.isArray(n)){for(u="[",t=0;t<n.length;t++)t&&(u+=","),u+=e(n[t])||"null";return u+"]"}if(null===n)return"null";if(-1!==o.indexOf(n)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=o.push(n)-1,c=Object.keys(n).sort(i&&i(n));for(u="",t=0;t<c.length;t++){var l=c[t],s=e(n[l]);s&&(u&&(u+=","),u+=JSON.stringify(l)+":"+s)}return o.splice(a,1),"{"+u+"}"}}(e)}(n);u+="("+a+")"}return t&&Object.keys(t).forEach((function(e){-1===$.indexOf(e)&&(t[e]&&Object.keys(t[e]).length?u+="@"+e+"("+JSON.stringify(t[e])+")":u+="@"+e)})),u}function X(e,n){if(e.arguments&&e.arguments.length){var t={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Y(t,r,i,n)})),t}return null}function Z(e){return"Field"===e.kind}function ee(e){return"InlineFragment"===e.kind}function ne(e){throw"production"===process.env.NODE_ENV?new h(18):new h("Variable nodes are not supported by valueFromNode")}function te(e){var n=[];return x(e,{Directive:function(e){n.push(e.name.value)}}),n}function re(e,n){return te(n).some((function(n){return e.indexOf(n)>-1}))}function ie(e){var n=e.name.value;return"skip"===n||"include"===n}function oe(e){return e?e.filter(ie).map((function(e){var n=e.arguments,t=e.name.value;"production"===process.env.NODE_ENV?b(n&&1===n.length,14):b(n&&1===n.length,"Incorrect number of arguments for the @"+t+" directive.");var r=n[0];"production"===process.env.NODE_ENV?b(r.name&&"if"===r.name.value,15):b(r.name&&"if"===r.name.value,"Invalid argument for the @"+t+" directive.");var i=r.value;return"production"===process.env.NODE_ENV?b(i&&("Variable"===i.kind||"BooleanValue"===i.kind),16):b(i&&("Variable"===i.kind||"BooleanValue"===i.kind),"Argument for the @"+t+" directive must be a variable or a boolean value."),{directive:e,ifArgument:r}})):[]}function ue(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.forEach((function(n){null!=n&&Object.keys(n).forEach((function(t){e[t]=n[t]}))})),e}function ae(e){"production"===process.env.NODE_ENV?b(e&&"Document"===e.kind,2):b(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql');var n=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw"production"===process.env.NODE_ENV?new h(3):new h('Schema type definitions not allowed in queries. Found: "'+e.kind+'"');return e}));return"production"===process.env.NODE_ENV?b(n.length<=1,4):b(n.length<=1,"Ambiguous GraphQL document: contains "+n.length+" operations"),e}function ce(e){return ae(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function le(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function se(e){"production"===process.env.NODE_ENV?b("Document"===e.kind,7):b("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'),"production"===process.env.NODE_ENV?b(e.definitions.length<=1,8):b(e.definitions.length<=1,"Fragment must have exactly one definition.");var n=e.definitions[0];return"production"===process.env.NODE_ENV?b("FragmentDefinition"===n.kind,9):b("FragmentDefinition"===n.kind,"Must be a fragment definition."),n}function fe(e){var n;ae(e);for(var t=0,r=e.definitions;t<r.length;t++){var i=r[t];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||n||(n=i)}if(n)return n;throw"production"===process.env.NODE_ENV?new h(10):new h("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.")}function pe(e){void 0===e&&(e=[]);var n={};return e.forEach((function(e){n[e.name.value]=e})),n}function ve(e,n,t){var r=0;return e.forEach((function(t,i){n.call(this,t,i,e)&&(e[r++]=t)}),t),e.length=r,e}var de={kind:"Field",name:{kind:"Name",value:"__typename"}};function ye(e){return function e(n,t){return n.selectionSet.selections.every((function(n){return"FragmentSpread"===n.kind&&e(t[n.name.value],t)}))}(ce(e)||se(e),pe(le(e)))?null:e}function me(e){return function(n){return e.some((function(e){return e.name&&e.name===n.name.value||e.test&&e.test(n)}))}}function he(e,n){var t=Object.create(null),r=[],i=Object.create(null),o=[],u=ye(x(n,{Variable:{enter:function(e,n,r){"VariableDefinition"!==r.kind&&(t[e.name.value]=!0)}},Field:{enter:function(n){if(e&&n.directives&&(e.some((function(e){return e.remove}))&&n.directives&&n.directives.some(me(e))))return n.arguments&&n.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),n.selectionSet&&function e(n){var t=[];return n.selections.forEach((function(n){(Z(n)||ee(n))&&n.selectionSet?e(n.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===n.kind&&t.push(n)})),t}(n.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(n){if(me(e)(n))return null}}}));return u&&ve(r,(function(e){return!t[e.name]})).length&&(u=we(r,u)),u&&ve(o,(function(e){return!i[e.name]})).length&&(u=_e(o,u)),u}var be={test:function(e){var n="connection"===e.name.value;return n&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||"production"===process.env.NODE_ENV||b.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),n}};function ge(e,n,t){return void 0===t&&(t=!0),n&&n.selections&&n.selections.some((function(n){return Oe(e,n,t)}))}function Oe(e,n,t){return void 0===t&&(t=!0),!Z(n)||!!n.directives&&(n.directives.some(me(e))||t&&ge(e,n.selectionSet,t))}function we(e,n){var t=function(e){return function(n){return e.some((function(e){return n.value&&"Variable"===n.value.kind&&n.value.name&&(e.name===n.value.name.value||e.test&&e.test(n))}))}}(e);return ye(x(n,{OperationDefinition:{enter:function(n){return c(c({},n),{variableDefinitions:n.variableDefinitions.filter((function(n){return!e.some((function(e){return e.name===n.variable.name.value}))}))})}},Field:{enter:function(n){if(e.some((function(e){return e.remove}))){var r=0;if(n.arguments.forEach((function(e){t(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(t(e))return null}}}))}function _e(e,n){function t(n){if(e.some((function(e){return e.name===n.name.value})))return null}return ye(x(n,{FragmentSpread:{enter:t},FragmentDefinition:{enter:t}}))}var je="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ke=Object.prototype.toString;function Ee(){return"undefined"!=typeof process&&process.env.NODE_ENV?process.env.NODE_ENV:"development"}function De(e){return Ee()===e}function Se(){return!0===De("production")}function Ne(){return!0===De("development")}function xe(){return!0===De("test")}var Pe=Object.prototype.hasOwnProperty;function Fe(e){var n=e[0]||{},t=e.length;if(t>1){var r=[];n=Te(n,r);for(var i=1;i<t;++i)n=Ae(n,e[i],r)}return n}function Ve(e){return null!==e&&"object"==typeof e}function Ae(e,n,t){return Ve(n)&&Ve(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=Te(e,t)),Object.keys(n).forEach((function(r){var i=n[r];if(Pe.call(e,r)){var o=e[r];i!==o&&(e[r]=Ae(Te(o,t),i,t))}else e[r]=i})),e):n}function Te(e,n){return null!==e&&"object"==typeof e&&n.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):c({__proto__:Object.getPrototypeOf(e)},e),n.push(e)),e}var qe=Object.create({});var Me=Object.freeze({__proto__:null,addTypenameToDocument:function(e){return x(ae(e),{SelectionSet:{enter:function(e,n,t){if(!t||"OperationDefinition"!==t.kind){var r=e.selections;if(r)if(!r.some((function(e){return Z(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=t;if(!(Z(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return c(c({},e),{selections:f(r,[de])})}}}}})},argumentsObjectFromField:X,assign:ue,buildQueryFromSelectionSet:function(e){return"query"===fe(e).operation?e:x(e,{OperationDefinition:{enter:function(e){return c(c({},e),{operation:"query"})}}})},canUseWeakMap:je,checkDocument:ae,cloneDeep:function(e){return function e(n,t){switch(ke.call(n)){case"[object Array]":if(t.has(n))return t.get(n);var r=n.slice(0);return t.set(n,r),r.forEach((function(n,i){r[i]=e(n,t)})),r;case"[object Object]":if(t.has(n))return t.get(n);var i=Object.create(Object.getPrototypeOf(n));return t.set(n,i),Object.keys(n).forEach((function(r){i[r]=e(n[r],t)})),i;default:return n}}(e,new Map)},createFragmentMap:pe,getDefaultValues:function(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var n=e.variableDefinitions.filter((function(e){return e.defaultValue})).map((function(e){var n=e.variable,t=e.defaultValue,r={};return Y(r,n.name,t),r}));return ue.apply(void 0,f([{}],n))}return{}},getDirectiveInfoFromField:function(e,n){if(e.directives&&e.directives.length){var t={};return e.directives.forEach((function(e){t[e.name.value]=X(e,n)})),t}return null},getDirectiveNames:te,getDirectivesFromDocument:function(e,n){var t;return ae(n),ye(x(n,{SelectionSet:{enter:function(n,r,i,o){var u=o.join("-");if(!t||u===t||!u.startsWith(t)){if(n.selections){var a=n.selections.filter((function(n){return Oe(e,n)}));return ge(e,n,!1)&&(t=u),c(c({},n),{selections:a})}return null}}}}))},getEnv:Ee,getFragmentDefinition:se,getFragmentDefinitions:le,getFragmentQueryDocument:function(e,n){var t=n,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw"production"===process.env.NODE_ENV?new h(11):new h("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed.");"FragmentDefinition"===e.kind&&r.push(e)})),void 0===t&&("production"===process.env.NODE_ENV?b(1===r.length,12):b(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."),t=r[0].name.value),c(c({},e),{definitions:f([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],e.definitions)})},getInclusionDirectives:oe,getMainDefinition:fe,getMutationDefinition:function(e){ae(e);var n=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))[0];return"production"===process.env.NODE_ENV?b(n,1):b(n,"Must contain a mutation definition."),n},getOperationDefinition:ce,getOperationDefinitionOrDie:function(e){var n=ce(e);return"production"===process.env.NODE_ENV?b(n,5):b(n,"GraphQL document is missing an operation"),n},getOperationName:function(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null},getQueryDefinition:function(e){var n=ce(e);return"production"===process.env.NODE_ENV?b(n&&"query"===n.operation,6):b(n&&"query"===n.operation,"Must contain a query definition."),n},getStoreKeyName:H,graphQLResultHasError:function(e){return e.errors&&e.errors.length},hasClientExports:function(e){return e&&re(["client"],e)&&re(["export"],e)},hasDirectives:re,isDevelopment:Ne,isEnv:De,isField:Z,isIdValue:function(e){return e&&"id"===e.type&&"boolean"==typeof e.generated},isInlineFragment:ee,isJsonValue:function(e){return null!=e&&"object"==typeof e&&"json"===e.type},isNumberValue:function(e){return["IntValue","FloatValue"].indexOf(e.kind)>-1},isProduction:Se,isScalarValue:function(e){return["StringValue","BooleanValue","EnumValue"].indexOf(e.kind)>-1},isTest:xe,maybeDeepFreeze:function(e){return!Ne()&&!xe()||"function"==typeof Symbol&&"string"==typeof Symbol("")?e:function e(n){return Object.freeze(n),Object.getOwnPropertyNames(n).forEach((function(t){null===n[t]||"object"!=typeof n[t]&&"function"!=typeof n[t]||Object.isFrozen(n[t])||e(n[t])})),n}(e)},mergeDeep:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Fe(e)},mergeDeepArray:Fe,removeArgumentsFromDocument:we,removeClientSetsFromDocument:function(e){ae(e);var n=he([{test:function(e){return"client"===e.name.value},remove:!0}],e);return n&&(n=x(n,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Z(e)&&"__typename"===e.name.value})))return null}}})),n},removeConnectionDirectiveFromDocument:function(e){return he([be],ae(e))},removeDirectivesFromDocument:he,removeFragmentSpreadFromDocument:_e,resultKeyNameFromField:function(e){return e.alias?e.alias.value:e.name.value},shouldInclude:function(e,n){return void 0===n&&(n={}),oe(e.directives).every((function(e){var t=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=n[r.value.name.value],"production"===process.env.NODE_ENV?b(void 0!==i,13):b(void 0!==i,"Invalid variable referenced in @"+t.name.value+" directive.")):i=r.value.value,"skip"===t.name.value?!i:i}))},storeKeyNameFromField:function(e,n){var t=null;e.directives&&(t={},e.directives.forEach((function(e){t[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Y(t[e.name.value],i,o,n)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var t=e.name,i=e.value;return Y(r,t,i,n)}))),H(e.name.value,r,t)},stripSymbols:function(e){return JSON.parse(JSON.stringify(e))},toIdValue:function(e,n){return void 0===n&&(n=!1),c({type:"id",generated:n},"string"==typeof e?{id:e,typename:void 0}:e)},tryFunctionOrLogError:function(e){try{return e()}catch(e){console.error&&console.error(e)}},valueFromNode:function e(n,t){switch(void 0===t&&(t=ne),n.kind){case"Variable":return t(n);case"NullValue":return null;case"IntValue":return parseInt(n.value,10);case"FloatValue":return parseFloat(n.value);case"ListValue":return n.values.map((function(n){return e(n,t)}));case"ObjectValue":for(var r={},i=0,o=n.fields;i<o.length;i++){var u=o[i];r[u.name.value]=e(u.value,t)}return r;default:return n.value}},valueToObjectRepresentation:Y,variablesInOperation:function(e){var n=new Set;if(e.variableDefinitions)for(var t=0,r=e.variableDefinitions;t<r.length;t++){var i=r[t];n.add(i.variable.name.value)}return n},warnOnceInDevelopment:function(e,n){void 0===n&&(n="warn"),Se()||qe[e]||(xe()||(qe[e]=!0),"error"===n?console.error(e):console.warn(e))},isEqual:function(e,n){try{return function e(n,t){if(n===t)return!0;var r=Q.call(n),i=Q.call(t);if(r!==i)return!1;switch(r){case"[object Array]":if(n.length!==t.length)return!1;case"[object Object]":if(U(n,t))return!0;var o=Object.keys(n),u=Object.keys(t),a=o.length;if(a!==u.length)return!1;for(var c=0;c<a;++c)if(!W.call(t,o[c]))return!1;for(c=0;c<a;++c){var l=o[c];if(!e(n[l],t[l]))return!1}return!0;case"[object Error]":return n.name===t.name&&n.message===t.message;case"[object Number]":if(n!=n)return t!=t;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object RegExp]":case"[object String]":return n==""+t;case"[object Map]":case"[object Set]":if(n.size!==t.size)return!1;if(U(n,t))return!0;for(var s=n.entries(),f="[object Map]"===r;;){var p=s.next();if(p.done)break;var v=p.value,d=v[0],y=v[1];if(!t.has(d))return!1;if(f&&!e(y,t.get(d)))return!1}return!0}return!1}(e,n)}finally{G.clear()}}}),Ie=F((function(e,n){function t(e,n,r){var o=r.fragmentMap,u=r.contextValue,a=r.variableValues,c={};return e.selections.forEach((function(e){if(!a||Me.shouldInclude(e,a))if(Me.isField(e)){var l=function(e,n,r){var i=r.variableValues,o=r.contextValue,u=r.resolver,a=e.name.value,c=Me.argumentsObjectFromField(e,i),l={isLeaf:!e.selectionSet,resultKey:Me.resultKeyNameFromField(e),directives:Me.getDirectiveInfoFromField(e,i),field:e},s=u(a,n,c,o,l);if(!e.selectionSet)return s;if(null==s)return s;if(Array.isArray(s))return function e(n,r,i){return r.map((function(r){return null===r?null:Array.isArray(r)?e(n,r,i):t(n.selectionSet,r,i)}))}(e,s,r);return t(e.selectionSet,s,r)}(e,n,r),s=Me.resultKeyNameFromField(e);void 0!==l&&(void 0===c[s]?c[s]=l:i(c[s],l))}else{var f=void 0;if(Me.isInlineFragment(e))f=e;else if(!(f=o[e.name.value]))throw new Error("No fragment named "+e.name.value);var p=f.typeCondition.name.value;if(r.fragmentMatcher(n,p,u)){var v=t(f.selectionSet,n,r);i(c,v)}}})),r.resultMapper?r.resultMapper(c,n):c}Object.defineProperty(n,"__esModule",{value:!0}),n.graphql=function(e,n,r,i,o,u){void 0===o&&(o={}),void 0===u&&(u={});var a=Me.getMainDefinition(n),c=Me.getFragmentDefinitions(n),l={fragmentMap:Me.createFragmentMap(c),contextValue:i,variableValues:o,resultMapper:u.resultMapper,resolver:e,fragmentMatcher:u.fragmentMatcher||function(){return!0}};return t(a.selectionSet,r,l)};var r=Object.prototype.hasOwnProperty;function i(e,n){null!==n&&"object"==typeof n&&Object.keys(n).forEach((function(t){var o=n[t];r.call(e,t)?i(e[t],o):e[t]=o}))}n.merge=i})),Ce=F((function(e,n){function t(e,n,i){return v.__awaiter(this,void 0,void 0,(function(){var o,u,a,c,l,s=this;return v.__generator(this,(function(f){switch(f.label){case 0:return o=i.fragmentMap,u=i.contextValue,a=i.variableValues,c={},l=function(e){return v.__awaiter(s,void 0,void 0,(function(){var l,s,f,p,d;return v.__generator(this,(function(v){switch(v.label){case 0:return Me.shouldInclude(e,a)?Me.isField(e)?[4,r(e,n,i)]:[3,2]:[2];case 1:return l=v.sent(),s=Me.resultKeyNameFromField(e),void 0!==l&&(void 0===c[s]?c[s]=l:Ie.merge(c[s],l)),[2];case 2:if(Me.isInlineFragment(e))f=e;else if(!(f=o[e.name.value]))throw new Error("No fragment named "+e.name.value);return p=f.typeCondition.name.value,i.fragmentMatcher(n,p,u)?[4,t(f.selectionSet,n,i)]:[3,4];case 3:d=v.sent(),Ie.merge(c,d),v.label=4;case 4:return[2]}}))}))},[4,Promise.all(e.selections.map(l))];case 1:return f.sent(),i.resultMapper?[2,i.resultMapper(c,n)]:[2,c]}}))}))}function r(e,n,r){return v.__awaiter(this,void 0,void 0,(function(){var o,u,a,c,l,s,f;return v.__generator(this,(function(p){switch(p.label){case 0:return o=r.variableValues,u=r.contextValue,a=r.resolver,c=e.name.value,l=Me.argumentsObjectFromField(e,o),s={isLeaf:!e.selectionSet,resultKey:Me.resultKeyNameFromField(e),directives:Me.getDirectiveInfoFromField(e,o),field:e},[4,a(c,n,l,u,s)];case 1:return f=p.sent(),e.selectionSet?null==f?[2,f]:Array.isArray(f)?[2,i(e,f,r)]:[2,t(e.selectionSet,f,r)]:[2,f]}}))}))}function i(e,n,r){return Promise.all(n.map((function(n){return null===n?null:Array.isArray(n)?i(e,n,r):t(e.selectionSet,n,r)})))}Object.defineProperty(n,"__esModule",{value:!0}),n.graphql=function(e,n,r,i,o,u){void 0===u&&(u={});var a=Me.getMainDefinition(n),c=Me.getFragmentDefinitions(n),l={fragmentMap:Me.createFragmentMap(c),contextValue:i,variableValues:o,resultMapper:u.resultMapper,resolver:e,fragmentMatcher:u.fragmentMatcher||function(){return!0}};return t(a.selectionSet,r,l)}}));function Le(e,n,t){function r(e){return!("object"!=typeof e||!e.hasOwnProperty("sys")||1!==Object.keys(e).length)}function i(e,o,u,a){if(void 0===u&&(u={}),void 0===a&&(a=0),!e||"object"!=typeof e)return u;if(a>=n.include)return u;var c=Object.assign({},u);return Object.keys(e).forEach((function(n){c[n]=e[n].fields&&t.parseRefs?i(e[n].fields,e[n].sys,c[n],a+1):function e(n,o){return void 0===o&&(o=0),r(n)?null:Array.isArray(n)&&t.parseArrays?n.filter((function(e){return!r(e)})).map((function(n){return n&&"object"==typeof n&&n.fields?i(n.fields,n.sys,{},o+1):e(n,o+1)})):n}(e[n],a+1)})),o&&o.contentType&&o.contentType.sys&&o.contentType.sys.id&&(c.id=o.id,c.__typename=o.contentType.sys.id),o&&o.updatedAt&&(c.updatedAt=o.updatedAt),o&&o.createdAt&&(c.createdAt=o.createdAt),c}void 0===n&&(n={include:10}),void 0===t&&(t={parseArrays:!0,parseRefs:!0});var o=Object.assign({},e);return i(o.fields,o.sys)}function Je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Je(Object(t),!0).forEach((function(n){i.default(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ze=function(e,n){return n&&n.hasOwnProperty(e)?n[e]:null};function Be(e,n,t,r){var i,o;function u(e,n){return e?(e.hasOwnProperty("__typename")&&e.__typename&&(e.__typename=e.__typename.substring(0,1).toUpperCase()+e.__typename.substring(1)),n&&n.sys?e.sys=Re(Re({},n.sys),{},{__typename:"Sys"}):n.id&&(e.sys={id:n.id,__typename:"Sys"}),e.id&&delete e.id,e.createdAt&&delete e.createdAt,e.updatedAt&&delete e.updatedAt,e):e}function a(e,n,t){var i;if(void 0===t&&(t=0),!e)return null;if(t>=r.include)return e;var o=Object.assign({},e.hasOwnProperty("sys")&&e.hasOwnProperty("fields")?Le(e,r,{parseArrays:!1,parseRefs:!1}):e);Object.keys(o).forEach((function(r){var i=o[r];if(Array.isArray(i)){var l=!1;if(i.filter((function(e){return!!e})).forEach((function(e){(e.hasOwnProperty("sys")&&e.hasOwnProperty("fields")||e.hasOwnProperty("__typename"))&&(l=!0)})),l){var s=r+"Collection";o[s]=c(i,null==n?void 0:n[s],t+1),delete o[r]}else o[r]=i.map((function(n,t){return u(n,e.fields[r][t])}))}else i&&"object"==typeof i&&(i.hasOwnProperty("__typename")||i.hasOwnProperty("sys")&&i.hasOwnProperty("fields"))?o[r]=a(i,null==n?void 0:n[r],t+1):o[r]=i}));var l=u(o,e);return function e(n,t){if(!n||!t)return n;var r=Object.assign({},n||{});return Object.keys(t).forEach((function(n){r.hasOwnProperty(n)||(n.endsWith("Collection")&&t[n].items?r[n]=c([],t[n]):n.startsWith("...")?r[n]=e({},t[n]):r[n]=t[n])})),r}("Asset"===(null==l||null===(i=l.sys)||void 0===i?void 0:i.type)?function(e){var n,t,r,i,o,u,a,c,l,s,f,p,v,d,y,m,h,b=Object.assign({},e);return b.__typename="Asset",b.url=null==b||null===(n=b.file)||void 0===n?void 0:n.url,b.contentType=null==b||null===(t=b.file)||void 0===t?void 0:t.contentType,b.size=null==b||null===(r=b.file)||void 0===r||null===(i=r.details)||void 0===i?void 0:i.size,b.width=(null==b||null===(o=b.file)||void 0===o||null===(u=o.details)||void 0===u||null===(a=u.image)||void 0===a?void 0:a.width)||(null==b||null===(c=b.file)||void 0===c||null===(l=c.details)||void 0===l||null===(s=l.video)||void 0===s?void 0:s.width),b.height=(null==b||null===(f=b.file)||void 0===f||null===(p=f.details)||void 0===p||null===(v=p.image)||void 0===v?void 0:v.height)||(null==b||null===(d=b.file)||void 0===d||null===(y=d.details)||void 0===y||null===(m=y.video)||void 0===m?void 0:m.height),b.fileName=null==b||null===(h=b.file)||void 0===h?void 0:h.fileName,delete b.file,b}(l):l,n)}function c(e,n,t){return void 0===e&&(e=[]),void 0===t&&(t=0),{__typename:"Array",total:(e||[]).length,items:(e||[]).map((function(e){return a(e,null==n?void 0:n.items,t)})).filter((function(e){return!!e}))}}return void 0===r&&(r={include:10}),(null==n?void 0:n.items)?((o={})[e]=c(n.items,null==t?void 0:t[e]),o):((i={})[e]=a(n,null==t?void 0:t[e]),i)}var Ke="OperationDefinition",Qe="FragmentDefinition",We="Field",Ge="FragmentSpread",Ue="Argument",Ye="ObjectField";function $e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function He(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$e(Object(t),!0).forEach((function(n){i.default(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Xe=function(e){var n=e.query,t=e.operationName;return n&&n.hasOwnProperty(t)?n[t]:n},Ze=["access_token","include","locale","content_type","select","query","links_to_entry","links_to_asset","order","limit","skip","mimetype_group","preview"],en=function(e){var n,t=e.query,r=t.definitions.find((function(e){return e.kind===Ke}));return r&&r.name&&r.name.value?((n={})[r.name.value]=function e(n,t){if(!(n&&n.selections&&n.selections.length))return null;var r={};return n.selections.forEach((function(n){if(n.kind===We)n.name&&n.name.value&&(r[n.name.value]=e(n.selectionSet,t));else if(n.kind===Ge){var i=t.find((function(e){return e.kind===Qe&&e.name&&e.name.value&&n.name&&n.name.value&&e.name.value===n.name.value}));i&&(r["..."+n.name.value]=e(i.selectionSet,t))}})),r}(r.selectionSet,t.definitions),n):{}},nn=function(e){var n=e.variables,t=function(e){var n={};return Xe(e).definitions.filter((function(e){return e.kind===Ke})).forEach((function(e){e.selectionSet.selections.forEach((function(e){e.arguments.forEach((function(e){e.value&&e.value.fields?e.value.fields.forEach((function(e){e.value&&e.value.name&&e.value.name.value&&e.kind&&e.name&&e.name.value&&(n[e.value.name.value]={kind:e.kind,field:e.name.value})})):e.value&&e.value.name&&e.value.name.value&&e.kind&&e.name&&e.name.value&&(n[e.value.name.value]={kind:e.kind,field:e.name.value})}))}))})),n}(e),r=Xe(e).definitions.find((function(e){return e.kind===Ke})).variableDefinitions.map((function(e){return e.variable.name.value})),i=Object.keys(t).filter((function(e){return n&&n.hasOwnProperty(e)&&t&&t.hasOwnProperty(e)})).map((function(e){var r;try{switch(t[e].kind){case Ue:var i;if(t[e]&&t[e].field&&Ze.includes(t[e].field))return"preview"!==t[e].field||n[e]?((i={})[t[e].field]=n[e],i):null;break;case Ye:var o=function(e){return e.endsWith("_in")?"fields."+e.replace("_in","")+"[in]":e.endsWith("_not")?"fields."+e.replace("_not","")+"[ne]":e.endsWith("_exists")?"fields."+e.replace("_exists","")+"[exists]":e.endsWith("_not_in")?"fields."+e.replace("_not_in","")+"[nin]":"fields."+e}(t[e].field);return(r={})[o]=n[e],r;default:return null}}catch(e){return console.error(e),null}})).filter((function(e){return!!e})).reduce((function(e,n){return He(He({},e),n)}),{});return He(He({},i),B(n,r))};function tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function rn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tn(Object(t),!0).forEach((function(n){i.default(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var on=require("contentful"),un=function(e){function n(n,t){var r;return void 0===t&&(t={}),(r=e.call(this)||this).clientOptions=n,r.queryDefaults=t,r.client=on.createClient(rn({},B(n,["previewAccessToken"]))),n.hasOwnProperty("previewAccessToken")&&n.previewAccessToken&&(r.previewClient=on.createClient(rn(rn({},B(n,["previewAccessToken"])),{},{accessToken:n.previewAccessToken,host:"preview.contentful.com"}))),r}return o.default(n,e),n.prototype.request=function(e,n){var t=this,r=e.query,i=e.operationName;return(n?n(e):V.of({data:{}})).flatMap((function(n){n.data;var o=n.errors;return new V((function(n){var u=function(e){var n=Xe(e).definitions.find((function(e){return"query"===e.operation}));if(n){var t=n.selectionSet.selections.find((function(e){return"Name"===e.name.kind}));if(t)return t.name.value}return null}(e),a=nn(e),c=a&&a.hasOwnProperty("id")?"getEntry":"getEntries",l="getEntry"===c?[a.id,rn(rn({},t.queryDefaults),B(a,["id","preview"]))]:[rn(rn(rn({},t.queryDefaults),B(a,["preview"])),{},{content_type:u.replace("Collection","")})],s=t.previewClient&&a&&a.hasOwnProperty("preview")&&a.preview?t.previewClient:t.client;s[c].apply(s,l).then((function(t){var a=en(e),c=Be(u,t,a[i]);Ce.graphql(ze,r,c).then((function(e){n.next({data:e,errors:o}),n.complete()})).catch((function(e){return console.error(e)}))})).catch((function(e){n.error(e)}))}))}))},n}(J);e.ContentfulRestLink=un,Object.defineProperty(e,"__esModule",{value:!0})}));

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc