"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9471],{65822:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLError=s,t.printError=c;var r,i=(r=n(25690))&&r.__esModule?r:{default:r},o=n(39016),a=n(38038);function s(e,t,n,r,a,c,u){var l,f=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,p=n;if(!p&&f){var h=f[0];p=h&&h.loc&&h.loc.source}var d=r;!d&&f&&(d=f.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),d&&0===d.length&&(d=void 0),r&&n?l=r.map(function(e){return(0,o.getLocation)(n,e)}):f&&(l=f.reduce(function(e,t){return t.loc&&e.push((0,o.getLocation)(t.loc.source,t.loc.start)),e},[]));var v=u;if(null==v&&null!=c){var y=c.extensions;(0,i.default)(y)&&(v=y)}Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:!!l},path:{value:a||void 0,enumerable:!!a},nodes:{value:f||void 0},source:{value:p||void 0},positions:{value:d||void 0},originalError:{value:c},extensions:{value:v||void 0,enumerable:!!v}}),c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function c(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var r,i=(r=n(18554))&&r.__esModule?r:{default:r}},13320:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}},67242:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)throw Error(t)}},8002:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function e(t,n){switch(o(t)){case"string":return JSON.stringify(t);case"function":return t.name?"[function ".concat(t.name,"]"):"[function]";case"object":if(null===t)return"null";return function(t,n){if(-1!==n.indexOf(t))return"[Circular]";var r,o,a=[].concat(n,[t]),s="function"==typeof(r=t[String(i.default)])?r:"function"==typeof t.inspect?t.inspect:void 0;if(void 0!==s){var c=s.call(t);if(c!==t)return"string"==typeof c?c:e(c,a)}else if(Array.isArray(t))return function(t,n){if(0===t.length)return"[]";if(n.length>2)return"[Array]";for(var r=Math.min(10,t.length),i=t.length-r,o=[],a=0;a1&&o.push("... ".concat(i," more items")),"["+o.join(", ")+"]"}(t,a);return 0===(o=Object.keys(t)).length?"{}":a.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(t)+"]":"{ "+o.map(function(n){var r=e(t[n],a);return n+": "+r}).join(", ")+" }"}(t,n);default:return String(t)}}(e,[])};var r,i=(r=n(18554))&&r.__esModule?r:{default:r};function o(e){return(o="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)}},25690:function(e,t){function n(e){return(n="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==n(e)&&null!==e}},18554:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n},70849:function(e,t){function n(e){for(var t=null,n=1;n0&&i(t[0]);)t.shift();for(;t.length>0&&i(t[t.length-1]);)t.pop();return t.join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||" "===e[0],o='"'===e[e.length-1],a=!r||o||n,s="";return a&&!(r&&i)&&(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}},78333:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var n=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=n},12178:function(e,t,n){Object.defineProperty(t,"hY",{enumerable:!0,get:function(){return r.Kind}}),Object.defineProperty(t,"Qc",{enumerable:!0,get:function(){return i.parse}}),Object.defineProperty(t,"S0",{enumerable:!0,get:function(){return o.print}}),Object.defineProperty(t,"Vn",{enumerable:!0,get:function(){return a.visit}}),Object.defineProperty(t,"$_",{enumerable:!0,get:function(){return a.BREAK}}),Object.defineProperty(t,"pO",{enumerable:!0,get:function(){return s.isSelectionNode}}),n(12412),n(39016),n(38038);var r=n(2828),i=(n(23175),n(54274),n(88370)),o=n(23033),a=n(80285),s=n(11352);n(78333)},2828:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var n=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=n},54274:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createLexer=function(e,t){var n=new l(s.TokenKind.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:c,lookahead:u}},t.isPunctuatorToken=function(e){var t=e.kind;return t===s.TokenKind.BANG||t===s.TokenKind.DOLLAR||t===s.TokenKind.AMP||t===s.TokenKind.PAREN_L||t===s.TokenKind.PAREN_R||t===s.TokenKind.SPREAD||t===s.TokenKind.COLON||t===s.TokenKind.EQUALS||t===s.TokenKind.AT||t===s.TokenKind.BRACKET_L||t===s.TokenKind.BRACKET_R||t===s.TokenKind.BRACE_L||t===s.TokenKind.PIPE||t===s.TokenKind.BRACE_R};var r,i=(r=n(89503))&&r.__esModule?r:{default:r},o=n(50338),a=n(70849),s=n(23175);function c(){return this.lastToken=this.token,this.token=this.lookahead()}function u(){var e=this.token;if(e.kind!==s.TokenKind.EOF)do e=e.next||(e.next=function(e,t){var n=e.source,r=n.body,i=r.length,c=function(e,t,n){for(var r=e.length,i=t;i=i)return new l(s.TokenKind.EOF,i,i,u,d,t);var v=r.charCodeAt(c);switch(v){case 33:return new l(s.TokenKind.BANG,c,c+1,u,d,t);case 35:return function(e,t,n,r,i){var o,a=e.body,c=t;do o=a.charCodeAt(++c);while(!isNaN(o)&&(o>31||9===o));return new l(s.TokenKind.COMMENT,t,c,n,r,i,a.slice(t+1,c))}(n,c,u,d,t);case 36:return new l(s.TokenKind.DOLLAR,c,c+1,u,d,t);case 38:return new l(s.TokenKind.AMP,c,c+1,u,d,t);case 40:return new l(s.TokenKind.PAREN_L,c,c+1,u,d,t);case 41:return new l(s.TokenKind.PAREN_R,c,c+1,u,d,t);case 46:if(46===r.charCodeAt(c+1)&&46===r.charCodeAt(c+2))return new l(s.TokenKind.SPREAD,c,c+3,u,d,t);break;case 58:return new l(s.TokenKind.COLON,c,c+1,u,d,t);case 61:return new l(s.TokenKind.EQUALS,c,c+1,u,d,t);case 64:return new l(s.TokenKind.AT,c,c+1,u,d,t);case 91:return new l(s.TokenKind.BRACKET_L,c,c+1,u,d,t);case 93:return new l(s.TokenKind.BRACKET_R,c,c+1,u,d,t);case 123:return new l(s.TokenKind.BRACE_L,c,c+1,u,d,t);case 124:return new l(s.TokenKind.PIPE,c,c+1,u,d,t);case 125:return new l(s.TokenKind.BRACE_R,c,c+1,u,d,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,n,r,i){for(var o=e.body,a=o.length,c=t+1,u=0;c!==a&&!isNaN(u=o.charCodeAt(c))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++c;return new l(s.TokenKind.NAME,t,c,n,r,i,o.slice(t,c))}(n,c,u,d,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,a){var c=e.body,u=n,h=t,d=!1;if(45===u&&(u=c.charCodeAt(++h)),48===u){if((u=c.charCodeAt(++h))>=48&&u<=57)throw(0,o.syntaxError)(e,h,"Invalid number, unexpected digit after 0: ".concat(f(u),"."))}else h=p(e,h,u),u=c.charCodeAt(h);if(46===u&&(d=!0,u=c.charCodeAt(++h),h=p(e,h,u),u=c.charCodeAt(h)),(69===u||101===u)&&(d=!0,(43===(u=c.charCodeAt(++h))||45===u)&&(u=c.charCodeAt(++h)),h=p(e,h,u),u=c.charCodeAt(h)),46===u||69===u||101===u)throw(0,o.syntaxError)(e,h,"Invalid number, expected digit but got: ".concat(f(u),"."));return new l(d?s.TokenKind.FLOAT:s.TokenKind.INT,t,h,r,i,a,c.slice(t,h))}(n,c,v,u,d,t);case 34:if(34===r.charCodeAt(c+1)&&34===r.charCodeAt(c+2))return function(e,t,n,r,i,c){for(var u=e.body,p=t+3,h=p,d=0,v="";p=48&&a<=57){do a=r.charCodeAt(++i);while(a>=48&&a<=57);return i}throw(0,o.syntaxError)(e,i,"Invalid number, expected digit but got: ".concat(f(a),"."))}function h(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}(0,i.default)(l,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}})},39016:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index120){for(var d=Math.floor(l/80),v=l%80,y=[],m=0;m0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive")};t.Source=a,(0,i.default)(a)},23175:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var n=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=n},80285:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,r=void 0,u=Array.isArray(e),l=[e],f=-1,p=[],h=void 0,d=void 0,v=void 0,y=[],m=[],b=e;do{var g=++f===l.length,k=g&&0!==p.length;if(g){if(d=0===m.length?void 0:y[y.length-1],h=v,v=m.pop(),k){if(u)h=h.slice();else{for(var T={},E=0,_=Object.keys(h);E<_.length;E++){var O=_[E];T[O]=h[O]}h=T}for(var I=0,S=0;S=0;--c)s.missing=((a={})[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,r.ZT)(t,e),t}(Error)},49641:function(e,t,n){n.d(t,{$O:function(){return b},E_:function(){return g},Is:function(){return E},RC:function(){return function e(t,n,r){return!!(0,o.s)(n)&&((0,a.k)(n)?n.every(function(n){return e(t,n,r)}):t.selections.every(function(t){if((0,i.My)(t)&&(0,s.LZ)(t,r)){var o=(0,i.u2)(t);return f.call(n,o)&&(!t.selectionSet||e(t.selectionSet,n[o],r))}return!0}))}},RI:function(){return f},ig:function(){return T},j:function(){return k},jS:function(){return v},jp:function(){return m},lg:function(){return y},uG:function(){return h}});var r=n(53712),i=n(51761),o=n(13154),a=n(21436),s=n(19065),c=n(182),u=n(23361),l=n(36765),f=Object.prototype.hasOwnProperty;function p(e){return null==e}function h(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=p(r)?p(i)?void 0:{_id:i}:{id:r}),p(r)&&!p(i)&&(r=i),!p(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var d={dataIdFromObject:h,addTypename:!0,resultCaching:!0,canonizeResults:!1};function v(e){return(0,r.o)(d,e)}function y(e){var t=e.canonizeResults;return void 0===t?d.canonizeResults:t}function m(e,t){return(0,i.Yk)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var b=/^[_a-z][_0-9a-z]*/i;function g(e){var t=e.match(b);return t?t[0]:e}function k(e){return(0,o.s)(e)&&!(0,i.Yk)(e)&&!(0,a.k)(e)}function T(){return new c.w0}function E(e,t){var n=(0,u.F)((0,l.kU)(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}},32393:function(e,t,n){n.d(t,{h:function(){return ef}});var r,i,o=n(97582),a=n(16459),s=n(33893),c=n(30020),u=n(11294),l=n(75727),f=n(18056),p=n(76487),h=n(51761),d=n(12178),v=n(30320),y=n(53712),m=n(36765),b=n(182),g=n(19065),k=n(23361),T=n(10542),E=n(13154),_=n(75028),O=n(49641),I=Object.create(null),S=function(){return I},w=Object.create(null),N=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,T.J)((0,h.Yk)(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,h.Yk)(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,h.kQ)(e);if((0,h.Yk)(e))return e;var r=n.policies.identify(e)[0];if(r){var i=(0,h.kQ)(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,o.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),O.RI.call(this.data,e)){var n=this.data[e];if(n&&O.RI.call(n,t))return n[t]}return"__typename"===t&&O.RI.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof R?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),O.RI.call(this.data,e))?this.data[e]:this instanceof R?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;(0,h.Yk)(e)&&(e=e.__ref),(0,h.Yk)(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){(0,a.kG)("string"==typeof n,1);var s=new b.w0(F).merge(i,o);if(this.data[n]=s,s!==i&&(delete this.refs[n],this.group.caching)){var c=Object.create(null);i||(c.__exists=1),Object.keys(o).forEach(function(e){if(!i||i[e]!==s[e]){c[e]=1;var t=(0,O.E_)(e);t===e||r.policies.hasKeyArgs(s.__typename,t)||(c[t]=1),void 0!==s[e]||r instanceof R||delete s[e]}}),c.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,s=!0,c={DELETE:I,INVALIDATE:w,isReference:h.Yk,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||(0,h.kQ)(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var l=(0,O.E_)(u),f=r[u];if(void 0!==f){var p="function"==typeof t?t:t[u]||t[l];if(p){var h=p===S?I:p((0,T.J)(f),(0,o.pi)((0,o.pi)({},c),{fieldName:l,storeFieldName:u,storage:n.getStorage(e,u)}));h===w?n.group.dirty(e,u):(h===I&&(h=void 0),h!==f&&(i[u]=h,a=!0,f=h))}void 0!==f&&(s=!1)}}),a)return this.merge(e,i),s&&(this instanceof R?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=S,r):S)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(O.RI.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof R&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){O.RI.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&O.RI.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,o._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof R?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){O.RI.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof R;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!O.RI.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){(0,h.Yk)(e)&&(t[e.__ref]=!0),(0,E.s)(e)&&Object.keys(e).forEach(function(t){var n=e[t];(0,E.s)(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),D=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,s.dP)():null,this.keyMaker=new _.B(v.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(t+"#"+e);var n=(0,O.E_)(t);n!==t&&this.d(n+"#"+e),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")},e}();function x(e,t){C(e)&&e.group.depend(t,"__exists")}i=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=t.seed,o=e.call(this,n,new D(void 0===r||r))||this;return o.stump=new A(o),o.storageTrie=new _.B(v.mr),i&&o.replace(i),o}return(0,o.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(r=N||(N={})),r.Root=i;var R=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return(0,o.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){(0,c.D)(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,o.pi)((0,o.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return O.RI.call(this.data,t)?(0,o.pi)((0,o.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(N),A=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new D(t.group.caching,t.group))||this}return(0,o.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(R);function F(e,t,n){var r=e[n],i=t[n];return(0,c.D)(r,i)?r:i}function C(e){return!!(e instanceof N&&e.group.caching)}var P=n(21436),M=n(80900);function L(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var K=function(){function e(e){var t=this;this.knownResults=new(v.mr?WeakMap:Map),this.config=(0,y.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:(0,O.lg)(e)}),this.canon=e.canon||new M.h,this.executeSelectionSet=(0,s.re)(function(e){var n,r=e.context.canonizeResults,i=L(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?(0,o.pi)((0,o.pi)({},a),{result:t.canon.admit(a.result)}):a:(x(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:L,makeCacheKey:function(e,t,n,r){if(C(n.store))return n.store.makeCacheKey(e,(0,h.Yk)(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=(0,s.re)(function(e){return x(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(C(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new M.h},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,a=e.variables,s=e.returnPartialData,c=e.canonizeResults,u=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;a=(0,o.pi)((0,o.pi)({},(0,m.O4)((0,m.iW)(r))),a);var p=(0,h.kQ)(void 0===i?"ROOT_QUERY":i),d=this.executeSelectionSet({selectionSet:(0,m.p$)(r).selectionSet,objectOrReference:p,enclosingRef:p,context:(0,o.pi)({store:n,query:r,policies:f,variables:a,varString:(0,M.B)(a),canonizeResults:u},(0,O.Is)(r,this.config.fragments))});if(d.missing&&(t=[new l.y(function(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}(d.missing),d.missing,r,a)],!(void 0===s||s)))throw t[0];return{result:d.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(C(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,s=e.context;if((0,h.Yk)(i)&&!s.policies.rootTypenamesById[i.__ref]&&!s.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var c=s.variables,u=s.policies,l=s.store.getFieldValue(i,"__typename"),f=[],v=new b.w0;function y(e,n){var r;return e.missing&&(t=v.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!u.rootIdsByTypename[l]&&f.push({__typename:l});var m=new Set(r.selections);m.forEach(function(e){var r,b;if((0,g.LZ)(e,c)){if((0,h.My)(e)){var T=u.readField({fieldName:e.name.value,field:e,variables:s.variables,from:i},s),E=(0,h.u2)(e);void 0===T?p.Gw.added(e)||(t=v.merge(t,((r={})[E]="Can't find field '".concat(e.name.value,"' on ").concat((0,h.Yk)(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):(0,P.k)(T)?T=y(n.executeSubSelectedArray({field:e,array:T,enclosingRef:o,context:s}),E):e.selectionSet?null!=T&&(T=y(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:T,enclosingRef:(0,h.Yk)(T)?T:o,context:s}),E)):s.canonizeResults&&(T=n.canon.pass(T)),void 0!==T&&f.push(((b={})[E]=T,b))}else{var _=(0,k.hi)(e,s.lookupFragment);if(!_&&e.kind===d.hY.FRAGMENT_SPREAD)throw(0,a._K)(7,e.name.value);_&&u.fragmentMatches(_,l)&&_.selectionSet.selections.forEach(m.add,m)}}});var E={result:(0,b.bw)(f),missing:t},_=s.canonizeResults?this.canon.admit(E):(0,T.J)(E);return _.result&&this.knownResults.set(_.result,r),_},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,s=e.context,c=new b.w0;function u(e,n){var r;return e.missing&&(t=c.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,P.k)(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:s}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:(0,h.Yk)(e)?e:o,context:s}),t):(!1!==globalThis.__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){(0,E.s)(n)&&((0,a.kG)(!(0,h.Yk)(n),8,(0,O.jp)(e,n),t.name.value),Object.values(n).forEach(r.add,r))})}}(s.store,r,e),e)}),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),j=n(79487),q=n(13887),V=n(66438),Q=Object.create(null);function B(e){var t=JSON.stringify(e);return Q[t]||(Q[t]=Object.create(null))}function U(e){var t=B(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=Y(e,function(e){var i=W(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&O.RI.call(t,e[0])&&(i=W(t,e,z)),(0,a.kG)(void 0!==i,2,e.join("."),t),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function G(e){var t=B(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,o=n.fieldName,a=JSON.stringify(Y(e,function(e){var n=e[0],o=n.charAt(0);if("@"===o){if(r&&(0,P.O)(r.directives)){var a=n.slice(1),s=r.directives.find(function(e){return e.name.value===a}),c=s&&(0,h.NC)(s,i);return c&&W(c,e.slice(1))}return}if("$"===o){var u=n.slice(1);if(i&&O.RI.call(i,u)){var l=e.slice(0);return l[0]=u,W(i,l)}return}if(t)return W(t,e)}));return(t||"{}"!==a)&&(o+=":"+a),o})}function Y(e,t){var n=new b.w0;return(function e(t){var n=B(t);if(!n.paths){var r=n.paths=[],i=[];t.forEach(function(n,o){(0,P.k)(n)?(e(n).forEach(function(e){return r.push(i.concat(e))}),i.length=0):(i.push(n),(0,P.k)(t[o+1])||(r.push(i.slice(0)),i.length=0))})}return n.paths})(e).reduce(function(e,r){var i,o=t(r);if(void 0!==o){for(var a=r.length-1;a>=0;--a)(i={})[r[a]]=o,o=i;e=n.merge(e,o)}return e},Object.create(null))}function z(e,t){return e[t]}function W(e,t,n){return n=n||z,function e(t){return(0,E.s)(t)?(0,P.k)(t)?t.map(e):Y(Object.keys(t).sort(),function(e){return W(t,e)}):t}(t.reduce(function e(t,r){return(0,P.k)(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function J(e){return void 0!==e.args?e.args:e.field?(0,h.NC)(e.field,e.variables):null}h.PT.setStringify(M.B);var H=function(){},X=function(e,t){return t.fieldName},$=function(e,t,n){return(0,n.mergeObjects)(e,t)},Z=function(e,t){return t},ee=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,o.pi)({dataIdFromObject:O.uG},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,a=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s=t&&t.storeObject||e,c=(0,o.pi)((0,o.pi)({},t),{typename:a,storeObject:s,readField:t&&t.readField||function(){var e=en(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),l=u&&u.keyFn||this.config.dataIdFromObject;l;){var f=l((0,o.pi)((0,o.pi)({},e),s),c);if((0,P.k)(f))l=U(f);else{r=f;break}}return r=r?String(r):void 0,c.keyObject?[r,c.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,a=r.mutationType,s=r.subscriptionType,c=(0,o._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),s&&t.setRootTypename("Subscription",n),O.RI.call(t.toBeAdded,n)?t.toBeAdded[n].push(c):t.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?$:!1===t?Z:e.merge}a(r,t.merge),r.keyFn=!1===i?H:(0,P.k)(i)?U(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,c=i.read,u=i.merge;r.keyFn=!1===s?X:(0,P.k)(s)?G(s):"function"==typeof s?s:r.keyFn,"function"==typeof c&&(r.read=c),a(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||X)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&((0,a.kG)(!r||r===e,3,e),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(O.$O);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!O.RI.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);!r&&this.fuzzySubtypes.size&&(r=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(n,i){if(n.test(e)){var o=t.supertypeMap.get(i);o&&o.forEach(function(e){return r.add(e)})}})),r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,o._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),c=[s],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>c.indexOf(t)&&c.push(t)},l=!!(n&&this.fuzzySubtypes.size),f=!1,p=0;p1?s:t}:(r=(0,o.pi)({},i),O.RI.call(r,"from")||(r.from=t)),!1!==globalThis.__DEV__&&void 0===r.from&&!1!==globalThis.__DEV__&&a.kG.warn(5,(0,q.v)(Array.from(e))),void 0===r.variables&&(r.variables=n),r}function er(e){return function(t,n){if((0,P.k)(t)||(0,P.k)(n))throw(0,a._K)(6);if((0,E.s)(t)&&(0,E.s)(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if((0,h.Yk)(t)&&(0,O.j)(n))return e.merge(t.__ref,n),t;if((0,O.j)(t)&&(0,h.Yk)(n))return e.merge(t,n.__ref),n;if((0,O.j)(t)&&(0,O.j)(n))return(0,o.pi)((0,o.pi)({},t),n)}return n}}function ei(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,o.pi)((0,o.pi)({},e),{clientOnly:t,deferred:n})),i}var eo=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,s=t.dataId,u=t.variables,l=t.overwrite,f=(0,m.$H)(r),p=(0,O.ig)();u=(0,o.pi)((0,o.pi)({},(0,m.O4)(f)),u);var d=(0,o.pi)((0,o.pi)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:u,varString:(0,M.B)(u)},(0,O.Is)(r,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),v=this.processSelectionSet({result:i||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!(0,h.Yk)(v))throw(0,a._K)(9,i);return d.incomingById.forEach(function(t,r){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,u=(0,h.kQ)(r);if(o&&o.map.size){var l=n.applyMerges(o,u,i,d);if((0,h.Yk)(l))return;i=l}if(!1!==globalThis.__DEV__&&!d.overwrite){var f=Object.create(null);s.forEach(function(e){e.selectionSet&&(f[e.name.value]=!0)});var p=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){!0!==f[(0,O.E_)(e)]||p(e)||function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(!(!s||(0,h.Yk)(o)||(0,c.D)(o,s)||Object.keys(o).every(function(e){return void 0!==r.getFieldValue(s,e)}))){var u=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),l=(0,O.E_)(n),f="".concat(u,".").concat(l);if(!el.has(f)){el.add(f);var p=[];(0,P.k)(o)||(0,P.k)(s)||[o,s].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||p.includes(t)||p.push(t)}),!1!==globalThis.__DEV__&&a.kG.warn(12,l,u,p.length?"either ensure all objects of type "+p.join(" and ")+" have an ID or a custom merge function, or ":"",f,o,s)}}}}(u,i,e,d.store)})}e.merge(r,i)}),e.retain(v.__ref),v},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,s=e.context,c=e.mergeTree,u=this.cache.policies,l=Object.create(null),f=n&&u.rootTypenamesById[n]||(0,h.qw)(r,i,s.fragmentMap)||n&&s.store.get(n,"__typename");"string"==typeof f&&(l.__typename=f);var d=function(){var e=en(arguments,l,s.variables);if((0,h.Yk)(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var n=u.readField((0,o.pi)((0,o.pi)({},e),{from:t.storeObject}),s);if(void 0!==n)return n}}return u.readField(e,s)},v=new Set;this.flattenFields(i,r,s,f).forEach(function(e,n){var i,o=r[(0,h.u2)(n)];if(v.add(n),void 0!==o){var s=u.getStoreFieldName({typename:f,fieldName:n.name.value,field:n,variables:e.variables}),y=es(c,s),m=t.processFieldValue(o,n,n.selectionSet?ei(e,!1,!1):e,y),b=void 0;n.selectionSet&&((0,h.Yk)(m)||(0,O.j)(m))&&(b=d("__typename",m));var g=u.getMergeFunction(f,n.name.value,b);g?y.info={field:n,typename:f,merge:g}:eu(c,s),l=e.merge(l,((i={})[s]=m,i))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||p.Gw.added(n)||u.getReadFunction(f,n.name.value)||!1===globalThis.__DEV__||a.kG.error(10,(0,h.u2)(n),r)});try{var y=u.identify(r,{typename:f,selectionSet:i,fragmentMap:s.fragmentMap,storeObject:l,readField:d}),m=y[0],b=y[1];n=n||m,b&&(l=s.merge(l,b))}catch(e){if(!n)throw e}if("string"==typeof n){var g=(0,h.kQ)(n),k=s.written[n]||(s.written[n]=[]);if(k.indexOf(i)>=0||(k.push(i),this.reader&&this.reader.isFresh(r,g,i,s)))return g;var T=s.incomingById.get(n);return T?(T.storeObject=s.merge(T.storeObject,l),T.mergeTree=function e(t,n){if(t===n||!n||ec(n))return t;if(!t||ec(t))return n;var r=t.info&&n.info?(0,o.pi)((0,o.pi)({},t.info),n.info):t.info||n.info,i=t.map.size&&n.map.size,a={info:r,map:i?new Map:t.map.size?t.map:n.map};if(i){var s=new Set(n.map.keys());t.map.forEach(function(t,r){a.map.set(r,e(t,n.map.get(r))),s.delete(r)}),s.forEach(function(r){a.map.set(r,e(n.map.get(r),t.map.get(r)))})}return a}(T.mergeTree,c),v.forEach(function(e){return T.fieldNodeSet.add(e)})):s.incomingById.set(n,{storeObject:l,mergeTree:ec(c)?void 0:c,fieldNodeSet:v}),g}return l},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?(0,P.k)(e)?e.map(function(e,o){var a=i.processFieldValue(e,t,n,es(r,o));return eu(r,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):!1!==globalThis.__DEV__?(0,j.X)(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=(0,h.qw)(t,e,n.fragmentMap));var i=new Map,o=this.cache.policies,s=new _.B(!1);return function e(c,u){var l=s.lookup(c,u.clientOnly,u.deferred);l.visited||(l.visited=!0,c.selections.forEach(function(s){if((0,g.LZ)(s,n.variables)){var c=u.clientOnly,l=u.deferred;if(!(c&&l)&&(0,P.O)(s.directives)&&s.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(c=!0),"defer"===t){var r=(0,h.NC)(e,n.variables);r&&!1===r.if||(l=!0)}}),(0,h.My)(s)){var f=i.get(s);f&&(c=c&&f.clientOnly,l=l&&f.deferred),i.set(s,ei(n,c,l))}else{var p=(0,k.hi)(s,n.lookupFragment);if(!p&&s.kind===d.hY.FRAGMENT_SPREAD)throw(0,a._K)(11,s.name.value);p&&o.fragmentMatches(p,r,t,n.variables)&&e(p.selectionSet,ei(n,c,l))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var s=this;if(e.map.size&&!(0,h.Yk)(n)){var c,u,l=!(0,P.k)(n)&&((0,h.Yk)(t)||(0,O.j)(t))?t:void 0,f=n;l&&!i&&(i=[(0,h.Yk)(l)?l.__ref:l]);var p=function(e,t){return(0,P.k)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=p(l,t),o=p(f,t);if(void 0!==o){i&&i.push(t);var c=s.applyMerges(e,n,o,r,i);c!==o&&(u=u||new Map).set(t,c),i&&(0,a.kG)(i.pop()===t)}}),u&&(n=(0,P.k)(f)?f.slice(0):(0,o.pi)({},f),u.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(c=r.store).getStorage.apply(c,i)):n},e}(),ea=[];function es(e,t){var n=e.map;return n.has(t)||n.set(t,ea.pop()||{map:new Map}),n.get(t)}function ec(e){return!e||!(e.info||e.map.size)}function eu(e,t){var n=e.map,r=n.get(t);r&&ec(r)&&(ea.push(r),n.delete(t))}var el=new Set,ef=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new f.A(p.Gw),n.assumeImmutableResults=!0,n.makeVar=V.QS,n.txCount=0,n.config=(0,O.jS)(t),n.addTypename=!!n.config.addTypename,n.policies=new ee({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,o.ZT)(t,e),t.prototype.init=function(){var e=this.data=new N.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new eo(this,this.storeReader=new K({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:(0,O.lg)(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=(0,s.re)(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(C(n)){var r=e.optimistic,i=e.id,o=e.variables;return n.makeCacheKey(e.query,e.callback,(0,M.B)({optimistic:r,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData;try{return this.storeReader.diffQueryAgainstStore((0,o.pi)((0,o.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:void 0!==t&&t})).result||null}catch(e){if(e instanceof l.y)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(O.RI.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,o.pi)((0,o.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,V._v)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,V.li)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){M.B.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,h.Yk)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&a.kG.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(O.RI.call(e,"id"))return!1;e=(0,o.pi)((0,o.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),M.B.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),(0,V.li)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,s=e.removeOptimistic,c=e.onWatchUpdated,u=function(e){var i=n.data,o=n.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=i,n.optimisticData=o}},l=new Set;return c&&!this.txCount&&this.broadcastWatches((0,o.pi)((0,o.pi)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&l.size?(this.broadcastWatches((0,o.pi)((0,o.pi)({},e),{onWatchUpdated:function(e,t){var n=c.call(this,e,t);return!1!==n&&l.delete(e),n}})),l.size&&l.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&(0,c.D)(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(u.R)},80900:function(e,t,n){n.d(t,{B:function(){return f},h:function(){return l}});var r,i,o=n(97582),a=n(75028),s=n(13154),c=n(30320),u=n(21436),l=function(){function e(){this.known=new(c.sy?WeakSet:Set),this.pool=new a.B(c.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,s.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,s.s)(e)){var t=(0,s.s)(e)?(0,u.k)(e)?e.slice(0):(0,o.pi)({__proto__:Object.getPrototypeOf(e)},e):e;return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,s.s)(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var r=e.map(this.admit,this),i=this.pool.lookupArray(r);return i.array||(this.known.add(i.array=r),!1!==globalThis.__DEV__&&Object.freeze(r)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),a=[o],c=this.sortedKeys(e);a.push(c.json);var u=a.length;c.sorted.forEach(function(n){a.push(t.admit(e[n]))});var i=this.pool.lookupArray(a);if(!i.object){var l=i.object=Object.create(o);this.known.add(l),c.sorted.forEach(function(e,t){l[e]=a[u+t]}),!1!==globalThis.__DEV__&&Object.freeze(l)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),f=Object.assign(function(e){if((0,s.s)(e)){void 0===r&&p();var t=r.admit(e),n=i.get(t);return void 0===n&&i.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)},{reset:p});function p(){r=new l,i=new(c.mr?WeakMap:Map)}},66438:function(e,t,n){n.d(t,{QS:function(){return u},_v:function(){return c},ab:function(){return i},li:function(){return s}});var r=n(33893),i=new(n(70093)).g7,o=new WeakMap;function a(e){var t=o.get(e);return t||o.set(e,t={vars:new Set,dep:(0,r.dP)()}),t}function s(e){a(e).vars.forEach(function(t){return t.forgetCache(e)})}function c(e){a(e).vars.forEach(function(t){return t.attachCache(e)})}function u(e){var t=new Set,n=new Set,r=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(e){a(e).dep.dirty(r),e.broadcastWatches&&e.broadcastWatches()});var c=Array.from(n);n.clear(),c.forEach(function(t){return t(e)})}}else{var u=i.getValue();u&&(o(u),a(u).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var o=r.attachCache=function(e){return t.add(e),a(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}},23221:function(e,t,n){n.d(t,{f:function(){return z}});var r=n(97582),i=n(16459),o=n(48702),a=n(47037),s=n(49379),c=n(72198),u=n(30020),l=n(37280),f=n(19065),p=n(76487),h=n(80900),d=n(30320),v=n(18056),y=n(48216);function m(e,t,n){return new y.y(function(r){var i=r.next,o=r.error,a=r.complete,s=0,c=!1,u={then:function(e){return new Promise(function(t){return t(e())})}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};u=u.then(n,n).then(function(e){--s,i&&i.call(r,e),c&&f.complete()},function(e){throw--s,e}).catch(function(e){o&&o.call(r,e)})}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){c=!0,!s&&a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}})}var b=n(21436);function g(e){var t=k(e);return(0,b.O)(t)}function k(e){var t=(0,b.O)(e.errors)?e.errors.slice(0):[];return(0,l.GG)(e)&&(0,b.O)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}var T=n(36765),E=n(51761),_=n(13154),O=n(60897),I=n(18263),S=n(86403);function w(e){return e&&"function"==typeof e.then}var N=function(e){function t(t){var n=e.call(this,function(e){return n.addObserver(e),function(){return n.removeObserver(e)}})||this;return n.observers=new Set,n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),(0,I.p)(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),(0,I.p)(n.observers,"error",e))},complete:function(){var e=n.sub,t=n.sources;if(null!==e){var r=(void 0===t?[]:t).shift();r?w(r)?r.then(function(e){return n.sub=e.subscribe(n.handlers)}):n.sub=r.subscribe(n.handlers):(e&&setTimeout(function(){return e.unsubscribe()}),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),(0,I.p)(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch(function(e){}),"function"==typeof t&&(t=[new y.y(t)]),w(t)?t.then(function(e){return n.start(e)},n.handlers.error):n.start(t),n}return(0,r.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach(function(n){return n(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(n,r){t||(t=!0,e(n,r))})},t}(y.y);(0,S.D)(N);var D=n(30990),x=n(14642),R=n(1644),A=n(12178),F=n(182),C=n(23361),P=n(66438),M=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,F.Ee)(t.resolvers,e)}):this.resolvers=(0,F.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,i,o,this.fragmentMatcher,s).then(function(e){return(0,r.pi)((0,r.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,f.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,p.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,r.pi)((0,r.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,r.pi)((0,r.pi)({},t),e.exportedVariables)})]:[2,(0,r.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,A.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return A.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,p.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,i,o,a){return void 0===n&&(n={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,r.mG)(this,void 0,void 0,function(){var s,c,u,l,f,p,h,d,v,y;return(0,r.Jh)(this,function(m){return s=(0,T.p$)(e),c=(0,T.kU)(e),u=(0,C.F)(c),l=this.collectSelectionsToResolve(s,u),p=(f=s.operation)?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=this,d=h.cache,v=h.client,y={fragmentMap:u,context:(0,r.pi)((0,r.pi)({},n),{cache:d,client:v}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,!1,t,y).then(function(e){return{result:e,exportedVariables:y.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,o){return(0,r.mG)(this,void 0,void 0,function(){var a,s,c,u,l,p=this;return(0,r.Jh)(this,function(h){return a=o.fragmentMap,s=o.context,c=o.variables,u=[n],l=function(e){return(0,r.mG)(p,void 0,void 0,function(){var l,p;return(0,r.Jh)(this,function(r){return(t||o.selectionsToResolve.has(e))&&(0,f.LZ)(e,c)?(0,E.My)(e)?[2,this.resolveField(e,t,n,o).then(function(t){var n;void 0!==t&&u.push(((n={})[(0,E.u2)(e)]=t,n))})]:((0,E.Ao)(e)?l=e:(l=a[e.name.value],(0,i.kG)(l,16,e.name.value)),l&&l.typeCondition&&(p=l.typeCondition.name.value,o.fragmentMatcher(n,p,s)))?[2,this.resolveSelectionSet(l.selectionSet,t,n,o).then(function(e){u.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(l)).then(function(){return(0,F.bw)(u)})]})})},e.prototype.resolveField=function(e,t,n,i){return(0,r.mG)(this,void 0,void 0,function(){var o,a,s,c,u,l,f,p,h,d=this;return(0,r.Jh)(this,function(r){return n?(o=i.variables,c=(a=e.name.value)!==(s=(0,E.u2)(e)),l=Promise.resolve(u=n[s]||n[a]),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(f=n.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(h=p[c?a:s])&&(l=Promise.resolve(P.ab.withValue(this.cache,h,[n,(0,E.NC)(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var r,o,a=null!==(o=null===(r=e.directives)||void 0===r?void 0:r.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(n)?d.resolveSubSelectedArray(e,t||a,n,i):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t||a,n,i):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;return function e(o){if(!r.has(o)){var a=new Set;r.set(o,a),(0,A.Vn)(o,{Directive:function(e,t,r,i,o){"client"===e.name.value&&o.forEach(function(e){n(e)&&(0,A.pO)(e)&&a.add(e)})},FragmentSpread:function(r,o,s,c,u){var l=t[r.name.value];(0,i.kG)(l,17,r.name.value);var f=e(l);f.size>0&&(u.forEach(function(e){n(e)&&(0,A.pO)(e)&&a.add(e)}),a.add(r),f.forEach(function(e){a.add(e)}))}})}return r.get(o)}(e)},e}(),L=new(d.mr?WeakMap:Map);function K(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return L.set(e,(L.get(e)+1)%1e15),n.apply(this,arguments)})}function j(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var q=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;L.has(n)||(L.set(n,0),K(n,"evict"),K(n,"modify"),K(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||R.Ie.loading;return this.variables&&this.networkStatus!==R.Ie.loading&&!(0,u.D)(this.variables,e.variables)&&(t=R.Ie.setVariables),(0,u.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){j(this),this.dirty=!1},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,u.D)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,u.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():(0,x.vj)(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;j(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,R.Oj)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var i=(0,r.pi)((0,r.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,u.D)(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===L.get(this.cache)&&(0,u.D)(t,n.variables)&&(0,u.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,o=new F.w0,a=(0,b.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,b.O)(e.incremental)){var s=(0,l.mT)(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var c=this.getDiff();e.data=o.merge(c.result,e.data)}this.graphQLErrors=a,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(V(e,n.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,n.variables))o.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:L.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var a=i.getDiffOptions(n.variables),s=o.diff(a);!i.stopped&&(0,u.D)(i.variables,n.variables)&&i.updateWatch(n.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=R.Ie.ready},e.prototype.markError=function(e){return this.networkStatus=R.Ie.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function V(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!g(e);return!r&&n&&e.data&&(r=!0),r}var Q=n(68470),B=Object.prototype.hasOwnProperty,U=function(){function e(e){var t=this,n=e.cache,r=e.link,i=e.defaultOptions,o=e.documentTransform,a=e.queryDeduplication,s=e.onBroadcast,c=e.ssrMode,u=e.clientAwareness,l=e.localState,f=e.assumeImmutableResults,p=void 0===f?!!n.assumeImmutableResults:f;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(d.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map;var h=new v.A(function(e){return t.cache.transformDocument(e)},{cache:!1});this.cache=n,this.link=r,this.defaultOptions=i||Object.create(null),this.queryDeduplication=void 0!==a&&a,this.clientAwareness=void 0===u?{}:u,this.localState=l||new M({cache:n}),this.ssrMode=void 0!==c&&c,this.assumeImmutableResults=p,this.documentTransform=o?h.concat(o).concat(h):h,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches((0,i._K)(23))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,o=e.mutation,a=e.variables,s=e.optimisticResponse,c=e.updateQueries,u=e.refetchQueries,l=void 0===u?[]:u,f=e.awaitRefetchQueries,p=void 0!==f&&f,h=e.update,d=e.onQueryUpdated,v=e.fetchPolicy,y=void 0===v?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":v,b=e.errorPolicy,T=void 0===b?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":b,E=e.keepRootFields,_=e.context;return(0,r.mG)(this,void 0,void 0,function(){var e,t,n,u;return(0,r.Jh)(this,function(f){switch(f.label){case 0:if((0,i.kG)(o,24),(0,i.kG)("network-only"===y||"no-cache"===y,25),e=this.generateMutationId(),o=this.cache.transformForLink(this.transform(o)),t=this.getDocumentInfo(o).hasClientExports,a=this.getVariables(o,a),!t)return[3,2];return[4,this.localState.addExportedVariables(o,a,_)];case 1:a=f.sent(),f.label=2;case 2:return n=this.mutationStore&&(this.mutationStore[e]={mutation:o,variables:a,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:o,variables:a,fetchPolicy:y,errorPolicy:T,context:_,updateQueries:c,update:h,keepRootFields:E}),this.broadcastQueries(),u=this,[2,new Promise(function(t,i){return m(u.getObservableFromLink(o,(0,r.pi)((0,r.pi)({},_),{optimisticResponse:s}),a,!1),function(t){if(g(t)&&"none"===T)throw new D.cA({graphQLErrors:k(t)});n&&(n.loading=!1,n.error=null);var i=(0,r.pi)({},t);return"function"==typeof l&&(l=l(i)),"ignore"===T&&g(i)&&delete i.errors,u.markMutationResult({mutationId:e,result:i,document:o,variables:a,fetchPolicy:y,errorPolicy:T,context:_,update:h,updateQueries:c,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:d,keepRootFields:E})}).subscribe({next:function(e){u.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){n&&(n.loading=!1,n.error=t),s&&u.cache.removeOptimistic(e),u.broadcastQueries(),i(t instanceof D.cA?t:new D.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var i=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&V(i,e.errorPolicy)){if((0,l.GG)(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,l.GG)(i)&&(0,b.O)(i.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=(0,l.mT)(s.result,i)),void 0!==c&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,r){var a=e.observableQuery,s=a&&a.queryName;if(s&&B.call(u,s)){var c=u[s],l=n.queries.get(r),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var v=c(d,{mutationResult:i,queryName:f&&(0,T.rY)(f)||void 0,queryVariables:p});v&&o.push({result:v,dataId:"ROOT_QUERY",query:f,variables:p})}}})}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var f=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach(function(e){return t.write(e)});var s=e.update,c=!(0,l.M0)(i)||(0,l.GG)(i)&&!i.hasNext;if(s){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(i=(0,r.pi)((0,r.pi)({},i),{data:u.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&s(t,i,{context:e.context,variables:e.variables})}a||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return f.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(f).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var n=this,o="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,r.pi)((0,r.pi)({},t),{result:{data:o}}),e)}catch(e){!1!==globalThis.__DEV__&&i.kG.error(e)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:(0,f.mj)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,f.FS)(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,p.bi)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:(0,T.O4)((0,T.$H)(e)),asQuery:(0,r.pi)((0,r.pi)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,r.pi)((0,r.pi)({},e),{operation:"query"}):e})})};t.set(e,n)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,r.pi)((0,r.pi)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,r.pi)((0,r.pi)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=new q(this),i=new x.ue({queryManager:this,queryInfo:n,options:e});return i.lastQuery=t,this.queries.set(i.queryId,n),n.init({document:t,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),(0,i.kG)(e.query,26),(0,i.kG)("Document"===e.query.kind,27),(0,i.kG)(!e.returnPartialData,28),(0,i.kG)(!e.pollInterval,29),this.fetchQuery(t,(0,r.pi)((0,r.pi)({},e),{query:this.transform(e.query)})).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,i._K)(30)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=R.Ie.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,o=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?o.set(e,!1):(0,E.JW)(e)?o.set(t.transform(e),!1):(0,_.s)(e)&&e.query&&a.add(e)}),this.queries.forEach(function(t,r){var i=t.observableQuery,a=t.document;if(i){if("all"===e){n.set(r,i);return}var s=i.queryName;if("standby"===i.options.fetchPolicy||"active"===e&&!i.hasObservers())return;("active"===e||s&&o.has(s)||a&&o.has(a))&&(n.set(r,i),s&&o.set(s,!0),a&&o.set(a,!0))}}),a.size&&a.forEach(function(e){var o=(0,O.X)("legacyOneTimeQuery"),a=t.getQuery(o).init({document:e.query,variables:e.variables}),s=new x.ue({queryManager:t,queryInfo:a,options:(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"network-only"})});(0,i.kG)(s.queryId===o),a.setObservableQuery(s),n.set(o,s)}),!1!==globalThis.__DEV__&&o.size&&o.forEach(function(e,t){e||!1===globalThis.__DEV__||i.kG.warn("string"==typeof t?31:32,t)}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=void 0===i?"none":i,a=e.variables,s=e.context,c=void 0===s?{}:s;n=this.transform(n),a=this.getVariables(n,a);var u=function(e){return t.getObservableFromLink(n,c,e).map(function(i){"no-cache"!==r&&(V(i,o)&&t.cache.write({query:n,result:i.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var a=g(i),s=(0,D.ls)(i);if(a||s){var c={};if(a&&(c.graphQLErrors=i.errors),s&&(c.protocolErrors=i.extensions[D.YG]),"none"===o||s)throw new D.cA(c)}return"ignore"===o&&delete i.errors,i})};if(this.getDocumentInfo(n).hasClientExports){var l=this.localState.addExportedVariables(n,a,c).then(u);return new y.y(function(e){var t=null;return l.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,i){var o,s,c=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.getDocumentInfo(e),l=u.serverQuery,f=u.clientQuery;if(l){var p=this.inFlightLinkObservables,d=this.link,v={query:l,variables:n,operationName:(0,T.rY)(l)||void 0,context:this.prepareContext((0,r.pi)((0,r.pi)({},t),{forceFetch:!i}))};if(t=v.context,i){var b=(0,Q.S)(l),g=p.get(b)||new Map;p.set(b,g);var k=(0,h.B)(n);if(!(s=g.get(k))){var E=new N([(0,a.h)(d,v)]);g.set(k,s=E),E.beforeNext(function(){g.delete(k)&&g.size<1&&p.delete(b)})}}else s=new N([(0,a.h)(d,v)])}else s=new N([y.y.of({data:{}})]),t=this.prepareContext(t);return f&&(s=m(s,function(e){return c.localState.runResolvers({document:f,remoteResult:e,context:t,variables:n})})),s},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(n.query);return m(this.getObservableFromLink(i,n.context,n.variables),function(o){var a=k(o),s=a.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new D.cA({graphQLErrors:a}));e.markResult(o,i,n,t),e.markReady()}var c={data:o.data,loading:!1,networkStatus:R.Ie.ready};return s&&"ignore"!==n.errorPolicy&&(c.errors=a,c.networkStatus=R.Ie.error),c},function(t){var n=(0,D.MS)(t)?t:new D.cA({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchConcastWithInfo=function(e,t,n){var r,i,o=this;void 0===n&&(n=R.Ie.loading);var a=t.query,s=this.getVariables(a,t.variables),c=this.getQuery(e),u=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=void 0===l?u&&u.fetchPolicy||"cache-first":l,p=t.errorPolicy,h=void 0===p?u&&u.errorPolicy||"none":p,d=t.returnPartialData,v=t.notifyOnNetworkStatusChange,y=t.context,m=Object.assign({},t,{query:a,variables:s,fetchPolicy:f,errorPolicy:h,returnPartialData:void 0!==d&&d,notifyOnNetworkStatusChange:void 0!==v&&v,context:void 0===y?{}:y}),b=function(e){m.variables=e;var r=o.fetchQueryByPolicy(c,m,n);return"standby"!==m.fetchPolicy&&r.sources.length>0&&c.observableQuery&&c.observableQuery.applyNextFetchPolicy("after-fetch",t),r},g=function(){return o.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){g(),setTimeout(function(){return r.cancel(e)})}),this.getDocumentInfo(m.query).hasClientExports)r=new N(this.localState.addExportedVariables(m.query,m.variables,m.context).then(b).then(function(e){return e.sources})),i=!0;else{var k=b(m.variables);i=k.fromLink,r=new N(k.sources)}return r.promise.then(g,g),{concast:r,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?(0,O.X)("refetchQueries"):void 0:a,c=e.onQueryUpdated,u=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){u.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof q&&e.watcher.observableQuery;if(r){if(c){u.delete(r.queryId);var i=c(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==c&&u.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),u.size&&u.forEach(function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(c){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=c(i,a,o)}c&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,c=t.refetchWritePolicy,l=t.errorPolicy,f=t.returnPartialData,p=t.context,h=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:o,variables:a,networkStatus:n});var v=function(){return e.getDiff()},m=function(t,n){void 0===n&&(n=e.networkStatus||R.Ie.loading);var s=t.result;!1===globalThis.__DEV__||f||(0,u.D)(s,{})||(0,x.DC)(t.missing);var c=function(e){return y.y.of((0,r.pi)({data:e,loading:(0,R.Oj)(n),networkStatus:n},t.complete?null:{partial:!0}))};return s&&i.getDocumentInfo(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:p,variables:a,onlyRunForcedResolvers:!0}).then(function(e){return c(e.data||void 0)}):"none"===l&&n===R.Ie.refetch&&Array.isArray(t.missing)?c(void 0):c(s)},b="no-cache"===s?0:n===R.Ie.refetch&&"merge"!==c?1:2,g=function(){return i.getResultsFromLink(e,b,{query:o,variables:a,context:p,fetchPolicy:s,errorPolicy:l})},k=h&&"number"==typeof d&&d!==n&&(0,R.Oj)(n);switch(s){default:case"cache-first":var T=v();if(T.complete)return{fromLink:!1,sources:[m(T,e.markReady())]};if(f||k)return{fromLink:!0,sources:[m(T),g()]};return{fromLink:!0,sources:[g()]};case"cache-and-network":var T=v();if(T.complete||f||k)return{fromLink:!0,sources:[m(T),g()]};return{fromLink:!0,sources:[g()]};case"cache-only":return{fromLink:!1,sources:[m(v(),e.markReady())]};case"network-only":if(k)return{fromLink:!0,sources:[m(v()),g()]};return{fromLink:!0,sources:[g()]};case"no-cache":if(k)return{fromLink:!0,sources:[m(e.getDiff()),g()]};return{fromLink:!0,sources:[g()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new q(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,r.pi)((0,r.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),G=n(14012),Y=!1,z=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,i._K)(13);var n=e.uri,r=e.credentials,a=e.headers,u=e.cache,l=e.documentTransform,f=e.ssrMode,p=void 0!==f&&f,h=e.ssrForceFetchDelay,d=void 0===h?0:h,v=e.connectToDevTools,y=void 0===v?"object"==typeof window&&!window.__APOLLO_CLIENT__&&!1!==globalThis.__DEV__:v,m=e.queryDeduplication,b=void 0===m||m,g=e.defaultOptions,k=e.assumeImmutableResults,T=void 0===k?u.assumeImmutableResults:k,E=e.resolvers,_=e.typeDefs,O=e.fragmentMatcher,I=e.name,S=e.version,w=e.link;w||(w=n?new c.u({uri:n,credentials:r,headers:a}):o.i.empty()),this.link=w,this.cache=u,this.disableNetworkFetches=p||d>0,this.queryDeduplication=b,this.defaultOptions=g||Object.create(null),this.typeDefs=_,d&&setTimeout(function(){return t.disableNetworkFetches=!1},d),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=s.i,this.localState=new M({cache:u,client:this,resolvers:E,fragmentMatcher:O}),this.queryManager=new U({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,documentTransform:l,queryDeduplication:b,ssrMode:p,clientAwareness:{name:I,version:S},localState:this.localState,assumeImmutableResults:T,onBroadcast:y?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),y&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("object"==typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}Y||!1===globalThis.__DEV__||(Y=!0,setTimeout(function(){if("undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,n=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?n="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(n="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),n&&!1!==globalThis.__DEV__&&i.kG.log("Download the Apollo DevTools for a better development experience: %s",n)}},1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,G.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,G.J)(this.defaultOptions.query,e)),(0,i.kG)("cache-and-network"!==e.fetchPolicy,14),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,G.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,a.h)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var o=Promise.all(r);return o.queries=n,o.results=r,o.catch(function(e){!1!==globalThis.__DEV__&&i.kG.debug(15,e)}),o},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},14642:function(e,t,n){n.d(t,{ue:function(){return k},DC:function(){return _},vj:function(){return T}});var r=n(97582),i=n(16459),o=n(30020),a=n(1644),s=n(36765),c=n(53712),u=n(79487),l=n(18263),f=n(48216),p=n(86403),h=n(23361),d=n(19065),v=n(51761);function y(e){return!!e.directives&&e.directives.some(m)}function m(e){return"nonreactive"===e.name.value}var b=Object.assign,g=Object.hasOwnProperty,k=function(e){function t(t){var n=t.queryManager,i=t.queryInfo,o=t.options,a=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=E)}catch(e){}var n=!a.observers.size;a.observers.add(e);var r=a.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&a.reobserve().catch(function(){}),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=O(o.fetchPolicy),a.isTornDown=!1;var c=n.defaultOptions.watchQuery,u=(void 0===c?{}:c).fetchPolicy,l=void 0===u?"cache-first":u,f=o.fetchPolicy,p=void 0===f?l:f,h=o.initialFetchPolicy,d=void 0===h?"standby"===p?l:p:h;a.options=(0,r.pi)((0,r.pi)({},o),{initialFetchPolicy:d,fetchPolicy:p}),a.queryId=i.queryId||n.generateQueryId();var v=(0,s.$H)(a.query);return a.queryName=v&&v.name&&v.name.value,a}return(0,r.ZT)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:n},i=e.subscribe(r)})},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||a.Ie.ready,i=(0,r.pi)((0,r.pi)({},t),{loading:(0,a.Oj)(n),networkStatus:n}),s=this.options.fetchPolicy,c=void 0===s?"cache-first":s;if(O(c)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var u=this.queryInfo.getDiff();(u.complete||this.options.returnPartialData)&&(i.data=u.result),(0,o.D)(i.data,{})&&(i.data=void 0),u.complete?(delete i.partial,u.complete&&i.networkStatus===a.Ie.loading&&("cache-first"===c||"cache-only"===c)&&(i.networkStatus=a.Ie.ready,i.loading=!1)):i.partial=!0,!1===globalThis.__DEV__||u.complete||this.options.partialRefetch||i.loading||i.data||i.error||_(u.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){var n,i,a,c,u,l,f;return!this.last||(this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?(n=this.query,i=this.last.result,a=this.variables,c=i.data,u=(0,r._T)(i,["data"]),l=e.data,f=(0,r._T)(e,["data"]),!((0,o.Z)(u,f)&&function e(t,n,r,i){if(n===r)return!0;var a=new Set;return t.selections.every(function(t){if(a.has(t)||(a.add(t),!(0,d.LZ)(t,i.variables)||y(t)))return!0;if((0,v.My)(t)){var s=(0,v.u2)(t),c=n&&n[s],u=r&&r[s],l=t.selectionSet;if(!l)return(0,o.Z)(c,u);var f=Array.isArray(c),p=Array.isArray(u);if(f!==p)return!1;if(f&&p){var m=c.length;if(u.length!==m)return!1;for(var b=0;b0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(f.y);function T(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function E(e){!1!==globalThis.__DEV__&&i.kG.error(21,e.message,e.stack)}function _(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&i.kG.debug(22,e)}function O(e){return"network-only"===e||"no-cache"===e||"standby"===e}(0,p.D)(k)},48702:function(e,t,n){n.d(t,{i:function(){return l}});var r=n(16459),i=n(48216),o=n(97582),a=n(36765);function s(e,t){return t?t(e):i.y.of()}function c(e){return"function"==typeof e?new l(e):e}function u(e){return e.request.length<=1}var l=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return i.y.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(c).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var o=c(n),a=c(r||new e(s));return new e(u(o)&&u(a)?function(e){return t(e)?o.request(e)||i.y.of():a.request(e)||i.y.of()}:function(e,n){return t(e)?o.request(e,n)||i.y.of():a.request(e,n)||i.y.of()})},e.execute=function(e,t){var n,s,c,u;return e.request((c=t.context,(s={variables:(n=function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,i=Object.keys(e);nt.indexOf(o))throw(0,r._K)(41,o)}return e}(t)).variables||{},extensions:n.extensions||{},operationName:n.operationName,query:n.query}).operationName||(s.operationName="string"!=typeof s.query?(0,a.rY)(s.query)||void 0:""),u=(0,o.pi)({},c),Object.defineProperty(s,"setContext",{enumerable:!1,value:function(e){u="function"==typeof e?(0,o.pi)((0,o.pi)({},u),e(u)):(0,o.pi)((0,o.pi)({},u),e)}}),Object.defineProperty(s,"getContext",{enumerable:!1,value:function(){return(0,o.pi)({},u)}}),s))||i.y.of()},e.concat=function(t,n){var o=c(t);if(u(o))return!1!==globalThis.__DEV__&&r.kG.warn(33,o),o;var a=c(n);return new e(u(a)?function(e){return o.request(e,function(e){return a.request(e)||i.y.of()})||i.y.of()}:function(e,t){return o.request(e,function(e){return a.request(e,t)||i.y.of()})||i.y.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(s)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,r._K)(34)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},47037:function(e,t,n){n.d(t,{h:function(){return r}});var r=n(48702).i.execute},77243:function(e,t,n){n.d(t,{D:function(){return r}});var r=n(48702).i.from},72198:function(e,t,n){n.d(t,{u:function(){return a}});var r=n(97582),i=n(48702),o=n(71050),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,(0,o.L)(t).request)||this;return n.options=t,n}return(0,r.ZT)(t,e),t}(i.i)},23178:function(e,t,n){n.d(t,{U:function(){return i}});var r=n(16459),i=function(e){if(!e&&"undefined"==typeof fetch)throw(0,r._K)(35)}},71050:function(e,t,n){n.d(t,{L:function(){return g}});var r=n(97582),i=n(16459),o=n(48702),a=n(19065),s=n(48216),c=n(15049),u=n(11037),l=n(81999),f=n(23178),p=n(3453),h=n(88663),d=n(16261),v=n(12178),y=n(76487),m=n(36765),b=(0,i.wY)(function(){return fetch}),g=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,g=e.fetch,k=e.print,T=void 0===k?p.sb:k,E=e.includeExtensions,_=e.preserveHeaderCase,O=e.useGETForQueries,I=e.includeUnusedVariables,S=void 0!==I&&I,w=(0,r._T)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);!1!==globalThis.__DEV__&&(0,f.U)(g||b);var N={http:{includeExtensions:E,preserveHeaderCase:_},options:w.fetchOptions,credentials:w.credentials,headers:w.headers};return new o.i(function(e){var t,o,f,k,E,_,I=(0,u.r)(e,n),w=e.getContext(),D={};if(w.clientAwareness){var x=w.clientAwareness,R=x.name,A=x.version;R&&(D["apollographql-client-name"]=R),A&&(D["apollographql-client-version"]=A)}var F=(0,r.pi)((0,r.pi)({},D),w.headers),C={http:w.http,options:w.fetchOptions,credentials:w.credentials,headers:F};if((0,a.FS)(["client"],e.query)){var P=(0,y.ob)(e.query);if(!P)return(0,d.Q)(Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));e.query=P}var M=(0,p.ve)(e,T,p.SC,N,C),L=M.options,K=M.body;K.variables&&!S&&(K.variables=(t=K.variables,o=e.query,f=(0,r.pi)({},t),k=new Set(Object.keys(t)),(0,v.Vn)(o,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&k.delete(e.name.value)}}),k.forEach(function(e){delete f[e]}),f)),L.signal||"undefined"==typeof AbortController||(_=new AbortController,L.signal=_.signal);var j="OperationDefinition"===(E=(0,m.p$)(e.query)).kind&&"subscription"===E.operation,q=(0,a.FS)(["defer"],e.query);if(O&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(L.method="GET"),q||j){L.headers=L.headers||{};var V="multipart/mixed;";j&&q&&!1!==globalThis.__DEV__&&i.kG.warn(36),j?V+="boundary=graphql;subscriptionSpec=1.0,applicationhttps://www.cbtnuggets.com/json":q&&(V+="deferSpec=20220824,applicationhttps://www.cbtnuggets.com/json"),L.headers.accept=V}if("GET"===L.method){var Q=(0,h.H)(I,K),B=Q.newURI,U=Q.parseError;if(U)return(0,d.Q)(U);I=B}else try{L.body=(0,c.g)(K,"Payload")}catch(e){return(0,d.Q)(e)}return new s.y(function(t){var n=g||(0,i.wY)(function(){return fetch})||b,r=t.next.bind(t);return n(I,L).then(function(t){e.setContext({response:t});var n,i=null===(n=t.headers)||void 0===n?void 0:n.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?(0,l.TF)(t,r):(0,l.dO)(e)(t).then(r)}).then(function(){_=void 0,t.complete()}).catch(function(e){_=void 0,(0,l.S3)(e,t)}),function(){_&&_.abort()}})})}},81999:function(e,t,n){n.d(t,{S3:function(){return p},dO:function(){return h},TF:function(){return l}});var r=n(97582),i=n(30320);function o(e){var t={next:function(){return e.read()}};return i.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}var a=n(12782),s=n(30990),c=n(37280),u=Object.prototype.hasOwnProperty;function l(e,t){var n;return(0,r.mG)(this,void 0,void 0,function(){var a,u,l,p,h,d,v,y,m,b,g,k,T,E,_,O,I,S,w,N,D,x;return(0,r.Jh)(this,function(R){switch(R.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");a=new TextDecoder("utf-8"),u=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),l="boundary=",p=(null==u?void 0:u.includes(l))?null==u?void 0:u.substring((null==u?void 0:u.indexOf(l))+l.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",h="\r\n--".concat(p),d="",v=function(e){var t,n,r,a,s,c,u=e;if(e.body&&(u=e.body),t=u,i.DN&&t[Symbol.asyncIterator])return r=u[Symbol.asyncIterator](),(n={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},n;if(u.getReader)return o(u.getReader());if(u.stream)return o(u.stream().getReader());if(u.arrayBuffer)return a=u.arrayBuffer(),s=!1,c={next:function(){return s?Promise.resolve({value:void 0,done:!0}):(s=!0,new Promise(function(e,t){a.then(function(t){e({value:t,done:!1})}).catch(t)}))}},i.DN&&(c[Symbol.asyncIterator]=function(){return this}),c;if(u.pipe)return function(e){var t=null,n=null,r=!1,o=[],a=[];function s(e){if(!n){if(a.length){var t=a.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}o.push(e)}}function c(e){n=e,a.slice().forEach(function(t){t[1](e)}),t&&t()}function u(){r=!0,a.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",c),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",c),e.on("end",u),e.on("finish",u),e.on("close",u);var l={next:function(){return new Promise(function(e,t){return n?t(n):o.length?e({value:o.shift(),done:!1}):r?e({value:void 0,done:!0}):void a.push([e,t])})}};return i.DN&&(l[Symbol.asyncIterator]=function(){return this}),l}(u);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}(e),y=!0,R.label=1;case 1:if(!y)return[3,3];return[4,v.next()];case 2:for(b=(m=R.sent()).value,g=m.done,k="string"==typeof b?b:a.decode(b),T=d.length-h.length+1,y=!g,d+=k,E=d.indexOf(h,T);E>-1;){if(_=void 0,_=(D=[d.slice(0,E),d.slice(E+h.length)])[0],d=D[1],O=_.indexOf("\r\n\r\n"),(I=function(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}(_.slice(0,O))["content-type"])&&-1===I.toLowerCase().indexOf("applicationhttps://www.cbtnuggets.com/json"))throw Error("Unsupported patch content type: applicationhttps://www.cbtnuggets.com/json is required.");if(S=_.slice(O)){if(Object.keys(w=f(e,S)).length>1||"data"in w||"incremental"in w||"errors"in w||"payload"in w)(0,c.yU)(w)?(N={},"payload"in w&&(N=(0,r.pi)({},w.payload)),"errors"in w&&(N=(0,r.pi)((0,r.pi)({},N),{extensions:(0,r.pi)((0,r.pi)({},"extensions"in N?N.extensions:null),((x={})[s.YG]=w.errors,x))})),t(N)):t(w);else if(1===Object.keys(w).length&&"hasNext"in w&&!w.hasNext)return[2]}E=d.indexOf(h)}return[3,1];case 3:return[2]}})})}function f(e,t){e.status>=300&&(0,a.P)(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function p(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function h(e){return function(t){return t.text().then(function(e){return f(t,e)}).then(function(n){return t.status>=300&&(0,a.P)(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||u.call(n,"data")||u.call(n,"errors")||(0,a.P)(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n})}}},88663:function(e,t,n){n.d(t,{H:function(){return i}});var r=n(15049);function i(e,t){var n=[],i=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&i("query",t.query),t.operationName&&i("operationName",t.operationName),t.variables){var o=void 0;try{o=(0,r.g)(t.variables,"Variables map")}catch(e){return{parseError:e}}i("variables",o)}if(t.extensions){var a=void 0;try{a=(0,r.g)(t.extensions,"Extensions map")}catch(e){return{parseError:e}}i("extensions",a)}var s="",c=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),c=e.substr(0,u));var l=-1===c.indexOf("?")?"?":"&";return{newURI:c+l+n.join("&")+s}}},3453:function(e,t,n){n.d(t,{E4:function(){return s},SC:function(){return o},sb:function(){return a},ve:function(){return c}});var r=n(97582),i=n(68470),o={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"applicationhttps://www.cbtnuggets.com/json"},options:{method:"POST"}},a=function(e,t){return t(e)};function s(e,t){for(var n=[],i=2;i=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}n=r.merge(n,t)}),n}},182:function(e,t,n){n.d(t,{Ee:function(){return a},bw:function(){return s},w0:function(){return u}});var r=n(97582),i=n(13154),o=Object.prototype.hasOwnProperty;function a(){for(var e=[],t=0;t1)for(var r=new u,i=1;i0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(h(i),")")}var o=e;if(t){var a=h(t);o+="(".concat(a,")")}return n&&Object.keys(n).forEach(function(e){-1===f.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@".concat(e,"(").concat(h(n[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=h;return h=e,t}}),h=function(e){return JSON.stringify(e,d)};function d(e,t){return(0,i.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function v(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){return u(n,e.name,e.value,t)}),n}return null}function y(e){return e.alias?e.alias.value:e.name.value}function m(e){return"Field"===e.kind}function b(e){return"InlineFragment"===e.kind}},76487:function(e,t,n){n.d(t,{Gw:function(){return h},aL:function(){return d},bi:function(){return p},ob:function(){return v}});var r=n(97582),i=n(16459),o=n(12178),a=n(36765),s=n(51761),c=n(23361),u=n(21436),l={kind:o.hY.FIELD,name:{kind:o.hY.NAME,value:"__typename"}};function f(e){var t=new Map;return function(n){void 0===n&&(n=e);var r=t.get(n);return r||t.set(n,r={variables:new Set,fragmentSpreads:new Set}),r}}function p(e,t){(0,a.A$)(t);for(var n,s,l,p=f(""),h=f(""),d=function(e){for(var t=0,n=void 0;t=0;--y)t.definitions[y].kind===o.hY.OPERATION_DEFINITION&&++v;var m=(n=new Map,s=new Map,e.forEach(function(e){e&&(e.name?n.set(e.name,e):e.test&&s.set(e.test,e))}),function(e){var t=n.get(e.name.value);return!t&&s.size&&s.forEach(function(n,r){r(e)&&(t=n)}),t}),b=function(e){return(0,u.O)(e)&&e.map(m).some(function(e){return e&&e.remove})},g=new Map,k=!1,T={enter:function(e){if(b(e.directives))return k=!0,null}},E=(0,o.Vn)(t,{Field:T,InlineFragment:T,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,i){var o=d(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,i){if(b(e.directives))return k=!0,null;var o=d(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){g.set(JSON.stringify(r),e)},leave:function(e,t,n,r){return e===g.get(JSON.stringify(r))?e:v>0&&e.selectionSet.selections.every(function(e){return e.kind===o.hY.FIELD&&"__typename"===e.name.value})?(h(e.name.value).removed=!0,k=!0,null):void 0}},Directive:{leave:function(e){if(m(e))return k=!0,null}}});if(!k)return t;var _=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){_(h(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},O=new Set;E.definitions.forEach(function(e){e.kind===o.hY.OPERATION_DEFINITION?_(p(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){O.add(e)}):e.kind!==o.hY.FRAGMENT_DEFINITION||0!==v||h(e.name.value).removed||O.add(e.name.value)}),O.forEach(function(e){_(h(e)).fragmentSpreads.forEach(function(e){O.add(e)})});var I={enter:function(e){var t;if(t=e.name.value,!O.has(t)||h(t).removed)return null}};return l=(0,o.Vn)(E,{FragmentSpread:I,FragmentDefinition:I,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=_(p(e.name&&e.name.value)).transitiveVars;if(t.sizeglobalThis)||a(()=>global)||Object.create(null),u=c[s]||Array[s]||function(e){try{Object.defineProperty(c,s,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",o++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=r;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===i)break;return e!==r&&(r.slots[this.id]=t),!0}return r&&(r.slots[this.id]=i),!1}getValue(){if(this.hasValue())return r.slots[this.id]}withValue(e,t,n,i){let o={__proto__:null,[this.id]:e},a=r;r={parent:a,slots:o};try{return t.apply(i,n)}finally{r=a}}static bind(e){let t=r;return function(){let n=r;try{return r=t,e.apply(this,arguments)}finally{r=n}}}static noContext(e,t,n){if(!r)return e.apply(n,t);{let i=r;try{return r=null,e.apply(n,t)}finally{r=i}}}}),{bind:l,noContext:f}=u},75028:function(e,t,n){n.d(t,{B:function(){return s}});let r=()=>Object.create(null),{forEach:i,slice:o}=Array.prototype,{hasOwnProperty:a}=Object.prototype;class s{constructor(e=!0,t=r){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return i.call(e,e=>t=t.getChildTrie(e)),a.call(t,"data")?t.data:t.data=this.makeData(o.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&nthis.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}let s=new(n(70093)).g7,{hasOwnProperty:c}=Object.prototype,u=Array.from||function(e){let t=[];return e.forEach(e=>t.push(e)),t};function l(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let f=[];function p(e,t){if(!e)throw Error(t||"assertion failure")}function h(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}class d{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++d.count}peek(){if(1===this.value.length&&!m(this))return v(this),this.value[0]}recompute(e){var t;return p(!this.recomputing,"already recomputing"),v(this),m(this)&&(E(this),s.withValue(this,y,[this,e]),function(e,t){if("function"==typeof e.subscribe)try{l(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(this,e)&&(this.dirty=!1,m(this)||(t=this,b(t,k)))),h(this.value)}setDirty(){this.dirty||(this.dirty=!0,this.value.length=0,b(this,g),l(this))}dispose(){this.setDirty(),E(this),b(this,(e,t)=>{e.setDirty(),_(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=f.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(u(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),f.push(this.deps),this.deps=null)}}function v(e){let t=s.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),m(e)?g(t,e):k(t,e),t}function y(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function m(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function b(e,t){let n=e.parents.size;if(n){let r=u(e.parents);for(let i=0;i0&&n===t.length&&e[n-1]===t[n-1]}(n,t.value)&&e.setDirty(),T(e,t),m(e)||b(e,k)}function T(e,t){let n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(f.length<100&&f.push(n),e.dirtyChildren=null))}function E(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{_(e,n)}),e.forgetDeps(),p(null===e.dirtyChildren)}function _(e,t){t.parents.delete(e),e.childValues.delete(t),T(e,t)}d.count=0;let O={setDirty:!0,dispose:!0,forget:!0};function I(e){let t=new Map,n=e&&e.subscribe;function r(e){let r=s.getValue();if(r){let i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(l(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){let r=t.get(e);if(r){let i=n&&c.call(O,n)?n:"setDirty";u(r).forEach(e=>e[i]()),t.delete(e),l(r)}},r}function S(...e){return(r||(r=new i.B("function"==typeof WeakMap))).lookupArray(e)}let w=new Set;function N(e,{max:t=65536,makeCacheKey:n=S,keyArgs:r,subscribe:i}=Object.create(null)){let o=new a(t,e=>e.dispose()),c=function(){let t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=o.get(t);a||(o.set(t,a=new d(e)),a.subscribe=i,a.forget=()=>o.delete(t));let c=a.recompute(Array.prototype.slice.call(arguments));return o.set(t,a),w.add(o),s.hasValue()||(w.forEach(e=>e.clean()),w.clear()),c};function u(e){let t=o.get(e);t&&t.setDirty()}function l(e){let t=o.get(e);if(t)return t.peek()}function f(e){return o.delete(e)}return Object.defineProperty(c,"size",{get:()=>o.map.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,makeCacheKey:n,keyArgs:r,subscribe:i}),c.dirtyKey=u,c.dirty=function(){u(n.apply(null,arguments))},c.peekKey=l,c.peek=function(){return l(n.apply(null,arguments))},c.forgetKey=f,c.forget=function(){return f(n.apply(null,arguments))},c.makeCacheKey=n,c.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(c)}},48216:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1,i=!1,o=arguments[1],a=o;return new n(function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[l]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var i=p(t,l);if(i){var o=i.call(t);if(Object(o)!==o)throw TypeError(o+" is not an object");return o instanceof E&&o.constructor===n?o:new n(function(e){return o.subscribe(e)})}if(s("iterator")&&(i=p(t,u)))return new n(function(e){v(function(){if(!e.closed){for(var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(e))){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i.call(t));!(n=o()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){v(function(){if(!e.closed){for(var n=0;n