Browse Source

Make admin graphs cumulative (#1298)

* Make admin graphs cumulative

* Format code with black

* Add cumulative data tests
Rafał Pitoń 5 years ago
parent
commit
58ebe88a27

+ 21 - 12
misago/admin/src/analytics.js

@@ -26,27 +26,29 @@ const getAnalytics = gql`
   query getAnalytics($span: Int!) {
     analytics(span: $span) {
       users {
-        current
-        previous
+        ...data
       }
       threads {
-        current
-        previous
+        ...data
       }
       posts {
-        current
-        previous
+        ...data
       }
       attachments {
-        current
-        previous
+        ...data
       }
       dataDownloads {
-        current
-        previous
+        ...data
       }
     }
   }
+
+  fragment data on AnalyticsData {
+    current
+    currentCumulative
+    previous
+    previousCumulative
+  }
 `
 
 class Analytics extends React.Component {
@@ -152,6 +154,7 @@ const Error = ({ message }) => (
 
 const CURRENT = "C"
 const PREVIOUS = "P"
+const CURRENT_SERIES = 0
 
 const AnalyticsItem = ({ data, legend, name, span }) => {
   const options = {
@@ -188,6 +191,12 @@ const AnalyticsItem = ({ data, legend, name, span }) => {
             now.subtract(span - dataPointIndex - 1, "days")
             return now.format("ll")
           }
+        },
+        formatter: function(value, { dataPointIndex, seriesIndex }) {
+          if (seriesIndex === CURRENT_SERIES) {
+            return data.current[dataPointIndex]
+          }
+          return data.previous[dataPointIndex]
         }
       }
     },
@@ -214,8 +223,8 @@ const AnalyticsItem = ({ data, legend, name, span }) => {
   }
 
   const series = [
-    { name: CURRENT, data: data.current },
-    { name: PREVIOUS, data: data.previous }
+    { name: CURRENT, data: data.currentCumulative },
+    { name: PREVIOUS, data: data.previousCumulative }
   ]
 
   return (

+ 17 - 2
misago/graphql/admin/analytics.py

@@ -76,7 +76,22 @@ class Analytics:
                 data[date] += 1
 
         values = list(data.values())
+        current = list(reversed(values[: self.span]))
+        previous = list(reversed(values[self.span :]))
+
         return {
-            "current": list(reversed(values[: self.span])),
-            "previous": list(reversed(values[self.span :])),
+            "current": current,
+            "currentCumulative": cumulate_data(current),
+            "previous": previous,
+            "previousCumulative": cumulate_data(previous),
         }
+
+
+def cumulate_data(data_series):
+    data = []
+    for v in data_series:
+        if not data:
+            data.append(v)
+        else:
+            data.append(data[-1] + v)
+    return data

+ 2 - 0
misago/graphql/admin/schema.graphql

@@ -19,7 +19,9 @@ type Analytics {
 
 type AnalyticsData {
     current: [Int!]!
+    currentCumulative: [Int!]!
     previous: [Int!]!
+    previousCumulative: [Int!]!
 }
 
 type Version {

+ 23 - 10
misago/graphql/admin/tests/test_analytics.py

@@ -8,6 +8,7 @@ from ....threads.models import Attachment, AttachmentType
 from ....threads.test import post_thread
 from ....users.datadownloads import request_user_data_download
 from ....users.test import create_test_user
+from ..analytics import cumulate_data
 
 
 test_query = gql(
@@ -15,27 +16,29 @@ test_query = gql(
         query getAnalytics($span: Int!) {
             analytics(span: $span) {
                 users {
-                    current
-                    previous
+                    ...data
                 }
                 threads {
-                    current
-                    previous
+                    ...data
                 }
                 posts {
-                    current
-                    previous
+                    ...data
                 }
                 attachments {
-                    current
-                    previous
+                    ...data
                 }
                 dataDownloads {
-                    current
-                    previous
+                    ...data
                 }
             }
         }
+
+        fragment data on AnalyticsData {
+            current
+            currentCumulative
+            previous
+            previousCumulative
+        }
     """
 )
 
@@ -53,21 +56,27 @@ def test_all_analytics_are_limited_to_requested_span(admin_graphql_client):
     result = admin_graphql_client.query(test_query, {"span": 30})
     for model_analytics in result["analytics"].values():
         assert len(model_analytics["current"]) == 30
+        assert len(model_analytics["currentCumulative"]) == 30
         assert len(model_analytics["previous"]) == 30
+        assert len(model_analytics["previousCumulative"]) == 30
 
 
 def test_large_analytics_span_is_reduced_to_360(admin_graphql_client):
     result = admin_graphql_client.query(test_query, {"span": 3000})
     for model_analytics in result["analytics"].values():
         assert len(model_analytics["current"]) == 360
+        assert len(model_analytics["currentCumulative"]) == 360
         assert len(model_analytics["previous"]) == 360
+        assert len(model_analytics["previousCumulative"]) == 360
 
 
 def test_short_analytics_span_is_extended_to_30(admin_graphql_client):
     result = admin_graphql_client.query(test_query, {"span": 0})
     for model_analytics in result["analytics"].values():
         assert len(model_analytics["current"]) == 30
+        assert len(model_analytics["currentCumulative"]) == 30
         assert len(model_analytics["previous"]) == 30
+        assert len(model_analytics["previousCumulative"]) == 30
 
 
 def test_recent_user_registration_appears_in_current_analytics(admin_graphql_client):
@@ -238,3 +247,7 @@ def test_old_data_download_is_excluded_from_analytics(admin_graphql_client, supe
     analytics = result["analytics"]["dataDownloads"]
     assert sum(analytics["current"]) == 0
     assert sum(analytics["previous"]) == 0
+
+
+def test_data_is_cumulated():
+    assert cumulate_data([1, 2]) == [1, 3]

+ 1 - 1
misago/static/misago/admin/index.js

@@ -161,4 +161,4 @@ function(){function e(e){e.remember("_draggable",this),this.el=e}e.prototype.ini
  *
  * This source code is licensed under the MIT license found in the
  * LICENSE file in the root directory of this source tree.
- */var i=n(36),r=n(0);function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=0;i<t;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);!function(e,t,n,i,r,a,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,a,o,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var o="function"==typeof Symbol&&Symbol.for,s=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,h=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116;function y(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case f:return"ConcurrentMode";case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case g:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case d:return"Context.Consumer";case h:return"Context.Provider";case p:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case m:return y(e.type);case v:if(e=1===e._status?e._result:null)return y(e)}return null}var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;b.hasOwnProperty("ReactCurrentDispatcher")||(b.ReactCurrentDispatcher={current:null});var x={};function w(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var k=new Uint16Array(16),S=0;15>S;S++)k[S]=S+1;k[15]=0;var E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,C=Object.prototype.hasOwnProperty,T={},A={};function _(e){return!!C.call(A,e)||!C.call(T,e)&&(E.test(e)?A[e]=!0:(T[e]=!0,!1))}function O(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function P(e,t,n,i,r){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new P(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new P(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new P(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new P(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new P(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new P(e,3,!0,e,null)}),["capture","download"].forEach(function(e){M[e]=new P(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){M[e]=new P(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){M[e]=new P(e,5,!1,e.toLowerCase(),null)});var I=/[\-:]([a-z])/g;function D(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new P(e,1,!1,e.toLowerCase(),null)});var N=/["'&<>]/;function L(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=N.exec(e);if(t){var n,i="",r=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==n&&(i+=e.substring(r,n)),r=n+1,i+=t}e=r!==n?i+e.substring(r,n):i}return e}var R=null,F=null,j=null,z=!1,Y=!1,H=null,W=0;function X(){return null===R&&a("321"),R}function V(){return 0<W&&a("312"),{memoizedState:null,queue:null,next:null}}function B(){return null===j?null===F?(z=!1,F=j=V()):(z=!0,j=F):null===j.next?(z=!1,j=j.next=V()):(z=!0,j=j.next),j}function q(e,t,n,i){for(;Y;)Y=!1,W+=1,j=null,n=e(t,i);return F=R=null,W=0,j=H=null,n}function U(e,t){return"function"==typeof t?t(e):t}function G(e,t,n){if(R=X(),j=B(),z){var i=j.queue;if(t=i.dispatch,null!==H&&void 0!==(n=H.get(i))){H.delete(i),i=j.memoizedState;do{i=e(i,n.action),n=n.next}while(null!==n);return j.memoizedState=i,[i,t]}return[j.memoizedState,t]}return e=e===U?"function"==typeof t?t():t:void 0!==n?n(t):t,j.memoizedState=e,e=(e=j.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(25>W||a("301"),e===R)if(Y=!0,e={action:n,next:null},null===H&&(H=new Map),void 0===(n=H.get(t)))H.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,R,e),[j.memoizedState,e]}function Q(){}var $=0,Z={readContext:function(e){var t=$;return w(e,t),e[t]},useContext:function(e){X();var t=$;return w(e,t),e[t]},useMemo:function(e,t){if(R=X(),t=void 0===t?null:t,null!==(j=B())){var n=j.memoizedState;if(null!==n&&null!==t){e:{var i=n[1];if(null===i)i=!1;else{for(var r=0;r<i.length&&r<t.length;r++){var a=t[r],o=i[r];if((a!==o||0===a&&1/a!=1/o)&&(a==a||o==o)){i=!1;break e}}i=!0}}if(i)return n[0]}}return e=e(),j.memoizedState=[e,t],e},useReducer:G,useRef:function(e){R=X();var t=(j=B()).memoizedState;return null===t?(e={current:e},j.memoizedState=e):t},useState:function(e){return G(U,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:Q,useEffect:Q,useDebugValue:Q},K={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function J(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ee={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},te=i({menuitem:!0},ee),ne={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ie=["Webkit","ms","Moz","O"];Object.keys(ne).forEach(function(e){ie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ne[t]=ne[e]})});var re=/([A-Z])/g,ae=/^ms-/,oe=r.Children.toArray,se=b.ReactCurrentDispatcher,le={listing:!0,pre:!0,textarea:!0},ce=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ue={},he={};var de=Object.prototype.hasOwnProperty,fe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function pe(e,t){void 0===e&&a("152",y(t)||"Component")}function ge(e,t,n){function o(r,o){var s=function(e,t,n){var i=e.contextType;if("object"==typeof i&&null!==i)return w(i,n),i[n];if(e=e.contextTypes){for(var r in n={},e)n[r]=t[r];t=n}else t=x;return t}(o,t,n),l=[],c=!1,u={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===l)return null},enqueueReplaceState:function(e,t){c=!0,l=[t]},enqueueSetState:function(e,t){if(null===l)return null;l.push(t)}},h=void 0;if(o.prototype&&o.prototype.isReactComponent){if(h=new o(r.props,s,u),"function"==typeof o.getDerivedStateFromProps){var d=o.getDerivedStateFromProps.call(null,r.props,h.state);null!=d&&(h.state=i({},h.state,d))}}else if(R={},h=o(r.props,s,u),null==(h=q(o,r.props,h,s))||null==h.render)return void pe(e=h,o);if(h.props=r.props,h.context=s,h.updater=u,void 0===(u=h.state)&&(h.state=u=null),"function"==typeof h.UNSAFE_componentWillMount||"function"==typeof h.componentWillMount)if("function"==typeof h.componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&h.componentWillMount(),"function"==typeof h.UNSAFE_componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&h.UNSAFE_componentWillMount(),l.length){u=l;var f=c;if(l=null,c=!1,f&&1===u.length)h.state=u[0];else{d=f?u[0]:h.state;var p=!0;for(f=f?1:0;f<u.length;f++){var g=u[f];null!=(g="function"==typeof g?g.call(h,d,r.props,s):g)&&(p?(p=!1,d=i({},d,g)):i(d,g))}h.state=d}}else l=null;if(pe(e=h.render(),o),r=void 0,"function"==typeof h.getChildContext&&"object"==typeof(s=o.childContextTypes))for(var m in r=h.getChildContext())m in s||a("108",y(o)||"Unknown",m);r&&(t=i({},t,r))}for(;r.isValidElement(e);){var s=e,l=s.type;if("function"!=typeof l)break;o(s,l)}return{child:e,context:t}}var me=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");r.isValidElement(t)?t.type!==l?t=[t]:(t=t.props.children,t=r.isValidElement(t)?[t]:oe(t)):t=oe(t),t={type:null,domNamespace:K.html,children:t,childIndex:0,context:x,footer:""};var i=k[0];if(0===i){var o=k,s=2*(i=o.length);65536>=s||a("304");var c=new Uint16Array(s);for(c.set(o),(k=c)[0]=i+1,o=i;o<s-1;o++)k[o]=o+1;k[s-1]=0}else k[0]=k[i];this.threadID=i,this.stack=[t],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=n,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return e.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;k[e]=k[0],k[0]=e}},e.prototype.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,i=this.threadID;w(n,i);var r=n[i];this.contextStack[t]=n,this.contextValueStack[t]=r,n[i]=e.props.value},e.prototype.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.prototype.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.prototype.read=function(e){if(this.exhausted)return null;var t=$;$=this.threadID;var n=se.current;se.current=Z;try{for(var i=[""],r=!1;i[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var o=this.threadID;k[o]=k[0],k[0]=o;break}var s=this.stack[this.stack.length-1];if(r||s.childIndex>=s.children.length){var l=s.footer;if(""!==l&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===h)this.popProvider(s.type);else if(s.type===g){this.suspenseDepth--;var c=i.pop();if(r){r=!1;var u=s.fallbackFrame;u||a("303"),this.stack.push(u);continue}i[this.suspenseDepth]+=c}i[this.suspenseDepth]+=l}else{var d=s.children[s.childIndex++],f="";try{f+=this.render(d,s.context,s.domNamespace)}catch(e){throw e}i.length<=this.suspenseDepth&&i.push(""),i[this.suspenseDepth]+=f}}return i[0]}finally{se.current=n,$=t}},e.prototype.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?L(n):this.previousWasTextNode?"\x3c!-- --\x3e"+L(n):(this.previousWasTextNode=!0,L(n));if(e=(t=ge(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!r.isValidElement(e)){if(null!=e&&null!=e.$$typeof){var o=e.$$typeof;o===s&&a("257"),a("258",o.toString())}return e=oe(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}if("string"==typeof(o=e.type))return this.renderDOM(e,t,n);switch(o){case c:case f:case u:case l:return e=oe(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case g:a("294")}if("object"==typeof o&&null!==o)switch(o.$$typeof){case p:R={};var y=o.render(e.props,e.ref);return y=q(o.render,e.props,y,e.ref),y=oe(y),this.stack.push({type:null,domNamespace:n,children:y,childIndex:0,context:t,footer:""}),"";case m:return e=[r.createElement(o.type,i({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:return n={type:e,domNamespace:n,children:o=oe(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case d:o=e.type,y=e.props;var b=this.threadID;return w(o,b),o=oe(y.children(o[b])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case v:a("295")}a("130",null==o?o:typeof o,"")},e.prototype.renderDOM=function(e,t,n){var o=e.type.toLowerCase();n===K.html&&J(o),ue.hasOwnProperty(o)||(ce.test(o)||a("65",o),ue[o]=!0);var s=e.props;if("input"===o)s=i({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===o){var l=s.value;if(null==l){l=s.defaultValue;var c=s.children;null!=c&&(null!=l&&a("92"),Array.isArray(c)&&(1>=c.length||a("93"),c=c[0]),l=""+c),null==l&&(l="")}s=i({},s,{value:void 0,children:""+l})}else if("select"===o)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=i({},s,{value:void 0});else if("option"===o){c=this.currentSelectValue;var u=function(e){if(null==e)return e;var t="";return r.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(s.children);if(null!=c){var h=null!=s.value?s.value+"":u;if(l=!1,Array.isArray(c)){for(var d=0;d<c.length;d++)if(""+c[d]===h){l=!0;break}}else l=""+c===h;s=i({selected:void 0,children:void 0},s,{selected:l,children:u})}}for(x in(l=s)&&(te[o]&&(null!=l.children||null!=l.dangerouslySetInnerHTML)&&a("137",o,""),null!=l.dangerouslySetInnerHTML&&(null!=l.children&&a("60"),"object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML||a("61")),null!=l.style&&"object"!=typeof l.style&&a("62","")),l=s,c=this.makeStaticMarkup,u=1===this.stack.length,h="<"+e.type,l)if(de.call(l,x)){var f=l[x];if(null!=f){if("style"===x){d=void 0;var p="",g="";for(d in f)if(f.hasOwnProperty(d)){var m=0===d.indexOf("--"),v=f[d];if(null!=v){var y=d;if(he.hasOwnProperty(y))y=he[y];else{var b=y.replace(re,"-$1").toLowerCase().replace(ae,"-ms-");y=he[y]=b}p+=g+y+":",g=d,p+=m=null==v||"boolean"==typeof v||""===v?"":m||"number"!=typeof v||0===v||ne.hasOwnProperty(g)&&ne[g]?(""+v).trim():v+"px",g=";"}}f=p||null}d=null;e:if(m=o,v=l,-1===m.indexOf("-"))m="string"==typeof v.is;else switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":m=!1;break e;default:m=!0}m?fe.hasOwnProperty(x)||(d=_(d=x)&&null!=f?d+'="'+L(f)+'"':""):(m=x,d=f,f=M.hasOwnProperty(m)?M[m]:null,(v="style"!==m)&&(v=null!==f?0===f.type:2<m.length&&("o"===m[0]||"O"===m[0])&&("n"===m[1]||"N"===m[1])),v||O(m,d,f,!1)?d="":null!==f?(m=f.attributeName,d=3===(f=f.type)||4===f&&!0===d?m+'=""':m+'="'+L(d)+'"'):d=_(m)?m+'="'+L(d)+'"':""),d&&(h+=" "+d)}}c||u&&(h+=' data-reactroot=""');var x=h;l="",ee.hasOwnProperty(o)?x+="/>":(x+=">",l="</"+e.type+">");e:{if(null!=(c=s.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"==typeof(c=s.children)||"number"==typeof c){c=L(c);break e}c=null}return null!=c?(s=[],le[o]&&"\n"===c.charAt(0)&&(x+="\n"),x+=c):s=oe(s.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?J(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:o,children:s,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,x},e}(),ve={renderToString:function(e){e=new me(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new me(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){a("207")},renderToStaticNodeStream:function(){a("208")},version:"16.8.6"},ye={default:ve},be=ye&&ve||ye;e.exports=be.default||be},function(e,t,n){"use strict";var i=n(98),r=n(99),a=n(38),o=n(39);e.exports=n(101)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var i=n(10)("unscopables"),r=Array.prototype;null==r[i]&&n(12)(r,i,{}),e.exports=function(e){r[i][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(48);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var i=n(49),r=n(52),a=n(23),o=n(12),s=n(38),l=n(102),c=n(60),u=n(109),h=n(10)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,g,m,v){l(n,t,p);var y,b,x,w=function(e){if(!d&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S="values"==g,E=!1,C=e.prototype,T=C[h]||C["@@iterator"]||g&&C[g],A=T||w(g),_=g?S?w("entries"):A:void 0,O="Array"==t&&C.entries||T;if(O&&(x=u(O.call(new e)))!==Object.prototype&&x.next&&(c(x,k,!0),i||"function"==typeof x[h]||o(x,h,f)),S&&T&&"values"!==T.name&&(E=!0,A=function(){return T.call(this)}),i&&!v||!d&&!E&&C[h]||o(C,h,A),s[t]=A,s[k]=f,g)if(y={values:S?A:w("values"),keys:m?A:w("keys"),entries:_},v)for(b in y)b in C||a(C,b,y[b]);else r(r.P+r.F*(d||E),t,y);return y}},function(e,t,n){"use strict";var i=n(103),r=n(54),a=n(60),o={};n(12)(o,n(10)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var i=n(13),r=n(104),a=n(59),o=n(40)("IE_PROTO"),s=function(){},l=function(){var e,t=n(53)("iframe"),i=a.length;for(t.style.display="none",n(108).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[a[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var i=n(33),r=n(13),a=n(58);e.exports=n(22)?Object.defineProperties:function(e,t){r(e);for(var n,o=a(t),s=o.length,l=0;s>l;)i.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var i=n(24),r=n(39),a=n(106)(!1),o=n(40)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=o&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){var i=n(39),r=n(29),a=n(107);e.exports=function(e){return function(t,n,o){var s,l=i(t),c=r(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var i=n(21),r=Math.max,a=Math.min;e.exports=function(e,t){return(e=i(e))<0?r(e+t,0):a(e,t)}},function(e,t,n){var i=n(11).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(24),r=n(45),a=n(40)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){"use strict";var i=n(13),r=n(29),a=n(46),o=n(47);n(50)("match",1,function(e,t,n,s){return[function(n){var i=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=i(e),c=String(this);if(!l.global)return o(l,c);var u=l.unicode;l.lastIndex=0;for(var h,d=[],f=0;null!==(h=o(l,c));){var p=String(h[0]);d[f]=p,""===p&&(l.lastIndex=a(c,r(l.lastIndex),u)),f++}return 0===f?null:d}]})},function(e,t,n){"use strict";n.r(t);n(44);var i=n(8),r=n.n(i),a=(n(25),n(76),n(77),n(78),n(6)),o=n.n(a);n(79);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){return(h="function"==typeof Symbol&&"symbol"===u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function d(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var v=n(1),y=n(2),b=n(63),x=n.n(b).a,w=n(41),k=n(5),S=n(27);function E(e){return Object(k.b)(e,{leave:C})}var C={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return A(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,i=O("(",A(e.variableDefinitions,", "),")"),r=A(e.directives," "),a=e.selectionSet;return n||r||i||"query"!==t?A([t,A([n,i]),r,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,i=e.defaultValue,r=e.directives;return t+": "+n+O(" = ",i)+O(" ",A(r," "))},SelectionSet:function(e){return _(e.selections)},Field:function(e){var t=e.alias,n=e.name,i=e.arguments,r=e.directives,a=e.selectionSet;return A([O("",t,": ")+n+O("(",A(i,", "),")"),A(r," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+O(" ",A(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,i=e.selectionSet;return A(["...",O("on ",t),A(n," "),i]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,i=e.variableDefinitions,r=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(O("(",A(i,", "),")")," ")+"on ".concat(n," ").concat(O("",A(r," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(S.b)(n,"description"===t?"":"  "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+A(e.values,", ")+"]"},ObjectValue:function(e){return"{"+A(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+O("(",A(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return A(["schema",A(t," "),_(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:T(function(e){return A(["scalar",e.name,A(e.directives," ")]," ")}),ObjectTypeDefinition:T(function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return A(["type",t,O("implements ",A(n," & ")),A(i," "),_(r)]," ")}),FieldDefinition:T(function(e){var t=e.name,n=e.arguments,i=e.type,r=e.directives;return t+(I(n)?O("(\n",P(A(n,"\n")),"\n)"):O("(",A(n,", "),")"))+": "+i+O(" ",A(r," "))}),InputValueDefinition:T(function(e){var t=e.name,n=e.type,i=e.defaultValue,r=e.directives;return A([t+": "+n,O("= ",i),A(r," ")]," ")}),InterfaceTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.fields;return A(["interface",t,A(n," "),_(i)]," ")}),UnionTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.types;return A(["union",t,A(n," "),i&&0!==i.length?"= "+A(i," | "):""]," ")}),EnumTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.values;return A(["enum",t,A(n," "),_(i)]," ")}),EnumValueDefinition:T(function(e){return A([e.name,A(e.directives," ")]," ")}),InputObjectTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.fields;return A(["input",t,A(n," "),_(i)]," ")}),DirectiveDefinition:T(function(e){var t=e.name,n=e.arguments,i=e.locations;return"directive @"+t+(I(n)?O("(\n",P(A(n,"\n")),"\n)"):O("(",A(n,", "),")"))+" on "+A(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return A(["extend schema",A(t," "),_(n)]," ")},ScalarTypeExtension:function(e){return A(["extend scalar",e.name,A(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return A(["extend type",t,O("implements ",A(n," & ")),A(i," "),_(r)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,i=e.fields;return A(["extend interface",t,A(n," "),_(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,i=e.types;return A(["extend union",t,A(n," "),i&&0!==i.length?"= "+A(i," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,i=e.values;return A(["extend enum",t,A(n," "),_(i)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,i=e.fields;return A(["extend input",t,A(n," "),_(i)]," ")}};function T(e){return function(t){return A([t.description,e(t)],"\n")}}function A(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function _(e){return e&&0!==e.length?"{\n"+P(A(e,"\n"))+"\n}":""}function O(e,t,n){return t?e+t+(n||""):""}function P(e){return e&&"  "+e.replace(/\n/g,"\n  ")}function M(e){return-1!==e.indexOf("\n")}function I(e){return e&&e.some(M)}!function(e){function t(t,n){var i=e.call(this,t)||this;return i.link=n,i}Object(v.c)(t,e)}(Error);function D(e){return e.request.length<=1}function N(e){return new x(function(t){t.error(e)})}function L(e,t){var n=Object(v.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(v.a)({},n,e(n)):Object(v.a)({},n,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(v.a)({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){return E(e.query)+"|"+JSON.stringify(e.variables)+"|"+e.operationName}(t)}}),t}function R(e,t){return t?t(e):x.of()}function F(e){return"function"==typeof e?new H(e):e}function j(){return new H(function(){return x.of()})}function z(e){return 0===e.length?j():e.map(F).reduce(function(e,t){return e.concat(t)})}function Y(e,t,n){var i=F(t),r=F(n||new H(R));return D(i)&&D(r)?new H(function(t){return e(t)?i.request(t)||x.of():r.request(t)||x.of()}):new H(function(t,n){return e(t)?i.request(t,n)||x.of():r.request(t,n)||x.of()})}var H=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,i){return this.concat(Y(t,n,i||new e(R)))},e.prototype.concat=function(e){return function(e,t){var n=F(e);if(D(n))return n;var i=F(t);return D(i)?new H(function(e){return n.request(e,function(e){return i.request(e)||x.of()})||x.of()}):new H(function(e,t){return n.request(e,function(e){return i.request(e,t)||x.of()})||x.of()})}(this,e)},e.prototype.request=function(e,t){throw new w.a(1)},e.empty=j,e.from=z,e.split=Y,e.execute=W,e}();function W(e,t){return e.request(L(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(y.n)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];if(t.indexOf(r)<0)throw new w.a(2)}return e}(t))))||x.of()}var X,V=n(64),B=n(3),q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inFlightRequestObservables=new Map,t.subscribers=new Map,t}return Object(v.c)(t,e),t.prototype.request=function(e,t){var n=this;if(e.getContext().forceFetch)return t(e);var i=e.toKey();if(!this.inFlightRequestObservables.get(i)){var r,a=t(e),o=new x(function(e){return n.subscribers.has(i)||n.subscribers.set(i,new Set),n.subscribers.get(i).add(e),r||(r=a.subscribe({next:function(e){var t=n.subscribers.get(i);n.subscribers.delete(i),n.inFlightRequestObservables.delete(i),t&&(t.forEach(function(t){return t.next(e)}),t.forEach(function(e){return e.complete()}))},error:function(e){var t=n.subscribers.get(i);n.subscribers.delete(i),n.inFlightRequestObservables.delete(i),t&&t.forEach(function(t){return t.error(e)})}})),function(){n.subscribers.has(i)&&(n.subscribers.get(i).delete(e),0===n.subscribers.get(i).size&&(n.inFlightRequestObservables.delete(i),r&&r.unsubscribe()))}});this.inFlightRequestObservables.set(i,o)}return this.inFlightRequestObservables.get(i)},t}(H);function U(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(X||(X={}));var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(v.c)(t,e),t.prototype[V.a]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(x);var Q,$=function(e){var t="";return Array.isArray(e.graphQLErrors)&&0!==e.graphQLErrors.length&&e.graphQLErrors.forEach(function(e){var n=e?e.message:"Error message not found.";t+="GraphQL error: "+n+"\n"}),e.networkError&&(t+="Network error: "+e.networkError.message+"\n"),t=t.replace(/\n$/,"")},Z=function(e){function t(n){var i=n.graphQLErrors,r=n.networkError,a=n.errorMessage,o=n.extraInfo,s=e.call(this,a)||this;return s.graphQLErrors=i||[],s.networkError=r||null,s.message=a||$(s),s.extraInfo=o,s.__proto__=t.prototype,s}return Object(v.c)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(Q||(Q={}));var K=function(e){function t(t){var n=t.queryManager,i=t.options,r=t.shouldSubscribe,a=void 0===r||r,o=e.call(this,function(e){return o.onSubscribe(e)})||this;return o.isTornDown=!1,o.options=i,o.variables=i.variables||{},o.queryId=n.generateQueryId(),o.shouldSubscribe=a,o.queryManager=n,o.observers=[],o.subscriptionHandles=[],o}return Object(v.c)(t,e),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var i,r={next:function(n){t(n),e.observers.some(function(e){return e!==r})||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:function(e){n(e)}};i=e.subscribe(r)})},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown)return{data:this.lastError?void 0:this.lastResult?this.lastResult.data:void 0,error:this.lastError,loading:!1,networkStatus:X.error};var e,t,n=this.queryManager.queryStore.get(this.queryId);if(e=n,void 0===(t=this.options.errorPolicy)&&(t="none"),e&&(e.graphQLErrors&&e.graphQLErrors.length>0&&"none"===t||e.networkError))return{data:void 0,loading:!1,networkStatus:n.networkStatus,error:new Z({graphQLErrors:n.graphQLErrors,networkError:n.networkError})};n&&n.variables&&(this.options.variables=Object.assign({},this.options.variables,n.variables));var i,r=this.queryManager.getCurrentQueryResult(this),a=r.data,o=r.partial,s=!n||n.networkStatus===X.loading,l="network-only"===this.options.fetchPolicy&&s||o&&"cache-only"!==this.options.fetchPolicy,c={data:a,loading:U(i=n?n.networkStatus:l?X.loading:X.ready),networkStatus:i};return n&&n.graphQLErrors&&"all"===this.options.errorPolicy&&(c.errors=n.graphQLErrors),o||(this.lastResult=Object(v.a)({},c,{stale:!1}),this.lastResultSnapshot=Object(y.e)(this.lastResult)),Object(v.a)({},c,{partial:o})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(y.t)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;if("cache-only"===t)return Promise.reject(new Error("cache-only fetchPolicy option should not be used together with query refetch."));Object(y.t)(this.variables,e)||(this.variables=Object.assign({},this.variables,e)),Object(y.t)(this.options.variables,this.variables)||(this.options.variables=Object.assign({},this.options.variables,this.variables));var n="network-only"===t||"no-cache"===t,i=Object(v.a)({},this.options,{fetchPolicy:n?t:"network-only"});return this.queryManager.fetchQuery(this.queryId,i,Q.refetch).then(function(e){return e})},t.prototype.fetchMore=function(e){var t,n=this;return Object(B.b)(e.updateQuery),Promise.resolve().then(function(){var i=n.queryManager.generateQueryId();return(t=e.query?e:Object(v.a)({},n.options,e,{variables:Object.assign({},n.variables,e.variables)})).fetchPolicy="network-only",n.queryManager.fetchQuery(i,t,Q.normal,n.queryId)}).then(function(i){return n.updateQuery(function(n){return e.updateQuery(n,{fetchMoreResult:i.data,variables:t.variables})}),i})},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){e.updateQuery&&t.updateQuery(function(t,i){var r=i.variables;return e.updateQuery(t,{subscriptionData:n,variables:r})})},error:function(t){e.onError?e.onError(t):console.error("Unhandled GraphQL subscription error",t)}});return this.subscriptionHandles.push(n),function(){var e=t.subscriptionHandles.indexOf(n);e>=0&&(t.subscriptionHandles.splice(e,1),n.unsubscribe())}},t.prototype.setOptions=function(e){var t=this.options;this.options=Object.assign({},this.options,e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n="network-only"!==t.fetchPolicy&&"network-only"===e.fetchPolicy||"cache-only"===t.fetchPolicy&&"cache-only"!==e.fetchPolicy||"standby"===t.fetchPolicy&&"standby"!==e.fetchPolicy||!1;return this.setVariables(this.options.variables,n,e.fetchResults)},t.prototype.setVariables=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1;var i=e||this.variables;return Object(y.t)(i,this.variables)&&!t?0!==this.observers.length&&n?this.result():new Promise(function(e){return e()}):(this.variables=i,this.options.variables=i,0===this.observers.length?new Promise(function(e){return e()}):this.queryManager.fetchQuery(this.queryId,Object(v.a)({},this.options,{variables:this.variables})).then(function(e){return e}))},t.prototype.updateQuery=function(e){var t=this.queryManager.getQueryWithPreviousResult(this.queryId),n=t.previousResult,i=t.variables,r=t.document,a=Object(y.I)(function(){return e(n,{variables:i})});a&&(this.queryManager.dataStore.markUpdateQueryResult(r,i,a),this.queryManager.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){J(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.onSubscribe=function(e){var t=this;return e._subscription&&e._subscription._observer&&!e._subscription._observer.error&&(e._subscription._observer.error=function(e){console.error("Unhandled error",e.message,e.stack)}),this.observers.push(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),1===this.observers.length&&this.setUpQuery(),function(){t.observers=t.observers.filter(function(t){return t!==e}),0===t.observers.length&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this;this.shouldSubscribe&&this.queryManager.addObservableQuery(this.queryId,this),this.options.pollInterval&&(J(this),this.queryManager.startPollingQuery(this.options,this.queryId));var t={next:function(t){e.lastResult=t,e.lastResultSnapshot=Object(y.e)(t),e.observers.forEach(function(e){return e.next&&e.next(t)})},error:function(t){e.lastError=t,e.observers.forEach(function(e){return e.error&&e.error(t)})}};this.queryManager.startQuery(this.queryId,this.options,this.queryManager.queryListenerForObserver(this.queryId,this.options,t))},t.prototype.tearDownQuery=function(){this.isTornDown=!0,this.queryManager.stopPollingQuery(this.queryId),this.subscriptionHandles.forEach(function(e){return e.unsubscribe()}),this.subscriptionHandles=[],this.queryManager.removeObservableQuery(this.queryId),this.queryManager.stopQuery(this.queryId),this.observers=[]},t}(G);function J(e){var t=e.options.fetchPolicy;Object(B.b)("cache-first"!==t&&"cache-only"!==t)}var ee=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),te=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];if(t&&t.document!==e.document&&!Object(y.t)(t.document,e.document))throw new B.a;var n,i=!1,r=null;e.storePreviousVariables&&t&&t.networkStatus!==X.loading&&(Object(y.t)(t.variables,e.variables)||(i=!0,r=t.variables)),n=i?X.setVariables:e.isPoll?X.poll:e.isRefetch?X.refetch:X.loading;var a=[];t&&t.graphQLErrors&&(a=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:r,networkError:null,graphQLErrors:a,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=X.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=t.errors&&t.errors.length?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=X.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=X.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=X.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].previousVariables=null,this.store[e].networkStatus=t?X.ready:X.loading)},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;this.store=Object.keys(this.store).filter(function(t){return e.indexOf(t)>-1}).reduce(function(e,n){return e[n]=Object(v.a)({},t.store[n],{networkStatus:X.loading}),e},{})},e}();var ne=function(){function e(e){var t=e.cache,n=e.client,i=e.resolvers,r=e.fragmentMatcher;this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),r&&this.setFragmentMatcher(r)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=Object(y.A)(t.resolvers,e)}):this.resolvers=Object(y.A)(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,r=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return Object(v.b)(this,void 0,void 0,function(){return Object(v.d)(this,function(e){return t?[2,this.resolveDocument(t,n.data,i,r,this.fragmentMatcher,o).then(function(e){return Object(v.a)({},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 Object(y.s)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(y.C)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(v.a)({},e,{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(B.b)(!1)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),Object(v.b)(this,void 0,void 0,function(){return Object(v.d)(this,function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return Object(v.a)({},t,e.exportedVariables)})]:[2,Object(v.a)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(k.b)(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 k.a}}}),t},e.prototype.shouldForceResolver=function(e){return this.shouldForceResolvers(e)},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(y.d)(e),variables:t,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,i,r,a){return void 0===n&&(n={}),void 0===i&&(i={}),void 0===r&&(r=function(){return!0}),void 0===a&&(a=!1),Object(v.b)(this,void 0,void 0,function(){var o,s,l,c,u,h,d,f,p;return Object(v.d)(this,function(g){var m;return o=Object(y.k)(e),s=Object(y.i)(e),l=Object(y.f)(s),c=o.operation,u=c?(m=c).charAt(0).toUpperCase()+m.slice(1):"Query",d=(h=this).cache,f=h.client,p={fragmentMap:l,context:Object(v.a)({},n,{cache:d,client:f}),variables:i,fragmentMatcher:r,defaultOperationType:u,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(o.selectionSet,t,p).then(function(e){return{result:e,exportedVariables:p.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n){return Object(v.b)(this,void 0,void 0,function(){var i,r,a,o,s,l=this;return Object(v.d)(this,function(c){return i=n.fragmentMap,r=n.context,a=n.variables,o=[t],s=function(e){return Object(v.b)(l,void 0,void 0,function(){var s,l;return Object(v.d)(this,function(c){return Object(y.F)(e,a)?Object(y.u)(e)?[2,this.resolveField(e,t,n).then(function(t){var n;void 0!==t&&o.push(((n={})[Object(y.E)(e)]=t,n))})]:(Object(y.w)(e)?s=e:(s=i[e.name.value],Object(B.b)(s)),s&&s.typeCondition&&(l=s.typeCondition.name.value,n.fragmentMatcher(t,l,r))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then(function(e){o.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(s)).then(function(){return Object(y.B)(o)})]})})},e.prototype.resolveField=function(e,t,n){return Object(v.b)(this,void 0,void 0,function(){var i,r,a,o,s,l,c,u,h,d=this;return Object(v.d)(this,function(f){return i=n.variables,r=e.name.value,a=Object(y.E)(e),o=r!==a,s=t[a]||t[r],l=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolver(e)||(c=t.__typename||n.defaultOperationType,(u=this.resolvers&&this.resolvers[c])&&(h=u[o?r:a])&&(l=Promise.resolve(h(t,Object(y.b)(e,i),n.context,{field:e})))),[2,l.then(function(t){return void 0===t&&(t=s),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&&(n.exportedVariables[e.value.value]=t)})}),e.selectionSet?null==t?t:Array.isArray(t)?d.resolveSubSelectedArray(e,t,n):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t,n):void 0:t})]})})},e.prototype.resolveSubSelectedArray=function(e,t,n){var i=this;return Promise.all(t.map(function(t){return null===t?null:Array.isArray(t)?i.resolveSubSelectedArray(e,t,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n):void 0}))},e}(),ie=function(){function e(e){var t=e.link,n=e.queryDeduplication,i=void 0!==n&&n,r=e.store,a=e.onBroadcast,o=void 0===a?function(){}:a,s=e.ssrMode,l=void 0!==s&&s,c=e.clientAwareness,u=void 0===c?{}:c,h=e.localState;this.mutationStore=new ee,this.queryStore=new te,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.queryIdsByName={},this.pollingInfoByQueryId=new Map,this.nextPoll=null,this.link=t,this.deduplicator=H.from([new q,t]),this.queryDeduplication=i,this.dataStore=r,this.onBroadcast=o,this.clientAwareness=u,this.localState=h||new ne({cache:r.getCache()}),this.ssrMode=l}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.fetchQueryRejectFns.forEach(function(e){e(new Error("QueryManager stopped while query was in flight"))})},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,i=e.optimisticResponse,r=e.updateQueries,a=e.refetchQueries,o=void 0===a?[]:a,s=e.awaitRefetchQueries,l=void 0!==s&&s,c=e.update,u=e.errorPolicy,h=void 0===u?"none":u,d=e.fetchPolicy,f=e.context,p=void 0===f?{}:f;return Object(v.b)(this,void 0,void 0,function(){var e,a,s,u,f,g=this;return Object(v.d)(this,function(m){switch(m.label){case 0:return Object(B.b)(t),Object(B.b)(!d||"no-cache"===d),e=this.generateQueryId(),a=this.dataStore.getCache(),t=a.transformDocument(t),n=Object(y.c)({},Object(y.g)(Object(y.l)(t)),n),this.setQuery(e,function(){return{document:t}}),s=function(){var e={};return r&&Object.keys(r).forEach(function(t){return(g.queryIdsByName[t]||[]).forEach(function(n){e[n]={updater:r[t],query:g.queryStore.get(n)}})}),e},Object(y.r)(t)?[4,this.localState.addExportedVariables(t,n,p)]:[3,2];case 1:return f=m.sent(),[3,3];case 2:f=n,m.label=3;case 3:return u=f,this.mutationStore.initMutation(e,t,u),this.dataStore.markMutationInit({mutationId:e,document:t,variables:u||{},updateQueries:s(),update:c,optimisticResponse:i}),this.broadcastQueries(),[2,new Promise(function(n,r){var a,f,m=g.buildOperationForLink(t,u,Object(v.a)({},p,{optimisticResponse:i})),b=function(){if(f&&g.mutationStore.markMutationError(e,f),g.dataStore.markMutationComplete({mutationId:e,optimisticResponse:i}),g.broadcastQueries(),f)return Promise.reject(f);"function"==typeof o&&(o=o(a));for(var t=[],n=0,r=o;n<r.length;n++){var s=r[n];if("string"!=typeof s){var c={query:s.query,variables:s.variables,fetchPolicy:"network-only"};s.context&&(c.context=s.context),t.push(g.query(c))}else{var u=g.refetchQueryByName(s);u&&t.push(u)}}return Promise.all(l?t:[]).then(function(){return g.setQuery(e,function(){return{document:null}}),"ignore"===h&&a&&Object(y.q)(a)&&delete a.errors,a})},x=g.localState.clientQuery(m.query),w=g.localState.serverQuery(m.query);w&&(m.query=w);var k=w?W(g.link,m):G.of({data:{}}),S=g,E=!1,C=!1;k.subscribe({next:function(i){return Object(v.b)(g,void 0,void 0,function(){var o,l,p;return Object(v.d)(this,function(g){switch(g.label){case 0:return C=!0,Object(y.q)(i)&&"none"===h?(C=!1,f=new Z({graphQLErrors:i.errors}),[2]):(S.mutationStore.markMutationResult(e),o=i,l=m.context,p=m.variables,x&&Object(y.s)(["client"],x)?[4,S.localState.runResolvers({document:x,remoteResult:i,context:l,variables:p}).catch(function(e){return C=!1,r(e),i})]:[3,2]);case 1:o=g.sent(),g.label=2;case 2:return"no-cache"!==d&&S.dataStore.markMutationResult({mutationId:e,result:o,document:t,variables:u||{},updateQueries:s(),update:c}),a=o,C=!1,E&&b().then(n,r),[2]}})})},error:function(t){S.mutationStore.markMutationError(e,t),S.dataStore.markMutationComplete({mutationId:e,optimisticResponse:i}),S.broadcastQueries(),S.setQuery(e,function(){return{document:null}}),r(new Z({networkError:t}))},complete:function(){C||b().then(n,r),E=!0}})})]}})})},e.prototype.fetchQuery=function(e,t,n,i){return Object(v.b)(this,void 0,void 0,function(){var r,a,o,s,l,c,u,h,d,f,p,g,m,b,x,w,k,S,E,C,T,A,_=this;return Object(v.d)(this,function(O){switch(O.label){case 0:return r=t.variables,a=void 0===r?{}:r,o=t.metadata,s=void 0===o?null:o,l=t.fetchPolicy,c=void 0===l?"cache-first":l,u=t.context,h=void 0===u?{}:u,d=this.dataStore.getCache(),f=d.transformDocument(t.query),Object(y.r)(f)?[4,this.localState.addExportedVariables(f,a,h)]:[3,2];case 1:return g=O.sent(),[3,3];case 2:g=a,O.label=3;case 3:if(p=g,m=Object(v.a)({},t,{variables:p}),x="network-only"===c||"no-cache"===c,n!==Q.refetch&&"network-only"!==c&&"no-cache"!==c&&(w=this.dataStore.getCache().diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),k=w.complete,S=w.result,x=!k||"cache-and-network"===c,b=S),E=x&&"cache-only"!==c&&"standby"!==c,Object(y.s)(["live"],f)&&(E=!0),C=this.generateRequestId(),T=this.updateQueryWatch(e,f,m),this.setQuery(e,function(){return{document:f,lastRequestId:C,invalidated:!0,cancel:T}}),this.invalidate(!0,i),this.queryStore.initQuery({queryId:e,document:f,storePreviousVariables:E,variables:p,isPoll:n===Q.poll,isRefetch:n===Q.refetch,metadata:s,fetchMoreForQueryId:i}),this.broadcastQueries(),(!E||"cache-and-network"===c)&&(this.queryStore.markQueryResultClient(e,!E),this.invalidate(!0,e,i),this.broadcastQueries(this.localState.shouldForceResolvers(f))),E){if(A=this.fetchRequest({requestId:C,queryId:e,document:f,options:m,fetchMoreForQueryId:i}).catch(function(t){if(t.hasOwnProperty("graphQLErrors"))throw t;var n=_.getQuery(e).lastRequestId;throw C>=(n||1)&&(_.queryStore.markQueryError(e,t,i),_.invalidate(!0,e,i),_.broadcastQueries()),new Z({networkError:t})}),"cache-and-network"!==c)return[2,A];A.catch(function(){})}return[2,Promise.resolve({data:b})]}})})},e.prototype.queryListenerForObserver=function(e,t,n){var i=this,r=!1;return function(a,o,s){return Object(v.b)(i,void 0,void 0,function(){var i,l,c,u,h,d,f,p,g,m,y,b,x,w,k,S,E,C,T,A;return Object(v.d)(this,function(_){switch(_.label){case 0:if(this.invalidate(!1,e),!a)return[2];if(i=this.getQuery(e).observableQuery,"standby"===(l=i?i.options.fetchPolicy:t.fetchPolicy))return[2];if(c=i?i.options.errorPolicy:t.errorPolicy,u=i?i.getLastResult():null,h=i?i.getLastError():null,d=!o&&null!=a.previousVariables||"cache-only"===l||"cache-and-network"===l,f=Boolean(u&&a.networkStatus!==u.networkStatus),p=c&&(h&&h.graphQLErrors)!==a.graphQLErrors&&"none"!==c,!(!U(a.networkStatus)||f&&t.notifyOnNetworkStatusChange||d))return[3,8];if((!c||"none"===c)&&a.graphQLErrors&&a.graphQLErrors.length>0||a.networkError){if(g=new Z({graphQLErrors:a.graphQLErrors,networkError:a.networkError}),r=!0,n.error)try{n.error(g)}catch(e){setTimeout(function(){throw e},0)}else setTimeout(function(){throw g},0);return[2]}_.label=1;case 1:if(_.trys.push([1,7,,8]),m=void 0,y=void 0,o?("no-cache"!==l&&"network-only"!==l&&this.setQuery(e,function(){return{newData:null}}),m=o.result,y=!o.complete||!1):u&&u.data&&!p?(m=u.data,y=!1):(b=this.getQuery(e).document,x=this.dataStore.getCache().diff({query:b,variables:a.previousVariables||a.variables,optimistic:!0}),m=x.result,y=!x.complete),w=void 0,w=y&&"cache-only"!==l?{data:u&&u.data,loading:U(a.networkStatus),networkStatus:a.networkStatus,stale:!0}:{data:m,loading:U(a.networkStatus),networkStatus:a.networkStatus,stale:!1},"all"===c&&a.graphQLErrors&&a.graphQLErrors.length>0&&(w.errors=a.graphQLErrors),!n.next)return[3,6];if(!r&&i&&!i.isDifferentFromLastResult(w))return[3,6];_.label=2;case 2:return _.trys.push([2,5,,6]),s?(k=t.query,S=t.variables,E=t.context,[4,this.localState.runResolvers({document:k,remoteResult:w,context:E,variables:S,onlyRunForcedResolvers:s})]):[3,4];case 3:C=_.sent(),w=Object(v.a)({},w,C),_.label=4;case 4:return n.next(w),[3,6];case 5:return T=_.sent(),setTimeout(function(){throw T},0),[3,6];case 6:return r=!1,[3,8];case 7:return A=_.sent(),r=!0,n.error&&n.error(new Z({networkError:A})),[2];case 8:return[2]}})})}},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(B.b)("standby"!==e.fetchPolicy);var n=Object(y.o)(e.query);if(n.variableDefinitions&&n.variableDefinitions.length){var i=Object(y.g)(n);e.variables=Object(y.c)({},i,e.variables)}void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=Object(v.a)({},e);return new K({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(B.b)(e.query),Object(B.b)("Document"===e.query.kind),Object(B.b)(!e.returnPartialData),Object(B.b)(!e.pollInterval),new Promise(function(n,i){var r=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+r.queryId,i),r.result().then(n,i).then(function(){return t.fetchQueryRejectFns.delete("query:"+r.queryId)})})},e.prototype.generateQueryId=function(){var e=this.idCounter.toString();return this.idCounter++,e},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(!0,e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,function(e){var n=e.listeners;return{listeners:(void 0===n?[]:n).concat([t]),invalidated:!1}})},e.prototype.updateQueryWatch=function(e,t,n){var i=this,r=this.getQuery(e).cancel;r&&r();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=i.getQuery(e).observableQuery;if(n){var r=n.getLastResult();r&&(t=r.data)}return t},callback:function(t){i.setQuery(e,function(){return{invalidated:!0,newData:t}})}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,function(){return{observableQuery:t}});var n=Object(y.o)(t.options.query);if(n.name&&n.name.value){var i=n.name.value;this.queryIdsByName[i]=this.queryIdsByName[i]||[],this.queryIdsByName[i].push(t.queryId)}},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e),n=t.observableQuery,i=t.cancel;if(i&&i(),n){var r=Object(y.o)(n.options.query),a=r.name?r.name.value:null;this.setQuery(e,function(){return{observableQuery:null}}),a&&(this.queryIdsByName[a]=this.queryIdsByName[a].filter(function(e){return!(n.queryId===e)}))}},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach(function(e){e(new Error("Store reset while query was in flight(not completed in link chain)"))});var e=[];return this.queries.forEach(function(t,n){t.observableQuery&&e.push(n)}),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then(function(){return e.reFetchObservableQueries()})},e.prototype.reFetchObservableQueries=function(e){var t=this.getObservableQueryPromises(e);return this.broadcastQueries(),Promise.all(t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch(function(){}),e},e.prototype.startGraphQLSubscription=function(e){var t,n=this,i=e.query,r=!(e.fetchPolicy&&"no-cache"===e.fetchPolicy),a=this.dataStore.getCache().transformDocument(i),o=Object(y.c)({},Object(y.g)(Object(y.m)(i)),e.variables),s=o,l=[],c=this.localState.clientQuery(a);return new G(function(e){if(l.push(e),1===l.length){var i=0,u=!1,h={next:function(e){return Object(v.b)(n,void 0,void 0,function(){var t;return Object(v.d)(this,function(n){switch(n.label){case 0:return i+=1,t=e,c&&Object(y.s)(["client"],c)?[4,this.localState.runResolvers({document:c,remoteResult:e,context:{},variables:s})]:[3,2];case 1:t=n.sent(),n.label=2;case 2:return r&&(this.dataStore.markSubscriptionResult(t,a,s),this.broadcastQueries()),l.forEach(function(e){Object(y.q)(t)&&e.error?e.error(new Z({graphQLErrors:t.errors})):e.next&&e.next(t),i-=1}),0===i&&u&&h.complete(),[2]}})})},error:function(e){l.forEach(function(t){t.error&&t.error(e)})},complete:function(){0===i&&l.forEach(function(e){e.complete&&e.complete()}),u=!0}};Object(v.b)(n,void 0,void 0,function(){var e,n,i,r;return Object(v.d)(this,function(s){switch(s.label){case 0:return Object(y.r)(a)?[4,this.localState.addExportedVariables(a,o)]:[3,2];case 1:return n=s.sent(),[3,3];case 2:n=o,s.label=3;case 3:return e=n,(i=this.localState.serverQuery(a))?(r=this.buildOperationForLink(i,e),t=W(this.link,r).subscribe(h)):t=G.of({data:{}}).subscribe(h),[2]}})})}return function(){0===(l=l.filter(function(t){return t!==e})).length&&t&&t.unsubscribe()}})},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){var t=this.getQuery(e).subscriptions;this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),t.forEach(function(e){return e.unsubscribe()}),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,i=n.variables,r=n.query,a=n.fetchPolicy,o=e.getLastResult(),s=this.getQuery(e.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===a||"network-only"===a)return{data:void 0,partial:!1};try{return{data:this.dataStore.getCache().read({query:r,variables:i,previousResult:o?o.data:void 0,optimistic:t})||void 0,partial:!1}}catch(e){return{data:void 0,partial:!0}}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;Object(B.b)(n),t=n}else t=e;var i=t.options,r=i.variables,a=i.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:r,document:a}},e.prototype.broadcastQueries=function(e){var t=this;void 0===e&&(e=!1),this.onBroadcast(),this.queries.forEach(function(n,i){n.invalidated&&n.listeners&&n.listeners.filter(function(e){return!!e}).forEach(function(r){r(t.queryStore.get(i),n.newData,e)})})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableQueryPromises=function(e){var t=this,n=[];return this.queries.forEach(function(i,r){var a=i.observableQuery;if(a){var o=a.options.fetchPolicy;a.resetLastResults(),"cache-only"===o||!e&&"standby"===o||n.push(a.refetch()),t.setQuery(r,function(){return{newData:null}}),t.invalidate(!0,r)}}),n},e.prototype.fetchRequest=function(e){var t,n,i=this,r=e.requestId,a=e.queryId,o=e.document,s=e.options,l=e.fetchMoreForQueryId,c=s.variables,u=s.context,h=s.errorPolicy,d=void 0===h?"none":h,f=s.fetchPolicy;return new Promise(function(e,s){var h,p={},g=i.localState.clientQuery(o),m=i.localState.serverQuery(o);if(m){var b=i.buildOperationForLink(m,c,Object(v.a)({},u,{forceFetch:!i.queryDeduplication}));p=b.context,h=W(i.deduplicator,b)}else p=i.prepareContext(u),h=G.of({data:{}});i.fetchQueryRejectFns.set("fetchRequest:"+a,s);var x=!1,w=!0,k={next:function(e){return Object(v.b)(i,void 0,void 0,function(){var i,u;return Object(v.d)(this,function(h){switch(h.label){case 0:return w=!0,i=e,u=this.getQuery(a).lastRequestId,r>=(u||1)?g&&Object(y.s)(["client"],g)?[4,this.localState.runResolvers({document:g,remoteResult:e,context:p,variables:c}).catch(function(t){return w=!1,s(t),e})]:[3,2]:[3,3];case 1:i=h.sent(),h.label=2;case 2:if("no-cache"!==f)try{this.dataStore.markQueryResult(i,o,c,l,"ignore"===d||"all"===d)}catch(e){return w=!1,s(e),[2]}else this.setQuery(a,function(){return{newData:{result:i.data,complete:!0}}});this.queryStore.markQueryResult(a,i,l),this.invalidate(!0,a,l),this.broadcastQueries(),h.label=3;case 3:if(i.errors&&"none"===d)return w=!1,s(new Z({graphQLErrors:i.errors})),[2];if("all"===d&&(n=i.errors),l||"no-cache"===f)t=i.data;else try{t=this.dataStore.getCache().read({variables:c,query:o,optimistic:!1})}catch(e){}return w=!1,x&&k.complete(),[2]}})})},error:function(e){i.fetchQueryRejectFns.delete("fetchRequest:"+a),i.setQuery(a,function(e){return{subscriptions:e.subscriptions.filter(function(e){return e!==S})}}),s(e)},complete:function(){w||(i.fetchQueryRejectFns.delete("fetchRequest:"+a),i.setQuery(a,function(e){return{subscriptions:e.subscriptions.filter(function(e){return e!==S})}}),e({data:t,errors:n,loading:!1,networkStatus:X.ready,stale:!1})),x=!0}},S=h.subscribe(k);i.setQuery(a,function(e){return{subscriptions:e.subscriptions.concat([S])}})}).catch(function(e){throw i.fetchQueryRejectFns.delete("fetchRequest:"+a),e})},e.prototype.refetchQueryByName=function(e){var t=this,n=this.queryIdsByName[e];if(void 0!==n)return Promise.all(n.map(function(e){return t.getQuery(e).observableQuery}).filter(function(e){return!!e}).map(function(e){return e.refetch()}))},e.prototype.generateRequestId=function(){var e=this.idCounter;return this.idCounter++,e},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:[],invalidated:!1,document:null,newData:null,lastRequestId:null,observableQuery:null,subscriptions:[]}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),i=Object(v.a)({},n,t(n));this.queries.set(e,i)},e.prototype.invalidate=function(e,t,n){t&&this.setQuery(t,function(){return{invalidated:e}}),n&&this.setQuery(n,function(){return{invalidated:e}})},e.prototype.buildOperationForLink=function(e,t,n){var i=this.dataStore.getCache();return{query:i.transformForLink?i.transformForLink(e):e,variables:t,operationName:Object(y.n)(e)||void 0,context:this.prepareContext(n)}},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(v.a)({},t,{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==X.ready&&t.networkStatus!==X.error},e.prototype.startPollingQuery=function(e,t,n){var i=e.pollInterval;return Object(B.b)(i),this.ssrMode||(this.pollingInfoByQueryId.set(t,{interval:i,lastPollTimeMs:Date.now()-10,options:Object(v.a)({},e,{fetchPolicy:"network-only"})}),n&&this.addQueryListener(t,n),this.schedulePoll(i)),t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e.prototype.schedulePoll=function(e){var t=this,n=Date.now();if(this.nextPoll){if(!(e<this.nextPoll.time-n))return;clearTimeout(this.nextPoll.timeout)}this.nextPoll={time:n+e,timeout:setTimeout(function(){t.nextPoll=null;var e=1/0;t.pollingInfoByQueryId.forEach(function(n,i){if(n.interval<e&&(e=n.interval),!t.checkInFlight(i)&&Date.now()-n.lastPollTimeMs>=n.interval){var r=function(){n.lastPollTimeMs=Date.now()};t.fetchQuery(i,n.options,Q.poll).then(r,r)}}),isFinite(e)&&t.schedulePoll(e)},e)}},e}(),re=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,i,r){void 0===r&&(r=!1);var a=!Object(y.q)(e);r&&Object(y.q)(e)&&e.data&&(a=!0),!i&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(y.q)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t=this;if(e.optimisticResponse){var n;n="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse;this.cache.recordOptimisticTransaction(function(i){var r=t.cache;t.cache=i;try{t.markMutationResult({mutationId:e.mutationId,result:{data:n},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{t.cache=r}},e.mutationId)}},e.prototype.markMutationResult=function(e){var t=this;if(!Object(y.q)(e.result)){var n=[];n.push({result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),e.updateQueries&&Object.keys(e.updateQueries).filter(function(t){return e.updateQueries[t]}).forEach(function(i){var r=e.updateQueries[i],a=r.query,o=r.updater,s=t.cache.diff({query:a.document,variables:a.variables,returnPartialData:!0,optimistic:!1}),l=s.result;if(s.complete){var c=Object(y.I)(function(){return o(l,{mutationResult:e.result,queryName:Object(y.n)(a.document)||void 0,queryVariables:a.variables})});c&&n.push({result:c,dataId:"ROOT_QUERY",query:a.document,variables:a.variables})}}),this.cache.performTransaction(function(e){n.forEach(function(t){return e.write(t)})});var i=e.update;i&&this.cache.performTransaction(function(t){Object(y.I)(function(){return i(t,e.result)})})}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),ae="2.5.1",oe=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],this.clientAwareness={};var n=e.cache,i=e.ssrMode,r=void 0!==i&&i,a=e.ssrForceFetchDelay,o=void 0===a?0:a,s=e.connectToDevTools,l=e.queryDeduplication,c=void 0===l||l,u=e.defaultOptions,h=e.resolvers,d=e.typeDefs,f=e.fragmentMatcher,p=e.name,g=e.version,m=e.link;if(!m&&h&&(m=H.empty()),!m||!n)throw new B.a;var v=new Map,b=new H(function(e,t){var n=v.get(e.query);return n||(n=Object(y.D)(e.query),v.set(e.query,n),v.set(n,n)),e.query=n,t(e)});this.link=b.concat(m),this.cache=n,this.store=new re(n),this.disableNetworkFetches=r||o>0,this.queryDeduplication=c,this.ssrMode=r,this.defaultOptions=u||{},this.typeDefs=d,o&&setTimeout(function(){return t.disableNetworkFetches=!1},o),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);void 0!==s&&(s&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version=ae,p&&(this.clientAwareness.name=p),g&&(this.clientAwareness.version=g),this.localState=new ne({cache:n,client:this,resolvers:h,fragmentMatcher:f})}return e.prototype.stop=function(){this.queryManager&&this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(v.a)({},this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(v.a)({},e,{fetchPolicy:"cache-first"})),this.initQueryManager().watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(v.a)({},this.defaultOptions.query,e)),Object(B.b)("cache-and-network"!==e.fetchPolicy),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(v.a)({},e,{fetchPolicy:"cache-first"})),this.initQueryManager().query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(v.a)({},this.defaultOptions.mutate,e)),this.initQueryManager().mutate(e)},e.prototype.subscribe=function(e){return this.initQueryManager().startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.initProxy().readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.initProxy().readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.initProxy().writeQuery(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.initProxy().writeFragment(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.initProxy().writeData(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return W(this.link,e)},e.prototype.initQueryManager=function(){var e=this;return this.queryManager||(this.queryManager=new ie({link:this.link,store:this.store,queryDeduplication:this.queryDeduplication,ssrMode:this.ssrMode,clientAwareness:this.clientAwareness,localState:this.localState,onBroadcast:function(){e.devToolsHookCb&&e.devToolsHookCb({action:{},state:{queries:e.queryManager?e.queryManager.queryStore.getStore():{},mutations:e.queryManager?e.queryManager.mutationStore.getStore():{}},dataWithOptimisticResults:e.cache.extract(!0)})}})),this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager?e.queryManager.clearStore():Promise.resolve(null)}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.queryManager&&e.queryManager.reFetchObservableQueries?e.queryManager.reFetchObservableQueries():Promise.resolve(null)})},e.prototype.clearStore=function(){var e=this,t=this.queryManager;return Promise.resolve().then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))}).then(function(){return t?t.clearStore():Promise.resolve(null)})},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?this.queryManager.reFetchObservableQueries(e):Promise.resolve(null)},e.prototype.extract=function(e){return this.initProxy().extract(e)},e.prototype.restore=function(e){return this.initProxy().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.initProxy=function(){return this.proxy||(this.initQueryManager(),this.proxy=this.cache),this.proxy},e}();function se(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:le(e)}]}}function le(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return le(e[0]);var t=[];return Object.keys(e).forEach(function(n){var i={kind:"Field",name:{kind:"Name",value:n},selectionSet:le(e[n])||void 0};t.push(i)}),{kind:"SelectionSet",selections:t}}var ce,ue={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},he=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:Object(y.j)(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:Object(y.j)(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,n,i=e.id,r=e.data;if(void 0!==i){var a=null;try{a=this.read({rootId:i,optimistic:!1,query:ue})}catch(e){}var o=a&&a.__typename||"__ClientData",s=Object.assign({__typename:o},r);this.writeFragment({id:i,fragment:(t=s,n=o,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:n||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:le(t)}]}),data:s})}else this.writeQuery({query:se(r),data:r})},e}();ce||(ce={});var de=n(18),fe=new Map;if(fe.set(1,2)!==fe){var pe=fe.set;Map.prototype.set=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pe.apply(this,e),this}}var ge=new Set;if(ge.add(3)!==ge){var me=ge.add;Set.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.apply(this,e),this}}var ve={};"function"==typeof Object.freeze&&Object.freeze(ve);try{fe.set(ve,ve).delete(ve)}catch(e){var ye=function(e){return e&&function(t){try{fe.set(t,t).delete(t)}finally{return e.call(Object,t)}}};Object.freeze=ye(Object.freeze),Object.seal=ye(Object.seal),Object.preventExtensions=ye(Object.preventExtensions)}var be=!1;function xe(){var e=!be;return Object(y.z)()||(be=!0),e}var we=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,n){var i=n.store.get(e.id);return!i&&"ROOT_QUERY"===e.id||!!i&&(i.__typename&&i.__typename===t||(xe(),"heuristic"))},e}(),ke=(function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}e.prototype.match=function(e,t,n){Object(B.b)(this.isReady);var i=n.store.get(e.id);if(!i)return!1;if(Object(B.b)(i.__typename),i.__typename===t)return!0;var r=this.possibleTypesMap[t];return!!(r&&r.indexOf(i.__typename)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach(function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map(function(e){return e.name}))}),t}}(),function(){function e(){this.children=null,this.key=null}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach(function(e){t=t.getOrCreate(e)}),t.key||(t.key=Object.create(null))},e.prototype.getOrCreate=function(t){var n=this.children||(this.children=new Map),i=n.get(t);return i||n.set(t,i=new e),i},e}()),Se=Object.prototype.hasOwnProperty,Ee=function(){function e(e){void 0===e&&(e=Object.create(null));var t=this;this.data=e,this.depend=Object(de.wrap)(function(e){return t.data[e]},{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){Se.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach(function(n){t.set(n,e[n])}),Object.keys(this.data).forEach(function(n){Se.call(e,n)||t.delete(n)})):Object.keys(this.data).forEach(function(e){t.delete(e)})},e}();function Ce(e){return new Ee(e)}var Te=function(){function e(e){void 0===e&&(e=new ke);var t=this;this.cacheKeyRoot=e;var n=this,i=n.executeStoreQuery,r=n.executeSelectionSet;this.executeStoreQuery=Object(de.wrap)(function(e){return i.call(t,e)},{makeCacheKey:function(e){var t=e.query,i=e.rootValue,r=e.contextValue,a=e.variableValues,o=e.fragmentMatcher;if(r.store instanceof Ee)return n.cacheKeyRoot.lookup(t,r.store,o,JSON.stringify(a),i.id)}}),this.executeSelectionSet=Object(de.wrap)(function(e){return r.call(t,e)},{makeCacheKey:function(e){var t=e.selectionSet,i=e.rootValue,r=e.execContext;if(r.contextValue.store instanceof Ee)return n.cacheKeyRoot.lookup(t,r.contextValue.store,r.fragmentMatcher,JSON.stringify(r.variableValues),i.id)}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(Object(v.a)({},e,{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.variables,r=e.previousResult,a=e.returnPartialData,o=void 0===a||a,s=e.rootId,l=void 0===s?"ROOT_QUERY":s,c=e.fragmentMatcherFunction,u=e.config,h=Object(y.o)(n);i=Object(y.c)({},Object(y.g)(h),i);var d={store:t,dataIdFromObject:u&&u.dataIdFromObject||null,cacheRedirects:u&&u.cacheRedirects||{}},f=this.executeStoreQuery({query:n,rootValue:{type:"id",id:l,generated:!0,typename:"Query"},contextValue:d,variableValues:i,fragmentMatcher:c}),p=f.missing&&f.missing.length>0;return p&&!o&&f.missing.forEach(function(e){if(!e.tolerable)throw new B.a}),r&&Object(y.t)(r,f.result)&&(f.result=r),{result:f.result,complete:!p}},e.prototype.executeStoreQuery=function(e){var t=e.query,n=e.rootValue,i=e.contextValue,r=e.variableValues,a=e.fragmentMatcher,o=void 0===a?_e:a,s=Object(y.k)(t),l=Object(y.i)(t),c={query:t,fragmentMap:Object(y.f)(l),contextValue:i,variableValues:r,fragmentMatcher:o};return this.executeSelectionSet({selectionSet:s.selectionSet,rootValue:n,execContext:c})},e.prototype.executeSelectionSet=function(e){var t=this,n=e.selectionSet,i=e.rootValue,r=e.execContext,a=r.fragmentMap,o=r.contextValue,s=r.variableValues,l={result:null},c=[],u=o.store.get(i.id),h=u&&u.__typename||"ROOT_QUERY"===i.id&&"Query"||void 0;function d(e){var t;return e.missing&&(l.missing=l.missing||[],(t=l.missing).push.apply(t,e.missing)),e.result}return n.selections.forEach(function(e){var n;if(Object(y.F)(e,s))if(Object(y.u)(e)){var l=d(t.executeField(u,h,e,r));void 0!==l&&c.push(((n={})[Object(y.E)(e)]=l,n))}else{var f=void 0;if(Object(y.w)(e))f=e;else if(!(f=a[e.name.value]))throw new B.a;var p=f.typeCondition.name.value,g=r.fragmentMatcher(i,p,o);if(g){var m=t.executeSelectionSet({selectionSet:f.selectionSet,rootValue:i,execContext:r});"heuristic"===g&&m.missing&&(m=Object(v.a)({},m,{missing:m.missing.map(function(e){return Object(v.a)({},e,{tolerable:!0})})})),c.push(d(m))}}}),l.result=Object(y.B)(c),l},e.prototype.executeField=function(e,t,n,i){var r=i.variableValues,a=i.contextValue,o=function(e,t,n,i,r,a){a.resultKey;var o=a.directives,s=n;(i||o)&&(s=Object(y.p)(s,i,o));var l=void 0;if(e&&void 0===(l=e[s])&&r.cacheRedirects&&"string"==typeof t){var c=r.cacheRedirects[t];if(c){var u=c[n];u&&(l=u(e,i,{getCacheKey:function(e){return Object(y.H)({id:r.dataIdFromObject(e),typename:e.__typename})}}))}}if(void 0===l)return{result:l,missing:[{object:e,fieldName:s,tolerable:!1}]};Object(y.x)(l)&&(l=l.json);return{result:l}}(e,t,n.name.value,Object(y.b)(n,r),a,{resultKey:Object(y.E)(n),directives:Object(y.h)(n,r)});return Array.isArray(o.result)?this.combineExecResults(o,this.executeSubSelectedArray(n,o.result,i)):n.selectionSet?null==o.result?o:this.combineExecResults(o,this.executeSelectionSet({selectionSet:n.selectionSet,rootValue:o.result,execContext:i})):(Ae(n,o.result),o)},e.prototype.combineExecResults=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return e.forEach(function(e){e.missing&&(n=n||[]).push.apply(n,e.missing)}),{result:e.pop().result,missing:n}},e.prototype.executeSubSelectedArray=function(e,t,n){var i=this,r=null;function a(e){return e.missing&&(r=r||[]).push.apply(r,e.missing),e.result}return{result:t=t.map(function(t){return null===t?null:Array.isArray(t)?a(i.executeSubSelectedArray(e,t,n)):e.selectionSet?a(i.executeSelectionSet({selectionSet:e.selectionSet,rootValue:t,execContext:n})):(Ae(e,t),t)}),missing:r}},e}();function Ae(e,t){if(!e.selectionSet&&Object(y.v)(t))throw new B.a}function _e(){return!0}var Oe=function(){function e(e){void 0===e&&(e=Object.create(null)),this.data=e}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}();var Pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return Object(v.c)(t,e),t}(Error);var Me=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,n=e.result,i=e.store,r=void 0===i?Ce():i,a=e.variables,o=e.dataIdFromObject,s=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:n,document:t,store:r,variables:a,dataIdFromObject:o,fragmentMatcherFunction:s})},e.prototype.writeResultToStore=function(e){var t=e.dataId,n=e.result,i=e.document,r=e.store,a=void 0===r?Ce():r,o=e.variables,s=e.dataIdFromObject,l=e.fragmentMatcherFunction,c=Object(y.m)(i);try{return this.writeSelectionSetToStore({result:n,dataId:t,selectionSet:c.selectionSet,context:{store:a,processedData:{},variables:Object(y.c)({},Object(y.g)(c),o),dataIdFromObject:s,fragmentMap:Object(y.f)(Object(y.i)(i)),fragmentMatcherFunction:l}})}catch(e){throw function(e,t){var n=new Pe("Error writing result to store for query:\n "+JSON.stringify(t));return n.message+="\n"+e.message,n.stack=e.stack,n}(e,i)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,n=e.result,i=e.dataId,r=e.selectionSet,a=e.context,o=a.variables,s=a.store,l=a.fragmentMap;return r.selections.forEach(function(e){if(Object(y.F)(e,o))if(Object(y.u)(e)){var r=Object(y.E)(e),s=n[r];if(void 0!==s)t.writeFieldToStore({dataId:i,value:s,field:e,context:a});else{var c=!1,u=!1;e.directives&&e.directives.length&&(c=e.directives.some(function(e){return e.name&&"defer"===e.name.value}),u=e.directives.some(function(e){return e.name&&"client"===e.name.value})),!c&&!u&&a.fragmentMatcherFunction}}else{var h=void 0;Object(y.w)(e)?h=e:(h=(l||{})[e.name.value],Object(B.b)(h));var d=!0;if(a.fragmentMatcherFunction&&h.typeCondition){var f=Object(y.H)({id:"self",typename:void 0}),p={store:new Oe({self:n}),cacheRedirects:{}},g=a.fragmentMatcherFunction(f,h.typeCondition.name.value,p);Object(y.y)(),d=!!g}d&&t.writeSelectionSetToStore({result:n,selectionSet:h.selectionSet,dataId:i,context:a})}}),s},e.prototype.writeFieldToStore=function(e){var t,n,i,r=e.field,a=e.value,o=e.dataId,s=e.context,l=s.variables,c=s.dataIdFromObject,u=s.store,h=Object(y.G)(r,l);if(r.selectionSet&&null!==a)if(Array.isArray(a)){var d=o+"."+h;n=this.processArrayValue(a,d,r.selectionSet,s)}else{var f=o+"."+h,p=!0;if(Ie(f)||(f="$"+f),c){var g=c(a);Object(B.b)(!g||!Ie(g)),(g||"number"==typeof g&&0===g)&&(f=g,p=!1)}De(f,r,s.processedData)||this.writeSelectionSetToStore({dataId:f,result:a,selectionSet:r.selectionSet,context:s});var m=a.__typename;n=Object(y.H)({id:f,typename:m},p);var b=(i=u.get(o))&&i[h];if(b!==n&&Object(y.v)(b)){var x=void 0!==b.typename,w=void 0!==m,k=x&&w&&b.typename!==m;Object(B.b)(!p||b.generated||k),Object(B.b)(!x||w),b.generated&&(k?p||u.delete(b.id):function e(t,n,i){if(t===n)return!1;var r=i.get(t);var a=i.get(n);var o=!1;Object.keys(r).forEach(function(t){var n=r[t],s=a[t];Object(y.v)(n)&&Ie(n.id)&&Object(y.v)(s)&&!Object(y.t)(n,s)&&e(n.id,s.id,i)&&(o=!0)});i.delete(t);var s=Object(v.a)({},r,a);if(Object(y.t)(s,a))return o;i.set(n,s);return!0}(b.id,n.id,u))}}else n=null!=a&&"object"==typeof a?{type:"json",json:a}:a;(i=u.get(o))&&Object(y.t)(n,i[h])||u.set(o,Object(v.a)({},i,((t={})[h]=n,t)))},e.prototype.processArrayValue=function(e,t,n,i){var r=this;return e.map(function(e,a){if(null===e)return null;var o=t+"."+a;if(Array.isArray(e))return r.processArrayValue(e,o,n,i);var s=!0;if(i.dataIdFromObject){var l=i.dataIdFromObject(e);l&&(o=l,s=!1)}return De(o,n,i.processedData)||r.writeSelectionSetToStore({dataId:o,result:e,selectionSet:n,context:i}),Object(y.H)({id:o,typename:e.__typename},s)})},e}();function Ie(e){return"$"===e[0]}function De(e,t,n){if(!n)return!1;if(n[e]){if(n[e].indexOf(t)>=0)return!0;n[e].push(t)}else n[e]=[t];return!1}var Ne={fragmentMatcher:new we,dataIdFromObject:function(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null},addTypename:!0,resultCaching:!0};var Le=Object.prototype.hasOwnProperty,Re=function(e){function t(t,n,i){var r=e.call(this,Object.create(null))||this;return r.optimisticId=t,r.parent=n,r.transaction=i,r}return Object(v.c)(t,e),t.prototype.toObject=function(){return Object(v.a)({},this.parent.toObject(),this.data)},t.prototype.get=function(e){return Le.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(Oe),Fe=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n.watches=new Set,n.typenameDocumentCache=new Map,n.cacheKeyRoot=new ke,n.silenceBroadcast=!1,n.config=Object(v.a)({},Ne,t),n.config.customResolvers&&(n.config.cacheRedirects=n.config.customResolvers),n.config.cacheResolvers&&(n.config.cacheRedirects=n.config.cacheResolvers),n.addTypename=n.config.addTypename,n.data=n.config.resultCaching?new Ee:new Oe,n.optimisticData=n.data,n.storeReader=new Te(n.cacheKeyRoot),n.storeWriter=new Me;var i=n,r=i.maybeBroadcastWatch;return n.maybeBroadcastWatch=Object(de.wrap)(function(e){return r.call(n,e)},{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return i.data instanceof Ee?i.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),n}return Object(v.c)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){return"string"==typeof e.rootId&&void 0===this.data.get(e.rootId)?null:this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:this.config.fragmentMatcher.match,previousResult:e.previousResult,config:this.config})},t.prototype.write=function(e){this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:this.config.fragmentMatcher.match}),this.broadcastWatches()},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:this.config.fragmentMatcher.match,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new B.a},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],n=0,i=this.optimisticData;i instanceof Re;)i.optimisticId===e?++n:t.push(i),i=i.parent;if(n>0){for(this.optimisticData=i;t.length>0;){var r=t.pop();this.performTransaction(r.transaction,r.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var n=this.data,i=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new Re(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=i,this.data=n}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Object(y.a)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach(function(t){return e.maybeBroadcastWatch(t)})},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(he),je=n(42),ze={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Ye=function(e,t,n){var i=new Error(n);throw i.name="ServerError",i.response=e,i.statusCode=e.status,i.result=t,i},He=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var i=new je.a(2);throw i.parseError=e,i}return n},We=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,i=e.fetch,r=e.includeExtensions,a=e.useGETForQueries,o=Object(v.e)(e,["uri","fetch","includeExtensions","useGETForQueries"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new je.a(1)}(i),i||(i=fetch);var s={http:{includeExtensions:r},options:o.fetchOptions,credentials:o.credentials,headers:o.headers};return new H(function(e){var t=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")}(e,n),r=e.getContext(),o={};if(r.clientAwareness){var l=r.clientAwareness,c=l.name,u=l.version;c&&(o["apollographql-client-name"]=c),u&&(o["apollographql-client-version"]=u)}var h,d=Object(v.a)({},o,r.headers),f={http:r.http,options:r.fetchOptions,credentials:r.credentials,headers:d},p=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=Object(v.a)({},t.options,{headers:t.headers,credentials:t.credentials}),a=t.http;n.forEach(function(e){r=Object(v.a)({},r,e.options,{headers:Object(v.a)({},r.headers,e.headers)}),e.credentials&&(r.credentials=e.credentials),a=Object(v.a)({},a,e.http)});var o=e.operationName,s=e.extensions,l=e.variables,c=e.query,u={operationName:o,variables:l};return a.includeExtensions&&(u.extensions=s),a.includeQuery&&(u.query=E(c)),{options:r,body:u}}(e,ze,s,f),g=p.options,m=p.body;if(!g.signal){var y=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),b=y.controller,w=y.signal;(h=b)&&(g.signal=w)}if(a&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(g.method="GET"),"GET"===g.method){var k=function(e,t){var n=[],i=function(e,t){n.push(e+"="+encodeURIComponent(t))};"query"in t&&i("query",t.query);t.operationName&&i("operationName",t.operationName);if(t.variables){var r=void 0;try{r=He(t.variables,"Variables map")}catch(e){return{parseError:e}}i("variables",r)}if(t.extensions){var a=void 0;try{a=He(t.extensions,"Extensions map")}catch(e){return{parseError:e}}i("extensions",a)}var o="",s=e,l=e.indexOf("#");-1!==l&&(o=e.substr(l),s=e.substr(0,l));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+o}}(t,m),S=k.newURI,C=k.parseError;if(C)return N(C);t=S}else try{g.body=He(m,"Payload")}catch(C){return N(C)}return new x(function(n){var r;return i(t,g).then(function(t){return e.setContext({response:t}),t}).then((r=e,function(e){return e.text().then(function(t){try{return JSON.parse(t)}catch(i){var n=i;return n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,Promise.reject(n)}}).then(function(t){return e.status>=300&&Ye(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||Ye(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map(function(e){return e.operationName}):r.operationName)+"'."),t})})).then(function(e){return n.next(e),n.complete(),e}).catch(function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))}),function(){h&&h.abort()}})})};var Xe=function(e){function t(t){return e.call(this,We(t).request)||this}return Object(v.c)(t,e),t}(H);function Ve(e){return new H(function(t,n){return new x(function(i){var r,a,o;try{r=n(t).subscribe({next:function(r){r.errors&&(o=e({graphQLErrors:r.errors,response:r,operation:t,forward:n}))?a=o.subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}):i.next(r)},error:function(r){(o=e({operation:t,networkError:r,graphQLErrors:r&&r.result&&r.result.errors,forward:n}))?a=o.subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}):i.error(r)},complete:function(){o||i.complete.bind(i)()}})}catch(r){e({networkError:r,operation:t,forward:n}),i.error(r)}return function(){r&&r.unsubscribe(),a&&r.unsubscribe()}})})}!function(e){function t(t){var n=e.call(this)||this;return n.link=Ve(t),n}Object(v.c)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(H);var Be=n(56),qe=n.n(Be),Ue=["request","uri","credentials","headers","fetch","fetchOptions","clientState","onError","cacheRedirects","cache","name","version","resolvers","typeDefs","fragmentMatcher"],Ge=function(e){function t(t){void 0===t&&(t={});t&&Object.keys(t).filter(function(e){return-1===Ue.indexOf(e)}).length;var n=t.request,i=t.uri,r=t.credentials,a=t.headers,o=t.fetch,s=t.fetchOptions,l=t.clientState,c=t.cacheRedirects,u=t.onError,h=t.name,d=t.version,f=t.resolvers,p=t.typeDefs,g=t.fragmentMatcher,m=t.cache;Object(B.b)(!m||!c),m||(m=c?new Fe({cacheRedirects:c}):new Fe);var v=Ve(u||function(e){var t=e.graphQLErrors;e.networkError;t&&t.map(function(e){e.message,e.locations,e.path;return!0})}),y=!!n&&new H(function(e,t){return new x(function(i){var r;return Promise.resolve(e).then(function(e){return n(e)}).then(function(){r=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})}).catch(i.error.bind(i)),function(){r&&r.unsubscribe()}})}),b=new Xe({uri:i||"/graphql",fetch:o,fetchOptions:s||{},credentials:r||"same-origin",headers:a||{}}),w=H.from([v,y,b].filter(function(e){return!!e})),k=f,S=p,E=g;return l&&(l.defaults&&m.writeData({data:l.defaults}),k=l.resolvers,S=l.typeDefs,E=l.fragmentMatcher),e.call(this,{cache:m,link:w,name:h,version:d,resolvers:k,typeDefs:S,fragmentMatcher:E})||this}return Object(v.c)(t,e),t}(oe),Qe=n(0),$e=n.n(Qe),Ze=n(9),Ke=n.n(Ze),Je=n(61),et=n.n(Je),tt=n(4),nt=n(7),it=n(43),rt=n.n(it),at=(n(19),Qe.createContext?Object(Qe.createContext)(void 0):null),ot=function(e,t){function n(t){if(!t||!t.client)throw new nt.a;return e.children(t.client)}return at?Object(Qe.createElement)(at.Consumer,null,n):n(t)};ot.contextTypes={client:tt.object.isRequired},ot.propTypes={children:tt.func.isRequired};var st,lt=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.operations=new Map,Object(nt.b)(t.client),t.client.__operations_cache__||(t.client.__operations_cache__=i.operations),i}return Object(v.c)(t,e),t.prototype.getChildContext=function(){return{client:this.props.client,operations:this.props.client.__operations_cache__}},t.prototype.render=function(){return at?Object(Qe.createElement)(at.Provider,{value:this.getChildContext()},this.props.children):this.props.children},t.propTypes={client:tt.object.isRequired,children:tt.node.isRequired},t.childContextTypes={client:tt.object.isRequired,operations:tt.object},t}(Qe.Component);!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(st||(st={}));var ct=new Map;function ut(e){var t,n,i=ct.get(e);if(i)return i;Object(nt.b)(!!e&&!!e.kind);var r=e.definitions.filter(function(e){return"FragmentDefinition"===e.kind}),a=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"query"===e.operation}),o=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}),s=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation});Object(nt.b)(!r.length||a.length||o.length||s.length),Object(nt.b)(a.length+o.length+s.length<=1),n=a.length?st.Query:st.Mutation,a.length||o.length||(n=st.Subscription);var l=a.length?a:o.length?o:s;Object(nt.b)(1===l.length);var c=l[0];t=c.variableDefinitions||[];var u={name:c.name&&"Name"===c.name.kind?c.name.value:"data",type:n,variables:t};return ct.set(e,u),u}function ht(e,t){var n=e.client||t.client;return Object(nt.b)(!!n),n}var dt=Object.prototype.hasOwnProperty;function ft(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function pt(e){return null!==e&&"object"==typeof e}function gt(e,t){if(ft(e,t))return!0;if(!pt(e)||!pt(t))return!1;var n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(function(n){return dt.call(t,n)&&ft(e[n],t[n])})}var mt=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.previousData={},i.hasMounted=!1,i.lastResult=null,i.startQuerySubscription=function(e){if(void 0===e&&(e=!1),e||(i.lastResult=i.queryObservable.getLastResult()),!i.querySubscription){var t=i.getQueryResult();i.querySubscription=i.queryObservable.subscribe({next:function(e){var n=e.loading,r=e.networkStatus,a=e.data;t&&7===t.networkStatus&&gt(t.data,a)?t=void 0:i.lastResult&&i.lastResult.loading===n&&i.lastResult.networkStatus===r&&gt(i.lastResult.data,a)||(t=void 0,i.lastResult&&(i.lastResult=i.queryObservable.getLastResult()),i.updateCurrentData())},error:function(e){if(i.lastResult||i.resubscribeToQuery(),!e.hasOwnProperty("graphQLErrors"))throw e;i.updateCurrentData()}})}},i.removeQuerySubscription=function(){i.querySubscription&&(i.lastResult=i.queryObservable.getLastResult(),i.querySubscription.unsubscribe(),delete i.querySubscription)},i.updateCurrentData=function(){i.handleErrorOrCompleted(),i.hasMounted&&i.forceUpdate()},i.handleErrorOrCompleted=function(){var e=i.queryObservable.currentResult(),t=e.data,n=e.loading,r=e.error,a=i.props,o=a.onCompleted,s=a.onError;!o||n||r?s&&!n&&r&&s(r):o(t)},i.getQueryResult=function(){var e,t={data:Object.create(null)};if(Object.assign(t,{variables:(e=i.queryObservable).variables,refetch:e.refetch.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}),i.props.skip)t=Object(v.a)({},t,{data:void 0,error:void 0,loading:!1});else{var n=i.queryObservable.currentResult(),r=n.loading,a=n.partial,o=n.networkStatus,s=n.errors,l=n.error;s&&s.length>0&&(l=new Z({graphQLErrors:s}));var c=i.queryObservable.options.fetchPolicy;if(Object.assign(t,{loading:r,networkStatus:o,error:l}),r)Object.assign(t.data,i.previousData,n.data);else if(l)Object.assign(t,{data:(i.queryObservable.getLastResult()||{}).data});else if("no-cache"===c&&0===Object.keys(n.data).length)t.data=i.previousData;else{if(i.props.partialRefetch&&0===Object.keys(n.data).length&&a&&"cache-only"!==c)return Object.assign(t,{loading:!0,networkStatus:X.loading}),t.refetch(),t;Object.assign(t.data,n.data),i.previousData=n.data}}if(!i.querySubscription){var u=t.refetch;t.refetch=function(e){return i.querySubscription?u(e):new Promise(function(t,n){i.refetcherQueue={resolve:t,reject:n,args:e}})}}return t.client=i.client,t},i.client=ht(t,n),i.initializeQueryObservable(t),i}return Object(v.c)(t,e),t.prototype.fetchData=function(){if(this.props.skip)return!1;var e=this.props,t=(e.children,e.ssr),n=(e.displayName,e.skip,e.client,e.onCompleted,e.onError,e.partialRefetch,Object(v.e)(e,["children","ssr","displayName","skip","client","onCompleted","onError","partialRefetch"])),i=n.fetchPolicy;if(!1===t)return!1;"network-only"!==i&&"cache-and-network"!==i||(i="cache-first");var r=this.client.watchQuery(Object(v.a)({},n,{fetchPolicy:i}));return this.context&&this.context.renderPromises&&this.context.renderPromises.registerSSRObservable(this,r),!!this.queryObservable.currentResult().loading&&r.result()},t.prototype.componentDidMount=function(){if(this.hasMounted=!0,!this.props.skip&&(this.startQuerySubscription(!0),this.refetcherQueue)){var e=this.refetcherQueue,t=e.args,n=e.resolve,i=e.reject;this.queryObservable.refetch(t).then(n).catch(i)}},t.prototype.componentWillReceiveProps=function(e,t){if(!e.skip||this.props.skip){var n=ht(e,t);gt(this.props,e)&&this.client===n||(this.client!==n&&(this.client=n,this.removeQuerySubscription(),this.queryObservable=null,this.previousData={},this.updateQuery(e)),this.props.query!==e.query&&this.removeQuerySubscription(),this.updateQuery(e),e.skip||this.startQuerySubscription())}else this.removeQuerySubscription()},t.prototype.componentWillUnmount=function(){this.removeQuerySubscription(),this.hasMounted=!1},t.prototype.componentDidUpdate=function(e){(!rt()(e.query,this.props.query)||!rt()(e.variables,this.props.variables))&&this.handleErrorOrCompleted()},t.prototype.render=function(){var e=this,t=this.context,n=function(){return e.props.children(e.getQueryResult())};return t&&t.renderPromises?t.renderPromises.addQueryPromise(this,n):n()},t.prototype.extractOptsFromProps=function(e){this.operation=ut(e.query),Object(nt.b)(this.operation.type===st.Query);var t=e.displayName||"Query";return Object(v.a)({},e,{displayName:t,context:e.context||{},metadata:{reactComponent:{displayName:t}}})},t.prototype.initializeQueryObservable=function(e){var t=this.extractOptsFromProps(e);this.setOperations(t),this.context&&this.context.renderPromises&&(this.queryObservable=this.context.renderPromises.getSSRObservable(this)),this.queryObservable||(this.queryObservable=this.client.watchQuery(t))},t.prototype.setOperations=function(e){this.context.operations&&this.context.operations.set(this.operation.name,{query:e.query,variables:e.variables})},t.prototype.updateQuery=function(e){this.queryObservable?this.setOperations(e):this.initializeQueryObservable(e),this.queryObservable.setOptions(this.extractOptsFromProps(e)).catch(function(){return null})},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.queryObservable.getLastError(),t=this.queryObservable.getLastResult();this.queryObservable.resetLastResults(),this.startQuerySubscription(),Object.assign(this.queryObservable,{lastError:e,lastResult:t})},t.contextTypes={client:tt.object,operations:tt.object,renderPromises:tt.object},t.propTypes={client:tt.object,children:tt.func.isRequired,fetchPolicy:tt.string,notifyOnNetworkStatusChange:tt.bool,onCompleted:tt.func,onError:tt.func,pollInterval:tt.number,query:tt.object.isRequired,variables:tt.object,ssr:tt.bool,partialRefetch:tt.bool},t}(Qe.Component),vt={loading:!1,called:!1,error:void 0,data:void 0};(function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.hasMounted=!1,i.runMutation=function(e){void 0===e&&(e={}),i.onMutationStart();var t=i.generateNewMutationId();return i.mutate(e).then(function(e){return i.onMutationCompleted(e,t),e}).catch(function(e){if(i.onMutationError(e,t),!i.props.onError)throw e})},i.mutate=function(e){var t=i.props,n=t.mutation,r=t.variables,a=t.optimisticResponse,o=t.update,s=t.context,l=void 0===s?{}:s,c=t.awaitRefetchQueries,u=void 0!==c&&c,h=t.fetchPolicy,d=Object(v.a)({},e),f=d.refetchQueries||i.props.refetchQueries;f&&f.length&&Array.isArray(f)&&(f=f.map(function(e){return"string"==typeof e&&i.context.operations&&i.context.operations.get(e)||e}),delete d.refetchQueries);var p=Object.assign({},r,d.variables);return delete d.variables,i.client.mutate(Object(v.a)({mutation:n,optimisticResponse:a,refetchQueries:f,awaitRefetchQueries:u,update:o,context:l,fetchPolicy:h,variables:p},d))},i.onMutationStart=function(){i.state.loading||i.props.ignoreResults||i.setState({loading:!0,error:void 0,data:void 0,called:!0})},i.onMutationCompleted=function(e,t){var n=i.props,r=n.onCompleted,a=n.ignoreResults,o=e.data,s=e.errors,l=s&&s.length>0?new Z({graphQLErrors:s}):void 0,c=function(){return r?r(o):null};i.hasMounted&&i.isMostRecentMutation(t)&&!a?i.setState({loading:!1,data:o,error:l},c):c()},i.onMutationError=function(e,t){var n=i.props.onError,r=function(){return n?n(e):null};i.hasMounted&&i.isMostRecentMutation(t)?i.setState({loading:!1,error:e},r):r()},i.generateNewMutationId=function(){return i.mostRecentMutationId=i.mostRecentMutationId+1,i.mostRecentMutationId},i.isMostRecentMutation=function(e){return i.mostRecentMutationId===e},i.verifyDocumentIsMutation=function(e){var t=ut(e);Object(nt.b)(t.type===st.Mutation)},i.client=ht(t,n),i.verifyDocumentIsMutation(t.mutation),i.mostRecentMutationId=0,i.state=vt,i}Object(v.c)(t,e),t.prototype.componentDidMount=function(){this.hasMounted=!0},t.prototype.componentWillUnmount=function(){this.hasMounted=!1},t.prototype.componentWillReceiveProps=function(e,t){var n=ht(e,t);gt(this.props,e)&&this.client===n||(this.props.mutation!==e.mutation&&this.verifyDocumentIsMutation(e.mutation),this.client!==n&&(this.client=n,this.setState(vt)))},t.prototype.render=function(){var e=this.props.children,t=this.state,n=t.loading,i=t.data,r=t.error,a={called:t.called,loading:n,data:i,error:r,client:this.client};return e(this.runMutation,a)},t.contextTypes={client:tt.object,operations:tt.object},t.propTypes={mutation:tt.object.isRequired,variables:tt.object,optimisticResponse:tt.object,refetchQueries:Object(tt.oneOfType)([Object(tt.arrayOf)(Object(tt.oneOfType)([tt.string,tt.object])),tt.func]),awaitRefetchQueries:tt.bool,update:tt.func,children:tt.func.isRequired,onCompleted:tt.func,onError:tt.func,fetchPolicy:tt.string}})(Qe.Component),function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.initialize=function(e){i.queryObservable||(i.queryObservable=i.client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},i.startSubscription=function(){i.querySubscription||(i.querySubscription=i.queryObservable.subscribe({next:i.updateCurrentData,error:i.updateError,complete:i.completeSubscription}))},i.getInitialState=function(){return{loading:!0,error:void 0,data:void 0}},i.updateCurrentData=function(e){var t=i,n=t.client,r=t.props.onSubscriptionData;r&&r({client:n,subscriptionData:e}),i.setState({data:e.data,loading:!1,error:void 0})},i.updateError=function(e){i.setState({error:e,loading:!1})},i.completeSubscription=function(){var e=i.props.onSubscriptionComplete;e&&e(),i.endSubscription()},i.endSubscription=function(){i.querySubscription&&(i.querySubscription.unsubscribe(),delete i.querySubscription)},i.client=ht(t,n),i.initialize(t),i.state=i.getInitialState(),i}Object(v.c)(t,e),t.prototype.componentDidMount=function(){this.startSubscription()},t.prototype.componentWillReceiveProps=function(e,t){var n=ht(e,t);if(!gt(this.props.variables,e.variables)||this.client!==n||this.props.subscription!==e.subscription){var i=e.shouldResubscribe;"function"==typeof i&&(i=!!i(this.props,e));var r=!1===i;if(this.client!==n&&(this.client=n),!r)return this.endSubscription(),delete this.queryObservable,this.initialize(e),this.startSubscription(),void this.setState(this.getInitialState());this.initialize(e),this.startSubscription()}},t.prototype.componentWillUnmount=function(){this.endSubscription()},t.prototype.render=function(){var e=this.props.children;return e?e(Object.assign({},this.state,{variables:this.props.variables})):null},t.contextTypes={client:tt.object},t.propTypes={subscription:tt.object.isRequired,variables:tt.object,children:tt.func,onSubscriptionData:tt.func,onSubscriptionComplete:tt.func,shouldResubscribe:Object(tt.oneOfType)([tt.func,tt.bool])}}(Qe.Component);!function(e){function t(t){var n=e.call(this,t)||this;return n.withRef=!1,n.setWrappedInstance=n.setWrappedInstance.bind(n),n}Object(v.c)(t,e),t.prototype.getWrappedInstance=function(){return Object(nt.b)(this.withRef),this.wrappedInstance},t.prototype.setWrappedInstance=function(e){this.wrappedInstance=e}}(Qe.Component);!function(){function e(){this.queryPromises=new Map,this.queryInfoTrie=new Map}e.prototype.registerSSRObservable=function(e,t){this.lookupQueryInfo(e).observable=t},e.prototype.getSSRObservable=function(e){return this.lookupQueryInfo(e).observable},e.prototype.addQueryPromise=function(e,t){return this.lookupQueryInfo(e).seen?t():(this.queryPromises.set(e,new Promise(function(t){t(e.fetchData())})),null)},e.prototype.hasPromises=function(){return this.queryPromises.size>0},e.prototype.consumeAndAwaitPromises=function(){var e=this,t=[];return this.queryPromises.forEach(function(n,i){e.lookupQueryInfo(i).seen=!0,t.push(n)}),this.queryPromises.clear(),Promise.all(t)},e.prototype.lookupQueryInfo=function(e){var t=this.queryInfoTrie,n=e.props,i=n.query,r=n.variables,a=t.get(i)||new Map;t.has(i)||t.set(i,a);var o=JSON.stringify(r),s=a.get(o)||{seen:!1,observable:null};return a.has(o)||a.set(o,s),s}}();function yt(){var e=m(["\n  query getAnalytics($span: Int!) {\n    analytics(span: $span) {\n      users {\n        current\n        previous\n      }\n      threads {\n        current\n        previous\n      }\n      posts {\n        current\n        previous\n      }\n      attachments {\n        current\n        previous\n      }\n      dataDownloads {\n        current\n        previous\n      }\n    }\n  }\n"]);return yt=function(){return e},e}var bt=qe()(yt()),xt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={span:30},n.setSpan=function(e){n.setState({span:e})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.errorMessage,n=e.labels,i=e.title,r=this.state.span;return $e.a.createElement("div",{className:"card card-admin-info"},$e.a.createElement("div",{className:"card-body"},$e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col"},$e.a.createElement("h4",{className:"card-title"},i)),$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(wt,{span:r,setSpan:this.setSpan})))),$e.a.createElement(mt,{query:bt,variables:{span:r}},function(e){var i=e.loading,a=e.error,o=e.data;if(i)return $e.a.createElement(kt,null);if(a)return $e.a.createElement(St,{message:t});var s=o.analytics;return $e.a.createElement($e.a.Fragment,null,$e.a.createElement(Et,{data:s.users,name:n.users,span:r}),$e.a.createElement(Et,{data:s.threads,name:n.threads,span:r}),$e.a.createElement(Et,{data:s.posts,name:n.posts,span:r}),$e.a.createElement(Et,{data:s.attachments,name:n.attachments,span:r}),$e.a.createElement(Et,{data:s.dataDownloads,name:n.dataDownloads,span:r}))}))}}]),t}(),wt=function(e){var t=e.span,n=e.setSpan;return $e.a.createElement("div",null,[30,90,180,360].map(function(e){return $e.a.createElement("button",{key:e,className:e===t?"btn btn-primary btn-sm ml-3":"btn btn-light btn-sm ml-3",type:"button",onClick:function(){return n(e)}},e)}))},kt=function(){return $e.a.createElement("div",{className:"card-body border-top"},$e.a.createElement("div",{className:"text-center py-5"},$e.a.createElement("div",{className:"spinner-border text-light",role:"status"},$e.a.createElement("span",{className:"sr-only"},"Loading..."))))},St=function(e){var t=e.message;return $e.a.createElement("div",{className:"card-body border-top"},$e.a.createElement("div",{className:"text-center py-5"},t))},Et=function(e){var t=e.data,n=(e.legend,e.name),i=e.span,r={legend:{show:!1},chart:{animations:{enabled:!1},parentHeightOffset:0,toolbar:{show:!1}},colors:["#6554c0","#b3d4ff"],grid:{padding:{top:0}},stroke:{width:2},tooltip:{x:{show:!1},y:{title:{formatter:function(e,t){var n=t.dataPointIndex,r=o()();return"P"===e&&r.subtract(i,"days"),r.subtract(i-n-1,"days"),r.format("ll")}}}},xaxis:{axisBorder:{show:!1},axisTicks:{show:!1},labels:{show:!1},categories:[],tooltip:{enabled:!1}},yaxis:{tickAmount:2,max:function(e){return e||1},show:!1}},a=[{name:"C",data:t.current},{name:"P",data:t.previous}];return $e.a.createElement("div",{className:"card-body border-top pb-1"},$e.a.createElement("h5",{className:"m-0"},n),$e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(Ct,{data:t})),$e.a.createElement("div",{className:"col"},$e.a.createElement(Tt,null,function(e){var t=e.width;return t>1&&$e.a.createElement(et.a,{options:r,series:a,type:"line",width:t,height:140})}))))},Ct=function(e){var t=e.data,n=t.current.reduce(function(e,t){return e+t}),i=n-t.previous.reduce(function(e,t){return e+t}),r="text-light",a="fas fa-equals";return i>0&&(r="text-success",a="fas fa-chevron-up"),i<0&&(r="text-danger",a="fas fa-chevron-down"),$e.a.createElement("div",{className:"card-admin-analytics-summary"},$e.a.createElement("div",null,n),$e.a.createElement("small",{className:r},$e.a.createElement("span",{className:a})," ",Math.abs(i)))},Tt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={width:1,height:1},n.element=$e.a.createRef(),n.updateSize=function(){n.setState({width:n.element.current.clientWidth,height:n.element.current.clientHeight})},n}return g(t,$e.a.Component),c(t,[{key:"componentDidMount",value:function(){this.timer=window.setInterval(this.updateSize,3e3),this.updateSize()}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.timer)}},{key:"render",value:function(){return $e.a.createElement("div",{className:"card-admin-analytics-chart",ref:this.element},this.props.children(this.state))}}]),t}(),At=function(e){var t=e.elementId,n=e.errorMessage,i=e.labels,r=e.title,a=e.uri,o=document.getElementById(t);o||console.error("Element with id "+o+"doesn't exist!");var s=new Ge({credentials:"same-origin",uri:a});Ke.a.render($e.a.createElement(lt,{client:s},$e.a.createElement(xt,{errorMessage:n,labels:i,title:r})),o)},_t=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={value:n.props.value},n.onChange=function(e){var t=e.target;n.setState({value:t.value})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){return $e.a.createElement("div",{className:"row"},$e.a.createElement("div",{className:"col-auto pr-0"},$e.a.createElement("input",{type:"color",className:"form-control",style:{width:"48px"},value:Pt(this.state.value),onChange:this.onChange})),$e.a.createElement("div",{className:"col"},$e.a.createElement("input",{type:"text",className:"form-control",name:this.props.name,value:this.state.value,onChange:this.onChange})))}}]),t}(),Ot=/^#[0-9a-fA-F]{6}$/,Pt=function(e){return Ot.test(e)?e:"#ffffff"},Mt=function(e){var t=e.elementId,n=document.getElementById(t);n||console.error("Element with id "+n+"doesn't exist!");var i=n.name,r=n.value,a=document.createElement("div");n.parentNode.insertBefore(a,n),n.remove(),Ke.a.render($e.a.createElement(_t,{name:i,value:r}),a)},It=(n(16),function(e,t){var n=document.querySelectorAll(e),i=function(e){if(!window.confirm(t))return e.preventDefault(),!1};n.forEach(function(e){var t="form"===e.tagName.toLowerCase()?"submit":"click";e.addEventListener(t,i)})}),Dt=(n(110),function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={defaultValue:n.props.value,value:n.props.value},n.setNever=function(){n.setState({value:null})},n.setInitialValue=function(){n.setState(function(e){var t=e.defaultValue;e.value;if(t)return{value:t};var n=o()();return n.add(1,"hour"),{value:n}})},n.setValue=function(e){n.setState({value:e})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.never,i=e.setDate,r=this.state.value;return $e.a.createElement("div",{onBlur:this.handleBlur,onFocus:this.handleFocus},$e.a.createElement("input",{type:"hidden",name:t,value:r?r.format():""}),$e.a.createElement("div",null,$e.a.createElement("button",{className:Nt(null===r),type:"button",onClick:this.setNever},n),$e.a.createElement("button",{className:Nt(null!==r)+" ml-3",type:"button",onClick:this.setInitialValue},r?r.format("L LT"):i)),$e.a.createElement(Lt,{value:r,onChange:this.setValue}))}}]),t}()),Nt=function(e){return e?"btn btn-outline-primary btn-sm":"btn btn-outline-secondary btn-sm"},Lt=function(e){var t=e.value,n=e.onChange;return t?$e.a.createElement("div",{className:"row mt-3"},$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(jt,{value:t,onChange:n})),$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(Wt,{value:t,onChange:n}))):null},Rt=[1,2,3,4,5,6],Ft=[1,2,3,4,5,6,7],jt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).decreaseMonth=function(){n.setState(function(e,t){var n=t.value.clone();n.subtract(1,"month"),t.onChange(n)})},n.increaseMonth=function(){n.setState(function(e,t){var n=t.value.clone();n.add(1,"month"),t.onChange(n)})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,i=t.clone().startOf("month").isoWeekday(),r=t.clone();return r.date(1),r.hour(t.hour()),r.minute(t.minute()),r.subtract(i+1,"day"),$e.a.createElement("div",{className:"control-month-picker"},$e.a.createElement(zt,{decreaseMonth:this.decreaseMonth,increaseMonth:this.increaseMonth,value:t}),$e.a.createElement(Yt,null),Rt.map(function(e){return $e.a.createElement("div",{className:"row align-items-center m-0",key:e},Ft.map(function(e){return $e.a.createElement(Ht,{calendar:r,key:e,value:t,onSelect:n})}))}))}}]),t}(),zt=function(e){var t=e.decreaseMonth,n=e.increaseMonth,i=e.value;return $e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col-auto text-center"},$e.a.createElement("button",{className:"btn btn-block py-1 px-3",type:"button",onClick:t},$e.a.createElement("span",{className:"fas fa-chevron-left"}))),$e.a.createElement("div",{className:"col text-center font-weight-bold"},i.format("MMMM YYYY")),$e.a.createElement("div",{className:"col-auto text-center"},$e.a.createElement("button",{className:"btn btn-block py-1 px-3",type:"button",onClick:n},$e.a.createElement("span",{className:"fas fa-chevron-right"}))))},Yt=function(){return $e.a.createElement("div",{className:"row align-items-center m-0"},o.a.weekdaysMin(!1).map(function(e,t){return $e.a.createElement("div",{className:"col text-center px-1 "+(0===t?"text-danger":"text-muted"),key:e},e)}))},Ht=function(e){var t=e.calendar,n=e.value,i=e.onSelect;t.add(1,"day");var r=t.clone(),a=r.format("D M Y")===n.format("D M Y");return $e.a.createElement("div",{className:"col text-center px-1"},$e.a.createElement("button",{className:"btn btn-sm btn-block px-0"+(a?" btn-primary":""),type:"button",onClick:function(){return i(r)},disabled:r.month()!==n.month()},r.format("D")))},Wt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).handleHourChange=function(e){var t=e.target.value;t.match(/^[0-2][0-9]?[0-9]?$/)&&n.setState(function(e,n){var i=Xt(t,2),r=n.value.clone();r.hour(i),n.onChange(r)})},n.handleMinuteChange=function(e){var t=e.target.value;t.match(/^[0-5][0-9]?[0-9]?$/)&&n.setState(function(e,n){var i=Xt(t,5),r=n.value.clone();r.minute(i),n.onChange(r)})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){return $e.a.createElement("div",{className:"control-time-picker"},$e.a.createElement("div",{className:"row align-items-center m-0"},$e.a.createElement("div",{className:"col px-0"},$e.a.createElement(Vt,{format:"HH",value:this.props.value,onChange:this.handleHourChange})),$e.a.createElement("div",{className:"col-auto px-0"},$e.a.createElement("span",null,":")),$e.a.createElement("div",{className:"col px-0"},$e.a.createElement(Vt,{format:"mm",value:this.props.value,onChange:this.handleMinuteChange}))))}}]),t}(),Xt=function(e,t){var n=e;return 3===n.length&&(n=n.substring(1,3),parseInt(n[0])>t&&(n=t+""+n[1])),n},Vt=function(e){var t=e.format,n=e.value,i=e.onChange;return $e.a.createElement("input",{className:"form-control text-center",placeholder:"00",type:"text",value:n.format(t),onChange:i})},Bt=function(e){var t=e.elementId,n=e.never,i=e.setDate,r=document.getElementById(t);r||console.error("Element with id "+r+"doesn't exist!"),r.type="hidden";var a=r.name,s=r.value.length?o()(r.value):null;s&&s.local();var l=document.createElement("div");r.parentNode.insertBefore(l,r),r.remove(),Ke.a.render($e.a.createElement(Dt,{name:a,never:n,value:s,setDate:i}),l)},qt=function(e,t,n){document.querySelectorAll(e).forEach(function(e){e.addEventListener(t,n)})},Ut=function(e,t){var n=document.querySelector("#mass-action .dropdown-toggle"),i=n.querySelector("span:last-child"),r=function(){var r=document.querySelectorAll(".row-select input:checked");n.disabled=0===r.length,r.length?i.textContent=t.replace("0",r.length):i.textContent=e};r(),qt(".row-select input","change",function(){r()}),qt("#mass-action [data-confirmation]","click",function(e){if(!window.confirm(e.target.dataset.confirmation))return e.preventDefault(),!1})},Gt=function(e,t){var n=e.querySelector("form");if(null!==n){var i=n.querySelector("button"),r=e.querySelector("th input[type=checkbox]"),a=e.querySelectorAll("td input[type=checkbox]"),o=function(){var t=e.querySelectorAll("td input:checked");r.checked=a.length===t.length,i.disabled=0===t.length};o(),r.addEventListener("change",function(e){a.forEach(function(t){return t.checked=e.target.checked}),o()}),a.forEach(function(e){e.addEventListener("change",o)}),n.addEventListener("submit",function(n){if(0===e.querySelectorAll("td input:checked").length||!window.confirm(t))return n.preventDefault(),!1})}},Qt=function(e){document.querySelectorAll(".card-admin-table").forEach(function(t){return Gt(t,e)})},$t=function(e){var t=o()(e.dataset.timestamp);e.title=t.format("LLLL"),r()(e).tooltip()},Zt=function(e){var t=o()();e.forEach(function(e){Kt(e,t)})},Kt=function(e,t){var n=o()(e.dataset.timestamp);if(Math.abs(n.diff(t,"seconds"))<21600)e.textContent=n.from(t);else{var i=Math.abs(n.diff(t,"days"));e.textContent=i<5?n.calendar(t):n.format(e.dataset.format)}},Jt=function(){var e=document.querySelectorAll("[data-timestamp]");e.forEach($t),Zt(e),window.setInterval(function(){Zt(e)},2e4)},en=function(){r()('[data-tooltip="top"]').tooltip({placement:"top"}),r()('[data-tooltip="bottom"]').tooltip({placement:"bottom"})},tn=function(){document.querySelectorAll(".form-group.has-error").forEach(function(e){e.querySelectorAll(".form-control").forEach(function(e){e.classList.add("is-invalid")})})};function nn(){var e=m(["\n  query getVersion {\n    version {\n      status\n      message\n      description\n    }\n  }\n"]);return nn=function(){return e},e}var rn=qe()(nn()),an=function(e){var t=e.errorMessage,n=e.loadingMessage;return $e.a.createElement(mt,{query:rn},function(e){var i=e.loading,r=e.error,a=e.data;return i?$e.a.createElement(on,n):r?$e.a.createElement(sn,t):$e.a.createElement(ln,a.version)})},on=function(e){var t=e.description,n=e.message;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement("div",{className:"media-check-icon"},$e.a.createElement("div",{className:"spinner-border",role:"status"},$e.a.createElement("span",{className:"sr-only"},"Loading..."))),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},sn=function(e){var t=e.description,n=e.message;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement("div",{className:"media-check-icon media-check-icon-danger"},$e.a.createElement("span",{className:"fas fa-times"})),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},ln=function(e){var t=e.description,n=e.message,i=e.status;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement(cn,{status:i}),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},cn=function(e){var t=e.status,n="media-check-icon media-check-icon-";return"SUCCESS"===t&&(n+="success"),"WARNING"===t&&(n+="warning"),"ERROR"===t&&(n+="danger"),$e.a.createElement("div",{className:n},$e.a.createElement(un,{status:t}))},un=function(e){var t=e.status;return"SUCCESS"===t?$e.a.createElement("span",{className:"fas fa-check"}):"WARNING"===t?$e.a.createElement("span",{className:"fas fa-question"}):"ERROR"===t?$e.a.createElement("span",{className:"fas fa-times"}):null},hn=function(e){var t=e.elementId,n=e.errorMessage,i=e.loadingMessage,r=e.uri,a=document.getElementById(t);a||console.error("Element with id "+a+"doesn't exist!");var o=new Ge({credentials:"same-origin",uri:r});Ke.a.render($e.a.createElement(lt,{client:o},$e.a.createElement(an,{errorMessage:n,loadingMessage:i})),a)};window.moment=o.a,window.misago={initAnalytics:At,initColorpicker:Mt,initConfirmation:It,initDatepicker:Bt,initMassActions:Ut,initMassDelete:Qt,initVersionCheck:hn,init:function(){var e=document.querySelector("html").lang;o.a.locale(e.replace("_","-").toLowerCase()),en(),Jt(),tn()}}},function(e,t,n){"use strict";n.r(t);var i=n(26),r=n(17);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,r.a&&(e.prototype[r.a]=t)}function o(e,t){if(!e)throw new Error(t)}var s,l=function(e,t,n){this.body=e,this.name=t||"GraphQL request",this.locationOffset=n||{line:1,column:1},this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive")};function c(e,t){for(var n,i=/\r\n|[\n\r]/g,r=1,a=t+1;(n=i.exec(e.body))&&n.index<t;)r+=1,a=t+1-(n.index+n[0].length);return{line:r,column:a}}function u(e,t){var n=e.locationOffset.column-1,i=h(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=i.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(o,":").concat(l,")\n")+function(e){var t=e.filter(function(e){e[0];var t=e[1];return void 0!==t}),n=0,i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=l[0];n=Math.max(n,c.length)}}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return t.map(function(e){var t,i=e[0],r=e[1];return h(n-(t=i).length)+t+r}).join("\n")}([["".concat(o-1,": "),c[r-1]],["".concat(o,": "),c[r]],["",h(l-1)+"^"],["".concat(o+1,": "),c[r+1]]])}function h(e){return Array(e+1).join(" ")}function d(e,t,n,i,r,a,o){var s=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,l=n;if(!l&&s){var u=s[0];l=u&&u.loc&&u.loc.source}var h,f=i;!f&&s&&(f=s.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),f&&0===f.length&&(f=void 0),i&&n?h=i.map(function(e){return c(n,e)}):s&&(h=s.reduce(function(e,t){return t.loc&&e.push(c(t.loc.source,t.loc.start)),e},[]));var p=o||a&&a.extensions;Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:h||void 0,enumerable:Boolean(h)},path:{value:r||void 0,enumerable:Boolean(r)},nodes:{value:s||void 0},source:{value:l||void 0},positions:{value:f||void 0},originalError:{value:a},extensions:{value:p||void 0,enumerable:Boolean(p)}}),a&&a.stack?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,d):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function f(e,t,n){return new d("Syntax Error: ".concat(n),void 0,e,[t])}s=l,"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}}),d.prototype=Object.create(Error.prototype,{constructor:{value:d},name:{value:"GraphQLError"},toString:{value:function(){return function(e){var t=[];if(e.nodes){var n=!0,i=!1,r=void 0;try{for(var a,o=e.nodes[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.loc&&t.push(u(s.loc.source,c(s.loc.source,s.loc.start)))}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}}else if(e.source&&e.locations){var l=e.source,h=!0,d=!1,f=void 0;try{for(var p,g=e.locations[Symbol.iterator]();!(h=(p=g.next()).done);h=!0){var m=p.value;t.push(u(l,m))}}catch(e){d=!0,f=e}finally{try{h||null==g.return||g.return()}finally{if(d)throw f}}}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}(this)}}});var p=n(27);function g(e,t){var n=new x(y.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:m,lookahead:v}}function m(){return this.lastToken=this.token,this.token=this.lookahead()}function v(){var e=this.token;if(e.kind!==y.EOF)do{e=e.next||(e.next=k(this,e))}while(e.kind===y.COMMENT);return e}var y=Object.freeze({SOF:"<SOF>",EOF:"<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"});function b(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}function x(e,t,n,i,r,a,o){this.kind=e,this.start=t,this.end=n,this.line=i,this.column=r,this.value=o,this.prev=a,this.next=null}function w(e){return isNaN(e)?y.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function k(e,t){var n=e.source,i=n.body,r=i.length,a=function(e,t,n){var i=e.length,r=t;for(;r<i;){var a=e.charCodeAt(r);if(9===a||32===a||44===a||65279===a)++r;else if(10===a)++r,++n.line,n.lineStart=r;else{if(13!==a)break;10===e.charCodeAt(r+1)?r+=2:++r,++n.line,n.lineStart=r}}return r}(i,t.end,e),o=e.line,s=1+a-e.lineStart;if(a>=r)return new x(y.EOF,r,r,o,s,t);var l=i.charCodeAt(a);switch(l){case 33:return new x(y.BANG,a,a+1,o,s,t);case 35:return function(e,t,n,i,r){var a,o=e.body,s=t;do{a=o.charCodeAt(++s)}while(!isNaN(a)&&(a>31||9===a));return new x(y.COMMENT,t,s,n,i,r,o.slice(t+1,s))}(n,a,o,s,t);case 36:return new x(y.DOLLAR,a,a+1,o,s,t);case 38:return new x(y.AMP,a,a+1,o,s,t);case 40:return new x(y.PAREN_L,a,a+1,o,s,t);case 41:return new x(y.PAREN_R,a,a+1,o,s,t);case 46:if(46===i.charCodeAt(a+1)&&46===i.charCodeAt(a+2))return new x(y.SPREAD,a,a+3,o,s,t);break;case 58:return new x(y.COLON,a,a+1,o,s,t);case 61:return new x(y.EQUALS,a,a+1,o,s,t);case 64:return new x(y.AT,a,a+1,o,s,t);case 91:return new x(y.BRACKET_L,a,a+1,o,s,t);case 93:return new x(y.BRACKET_R,a,a+1,o,s,t);case 123:return new x(y.BRACE_L,a,a+1,o,s,t);case 124:return new x(y.PIPE,a,a+1,o,s,t);case 125:return new x(y.BRACE_R,a,a+1,o,s,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,i,r){var a=e.body,o=a.length,s=t+1,l=0;for(;s!==o&&!isNaN(l=a.charCodeAt(s))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++s;return new x(y.NAME,t,s,n,i,r,a.slice(t,s))}(n,a,o,s,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,i,r,a){var o=e.body,s=n,l=t,c=!1;45===s&&(s=o.charCodeAt(++l));if(48===s){if((s=o.charCodeAt(++l))>=48&&s<=57)throw f(e,l,"Invalid number, unexpected digit after 0: ".concat(w(s),"."))}else l=S(e,l,s),s=o.charCodeAt(l);46===s&&(c=!0,s=o.charCodeAt(++l),l=S(e,l,s),s=o.charCodeAt(l));69!==s&&101!==s||(c=!0,43!==(s=o.charCodeAt(++l))&&45!==s||(s=o.charCodeAt(++l)),l=S(e,l,s));return new x(c?y.FLOAT:y.INT,t,l,i,r,a,o.slice(t,l))}(n,a,l,o,s,t);case 34:return 34===i.charCodeAt(a+1)&&34===i.charCodeAt(a+2)?function(e,t,n,i,r,a){var o=e.body,s=t+3,l=s,c=0,u="";for(;s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return u+=o.slice(l,s),new x(y.BLOCK_STRING,t,s+3,n,i,r,Object(p.a)(u));if(c<32&&9!==c&&10!==c&&13!==c)throw f(e,s,"Invalid character within String: ".concat(w(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(u+=o.slice(l,s)+'"""',l=s+=4):++s}throw f(e,s,"Unterminated string.")}(n,a,o,s,t,e):function(e,t,n,i,r){var a=e.body,o=t+1,s=o,l=0,c="";for(;o<a.length&&!isNaN(l=a.charCodeAt(o))&&10!==l&&13!==l;){if(34===l)return c+=a.slice(s,o),new x(y.STRING,t,o+1,n,i,r,c);if(l<32&&9!==l)throw f(e,o,"Invalid character within String: ".concat(w(l),"."));if(++o,92===l){switch(c+=a.slice(s,o-1),l=a.charCodeAt(o)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var u=(h=a.charCodeAt(o+1),d=a.charCodeAt(o+2),p=a.charCodeAt(o+3),g=a.charCodeAt(o+4),E(h)<<12|E(d)<<8|E(p)<<4|E(g));if(u<0)throw f(e,o,"Invalid character escape sequence: "+"\\u".concat(a.slice(o+1,o+5),"."));c+=String.fromCharCode(u),o+=4;break;default:throw f(e,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}s=++o}}var h,d,p,g;throw f(e,o,"Unterminated string.")}(n,a,o,s,t)}throw f(n,a,function(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(w(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(w(e),".")}(l))}function S(e,t,n){var i=e.body,r=t,a=n;if(a>=48&&a<=57){do{a=i.charCodeAt(++r)}while(a>=48&&a<=57);return r}throw f(e,r,"Invalid number, expected digit but got: ".concat(w(a),"."))}function E(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}a(x,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}});var C=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=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"});function A(e,t){var n="string"==typeof e?new l(e):e;if(!(n instanceof l))throw new TypeError("Must provide Source. Received: ".concat(Object(i.a)(n)));return function(e){var t=e.token;return{kind:C.DOCUMENT,definitions:we(e,y.SOF,M,y.EOF),loc:de(e,t)}}(g(n,t||{}))}function _(e,t){var n=g("string"==typeof e?new l(e):e,t||{});ge(n,y.SOF);var i=V(n,!1);return ge(n,y.EOF),i}function O(e,t){var n=g("string"==typeof e?new l(e):e,t||{});ge(n,y.SOF);var i=$(n);return ge(n,y.EOF),i}function P(e){var t=ge(e,y.NAME);return{kind:C.NAME,value:t.value,loc:de(e,t)}}function M(e){if(pe(e,y.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return I(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return K(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===y.NAME)switch(t.value){case"schema":return function(e){var t=e.token;ve(e,"extend"),ve(e,"schema");var n=G(e,!0),i=pe(e,y.BRACE_L)?we(e,y.BRACE_L,te,y.BRACE_R):[];if(0===n.length&&0===i.length)throw be(e);return{kind:C.SCHEMA_EXTENSION,directives:n,operationTypes:i,loc:de(e,t)}}(e);case"scalar":return function(e){var t=e.token;ve(e,"extend"),ve(e,"scalar");var n=P(e),i=G(e,!0);if(0===i.length)throw be(e);return{kind:C.SCALAR_TYPE_EXTENSION,name:n,directives:i,loc:de(e,t)}}(e);case"type":return function(e){var t=e.token;ve(e,"extend"),ve(e,"type");var n=P(e),i=ne(e),r=G(e,!0),a=ie(e);if(0===i.length&&0===r.length&&0===a.length)throw be(e);return{kind:C.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a,loc:de(e,t)}}(e);case"interface":return function(e){var t=e.token;ve(e,"extend"),ve(e,"interface");var n=P(e),i=G(e,!0),r=ie(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.INTERFACE_TYPE_EXTENSION,name:n,directives:i,fields:r,loc:de(e,t)}}(e);case"union":return function(e){var t=e.token;ve(e,"extend"),ve(e,"union");var n=P(e),i=G(e,!0),r=se(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.UNION_TYPE_EXTENSION,name:n,directives:i,types:r,loc:de(e,t)}}(e);case"enum":return function(e){var t=e.token;ve(e,"extend"),ve(e,"enum");var n=P(e),i=G(e,!0),r=le(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r,loc:de(e,t)}}(e);case"input":return function(e){var t=e.token;ve(e,"extend"),ve(e,"input");var n=P(e),i=G(e,!0),r=ue(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r,loc:de(e,t)}}(e)}throw be(e,t)}(e)}else{if(pe(e,y.BRACE_L))return I(e);if(J(e))return K(e)}throw be(e)}function I(e){if(pe(e,y.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return D(e);case"fragment":return function(e){var t=e.token;if(ve(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:C.FRAGMENT_DEFINITION,name:X(e),variableDefinitions:L(e),typeCondition:(ve(e,"on"),Z(e)),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)};return{kind:C.FRAGMENT_DEFINITION,name:X(e),typeCondition:(ve(e,"on"),Z(e)),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}(e)}else if(pe(e,y.BRACE_L))return D(e);throw be(e)}function D(e){var t=e.token;if(pe(e,y.BRACE_L))return{kind:C.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:j(e),loc:de(e,t)};var n,i=N(e);return pe(e,y.NAME)&&(n=P(e)),{kind:C.OPERATION_DEFINITION,operation:i,name:n,variableDefinitions:L(e),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}function N(e){var t=ge(e,y.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw be(e,t)}function L(e){return pe(e,y.PAREN_L)?we(e,y.PAREN_L,R,y.PAREN_R):[]}function R(e){var t=e.token;return{kind:C.VARIABLE_DEFINITION,variable:F(e),type:(ge(e,y.COLON),$(e)),defaultValue:me(e,y.EQUALS)?V(e,!0):void 0,directives:G(e,!0),loc:de(e,t)}}function F(e){var t=e.token;return ge(e,y.DOLLAR),{kind:C.VARIABLE,name:P(e),loc:de(e,t)}}function j(e){var t=e.token;return{kind:C.SELECTION_SET,selections:we(e,y.BRACE_L,z,y.BRACE_R),loc:de(e,t)}}function z(e){return pe(e,y.SPREAD)?function(e){var t=e.token;ge(e,y.SPREAD);var n=ye(e,"on");if(!n&&pe(e,y.NAME))return{kind:C.FRAGMENT_SPREAD,name:X(e),directives:G(e,!1),loc:de(e,t)};return{kind:C.INLINE_FRAGMENT,typeCondition:n?Z(e):void 0,directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}(e):function(e){var t,n,i=e.token,r=P(e);me(e,y.COLON)?(t=r,n=P(e)):n=r;return{kind:C.FIELD,alias:t,name:n,arguments:Y(e,!1),directives:G(e,!1),selectionSet:pe(e,y.BRACE_L)?j(e):void 0,loc:de(e,i)}}(e)}function Y(e,t){var n=t?W:H;return pe(e,y.PAREN_L)?we(e,y.PAREN_L,n,y.PAREN_R):[]}function H(e){var t=e.token,n=P(e);return ge(e,y.COLON),{kind:C.ARGUMENT,name:n,value:V(e,!1),loc:de(e,t)}}function W(e){var t=e.token;return{kind:C.ARGUMENT,name:P(e),value:(ge(e,y.COLON),q(e)),loc:de(e,t)}}function X(e){if("on"===e.token.value)throw be(e);return P(e)}function V(e,t){var n=e.token;switch(n.kind){case y.BRACKET_L:return function(e,t){var n=e.token,i=t?q:U;return{kind:C.LIST,values:xe(e,y.BRACKET_L,i,y.BRACKET_R),loc:de(e,n)}}(e,t);case y.BRACE_L:return function(e,t){var n=e.token;return{kind:C.OBJECT,fields:xe(e,y.BRACE_L,function(){return function(e,t){var n=e.token,i=P(e);return ge(e,y.COLON),{kind:C.OBJECT_FIELD,name:i,value:V(e,t),loc:de(e,n)}}(e,t)},y.BRACE_R),loc:de(e,n)}}(e,t);case y.INT:return e.advance(),{kind:C.INT,value:n.value,loc:de(e,n)};case y.FLOAT:return e.advance(),{kind:C.FLOAT,value:n.value,loc:de(e,n)};case y.STRING:case y.BLOCK_STRING:return B(e);case y.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:C.BOOLEAN,value:"true"===n.value,loc:de(e,n)}):"null"===n.value?(e.advance(),{kind:C.NULL,loc:de(e,n)}):(e.advance(),{kind:C.ENUM,value:n.value,loc:de(e,n)});case y.DOLLAR:if(!t)return F(e)}throw be(e)}function B(e){var t=e.token;return e.advance(),{kind:C.STRING,value:t.value,block:t.kind===y.BLOCK_STRING,loc:de(e,t)}}function q(e){return V(e,!0)}function U(e){return V(e,!1)}function G(e,t){for(var n=[];pe(e,y.AT);)n.push(Q(e,t));return n}function Q(e,t){var n=e.token;return ge(e,y.AT),{kind:C.DIRECTIVE,name:P(e),arguments:Y(e,t),loc:de(e,n)}}function $(e){var t,n=e.token;return me(e,y.BRACKET_L)?(t=$(e),ge(e,y.BRACKET_R),t={kind:C.LIST_TYPE,type:t,loc:de(e,n)}):t=Z(e),me(e,y.BANG)?{kind:C.NON_NULL_TYPE,type:t,loc:de(e,n)}:t}function Z(e){var t=e.token;return{kind:C.NAMED_TYPE,name:P(e),loc:de(e,t)}}function K(e){var t=J(e)?e.lookahead():e.token;if(t.kind===y.NAME)switch(t.value){case"schema":return function(e){var t=e.token;ve(e,"schema");var n=G(e,!0),i=we(e,y.BRACE_L,te,y.BRACE_R);return{kind:C.SCHEMA_DEFINITION,directives:n,operationTypes:i,loc:de(e,t)}}(e);case"scalar":return function(e){var t=e.token,n=ee(e);ve(e,"scalar");var i=P(e),r=G(e,!0);return{kind:C.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r,loc:de(e,t)}}(e);case"type":return function(e){var t=e.token,n=ee(e);ve(e,"type");var i=P(e),r=ne(e),a=G(e,!0),o=ie(e);return{kind:C.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o,loc:de(e,t)}}(e);case"interface":return function(e){var t=e.token,n=ee(e);ve(e,"interface");var i=P(e),r=G(e,!0),a=ie(e);return{kind:C.INTERFACE_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a,loc:de(e,t)}}(e);case"union":return function(e){var t=e.token,n=ee(e);ve(e,"union");var i=P(e),r=G(e,!0),a=se(e);return{kind:C.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:a,loc:de(e,t)}}(e);case"enum":return function(e){var t=e.token,n=ee(e);ve(e,"enum");var i=P(e),r=G(e,!0),a=le(e);return{kind:C.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:a,loc:de(e,t)}}(e);case"input":return function(e){var t=e.token,n=ee(e);ve(e,"input");var i=P(e),r=G(e,!0),a=ue(e);return{kind:C.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a,loc:de(e,t)}}(e);case"directive":return function(e){var t=e.token,n=ee(e);ve(e,"directive"),ge(e,y.AT);var i=P(e),r=ae(e);ve(e,"on");var a=function(e){me(e,y.PIPE);var t=[];do{t.push(he(e))}while(me(e,y.PIPE));return t}(e);return{kind:C.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,locations:a,loc:de(e,t)}}(e)}throw be(e,t)}function J(e){return pe(e,y.STRING)||pe(e,y.BLOCK_STRING)}function ee(e){if(J(e))return B(e)}function te(e){var t=e.token,n=N(e);ge(e,y.COLON);var i=Z(e);return{kind:C.OPERATION_TYPE_DEFINITION,operation:n,type:i,loc:de(e,t)}}function ne(e){var t=[];if(ye(e,"implements")){me(e,y.AMP);do{t.push(Z(e))}while(me(e,y.AMP)||e.options.allowLegacySDLImplementsInterfaces&&pe(e,y.NAME))}return t}function ie(e){return e.options.allowLegacySDLEmptyFields&&pe(e,y.BRACE_L)&&e.lookahead().kind===y.BRACE_R?(e.advance(),e.advance(),[]):pe(e,y.BRACE_L)?we(e,y.BRACE_L,re,y.BRACE_R):[]}function re(e){var t=e.token,n=ee(e),i=P(e),r=ae(e);ge(e,y.COLON);var a=$(e),o=G(e,!0);return{kind:C.FIELD_DEFINITION,description:n,name:i,arguments:r,type:a,directives:o,loc:de(e,t)}}function ae(e){return pe(e,y.PAREN_L)?we(e,y.PAREN_L,oe,y.PAREN_R):[]}function oe(e){var t=e.token,n=ee(e),i=P(e);ge(e,y.COLON);var r,a=$(e);me(e,y.EQUALS)&&(r=q(e));var o=G(e,!0);return{kind:C.INPUT_VALUE_DEFINITION,description:n,name:i,type:a,defaultValue:r,directives:o,loc:de(e,t)}}function se(e){var t=[];if(me(e,y.EQUALS)){me(e,y.PIPE);do{t.push(Z(e))}while(me(e,y.PIPE))}return t}function le(e){return pe(e,y.BRACE_L)?we(e,y.BRACE_L,ce,y.BRACE_R):[]}function ce(e){var t=e.token,n=ee(e),i=P(e),r=G(e,!0);return{kind:C.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r,loc:de(e,t)}}function ue(e){return pe(e,y.BRACE_L)?we(e,y.BRACE_L,oe,y.BRACE_R):[]}function he(e){var t=e.token,n=P(e);if(T.hasOwnProperty(n.value))return n;throw be(e,t)}function de(e,t){if(!e.options.noLocation)return new fe(t,e.lastToken,e.source)}function fe(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function pe(e,t){return e.token.kind===t}function ge(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw f(e.source,n.start,"Expected ".concat(t,", found ").concat(b(n)))}function me(e,t){var n=e.token;if(n.kind===t)return e.advance(),n}function ve(e,t){var n=e.token;if(n.kind===y.NAME&&n.value===t)return e.advance(),n;throw f(e.source,n.start,'Expected "'.concat(t,'", found ').concat(b(n)))}function ye(e,t){var n=e.token;if(n.kind===y.NAME&&n.value===t)return e.advance(),n}function be(e,t){var n=t||e.token;return f(e.source,n.start,"Unexpected ".concat(b(n)))}function xe(e,t,n,i){ge(e,t);for(var r=[];!me(e,i);)r.push(n(e));return r}function we(e,t,n,i){ge(e,t);for(var r=[n(e)];!me(e,i);)r.push(n(e));return r}n.d(t,"parse",function(){return A}),n.d(t,"parseValue",function(){return _}),n.d(t,"parseType",function(){return O}),n.d(t,"parseConstValue",function(){return q}),n.d(t,"parseTypeReference",function(){return $}),n.d(t,"parseNamedType",function(){return Z}),a(fe,function(){return{start:this.start,end:this.end}})}]);
+ */var i=n(36),r=n(0);function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=0;i<t;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);!function(e,t,n,i,r,a,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,a,o,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var o="function"==typeof Symbol&&Symbol.for,s=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,h=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116;function y(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case f:return"ConcurrentMode";case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case g:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case d:return"Context.Consumer";case h:return"Context.Provider";case p:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case m:return y(e.type);case v:if(e=1===e._status?e._result:null)return y(e)}return null}var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;b.hasOwnProperty("ReactCurrentDispatcher")||(b.ReactCurrentDispatcher={current:null});var x={};function w(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var k=new Uint16Array(16),S=0;15>S;S++)k[S]=S+1;k[15]=0;var E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,C=Object.prototype.hasOwnProperty,T={},A={};function _(e){return!!C.call(A,e)||!C.call(T,e)&&(E.test(e)?A[e]=!0:(T[e]=!0,!1))}function O(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function P(e,t,n,i,r){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new P(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new P(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new P(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new P(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new P(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new P(e,3,!0,e,null)}),["capture","download"].forEach(function(e){M[e]=new P(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){M[e]=new P(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){M[e]=new P(e,5,!1,e.toLowerCase(),null)});var I=/[\-:]([a-z])/g;function D(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(I,D);M[t]=new P(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new P(e,1,!1,e.toLowerCase(),null)});var N=/["'&<>]/;function L(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=N.exec(e);if(t){var n,i="",r=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==n&&(i+=e.substring(r,n)),r=n+1,i+=t}e=r!==n?i+e.substring(r,n):i}return e}var R=null,F=null,j=null,z=!1,Y=!1,H=null,W=0;function X(){return null===R&&a("321"),R}function V(){return 0<W&&a("312"),{memoizedState:null,queue:null,next:null}}function B(){return null===j?null===F?(z=!1,F=j=V()):(z=!0,j=F):null===j.next?(z=!1,j=j.next=V()):(z=!0,j=j.next),j}function q(e,t,n,i){for(;Y;)Y=!1,W+=1,j=null,n=e(t,i);return F=R=null,W=0,j=H=null,n}function U(e,t){return"function"==typeof t?t(e):t}function G(e,t,n){if(R=X(),j=B(),z){var i=j.queue;if(t=i.dispatch,null!==H&&void 0!==(n=H.get(i))){H.delete(i),i=j.memoizedState;do{i=e(i,n.action),n=n.next}while(null!==n);return j.memoizedState=i,[i,t]}return[j.memoizedState,t]}return e=e===U?"function"==typeof t?t():t:void 0!==n?n(t):t,j.memoizedState=e,e=(e=j.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(25>W||a("301"),e===R)if(Y=!0,e={action:n,next:null},null===H&&(H=new Map),void 0===(n=H.get(t)))H.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,R,e),[j.memoizedState,e]}function Q(){}var $=0,Z={readContext:function(e){var t=$;return w(e,t),e[t]},useContext:function(e){X();var t=$;return w(e,t),e[t]},useMemo:function(e,t){if(R=X(),t=void 0===t?null:t,null!==(j=B())){var n=j.memoizedState;if(null!==n&&null!==t){e:{var i=n[1];if(null===i)i=!1;else{for(var r=0;r<i.length&&r<t.length;r++){var a=t[r],o=i[r];if((a!==o||0===a&&1/a!=1/o)&&(a==a||o==o)){i=!1;break e}}i=!0}}if(i)return n[0]}}return e=e(),j.memoizedState=[e,t],e},useReducer:G,useRef:function(e){R=X();var t=(j=B()).memoizedState;return null===t?(e={current:e},j.memoizedState=e):t},useState:function(e){return G(U,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:Q,useEffect:Q,useDebugValue:Q},K={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function J(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ee={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},te=i({menuitem:!0},ee),ne={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ie=["Webkit","ms","Moz","O"];Object.keys(ne).forEach(function(e){ie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ne[t]=ne[e]})});var re=/([A-Z])/g,ae=/^ms-/,oe=r.Children.toArray,se=b.ReactCurrentDispatcher,le={listing:!0,pre:!0,textarea:!0},ce=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ue={},he={};var de=Object.prototype.hasOwnProperty,fe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function pe(e,t){void 0===e&&a("152",y(t)||"Component")}function ge(e,t,n){function o(r,o){var s=function(e,t,n){var i=e.contextType;if("object"==typeof i&&null!==i)return w(i,n),i[n];if(e=e.contextTypes){for(var r in n={},e)n[r]=t[r];t=n}else t=x;return t}(o,t,n),l=[],c=!1,u={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===l)return null},enqueueReplaceState:function(e,t){c=!0,l=[t]},enqueueSetState:function(e,t){if(null===l)return null;l.push(t)}},h=void 0;if(o.prototype&&o.prototype.isReactComponent){if(h=new o(r.props,s,u),"function"==typeof o.getDerivedStateFromProps){var d=o.getDerivedStateFromProps.call(null,r.props,h.state);null!=d&&(h.state=i({},h.state,d))}}else if(R={},h=o(r.props,s,u),null==(h=q(o,r.props,h,s))||null==h.render)return void pe(e=h,o);if(h.props=r.props,h.context=s,h.updater=u,void 0===(u=h.state)&&(h.state=u=null),"function"==typeof h.UNSAFE_componentWillMount||"function"==typeof h.componentWillMount)if("function"==typeof h.componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&h.componentWillMount(),"function"==typeof h.UNSAFE_componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&h.UNSAFE_componentWillMount(),l.length){u=l;var f=c;if(l=null,c=!1,f&&1===u.length)h.state=u[0];else{d=f?u[0]:h.state;var p=!0;for(f=f?1:0;f<u.length;f++){var g=u[f];null!=(g="function"==typeof g?g.call(h,d,r.props,s):g)&&(p?(p=!1,d=i({},d,g)):i(d,g))}h.state=d}}else l=null;if(pe(e=h.render(),o),r=void 0,"function"==typeof h.getChildContext&&"object"==typeof(s=o.childContextTypes))for(var m in r=h.getChildContext())m in s||a("108",y(o)||"Unknown",m);r&&(t=i({},t,r))}for(;r.isValidElement(e);){var s=e,l=s.type;if("function"!=typeof l)break;o(s,l)}return{child:e,context:t}}var me=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");r.isValidElement(t)?t.type!==l?t=[t]:(t=t.props.children,t=r.isValidElement(t)?[t]:oe(t)):t=oe(t),t={type:null,domNamespace:K.html,children:t,childIndex:0,context:x,footer:""};var i=k[0];if(0===i){var o=k,s=2*(i=o.length);65536>=s||a("304");var c=new Uint16Array(s);for(c.set(o),(k=c)[0]=i+1,o=i;o<s-1;o++)k[o]=o+1;k[s-1]=0}else k[0]=k[i];this.threadID=i,this.stack=[t],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=n,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return e.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;k[e]=k[0],k[0]=e}},e.prototype.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,i=this.threadID;w(n,i);var r=n[i];this.contextStack[t]=n,this.contextValueStack[t]=r,n[i]=e.props.value},e.prototype.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.prototype.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.prototype.read=function(e){if(this.exhausted)return null;var t=$;$=this.threadID;var n=se.current;se.current=Z;try{for(var i=[""],r=!1;i[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var o=this.threadID;k[o]=k[0],k[0]=o;break}var s=this.stack[this.stack.length-1];if(r||s.childIndex>=s.children.length){var l=s.footer;if(""!==l&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===h)this.popProvider(s.type);else if(s.type===g){this.suspenseDepth--;var c=i.pop();if(r){r=!1;var u=s.fallbackFrame;u||a("303"),this.stack.push(u);continue}i[this.suspenseDepth]+=c}i[this.suspenseDepth]+=l}else{var d=s.children[s.childIndex++],f="";try{f+=this.render(d,s.context,s.domNamespace)}catch(e){throw e}i.length<=this.suspenseDepth&&i.push(""),i[this.suspenseDepth]+=f}}return i[0]}finally{se.current=n,$=t}},e.prototype.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?L(n):this.previousWasTextNode?"\x3c!-- --\x3e"+L(n):(this.previousWasTextNode=!0,L(n));if(e=(t=ge(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!r.isValidElement(e)){if(null!=e&&null!=e.$$typeof){var o=e.$$typeof;o===s&&a("257"),a("258",o.toString())}return e=oe(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}if("string"==typeof(o=e.type))return this.renderDOM(e,t,n);switch(o){case c:case f:case u:case l:return e=oe(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case g:a("294")}if("object"==typeof o&&null!==o)switch(o.$$typeof){case p:R={};var y=o.render(e.props,e.ref);return y=q(o.render,e.props,y,e.ref),y=oe(y),this.stack.push({type:null,domNamespace:n,children:y,childIndex:0,context:t,footer:""}),"";case m:return e=[r.createElement(o.type,i({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:return n={type:e,domNamespace:n,children:o=oe(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case d:o=e.type,y=e.props;var b=this.threadID;return w(o,b),o=oe(y.children(o[b])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case v:a("295")}a("130",null==o?o:typeof o,"")},e.prototype.renderDOM=function(e,t,n){var o=e.type.toLowerCase();n===K.html&&J(o),ue.hasOwnProperty(o)||(ce.test(o)||a("65",o),ue[o]=!0);var s=e.props;if("input"===o)s=i({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===o){var l=s.value;if(null==l){l=s.defaultValue;var c=s.children;null!=c&&(null!=l&&a("92"),Array.isArray(c)&&(1>=c.length||a("93"),c=c[0]),l=""+c),null==l&&(l="")}s=i({},s,{value:void 0,children:""+l})}else if("select"===o)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=i({},s,{value:void 0});else if("option"===o){c=this.currentSelectValue;var u=function(e){if(null==e)return e;var t="";return r.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(s.children);if(null!=c){var h=null!=s.value?s.value+"":u;if(l=!1,Array.isArray(c)){for(var d=0;d<c.length;d++)if(""+c[d]===h){l=!0;break}}else l=""+c===h;s=i({selected:void 0,children:void 0},s,{selected:l,children:u})}}for(x in(l=s)&&(te[o]&&(null!=l.children||null!=l.dangerouslySetInnerHTML)&&a("137",o,""),null!=l.dangerouslySetInnerHTML&&(null!=l.children&&a("60"),"object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML||a("61")),null!=l.style&&"object"!=typeof l.style&&a("62","")),l=s,c=this.makeStaticMarkup,u=1===this.stack.length,h="<"+e.type,l)if(de.call(l,x)){var f=l[x];if(null!=f){if("style"===x){d=void 0;var p="",g="";for(d in f)if(f.hasOwnProperty(d)){var m=0===d.indexOf("--"),v=f[d];if(null!=v){var y=d;if(he.hasOwnProperty(y))y=he[y];else{var b=y.replace(re,"-$1").toLowerCase().replace(ae,"-ms-");y=he[y]=b}p+=g+y+":",g=d,p+=m=null==v||"boolean"==typeof v||""===v?"":m||"number"!=typeof v||0===v||ne.hasOwnProperty(g)&&ne[g]?(""+v).trim():v+"px",g=";"}}f=p||null}d=null;e:if(m=o,v=l,-1===m.indexOf("-"))m="string"==typeof v.is;else switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":m=!1;break e;default:m=!0}m?fe.hasOwnProperty(x)||(d=_(d=x)&&null!=f?d+'="'+L(f)+'"':""):(m=x,d=f,f=M.hasOwnProperty(m)?M[m]:null,(v="style"!==m)&&(v=null!==f?0===f.type:2<m.length&&("o"===m[0]||"O"===m[0])&&("n"===m[1]||"N"===m[1])),v||O(m,d,f,!1)?d="":null!==f?(m=f.attributeName,d=3===(f=f.type)||4===f&&!0===d?m+'=""':m+'="'+L(d)+'"'):d=_(m)?m+'="'+L(d)+'"':""),d&&(h+=" "+d)}}c||u&&(h+=' data-reactroot=""');var x=h;l="",ee.hasOwnProperty(o)?x+="/>":(x+=">",l="</"+e.type+">");e:{if(null!=(c=s.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"==typeof(c=s.children)||"number"==typeof c){c=L(c);break e}c=null}return null!=c?(s=[],le[o]&&"\n"===c.charAt(0)&&(x+="\n"),x+=c):s=oe(s.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?J(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:o,children:s,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,x},e}(),ve={renderToString:function(e){e=new me(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new me(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){a("207")},renderToStaticNodeStream:function(){a("208")},version:"16.8.6"},ye={default:ve},be=ye&&ve||ye;e.exports=be.default||be},function(e,t,n){"use strict";var i=n(98),r=n(99),a=n(38),o=n(39);e.exports=n(101)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var i=n(10)("unscopables"),r=Array.prototype;null==r[i]&&n(12)(r,i,{}),e.exports=function(e){r[i][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(48);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var i=n(49),r=n(52),a=n(23),o=n(12),s=n(38),l=n(102),c=n(60),u=n(109),h=n(10)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,g,m,v){l(n,t,p);var y,b,x,w=function(e){if(!d&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S="values"==g,E=!1,C=e.prototype,T=C[h]||C["@@iterator"]||g&&C[g],A=T||w(g),_=g?S?w("entries"):A:void 0,O="Array"==t&&C.entries||T;if(O&&(x=u(O.call(new e)))!==Object.prototype&&x.next&&(c(x,k,!0),i||"function"==typeof x[h]||o(x,h,f)),S&&T&&"values"!==T.name&&(E=!0,A=function(){return T.call(this)}),i&&!v||!d&&!E&&C[h]||o(C,h,A),s[t]=A,s[k]=f,g)if(y={values:S?A:w("values"),keys:m?A:w("keys"),entries:_},v)for(b in y)b in C||a(C,b,y[b]);else r(r.P+r.F*(d||E),t,y);return y}},function(e,t,n){"use strict";var i=n(103),r=n(54),a=n(60),o={};n(12)(o,n(10)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var i=n(13),r=n(104),a=n(59),o=n(40)("IE_PROTO"),s=function(){},l=function(){var e,t=n(53)("iframe"),i=a.length;for(t.style.display="none",n(108).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[a[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var i=n(33),r=n(13),a=n(58);e.exports=n(22)?Object.defineProperties:function(e,t){r(e);for(var n,o=a(t),s=o.length,l=0;s>l;)i.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var i=n(24),r=n(39),a=n(106)(!1),o=n(40)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=o&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){var i=n(39),r=n(29),a=n(107);e.exports=function(e){return function(t,n,o){var s,l=i(t),c=r(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var i=n(21),r=Math.max,a=Math.min;e.exports=function(e,t){return(e=i(e))<0?r(e+t,0):a(e,t)}},function(e,t,n){var i=n(11).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(24),r=n(45),a=n(40)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){"use strict";var i=n(13),r=n(29),a=n(46),o=n(47);n(50)("match",1,function(e,t,n,s){return[function(n){var i=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=i(e),c=String(this);if(!l.global)return o(l,c);var u=l.unicode;l.lastIndex=0;for(var h,d=[],f=0;null!==(h=o(l,c));){var p=String(h[0]);d[f]=p,""===p&&(l.lastIndex=a(c,r(l.lastIndex),u)),f++}return 0===f?null:d}]})},function(e,t,n){"use strict";n.r(t);n(44);var i=n(8),r=n.n(i),a=(n(25),n(76),n(77),n(78),n(6)),o=n.n(a);n(79);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){return(h="function"==typeof Symbol&&"symbol"===u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function d(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var v=n(1),y=n(2),b=n(63),x=n.n(b).a,w=n(41),k=n(5),S=n(27);function E(e){return Object(k.b)(e,{leave:C})}var C={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return A(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,i=O("(",A(e.variableDefinitions,", "),")"),r=A(e.directives," "),a=e.selectionSet;return n||r||i||"query"!==t?A([t,A([n,i]),r,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,i=e.defaultValue,r=e.directives;return t+": "+n+O(" = ",i)+O(" ",A(r," "))},SelectionSet:function(e){return _(e.selections)},Field:function(e){var t=e.alias,n=e.name,i=e.arguments,r=e.directives,a=e.selectionSet;return A([O("",t,": ")+n+O("(",A(i,", "),")"),A(r," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+O(" ",A(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,i=e.selectionSet;return A(["...",O("on ",t),A(n," "),i]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,i=e.variableDefinitions,r=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(O("(",A(i,", "),")")," ")+"on ".concat(n," ").concat(O("",A(r," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(S.b)(n,"description"===t?"":"  "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+A(e.values,", ")+"]"},ObjectValue:function(e){return"{"+A(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+O("(",A(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return A(["schema",A(t," "),_(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:T(function(e){return A(["scalar",e.name,A(e.directives," ")]," ")}),ObjectTypeDefinition:T(function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return A(["type",t,O("implements ",A(n," & ")),A(i," "),_(r)]," ")}),FieldDefinition:T(function(e){var t=e.name,n=e.arguments,i=e.type,r=e.directives;return t+(I(n)?O("(\n",P(A(n,"\n")),"\n)"):O("(",A(n,", "),")"))+": "+i+O(" ",A(r," "))}),InputValueDefinition:T(function(e){var t=e.name,n=e.type,i=e.defaultValue,r=e.directives;return A([t+": "+n,O("= ",i),A(r," ")]," ")}),InterfaceTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.fields;return A(["interface",t,A(n," "),_(i)]," ")}),UnionTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.types;return A(["union",t,A(n," "),i&&0!==i.length?"= "+A(i," | "):""]," ")}),EnumTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.values;return A(["enum",t,A(n," "),_(i)]," ")}),EnumValueDefinition:T(function(e){return A([e.name,A(e.directives," ")]," ")}),InputObjectTypeDefinition:T(function(e){var t=e.name,n=e.directives,i=e.fields;return A(["input",t,A(n," "),_(i)]," ")}),DirectiveDefinition:T(function(e){var t=e.name,n=e.arguments,i=e.locations;return"directive @"+t+(I(n)?O("(\n",P(A(n,"\n")),"\n)"):O("(",A(n,", "),")"))+" on "+A(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return A(["extend schema",A(t," "),_(n)]," ")},ScalarTypeExtension:function(e){return A(["extend scalar",e.name,A(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return A(["extend type",t,O("implements ",A(n," & ")),A(i," "),_(r)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,i=e.fields;return A(["extend interface",t,A(n," "),_(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,i=e.types;return A(["extend union",t,A(n," "),i&&0!==i.length?"= "+A(i," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,i=e.values;return A(["extend enum",t,A(n," "),_(i)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,i=e.fields;return A(["extend input",t,A(n," "),_(i)]," ")}};function T(e){return function(t){return A([t.description,e(t)],"\n")}}function A(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function _(e){return e&&0!==e.length?"{\n"+P(A(e,"\n"))+"\n}":""}function O(e,t,n){return t?e+t+(n||""):""}function P(e){return e&&"  "+e.replace(/\n/g,"\n  ")}function M(e){return-1!==e.indexOf("\n")}function I(e){return e&&e.some(M)}!function(e){function t(t,n){var i=e.call(this,t)||this;return i.link=n,i}Object(v.c)(t,e)}(Error);function D(e){return e.request.length<=1}function N(e){return new x(function(t){t.error(e)})}function L(e,t){var n=Object(v.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(v.a)({},n,e(n)):Object(v.a)({},n,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(v.a)({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){return E(e.query)+"|"+JSON.stringify(e.variables)+"|"+e.operationName}(t)}}),t}function R(e,t){return t?t(e):x.of()}function F(e){return"function"==typeof e?new H(e):e}function j(){return new H(function(){return x.of()})}function z(e){return 0===e.length?j():e.map(F).reduce(function(e,t){return e.concat(t)})}function Y(e,t,n){var i=F(t),r=F(n||new H(R));return D(i)&&D(r)?new H(function(t){return e(t)?i.request(t)||x.of():r.request(t)||x.of()}):new H(function(t,n){return e(t)?i.request(t,n)||x.of():r.request(t,n)||x.of()})}var H=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,i){return this.concat(Y(t,n,i||new e(R)))},e.prototype.concat=function(e){return function(e,t){var n=F(e);if(D(n))return n;var i=F(t);return D(i)?new H(function(e){return n.request(e,function(e){return i.request(e)||x.of()})||x.of()}):new H(function(e,t){return n.request(e,function(e){return i.request(e,t)||x.of()})||x.of()})}(this,e)},e.prototype.request=function(e,t){throw new w.a(1)},e.empty=j,e.from=z,e.split=Y,e.execute=W,e}();function W(e,t){return e.request(L(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(y.n)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];if(t.indexOf(r)<0)throw new w.a(2)}return e}(t))))||x.of()}var X,V=n(64),B=n(3),q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inFlightRequestObservables=new Map,t.subscribers=new Map,t}return Object(v.c)(t,e),t.prototype.request=function(e,t){var n=this;if(e.getContext().forceFetch)return t(e);var i=e.toKey();if(!this.inFlightRequestObservables.get(i)){var r,a=t(e),o=new x(function(e){return n.subscribers.has(i)||n.subscribers.set(i,new Set),n.subscribers.get(i).add(e),r||(r=a.subscribe({next:function(e){var t=n.subscribers.get(i);n.subscribers.delete(i),n.inFlightRequestObservables.delete(i),t&&(t.forEach(function(t){return t.next(e)}),t.forEach(function(e){return e.complete()}))},error:function(e){var t=n.subscribers.get(i);n.subscribers.delete(i),n.inFlightRequestObservables.delete(i),t&&t.forEach(function(t){return t.error(e)})}})),function(){n.subscribers.has(i)&&(n.subscribers.get(i).delete(e),0===n.subscribers.get(i).size&&(n.inFlightRequestObservables.delete(i),r&&r.unsubscribe()))}});this.inFlightRequestObservables.set(i,o)}return this.inFlightRequestObservables.get(i)},t}(H);function U(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(X||(X={}));var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(v.c)(t,e),t.prototype[V.a]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(x);var Q,$=function(e){var t="";return Array.isArray(e.graphQLErrors)&&0!==e.graphQLErrors.length&&e.graphQLErrors.forEach(function(e){var n=e?e.message:"Error message not found.";t+="GraphQL error: "+n+"\n"}),e.networkError&&(t+="Network error: "+e.networkError.message+"\n"),t=t.replace(/\n$/,"")},Z=function(e){function t(n){var i=n.graphQLErrors,r=n.networkError,a=n.errorMessage,o=n.extraInfo,s=e.call(this,a)||this;return s.graphQLErrors=i||[],s.networkError=r||null,s.message=a||$(s),s.extraInfo=o,s.__proto__=t.prototype,s}return Object(v.c)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(Q||(Q={}));var K=function(e){function t(t){var n=t.queryManager,i=t.options,r=t.shouldSubscribe,a=void 0===r||r,o=e.call(this,function(e){return o.onSubscribe(e)})||this;return o.isTornDown=!1,o.options=i,o.variables=i.variables||{},o.queryId=n.generateQueryId(),o.shouldSubscribe=a,o.queryManager=n,o.observers=[],o.subscriptionHandles=[],o}return Object(v.c)(t,e),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var i,r={next:function(n){t(n),e.observers.some(function(e){return e!==r})||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:function(e){n(e)}};i=e.subscribe(r)})},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown)return{data:this.lastError?void 0:this.lastResult?this.lastResult.data:void 0,error:this.lastError,loading:!1,networkStatus:X.error};var e,t,n=this.queryManager.queryStore.get(this.queryId);if(e=n,void 0===(t=this.options.errorPolicy)&&(t="none"),e&&(e.graphQLErrors&&e.graphQLErrors.length>0&&"none"===t||e.networkError))return{data:void 0,loading:!1,networkStatus:n.networkStatus,error:new Z({graphQLErrors:n.graphQLErrors,networkError:n.networkError})};n&&n.variables&&(this.options.variables=Object.assign({},this.options.variables,n.variables));var i,r=this.queryManager.getCurrentQueryResult(this),a=r.data,o=r.partial,s=!n||n.networkStatus===X.loading,l="network-only"===this.options.fetchPolicy&&s||o&&"cache-only"!==this.options.fetchPolicy,c={data:a,loading:U(i=n?n.networkStatus:l?X.loading:X.ready),networkStatus:i};return n&&n.graphQLErrors&&"all"===this.options.errorPolicy&&(c.errors=n.graphQLErrors),o||(this.lastResult=Object(v.a)({},c,{stale:!1}),this.lastResultSnapshot=Object(y.e)(this.lastResult)),Object(v.a)({},c,{partial:o})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(y.t)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;if("cache-only"===t)return Promise.reject(new Error("cache-only fetchPolicy option should not be used together with query refetch."));Object(y.t)(this.variables,e)||(this.variables=Object.assign({},this.variables,e)),Object(y.t)(this.options.variables,this.variables)||(this.options.variables=Object.assign({},this.options.variables,this.variables));var n="network-only"===t||"no-cache"===t,i=Object(v.a)({},this.options,{fetchPolicy:n?t:"network-only"});return this.queryManager.fetchQuery(this.queryId,i,Q.refetch).then(function(e){return e})},t.prototype.fetchMore=function(e){var t,n=this;return Object(B.b)(e.updateQuery),Promise.resolve().then(function(){var i=n.queryManager.generateQueryId();return(t=e.query?e:Object(v.a)({},n.options,e,{variables:Object.assign({},n.variables,e.variables)})).fetchPolicy="network-only",n.queryManager.fetchQuery(i,t,Q.normal,n.queryId)}).then(function(i){return n.updateQuery(function(n){return e.updateQuery(n,{fetchMoreResult:i.data,variables:t.variables})}),i})},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){e.updateQuery&&t.updateQuery(function(t,i){var r=i.variables;return e.updateQuery(t,{subscriptionData:n,variables:r})})},error:function(t){e.onError?e.onError(t):console.error("Unhandled GraphQL subscription error",t)}});return this.subscriptionHandles.push(n),function(){var e=t.subscriptionHandles.indexOf(n);e>=0&&(t.subscriptionHandles.splice(e,1),n.unsubscribe())}},t.prototype.setOptions=function(e){var t=this.options;this.options=Object.assign({},this.options,e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n="network-only"!==t.fetchPolicy&&"network-only"===e.fetchPolicy||"cache-only"===t.fetchPolicy&&"cache-only"!==e.fetchPolicy||"standby"===t.fetchPolicy&&"standby"!==e.fetchPolicy||!1;return this.setVariables(this.options.variables,n,e.fetchResults)},t.prototype.setVariables=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1;var i=e||this.variables;return Object(y.t)(i,this.variables)&&!t?0!==this.observers.length&&n?this.result():new Promise(function(e){return e()}):(this.variables=i,this.options.variables=i,0===this.observers.length?new Promise(function(e){return e()}):this.queryManager.fetchQuery(this.queryId,Object(v.a)({},this.options,{variables:this.variables})).then(function(e){return e}))},t.prototype.updateQuery=function(e){var t=this.queryManager.getQueryWithPreviousResult(this.queryId),n=t.previousResult,i=t.variables,r=t.document,a=Object(y.I)(function(){return e(n,{variables:i})});a&&(this.queryManager.dataStore.markUpdateQueryResult(r,i,a),this.queryManager.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){J(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.onSubscribe=function(e){var t=this;return e._subscription&&e._subscription._observer&&!e._subscription._observer.error&&(e._subscription._observer.error=function(e){console.error("Unhandled error",e.message,e.stack)}),this.observers.push(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),1===this.observers.length&&this.setUpQuery(),function(){t.observers=t.observers.filter(function(t){return t!==e}),0===t.observers.length&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this;this.shouldSubscribe&&this.queryManager.addObservableQuery(this.queryId,this),this.options.pollInterval&&(J(this),this.queryManager.startPollingQuery(this.options,this.queryId));var t={next:function(t){e.lastResult=t,e.lastResultSnapshot=Object(y.e)(t),e.observers.forEach(function(e){return e.next&&e.next(t)})},error:function(t){e.lastError=t,e.observers.forEach(function(e){return e.error&&e.error(t)})}};this.queryManager.startQuery(this.queryId,this.options,this.queryManager.queryListenerForObserver(this.queryId,this.options,t))},t.prototype.tearDownQuery=function(){this.isTornDown=!0,this.queryManager.stopPollingQuery(this.queryId),this.subscriptionHandles.forEach(function(e){return e.unsubscribe()}),this.subscriptionHandles=[],this.queryManager.removeObservableQuery(this.queryId),this.queryManager.stopQuery(this.queryId),this.observers=[]},t}(G);function J(e){var t=e.options.fetchPolicy;Object(B.b)("cache-first"!==t&&"cache-only"!==t)}var ee=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),te=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];if(t&&t.document!==e.document&&!Object(y.t)(t.document,e.document))throw new B.a;var n,i=!1,r=null;e.storePreviousVariables&&t&&t.networkStatus!==X.loading&&(Object(y.t)(t.variables,e.variables)||(i=!0,r=t.variables)),n=i?X.setVariables:e.isPoll?X.poll:e.isRefetch?X.refetch:X.loading;var a=[];t&&t.graphQLErrors&&(a=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:r,networkError:null,graphQLErrors:a,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=X.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=t.errors&&t.errors.length?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=X.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=X.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=X.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].previousVariables=null,this.store[e].networkStatus=t?X.ready:X.loading)},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;this.store=Object.keys(this.store).filter(function(t){return e.indexOf(t)>-1}).reduce(function(e,n){return e[n]=Object(v.a)({},t.store[n],{networkStatus:X.loading}),e},{})},e}();var ne=function(){function e(e){var t=e.cache,n=e.client,i=e.resolvers,r=e.fragmentMatcher;this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),r&&this.setFragmentMatcher(r)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=Object(y.A)(t.resolvers,e)}):this.resolvers=Object(y.A)(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,r=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return Object(v.b)(this,void 0,void 0,function(){return Object(v.d)(this,function(e){return t?[2,this.resolveDocument(t,n.data,i,r,this.fragmentMatcher,o).then(function(e){return Object(v.a)({},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 Object(y.s)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(y.C)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(v.a)({},e,{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(B.b)(!1)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),Object(v.b)(this,void 0,void 0,function(){return Object(v.d)(this,function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return Object(v.a)({},t,e.exportedVariables)})]:[2,Object(v.a)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(k.b)(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 k.a}}}),t},e.prototype.shouldForceResolver=function(e){return this.shouldForceResolvers(e)},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(y.d)(e),variables:t,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,i,r,a){return void 0===n&&(n={}),void 0===i&&(i={}),void 0===r&&(r=function(){return!0}),void 0===a&&(a=!1),Object(v.b)(this,void 0,void 0,function(){var o,s,l,c,u,h,d,f,p;return Object(v.d)(this,function(g){var m;return o=Object(y.k)(e),s=Object(y.i)(e),l=Object(y.f)(s),c=o.operation,u=c?(m=c).charAt(0).toUpperCase()+m.slice(1):"Query",d=(h=this).cache,f=h.client,p={fragmentMap:l,context:Object(v.a)({},n,{cache:d,client:f}),variables:i,fragmentMatcher:r,defaultOperationType:u,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(o.selectionSet,t,p).then(function(e){return{result:e,exportedVariables:p.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n){return Object(v.b)(this,void 0,void 0,function(){var i,r,a,o,s,l=this;return Object(v.d)(this,function(c){return i=n.fragmentMap,r=n.context,a=n.variables,o=[t],s=function(e){return Object(v.b)(l,void 0,void 0,function(){var s,l;return Object(v.d)(this,function(c){return Object(y.F)(e,a)?Object(y.u)(e)?[2,this.resolveField(e,t,n).then(function(t){var n;void 0!==t&&o.push(((n={})[Object(y.E)(e)]=t,n))})]:(Object(y.w)(e)?s=e:(s=i[e.name.value],Object(B.b)(s)),s&&s.typeCondition&&(l=s.typeCondition.name.value,n.fragmentMatcher(t,l,r))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then(function(e){o.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(s)).then(function(){return Object(y.B)(o)})]})})},e.prototype.resolveField=function(e,t,n){return Object(v.b)(this,void 0,void 0,function(){var i,r,a,o,s,l,c,u,h,d=this;return Object(v.d)(this,function(f){return i=n.variables,r=e.name.value,a=Object(y.E)(e),o=r!==a,s=t[a]||t[r],l=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolver(e)||(c=t.__typename||n.defaultOperationType,(u=this.resolvers&&this.resolvers[c])&&(h=u[o?r:a])&&(l=Promise.resolve(h(t,Object(y.b)(e,i),n.context,{field:e})))),[2,l.then(function(t){return void 0===t&&(t=s),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&&(n.exportedVariables[e.value.value]=t)})}),e.selectionSet?null==t?t:Array.isArray(t)?d.resolveSubSelectedArray(e,t,n):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t,n):void 0:t})]})})},e.prototype.resolveSubSelectedArray=function(e,t,n){var i=this;return Promise.all(t.map(function(t){return null===t?null:Array.isArray(t)?i.resolveSubSelectedArray(e,t,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n):void 0}))},e}(),ie=function(){function e(e){var t=e.link,n=e.queryDeduplication,i=void 0!==n&&n,r=e.store,a=e.onBroadcast,o=void 0===a?function(){}:a,s=e.ssrMode,l=void 0!==s&&s,c=e.clientAwareness,u=void 0===c?{}:c,h=e.localState;this.mutationStore=new ee,this.queryStore=new te,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.queryIdsByName={},this.pollingInfoByQueryId=new Map,this.nextPoll=null,this.link=t,this.deduplicator=H.from([new q,t]),this.queryDeduplication=i,this.dataStore=r,this.onBroadcast=o,this.clientAwareness=u,this.localState=h||new ne({cache:r.getCache()}),this.ssrMode=l}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.fetchQueryRejectFns.forEach(function(e){e(new Error("QueryManager stopped while query was in flight"))})},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,i=e.optimisticResponse,r=e.updateQueries,a=e.refetchQueries,o=void 0===a?[]:a,s=e.awaitRefetchQueries,l=void 0!==s&&s,c=e.update,u=e.errorPolicy,h=void 0===u?"none":u,d=e.fetchPolicy,f=e.context,p=void 0===f?{}:f;return Object(v.b)(this,void 0,void 0,function(){var e,a,s,u,f,g=this;return Object(v.d)(this,function(m){switch(m.label){case 0:return Object(B.b)(t),Object(B.b)(!d||"no-cache"===d),e=this.generateQueryId(),a=this.dataStore.getCache(),t=a.transformDocument(t),n=Object(y.c)({},Object(y.g)(Object(y.l)(t)),n),this.setQuery(e,function(){return{document:t}}),s=function(){var e={};return r&&Object.keys(r).forEach(function(t){return(g.queryIdsByName[t]||[]).forEach(function(n){e[n]={updater:r[t],query:g.queryStore.get(n)}})}),e},Object(y.r)(t)?[4,this.localState.addExportedVariables(t,n,p)]:[3,2];case 1:return f=m.sent(),[3,3];case 2:f=n,m.label=3;case 3:return u=f,this.mutationStore.initMutation(e,t,u),this.dataStore.markMutationInit({mutationId:e,document:t,variables:u||{},updateQueries:s(),update:c,optimisticResponse:i}),this.broadcastQueries(),[2,new Promise(function(n,r){var a,f,m=g.buildOperationForLink(t,u,Object(v.a)({},p,{optimisticResponse:i})),b=function(){if(f&&g.mutationStore.markMutationError(e,f),g.dataStore.markMutationComplete({mutationId:e,optimisticResponse:i}),g.broadcastQueries(),f)return Promise.reject(f);"function"==typeof o&&(o=o(a));for(var t=[],n=0,r=o;n<r.length;n++){var s=r[n];if("string"!=typeof s){var c={query:s.query,variables:s.variables,fetchPolicy:"network-only"};s.context&&(c.context=s.context),t.push(g.query(c))}else{var u=g.refetchQueryByName(s);u&&t.push(u)}}return Promise.all(l?t:[]).then(function(){return g.setQuery(e,function(){return{document:null}}),"ignore"===h&&a&&Object(y.q)(a)&&delete a.errors,a})},x=g.localState.clientQuery(m.query),w=g.localState.serverQuery(m.query);w&&(m.query=w);var k=w?W(g.link,m):G.of({data:{}}),S=g,E=!1,C=!1;k.subscribe({next:function(i){return Object(v.b)(g,void 0,void 0,function(){var o,l,p;return Object(v.d)(this,function(g){switch(g.label){case 0:return C=!0,Object(y.q)(i)&&"none"===h?(C=!1,f=new Z({graphQLErrors:i.errors}),[2]):(S.mutationStore.markMutationResult(e),o=i,l=m.context,p=m.variables,x&&Object(y.s)(["client"],x)?[4,S.localState.runResolvers({document:x,remoteResult:i,context:l,variables:p}).catch(function(e){return C=!1,r(e),i})]:[3,2]);case 1:o=g.sent(),g.label=2;case 2:return"no-cache"!==d&&S.dataStore.markMutationResult({mutationId:e,result:o,document:t,variables:u||{},updateQueries:s(),update:c}),a=o,C=!1,E&&b().then(n,r),[2]}})})},error:function(t){S.mutationStore.markMutationError(e,t),S.dataStore.markMutationComplete({mutationId:e,optimisticResponse:i}),S.broadcastQueries(),S.setQuery(e,function(){return{document:null}}),r(new Z({networkError:t}))},complete:function(){C||b().then(n,r),E=!0}})})]}})})},e.prototype.fetchQuery=function(e,t,n,i){return Object(v.b)(this,void 0,void 0,function(){var r,a,o,s,l,c,u,h,d,f,p,g,m,b,x,w,k,S,E,C,T,A,_=this;return Object(v.d)(this,function(O){switch(O.label){case 0:return r=t.variables,a=void 0===r?{}:r,o=t.metadata,s=void 0===o?null:o,l=t.fetchPolicy,c=void 0===l?"cache-first":l,u=t.context,h=void 0===u?{}:u,d=this.dataStore.getCache(),f=d.transformDocument(t.query),Object(y.r)(f)?[4,this.localState.addExportedVariables(f,a,h)]:[3,2];case 1:return g=O.sent(),[3,3];case 2:g=a,O.label=3;case 3:if(p=g,m=Object(v.a)({},t,{variables:p}),x="network-only"===c||"no-cache"===c,n!==Q.refetch&&"network-only"!==c&&"no-cache"!==c&&(w=this.dataStore.getCache().diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),k=w.complete,S=w.result,x=!k||"cache-and-network"===c,b=S),E=x&&"cache-only"!==c&&"standby"!==c,Object(y.s)(["live"],f)&&(E=!0),C=this.generateRequestId(),T=this.updateQueryWatch(e,f,m),this.setQuery(e,function(){return{document:f,lastRequestId:C,invalidated:!0,cancel:T}}),this.invalidate(!0,i),this.queryStore.initQuery({queryId:e,document:f,storePreviousVariables:E,variables:p,isPoll:n===Q.poll,isRefetch:n===Q.refetch,metadata:s,fetchMoreForQueryId:i}),this.broadcastQueries(),(!E||"cache-and-network"===c)&&(this.queryStore.markQueryResultClient(e,!E),this.invalidate(!0,e,i),this.broadcastQueries(this.localState.shouldForceResolvers(f))),E){if(A=this.fetchRequest({requestId:C,queryId:e,document:f,options:m,fetchMoreForQueryId:i}).catch(function(t){if(t.hasOwnProperty("graphQLErrors"))throw t;var n=_.getQuery(e).lastRequestId;throw C>=(n||1)&&(_.queryStore.markQueryError(e,t,i),_.invalidate(!0,e,i),_.broadcastQueries()),new Z({networkError:t})}),"cache-and-network"!==c)return[2,A];A.catch(function(){})}return[2,Promise.resolve({data:b})]}})})},e.prototype.queryListenerForObserver=function(e,t,n){var i=this,r=!1;return function(a,o,s){return Object(v.b)(i,void 0,void 0,function(){var i,l,c,u,h,d,f,p,g,m,y,b,x,w,k,S,E,C,T,A;return Object(v.d)(this,function(_){switch(_.label){case 0:if(this.invalidate(!1,e),!a)return[2];if(i=this.getQuery(e).observableQuery,"standby"===(l=i?i.options.fetchPolicy:t.fetchPolicy))return[2];if(c=i?i.options.errorPolicy:t.errorPolicy,u=i?i.getLastResult():null,h=i?i.getLastError():null,d=!o&&null!=a.previousVariables||"cache-only"===l||"cache-and-network"===l,f=Boolean(u&&a.networkStatus!==u.networkStatus),p=c&&(h&&h.graphQLErrors)!==a.graphQLErrors&&"none"!==c,!(!U(a.networkStatus)||f&&t.notifyOnNetworkStatusChange||d))return[3,8];if((!c||"none"===c)&&a.graphQLErrors&&a.graphQLErrors.length>0||a.networkError){if(g=new Z({graphQLErrors:a.graphQLErrors,networkError:a.networkError}),r=!0,n.error)try{n.error(g)}catch(e){setTimeout(function(){throw e},0)}else setTimeout(function(){throw g},0);return[2]}_.label=1;case 1:if(_.trys.push([1,7,,8]),m=void 0,y=void 0,o?("no-cache"!==l&&"network-only"!==l&&this.setQuery(e,function(){return{newData:null}}),m=o.result,y=!o.complete||!1):u&&u.data&&!p?(m=u.data,y=!1):(b=this.getQuery(e).document,x=this.dataStore.getCache().diff({query:b,variables:a.previousVariables||a.variables,optimistic:!0}),m=x.result,y=!x.complete),w=void 0,w=y&&"cache-only"!==l?{data:u&&u.data,loading:U(a.networkStatus),networkStatus:a.networkStatus,stale:!0}:{data:m,loading:U(a.networkStatus),networkStatus:a.networkStatus,stale:!1},"all"===c&&a.graphQLErrors&&a.graphQLErrors.length>0&&(w.errors=a.graphQLErrors),!n.next)return[3,6];if(!r&&i&&!i.isDifferentFromLastResult(w))return[3,6];_.label=2;case 2:return _.trys.push([2,5,,6]),s?(k=t.query,S=t.variables,E=t.context,[4,this.localState.runResolvers({document:k,remoteResult:w,context:E,variables:S,onlyRunForcedResolvers:s})]):[3,4];case 3:C=_.sent(),w=Object(v.a)({},w,C),_.label=4;case 4:return n.next(w),[3,6];case 5:return T=_.sent(),setTimeout(function(){throw T},0),[3,6];case 6:return r=!1,[3,8];case 7:return A=_.sent(),r=!0,n.error&&n.error(new Z({networkError:A})),[2];case 8:return[2]}})})}},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(B.b)("standby"!==e.fetchPolicy);var n=Object(y.o)(e.query);if(n.variableDefinitions&&n.variableDefinitions.length){var i=Object(y.g)(n);e.variables=Object(y.c)({},i,e.variables)}void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=Object(v.a)({},e);return new K({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(B.b)(e.query),Object(B.b)("Document"===e.query.kind),Object(B.b)(!e.returnPartialData),Object(B.b)(!e.pollInterval),new Promise(function(n,i){var r=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+r.queryId,i),r.result().then(n,i).then(function(){return t.fetchQueryRejectFns.delete("query:"+r.queryId)})})},e.prototype.generateQueryId=function(){var e=this.idCounter.toString();return this.idCounter++,e},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(!0,e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,function(e){var n=e.listeners;return{listeners:(void 0===n?[]:n).concat([t]),invalidated:!1}})},e.prototype.updateQueryWatch=function(e,t,n){var i=this,r=this.getQuery(e).cancel;r&&r();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=i.getQuery(e).observableQuery;if(n){var r=n.getLastResult();r&&(t=r.data)}return t},callback:function(t){i.setQuery(e,function(){return{invalidated:!0,newData:t}})}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,function(){return{observableQuery:t}});var n=Object(y.o)(t.options.query);if(n.name&&n.name.value){var i=n.name.value;this.queryIdsByName[i]=this.queryIdsByName[i]||[],this.queryIdsByName[i].push(t.queryId)}},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e),n=t.observableQuery,i=t.cancel;if(i&&i(),n){var r=Object(y.o)(n.options.query),a=r.name?r.name.value:null;this.setQuery(e,function(){return{observableQuery:null}}),a&&(this.queryIdsByName[a]=this.queryIdsByName[a].filter(function(e){return!(n.queryId===e)}))}},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach(function(e){e(new Error("Store reset while query was in flight(not completed in link chain)"))});var e=[];return this.queries.forEach(function(t,n){t.observableQuery&&e.push(n)}),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then(function(){return e.reFetchObservableQueries()})},e.prototype.reFetchObservableQueries=function(e){var t=this.getObservableQueryPromises(e);return this.broadcastQueries(),Promise.all(t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch(function(){}),e},e.prototype.startGraphQLSubscription=function(e){var t,n=this,i=e.query,r=!(e.fetchPolicy&&"no-cache"===e.fetchPolicy),a=this.dataStore.getCache().transformDocument(i),o=Object(y.c)({},Object(y.g)(Object(y.m)(i)),e.variables),s=o,l=[],c=this.localState.clientQuery(a);return new G(function(e){if(l.push(e),1===l.length){var i=0,u=!1,h={next:function(e){return Object(v.b)(n,void 0,void 0,function(){var t;return Object(v.d)(this,function(n){switch(n.label){case 0:return i+=1,t=e,c&&Object(y.s)(["client"],c)?[4,this.localState.runResolvers({document:c,remoteResult:e,context:{},variables:s})]:[3,2];case 1:t=n.sent(),n.label=2;case 2:return r&&(this.dataStore.markSubscriptionResult(t,a,s),this.broadcastQueries()),l.forEach(function(e){Object(y.q)(t)&&e.error?e.error(new Z({graphQLErrors:t.errors})):e.next&&e.next(t),i-=1}),0===i&&u&&h.complete(),[2]}})})},error:function(e){l.forEach(function(t){t.error&&t.error(e)})},complete:function(){0===i&&l.forEach(function(e){e.complete&&e.complete()}),u=!0}};Object(v.b)(n,void 0,void 0,function(){var e,n,i,r;return Object(v.d)(this,function(s){switch(s.label){case 0:return Object(y.r)(a)?[4,this.localState.addExportedVariables(a,o)]:[3,2];case 1:return n=s.sent(),[3,3];case 2:n=o,s.label=3;case 3:return e=n,(i=this.localState.serverQuery(a))?(r=this.buildOperationForLink(i,e),t=W(this.link,r).subscribe(h)):t=G.of({data:{}}).subscribe(h),[2]}})})}return function(){0===(l=l.filter(function(t){return t!==e})).length&&t&&t.unsubscribe()}})},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){var t=this.getQuery(e).subscriptions;this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),t.forEach(function(e){return e.unsubscribe()}),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,i=n.variables,r=n.query,a=n.fetchPolicy,o=e.getLastResult(),s=this.getQuery(e.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===a||"network-only"===a)return{data:void 0,partial:!1};try{return{data:this.dataStore.getCache().read({query:r,variables:i,previousResult:o?o.data:void 0,optimistic:t})||void 0,partial:!1}}catch(e){return{data:void 0,partial:!0}}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;Object(B.b)(n),t=n}else t=e;var i=t.options,r=i.variables,a=i.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:r,document:a}},e.prototype.broadcastQueries=function(e){var t=this;void 0===e&&(e=!1),this.onBroadcast(),this.queries.forEach(function(n,i){n.invalidated&&n.listeners&&n.listeners.filter(function(e){return!!e}).forEach(function(r){r(t.queryStore.get(i),n.newData,e)})})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableQueryPromises=function(e){var t=this,n=[];return this.queries.forEach(function(i,r){var a=i.observableQuery;if(a){var o=a.options.fetchPolicy;a.resetLastResults(),"cache-only"===o||!e&&"standby"===o||n.push(a.refetch()),t.setQuery(r,function(){return{newData:null}}),t.invalidate(!0,r)}}),n},e.prototype.fetchRequest=function(e){var t,n,i=this,r=e.requestId,a=e.queryId,o=e.document,s=e.options,l=e.fetchMoreForQueryId,c=s.variables,u=s.context,h=s.errorPolicy,d=void 0===h?"none":h,f=s.fetchPolicy;return new Promise(function(e,s){var h,p={},g=i.localState.clientQuery(o),m=i.localState.serverQuery(o);if(m){var b=i.buildOperationForLink(m,c,Object(v.a)({},u,{forceFetch:!i.queryDeduplication}));p=b.context,h=W(i.deduplicator,b)}else p=i.prepareContext(u),h=G.of({data:{}});i.fetchQueryRejectFns.set("fetchRequest:"+a,s);var x=!1,w=!0,k={next:function(e){return Object(v.b)(i,void 0,void 0,function(){var i,u;return Object(v.d)(this,function(h){switch(h.label){case 0:return w=!0,i=e,u=this.getQuery(a).lastRequestId,r>=(u||1)?g&&Object(y.s)(["client"],g)?[4,this.localState.runResolvers({document:g,remoteResult:e,context:p,variables:c}).catch(function(t){return w=!1,s(t),e})]:[3,2]:[3,3];case 1:i=h.sent(),h.label=2;case 2:if("no-cache"!==f)try{this.dataStore.markQueryResult(i,o,c,l,"ignore"===d||"all"===d)}catch(e){return w=!1,s(e),[2]}else this.setQuery(a,function(){return{newData:{result:i.data,complete:!0}}});this.queryStore.markQueryResult(a,i,l),this.invalidate(!0,a,l),this.broadcastQueries(),h.label=3;case 3:if(i.errors&&"none"===d)return w=!1,s(new Z({graphQLErrors:i.errors})),[2];if("all"===d&&(n=i.errors),l||"no-cache"===f)t=i.data;else try{t=this.dataStore.getCache().read({variables:c,query:o,optimistic:!1})}catch(e){}return w=!1,x&&k.complete(),[2]}})})},error:function(e){i.fetchQueryRejectFns.delete("fetchRequest:"+a),i.setQuery(a,function(e){return{subscriptions:e.subscriptions.filter(function(e){return e!==S})}}),s(e)},complete:function(){w||(i.fetchQueryRejectFns.delete("fetchRequest:"+a),i.setQuery(a,function(e){return{subscriptions:e.subscriptions.filter(function(e){return e!==S})}}),e({data:t,errors:n,loading:!1,networkStatus:X.ready,stale:!1})),x=!0}},S=h.subscribe(k);i.setQuery(a,function(e){return{subscriptions:e.subscriptions.concat([S])}})}).catch(function(e){throw i.fetchQueryRejectFns.delete("fetchRequest:"+a),e})},e.prototype.refetchQueryByName=function(e){var t=this,n=this.queryIdsByName[e];if(void 0!==n)return Promise.all(n.map(function(e){return t.getQuery(e).observableQuery}).filter(function(e){return!!e}).map(function(e){return e.refetch()}))},e.prototype.generateRequestId=function(){var e=this.idCounter;return this.idCounter++,e},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:[],invalidated:!1,document:null,newData:null,lastRequestId:null,observableQuery:null,subscriptions:[]}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),i=Object(v.a)({},n,t(n));this.queries.set(e,i)},e.prototype.invalidate=function(e,t,n){t&&this.setQuery(t,function(){return{invalidated:e}}),n&&this.setQuery(n,function(){return{invalidated:e}})},e.prototype.buildOperationForLink=function(e,t,n){var i=this.dataStore.getCache();return{query:i.transformForLink?i.transformForLink(e):e,variables:t,operationName:Object(y.n)(e)||void 0,context:this.prepareContext(n)}},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(v.a)({},t,{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==X.ready&&t.networkStatus!==X.error},e.prototype.startPollingQuery=function(e,t,n){var i=e.pollInterval;return Object(B.b)(i),this.ssrMode||(this.pollingInfoByQueryId.set(t,{interval:i,lastPollTimeMs:Date.now()-10,options:Object(v.a)({},e,{fetchPolicy:"network-only"})}),n&&this.addQueryListener(t,n),this.schedulePoll(i)),t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e.prototype.schedulePoll=function(e){var t=this,n=Date.now();if(this.nextPoll){if(!(e<this.nextPoll.time-n))return;clearTimeout(this.nextPoll.timeout)}this.nextPoll={time:n+e,timeout:setTimeout(function(){t.nextPoll=null;var e=1/0;t.pollingInfoByQueryId.forEach(function(n,i){if(n.interval<e&&(e=n.interval),!t.checkInFlight(i)&&Date.now()-n.lastPollTimeMs>=n.interval){var r=function(){n.lastPollTimeMs=Date.now()};t.fetchQuery(i,n.options,Q.poll).then(r,r)}}),isFinite(e)&&t.schedulePoll(e)},e)}},e}(),re=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,i,r){void 0===r&&(r=!1);var a=!Object(y.q)(e);r&&Object(y.q)(e)&&e.data&&(a=!0),!i&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(y.q)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t=this;if(e.optimisticResponse){var n;n="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse;this.cache.recordOptimisticTransaction(function(i){var r=t.cache;t.cache=i;try{t.markMutationResult({mutationId:e.mutationId,result:{data:n},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{t.cache=r}},e.mutationId)}},e.prototype.markMutationResult=function(e){var t=this;if(!Object(y.q)(e.result)){var n=[];n.push({result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),e.updateQueries&&Object.keys(e.updateQueries).filter(function(t){return e.updateQueries[t]}).forEach(function(i){var r=e.updateQueries[i],a=r.query,o=r.updater,s=t.cache.diff({query:a.document,variables:a.variables,returnPartialData:!0,optimistic:!1}),l=s.result;if(s.complete){var c=Object(y.I)(function(){return o(l,{mutationResult:e.result,queryName:Object(y.n)(a.document)||void 0,queryVariables:a.variables})});c&&n.push({result:c,dataId:"ROOT_QUERY",query:a.document,variables:a.variables})}}),this.cache.performTransaction(function(e){n.forEach(function(t){return e.write(t)})});var i=e.update;i&&this.cache.performTransaction(function(t){Object(y.I)(function(){return i(t,e.result)})})}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),ae="2.5.1",oe=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],this.clientAwareness={};var n=e.cache,i=e.ssrMode,r=void 0!==i&&i,a=e.ssrForceFetchDelay,o=void 0===a?0:a,s=e.connectToDevTools,l=e.queryDeduplication,c=void 0===l||l,u=e.defaultOptions,h=e.resolvers,d=e.typeDefs,f=e.fragmentMatcher,p=e.name,g=e.version,m=e.link;if(!m&&h&&(m=H.empty()),!m||!n)throw new B.a;var v=new Map,b=new H(function(e,t){var n=v.get(e.query);return n||(n=Object(y.D)(e.query),v.set(e.query,n),v.set(n,n)),e.query=n,t(e)});this.link=b.concat(m),this.cache=n,this.store=new re(n),this.disableNetworkFetches=r||o>0,this.queryDeduplication=c,this.ssrMode=r,this.defaultOptions=u||{},this.typeDefs=d,o&&setTimeout(function(){return t.disableNetworkFetches=!1},o),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);void 0!==s&&(s&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version=ae,p&&(this.clientAwareness.name=p),g&&(this.clientAwareness.version=g),this.localState=new ne({cache:n,client:this,resolvers:h,fragmentMatcher:f})}return e.prototype.stop=function(){this.queryManager&&this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(v.a)({},this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(v.a)({},e,{fetchPolicy:"cache-first"})),this.initQueryManager().watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(v.a)({},this.defaultOptions.query,e)),Object(B.b)("cache-and-network"!==e.fetchPolicy),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(v.a)({},e,{fetchPolicy:"cache-first"})),this.initQueryManager().query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(v.a)({},this.defaultOptions.mutate,e)),this.initQueryManager().mutate(e)},e.prototype.subscribe=function(e){return this.initQueryManager().startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.initProxy().readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.initProxy().readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.initProxy().writeQuery(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.initProxy().writeFragment(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.initProxy().writeData(e);return this.initQueryManager().broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return W(this.link,e)},e.prototype.initQueryManager=function(){var e=this;return this.queryManager||(this.queryManager=new ie({link:this.link,store:this.store,queryDeduplication:this.queryDeduplication,ssrMode:this.ssrMode,clientAwareness:this.clientAwareness,localState:this.localState,onBroadcast:function(){e.devToolsHookCb&&e.devToolsHookCb({action:{},state:{queries:e.queryManager?e.queryManager.queryStore.getStore():{},mutations:e.queryManager?e.queryManager.mutationStore.getStore():{}},dataWithOptimisticResults:e.cache.extract(!0)})}})),this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager?e.queryManager.clearStore():Promise.resolve(null)}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.queryManager&&e.queryManager.reFetchObservableQueries?e.queryManager.reFetchObservableQueries():Promise.resolve(null)})},e.prototype.clearStore=function(){var e=this,t=this.queryManager;return Promise.resolve().then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))}).then(function(){return t?t.clearStore():Promise.resolve(null)})},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?this.queryManager.reFetchObservableQueries(e):Promise.resolve(null)},e.prototype.extract=function(e){return this.initProxy().extract(e)},e.prototype.restore=function(e){return this.initProxy().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.initProxy=function(){return this.proxy||(this.initQueryManager(),this.proxy=this.cache),this.proxy},e}();function se(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:le(e)}]}}function le(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return le(e[0]);var t=[];return Object.keys(e).forEach(function(n){var i={kind:"Field",name:{kind:"Name",value:n},selectionSet:le(e[n])||void 0};t.push(i)}),{kind:"SelectionSet",selections:t}}var ce,ue={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},he=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:Object(y.j)(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:Object(y.j)(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,n,i=e.id,r=e.data;if(void 0!==i){var a=null;try{a=this.read({rootId:i,optimistic:!1,query:ue})}catch(e){}var o=a&&a.__typename||"__ClientData",s=Object.assign({__typename:o},r);this.writeFragment({id:i,fragment:(t=s,n=o,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:n||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:le(t)}]}),data:s})}else this.writeQuery({query:se(r),data:r})},e}();ce||(ce={});var de=n(18),fe=new Map;if(fe.set(1,2)!==fe){var pe=fe.set;Map.prototype.set=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pe.apply(this,e),this}}var ge=new Set;if(ge.add(3)!==ge){var me=ge.add;Set.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.apply(this,e),this}}var ve={};"function"==typeof Object.freeze&&Object.freeze(ve);try{fe.set(ve,ve).delete(ve)}catch(e){var ye=function(e){return e&&function(t){try{fe.set(t,t).delete(t)}finally{return e.call(Object,t)}}};Object.freeze=ye(Object.freeze),Object.seal=ye(Object.seal),Object.preventExtensions=ye(Object.preventExtensions)}var be=!1;function xe(){var e=!be;return Object(y.z)()||(be=!0),e}var we=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,n){var i=n.store.get(e.id);return!i&&"ROOT_QUERY"===e.id||!!i&&(i.__typename&&i.__typename===t||(xe(),"heuristic"))},e}(),ke=(function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}e.prototype.match=function(e,t,n){Object(B.b)(this.isReady);var i=n.store.get(e.id);if(!i)return!1;if(Object(B.b)(i.__typename),i.__typename===t)return!0;var r=this.possibleTypesMap[t];return!!(r&&r.indexOf(i.__typename)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach(function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map(function(e){return e.name}))}),t}}(),function(){function e(){this.children=null,this.key=null}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach(function(e){t=t.getOrCreate(e)}),t.key||(t.key=Object.create(null))},e.prototype.getOrCreate=function(t){var n=this.children||(this.children=new Map),i=n.get(t);return i||n.set(t,i=new e),i},e}()),Se=Object.prototype.hasOwnProperty,Ee=function(){function e(e){void 0===e&&(e=Object.create(null));var t=this;this.data=e,this.depend=Object(de.wrap)(function(e){return t.data[e]},{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){Se.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach(function(n){t.set(n,e[n])}),Object.keys(this.data).forEach(function(n){Se.call(e,n)||t.delete(n)})):Object.keys(this.data).forEach(function(e){t.delete(e)})},e}();function Ce(e){return new Ee(e)}var Te=function(){function e(e){void 0===e&&(e=new ke);var t=this;this.cacheKeyRoot=e;var n=this,i=n.executeStoreQuery,r=n.executeSelectionSet;this.executeStoreQuery=Object(de.wrap)(function(e){return i.call(t,e)},{makeCacheKey:function(e){var t=e.query,i=e.rootValue,r=e.contextValue,a=e.variableValues,o=e.fragmentMatcher;if(r.store instanceof Ee)return n.cacheKeyRoot.lookup(t,r.store,o,JSON.stringify(a),i.id)}}),this.executeSelectionSet=Object(de.wrap)(function(e){return r.call(t,e)},{makeCacheKey:function(e){var t=e.selectionSet,i=e.rootValue,r=e.execContext;if(r.contextValue.store instanceof Ee)return n.cacheKeyRoot.lookup(t,r.contextValue.store,r.fragmentMatcher,JSON.stringify(r.variableValues),i.id)}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(Object(v.a)({},e,{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.variables,r=e.previousResult,a=e.returnPartialData,o=void 0===a||a,s=e.rootId,l=void 0===s?"ROOT_QUERY":s,c=e.fragmentMatcherFunction,u=e.config,h=Object(y.o)(n);i=Object(y.c)({},Object(y.g)(h),i);var d={store:t,dataIdFromObject:u&&u.dataIdFromObject||null,cacheRedirects:u&&u.cacheRedirects||{}},f=this.executeStoreQuery({query:n,rootValue:{type:"id",id:l,generated:!0,typename:"Query"},contextValue:d,variableValues:i,fragmentMatcher:c}),p=f.missing&&f.missing.length>0;return p&&!o&&f.missing.forEach(function(e){if(!e.tolerable)throw new B.a}),r&&Object(y.t)(r,f.result)&&(f.result=r),{result:f.result,complete:!p}},e.prototype.executeStoreQuery=function(e){var t=e.query,n=e.rootValue,i=e.contextValue,r=e.variableValues,a=e.fragmentMatcher,o=void 0===a?_e:a,s=Object(y.k)(t),l=Object(y.i)(t),c={query:t,fragmentMap:Object(y.f)(l),contextValue:i,variableValues:r,fragmentMatcher:o};return this.executeSelectionSet({selectionSet:s.selectionSet,rootValue:n,execContext:c})},e.prototype.executeSelectionSet=function(e){var t=this,n=e.selectionSet,i=e.rootValue,r=e.execContext,a=r.fragmentMap,o=r.contextValue,s=r.variableValues,l={result:null},c=[],u=o.store.get(i.id),h=u&&u.__typename||"ROOT_QUERY"===i.id&&"Query"||void 0;function d(e){var t;return e.missing&&(l.missing=l.missing||[],(t=l.missing).push.apply(t,e.missing)),e.result}return n.selections.forEach(function(e){var n;if(Object(y.F)(e,s))if(Object(y.u)(e)){var l=d(t.executeField(u,h,e,r));void 0!==l&&c.push(((n={})[Object(y.E)(e)]=l,n))}else{var f=void 0;if(Object(y.w)(e))f=e;else if(!(f=a[e.name.value]))throw new B.a;var p=f.typeCondition.name.value,g=r.fragmentMatcher(i,p,o);if(g){var m=t.executeSelectionSet({selectionSet:f.selectionSet,rootValue:i,execContext:r});"heuristic"===g&&m.missing&&(m=Object(v.a)({},m,{missing:m.missing.map(function(e){return Object(v.a)({},e,{tolerable:!0})})})),c.push(d(m))}}}),l.result=Object(y.B)(c),l},e.prototype.executeField=function(e,t,n,i){var r=i.variableValues,a=i.contextValue,o=function(e,t,n,i,r,a){a.resultKey;var o=a.directives,s=n;(i||o)&&(s=Object(y.p)(s,i,o));var l=void 0;if(e&&void 0===(l=e[s])&&r.cacheRedirects&&"string"==typeof t){var c=r.cacheRedirects[t];if(c){var u=c[n];u&&(l=u(e,i,{getCacheKey:function(e){return Object(y.H)({id:r.dataIdFromObject(e),typename:e.__typename})}}))}}if(void 0===l)return{result:l,missing:[{object:e,fieldName:s,tolerable:!1}]};Object(y.x)(l)&&(l=l.json);return{result:l}}(e,t,n.name.value,Object(y.b)(n,r),a,{resultKey:Object(y.E)(n),directives:Object(y.h)(n,r)});return Array.isArray(o.result)?this.combineExecResults(o,this.executeSubSelectedArray(n,o.result,i)):n.selectionSet?null==o.result?o:this.combineExecResults(o,this.executeSelectionSet({selectionSet:n.selectionSet,rootValue:o.result,execContext:i})):(Ae(n,o.result),o)},e.prototype.combineExecResults=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return e.forEach(function(e){e.missing&&(n=n||[]).push.apply(n,e.missing)}),{result:e.pop().result,missing:n}},e.prototype.executeSubSelectedArray=function(e,t,n){var i=this,r=null;function a(e){return e.missing&&(r=r||[]).push.apply(r,e.missing),e.result}return{result:t=t.map(function(t){return null===t?null:Array.isArray(t)?a(i.executeSubSelectedArray(e,t,n)):e.selectionSet?a(i.executeSelectionSet({selectionSet:e.selectionSet,rootValue:t,execContext:n})):(Ae(e,t),t)}),missing:r}},e}();function Ae(e,t){if(!e.selectionSet&&Object(y.v)(t))throw new B.a}function _e(){return!0}var Oe=function(){function e(e){void 0===e&&(e=Object.create(null)),this.data=e}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}();var Pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return Object(v.c)(t,e),t}(Error);var Me=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,n=e.result,i=e.store,r=void 0===i?Ce():i,a=e.variables,o=e.dataIdFromObject,s=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:n,document:t,store:r,variables:a,dataIdFromObject:o,fragmentMatcherFunction:s})},e.prototype.writeResultToStore=function(e){var t=e.dataId,n=e.result,i=e.document,r=e.store,a=void 0===r?Ce():r,o=e.variables,s=e.dataIdFromObject,l=e.fragmentMatcherFunction,c=Object(y.m)(i);try{return this.writeSelectionSetToStore({result:n,dataId:t,selectionSet:c.selectionSet,context:{store:a,processedData:{},variables:Object(y.c)({},Object(y.g)(c),o),dataIdFromObject:s,fragmentMap:Object(y.f)(Object(y.i)(i)),fragmentMatcherFunction:l}})}catch(e){throw function(e,t){var n=new Pe("Error writing result to store for query:\n "+JSON.stringify(t));return n.message+="\n"+e.message,n.stack=e.stack,n}(e,i)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,n=e.result,i=e.dataId,r=e.selectionSet,a=e.context,o=a.variables,s=a.store,l=a.fragmentMap;return r.selections.forEach(function(e){if(Object(y.F)(e,o))if(Object(y.u)(e)){var r=Object(y.E)(e),s=n[r];if(void 0!==s)t.writeFieldToStore({dataId:i,value:s,field:e,context:a});else{var c=!1,u=!1;e.directives&&e.directives.length&&(c=e.directives.some(function(e){return e.name&&"defer"===e.name.value}),u=e.directives.some(function(e){return e.name&&"client"===e.name.value})),!c&&!u&&a.fragmentMatcherFunction}}else{var h=void 0;Object(y.w)(e)?h=e:(h=(l||{})[e.name.value],Object(B.b)(h));var d=!0;if(a.fragmentMatcherFunction&&h.typeCondition){var f=Object(y.H)({id:"self",typename:void 0}),p={store:new Oe({self:n}),cacheRedirects:{}},g=a.fragmentMatcherFunction(f,h.typeCondition.name.value,p);Object(y.y)(),d=!!g}d&&t.writeSelectionSetToStore({result:n,selectionSet:h.selectionSet,dataId:i,context:a})}}),s},e.prototype.writeFieldToStore=function(e){var t,n,i,r=e.field,a=e.value,o=e.dataId,s=e.context,l=s.variables,c=s.dataIdFromObject,u=s.store,h=Object(y.G)(r,l);if(r.selectionSet&&null!==a)if(Array.isArray(a)){var d=o+"."+h;n=this.processArrayValue(a,d,r.selectionSet,s)}else{var f=o+"."+h,p=!0;if(Ie(f)||(f="$"+f),c){var g=c(a);Object(B.b)(!g||!Ie(g)),(g||"number"==typeof g&&0===g)&&(f=g,p=!1)}De(f,r,s.processedData)||this.writeSelectionSetToStore({dataId:f,result:a,selectionSet:r.selectionSet,context:s});var m=a.__typename;n=Object(y.H)({id:f,typename:m},p);var b=(i=u.get(o))&&i[h];if(b!==n&&Object(y.v)(b)){var x=void 0!==b.typename,w=void 0!==m,k=x&&w&&b.typename!==m;Object(B.b)(!p||b.generated||k),Object(B.b)(!x||w),b.generated&&(k?p||u.delete(b.id):function e(t,n,i){if(t===n)return!1;var r=i.get(t);var a=i.get(n);var o=!1;Object.keys(r).forEach(function(t){var n=r[t],s=a[t];Object(y.v)(n)&&Ie(n.id)&&Object(y.v)(s)&&!Object(y.t)(n,s)&&e(n.id,s.id,i)&&(o=!0)});i.delete(t);var s=Object(v.a)({},r,a);if(Object(y.t)(s,a))return o;i.set(n,s);return!0}(b.id,n.id,u))}}else n=null!=a&&"object"==typeof a?{type:"json",json:a}:a;(i=u.get(o))&&Object(y.t)(n,i[h])||u.set(o,Object(v.a)({},i,((t={})[h]=n,t)))},e.prototype.processArrayValue=function(e,t,n,i){var r=this;return e.map(function(e,a){if(null===e)return null;var o=t+"."+a;if(Array.isArray(e))return r.processArrayValue(e,o,n,i);var s=!0;if(i.dataIdFromObject){var l=i.dataIdFromObject(e);l&&(o=l,s=!1)}return De(o,n,i.processedData)||r.writeSelectionSetToStore({dataId:o,result:e,selectionSet:n,context:i}),Object(y.H)({id:o,typename:e.__typename},s)})},e}();function Ie(e){return"$"===e[0]}function De(e,t,n){if(!n)return!1;if(n[e]){if(n[e].indexOf(t)>=0)return!0;n[e].push(t)}else n[e]=[t];return!1}var Ne={fragmentMatcher:new we,dataIdFromObject:function(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null},addTypename:!0,resultCaching:!0};var Le=Object.prototype.hasOwnProperty,Re=function(e){function t(t,n,i){var r=e.call(this,Object.create(null))||this;return r.optimisticId=t,r.parent=n,r.transaction=i,r}return Object(v.c)(t,e),t.prototype.toObject=function(){return Object(v.a)({},this.parent.toObject(),this.data)},t.prototype.get=function(e){return Le.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(Oe),Fe=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n.watches=new Set,n.typenameDocumentCache=new Map,n.cacheKeyRoot=new ke,n.silenceBroadcast=!1,n.config=Object(v.a)({},Ne,t),n.config.customResolvers&&(n.config.cacheRedirects=n.config.customResolvers),n.config.cacheResolvers&&(n.config.cacheRedirects=n.config.cacheResolvers),n.addTypename=n.config.addTypename,n.data=n.config.resultCaching?new Ee:new Oe,n.optimisticData=n.data,n.storeReader=new Te(n.cacheKeyRoot),n.storeWriter=new Me;var i=n,r=i.maybeBroadcastWatch;return n.maybeBroadcastWatch=Object(de.wrap)(function(e){return r.call(n,e)},{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return i.data instanceof Ee?i.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),n}return Object(v.c)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){return"string"==typeof e.rootId&&void 0===this.data.get(e.rootId)?null:this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:this.config.fragmentMatcher.match,previousResult:e.previousResult,config:this.config})},t.prototype.write=function(e){this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:this.config.fragmentMatcher.match}),this.broadcastWatches()},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:this.config.fragmentMatcher.match,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new B.a},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],n=0,i=this.optimisticData;i instanceof Re;)i.optimisticId===e?++n:t.push(i),i=i.parent;if(n>0){for(this.optimisticData=i;t.length>0;){var r=t.pop();this.performTransaction(r.transaction,r.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var n=this.data,i=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new Re(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=i,this.data=n}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Object(y.a)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach(function(t){return e.maybeBroadcastWatch(t)})},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(he),je=n(42),ze={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Ye=function(e,t,n){var i=new Error(n);throw i.name="ServerError",i.response=e,i.statusCode=e.status,i.result=t,i},He=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var i=new je.a(2);throw i.parseError=e,i}return n},We=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,i=e.fetch,r=e.includeExtensions,a=e.useGETForQueries,o=Object(v.e)(e,["uri","fetch","includeExtensions","useGETForQueries"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new je.a(1)}(i),i||(i=fetch);var s={http:{includeExtensions:r},options:o.fetchOptions,credentials:o.credentials,headers:o.headers};return new H(function(e){var t=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")}(e,n),r=e.getContext(),o={};if(r.clientAwareness){var l=r.clientAwareness,c=l.name,u=l.version;c&&(o["apollographql-client-name"]=c),u&&(o["apollographql-client-version"]=u)}var h,d=Object(v.a)({},o,r.headers),f={http:r.http,options:r.fetchOptions,credentials:r.credentials,headers:d},p=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=Object(v.a)({},t.options,{headers:t.headers,credentials:t.credentials}),a=t.http;n.forEach(function(e){r=Object(v.a)({},r,e.options,{headers:Object(v.a)({},r.headers,e.headers)}),e.credentials&&(r.credentials=e.credentials),a=Object(v.a)({},a,e.http)});var o=e.operationName,s=e.extensions,l=e.variables,c=e.query,u={operationName:o,variables:l};return a.includeExtensions&&(u.extensions=s),a.includeQuery&&(u.query=E(c)),{options:r,body:u}}(e,ze,s,f),g=p.options,m=p.body;if(!g.signal){var y=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),b=y.controller,w=y.signal;(h=b)&&(g.signal=w)}if(a&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(g.method="GET"),"GET"===g.method){var k=function(e,t){var n=[],i=function(e,t){n.push(e+"="+encodeURIComponent(t))};"query"in t&&i("query",t.query);t.operationName&&i("operationName",t.operationName);if(t.variables){var r=void 0;try{r=He(t.variables,"Variables map")}catch(e){return{parseError:e}}i("variables",r)}if(t.extensions){var a=void 0;try{a=He(t.extensions,"Extensions map")}catch(e){return{parseError:e}}i("extensions",a)}var o="",s=e,l=e.indexOf("#");-1!==l&&(o=e.substr(l),s=e.substr(0,l));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+o}}(t,m),S=k.newURI,C=k.parseError;if(C)return N(C);t=S}else try{g.body=He(m,"Payload")}catch(C){return N(C)}return new x(function(n){var r;return i(t,g).then(function(t){return e.setContext({response:t}),t}).then((r=e,function(e){return e.text().then(function(t){try{return JSON.parse(t)}catch(i){var n=i;return n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,Promise.reject(n)}}).then(function(t){return e.status>=300&&Ye(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||Ye(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map(function(e){return e.operationName}):r.operationName)+"'."),t})})).then(function(e){return n.next(e),n.complete(),e}).catch(function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))}),function(){h&&h.abort()}})})};var Xe=function(e){function t(t){return e.call(this,We(t).request)||this}return Object(v.c)(t,e),t}(H);function Ve(e){return new H(function(t,n){return new x(function(i){var r,a,o;try{r=n(t).subscribe({next:function(r){r.errors&&(o=e({graphQLErrors:r.errors,response:r,operation:t,forward:n}))?a=o.subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}):i.next(r)},error:function(r){(o=e({operation:t,networkError:r,graphQLErrors:r&&r.result&&r.result.errors,forward:n}))?a=o.subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}):i.error(r)},complete:function(){o||i.complete.bind(i)()}})}catch(r){e({networkError:r,operation:t,forward:n}),i.error(r)}return function(){r&&r.unsubscribe(),a&&r.unsubscribe()}})})}!function(e){function t(t){var n=e.call(this)||this;return n.link=Ve(t),n}Object(v.c)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(H);var Be=n(56),qe=n.n(Be),Ue=["request","uri","credentials","headers","fetch","fetchOptions","clientState","onError","cacheRedirects","cache","name","version","resolvers","typeDefs","fragmentMatcher"],Ge=function(e){function t(t){void 0===t&&(t={});t&&Object.keys(t).filter(function(e){return-1===Ue.indexOf(e)}).length;var n=t.request,i=t.uri,r=t.credentials,a=t.headers,o=t.fetch,s=t.fetchOptions,l=t.clientState,c=t.cacheRedirects,u=t.onError,h=t.name,d=t.version,f=t.resolvers,p=t.typeDefs,g=t.fragmentMatcher,m=t.cache;Object(B.b)(!m||!c),m||(m=c?new Fe({cacheRedirects:c}):new Fe);var v=Ve(u||function(e){var t=e.graphQLErrors;e.networkError;t&&t.map(function(e){e.message,e.locations,e.path;return!0})}),y=!!n&&new H(function(e,t){return new x(function(i){var r;return Promise.resolve(e).then(function(e){return n(e)}).then(function(){r=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})}).catch(i.error.bind(i)),function(){r&&r.unsubscribe()}})}),b=new Xe({uri:i||"/graphql",fetch:o,fetchOptions:s||{},credentials:r||"same-origin",headers:a||{}}),w=H.from([v,y,b].filter(function(e){return!!e})),k=f,S=p,E=g;return l&&(l.defaults&&m.writeData({data:l.defaults}),k=l.resolvers,S=l.typeDefs,E=l.fragmentMatcher),e.call(this,{cache:m,link:w,name:h,version:d,resolvers:k,typeDefs:S,fragmentMatcher:E})||this}return Object(v.c)(t,e),t}(oe),Qe=n(0),$e=n.n(Qe),Ze=n(9),Ke=n.n(Ze),Je=n(61),et=n.n(Je),tt=n(4),nt=n(7),it=n(43),rt=n.n(it),at=(n(19),Qe.createContext?Object(Qe.createContext)(void 0):null),ot=function(e,t){function n(t){if(!t||!t.client)throw new nt.a;return e.children(t.client)}return at?Object(Qe.createElement)(at.Consumer,null,n):n(t)};ot.contextTypes={client:tt.object.isRequired},ot.propTypes={children:tt.func.isRequired};var st,lt=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.operations=new Map,Object(nt.b)(t.client),t.client.__operations_cache__||(t.client.__operations_cache__=i.operations),i}return Object(v.c)(t,e),t.prototype.getChildContext=function(){return{client:this.props.client,operations:this.props.client.__operations_cache__}},t.prototype.render=function(){return at?Object(Qe.createElement)(at.Provider,{value:this.getChildContext()},this.props.children):this.props.children},t.propTypes={client:tt.object.isRequired,children:tt.node.isRequired},t.childContextTypes={client:tt.object.isRequired,operations:tt.object},t}(Qe.Component);!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(st||(st={}));var ct=new Map;function ut(e){var t,n,i=ct.get(e);if(i)return i;Object(nt.b)(!!e&&!!e.kind);var r=e.definitions.filter(function(e){return"FragmentDefinition"===e.kind}),a=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"query"===e.operation}),o=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}),s=e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation});Object(nt.b)(!r.length||a.length||o.length||s.length),Object(nt.b)(a.length+o.length+s.length<=1),n=a.length?st.Query:st.Mutation,a.length||o.length||(n=st.Subscription);var l=a.length?a:o.length?o:s;Object(nt.b)(1===l.length);var c=l[0];t=c.variableDefinitions||[];var u={name:c.name&&"Name"===c.name.kind?c.name.value:"data",type:n,variables:t};return ct.set(e,u),u}function ht(e,t){var n=e.client||t.client;return Object(nt.b)(!!n),n}var dt=Object.prototype.hasOwnProperty;function ft(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function pt(e){return null!==e&&"object"==typeof e}function gt(e,t){if(ft(e,t))return!0;if(!pt(e)||!pt(t))return!1;var n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(function(n){return dt.call(t,n)&&ft(e[n],t[n])})}var mt=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.previousData={},i.hasMounted=!1,i.lastResult=null,i.startQuerySubscription=function(e){if(void 0===e&&(e=!1),e||(i.lastResult=i.queryObservable.getLastResult()),!i.querySubscription){var t=i.getQueryResult();i.querySubscription=i.queryObservable.subscribe({next:function(e){var n=e.loading,r=e.networkStatus,a=e.data;t&&7===t.networkStatus&&gt(t.data,a)?t=void 0:i.lastResult&&i.lastResult.loading===n&&i.lastResult.networkStatus===r&&gt(i.lastResult.data,a)||(t=void 0,i.lastResult&&(i.lastResult=i.queryObservable.getLastResult()),i.updateCurrentData())},error:function(e){if(i.lastResult||i.resubscribeToQuery(),!e.hasOwnProperty("graphQLErrors"))throw e;i.updateCurrentData()}})}},i.removeQuerySubscription=function(){i.querySubscription&&(i.lastResult=i.queryObservable.getLastResult(),i.querySubscription.unsubscribe(),delete i.querySubscription)},i.updateCurrentData=function(){i.handleErrorOrCompleted(),i.hasMounted&&i.forceUpdate()},i.handleErrorOrCompleted=function(){var e=i.queryObservable.currentResult(),t=e.data,n=e.loading,r=e.error,a=i.props,o=a.onCompleted,s=a.onError;!o||n||r?s&&!n&&r&&s(r):o(t)},i.getQueryResult=function(){var e,t={data:Object.create(null)};if(Object.assign(t,{variables:(e=i.queryObservable).variables,refetch:e.refetch.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}),i.props.skip)t=Object(v.a)({},t,{data:void 0,error:void 0,loading:!1});else{var n=i.queryObservable.currentResult(),r=n.loading,a=n.partial,o=n.networkStatus,s=n.errors,l=n.error;s&&s.length>0&&(l=new Z({graphQLErrors:s}));var c=i.queryObservable.options.fetchPolicy;if(Object.assign(t,{loading:r,networkStatus:o,error:l}),r)Object.assign(t.data,i.previousData,n.data);else if(l)Object.assign(t,{data:(i.queryObservable.getLastResult()||{}).data});else if("no-cache"===c&&0===Object.keys(n.data).length)t.data=i.previousData;else{if(i.props.partialRefetch&&0===Object.keys(n.data).length&&a&&"cache-only"!==c)return Object.assign(t,{loading:!0,networkStatus:X.loading}),t.refetch(),t;Object.assign(t.data,n.data),i.previousData=n.data}}if(!i.querySubscription){var u=t.refetch;t.refetch=function(e){return i.querySubscription?u(e):new Promise(function(t,n){i.refetcherQueue={resolve:t,reject:n,args:e}})}}return t.client=i.client,t},i.client=ht(t,n),i.initializeQueryObservable(t),i}return Object(v.c)(t,e),t.prototype.fetchData=function(){if(this.props.skip)return!1;var e=this.props,t=(e.children,e.ssr),n=(e.displayName,e.skip,e.client,e.onCompleted,e.onError,e.partialRefetch,Object(v.e)(e,["children","ssr","displayName","skip","client","onCompleted","onError","partialRefetch"])),i=n.fetchPolicy;if(!1===t)return!1;"network-only"!==i&&"cache-and-network"!==i||(i="cache-first");var r=this.client.watchQuery(Object(v.a)({},n,{fetchPolicy:i}));return this.context&&this.context.renderPromises&&this.context.renderPromises.registerSSRObservable(this,r),!!this.queryObservable.currentResult().loading&&r.result()},t.prototype.componentDidMount=function(){if(this.hasMounted=!0,!this.props.skip&&(this.startQuerySubscription(!0),this.refetcherQueue)){var e=this.refetcherQueue,t=e.args,n=e.resolve,i=e.reject;this.queryObservable.refetch(t).then(n).catch(i)}},t.prototype.componentWillReceiveProps=function(e,t){if(!e.skip||this.props.skip){var n=ht(e,t);gt(this.props,e)&&this.client===n||(this.client!==n&&(this.client=n,this.removeQuerySubscription(),this.queryObservable=null,this.previousData={},this.updateQuery(e)),this.props.query!==e.query&&this.removeQuerySubscription(),this.updateQuery(e),e.skip||this.startQuerySubscription())}else this.removeQuerySubscription()},t.prototype.componentWillUnmount=function(){this.removeQuerySubscription(),this.hasMounted=!1},t.prototype.componentDidUpdate=function(e){(!rt()(e.query,this.props.query)||!rt()(e.variables,this.props.variables))&&this.handleErrorOrCompleted()},t.prototype.render=function(){var e=this,t=this.context,n=function(){return e.props.children(e.getQueryResult())};return t&&t.renderPromises?t.renderPromises.addQueryPromise(this,n):n()},t.prototype.extractOptsFromProps=function(e){this.operation=ut(e.query),Object(nt.b)(this.operation.type===st.Query);var t=e.displayName||"Query";return Object(v.a)({},e,{displayName:t,context:e.context||{},metadata:{reactComponent:{displayName:t}}})},t.prototype.initializeQueryObservable=function(e){var t=this.extractOptsFromProps(e);this.setOperations(t),this.context&&this.context.renderPromises&&(this.queryObservable=this.context.renderPromises.getSSRObservable(this)),this.queryObservable||(this.queryObservable=this.client.watchQuery(t))},t.prototype.setOperations=function(e){this.context.operations&&this.context.operations.set(this.operation.name,{query:e.query,variables:e.variables})},t.prototype.updateQuery=function(e){this.queryObservable?this.setOperations(e):this.initializeQueryObservable(e),this.queryObservable.setOptions(this.extractOptsFromProps(e)).catch(function(){return null})},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.queryObservable.getLastError(),t=this.queryObservable.getLastResult();this.queryObservable.resetLastResults(),this.startQuerySubscription(),Object.assign(this.queryObservable,{lastError:e,lastResult:t})},t.contextTypes={client:tt.object,operations:tt.object,renderPromises:tt.object},t.propTypes={client:tt.object,children:tt.func.isRequired,fetchPolicy:tt.string,notifyOnNetworkStatusChange:tt.bool,onCompleted:tt.func,onError:tt.func,pollInterval:tt.number,query:tt.object.isRequired,variables:tt.object,ssr:tt.bool,partialRefetch:tt.bool},t}(Qe.Component),vt={loading:!1,called:!1,error:void 0,data:void 0};(function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.hasMounted=!1,i.runMutation=function(e){void 0===e&&(e={}),i.onMutationStart();var t=i.generateNewMutationId();return i.mutate(e).then(function(e){return i.onMutationCompleted(e,t),e}).catch(function(e){if(i.onMutationError(e,t),!i.props.onError)throw e})},i.mutate=function(e){var t=i.props,n=t.mutation,r=t.variables,a=t.optimisticResponse,o=t.update,s=t.context,l=void 0===s?{}:s,c=t.awaitRefetchQueries,u=void 0!==c&&c,h=t.fetchPolicy,d=Object(v.a)({},e),f=d.refetchQueries||i.props.refetchQueries;f&&f.length&&Array.isArray(f)&&(f=f.map(function(e){return"string"==typeof e&&i.context.operations&&i.context.operations.get(e)||e}),delete d.refetchQueries);var p=Object.assign({},r,d.variables);return delete d.variables,i.client.mutate(Object(v.a)({mutation:n,optimisticResponse:a,refetchQueries:f,awaitRefetchQueries:u,update:o,context:l,fetchPolicy:h,variables:p},d))},i.onMutationStart=function(){i.state.loading||i.props.ignoreResults||i.setState({loading:!0,error:void 0,data:void 0,called:!0})},i.onMutationCompleted=function(e,t){var n=i.props,r=n.onCompleted,a=n.ignoreResults,o=e.data,s=e.errors,l=s&&s.length>0?new Z({graphQLErrors:s}):void 0,c=function(){return r?r(o):null};i.hasMounted&&i.isMostRecentMutation(t)&&!a?i.setState({loading:!1,data:o,error:l},c):c()},i.onMutationError=function(e,t){var n=i.props.onError,r=function(){return n?n(e):null};i.hasMounted&&i.isMostRecentMutation(t)?i.setState({loading:!1,error:e},r):r()},i.generateNewMutationId=function(){return i.mostRecentMutationId=i.mostRecentMutationId+1,i.mostRecentMutationId},i.isMostRecentMutation=function(e){return i.mostRecentMutationId===e},i.verifyDocumentIsMutation=function(e){var t=ut(e);Object(nt.b)(t.type===st.Mutation)},i.client=ht(t,n),i.verifyDocumentIsMutation(t.mutation),i.mostRecentMutationId=0,i.state=vt,i}Object(v.c)(t,e),t.prototype.componentDidMount=function(){this.hasMounted=!0},t.prototype.componentWillUnmount=function(){this.hasMounted=!1},t.prototype.componentWillReceiveProps=function(e,t){var n=ht(e,t);gt(this.props,e)&&this.client===n||(this.props.mutation!==e.mutation&&this.verifyDocumentIsMutation(e.mutation),this.client!==n&&(this.client=n,this.setState(vt)))},t.prototype.render=function(){var e=this.props.children,t=this.state,n=t.loading,i=t.data,r=t.error,a={called:t.called,loading:n,data:i,error:r,client:this.client};return e(this.runMutation,a)},t.contextTypes={client:tt.object,operations:tt.object},t.propTypes={mutation:tt.object.isRequired,variables:tt.object,optimisticResponse:tt.object,refetchQueries:Object(tt.oneOfType)([Object(tt.arrayOf)(Object(tt.oneOfType)([tt.string,tt.object])),tt.func]),awaitRefetchQueries:tt.bool,update:tt.func,children:tt.func.isRequired,onCompleted:tt.func,onError:tt.func,fetchPolicy:tt.string}})(Qe.Component),function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.initialize=function(e){i.queryObservable||(i.queryObservable=i.client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},i.startSubscription=function(){i.querySubscription||(i.querySubscription=i.queryObservable.subscribe({next:i.updateCurrentData,error:i.updateError,complete:i.completeSubscription}))},i.getInitialState=function(){return{loading:!0,error:void 0,data:void 0}},i.updateCurrentData=function(e){var t=i,n=t.client,r=t.props.onSubscriptionData;r&&r({client:n,subscriptionData:e}),i.setState({data:e.data,loading:!1,error:void 0})},i.updateError=function(e){i.setState({error:e,loading:!1})},i.completeSubscription=function(){var e=i.props.onSubscriptionComplete;e&&e(),i.endSubscription()},i.endSubscription=function(){i.querySubscription&&(i.querySubscription.unsubscribe(),delete i.querySubscription)},i.client=ht(t,n),i.initialize(t),i.state=i.getInitialState(),i}Object(v.c)(t,e),t.prototype.componentDidMount=function(){this.startSubscription()},t.prototype.componentWillReceiveProps=function(e,t){var n=ht(e,t);if(!gt(this.props.variables,e.variables)||this.client!==n||this.props.subscription!==e.subscription){var i=e.shouldResubscribe;"function"==typeof i&&(i=!!i(this.props,e));var r=!1===i;if(this.client!==n&&(this.client=n),!r)return this.endSubscription(),delete this.queryObservable,this.initialize(e),this.startSubscription(),void this.setState(this.getInitialState());this.initialize(e),this.startSubscription()}},t.prototype.componentWillUnmount=function(){this.endSubscription()},t.prototype.render=function(){var e=this.props.children;return e?e(Object.assign({},this.state,{variables:this.props.variables})):null},t.contextTypes={client:tt.object},t.propTypes={subscription:tt.object.isRequired,variables:tt.object,children:tt.func,onSubscriptionData:tt.func,onSubscriptionComplete:tt.func,shouldResubscribe:Object(tt.oneOfType)([tt.func,tt.bool])}}(Qe.Component);!function(e){function t(t){var n=e.call(this,t)||this;return n.withRef=!1,n.setWrappedInstance=n.setWrappedInstance.bind(n),n}Object(v.c)(t,e),t.prototype.getWrappedInstance=function(){return Object(nt.b)(this.withRef),this.wrappedInstance},t.prototype.setWrappedInstance=function(e){this.wrappedInstance=e}}(Qe.Component);!function(){function e(){this.queryPromises=new Map,this.queryInfoTrie=new Map}e.prototype.registerSSRObservable=function(e,t){this.lookupQueryInfo(e).observable=t},e.prototype.getSSRObservable=function(e){return this.lookupQueryInfo(e).observable},e.prototype.addQueryPromise=function(e,t){return this.lookupQueryInfo(e).seen?t():(this.queryPromises.set(e,new Promise(function(t){t(e.fetchData())})),null)},e.prototype.hasPromises=function(){return this.queryPromises.size>0},e.prototype.consumeAndAwaitPromises=function(){var e=this,t=[];return this.queryPromises.forEach(function(n,i){e.lookupQueryInfo(i).seen=!0,t.push(n)}),this.queryPromises.clear(),Promise.all(t)},e.prototype.lookupQueryInfo=function(e){var t=this.queryInfoTrie,n=e.props,i=n.query,r=n.variables,a=t.get(i)||new Map;t.has(i)||t.set(i,a);var o=JSON.stringify(r),s=a.get(o)||{seen:!1,observable:null};return a.has(o)||a.set(o,s),s}}();function yt(){var e=m(["\n  query getAnalytics($span: Int!) {\n    analytics(span: $span) {\n      users {\n        ...data\n      }\n      threads {\n        ...data\n      }\n      posts {\n        ...data\n      }\n      attachments {\n        ...data\n      }\n      dataDownloads {\n        ...data\n      }\n    }\n  }\n\n  fragment data on AnalyticsData {\n    current\n    currentCumulative\n    previous\n    previousCumulative\n  }\n"]);return yt=function(){return e},e}var bt=qe()(yt()),xt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={span:30},n.setSpan=function(e){n.setState({span:e})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.errorMessage,n=e.labels,i=e.title,r=this.state.span;return $e.a.createElement("div",{className:"card card-admin-info"},$e.a.createElement("div",{className:"card-body"},$e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col"},$e.a.createElement("h4",{className:"card-title"},i)),$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(wt,{span:r,setSpan:this.setSpan})))),$e.a.createElement(mt,{query:bt,variables:{span:r}},function(e){var i=e.loading,a=e.error,o=e.data;if(i)return $e.a.createElement(kt,null);if(a)return $e.a.createElement(St,{message:t});var s=o.analytics;return $e.a.createElement($e.a.Fragment,null,$e.a.createElement(Et,{data:s.users,name:n.users,span:r}),$e.a.createElement(Et,{data:s.threads,name:n.threads,span:r}),$e.a.createElement(Et,{data:s.posts,name:n.posts,span:r}),$e.a.createElement(Et,{data:s.attachments,name:n.attachments,span:r}),$e.a.createElement(Et,{data:s.dataDownloads,name:n.dataDownloads,span:r}))}))}}]),t}(),wt=function(e){var t=e.span,n=e.setSpan;return $e.a.createElement("div",null,[30,90,180,360].map(function(e){return $e.a.createElement("button",{key:e,className:e===t?"btn btn-primary btn-sm ml-3":"btn btn-light btn-sm ml-3",type:"button",onClick:function(){return n(e)}},e)}))},kt=function(){return $e.a.createElement("div",{className:"card-body border-top"},$e.a.createElement("div",{className:"text-center py-5"},$e.a.createElement("div",{className:"spinner-border text-light",role:"status"},$e.a.createElement("span",{className:"sr-only"},"Loading..."))))},St=function(e){var t=e.message;return $e.a.createElement("div",{className:"card-body border-top"},$e.a.createElement("div",{className:"text-center py-5"},t))},Et=function(e){var t=e.data,n=(e.legend,e.name),i=e.span,r={legend:{show:!1},chart:{animations:{enabled:!1},parentHeightOffset:0,toolbar:{show:!1}},colors:["#6554c0","#b3d4ff"],grid:{padding:{top:0}},stroke:{width:2},tooltip:{x:{show:!1},y:{title:{formatter:function(e,t){var n=t.dataPointIndex,r=o()();return"P"===e&&r.subtract(i,"days"),r.subtract(i-n-1,"days"),r.format("ll")}},formatter:function(e,n){var i=n.dataPointIndex;return 0===n.seriesIndex?t.current[i]:t.previous[i]}}},xaxis:{axisBorder:{show:!1},axisTicks:{show:!1},labels:{show:!1},categories:[],tooltip:{enabled:!1}},yaxis:{tickAmount:2,max:function(e){return e||1},show:!1}},a=[{name:"C",data:t.currentCumulative},{name:"P",data:t.previousCumulative}];return $e.a.createElement("div",{className:"card-body border-top pb-1"},$e.a.createElement("h5",{className:"m-0"},n),$e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(Ct,{data:t})),$e.a.createElement("div",{className:"col"},$e.a.createElement(Tt,null,function(e){var t=e.width;return t>1&&$e.a.createElement(et.a,{options:r,series:a,type:"line",width:t,height:140})}))))},Ct=function(e){var t=e.data,n=t.current.reduce(function(e,t){return e+t}),i=n-t.previous.reduce(function(e,t){return e+t}),r="text-light",a="fas fa-equals";return i>0&&(r="text-success",a="fas fa-chevron-up"),i<0&&(r="text-danger",a="fas fa-chevron-down"),$e.a.createElement("div",{className:"card-admin-analytics-summary"},$e.a.createElement("div",null,n),$e.a.createElement("small",{className:r},$e.a.createElement("span",{className:a})," ",Math.abs(i)))},Tt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={width:1,height:1},n.element=$e.a.createRef(),n.updateSize=function(){n.setState({width:n.element.current.clientWidth,height:n.element.current.clientHeight})},n}return g(t,$e.a.Component),c(t,[{key:"componentDidMount",value:function(){this.timer=window.setInterval(this.updateSize,3e3),this.updateSize()}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.timer)}},{key:"render",value:function(){return $e.a.createElement("div",{className:"card-admin-analytics-chart",ref:this.element},this.props.children(this.state))}}]),t}(),At=function(e){var t=e.elementId,n=e.errorMessage,i=e.labels,r=e.title,a=e.uri,o=document.getElementById(t);o||console.error("Element with id "+o+"doesn't exist!");var s=new Ge({credentials:"same-origin",uri:a});Ke.a.render($e.a.createElement(lt,{client:s},$e.a.createElement(xt,{errorMessage:n,labels:i,title:r})),o)},_t=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={value:n.props.value},n.onChange=function(e){var t=e.target;n.setState({value:t.value})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){return $e.a.createElement("div",{className:"row"},$e.a.createElement("div",{className:"col-auto pr-0"},$e.a.createElement("input",{type:"color",className:"form-control",style:{width:"48px"},value:Pt(this.state.value),onChange:this.onChange})),$e.a.createElement("div",{className:"col"},$e.a.createElement("input",{type:"text",className:"form-control",name:this.props.name,value:this.state.value,onChange:this.onChange})))}}]),t}(),Ot=/^#[0-9a-fA-F]{6}$/,Pt=function(e){return Ot.test(e)?e:"#ffffff"},Mt=function(e){var t=e.elementId,n=document.getElementById(t);n||console.error("Element with id "+n+"doesn't exist!");var i=n.name,r=n.value,a=document.createElement("div");n.parentNode.insertBefore(a,n),n.remove(),Ke.a.render($e.a.createElement(_t,{name:i,value:r}),a)},It=(n(16),function(e,t){var n=document.querySelectorAll(e),i=function(e){if(!window.confirm(t))return e.preventDefault(),!1};n.forEach(function(e){var t="form"===e.tagName.toLowerCase()?"submit":"click";e.addEventListener(t,i)})}),Dt=(n(110),function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).state={defaultValue:n.props.value,value:n.props.value},n.setNever=function(){n.setState({value:null})},n.setInitialValue=function(){n.setState(function(e){var t=e.defaultValue;e.value;if(t)return{value:t};var n=o()();return n.add(1,"hour"),{value:n}})},n.setValue=function(e){n.setState({value:e})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.never,i=e.setDate,r=this.state.value;return $e.a.createElement("div",{onBlur:this.handleBlur,onFocus:this.handleFocus},$e.a.createElement("input",{type:"hidden",name:t,value:r?r.format():""}),$e.a.createElement("div",null,$e.a.createElement("button",{className:Nt(null===r),type:"button",onClick:this.setNever},n),$e.a.createElement("button",{className:Nt(null!==r)+" ml-3",type:"button",onClick:this.setInitialValue},r?r.format("L LT"):i)),$e.a.createElement(Lt,{value:r,onChange:this.setValue}))}}]),t}()),Nt=function(e){return e?"btn btn-outline-primary btn-sm":"btn btn-outline-secondary btn-sm"},Lt=function(e){var t=e.value,n=e.onChange;return t?$e.a.createElement("div",{className:"row mt-3"},$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(jt,{value:t,onChange:n})),$e.a.createElement("div",{className:"col-auto"},$e.a.createElement(Wt,{value:t,onChange:n}))):null},Rt=[1,2,3,4,5,6],Ft=[1,2,3,4,5,6,7],jt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).decreaseMonth=function(){n.setState(function(e,t){var n=t.value.clone();n.subtract(1,"month"),t.onChange(n)})},n.increaseMonth=function(){n.setState(function(e,t){var n=t.value.clone();n.add(1,"month"),t.onChange(n)})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,i=t.clone().startOf("month").isoWeekday(),r=t.clone();return r.date(1),r.hour(t.hour()),r.minute(t.minute()),r.subtract(i+1,"day"),$e.a.createElement("div",{className:"control-month-picker"},$e.a.createElement(zt,{decreaseMonth:this.decreaseMonth,increaseMonth:this.increaseMonth,value:t}),$e.a.createElement(Yt,null),Rt.map(function(e){return $e.a.createElement("div",{className:"row align-items-center m-0",key:e},Ft.map(function(e){return $e.a.createElement(Ht,{calendar:r,key:e,value:t,onSelect:n})}))}))}}]),t}(),zt=function(e){var t=e.decreaseMonth,n=e.increaseMonth,i=e.value;return $e.a.createElement("div",{className:"row align-items-center"},$e.a.createElement("div",{className:"col-auto text-center"},$e.a.createElement("button",{className:"btn btn-block py-1 px-3",type:"button",onClick:t},$e.a.createElement("span",{className:"fas fa-chevron-left"}))),$e.a.createElement("div",{className:"col text-center font-weight-bold"},i.format("MMMM YYYY")),$e.a.createElement("div",{className:"col-auto text-center"},$e.a.createElement("button",{className:"btn btn-block py-1 px-3",type:"button",onClick:n},$e.a.createElement("span",{className:"fas fa-chevron-right"}))))},Yt=function(){return $e.a.createElement("div",{className:"row align-items-center m-0"},o.a.weekdaysMin(!1).map(function(e,t){return $e.a.createElement("div",{className:"col text-center px-1 "+(0===t?"text-danger":"text-muted"),key:e},e)}))},Ht=function(e){var t=e.calendar,n=e.value,i=e.onSelect;t.add(1,"day");var r=t.clone(),a=r.format("D M Y")===n.format("D M Y");return $e.a.createElement("div",{className:"col text-center px-1"},$e.a.createElement("button",{className:"btn btn-sm btn-block px-0"+(a?" btn-primary":""),type:"button",onClick:function(){return i(r)},disabled:r.month()!==n.month()},r.format("D")))},Wt=function(e){function t(){var e,n;s(this,t);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=d(this,(e=f(t)).call.apply(e,[this].concat(r)))).handleHourChange=function(e){var t=e.target.value;t.match(/^[0-2][0-9]?[0-9]?$/)&&n.setState(function(e,n){var i=Xt(t,2),r=n.value.clone();r.hour(i),n.onChange(r)})},n.handleMinuteChange=function(e){var t=e.target.value;t.match(/^[0-5][0-9]?[0-9]?$/)&&n.setState(function(e,n){var i=Xt(t,5),r=n.value.clone();r.minute(i),n.onChange(r)})},n}return g(t,$e.a.Component),c(t,[{key:"render",value:function(){return $e.a.createElement("div",{className:"control-time-picker"},$e.a.createElement("div",{className:"row align-items-center m-0"},$e.a.createElement("div",{className:"col px-0"},$e.a.createElement(Vt,{format:"HH",value:this.props.value,onChange:this.handleHourChange})),$e.a.createElement("div",{className:"col-auto px-0"},$e.a.createElement("span",null,":")),$e.a.createElement("div",{className:"col px-0"},$e.a.createElement(Vt,{format:"mm",value:this.props.value,onChange:this.handleMinuteChange}))))}}]),t}(),Xt=function(e,t){var n=e;return 3===n.length&&(n=n.substring(1,3),parseInt(n[0])>t&&(n=t+""+n[1])),n},Vt=function(e){var t=e.format,n=e.value,i=e.onChange;return $e.a.createElement("input",{className:"form-control text-center",placeholder:"00",type:"text",value:n.format(t),onChange:i})},Bt=function(e){var t=e.elementId,n=e.never,i=e.setDate,r=document.getElementById(t);r||console.error("Element with id "+r+"doesn't exist!"),r.type="hidden";var a=r.name,s=r.value.length?o()(r.value):null;s&&s.local();var l=document.createElement("div");r.parentNode.insertBefore(l,r),r.remove(),Ke.a.render($e.a.createElement(Dt,{name:a,never:n,value:s,setDate:i}),l)},qt=function(e,t,n){document.querySelectorAll(e).forEach(function(e){e.addEventListener(t,n)})},Ut=function(e,t){var n=document.querySelector("#mass-action .dropdown-toggle"),i=n.querySelector("span:last-child"),r=function(){var r=document.querySelectorAll(".row-select input:checked");n.disabled=0===r.length,r.length?i.textContent=t.replace("0",r.length):i.textContent=e};r(),qt(".row-select input","change",function(){r()}),qt("#mass-action [data-confirmation]","click",function(e){if(!window.confirm(e.target.dataset.confirmation))return e.preventDefault(),!1})},Gt=function(e,t){var n=e.querySelector("form");if(null!==n){var i=n.querySelector("button"),r=e.querySelector("th input[type=checkbox]"),a=e.querySelectorAll("td input[type=checkbox]"),o=function(){var t=e.querySelectorAll("td input:checked");r.checked=a.length===t.length,i.disabled=0===t.length};o(),r.addEventListener("change",function(e){a.forEach(function(t){return t.checked=e.target.checked}),o()}),a.forEach(function(e){e.addEventListener("change",o)}),n.addEventListener("submit",function(n){if(0===e.querySelectorAll("td input:checked").length||!window.confirm(t))return n.preventDefault(),!1})}},Qt=function(e){document.querySelectorAll(".card-admin-table").forEach(function(t){return Gt(t,e)})},$t=function(e){var t=o()(e.dataset.timestamp);e.title=t.format("LLLL"),r()(e).tooltip()},Zt=function(e){var t=o()();e.forEach(function(e){Kt(e,t)})},Kt=function(e,t){var n=o()(e.dataset.timestamp);if(Math.abs(n.diff(t,"seconds"))<21600)e.textContent=n.from(t);else{var i=Math.abs(n.diff(t,"days"));e.textContent=i<5?n.calendar(t):n.format(e.dataset.format)}},Jt=function(){var e=document.querySelectorAll("[data-timestamp]");e.forEach($t),Zt(e),window.setInterval(function(){Zt(e)},2e4)},en=function(){r()('[data-tooltip="top"]').tooltip({placement:"top"}),r()('[data-tooltip="bottom"]').tooltip({placement:"bottom"})},tn=function(){document.querySelectorAll(".form-group.has-error").forEach(function(e){e.querySelectorAll(".form-control").forEach(function(e){e.classList.add("is-invalid")})})};function nn(){var e=m(["\n  query getVersion {\n    version {\n      status\n      message\n      description\n    }\n  }\n"]);return nn=function(){return e},e}var rn=qe()(nn()),an=function(e){var t=e.errorMessage,n=e.loadingMessage;return $e.a.createElement(mt,{query:rn},function(e){var i=e.loading,r=e.error,a=e.data;return i?$e.a.createElement(on,n):r?$e.a.createElement(sn,t):$e.a.createElement(ln,a.version)})},on=function(e){var t=e.description,n=e.message;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement("div",{className:"media-check-icon"},$e.a.createElement("div",{className:"spinner-border",role:"status"},$e.a.createElement("span",{className:"sr-only"},"Loading..."))),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},sn=function(e){var t=e.description,n=e.message;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement("div",{className:"media-check-icon media-check-icon-danger"},$e.a.createElement("span",{className:"fas fa-times"})),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},ln=function(e){var t=e.description,n=e.message,i=e.status;return $e.a.createElement("div",{className:"media media-admin-check"},$e.a.createElement(cn,{status:i}),$e.a.createElement("div",{className:"media-body"},$e.a.createElement("h5",null,n),t))},cn=function(e){var t=e.status,n="media-check-icon media-check-icon-";return"SUCCESS"===t&&(n+="success"),"WARNING"===t&&(n+="warning"),"ERROR"===t&&(n+="danger"),$e.a.createElement("div",{className:n},$e.a.createElement(un,{status:t}))},un=function(e){var t=e.status;return"SUCCESS"===t?$e.a.createElement("span",{className:"fas fa-check"}):"WARNING"===t?$e.a.createElement("span",{className:"fas fa-question"}):"ERROR"===t?$e.a.createElement("span",{className:"fas fa-times"}):null},hn=function(e){var t=e.elementId,n=e.errorMessage,i=e.loadingMessage,r=e.uri,a=document.getElementById(t);a||console.error("Element with id "+a+"doesn't exist!");var o=new Ge({credentials:"same-origin",uri:r});Ke.a.render($e.a.createElement(lt,{client:o},$e.a.createElement(an,{errorMessage:n,loadingMessage:i})),a)};window.moment=o.a,window.misago={initAnalytics:At,initColorpicker:Mt,initConfirmation:It,initDatepicker:Bt,initMassActions:Ut,initMassDelete:Qt,initVersionCheck:hn,init:function(){var e=document.querySelector("html").lang;o.a.locale(e.replace("_","-").toLowerCase()),en(),Jt(),tn()}}},function(e,t,n){"use strict";n.r(t);var i=n(26),r=n(17);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,r.a&&(e.prototype[r.a]=t)}function o(e,t){if(!e)throw new Error(t)}var s,l=function(e,t,n){this.body=e,this.name=t||"GraphQL request",this.locationOffset=n||{line:1,column:1},this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive")};function c(e,t){for(var n,i=/\r\n|[\n\r]/g,r=1,a=t+1;(n=i.exec(e.body))&&n.index<t;)r+=1,a=t+1-(n.index+n[0].length);return{line:r,column:a}}function u(e,t){var n=e.locationOffset.column-1,i=h(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=i.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(o,":").concat(l,")\n")+function(e){var t=e.filter(function(e){e[0];var t=e[1];return void 0!==t}),n=0,i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=l[0];n=Math.max(n,c.length)}}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return t.map(function(e){var t,i=e[0],r=e[1];return h(n-(t=i).length)+t+r}).join("\n")}([["".concat(o-1,": "),c[r-1]],["".concat(o,": "),c[r]],["",h(l-1)+"^"],["".concat(o+1,": "),c[r+1]]])}function h(e){return Array(e+1).join(" ")}function d(e,t,n,i,r,a,o){var s=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,l=n;if(!l&&s){var u=s[0];l=u&&u.loc&&u.loc.source}var h,f=i;!f&&s&&(f=s.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),f&&0===f.length&&(f=void 0),i&&n?h=i.map(function(e){return c(n,e)}):s&&(h=s.reduce(function(e,t){return t.loc&&e.push(c(t.loc.source,t.loc.start)),e},[]));var p=o||a&&a.extensions;Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:h||void 0,enumerable:Boolean(h)},path:{value:r||void 0,enumerable:Boolean(r)},nodes:{value:s||void 0},source:{value:l||void 0},positions:{value:f||void 0},originalError:{value:a},extensions:{value:p||void 0,enumerable:Boolean(p)}}),a&&a.stack?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,d):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function f(e,t,n){return new d("Syntax Error: ".concat(n),void 0,e,[t])}s=l,"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}}),d.prototype=Object.create(Error.prototype,{constructor:{value:d},name:{value:"GraphQLError"},toString:{value:function(){return function(e){var t=[];if(e.nodes){var n=!0,i=!1,r=void 0;try{for(var a,o=e.nodes[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.loc&&t.push(u(s.loc.source,c(s.loc.source,s.loc.start)))}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}}else if(e.source&&e.locations){var l=e.source,h=!0,d=!1,f=void 0;try{for(var p,g=e.locations[Symbol.iterator]();!(h=(p=g.next()).done);h=!0){var m=p.value;t.push(u(l,m))}}catch(e){d=!0,f=e}finally{try{h||null==g.return||g.return()}finally{if(d)throw f}}}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}(this)}}});var p=n(27);function g(e,t){var n=new x(y.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:m,lookahead:v}}function m(){return this.lastToken=this.token,this.token=this.lookahead()}function v(){var e=this.token;if(e.kind!==y.EOF)do{e=e.next||(e.next=k(this,e))}while(e.kind===y.COMMENT);return e}var y=Object.freeze({SOF:"<SOF>",EOF:"<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"});function b(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}function x(e,t,n,i,r,a,o){this.kind=e,this.start=t,this.end=n,this.line=i,this.column=r,this.value=o,this.prev=a,this.next=null}function w(e){return isNaN(e)?y.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function k(e,t){var n=e.source,i=n.body,r=i.length,a=function(e,t,n){var i=e.length,r=t;for(;r<i;){var a=e.charCodeAt(r);if(9===a||32===a||44===a||65279===a)++r;else if(10===a)++r,++n.line,n.lineStart=r;else{if(13!==a)break;10===e.charCodeAt(r+1)?r+=2:++r,++n.line,n.lineStart=r}}return r}(i,t.end,e),o=e.line,s=1+a-e.lineStart;if(a>=r)return new x(y.EOF,r,r,o,s,t);var l=i.charCodeAt(a);switch(l){case 33:return new x(y.BANG,a,a+1,o,s,t);case 35:return function(e,t,n,i,r){var a,o=e.body,s=t;do{a=o.charCodeAt(++s)}while(!isNaN(a)&&(a>31||9===a));return new x(y.COMMENT,t,s,n,i,r,o.slice(t+1,s))}(n,a,o,s,t);case 36:return new x(y.DOLLAR,a,a+1,o,s,t);case 38:return new x(y.AMP,a,a+1,o,s,t);case 40:return new x(y.PAREN_L,a,a+1,o,s,t);case 41:return new x(y.PAREN_R,a,a+1,o,s,t);case 46:if(46===i.charCodeAt(a+1)&&46===i.charCodeAt(a+2))return new x(y.SPREAD,a,a+3,o,s,t);break;case 58:return new x(y.COLON,a,a+1,o,s,t);case 61:return new x(y.EQUALS,a,a+1,o,s,t);case 64:return new x(y.AT,a,a+1,o,s,t);case 91:return new x(y.BRACKET_L,a,a+1,o,s,t);case 93:return new x(y.BRACKET_R,a,a+1,o,s,t);case 123:return new x(y.BRACE_L,a,a+1,o,s,t);case 124:return new x(y.PIPE,a,a+1,o,s,t);case 125:return new x(y.BRACE_R,a,a+1,o,s,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,i,r){var a=e.body,o=a.length,s=t+1,l=0;for(;s!==o&&!isNaN(l=a.charCodeAt(s))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++s;return new x(y.NAME,t,s,n,i,r,a.slice(t,s))}(n,a,o,s,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,i,r,a){var o=e.body,s=n,l=t,c=!1;45===s&&(s=o.charCodeAt(++l));if(48===s){if((s=o.charCodeAt(++l))>=48&&s<=57)throw f(e,l,"Invalid number, unexpected digit after 0: ".concat(w(s),"."))}else l=S(e,l,s),s=o.charCodeAt(l);46===s&&(c=!0,s=o.charCodeAt(++l),l=S(e,l,s),s=o.charCodeAt(l));69!==s&&101!==s||(c=!0,43!==(s=o.charCodeAt(++l))&&45!==s||(s=o.charCodeAt(++l)),l=S(e,l,s));return new x(c?y.FLOAT:y.INT,t,l,i,r,a,o.slice(t,l))}(n,a,l,o,s,t);case 34:return 34===i.charCodeAt(a+1)&&34===i.charCodeAt(a+2)?function(e,t,n,i,r,a){var o=e.body,s=t+3,l=s,c=0,u="";for(;s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return u+=o.slice(l,s),new x(y.BLOCK_STRING,t,s+3,n,i,r,Object(p.a)(u));if(c<32&&9!==c&&10!==c&&13!==c)throw f(e,s,"Invalid character within String: ".concat(w(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(u+=o.slice(l,s)+'"""',l=s+=4):++s}throw f(e,s,"Unterminated string.")}(n,a,o,s,t,e):function(e,t,n,i,r){var a=e.body,o=t+1,s=o,l=0,c="";for(;o<a.length&&!isNaN(l=a.charCodeAt(o))&&10!==l&&13!==l;){if(34===l)return c+=a.slice(s,o),new x(y.STRING,t,o+1,n,i,r,c);if(l<32&&9!==l)throw f(e,o,"Invalid character within String: ".concat(w(l),"."));if(++o,92===l){switch(c+=a.slice(s,o-1),l=a.charCodeAt(o)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var u=(h=a.charCodeAt(o+1),d=a.charCodeAt(o+2),p=a.charCodeAt(o+3),g=a.charCodeAt(o+4),E(h)<<12|E(d)<<8|E(p)<<4|E(g));if(u<0)throw f(e,o,"Invalid character escape sequence: "+"\\u".concat(a.slice(o+1,o+5),"."));c+=String.fromCharCode(u),o+=4;break;default:throw f(e,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}s=++o}}var h,d,p,g;throw f(e,o,"Unterminated string.")}(n,a,o,s,t)}throw f(n,a,function(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(w(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(w(e),".")}(l))}function S(e,t,n){var i=e.body,r=t,a=n;if(a>=48&&a<=57){do{a=i.charCodeAt(++r)}while(a>=48&&a<=57);return r}throw f(e,r,"Invalid number, expected digit but got: ".concat(w(a),"."))}function E(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}a(x,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}});var C=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=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"});function A(e,t){var n="string"==typeof e?new l(e):e;if(!(n instanceof l))throw new TypeError("Must provide Source. Received: ".concat(Object(i.a)(n)));return function(e){var t=e.token;return{kind:C.DOCUMENT,definitions:we(e,y.SOF,M,y.EOF),loc:de(e,t)}}(g(n,t||{}))}function _(e,t){var n=g("string"==typeof e?new l(e):e,t||{});ge(n,y.SOF);var i=V(n,!1);return ge(n,y.EOF),i}function O(e,t){var n=g("string"==typeof e?new l(e):e,t||{});ge(n,y.SOF);var i=$(n);return ge(n,y.EOF),i}function P(e){var t=ge(e,y.NAME);return{kind:C.NAME,value:t.value,loc:de(e,t)}}function M(e){if(pe(e,y.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return I(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return K(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===y.NAME)switch(t.value){case"schema":return function(e){var t=e.token;ve(e,"extend"),ve(e,"schema");var n=G(e,!0),i=pe(e,y.BRACE_L)?we(e,y.BRACE_L,te,y.BRACE_R):[];if(0===n.length&&0===i.length)throw be(e);return{kind:C.SCHEMA_EXTENSION,directives:n,operationTypes:i,loc:de(e,t)}}(e);case"scalar":return function(e){var t=e.token;ve(e,"extend"),ve(e,"scalar");var n=P(e),i=G(e,!0);if(0===i.length)throw be(e);return{kind:C.SCALAR_TYPE_EXTENSION,name:n,directives:i,loc:de(e,t)}}(e);case"type":return function(e){var t=e.token;ve(e,"extend"),ve(e,"type");var n=P(e),i=ne(e),r=G(e,!0),a=ie(e);if(0===i.length&&0===r.length&&0===a.length)throw be(e);return{kind:C.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a,loc:de(e,t)}}(e);case"interface":return function(e){var t=e.token;ve(e,"extend"),ve(e,"interface");var n=P(e),i=G(e,!0),r=ie(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.INTERFACE_TYPE_EXTENSION,name:n,directives:i,fields:r,loc:de(e,t)}}(e);case"union":return function(e){var t=e.token;ve(e,"extend"),ve(e,"union");var n=P(e),i=G(e,!0),r=se(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.UNION_TYPE_EXTENSION,name:n,directives:i,types:r,loc:de(e,t)}}(e);case"enum":return function(e){var t=e.token;ve(e,"extend"),ve(e,"enum");var n=P(e),i=G(e,!0),r=le(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r,loc:de(e,t)}}(e);case"input":return function(e){var t=e.token;ve(e,"extend"),ve(e,"input");var n=P(e),i=G(e,!0),r=ue(e);if(0===i.length&&0===r.length)throw be(e);return{kind:C.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r,loc:de(e,t)}}(e)}throw be(e,t)}(e)}else{if(pe(e,y.BRACE_L))return I(e);if(J(e))return K(e)}throw be(e)}function I(e){if(pe(e,y.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return D(e);case"fragment":return function(e){var t=e.token;if(ve(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:C.FRAGMENT_DEFINITION,name:X(e),variableDefinitions:L(e),typeCondition:(ve(e,"on"),Z(e)),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)};return{kind:C.FRAGMENT_DEFINITION,name:X(e),typeCondition:(ve(e,"on"),Z(e)),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}(e)}else if(pe(e,y.BRACE_L))return D(e);throw be(e)}function D(e){var t=e.token;if(pe(e,y.BRACE_L))return{kind:C.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:j(e),loc:de(e,t)};var n,i=N(e);return pe(e,y.NAME)&&(n=P(e)),{kind:C.OPERATION_DEFINITION,operation:i,name:n,variableDefinitions:L(e),directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}function N(e){var t=ge(e,y.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw be(e,t)}function L(e){return pe(e,y.PAREN_L)?we(e,y.PAREN_L,R,y.PAREN_R):[]}function R(e){var t=e.token;return{kind:C.VARIABLE_DEFINITION,variable:F(e),type:(ge(e,y.COLON),$(e)),defaultValue:me(e,y.EQUALS)?V(e,!0):void 0,directives:G(e,!0),loc:de(e,t)}}function F(e){var t=e.token;return ge(e,y.DOLLAR),{kind:C.VARIABLE,name:P(e),loc:de(e,t)}}function j(e){var t=e.token;return{kind:C.SELECTION_SET,selections:we(e,y.BRACE_L,z,y.BRACE_R),loc:de(e,t)}}function z(e){return pe(e,y.SPREAD)?function(e){var t=e.token;ge(e,y.SPREAD);var n=ye(e,"on");if(!n&&pe(e,y.NAME))return{kind:C.FRAGMENT_SPREAD,name:X(e),directives:G(e,!1),loc:de(e,t)};return{kind:C.INLINE_FRAGMENT,typeCondition:n?Z(e):void 0,directives:G(e,!1),selectionSet:j(e),loc:de(e,t)}}(e):function(e){var t,n,i=e.token,r=P(e);me(e,y.COLON)?(t=r,n=P(e)):n=r;return{kind:C.FIELD,alias:t,name:n,arguments:Y(e,!1),directives:G(e,!1),selectionSet:pe(e,y.BRACE_L)?j(e):void 0,loc:de(e,i)}}(e)}function Y(e,t){var n=t?W:H;return pe(e,y.PAREN_L)?we(e,y.PAREN_L,n,y.PAREN_R):[]}function H(e){var t=e.token,n=P(e);return ge(e,y.COLON),{kind:C.ARGUMENT,name:n,value:V(e,!1),loc:de(e,t)}}function W(e){var t=e.token;return{kind:C.ARGUMENT,name:P(e),value:(ge(e,y.COLON),q(e)),loc:de(e,t)}}function X(e){if("on"===e.token.value)throw be(e);return P(e)}function V(e,t){var n=e.token;switch(n.kind){case y.BRACKET_L:return function(e,t){var n=e.token,i=t?q:U;return{kind:C.LIST,values:xe(e,y.BRACKET_L,i,y.BRACKET_R),loc:de(e,n)}}(e,t);case y.BRACE_L:return function(e,t){var n=e.token;return{kind:C.OBJECT,fields:xe(e,y.BRACE_L,function(){return function(e,t){var n=e.token,i=P(e);return ge(e,y.COLON),{kind:C.OBJECT_FIELD,name:i,value:V(e,t),loc:de(e,n)}}(e,t)},y.BRACE_R),loc:de(e,n)}}(e,t);case y.INT:return e.advance(),{kind:C.INT,value:n.value,loc:de(e,n)};case y.FLOAT:return e.advance(),{kind:C.FLOAT,value:n.value,loc:de(e,n)};case y.STRING:case y.BLOCK_STRING:return B(e);case y.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:C.BOOLEAN,value:"true"===n.value,loc:de(e,n)}):"null"===n.value?(e.advance(),{kind:C.NULL,loc:de(e,n)}):(e.advance(),{kind:C.ENUM,value:n.value,loc:de(e,n)});case y.DOLLAR:if(!t)return F(e)}throw be(e)}function B(e){var t=e.token;return e.advance(),{kind:C.STRING,value:t.value,block:t.kind===y.BLOCK_STRING,loc:de(e,t)}}function q(e){return V(e,!0)}function U(e){return V(e,!1)}function G(e,t){for(var n=[];pe(e,y.AT);)n.push(Q(e,t));return n}function Q(e,t){var n=e.token;return ge(e,y.AT),{kind:C.DIRECTIVE,name:P(e),arguments:Y(e,t),loc:de(e,n)}}function $(e){var t,n=e.token;return me(e,y.BRACKET_L)?(t=$(e),ge(e,y.BRACKET_R),t={kind:C.LIST_TYPE,type:t,loc:de(e,n)}):t=Z(e),me(e,y.BANG)?{kind:C.NON_NULL_TYPE,type:t,loc:de(e,n)}:t}function Z(e){var t=e.token;return{kind:C.NAMED_TYPE,name:P(e),loc:de(e,t)}}function K(e){var t=J(e)?e.lookahead():e.token;if(t.kind===y.NAME)switch(t.value){case"schema":return function(e){var t=e.token;ve(e,"schema");var n=G(e,!0),i=we(e,y.BRACE_L,te,y.BRACE_R);return{kind:C.SCHEMA_DEFINITION,directives:n,operationTypes:i,loc:de(e,t)}}(e);case"scalar":return function(e){var t=e.token,n=ee(e);ve(e,"scalar");var i=P(e),r=G(e,!0);return{kind:C.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r,loc:de(e,t)}}(e);case"type":return function(e){var t=e.token,n=ee(e);ve(e,"type");var i=P(e),r=ne(e),a=G(e,!0),o=ie(e);return{kind:C.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o,loc:de(e,t)}}(e);case"interface":return function(e){var t=e.token,n=ee(e);ve(e,"interface");var i=P(e),r=G(e,!0),a=ie(e);return{kind:C.INTERFACE_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a,loc:de(e,t)}}(e);case"union":return function(e){var t=e.token,n=ee(e);ve(e,"union");var i=P(e),r=G(e,!0),a=se(e);return{kind:C.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:a,loc:de(e,t)}}(e);case"enum":return function(e){var t=e.token,n=ee(e);ve(e,"enum");var i=P(e),r=G(e,!0),a=le(e);return{kind:C.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:a,loc:de(e,t)}}(e);case"input":return function(e){var t=e.token,n=ee(e);ve(e,"input");var i=P(e),r=G(e,!0),a=ue(e);return{kind:C.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a,loc:de(e,t)}}(e);case"directive":return function(e){var t=e.token,n=ee(e);ve(e,"directive"),ge(e,y.AT);var i=P(e),r=ae(e);ve(e,"on");var a=function(e){me(e,y.PIPE);var t=[];do{t.push(he(e))}while(me(e,y.PIPE));return t}(e);return{kind:C.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,locations:a,loc:de(e,t)}}(e)}throw be(e,t)}function J(e){return pe(e,y.STRING)||pe(e,y.BLOCK_STRING)}function ee(e){if(J(e))return B(e)}function te(e){var t=e.token,n=N(e);ge(e,y.COLON);var i=Z(e);return{kind:C.OPERATION_TYPE_DEFINITION,operation:n,type:i,loc:de(e,t)}}function ne(e){var t=[];if(ye(e,"implements")){me(e,y.AMP);do{t.push(Z(e))}while(me(e,y.AMP)||e.options.allowLegacySDLImplementsInterfaces&&pe(e,y.NAME))}return t}function ie(e){return e.options.allowLegacySDLEmptyFields&&pe(e,y.BRACE_L)&&e.lookahead().kind===y.BRACE_R?(e.advance(),e.advance(),[]):pe(e,y.BRACE_L)?we(e,y.BRACE_L,re,y.BRACE_R):[]}function re(e){var t=e.token,n=ee(e),i=P(e),r=ae(e);ge(e,y.COLON);var a=$(e),o=G(e,!0);return{kind:C.FIELD_DEFINITION,description:n,name:i,arguments:r,type:a,directives:o,loc:de(e,t)}}function ae(e){return pe(e,y.PAREN_L)?we(e,y.PAREN_L,oe,y.PAREN_R):[]}function oe(e){var t=e.token,n=ee(e),i=P(e);ge(e,y.COLON);var r,a=$(e);me(e,y.EQUALS)&&(r=q(e));var o=G(e,!0);return{kind:C.INPUT_VALUE_DEFINITION,description:n,name:i,type:a,defaultValue:r,directives:o,loc:de(e,t)}}function se(e){var t=[];if(me(e,y.EQUALS)){me(e,y.PIPE);do{t.push(Z(e))}while(me(e,y.PIPE))}return t}function le(e){return pe(e,y.BRACE_L)?we(e,y.BRACE_L,ce,y.BRACE_R):[]}function ce(e){var t=e.token,n=ee(e),i=P(e),r=G(e,!0);return{kind:C.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r,loc:de(e,t)}}function ue(e){return pe(e,y.BRACE_L)?we(e,y.BRACE_L,oe,y.BRACE_R):[]}function he(e){var t=e.token,n=P(e);if(T.hasOwnProperty(n.value))return n;throw be(e,t)}function de(e,t){if(!e.options.noLocation)return new fe(t,e.lastToken,e.source)}function fe(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function pe(e,t){return e.token.kind===t}function ge(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw f(e.source,n.start,"Expected ".concat(t,", found ").concat(b(n)))}function me(e,t){var n=e.token;if(n.kind===t)return e.advance(),n}function ve(e,t){var n=e.token;if(n.kind===y.NAME&&n.value===t)return e.advance(),n;throw f(e.source,n.start,'Expected "'.concat(t,'", found ').concat(b(n)))}function ye(e,t){var n=e.token;if(n.kind===y.NAME&&n.value===t)return e.advance(),n}function be(e,t){var n=t||e.token;return f(e.source,n.start,"Unexpected ".concat(b(n)))}function xe(e,t,n,i){ge(e,t);for(var r=[];!me(e,i);)r.push(n(e));return r}function we(e,t,n,i){ge(e,t);for(var r=[n(e)];!me(e,i);)r.push(n(e));return r}n.d(t,"parse",function(){return A}),n.d(t,"parseValue",function(){return _}),n.d(t,"parseType",function(){return O}),n.d(t,"parseConstValue",function(){return q}),n.d(t,"parseTypeReference",function(){return $}),n.d(t,"parseNamedType",function(){return Z}),a(fe,function(){return{start:this.start,end:this.end}})}]);