@stigg/js-client-sdk 0.26.1 → 0.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Stigg",[],t):"object"==typeof exports?exports.Stigg=t():e.Stigg=t()}(self,(function(){return(()=>{var e={4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=l(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];_.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new _(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,e.fetch||(e.fetch=O,e.Headers=p,e.Request=b,e.Response=_),t.Headers=p,t.Request=b,t.Response=_,t.fetch=O,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8407:(e,t,n)=>{var r=n(7040),i=n(4125),o=n(2117),a=n(7529),s=n(4705);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},7071:(e,t,n)=>{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},3818:(e,t,n)=>{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},6384:(e,t,n)=>{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},4636:(e,t,n)=>{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],y=h.length;for(var v in e)!t&&!c.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||h.push(v);return h}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2908:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},4140:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1078:(e,t,n)=>{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var u=-1,c=t.length;for(o||(o=i),s||(s=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},8866:(e,t,n)=>{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(1299),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},1299:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,v,m){var g=u(e),b=u(t),E=g?p:s(e),_=b?p:s(t),w=(E=E==f?d:E)==d,O=(_=_==f?d:_)==d,T=E==_;if(T&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(T&&!w)return m||(m=new r),g||l(e)?i(e,t,n,y,v,m):o(e,t,E,n,y,v,m);if(!(1&n)){var x=w&&h.call(e,"__wrapped__"),I=O&&h.call(t,"__wrapped__");if(x||I){var S=x?e.value():e,k=I?t.value():t;return m||(m=new r),v(S,k,n,y,m)}}return!!T&&(m||(m=new r),a(e,t,n,y,v,m))}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(o)var h=o(f,p,l,e,t,d);if(!(void 0===h?i(p,f,3,o,d):h))return!1}}return!0}},2722:e=>{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},9199:(e,t,n)=>{var r=n(4140),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),u=n(2634),c=n(327);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),u=n(1704),c=n(6390);e.exports=function e(t,n,l,f,p){t!==n&&o(n,(function(o,u){if(p||(p=new r),s(o))a(t,n,u,l,e,f,p);else{var d=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===d&&(d=o),i(t,u,d)}}),u)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),u=n(5694),c=n(1469),l=n(9246),f=n(4144),p=n(3560),d=n(3218),h=n(8630),y=n(6719),v=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,E,_){var w=v(e,n),O=v(t,n),T=_.get(O);if(T)r(e,n,T);else{var x=E?E(w,O,n+"",e,t,_):void 0,I=void 0===x;if(I){var S=c(O),k=!S&&f(O),D=!S&&!k&&y(O);x=O,S||k||D?c(w)?x=w:l(w)?x=a(w):k?(I=!1,x=i(O,!0)):D?(I=!1,x=o(O,!0)):x=[]:h(O)||u(O)?(x=w,u(w)?x=m(w):d(w)&&!p(w)||(x=s(O))):I=!1}I&&(_.set(O,x),b(x,O,g,E,_),_.delete(O)),r(e,n,x)}}},2689:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),u=n(7518),c=n(5022),l=n(6557),f=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var p=-1;t=r(t,u(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(d,(function(e,t){return c(e,t,n)}))}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},6560:(e,t,n)=>{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:(e,t,n)=>{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},7415:(e,t,n)=>{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,l=r(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},5022:(e,t,n)=>{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:(e,t,n)=>{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?i(n,c,l):r(n,c,l)}return n}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},9291:(e,t,n)=>{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e),d=u.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<l;){var m=e[h],g=t[h];if(a)var b=c?a(g,m,h,t,e,u):a(m,g,h,e,t,u);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,u)))return v.push(t)}))){y=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},8351:(e,t,n)=>{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var v=a(d(e),d(t),r,c,f,p);return p.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:i.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var m=e[p=c[f]],g=t[p];if(o)var b=u?o(g,m,p,t,e,s):o(m,g,p,e,t,s);if(!(void 0===b?m===g||a(m,g,n,o,s):b)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var E=e.constructor,_=t.constructor;E==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof _&&_ instanceof _||(y=!1)}return s.delete(e),s.delete(t),y}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=c(r),v=c(i),m=c(o),g=c(a),b=c(s),E=u;(r&&E(new r(new ArrayBuffer(1)))!=h||i&&E(new i)!=l||o&&E(o.resolve())!=f||a&&E(new a)!=p||s&&E(new s)!=d)&&(E=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return h;case v:return l;case m:return f;case g:return p;case b:return d}return t}),e.exports=E},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),u=n(327);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(o(e)||i(e))}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6612:(e,t,n)=>{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(u),r(e,this,c)}}},5639:(e,t,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},4721:(e,t,n)=>{var r=n(2118),i=n(8612),o=n(7037),a=n(554),s=n(2628),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),o(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),u=n(4144),c=n(5726),l=n(6719),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(7518),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},2492:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},9734:(e,t,n)=>{var r=n(1078),i=n(2689),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9881:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},8413:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedReason:()=>H,BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT:()=>te,BillingModel:()=>l,BillingPeriod:()=>f,Currency:()=>d,CustomerModel:()=>ie,EntitlementResetPeriod:()=>Z,FeatureType:()=>J,LogLevel:()=>r,METERED_DEFAULT_FALLBACK_ENTITLEMENT:()=>re,MeterType:()=>X,NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT:()=>ne,PromotionalEntitlementStatus:()=>M,SubscriptionStatus:()=>W,TrialPeriodUnits:()=>G,default:()=>ss});var r,i=n(4721),o=n.n(i);!function(e){e.ALL="ALL",e.NONE="NONE",e.LOG="LOG",e.ERROR="ERROR"}(r||(r={}));var a,s,u,c,l,f,p,d,h,y,v,m,g,b,E,_,w,O,T,x,I,S,k,D,A,N,R,P,C,F,j,M,L,q,U,V,B,Q,z,W,G,K,$,Y,H,J,X,Z,ee=function(){function e(e,t){this.logger=e,this.logLevel=t}return e.prototype.error=function(e,t){this.logLevel!==r.NONE&&this.logger.error(e,t||{})},e.prototype.log=function(e,t){o()([r.ERROR,r.NONE],this.logLevel)||this.logger.log(e,t||{})},e.prototype.debug=function(e,t){o()([r.LOG,r.ALL],this.logLevel)&&this.logger.debug(e,t||{})},e}();!function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(a||(a={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(s||(s={})),function(e){e.Id="id"}(u||(u={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(c||(c={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(l||(l={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(f||(f={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(p||(p={})),function(e){e.Usd="USD"}(d||(d={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.CrmId="crmId",e.Email="email",e.EnvironmentId="environmentId",e.Id="id",e.Name="name",e.RefId="refId",e.UpdatedAt="updatedAt"}(h||(h={})),function(e){e.BillingId="billingId",e.CrmId="crmId",e.EndDate="endDate",e.EnvironmentId="environmentId",e.Id="id",e.RefId="refId",e.StartDate="startDate",e.Status="status"}(y||(y={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(v||(v={})),function(e){e.DisplayName="displayName",e.Id="id"}(m||(m={})),function(e){e.AddonNotFound="AddonNotFound",e.CheckoutIsNotSupported="CheckoutIsNotSupported",e.CustomerNotFound="CustomerNotFound",e.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",e.EnvironmentMissing="EnvironmentMissing",e.FeatureNotFound="FeatureNotFound",e.IdentityForbidden="IdentityForbidden",e.IntegrityViolation="IntegrityViolation",e.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",e.InvalidMemberDelete="InvalidMemberDelete",e.InvalidUsageValueForIncrementalFeatureError="InvalidUsageValueForIncrementalFeatureError",e.MemberInvitationError="MemberInvitationError",e.MemberNotFound="MemberNotFound",e.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.PackageAlreadyPublished="PackageAlreadyPublished",e.PlanAlreadyExtended="PlanAlreadyExtended",e.PlanNotFound="PlanNotFound",e.PlansCircularDependencyError="PlansCircularDependencyError",e.PriceNotFound="PriceNotFound",e.SubscriptionNotFound="SubscriptionNotFound",e.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(g||(g={})),function(e){e.AddonCreated="ADDON_CREATED",e.AddonDeleted="ADDON_DELETED",e.AddonUpdated="ADDON_UPDATED",e.CustomerCreated="CUSTOMER_CREATED",e.CustomerDeleted="CUSTOMER_DELETED",e.CustomerUpdated="CUSTOMER_UPDATED",e.EntitlementDenied="ENTITLEMENT_DENIED",e.EntitlementGranted="ENTITLEMENT_GRANTED",e.EntitlementRequested="ENTITLEMENT_REQUESTED",e.FeatureCreated="FEATURE_CREATED",e.FeatureDeleted="FEATURE_DELETED",e.FeatureUpdated="FEATURE_UPDATED",e.MeasurementReported="MEASUREMENT_REPORTED",e.PackagePublished="PACKAGE_PUBLISHED",e.PlanCreated="PLAN_CREATED",e.PlanDeleted="PLAN_DELETED",e.PlanUpdated="PLAN_UPDATED",e.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",e.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",e.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",e.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",e.SubscriptionCanceled="SUBSCRIPTION_CANCELED",e.SubscriptionCreated="SUBSCRIPTION_CREATED",e.SubscriptionExpired="SUBSCRIPTION_EXPIRED",e.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",e.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",e.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",e.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",e.SubscriptionUpdated="SUBSCRIPTION_UPDATED"}(b||(b={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.FeatureStatus="featureStatus",e.FeatureType="featureType",e.Id="id",e.MeterType="meterType",e.RefId="refId",e.UpdatedAt="updatedAt"}(E||(E={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(_||(_={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(w||(w={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(O||(O={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(T||(T={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(x||(x={})),function(e){e.Id="id"}(I||(I={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(S||(S={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(k||(k={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(D||(D={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(A||(A={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(N||(N={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(R||(R={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(P||(P={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsDefaultProduct="isDefaultProduct",e.RefId="refId",e.UpdatedAt="updatedAt"}(C||(C={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(F||(F={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(j||(j={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(M||(M={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(L||(L={})),function(e){e.Asc="ASC",e.Desc="DESC"}(q||(q={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(U||(U={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(V||(V={})),function(e){e.EndOfBillingPeriod="END_OF_BILLING_PERIOD",e.Immediate="IMMEDIATE"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE"}(Q||(Q={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(z||(z={})),function(e){e.Active="ACTIVE",e.Canceled="CANCELED",e.Expired="EXPIRED",e.InTrial="IN_TRIAL",e.NotStarted="NOT_STARTED"}(W||(W={})),function(e){e.Day="DAY",e.Month="MONTH"}(G||(G={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(K||(K={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}($||($={})),function(e){e.EveryFriday="EveryFriday",e.EveryMonday="EveryMonday",e.EverySaturday="EverySaturday",e.EverySunday="EverySunday",e.EveryThursday="EveryThursday",e.EveryTuesday="EveryTuesday",e.EveryWednesday="EveryWednesday",e.SubscriptionStart="SubscriptionStart"}(Y||(Y={})),function(e){e.InvalidFeatureType="InvalidFeatureType",e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscriptions="NoActiveSubscriptions",e.CustomerNotEntitledForFeature="CustomerNotEntitledForFeature",e.RequestedUsageExceedsLimit="RequestedUsageExceedsLimit",e.Unknown="Unknown"}(H||(H={})),function(e){e.Boolean="Boolean",e.Numeric="Numeric"}(J||(J={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(X||(X={})),function(e){e.Daily="Daily",e.Hourly="Hourly",e.Monthly="Monthly",e.Weekly="Weekly"}(Z||(Z={}));var te={isFallback:!0,hasAccess:!1,accessDeniedReason:H.Unknown},ne={isFallback:!0,hasAccess:!1,isUnlimited:!1,accessDeniedReason:H.Unknown},re={isFallback:!0,hasAccess:!1,isUnlimited:!1,currentUsage:0,requestedUsage:1,accessDeniedReason:H.Unknown},ie=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===W.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===W.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===M.Active}))},e}(),oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function ce(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function le(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function fe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pe(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const de=/\r\n|[\n\r]/g;function he(e,t){let n=0,r=1;for(const i of e.body.matchAll(de)){if("number"==typeof i.index||pe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ye(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,n=[];for(let e=0;e<f.length;e+=80)n.push(f.slice(e,e+80));return c+ve([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ve([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ve(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class me extends Error{constructor(e,t,n,r,i,o,a){var s,u,c;super(e),this.name="GraphQLError",this.path=null!=i?i:void 0,this.originalError=null!=o?o:void 0,this.nodes=ge(Array.isArray(t)?t:t?[t]:void 0);const l=ge(null===(s=this.nodes)||void 0===s?void 0:s.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=n?n:null==l||null===(u=l[0])||void 0===u?void 0:u.source,this.positions=null!=r?r:null==l?void 0:l.map((e=>e.start)),this.locations=r&&n?r.map((e=>he(n,e))):null==l?void 0:l.map((e=>he(e.source,e.start)));const f="object"==typeof(p=null==o?void 0:o.extensions)&&null!==p?null==o?void 0:o.extensions:void 0;var p;this.extensions=null!==(c=null!=a?a:f)&&void 0!==c?c:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,me):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+="\n\n"+ye((t=n.loc).source,he(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ye(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ge(e){return void 0===e||0===e.length?void 0:e}function be(e,t,n){return new me(`Syntax Error: ${n}`,void 0,e,[t])}let Ee;var _e;(_e=Ee||(Ee={})).NAME="Name",_e.DOCUMENT="Document",_e.OPERATION_DEFINITION="OperationDefinition",_e.VARIABLE_DEFINITION="VariableDefinition",_e.SELECTION_SET="SelectionSet",_e.FIELD="Field",_e.ARGUMENT="Argument",_e.FRAGMENT_SPREAD="FragmentSpread",_e.INLINE_FRAGMENT="InlineFragment",_e.FRAGMENT_DEFINITION="FragmentDefinition",_e.VARIABLE="Variable",_e.INT="IntValue",_e.FLOAT="FloatValue",_e.STRING="StringValue",_e.BOOLEAN="BooleanValue",_e.NULL="NullValue",_e.ENUM="EnumValue",_e.LIST="ListValue",_e.OBJECT="ObjectValue",_e.OBJECT_FIELD="ObjectField",_e.DIRECTIVE="Directive",_e.NAMED_TYPE="NamedType",_e.LIST_TYPE="ListType",_e.NON_NULL_TYPE="NonNullType",_e.SCHEMA_DEFINITION="SchemaDefinition",_e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",_e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",_e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",_e.FIELD_DEFINITION="FieldDefinition",_e.INPUT_VALUE_DEFINITION="InputValueDefinition",_e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",_e.UNION_TYPE_DEFINITION="UnionTypeDefinition",_e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",_e.ENUM_VALUE_DEFINITION="EnumValueDefinition",_e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",_e.DIRECTIVE_DEFINITION="DirectiveDefinition",_e.SCHEMA_EXTENSION="SchemaExtension",_e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",_e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",_e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",_e.UNION_TYPE_EXTENSION="UnionTypeExtension",_e.ENUM_TYPE_EXTENSION="EnumTypeExtension",_e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class we{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Oe{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Te={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},xe=new Set(Object.keys(Te));function Ie(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&xe.has(t)}let Se,ke;var De;function Ae(e){return Ne(e,[])}function Ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Ne(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Ne(e[r],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Ne(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Re(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Se||(Se={})),(De=ke||(ke={})).SOF="<SOF>",De.EOF="<EOF>",De.BANG="!",De.DOLLAR="$",De.AMP="&",De.PAREN_L="(",De.PAREN_R=")",De.SPREAD="...",De.COLON=":",De.EQUALS="=",De.AT="@",De.BRACKET_L="[",De.BRACKET_R="]",De.BRACE_L="{",De.PIPE="|",De.BRACE_R="}",De.NAME="Name",De.INT="Int",De.FLOAT="Float",De.STRING="String",De.BLOCK_STRING="BlockString",De.COMMENT="Comment";class Pe{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Re(!1,`Body must be a string. Received: ${Ae(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Ce;function Fe(e){const t=e.split(/\r\n|[\n\r]/g),n=function(e){var t;let n=!0,r=!0,i=0,o=null;for(let t=0;t<e.length;++t)switch(e.charCodeAt(t)){case 13:10===e.charCodeAt(t+1)&&++t;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(let e=1;e<t.length;e++)t[e]=t[e].slice(n);let r=0;for(;r<t.length&&je(t[r]);)++r;let i=t.length;for(;i>r&&je(t[i-1]);)--i;return t.slice(r,i).join("\n")}function je(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function Me(e){return e>=48&&e<=57}function Le(e){return e>=97&&e<=122||e>=65&&e<=90}function qe(e){return Le(e)||95===e}!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Ce||(Ce={}));class Ue{constructor(e){const t=new Oe(ke.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==ke.EOF)do{if(e.next)e=e.next;else{const t=Ke(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===ke.COMMENT);return e}}function Ve(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Be(e,t){return Qe(e.charCodeAt(t))&&ze(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function ze(e){return e>=56320&&e<=57343}function We(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return ke.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ge(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new Oe(t,n,r,o,a,i)}function Ke(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return $e(e,i);case 33:return Ge(e,ke.BANG,i,i+1);case 36:return Ge(e,ke.DOLLAR,i,i+1);case 38:return Ge(e,ke.AMP,i,i+1);case 40:return Ge(e,ke.PAREN_L,i,i+1);case 41:return Ge(e,ke.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return Ge(e,ke.SPREAD,i,i+3);break;case 58:return Ge(e,ke.COLON,i,i+1);case 61:return Ge(e,ke.EQUALS,i,i+1);case 64:return Ge(e,ke.AT,i,i+1);case 91:return Ge(e,ke.BRACKET_L,i,i+1);case 93:return Ge(e,ke.BRACKET_R,i,i+1);case 123:return Ge(e,ke.BRACE_L,i,i+1);case 124:return Ge(e,ke.PIPE,i,i+1);case 125:return Ge(e,ke.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?rt(e,i):Je(e,i)}if(Me(t)||45===t)return Ye(e,i,t);if(qe(t))return it(e,i);throw be(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ve(t)||Be(n,i)?`Unexpected character: ${We(e,i)}.`:`Invalid character: ${We(e,i)}.`)}return Ge(e,ke.EOF,r,r)}function $e(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(Ve(e))++i;else{if(!Be(n,i))break;i+=2}}return Ge(e,ke.COMMENT,t,i,n.slice(t+1,i))}function Ye(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),Me(o))throw be(e.source,i,`Invalid number, unexpected digit after 0: ${We(e,i)}.`)}else i=He(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=He(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=He(e,i,o),o=r.charCodeAt(i)),46===o||qe(o))throw be(e.source,i,`Invalid number, expected digit but got: ${We(e,i)}.`);return Ge(e,a?ke.FLOAT:ke.INT,t,i,r.slice(t,i))}function He(e,t,n){if(!Me(n))throw be(e.source,t,`Invalid number, expected digit but got: ${We(e,t)}.`);const r=e.source.body;let i=t+1;for(;Me(r.charCodeAt(i));)++i;return i}function Je(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return a+=n.slice(o,i),Ge(e,ke.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Ve(r))++i;else{if(!Be(n,i))throw be(e.source,i,`Invalid character within String: ${We(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xe(e,i):Ze(e,i):nt(e,i);a+=t.value,i+=t.size,o=i}}throw be(e.source,i,"Unterminated string.")}function Xe(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!Ve(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|tt(e),r<0)break}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ze(e,t){const n=e.source.body,r=et(n,t+2);if(Ve(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=et(n,t+8);if(ze(e))return{value:String.fromCodePoint(r,e),size:12}}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function et(e,t){return tt(e.charCodeAt(t))<<12|tt(e.charCodeAt(t+1))<<8|tt(e.charCodeAt(t+2))<<4|tt(e.charCodeAt(t+3))}function tt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nt(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw be(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function rt(e,t){const n=e.source.body,r=n.length,i=e.line,o=1+t-e.lineStart;let a=t+3,s=a,u="";for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2))return u+=n.slice(s,a),new Oe(ke.BLOCK_STRING,t,a+3,i,o,Fe(u));if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(Ve(r))++a;else{if(!Be(n,a))throw be(e.source,a,`Invalid character within String: ${We(e,a)}.`);a+=2}else 13===r&&10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;else u+=n.slice(s,a)+'"""',a+=4,s=a}throw be(e.source,a,"Unterminated string.")}function it(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Le(o=n.charCodeAt(i))||Me(o)||95===o);)++i;var o;return Ge(e,ke.NAME,t,i,n.slice(t,i))}class ot{constructor(e,t){const n=function(e){return e instanceof Pe}(e)?e:new Pe(e);this._lexer=new Ue(n),this._options=t}parseName(){const e=this.expectToken(ke.NAME);return this.node(e,{kind:Ee.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ee.DOCUMENT,definitions:this.many(ke.SOF,this.parseDefinition,ke.EOF)})}parseDefinition(){if(this.peek(ke.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===ke.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw be(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(ke.BRACE_L))return this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:Se.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(ke.NAME)&&(n=this.parseName()),this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(ke.NAME);switch(e.value){case"query":return Se.QUERY;case"mutation":return Se.MUTATION;case"subscription":return Se.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ke.PAREN_L,this.parseVariableDefinition,ke.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ke.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ke.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(ke.DOLLAR),this.node(e,{kind:Ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ee.SELECTION_SET,selections:this.many(ke.BRACE_L,this.parseSelection,ke.BRACE_R)})}parseSelection(){return this.peek(ke.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(ke.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:Ee.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ke.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ke.PAREN_L,t,ke.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(ke.COLON),this.node(t,{kind:Ee.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(ke.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(ke.NAME)?this.node(e,{kind:Ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ee.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case ke.BRACKET_L:return this.parseList(e);case ke.BRACE_L:return this.parseObject(e);case ke.INT:return this._lexer.advance(),this.node(t,{kind:Ee.INT,value:t.value});case ke.FLOAT:return this._lexer.advance(),this.node(t,{kind:Ee.FLOAT,value:t.value});case ke.STRING:case ke.BLOCK_STRING:return this.parseStringLiteral();case ke.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:Ee.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Ee.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Ee.NULL});default:return this.node(t,{kind:Ee.ENUM,value:t.value})}case ke.DOLLAR:if(e){if(this.expectToken(ke.DOLLAR),this._lexer.token.kind===ke.NAME){const e=this._lexer.token.value;throw be(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable()}throw this.unexpected()}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:Ee.STRING,value:e.value,block:e.kind===ke.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Ee.LIST,values:this.any(ke.BRACKET_L,(()=>this.parseValueLiteral(e)),ke.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Ee.OBJECT,fields:this.any(ke.BRACE_L,(()=>this.parseObjectField(e)),ke.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(ke.COLON),this.node(t,{kind:Ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(ke.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(ke.AT),this.node(t,{kind:Ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(ke.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(ke.BRACKET_R),t=this.node(e,{kind:Ee.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(ke.BANG)?this.node(e,{kind:Ee.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ke.STRING)||this.peek(ke.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(ke.BRACE_L,this.parseOperationTypeDefinition,ke.BRACE_R);return this.node(e,{kind:Ee.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(ke.COLON);const n=this.parseNamedType();return this.node(e,{kind:Ee.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ke.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ke.BRACE_L,this.parseFieldDefinition,ke.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ke.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Ee.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(ke.PAREN_L,this.parseInputValueDef,ke.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(ke.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(ke.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Ee.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Ee.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ke.EQUALS)?this.delimitedMany(ke.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Ee.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ke.BRACE_L,this.parseEnumValueDefinition,ke.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw be(this._lexer.source,this._lexer.token.start,`${at(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ke.BRACE_L,this.parseInputValueDef,ke.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===ke.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(ke.BRACE_L,this.parseOperationTypeDefinition,ke.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ke.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ee.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(ke.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Ce,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new we(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw be(this._lexer.source,t.start,`Expected ${st(e)}, found ${at(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==ke.NAME||t.value!==e)throw be(this._lexer.source,t.start,`Expected "${e}", found ${at(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===ke.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return be(this._lexer.source,t.start,`Unexpected ${at(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function at(e){const t=e.value;return st(e.kind)+(null!=t?` "${t}"`:"")}function st(e){return function(e){return e===ke.BANG||e===ke.DOLLAR||e===ke.AMP||e===ke.PAREN_L||e===ke.PAREN_R||e===ke.SPREAD||e===ke.COLON||e===ke.EQUALS||e===ke.AT||e===ke.BRACKET_L||e===ke.BRACKET_R||e===ke.BRACE_L||e===ke.PIPE||e===ke.BRACE_R}(e)?`"${e}"`:e}var ut=new Map,ct=new Map,lt=!0,ft=!1;function pt(e){return e.replace(/[\s,]+/g," ").trim()}function dt(e){var t,n,r,i=pt(e);if(!ut.has(i)){var o=function(e,t){return new ot(e,t).parseDocument()}(e,{experimentalFragmentVariables:ft,allowLegacyFragmentVariables:ft});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ut.set(i,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=o,n=new Set,r=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=pt((a=e.loc).source.body.substring(a.start,a.end)),o=ct.get(t);o&&!o.has(i)?lt&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||ct.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),se(se({},t),{definitions:r}))))}return ut.get(i)}function ht(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),dt(r)}var yt,vt=ht;(yt=ht||(ht={})).gql=vt,yt.resetCaches=function(){ut.clear(),ct.clear()},yt.disableFragmentWarnings=function(){lt=!1},yt.enableExperimentalFragmentVariables=function(){ft=!0},yt.disableExperimentalFragmentVariables=function(){ft=!1},ht.default=ht;var mt,gt,bt,Et=ht(mt||(gt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],bt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],Object.defineProperty?Object.defineProperty(gt,"raw",{value:bt}):gt.raw=bt,mt=gt)),_t=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},wt=ht(It||(It=_t(["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Ot=ht(St||(St=_t(["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"],["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"]))),Tt=ht(kt||(kt=_t(["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"],["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"])),wt,Et,Ot);const xt=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:ht(Dt||(Dt=_t(["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "],["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "])),Tt),variables:{paging:{first:50},filter:{status:{eq:N.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:R.RefId,direction:q.Asc}]}})},e}();var It,St,kt,Dt,At=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Nt=ht(Ft||(Ft=At(["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"],["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"])),Et),Rt=ht(jt||(jt=At(["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Pt=ht(Mt||(Mt=At(["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"],["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"])),Nt,Rt);const Ct=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:ht(Lt||(Lt=At(["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "],["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "])),Pt),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var Ft,jt,Mt,Lt;const qt=function(e){this.paywall=new xt(e),this.customers=new Ct(e)};var Ut=n(1609),Vt=n.n(Ut),Bt=n(2492),Qt=n.n(Bt);function zt(e){var t=e.customerId;if(!t||Vt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Wt=n(5161),Gt=n.n(Wt),Kt=n(9734),$t=n.n(Kt),Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yt.apply(this,arguments)},Ht=function(){function e(){this.getResetPeriodData=function(e,t){switch(e){case Z.Monthly:return{monthlyResetPeriodConfiguration:{accordingTo:t.monthlyAccordingTo||D.SubscriptionStart}};case Z.Weekly:return{weeklyResetPeriodConfiguration:{accordingTo:t.weeklyAccordingTo||Y.EveryFriday}};default:return{}}}}return e.prototype.mapBooleanEntitlement=function(e,t){return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapNumericEntitlement=function(e,t){var n=e.calculatedEntitlement,r=n.hasUnlimitedUsage,i=n.usageLimit;return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:r,value:i||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapMeteredEntitlement=function(e,t,n){var r=e.calculatedEntitlement,i=r.hasUnlimitedUsage,o=r.usageLimit,a=r.feature,s=e.featureUsage,u=s.currentUsage,c=s.nextResetDate,l=s.resetPeriod,f=null;return a&&a.featureType===J.Numeric&&a.meterType===k.Incremental&&l&&(f={nextResetDate:c,resetPeriod:l}),{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:i,usageLimit:o||void 0,currentUsage:u,requestedUsage:n||0,resetSettings:f||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{meterType:e.calculatedEntitlement.feature.meterType||void 0,isMetered:!0}):void 0}},e.prototype.mapEntitlement=function(e,t,n){var r=e.calculatedEntitlement;if(!r.feature)return this.mapBooleanEntitlement(e,t);var i=r.feature,o=i.featureType,a=i.meterType,s=o===J.Numeric&&(a===k.Incremental||a===k.Fluctuating);switch(o){case J.Boolean:return this.mapBooleanEntitlement(e,t);case J.Numeric:return s?this.mapMeteredEntitlement(e,t,n):this.mapNumericEntitlement(e,t)}},e.prototype.mapFeatureType=function(e){switch(e){case w.Boolean:return J.Boolean;case w.Number:return J.Numeric}},e.prototype.mapEntitlementResetPeriod=function(e){switch(e){case v.Day:return Z.Daily;case v.Hour:return Z.Hourly;case v.Week:return Z.Weekly;case v.Month:return Z.Monthly}},e.prototype.mapApiEntitlementResetPeriod=function(e){switch(e){case Z.Daily:return v.Day;case Z.Hourly:return v.Hour;case Z.Weekly:return v.Week;case Z.Monthly:return v.Month}},e.prototype.mapCachedEntitlement=function(e,t,n){var r;return e.feature&&(r={id:e.feature.refId,featureType:this.mapFeatureType(e.feature.featureType),meterType:e.feature.meterType||void 0,units:e.feature.featureUnits||void 0,unitsPlural:e.feature.featureUnitsPlural||void 0,displayName:e.feature.displayName,description:e.feature.description||""}),{calculatedEntitlement:{usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,feature:r},featureUsage:{resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage||0,nextResetDate:n||e.nextResetDate}}},e.prototype.mapCachedEntitlements=function(e){var t=this;return new Map(e.map((function(e){var n;return[(null===(n=e.feature)||void 0===n?void 0:n.refId)||"",t.mapCachedEntitlement(e)]})))},e.prototype.mapPlans=function(e){var t=this,n=e.plans.edges.map((function(e){return e.node}));return this.sortPlans(n).map((function(e,n){return t.mapPlan(e,n)}))},e.prototype.mapCustomer=function(e){var t=this;return new ie({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:Gt()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:Gt()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPrice=function(e){var t=e.feature,n=e.price,r={pricingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,units:t.featureUnits,unitsPlural:t.featureUnitsPlural}),r},e.prototype.mapPlan=function(e,t){var n,r,i=this;return void 0===t&&(t=0),{id:e.refId,order:t,displayName:e.displayName,description:e.description,basePlan:e.basePlan?{id:e.basePlan.refId,displayName:e.basePlan.displayName}:void 0,entitlements:Gt()($t()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:Gt()($t()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),pricePoints:Gt()(e.prices,(function(e){return i.mapPrice(e)})),defaultTrialConfig:e.defaultTrialConfig,compatibleAddons:null!==(r=null===(n=e.compatibleAddons)||void 0===n?void 0:n.map((function(e){return i.mapAddon(e)})))&&void 0!==r?r:[],product:{id:e.product.refId,displayName:e.product.displayName}}},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,feature:{id:t.refId,featureType:this.mapFeatureType(t.featureType),description:t.description||"",meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,displayName:t.displayName,isMetered:t.meterType===k.Fluctuating||t.meterType===k.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,feature:{id:t.refId,displayName:t.displayName,description:t.description||"",featureType:this.mapFeatureType(t.featureType),meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,isMetered:t.meterType===k.Fluctuating||t.meterType===k.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,expiresAt:e.endDate,hasExpirationDate:!!e.endDate,isVisible:e.isVisible}},e.prototype.mapSubscription=function(e){var t,n=this,r=(e.prices||[])[0];return{id:e.refId,status:e.status,plan:this.mapPlan(e.plan),price:r?this.mapPrice(r.price):null,addons:(null===(t=e.addons)||void 0===t?void 0:t.map((function(e){var t=e.quantity,r=e.addon;return{quantity:t,addon:n.mapAddon(r)}})))||[],startDate:new Date(e.startDate),endDate:e.endDate&&new Date(e.endDate)}},e.prototype.mapAddon=function(e){var t=this;return{id:e.refId,displayName:e.displayName,description:e.description||"",entitlements:Gt()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=$t()(e.filter((function(e){return!e.basePlan})),(function(e){return e.refId})),n=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],t,!0);function r(e,t,n){var i=$t()(t.filter((function(t){var n;return(null===(n=t.basePlan)||void 0===n?void 0:n.refId)===e})),(function(e){return e.refId}));n.push.apply(n,i),n.length!==t.length&&i.forEach((function(e){return r(e.refId,t,n)}))}return t.forEach((function(t){return r(t.refId,e,n)})),n},e.prototype.mapAccessDeniedReason=function(e){switch(e){case H.InvalidFeatureType:return a.Unknown;case H.CustomerNotFound:return a.CustomerNotFound;case H.FeatureNotFound:return a.FeatureNotFound;case H.NoActiveSubscriptions:return a.NoActiveSubscription;case H.CustomerNotEntitledForFeature:return a.NoFeatureEntitlementInSubscription;case H.RequestedUsageExceedsLimit:return a.RequestedUsageExceedingLimit;case H.Unknown:return a.Unknown}},e.prototype.mapFallbackBooleanEntitlementResult=function(e,t){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0}},e.prototype.mapFallbackNumericEntitlementResult=function(e,t){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0,usageLimit:e.value,hasUnlimitedUsage:e.isUnlimited}},e.prototype.mapEntitlementResult=function(e,t,n){return Yt({hasAccess:e.hasAccess,accessDeniedReason:e.accessDeniedReason?this.mapAccessDeniedReason(e.accessDeniedReason):void 0,hasUnlimitedUsage:null==t?void 0:t.calculatedEntitlement.hasUnlimitedUsage,usageLimit:null==t?void 0:t.calculatedEntitlement.usageLimit,currentUsage:null==t?void 0:t.featureUsage.currentUsage,requestedUsage:n,nextResetDate:null==t?void 0:t.featureUsage.nextResetDate,resetPeriod:(null==t?void 0:t.featureUsage.resetPeriod)?this.mapApiEntitlementResetPeriod(t.featureUsage.resetPeriod):void 0},this.getResetPeriodData(null==t?void 0:t.featureUsage.resetPeriod,null==t?void 0:t.featureUsage.resetPeriodConfiguration))},e.prototype.mapFallbackMeteredEntitlementResult=function(e,t,n){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0,hasUnlimitedUsage:e.isUnlimited,usageLimit:e.usageLimit,requestedUsage:n}},e}(),Jt="Invariant Violation",Xt=Object.setPrototypeOf,Zt=void 0===Xt?function(e,t){return e.__proto__=t,e}:Xt,en=function(e){function t(n){void 0===n&&(n=Jt);var r=e.call(this,"number"==typeof n?Jt+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Jt,Zt(r,t.prototype),r}return ae(t,e),t}(Error);function tn(e,t){if(!e)throw new en(t)}var nn=["debug","log","warn","error","silent"],rn=nn.indexOf("log");function on(e){return function(){if(nn.indexOf(e)>=rn){var t=console[e]||console.log;return t.apply(console,arguments)}}}function an(e){try{return e()}catch(e){}}!function(e){e.debug=on("debug"),e.log=on("log"),e.warn=on("warn"),e.error=on("error")}(tn||(tn={}));const sn=an((function(){return globalThis}))||an((function(){return window}))||an((function(){return self}))||an((function(){return n.g}))||an((function(){return Function("return this")()}));var un="__",cn=[un,un].join("DEV");const ln=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(sn,cn,{value:"production"!==an((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),sn[cn]}}();function fn(e){try{return e()}catch(e){}}var pn=fn((function(){return globalThis}))||fn((function(){return window}))||fn((function(){return self}))||fn((function(){return n.g}))||fn((function(){return Function("return this")()})),dn=!1;function hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t,n){return t&&yn(e.prototype,t),n&&yn(e,n),e}!pn||fn((function(){return"production"}))||fn((function(){return process}))||(Object.defineProperty(pn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),dn=!0),dn&&(delete pn.process,dn=!1),__DEV__?tn("boolean"==typeof ln,ln):tn("boolean"==typeof ln,38);var mn=function(){return"function"==typeof Symbol},gn=function(e){return mn()&&Boolean(Symbol[e])},bn=function(e){return gn(e)?Symbol[e]:"@@"+e};mn()&&!gn("observable")&&(Symbol.observable=Symbol("observable"));var En=bn("iterator"),_n=bn("observable"),wn=bn("species");function On(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function Tn(e){var t=e.constructor;return void 0!==t&&null===(t=t[wn])&&(t=void 0),void 0!==t?t:Cn}function xn(e){return e instanceof Cn}function In(e){In.log?In.log(e):setTimeout((function(){throw e}))}function Sn(e){Promise.resolve().then((function(){try{e()}catch(e){In(e)}}))}function kn(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=On(t,"unsubscribe");n&&n.call(t)}}catch(e){In(e)}}function Dn(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function An(e,t,n){e._state="running";var r=e._observer;try{var i=On(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(Dn(e),!i)throw n;i.call(r,n);break;case"complete":Dn(e),i&&i.call(r)}}catch(e){In(e)}"closed"===e._state?kn(e):"running"===e._state&&(e._state="ready")}function Nn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void Sn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(An(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void An(e,t,n);e._queue.push({type:t,value:n})}}var Rn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new Pn(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(Dn(this),kn(this))},vn(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Pn=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){Nn(this._subscription,"next",e)},t.error=function(e){Nn(this._subscription,"error",e)},t.complete=function(){Nn(this._subscription,"complete")},vn(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Cn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Rn(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Tn(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[_n]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=On(t,_n);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return xn(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(gn("iterator")&&(r=On(t,En)))return new n((function(e){Sn((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){Sn((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){Sn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},vn(e,null,[{key:wn,get:function(){return this}}]),e}();function Fn(e){return null!==e&&"object"==typeof e}function jn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new en("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed."):new en(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?tn(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):tn(1===r.length,44),n=r[0].name.value),se(se({},e),{definitions:fe([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function Mn(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function Ln(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?tn(n,"No fragment named "+e.name.value+"."):tn(n,45),n;default:return null}}function qn(e){return{__ref:String(e)}}function Un(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Vn(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return Vn(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return Vn(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new en('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new en(54);e[t.value]=null}}mn()&&Object.defineProperty(Cn,Symbol("extensions"),{value:{symbol:_n,hostReportError:In},configurable:!0});var Bn=["connection","include","skip","client","rest","export"],Qn=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),n.connection.key+"("+zn(i)+")"}return n.connection.key}var o=e;if(t){var a=zn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Bn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+zn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=zn;return zn=e,t}}),zn=function(e){return JSON.stringify(e,Wn)};function Wn(e,t){return Fn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function Gn(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Vn(n,r,i,t)})),n}return null}function Kn(e){return e.alias?e.alias.value:e.name.value}function $n(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(Yn(o)){if("__typename"===o.name.value)return e[Kn(o)]}else{var a=$n(e,Ln(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Yn(e){return"Field"===e.kind}function Hn(e){return"InlineFragment"===e.kind}function Jn(e){__DEV__?tn(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn(e&&"Document"===e.kind,46);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new en('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new en(47);return e}));return __DEV__?tn(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):tn(t.length<=1,48),e}function Xn(e){return Jn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Zn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function er(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function tr(e){var t=Xn(e);return __DEV__?tn(t&&"query"===t.operation,"Must contain a query definition."):tn(t&&"query"===t.operation,49),t}function nr(e){var t;Jn(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new en("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new en(53)}function rr(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Vn(t,e.variable.name,e.defaultValue)})),t}function ir(e,t){return t?t(e):Cn.of()}function or(e){return"function"==typeof e?new ur(e):e}function ar(e){return e.request.length<=1}var sr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ae(t,e),t}(Error),ur=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Cn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(or).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=or(n),o=or(r||new e(ir));return ar(i)&&ar(o)?new e((function(e){return t(e)?i.request(e)||Cn.of():o.request(e)||Cn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Cn.of():o.request(e,n)||Cn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=se({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=se(se({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return se({},n)}}),t}(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?Zn(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new en("illegal argument: "+i):new en(26)}return e}(t))))||Cn.of()},e.concat=function(t,n){var r=or(t);if(ar(r))return __DEV__&&tn.warn(new sr("You are calling concat on a terminating link, which will have no effect",r)),r;var i=or(n);return ar(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Cn.of()}))||Cn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Cn.of()}))||Cn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(ir)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new en("request is not implemented"):new en(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();const cr=Object.freeze({});function lr(e,t,n=Te){const r=new Map;for(const e of Object.values(Ee))r.set(e,fr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],d=[];let h=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===d.length?void 0:p[p.length-1],o=s,s=d.pop(),g)if(u){o=o.slice();let e=0;for(const[t,n]of f){const r=t-e;null===n?(o.splice(r,1),e++):o[r]=n}}else{o=Object.defineProperties({},Object.getOwnPropertyDescriptors(o));for(const[e,t]of f)o[e]=t}l=i.index,c=i.keys,f=i.edits,u=i.inArray,i=i.prev}else{if(a=s?u?l:c[l]:void 0,o=s?s[a]:h,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var y,v;Ie(o)||Re(!1,`Invalid AST Node: ${Ae(o)}.`);const n=e?null===(y=r.get(o.kind))||void 0===y?void 0:y.leave:null===(v=r.get(o.kind))||void 0===v?void 0:v.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,d),b===cr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!Ie(b)){p.pop();continue}o=b}}var m;void 0===b&&g&&f.push([a,o]),e?p.pop():(i={inArray:u,index:l,keys:c,edits:f,prev:i},u=Array.isArray(o),c=u?o:null!==(m=n[o.kind])&&void 0!==m?m:[],l=-1,f=[],s&&d.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(h=f[f.length-1][1]),h}function fr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var pr=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new en("Network request failed. "+t+" is not serializable: "+e.message):new en(23);throw r.parseError=e,r}return n},dr=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},hr=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},yr=Object.prototype.hasOwnProperty;function vr(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;throw n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,n}})).then((function(n){return t.status>=300&&hr(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||yr.call(n,"data")||yr.call(n,"errors")||hr(t,n,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),n}))}}var mr=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new en("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new en(22)};const gr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function br(e){return Er[e.charCodeAt(0)]}const Er=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function _r(e){return lr(e,wr)}const wr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Or(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=xr("(",Or(e.variableDefinitions,", "),")"),n=Or([e.operation,Or([e.name,t]),Or(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+xr(" = ",n)+xr(" ",Or(r," "))},SelectionSet:{leave:({selections:e})=>Tr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=xr("",e,": ")+t;let a=o+xr("(",Or(n,", "),")");return a.length>80&&(a=o+xr("(\n",Ir(Or(n,"\n")),"\n)")),Or([a,Or(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+xr(" ",Or(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Or(["...",xr("on ",e),Or(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${xr("(",Or(n,", "),")")} on ${t} ${xr("",Or(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t=!1){const n=!e.includes("\n"),r=e.startsWith(" ")||e.startsWith("\t"),i=e.endsWith('"'),o=e.endsWith("\\"),a=!n||i||o||t;let s="";return!a||n&&r||(s+="\n"),s+=e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(e):`"${e.replace(gr,br)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Or(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Or(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+xr("(",Or(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>xr("",e,"\n")+Or(["schema",Or(t," "),Tr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>xr("",e,"\n")+Or(["scalar",t,Or(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>xr("",e,"\n")+Or(["type",t,xr("implements ",Or(n," & ")),Or(r," "),Tr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>xr("",e,"\n")+t+(Sr(n)?xr("(\n",Ir(Or(n,"\n")),"\n)"):xr("(",Or(n,", "),")"))+": "+r+xr(" ",Or(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>xr("",e,"\n")+Or([t+": "+n,xr("= ",r),Or(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>xr("",e,"\n")+Or(["interface",t,xr("implements ",Or(n," & ")),Or(r," "),Tr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>xr("",e,"\n")+Or(["union",t,Or(n," "),xr("= ",Or(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>xr("",e,"\n")+Or(["enum",t,Or(n," "),Tr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>xr("",e,"\n")+Or([t,Or(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>xr("",e,"\n")+Or(["input",t,Or(n," "),Tr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>xr("",e,"\n")+"directive @"+t+(Sr(n)?xr("(\n",Ir(Or(n,"\n")),"\n)"):xr("(",Or(n,", "),")"))+(r?" repeatable":"")+" on "+Or(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Or(["extend schema",Or(e," "),Tr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Or(["extend scalar",e,Or(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Or(["extend type",e,xr("implements ",Or(t," & ")),Or(n," "),Tr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Or(["extend interface",e,xr("implements ",Or(t," & ")),Or(n," "),Tr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Or(["extend union",e,Or(t," "),xr("= ",Or(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Or(["extend enum",e,Or(t," "),Tr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Or(["extend input",e,Or(t," "),Tr(n)]," ")}};function Or(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function Tr(e){return xr("{\n",Ir(Or(e,"\n")),"\n}")}function xr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Ir(e){return xr(" ",e.replace(/\n/g,"\n "))}function Sr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var kr={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Dr=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=se(se({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=se(se(se({},i),e.options),{headers:se(se({},i.headers),Ar(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=se(se({},o),e.http)}));var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=_r(c)),{options:i,body:l}};function Ar(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}var Nr=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function Rr(e){return new Cn((function(t){t.error(e)}))}var Pr=an((function(){return fetch})),Cr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=e.includeUnusedVariables,s=void 0!==a&&a,u=ue(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&mr(r||Pr);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new ur((function(e){var t=dr(e,n),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,l=u.name,f=u.version;l&&(a["apollographql-client-name"]=l),f&&(a["apollographql-client-version"]=f)}var p,d=se(se({},a),i.headers),h={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:d},y=Dr(e,kr,c,h),v=y.options,m=y.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));lr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=se({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!v.signal){var b=Nr(),E=b.controller,_=b.signal;(p=E)&&(v.signal=_)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(v.method="GET"),"GET"===v.method){var w=function(e,t){var n=[],r=function(e,t){n.push(e+"="+encodeURIComponent(t))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=pr(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=pr(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+a}}(t,m),O=w.newURI,T=w.parseError;if(T)return Rr(T);t=O}else try{v.body=pr(m,"Payload")}catch(T){return Rr(T)}return new Cn((function(n){return(r||an((function(){return fetch}))||Pr)(t,v).then((function(t){return e.setContext({response:t}),t})).then(vr(e)).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(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return ae(t,e),t}(ur),Fr=ur.execute;function jr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var Mr=Object.prototype,Lr=Mr.toString,qr=Mr.hasOwnProperty,Ur=Function.prototype.toString,Vr=new Map;function Br(e,t){try{return Qr(e,t)}finally{Vr.clear()}}function Qr(e,t){if(e===t)return!0;var n,r,i,o=Lr.call(e);if(o!==Lr.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Kr(e,t))return!0;var a=zr(e),s=zr(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!qr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Qr(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Kr(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!Qr(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var g=Ur.call(e);return g===Ur.call(t)&&(r=Gr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function zr(e){return Object.keys(e).filter(Wr,e)}function Wr(e){return void 0!==this[e]}var Gr="{ [native code] }";function Kr(e,t){var n=Vr.get(e);if(n){if(n.has(t))return!0}else Vr.set(e,n=new Set);return n.add(t),!1}var $r,Yr,Hr=function(){return Object.create(null)},Jr=Array.prototype,Xr=Jr.forEach,Zr=Jr.slice,ei=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Hr),this.weakness=e,this.makeData=t}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 Xr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Zr.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),ti="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ni="function"==typeof WeakSet,ri="function"==typeof Symbol&&"function"==typeof Symbol.for,ii=function(){function e(){this.known=new(ni?WeakSet:Set),this.pool=new ei(ti),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Fn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Fn(e)){var t=function(e){return Fn(e)?Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Fn(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),oi=Object.assign((function(e){if(Fn(e)){void 0===$r&&ai();var t=$r.admit(e),n=Yr.get(t);return void 0===n&&Yr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:ai});function ai(){$r=new ii,Yr=new(ti?WeakMap:Map)}function si(e,t,n){return new Cn((function(r){var i=r.next,o=r.error,a=r.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then((function(e){--s,i&&i.call(r,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){u=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function ui(e){return e.errors&&e.errors.length>0||!1}function ci(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var li={kind:"Field",name:{kind:"Name",value:"__typename"}};function fi(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&fi(t[e.name.value],t)}))}function pi(e){return fi(Xn(e)||function(e){__DEV__?tn("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn("Document"===e.kind,50),__DEV__?tn(e.definitions.length<=1,"Fragment must have exactly one definition."):tn(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?tn("FragmentDefinition"===t.kind,"Must be a fragment definition."):tn("FragmentDefinition"===t.kind,52),t}(e),Mn(er(e)))?null:e}function di(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function hi(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=pi(lr(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(di(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&mi(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(di(e)(t))return null}}}));return a&&ci(r,(function(e){return!!e.name&&!n[e.name]})).length&&(a=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return pi(lr(t,{OperationDefinition:{enter:function(t){return se(se({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,a)),a&&ci(o,(function(e){return!!e.name&&!i[e.name]})).length&&(a=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return pi(lr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var yi=Object.assign((function(e){return lr(Jn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Yn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Yn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return se(se({},e),{selections:fe(fe([],r,!0),[li],!1)})}}}}})}),{added:function(e){return e===li}}),vi={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&tn.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function mi(e){var t=[];return e.selections.forEach((function(e){(Yn(e)||Hn(e))&&e.selectionSet?mi(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function gi(e){return"query"===nr(e).operation?e:lr(e,{OperationDefinition:{enter:function(e){return se(se({},e),{operation:"query"})}}})}function bi(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?tn(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):tn(n&&1===n.length,40);var i=n[0];__DEV__?tn(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):tn(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),42),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?tn(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):tn(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function Ei(e,t){return function(e){var t=[];return lr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function _i(e){return e&&Ei(["client"],e)&&Ei(["export"],e)}var wi=new Map;function Oi(e){var t=wi.get(e)||1;return wi.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function Ti(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function xi(e){function t(t){Object.defineProperty(e,t,{value:Cn})}return ri&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Ii(e){return e&&"function"==typeof e.then}var Si=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],Ti(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),Ti(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?Ii(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),Ti(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new Cn(t)]),Ii(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return ae(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(Cn);function ki(e){return Array.isArray(e)&&e.length>0}xi(Si);var Di,Ai=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,u=n.errorMessage,c=n.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(ki((r=l).graphQLErrors)||ki(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+=t+"\n"})),r.networkError&&(i+=r.networkError.message+"\n"),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return ae(t,e),t}(Error);function Ni(e){return!!e&&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"}(Di||(Di={}));var Ri=Object.prototype.toString;function Pi(e){return Ci(e)}function Ci(e,t){switch(Ri.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=Ci(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=Ci(e[n],t)})),r;default:return e}}var Fi=Object.assign,ji=Object.hasOwnProperty,Mi=!1,Li=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=qi)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=Xn(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return ae(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||Di.ready,r=se(se({},t),{loading:Ni(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if((t||"network-only"!==o&&"no-cache"!==o&&"standby"!==o)&&!this.queryManager.transform(this.options.query).hasForcedResolvers){var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),Br(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==Di.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=Di.ready,r.loading=!1),delete r.partial):"no-cache"!==o&&(r.partial=!0),!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||Ui(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!Br(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||Br(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("no-cache"===r?n.fetchPolicy="no-cache":"cache-and-network"!==r&&(n.fetchPolicy="network-only"),__DEV__&&e&&ji.call(e,"variables")){var i=tr(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&tn.warn("Called refetch("+JSON.stringify(e)+") for query "+((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i))+", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?")}return e&&!Br(this.options.variables,e)&&(n.variables=this.options.variables=se(se({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,Di.refetch)},t.prototype.fetchMore=function(e){var t=this,n=se(se({},e.query?e:se(se(se({},this.options),e),{variables:se(se({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=Di.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,Di.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!Mi&&(__DEV__&&tn.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),Mi=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&tn.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Br(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},Di.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?tn(n,"Attempted to start a polling query without a polling interval."):tn(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(Ni(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},Di.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=se(se({},this.last),{result:this.queryManager.assumeImmutableResults?e:Pi(e),variables:t}),ki(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===Di.refetch||t===Di.fetchMore||t===Di.poll,i=this.options.variables,o=r?jr(this.options,e):Fi(this.options,jr(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!Br(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=Di.setVariables)));var a=o.variables&&se({},o.variables),s=this.fetch(o,t),u={next:function(e){n.reportResult(e,a)},error:function(e){n.reportError(e,a)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=u),s.addObserver(u),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),Ti(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=se(se({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:Di.error,loading:!1});this.updateLastResult(n,t),Ti(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Cn);function qi(e){__DEV__&&tn.error("Unhandled error",e.message,e.stack)}function Ui(e){__DEV__&&ki(e)&&__DEV__&&tn.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}xi(Li);var Vi=Object.prototype.hasOwnProperty;function Bi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Qi(e)}function Qi(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Wi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var zi=function(e,t,n){return this.merge(e[n],t[n])},Wi=function(){function e(e){void 0===e&&(e=zi),this.reconciler=e,this.isObject=Fn,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return Fn(t)&&Fn(e)?(Object.keys(t).forEach((function(i){if(Vi.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,fe([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Fn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Gi=null,Ki={},$i=1,Yi="@wry/context:Slot",Hi=Array,Ji=Hi[Yi]||function(){var e=function(){function e(){this.id=["slot",$i++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Gi;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Ki)break;return e!==Gi&&(Gi.slots[this.id]=t),!0}return Gi&&(Gi.slots[this.id]=Ki),!1},e.prototype.getValue=function(){if(this.hasValue())return Gi.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Gi;Gi={parent:a,slots:o};try{return t.apply(r,n)}finally{Gi=a}},e.bind=function(e){var t=Gi;return function(){var n=Gi;try{return Gi=t,e.apply(this,arguments)}finally{Gi=n}}},e.noContext=function(e,t,n){if(!Gi)return e.apply(n,t);var r=Gi;try{return Gi=null,e.apply(n,t)}finally{Gi=r}},e}();try{Object.defineProperty(Hi,Yi,{value:Hi[Yi]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Xi(){}Ji.bind,Ji.noContext;var Zi,eo=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Xi),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),to=new Ji,no=Object.prototype.hasOwnProperty,ro=void 0===(Zi=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Zi;function io(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var oo=[];function ao(e,t){if(!e)throw new Error(t||"assertion failure")}function so(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var uo=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!fo(this))return co(this),this.value[0]},e.prototype.recompute=function(e){return ao(!this.recomputing,"already recomputing"),co(this),fo(this)?function(e,t){return bo(e),to.withValue(e,lo,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{io(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,fo(e)||ho(e)}(e),so(e.value)}(this,e):so(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,po(this),io(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),bo(this),yo(this,(function(t,n){t.setDirty(),Eo(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=oo.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(ro(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),oo.push(this.deps),this.deps=null)},e.count=0,e}();function co(e){var t=to.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),fo(e)?vo(t,e):mo(t,e),t}function lo(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function fo(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function po(e){yo(e,vo)}function ho(e){yo(e,mo)}function yo(e,t){var n=e.parents.size;if(n)for(var r=ro(e.parents),i=0;i<n;++i)t(r[i],e)}function vo(e,t){ao(e.childValues.has(t)),ao(fo(t));var n=!fo(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=oo.pop()||new Set;e.dirtyChildren.add(t),n&&po(e)}function mo(e,t){ao(e.childValues.has(t)),ao(!fo(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),go(e,t),fo(e)||ho(e)}function go(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(oo.length<100&&oo.push(n),e.dirtyChildren=null))}function bo(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Eo(e,n)})),e.forgetDeps(),ao(null===e.dirtyChildren)}function Eo(e,t){t.parents.delete(e),e.childValues.delete(t),go(e,t)}var _o={setDirty:!0,dispose:!0,forget:!0};function wo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=to.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(io(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&no.call(_o,n)?n:"setDirty";ro(r).forEach((function(e){return e[i]()})),t.delete(e),io(r)}},r}function Oo(){var e=new ei("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}Oo();var To=new Set;function xo(e,t){void 0===t&&(t=Object.create(null));var n=new eo(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||Oo(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new uo(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),To.add(n),to.hasValue()||(To.forEach((function(e){return e.clean()})),To.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var Io=new Ji,So=new WeakMap;function ko(e){var t=So.get(e);return t||So.set(e,t={vars:new Set,dep:wo()}),t}function Do(e){ko(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Ao(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){ko(e).dep.dirty(r),No(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Io.getValue();s&&(i(s),ko(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),ko(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function No(e){e.broadcastWatches&&e.broadcastWatches()}var Ro=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Bi(t.resolvers,e)})):this.resolvers=Bi(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,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return ce(this,void 0,void 0,(function(){return le(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return se(se({},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 Ei(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Jn(e);var t=hi([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=lr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Yn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return se(se({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),ce(this,void 0,void 0,(function(){return le(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return se(se({},t),e.exportedVariables)}))]:[2,se({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return lr(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 cr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:gi(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),ce(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,d,h;return le(this,(function(y){return a=nr(e),s=er(e),u=Mn(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,d=f.client,h={fragmentMap:u,context:se(se({},n),{cache:p,client:d}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,h).then((function(e){return{result:e,exportedVariables:h.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return le(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return ce(u,void 0,void 0,(function(){var s,u;return le(this,(function(c){return bi(e,o)?Yn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Kn(e)]=t,n))}))]:(Hn(e)?s=e:(s=r[e.name.value],__DEV__?tn(s,"No fragment named "+e.name.value):tn(s,11)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return Qi(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return le(this,(function(d){return r=n.variables,i=e.name.value,o=Kn(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(f=l[a?i:o])&&(u=Promise.resolve(Io.withValue(this.cache,f,[t,Gn(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.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)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Po=new(ti?WeakMap:Map);function Co(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Po.set(e,(Po.get(e)+1)%1e15),n.apply(this,arguments)})}function Fo(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var jo=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Po.has(n)||(Po.set(n,0),Co(n,"evict"),Co(n,"modify"),Co(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||Di.loading;return this.variables&&this.networkStatus!==Di.loading&&!Br(this.variables,e.variables)&&(t=Di.setVariables),Br(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Fo(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Br(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Br(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Fo(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Ni(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=se(se({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Br(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Po.get(this.cache)&&Br(t,n.variables)&&Br(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=ki(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Mo(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Po.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Di.ready},e.prototype.markError=function(e){return this.networkStatus=Di.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Mo(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!ui(e);return!r&&n&&e.data&&(r=!0),r}var Lo=Object.prototype.hasOwnProperty,qo=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(ti?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new Ro({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new en("QueryManager stopped while query was in flight"):new en(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.onQueryUpdated,f=e.errorPolicy,p=void 0===f?"none":f,d=e.fetchPolicy,h=void 0===d?"network-only":d,y=e.keepRootFields,v=e.context;return ce(this,void 0,void 0,(function(){var e,o,s;return le(this,(function(f){switch(f.label){case 0:return __DEV__?tn(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):tn(t,14),__DEV__?tn("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):tn("network-only"===h||"no-cache"===h,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,v)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,updateQueries:i,update:c,keepRootFields:y}),this.broadcastQueries(),s=this,[2,new Promise((function(f,d){return si(s.getObservableFromLink(t,se(se({},v),{optimisticResponse:r}),n,!1),(function(f){if(ui(f)&&"none"===p)throw new Ai({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var d=se({},f);return"function"==typeof a&&(a=a(d)),"ignore"===p&&ui(d)&&delete d.errors,s.markMutationResult({mutationId:e,result:d,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:y})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){o&&(o.loading=!1,o.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),d(t instanceof Ai?t:new Ai({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&Mo(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var a=e.updateQueries;a&&this.queries.forEach((function(e,o){var s=e.observableQuery,u=s&&s.queryName;if(u&&Lo.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=c(h,{mutationResult:r,queryName:f&&Zn(f)||void 0,queryVariables:p});y&&i.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach((function(e){return t.write(e)}));var a=e.update;if(a){if(!o){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=se(se({},r),{data:s.result}))}a(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(se(se({},t),{result:{data:r}}),e)}catch(e){__DEV__&&tn.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),hi([vi],Jn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:_i(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:rr(Xn(r)),asQuery:se(se({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?se(se({},e),{operation:"query"}):e}))})},u=function(e){e&&!n.has(e)&&n.set(e,s)};u(e),u(r),u(o),u(a)}return n.get(e)},e.prototype.getVariables=function(e,t){return se(se({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=se(se({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new jo(this),n=new Li({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?tn(e.query,"query option is required. You must specify your GraphQL document in the query option."):tn(e.query,16),__DEV__?tn("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):tn("Document"===e.query.kind,17),__DEV__?tn(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):tn(!e.returnPartialData,18),__DEV__?tn(!e.pollInterval,"pollInterval option only supported on watchQuery."):tn(!e.pollInterval,19),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new en("Store reset while query was in flight (not completed in link chain)"):new en(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=Di.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):Fn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Fn(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}})),i.size&&i.forEach((function(e){var r=Oi("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Li({queryManager:t,queryInfo:i,options:se(se({},e),{fetchPolicy:"network-only"})});tn(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&tn.warn("Unknown query "+("string"==typeof t?"named ":"")+JSON.stringify(t,null,2)+" requested in refetchQueries options.include array")})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var u=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(Mo(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),ui(o))throw new Ai({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Cn((function(e){var t=null;return c.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this.inFlightLinkObservables,c=this.link,l={query:s,variables:n,operationName:Zn(s)||void 0,context:this.prepareContext(se(se({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=oi(n);if(!(o=f.get(p))){var d=new Si([Fr(c,l)]);f.set(p,o=d),d.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new Si([Fr(c,l)])}else o=new Si([Cn.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(o=si(o,(function(e){return a.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return si(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=ki(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new Ai({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||Di.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new Ai({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=Di.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,u=void 0===s?"cache-first":s,c=t.errorPolicy,l=void 0===c?"none":c,f=t.returnPartialData,p=void 0!==f&&f,d=t.notifyOnNetworkStatusChange,h=void 0!==d&&d,y=t.context,v=void 0===y?{}:y,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:h,context:v}),g=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new Si(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(g):g(m.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),function(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?Oi("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof jo&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),!1}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var d=function(){return e.getDiff(o)},h=function(t,n){void 0===n&&(n=e.networkStatus||Di.loading);var a=t.result;!__DEV__||c||Br(a,{})||Ui(t.missing);var s=function(e){return Cn.of(se({data:e,loading:Ni(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(a)},y="no-cache"===a?0:n===Di.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,y,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&Ni(n);switch(a){default:case"cache-first":return(g=d()).complete?[h(g,e.markReady())]:c||m?[h(g),v()]:[v()];case"cache-and-network":var g;return(g=d()).complete||c||m?[h(g),v()]:[v()];case"cache-only":return[h(d(),e.markReady())];case"network-only":return m?[h(d()),v()]:[v()];case"no-cache":return m?[h(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new jo(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return se(se({},t),{clientAwareness:this.clientAwareness})},e}(),Uo=!1;function Vo(e,t){return jr(e,t,t.variables&&{variables:se(se({},e.variables),t.variables)})}var Bo=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,d=void 0===p||p,h=e.defaultOptions,y=e.assumeImmutableResults,v=void 0!==y&&y,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,E=e.name,_=e.version,w=e.link;if(w||(w=n?new Cr({uri:n,credentials:r,headers:i}):ur.empty()),!o)throw __DEV__?new en("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new en(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=d,this.defaultOptions=h||{},this.typeDefs=g,c&&setTimeout((function(){return t.disableNetworkFetches=!1}),c),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),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Uo&&__DEV__&&(Uo=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,T=O&&O.userAgent,x=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&tn.log("Download the Apollo DevTools for a better development experience: "+x)}this.version="3.4.17",this.localState=new Ro({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new qo({cache:this.cache,link:this.link,queryDeduplication:d,ssrMode:s,clientAwareness:{name:E,version:_},localState:this.localState,assumeImmutableResults:v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Vo(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Vo(this.defaultOptions.query,e)),__DEV__?tn("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):tn("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Vo(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Fr(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&tn.debug("In client.refetchQueries, Promise.all promise rejected with error "+e)})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Qo=function(){function e(){this.getFragmentDoc=xo(jn)}return e.prototype.batch=function(e){var t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;this.performTransaction(e.update,t)},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=ue(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=ue(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),zo=function(e){function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.path=r,a.query=i,a.variables=o,a.__proto__=t.prototype,a}return ae(t,e),t}(Error);function Wo(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Fn(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Fn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Go=Object.prototype.hasOwnProperty;function Ko(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return n+":"+("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var $o={dataIdFromObject:Ko,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Yo(e){var t=e.canonizeResults;return void 0===t?$o.canonizeResults:t}var Ho=/^[_a-z][_0-9a-z]*/i;function Jo(e){var t=e.match(Ho);return t?t[0]:e}function Xo(e,t,n){return!!Fn(t)&&(Array.isArray(t)?t.every((function(t){return Xo(e,t,n)})):e.selections.every((function(e){if(Yn(e)&&bi(e,n)){var r=Kn(e);return Go.call(t,r)&&(!e.selectionSet||Xo(e.selectionSet,t[r],n))}return!0})))}function Zo(e){return Fn(e)&&!Un(e)&&!Array.isArray(e)}var ea=Object.create(null),ta=function(){return ea},na=Object.create(null),ra=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Wo(Un(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return Un(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return qn(e);if(Un(e))return e;var r=n.policies.identify(e)[0];if(r){var i=qn(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return se({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Go.call(this.data,e)){var n=this.data[e];if(n&&Go.call(n,t))return n[t]}return"__typename"===t&&Go.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof sa?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Go.call(this.data,e)?this.data[e]:this instanceof sa?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;Un(e)&&(e=e.__ref),Un(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?tn("string"==typeof n,"store.merge expects a string ID"):tn("string"==typeof n,1);var a=new Wi(ca).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=Jo(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof sa||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:ea,INVALIDATE:na,isReference:Un,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||qn(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=Jo(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===ta?ea:f(Wo(l),se(se({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===na?n.group.dirty(e,u):(p===ea&&(p=void 0),p!==l&&(i[u]=p,o=!0,l=p))}void 0!==l&&(a=!1)}})),o)return this.merge(e,i),a&&(this instanceof sa?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=ta,r):ta)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Go.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof sa&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){Go.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&Go.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ue(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof sa?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){Go.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof sa;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Go.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){Un(e)&&(t[e.__ref]=!0),Fn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Fn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),ia=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?wo():null,this.keyMaker=new ei(ti)},e.prototype.depend=function(e,t){if(this.d){this.d(oa(e,t));var n=Jo(t);n!==t&&this.d(oa(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(oa(e,t),"__exists"===t?"forget":"setDirty")},e}();function oa(e,t){return t+"#"+e}function aa(e,t){la(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new ia(i))||this;return a.stump=new ua(a),a.storageTrie=new ei(ti),o&&a.replace(o),a}return ae(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(ra||(ra={}));var sa=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return ae(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){Br(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return se(se({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Go.call(this.data,t)?se(se({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(ra),ua=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new ia(t.group.caching,t.group))||this}return ae(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(sa);function ca(e,t,n){var r=e[n],i=t[n];return Br(r,i)?r:i}function la(e){return!!(e instanceof ra&&e.group.caching)}function fa(e,t){return new zo(e.message,t.path.slice(),t.query,t.variables)}function pa(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var da=function(){function e(e){var t=this;this.knownResults=new(ti?WeakMap:Map),this.config=jr(e,{addTypename:!1!==e.addTypename,canonizeResults:Yo(e)}),this.canon=e.canon||new ii,this.executeSelectionSet=xo((function(e){var n,r=e.context.canonizeResults,i=pa(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?se(se({},o),{result:t.canon.admit(o.result)}):o:(aa(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:pa,makeCacheKey:function(e,t,n,r){if(la(n.store))return n.store.makeCacheKey(e,Un(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=xo((function(e){return aa(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(la(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new ii},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,o=e.variables,a=e.returnPartialData,s=void 0===a||a,u=e.canonizeResults,c=void 0===u?this.config.canonizeResults:u,l=this.config.cache.policies;o=se(se({},rr(tr(n))),o);var f=qn(i),p=this.executeSelectionSet({selectionSet:nr(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:oi(o),canonizeResults:c,fragmentMap:Mn(er(n)),path:[]}}),d=p.missing&&p.missing.length>0;if(d&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!d}},e.prototype.isFresh=function(e,t,n,r){if(la(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(Un(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[fa(__DEV__?new en("Dangling reference to missing "+r.__ref+" object"):new en(5),o)]};var a=o.variables,s=o.policies,u=o.store,c=[],l={result:null},f=u.getFieldValue(r,"__typename");function p(){return l.missing||(l.missing=[])}function d(e){var t;return e.missing&&(t=p()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof f&&!s.rootIdsByTypename[f]&&c.push({__typename:f});var h=new Set(n.selections);h.forEach((function(e){var n;if(bi(e,a))if(Yn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Kn(e);o.path.push(l),void 0===u?yi.added(e)||p().push(fa(__DEV__?new en("Can't find field '"+e.name.value+"' on "+(Un(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new en(6),o)):Array.isArray(u)?u=d(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:Un(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),tn(o.path.pop()===l)}else{var y=Ln(e,o.fragmentMap);y&&s.fragmentMatches(y,f)&&y.selectionSet.selections.forEach(h.add,h)}}));var y=Qi(c);return l.result=o.canonizeResults?this.canon.admit(y):Wo(y),this.knownResults.set(l.result,n),l},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){return e.missing&&(t=t||[]).push.apply(t,e.missing),tn(a.path.pop()===n),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:Un(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Fn(n)&&(__DEV__?tn(!Un(n),"Missing selection set for object of type "+function(e,t){return Un(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):tn(!Un(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),tn(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ha=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=Xn(r),c=new Wi;a=se(se({},rr(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:oi(a),fragmentMap:Mn(er(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1},f=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!Un(f))throw __DEV__?new en("Could not identify object "+JSON.stringify(i)):new en(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=qn(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(Un(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Yn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has(Jo(e))})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!Un(o)&&!Br(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=Jo(n),c=s+"."+u;if(!Ea.has(c)){Ea.add(c);var l=[];Array.isArray(o)||Array.isArray(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)})),__DEV__&&tn.warn("Cache data may be lost when replacing the "+u+" field of a "+s+" object.\n\nTo address this problem (which is not a bug in Apollo Client), "+(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"")+"define a custom merge function for the "+c+" field, so InMemoryCache can safely merge these objects:\n\n existing: "+JSON.stringify(o).slice(0,1e3)+"\n incoming: "+JSON.stringify(a).slice(0,1e3)+"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n")}}}}(s,i,e,l.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=s.identify(r,i,o.fragmentMap),c=u[0],l=u[1];if("string"==typeof(n=n||c)){var f=o.written[n]||(o.written[n]=[]),p=qn(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var d=Object.create(null);l&&(d=o.merge(d,l));var h=n&&s.rootTypenamesById[n]||$n(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof h&&(d.__typename=h);var y=new Set(i.selections);if(y.forEach((function(e){var n;if(bi(e,o.variables))if(Yn(e)){var i=Kn(e),u=r[i],c=o.clientOnly;if(o.clientOnly=c||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0!==u){var l=s.getStoreFieldName({typename:h,fieldName:e.name.value,field:e,variables:o.variables}),f=va(a,l),p=t.processFieldValue(u,e,o,f),v=void 0;if(e.selectionSet&&!(v=o.store.getFieldValue(p,"__typename"))&&Un(p)){var m=o.incomingById.get(p.__ref);v=m&&m.fields.__typename}var g=s.getMergeFunction(h,e.name.value,v);g?f.info={field:e,typename:h,merge:g}:ba(a,l),d=o.merge(d,((n={})[l]=p,n))}else o.clientOnly||yi.added(e)||__DEV__&&tn.error(("Missing field '"+Kn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=Ln(e,o.fragmentMap);b&&s.fragmentMatches(b,h,r,o.variables)&&b.selectionSet.selections.forEach(y.add,y)}})),"string"==typeof n){var v=o.incomingById.get(n);return v?(v.fields=o.merge(v.fields,d),v.mergeTree=ma(v.mergeTree,a),v.selections.forEach(y.add,y),v.selections=y):o.incomingById.set(n,{fields:d,mergeTree:ga(a)?void 0:a,selections:y}),qn(n)}return d},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,va(r,o));return ba(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?Pi(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!Un(n)){var s,u=Array.isArray(n)||!Un(t)&&!Zo(t)?void 0:t,c=n;u&&!i&&(i=[Un(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&tn(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):se({},c),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),ya=[];function va(e,t){var n=e.map;return n.has(t)||n.set(t,ya.pop()||{map:new Map}),n.get(t)}function ma(e,t){if(e===t||!t||ga(t))return e;if(!e||ga(e))return t;var n=e.info&&t.info?se(se({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var o=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,ma(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,ma(t.map.get(n),e.map.get(n)))}))}return i}function ga(e){return!e||!(e.info||e.map.size)}function ba(e,t){var n=e.map,r=n.get(t);r&&ga(r)&&(ya.push(r),n.delete(t))}var Ea=new Set;function _a(e){var t=Oi("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function wa(e){return void 0!==e.args?e.args:e.field?Gn(e.field,e.variables):null}Qn.setStringify(oi);var Oa=function(){},Ta=function(e,t){return t.fieldName},xa=function(e,t,n){return(0,n.mergeObjects)(e,t)},Ia=function(e,t){return t},Sa=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=se({dataIdFromObject:Ko},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,n){var r=t&&n?$n(e,t,n):e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,o={typename:r,selectionSet:t,fragmentMap:n},a=r&&this.getTypePolicy(r),s=a&&a.keyFn||this.config.dataIdFromObject;s;){var u=s(e,o);if(!Array.isArray(u)){i=u;break}s=Na(u)}return i=i?String(i):void 0,o.keyObject?[i,o.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=ue(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Go.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?xa:!1===t?Ia:e.merge}a(r,t.merge),r.keyFn=!1===i?Oa:Array.isArray(i)?Na(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?Ta:Array.isArray(s)?Aa(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||Ta)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?tn(!r||r===e,"Cannot change root "+e+" __typename more than once"):tn(!r||r===e,2),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(Ho);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Go.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,o=ue(r,["fields"]);Object.assign(n,o),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!n||!this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&tn.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Xo(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=wa(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=Aa(u)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Vn(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return Vn(r,n,i,t)}))),Qn(e.name.value,r,n)}(e.field,e.variables):Qn(r,wa(e))),!1===t?r:r===Jo(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=Jo(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=ka(this,n,e,t,t.store.getStorage(Un(n)?n.__ref:n,i));return Io.withValue(this.cache,u,[a,c])}return a}},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===xa?Da(r.store)(e,t):s===Ia?t:(r.overwrite&&(e=void 0),s(e,t,ka(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function ka(e,t,n,r,i){var o=e.getStoreFieldName(n),a=Jo(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:wa(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:Un,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(n,i){var o;if("string"==typeof n)o={fieldName:n,from:arguments.length>1?i:t};else{if(!Fn(n))return void(__DEV__&&tn.warn("Unexpected readField arguments: "+_a(Array.from(arguments))));o=se({},n),Go.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&tn.warn("Undefined 'from' passed to readField with arguments "+_a(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:Da(r.store)}}function Da(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new en("Cannot automatically merge arrays"):new en(3);if(Fn(t)&&Fn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(Un(t)&&Zo(n))return e.merge(t.__ref,n),t;if(Zo(t)&&Un(n))return e.merge(t,n.__ref),n;if(Zo(t)&&Zo(n))return se(se({},t),n)}return n}}function Aa(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(Pa(t,e,!1)):n.fieldName}}function Na(e){var t=new ei(ti);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=Ra(r.selectionSet,r.fragmentMap))}var a=r.keyObject=Pa(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function Ra(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Yn(e)){if(e.alias){var i=e.alias.value,o=e.name.value;o!==i&&((n.aliases||(n.aliases=Object.create(null)))[o]=i)}e.selectionSet&&((n.subsets||(n.subsets=Object.create(null)))[e.name.value]=Ra(e.selectionSet,t))}else{var a=Ln(e,t);a&&r.add(a.selectionSet)}}))})),n}function Pa(e,t,n,r){var i,o,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof o&&"string"==typeof i){var s=r&&r.subsets,u=s&&s[o];a[o]=Pa(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Go.call(e,l)?a[o=t]=e[i=l]:(__DEV__?tn(!n,"Missing field '"+l+"' while computing key fields"):tn(!n,4),i=o=void 0)}})),a}var Ca=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=Ao,n.txCount=0,n.config=function(e){return jr($o,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new Sa({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ae(t,e),t.prototype.init=function(){var e=this.data=new ra.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new ha(this,this.storeReader=new da({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Yo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=xo((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(la(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,oi({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof zo)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Go.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,n=this;return this.watches.size||ko(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){n.watches.delete(e)&&!n.watches.size&&Do(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){oi.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return Un(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Go.call(e,"id"))return!1;e=se(se({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),oi.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),Do(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t=this,n=e.update,r=e.optimistic,i=void 0===r||r,o=e.removeOptimistic,a=e.onWatchUpdated,s=function(e){var r=t,i=r.data,o=r.optimisticData;++t.txCount,e&&(t.data=t.optimisticData=e);try{n(t)}finally{--t.txCount,t.data=i,t.optimisticData=o}},u=new Set;a&&!this.txCount&&this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,s):!1===i?s(this.data):s(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),a&&u.size?(this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e,t){var n=a.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return t.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e)},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=yi(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Br(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Qo);const Fa=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var ja=n(4098),Ma=n.n(ja),La=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,o=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=o||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=se({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new Cn((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),o=[],a=[],s=[],u=[];n.forEach((function(e,t){o.push(e.observable),a.push(e.next),s.push(e.error),u.push(e.complete)}));var c=this.batchHandler(r,i)||Cn.of(),l=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return c.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),a.length!==e.length){var t=new Error("server returned results with length "+e.length+", expected length of "+a.length);return t.result=e,l(t)}e.forEach((function(e,t){a[t]&&a[t].forEach((function(t){return t(e)}))}))},error:l,complete:function(){u.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),o}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),qa=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,o=r.batchInterval,a=void 0===o?10:o,s=r.batchMax,u=void 0===s?0:s,c=r.batchHandler,l=void 0===c?function(){return null}:c,f=r.batchKey,p=void 0===f?function(){return""}:f;return n.batcher=new La({batchDebounce:i,batchInterval:a,batchMax:u,batchHandler:l,batchKey:p}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return ae(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(ur),Ua=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,o=void 0===i?"/graphql":i,a=r.fetch,s=r.includeExtensions,u=r.batchInterval,c=r.batchDebounce,l=r.batchMax,f=r.batchKey,p=ue(r,["uri","fetch","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);mr(a),a||(a=fetch);var d={http:{includeExtensions:s},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return n.batchDebounce=c,n.batchInterval=u||10,n.batchMax=l||10,f=f||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return dr(e,o)+JSON.stringify(n)},n.batcher=new qa({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:f,batchHandler:function(e){var t=dr(e[0],o),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,u=i.version;s&&(r["apollographql-client-name"]=s),u&&(r["apollographql-client-version"]=u)}var c,l={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:se(se({},r),n.headers)},f=e.map((function(e){return Dr(e,kr,d,l)})),p=f.map((function(e){return e.body})),h=f[0].options;if("GET"===h.method)return Rr(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=pr(p,"Payload")}catch(e){return Rr(e)}if(!h.signal){var y=Nr(),v=y.controller,m=y.signal;(c=v)&&(h.signal=m)}return new Cn((function(n){return a(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(vr(e)).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(){c&&c.abort()}}))}}),n}return ae(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(ur),Va=n(4147);function Ba(e){return new ur((function(t,n){return t.setContext({headers:{"X-API-KEY":e}}),n(t)}))}var Qa=function(){function e(){var e=this;this.setFeatures=function(t){return e.features=new Set(t)},this.entitlements=new Map,this.features=new Set,this.isLoaded=!1}return e.prototype.getEntitlement=function(e){return this.entitlements.get(e)||null},e.prototype.validateFeature=function(e){return this.features.has(e)},e.prototype.setEntitlements=function(e){this.entitlements=e,this.isLoaded=!0},e.prototype.getEntitlements=function(){return this.entitlements},e}(),za=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Wa=ht($a||($a=za(["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"]))),Ga=function(){function e(e){this.client=e}return e.prototype.getEntitlements=function(e){return this.client.query({query:ht(Ya||(Ya=za(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),Wa),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:ht(Ha||(Ha=za(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),Wa),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e.prototype.reportEntitlementRequested=function(e,t,n,r){return i=this,o=void 0,s=function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){switch(i.label){case 0:return[4,this.client.mutate({mutation:ht(Ja||(Ja=za(["\n mutation reportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {\n reportEntitlementCheckRequested(entitlementCheckRequested: $entitlementCheckRequested)\n }\n "],["\n mutation reportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {\n reportEntitlementCheckRequested(entitlementCheckRequested: $entitlementCheckRequested)\n }\n "]))),variables:{entitlementCheckRequested:{entitlementCheckResult:n,customerId:t,featureId:e,requestedUsage:r}}})];case 1:return i.sent(),[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{u(s.next(e))}catch(e){t(e)}}function r(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}u((s=s.apply(i,o||[])).next())}));var i,o,a,s},e}();const Ka=Ga;var $a,Ya,Ha,Ja,Xa=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n,r;if(!e||!e.calculatedEntitlement.feature)return{hasAccess:!1,accessDeniedReason:H.CustomerNotEntitledForFeature};var i=e.calculatedEntitlement.feature,o=i.featureType,a=i.meterType;switch(o){case J.Boolean:return{hasAccess:!0};case J.Numeric:if((null===(n=e.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)===X.None)return{hasAccess:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{hasAccess:!0};var s=e.featureUsage.currentUsage;return a===X.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(s=0),s+(t||0)<=((null===(r=e.calculatedEntitlement)||void 0===r?void 0:r.usageLimit)||0)?{hasAccess:!0}:{hasAccess:!1,accessDeniedReason:H.RequestedUsageExceedsLimit}}},e}(),Za=function(){function e(e,t,n){this.entitlementsApi=e,this.customerId=t,this.loggerService=n}return e.prototype.reportEntitlementCheckRequested=function(e,t,n){return r=this,i=void 0,a=function(){var r=this;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){return this.entitlementsApi.reportEntitlementRequested(e,this.customerId,t,n).then((function(){r.loggerService.debug("Successfully reported entitlement check requested")}),(function(e){r.loggerService.error("Failed to report entitlement check requested",e)})),[2]}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{u(a.next(e))}catch(e){t(e)}}function s(e){try{u(a.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a},e}(),es=function(){return es=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},es.apply(this,arguments)},ts=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ns=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},rs=function(){function e(e,t,n,r,i){this.customerId=e,this.cacheService=t,this.modelMapper=new Ht,this.loadingEntitlements=null,this.entitlementsApi=new Ka(n),this.entitlementCheckReportingService=new Za(new Ka(r),e,i),this.entitlementsPollingObserver=null}return e.prototype.startPolling=function(e){var t=this;this.entitlementsPollingObserver=this.entitlementsApi.pollEntitlements(this.customerId,e),this.entitlementsPollingObserver.subscribe((function(e){!e.errors&&e.data&&e.data.entitlements?t.storeFetchedEntitlementsInCache(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return ts(this,void 0,void 0,(function(){return ns(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e,t){var n=this.cacheService.getEntitlement(e),r=Xa.decideEntitlementPolicy(n);if((null==n?void 0:n.calculatedEntitlement.feature)&&n.calculatedEntitlement.feature.featureType!==J.Boolean)return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,this.modelMapper.mapFallbackBooleanEntitlementResult(t,r)),t;if(!n){var i=this.modelMapper.mapEntitlementResult(r);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,i),es(es({},r),{isFallback:!1})}var o=this.modelMapper.mapEntitlementResult(r,n);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,o),this.modelMapper.mapBooleanEntitlement(n,r)},e.prototype.getNumericEntitlement=function(e,t){var n,r=this.cacheService.getEntitlement(e),i=Xa.decideEntitlementPolicy(r);if((null==r?void 0:r.calculatedEntitlement.feature)&&(null===(n=r.calculatedEntitlement.feature)||void 0===n?void 0:n.featureType)!==J.Numeric){var o=this.modelMapper.mapFallbackNumericEntitlementResult(t,i);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,o),t}if(!r){var a=this.modelMapper.mapEntitlementResult(i);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,a),es(es({},i),{isFallback:!1,isUnlimited:!1})}var s=this.modelMapper.mapEntitlementResult(i,r);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,s),this.modelMapper.mapNumericEntitlement(r,i)},e.prototype.getMeteredEntitlement=function(e,t,n){var r,i,o=this.cacheService.getEntitlement(e),a=Xa.decideEntitlementPolicy(o,null==n?void 0:n.requestedUsage);if((null==o?void 0:o.calculatedEntitlement.feature)&&(null===(r=o.calculatedEntitlement.feature)||void 0===r?void 0:r.meterType)!==X.Fluctuating&&(null===(i=o.calculatedEntitlement.feature)||void 0===i?void 0:i.meterType)!==X.Incremental){var s=this.modelMapper.mapFallbackMeteredEntitlementResult(t,a,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,s),t}if(!o){var u=this.modelMapper.mapEntitlementResult(a,void 0,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,u),es(es({},a),{currentUsage:0,isFallback:!1,isUnlimited:!1,requestedUsage:(null==n?void 0:n.requestedUsage)||0})}var c=this.modelMapper.mapEntitlementResult(a,o,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,c),this.modelMapper.mapMeteredEntitlement(o,a,null==n?void 0:n.requestedUsage)},e.prototype.loadEntitlements=function(){return ts(this,void 0,void 0,(function(){var e;return ns(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.loadEntitlementsFromRemote()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.loadEntitlementsFromRemote=function(){return ts(this,void 0,void 0,(function(){var e;return ns(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent(),this.storeFetchedEntitlementsInCache(e.data.entitlements),[2]}}))}))},e.prototype.storeFetchedEntitlementsInCache=function(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)},e.prototype.getEntitlements=function(){return ts(this,void 0,void 0,(function(){var e=this;return ns(this,(function(t){switch(t.label){case 0:return this.cacheService.isLoaded?[3,2]:[4,this.loadEntitlements()];case 1:t.sent(),t.label=2;case 2:return[2,Array.from(this.cacheService.getEntitlements().values()).map((function(t){var n=Xa.decideEntitlementPolicy(t);return e.modelMapper.mapEntitlement(t,n)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),is=function(){return is=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},is.apply(this,arguments)},os=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},as=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},ss=function(){function e(e,t){this.modelMapper=new Ht,this.configuration=e,this.graphClient=function(e){var t=e.apiKey,n=e.baseUri,r=Ba(t),i=function(e){return new Cr({uri:"".concat(e,"/graphql"),fetch:Ma()})}(n);return new Bo({link:r.concat(i),cache:new Ca({possibleTypes:Fa.g}),name:"js-client-sdk",version:Va.version})}(this.configuration),this.batchedGraphClient=function(e){var t=e.apiKey,n=e.baseUri,r=Ba(t),i=function(e){return new Ua({uri:"".concat(e,"/graphql"),batchMax:25,batchInterval:500,fetch:Ma()})}(n);return new Bo({link:r.concat(i),cache:new Ca({possibleTypes:Fa.g}),name:"js-client-sdk",version:Va.version})}(this.configuration),this.loggerService=t,this.apiGateway=new qt(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return os(this,void 0,void 0,(function(){var n,i,o,a,s;return as(this,(function(u){switch(u.label){case 0:n=function(e){var t={baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4,logConfiguration:{logger:console,logLevel:r.ERROR}};return Qt()(t,e)}(t),i=new ee(n.logConfiguration.logger,n.logConfiguration.logLevel),u.label=1;case 1:return u.trys.push([1,4,,5]),o=function(e,t){var n=!0;return Vt()(e.apiKey)&&(t.error("You must configure the client with an SDK key"),n=!1),e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3&&(t.error("Entitlements polling interval cannot be lower than 5000ms"),n=!1),n}(n,i),o?(a=new e(n,i),t.customerId?[4,a.setCustomerId(t.customerId)]:[3,3]):[2,null];case 2:u.sent(),u.label=3;case 3:return[2,a];case 4:return s=u.sent(),i.error("Failed to initialize api ".concat(s)),[2,null];case 5:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return os(this,void 0,void 0,(function(){return as(this,(function(n){switch(n.label){case 0:return null===(t=this.entitlementsService)||void 0===t||t.stopPolling(),this.configuration.customerId=e,this.entitlementsService=new rs(e,new Qa,this.graphClient,this.batchedGraphClient,this.loggerService),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return os(this,void 0,void 0,(function(){return as(this,(function(t){switch(t.label){case 0:return[4,null===(e=this.entitlementsService)||void 0===e?void 0:e.refresh()];case 1:return t.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},te),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getBooleanEntitlement(t,r):r}catch(e){return this.loggerService.error("Failed to get boolean entitlement",e),r}},e.prototype.getNumericEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},ne),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getNumericEntitlement(t,r):r}catch(e){return this.loggerService.error("Failed to get numeric entitlement",e),r}},e.prototype.getMeteredEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},re),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getMeteredEntitlement(t,r,n):r}catch(e){return this.loggerService.error("Failed to get metered entitlement",e),r}},e.prototype.getPaywall=function(e){var t=(void 0===e?{}:e).productId;return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(n){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e;return as(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(t)];case 1:return e=n.sent(),[2,this.modelMapper.mapPlans(e.data)]}}))}))}),(function(e){return"Failed to get paywall ".concat(e)}))]}))}))},e.prototype.getCustomer=function(){return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(t){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e,t,n;return as(this,(function(r){switch(r.label){case 0:return e=zt(this.configuration),[4,this.apiGateway.customers.getCustomer(e)];case 1:return t=r.sent(),n=t.data.customers.edges[0].node,[2,this.modelMapper.mapCustomer(n)]}}))}))}),(function(e){return"Failed to get customer ".concat(e)}))]}))}))},e.prototype.getEntitlements=function(){return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(t){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e;return as(this,(function(t){return zt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))}),(function(e){return"Failed to get entitlements ".concat(e)}))]}))}))},e.prototype.withErrorHandling=function(e,t){try{return e()}catch(e){var n=t?t(e):"Operation failed ".concat(e);throw new Error(n)}},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.26.1","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","generate":"graphql-codegen && yarn run fix:lint","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","cross-fetch":"^3.1.4","graphql":"^16.0.1","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@graphql-codegen/cli":"^2.3.0","@graphql-codegen/fragment-matcher":"^3.2.1","@graphql-codegen/schema-ast":"^2.4.0","@graphql-codegen/typescript":"^2.4.0","@graphql-codegen/typescript-operations":"^2.2.0","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(8413)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Stigg",[],t):"object"==typeof exports?exports.Stigg=t():e.Stigg=t()}(self,(function(){return(()=>{var e={4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=l(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];_.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new _(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,e.fetch||(e.fetch=O,e.Headers=p,e.Request=b,e.Response=_),t.Headers=p,t.Request=b,t.Response=_,t.fetch=O,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8407:(e,t,n)=>{var r=n(7040),i=n(4125),o=n(2117),a=n(7529),s=n(4705);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},7071:(e,t,n)=>{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},3818:(e,t,n)=>{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},6384:(e,t,n)=>{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},4636:(e,t,n)=>{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],y=h.length;for(var v in e)!t&&!c.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||h.push(v);return h}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2908:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},4140:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1078:(e,t,n)=>{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var u=-1,c=t.length;for(o||(o=i),s||(s=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},8866:(e,t,n)=>{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(1299),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},1299:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,v,m){var g=u(e),b=u(t),E=g?p:s(e),_=b?p:s(t),w=(E=E==f?d:E)==d,O=(_=_==f?d:_)==d,T=E==_;if(T&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(T&&!w)return m||(m=new r),g||l(e)?i(e,t,n,y,v,m):o(e,t,E,n,y,v,m);if(!(1&n)){var x=w&&h.call(e,"__wrapped__"),I=O&&h.call(t,"__wrapped__");if(x||I){var S=x?e.value():e,k=I?t.value():t;return m||(m=new r),v(S,k,n,y,m)}}return!!T&&(m||(m=new r),a(e,t,n,y,v,m))}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(o)var h=o(f,p,l,e,t,d);if(!(void 0===h?i(p,f,3,o,d):h))return!1}}return!0}},2722:e=>{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},9199:(e,t,n)=>{var r=n(4140),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),u=n(2634),c=n(327);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),u=n(1704),c=n(6390);e.exports=function e(t,n,l,f,p){t!==n&&o(n,(function(o,u){if(p||(p=new r),s(o))a(t,n,u,l,e,f,p);else{var d=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===d&&(d=o),i(t,u,d)}}),u)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),u=n(5694),c=n(1469),l=n(9246),f=n(4144),p=n(3560),d=n(3218),h=n(8630),y=n(6719),v=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,E,_){var w=v(e,n),O=v(t,n),T=_.get(O);if(T)r(e,n,T);else{var x=E?E(w,O,n+"",e,t,_):void 0,I=void 0===x;if(I){var S=c(O),k=!S&&f(O),D=!S&&!k&&y(O);x=O,S||k||D?c(w)?x=w:l(w)?x=a(w):k?(I=!1,x=i(O,!0)):D?(I=!1,x=o(O,!0)):x=[]:h(O)||u(O)?(x=w,u(w)?x=m(w):d(w)&&!p(w)||(x=s(O))):I=!1}I&&(_.set(O,x),b(x,O,g,E,_),_.delete(O)),r(e,n,x)}}},2689:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),u=n(7518),c=n(5022),l=n(6557),f=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var p=-1;t=r(t,u(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(d,(function(e,t){return c(e,t,n)}))}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},6560:(e,t,n)=>{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:(e,t,n)=>{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},7415:(e,t,n)=>{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,l=r(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},5022:(e,t,n)=>{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:(e,t,n)=>{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?i(n,c,l):r(n,c,l)}return n}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},9291:(e,t,n)=>{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e),d=u.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<l;){var m=e[h],g=t[h];if(a)var b=c?a(g,m,h,t,e,u):a(m,g,h,e,t,u);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,u)))return v.push(t)}))){y=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},8351:(e,t,n)=>{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var v=a(d(e),d(t),r,c,f,p);return p.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:i.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var m=e[p=c[f]],g=t[p];if(o)var b=u?o(g,m,p,t,e,s):o(m,g,p,e,t,s);if(!(void 0===b?m===g||a(m,g,n,o,s):b)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var E=e.constructor,_=t.constructor;E==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof _&&_ instanceof _||(y=!1)}return s.delete(e),s.delete(t),y}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=c(r),v=c(i),m=c(o),g=c(a),b=c(s),E=u;(r&&E(new r(new ArrayBuffer(1)))!=h||i&&E(new i)!=l||o&&E(o.resolve())!=f||a&&E(new a)!=p||s&&E(new s)!=d)&&(E=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return h;case v:return l;case m:return f;case g:return p;case b:return d}return t}),e.exports=E},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),u=n(327);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(o(e)||i(e))}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6612:(e,t,n)=>{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(u),r(e,this,c)}}},5639:(e,t,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},4721:(e,t,n)=>{var r=n(2118),i=n(8612),o=n(7037),a=n(554),s=n(2628),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),o(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),u=n(4144),c=n(5726),l=n(6719),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(7518),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},2492:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},9734:(e,t,n)=>{var r=n(1078),i=n(2689),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9881:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},8413:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedReason:()=>H,BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT:()=>te,BillingModel:()=>l,BillingPeriod:()=>f,Currency:()=>d,CustomerModel:()=>ie,EntitlementResetPeriod:()=>Z,FeatureType:()=>J,LogLevel:()=>r,METERED_DEFAULT_FALLBACK_ENTITLEMENT:()=>re,MeterType:()=>X,NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT:()=>ne,PromotionalEntitlementStatus:()=>M,SubscriptionStatus:()=>W,TrialPeriodUnits:()=>G,default:()=>ss});var r,i=n(4721),o=n.n(i);!function(e){e.ALL="ALL",e.NONE="NONE",e.LOG="LOG",e.ERROR="ERROR"}(r||(r={}));var a,s,u,c,l,f,p,d,h,y,v,m,g,b,E,_,w,O,T,x,I,S,k,D,A,N,R,P,C,F,j,M,L,q,U,V,B,Q,z,W,G,K,$,Y,H,J,X,Z,ee=function(){function e(e,t){this.logger=e,this.logLevel=t}return e.prototype.error=function(e,t){this.logLevel!==r.NONE&&this.logger.error(e,t||{})},e.prototype.log=function(e,t){o()([r.ERROR,r.NONE],this.logLevel)||this.logger.log(e,t||{})},e.prototype.debug=function(e,t){o()([r.LOG,r.ALL],this.logLevel)&&this.logger.debug(e,t||{})},e}();!function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(a||(a={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(s||(s={})),function(e){e.Id="id"}(u||(u={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(c||(c={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(l||(l={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(f||(f={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(p||(p={})),function(e){e.Usd="USD"}(d||(d={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.CrmId="crmId",e.Email="email",e.EnvironmentId="environmentId",e.Id="id",e.Name="name",e.RefId="refId",e.UpdatedAt="updatedAt"}(h||(h={})),function(e){e.BillingId="billingId",e.CrmId="crmId",e.EndDate="endDate",e.EnvironmentId="environmentId",e.Id="id",e.RefId="refId",e.StartDate="startDate",e.Status="status"}(y||(y={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(v||(v={})),function(e){e.DisplayName="displayName",e.Id="id"}(m||(m={})),function(e){e.AddonNotFound="AddonNotFound",e.CheckoutIsNotSupported="CheckoutIsNotSupported",e.CustomerNotFound="CustomerNotFound",e.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",e.EnvironmentMissing="EnvironmentMissing",e.FeatureNotFound="FeatureNotFound",e.IdentityForbidden="IdentityForbidden",e.IntegrityViolation="IntegrityViolation",e.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",e.InvalidMemberDelete="InvalidMemberDelete",e.InvalidUsageValueForIncrementalFeatureError="InvalidUsageValueForIncrementalFeatureError",e.MemberInvitationError="MemberInvitationError",e.MemberNotFound="MemberNotFound",e.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.PackageAlreadyPublished="PackageAlreadyPublished",e.PlanAlreadyExtended="PlanAlreadyExtended",e.PlanNotFound="PlanNotFound",e.PlansCircularDependencyError="PlansCircularDependencyError",e.PriceNotFound="PriceNotFound",e.SubscriptionNotFound="SubscriptionNotFound",e.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(g||(g={})),function(e){e.AddonCreated="ADDON_CREATED",e.AddonDeleted="ADDON_DELETED",e.AddonUpdated="ADDON_UPDATED",e.CustomerCreated="CUSTOMER_CREATED",e.CustomerDeleted="CUSTOMER_DELETED",e.CustomerUpdated="CUSTOMER_UPDATED",e.EntitlementDenied="ENTITLEMENT_DENIED",e.EntitlementGranted="ENTITLEMENT_GRANTED",e.EntitlementRequested="ENTITLEMENT_REQUESTED",e.FeatureCreated="FEATURE_CREATED",e.FeatureDeleted="FEATURE_DELETED",e.FeatureUpdated="FEATURE_UPDATED",e.MeasurementReported="MEASUREMENT_REPORTED",e.PackagePublished="PACKAGE_PUBLISHED",e.PlanCreated="PLAN_CREATED",e.PlanDeleted="PLAN_DELETED",e.PlanUpdated="PLAN_UPDATED",e.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",e.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",e.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",e.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",e.SubscriptionCanceled="SUBSCRIPTION_CANCELED",e.SubscriptionCreated="SUBSCRIPTION_CREATED",e.SubscriptionExpired="SUBSCRIPTION_EXPIRED",e.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",e.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",e.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",e.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",e.SubscriptionUpdated="SUBSCRIPTION_UPDATED"}(b||(b={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.FeatureStatus="featureStatus",e.FeatureType="featureType",e.Id="id",e.MeterType="meterType",e.RefId="refId",e.UpdatedAt="updatedAt"}(E||(E={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(_||(_={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(w||(w={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(O||(O={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(T||(T={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(x||(x={})),function(e){e.Id="id"}(I||(I={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(S||(S={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(k||(k={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(D||(D={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(A||(A={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(N||(N={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(R||(R={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(P||(P={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsDefaultProduct="isDefaultProduct",e.RefId="refId",e.UpdatedAt="updatedAt"}(C||(C={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(F||(F={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(j||(j={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(M||(M={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(L||(L={})),function(e){e.Asc="ASC",e.Desc="DESC"}(q||(q={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(U||(U={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(V||(V={})),function(e){e.EndOfBillingPeriod="END_OF_BILLING_PERIOD",e.Immediate="IMMEDIATE"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE"}(Q||(Q={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(z||(z={})),function(e){e.Active="ACTIVE",e.Canceled="CANCELED",e.Expired="EXPIRED",e.InTrial="IN_TRIAL",e.NotStarted="NOT_STARTED"}(W||(W={})),function(e){e.Day="DAY",e.Month="MONTH"}(G||(G={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(K||(K={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}($||($={})),function(e){e.EveryFriday="EveryFriday",e.EveryMonday="EveryMonday",e.EverySaturday="EverySaturday",e.EverySunday="EverySunday",e.EveryThursday="EveryThursday",e.EveryTuesday="EveryTuesday",e.EveryWednesday="EveryWednesday",e.SubscriptionStart="SubscriptionStart"}(Y||(Y={})),function(e){e.InvalidFeatureType="InvalidFeatureType",e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscriptions="NoActiveSubscriptions",e.CustomerNotEntitledForFeature="CustomerNotEntitledForFeature",e.RequestedUsageExceedsLimit="RequestedUsageExceedsLimit",e.Unknown="Unknown"}(H||(H={})),function(e){e.Boolean="Boolean",e.Numeric="Numeric"}(J||(J={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(X||(X={})),function(e){e.Daily="Daily",e.Hourly="Hourly",e.Monthly="Monthly",e.Weekly="Weekly"}(Z||(Z={}));var te={isFallback:!0,hasAccess:!1,accessDeniedReason:H.Unknown},ne={isFallback:!0,hasAccess:!1,isUnlimited:!1,accessDeniedReason:H.Unknown},re={isFallback:!0,hasAccess:!1,isUnlimited:!1,currentUsage:0,requestedUsage:1,accessDeniedReason:H.Unknown},ie=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===W.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===W.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===M.Active}))},e}(),oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function ce(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function le(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function fe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pe(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const de=/\r\n|[\n\r]/g;function he(e,t){let n=0,r=1;for(const i of e.body.matchAll(de)){if("number"==typeof i.index||pe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ye(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,n=[];for(let e=0;e<f.length;e+=80)n.push(f.slice(e,e+80));return c+ve([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ve([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ve(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class me extends Error{constructor(e,t,n,r,i,o,a){var s,u,c;super(e),this.name="GraphQLError",this.path=null!=i?i:void 0,this.originalError=null!=o?o:void 0,this.nodes=ge(Array.isArray(t)?t:t?[t]:void 0);const l=ge(null===(s=this.nodes)||void 0===s?void 0:s.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=n?n:null==l||null===(u=l[0])||void 0===u?void 0:u.source,this.positions=null!=r?r:null==l?void 0:l.map((e=>e.start)),this.locations=r&&n?r.map((e=>he(n,e))):null==l?void 0:l.map((e=>he(e.source,e.start)));const f="object"==typeof(p=null==o?void 0:o.extensions)&&null!==p?null==o?void 0:o.extensions:void 0;var p;this.extensions=null!==(c=null!=a?a:f)&&void 0!==c?c:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,me):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+="\n\n"+ye((t=n.loc).source,he(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ye(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ge(e){return void 0===e||0===e.length?void 0:e}function be(e,t,n){return new me(`Syntax Error: ${n}`,void 0,e,[t])}let Ee;var _e;(_e=Ee||(Ee={})).NAME="Name",_e.DOCUMENT="Document",_e.OPERATION_DEFINITION="OperationDefinition",_e.VARIABLE_DEFINITION="VariableDefinition",_e.SELECTION_SET="SelectionSet",_e.FIELD="Field",_e.ARGUMENT="Argument",_e.FRAGMENT_SPREAD="FragmentSpread",_e.INLINE_FRAGMENT="InlineFragment",_e.FRAGMENT_DEFINITION="FragmentDefinition",_e.VARIABLE="Variable",_e.INT="IntValue",_e.FLOAT="FloatValue",_e.STRING="StringValue",_e.BOOLEAN="BooleanValue",_e.NULL="NullValue",_e.ENUM="EnumValue",_e.LIST="ListValue",_e.OBJECT="ObjectValue",_e.OBJECT_FIELD="ObjectField",_e.DIRECTIVE="Directive",_e.NAMED_TYPE="NamedType",_e.LIST_TYPE="ListType",_e.NON_NULL_TYPE="NonNullType",_e.SCHEMA_DEFINITION="SchemaDefinition",_e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",_e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",_e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",_e.FIELD_DEFINITION="FieldDefinition",_e.INPUT_VALUE_DEFINITION="InputValueDefinition",_e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",_e.UNION_TYPE_DEFINITION="UnionTypeDefinition",_e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",_e.ENUM_VALUE_DEFINITION="EnumValueDefinition",_e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",_e.DIRECTIVE_DEFINITION="DirectiveDefinition",_e.SCHEMA_EXTENSION="SchemaExtension",_e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",_e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",_e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",_e.UNION_TYPE_EXTENSION="UnionTypeExtension",_e.ENUM_TYPE_EXTENSION="EnumTypeExtension",_e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class we{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Oe{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Te={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},xe=new Set(Object.keys(Te));function Ie(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&xe.has(t)}let Se,ke;var De;function Ae(e){return Ne(e,[])}function Ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Ne(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Ne(e[r],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Ne(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Re(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Se||(Se={})),(De=ke||(ke={})).SOF="<SOF>",De.EOF="<EOF>",De.BANG="!",De.DOLLAR="$",De.AMP="&",De.PAREN_L="(",De.PAREN_R=")",De.SPREAD="...",De.COLON=":",De.EQUALS="=",De.AT="@",De.BRACKET_L="[",De.BRACKET_R="]",De.BRACE_L="{",De.PIPE="|",De.BRACE_R="}",De.NAME="Name",De.INT="Int",De.FLOAT="Float",De.STRING="String",De.BLOCK_STRING="BlockString",De.COMMENT="Comment";class Pe{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Re(!1,`Body must be a string. Received: ${Ae(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Ce;function Fe(e){const t=e.split(/\r\n|[\n\r]/g),n=function(e){var t;let n=!0,r=!0,i=0,o=null;for(let t=0;t<e.length;++t)switch(e.charCodeAt(t)){case 13:10===e.charCodeAt(t+1)&&++t;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(let e=1;e<t.length;e++)t[e]=t[e].slice(n);let r=0;for(;r<t.length&&je(t[r]);)++r;let i=t.length;for(;i>r&&je(t[i-1]);)--i;return t.slice(r,i).join("\n")}function je(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function Me(e){return e>=48&&e<=57}function Le(e){return e>=97&&e<=122||e>=65&&e<=90}function qe(e){return Le(e)||95===e}!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Ce||(Ce={}));class Ue{constructor(e){const t=new Oe(ke.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==ke.EOF)do{if(e.next)e=e.next;else{const t=Ke(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===ke.COMMENT);return e}}function Ve(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Be(e,t){return Qe(e.charCodeAt(t))&&ze(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function ze(e){return e>=56320&&e<=57343}function We(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return ke.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ge(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new Oe(t,n,r,o,a,i)}function Ke(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return $e(e,i);case 33:return Ge(e,ke.BANG,i,i+1);case 36:return Ge(e,ke.DOLLAR,i,i+1);case 38:return Ge(e,ke.AMP,i,i+1);case 40:return Ge(e,ke.PAREN_L,i,i+1);case 41:return Ge(e,ke.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return Ge(e,ke.SPREAD,i,i+3);break;case 58:return Ge(e,ke.COLON,i,i+1);case 61:return Ge(e,ke.EQUALS,i,i+1);case 64:return Ge(e,ke.AT,i,i+1);case 91:return Ge(e,ke.BRACKET_L,i,i+1);case 93:return Ge(e,ke.BRACKET_R,i,i+1);case 123:return Ge(e,ke.BRACE_L,i,i+1);case 124:return Ge(e,ke.PIPE,i,i+1);case 125:return Ge(e,ke.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?rt(e,i):Je(e,i)}if(Me(t)||45===t)return Ye(e,i,t);if(qe(t))return it(e,i);throw be(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ve(t)||Be(n,i)?`Unexpected character: ${We(e,i)}.`:`Invalid character: ${We(e,i)}.`)}return Ge(e,ke.EOF,r,r)}function $e(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(Ve(e))++i;else{if(!Be(n,i))break;i+=2}}return Ge(e,ke.COMMENT,t,i,n.slice(t+1,i))}function Ye(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),Me(o))throw be(e.source,i,`Invalid number, unexpected digit after 0: ${We(e,i)}.`)}else i=He(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=He(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=He(e,i,o),o=r.charCodeAt(i)),46===o||qe(o))throw be(e.source,i,`Invalid number, expected digit but got: ${We(e,i)}.`);return Ge(e,a?ke.FLOAT:ke.INT,t,i,r.slice(t,i))}function He(e,t,n){if(!Me(n))throw be(e.source,t,`Invalid number, expected digit but got: ${We(e,t)}.`);const r=e.source.body;let i=t+1;for(;Me(r.charCodeAt(i));)++i;return i}function Je(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return a+=n.slice(o,i),Ge(e,ke.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Ve(r))++i;else{if(!Be(n,i))throw be(e.source,i,`Invalid character within String: ${We(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xe(e,i):Ze(e,i):nt(e,i);a+=t.value,i+=t.size,o=i}}throw be(e.source,i,"Unterminated string.")}function Xe(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!Ve(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|tt(e),r<0)break}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ze(e,t){const n=e.source.body,r=et(n,t+2);if(Ve(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=et(n,t+8);if(ze(e))return{value:String.fromCodePoint(r,e),size:12}}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function et(e,t){return tt(e.charCodeAt(t))<<12|tt(e.charCodeAt(t+1))<<8|tt(e.charCodeAt(t+2))<<4|tt(e.charCodeAt(t+3))}function tt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nt(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw be(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function rt(e,t){const n=e.source.body,r=n.length,i=e.line,o=1+t-e.lineStart;let a=t+3,s=a,u="";for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2))return u+=n.slice(s,a),new Oe(ke.BLOCK_STRING,t,a+3,i,o,Fe(u));if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(Ve(r))++a;else{if(!Be(n,a))throw be(e.source,a,`Invalid character within String: ${We(e,a)}.`);a+=2}else 13===r&&10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;else u+=n.slice(s,a)+'"""',a+=4,s=a}throw be(e.source,a,"Unterminated string.")}function it(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Le(o=n.charCodeAt(i))||Me(o)||95===o);)++i;var o;return Ge(e,ke.NAME,t,i,n.slice(t,i))}class ot{constructor(e,t){const n=function(e){return e instanceof Pe}(e)?e:new Pe(e);this._lexer=new Ue(n),this._options=t}parseName(){const e=this.expectToken(ke.NAME);return this.node(e,{kind:Ee.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ee.DOCUMENT,definitions:this.many(ke.SOF,this.parseDefinition,ke.EOF)})}parseDefinition(){if(this.peek(ke.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===ke.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw be(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(ke.BRACE_L))return this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:Se.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(ke.NAME)&&(n=this.parseName()),this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(ke.NAME);switch(e.value){case"query":return Se.QUERY;case"mutation":return Se.MUTATION;case"subscription":return Se.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ke.PAREN_L,this.parseVariableDefinition,ke.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ke.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ke.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(ke.DOLLAR),this.node(e,{kind:Ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ee.SELECTION_SET,selections:this.many(ke.BRACE_L,this.parseSelection,ke.BRACE_R)})}parseSelection(){return this.peek(ke.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(ke.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:Ee.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ke.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ke.PAREN_L,t,ke.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(ke.COLON),this.node(t,{kind:Ee.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(ke.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(ke.NAME)?this.node(e,{kind:Ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ee.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case ke.BRACKET_L:return this.parseList(e);case ke.BRACE_L:return this.parseObject(e);case ke.INT:return this._lexer.advance(),this.node(t,{kind:Ee.INT,value:t.value});case ke.FLOAT:return this._lexer.advance(),this.node(t,{kind:Ee.FLOAT,value:t.value});case ke.STRING:case ke.BLOCK_STRING:return this.parseStringLiteral();case ke.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:Ee.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Ee.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Ee.NULL});default:return this.node(t,{kind:Ee.ENUM,value:t.value})}case ke.DOLLAR:if(e){if(this.expectToken(ke.DOLLAR),this._lexer.token.kind===ke.NAME){const e=this._lexer.token.value;throw be(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable()}throw this.unexpected()}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:Ee.STRING,value:e.value,block:e.kind===ke.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Ee.LIST,values:this.any(ke.BRACKET_L,(()=>this.parseValueLiteral(e)),ke.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Ee.OBJECT,fields:this.any(ke.BRACE_L,(()=>this.parseObjectField(e)),ke.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(ke.COLON),this.node(t,{kind:Ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(ke.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(ke.AT),this.node(t,{kind:Ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(ke.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(ke.BRACKET_R),t=this.node(e,{kind:Ee.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(ke.BANG)?this.node(e,{kind:Ee.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ke.STRING)||this.peek(ke.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(ke.BRACE_L,this.parseOperationTypeDefinition,ke.BRACE_R);return this.node(e,{kind:Ee.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(ke.COLON);const n=this.parseNamedType();return this.node(e,{kind:Ee.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ke.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ke.BRACE_L,this.parseFieldDefinition,ke.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ke.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Ee.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(ke.PAREN_L,this.parseInputValueDef,ke.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(ke.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(ke.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Ee.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Ee.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ke.EQUALS)?this.delimitedMany(ke.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Ee.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ke.BRACE_L,this.parseEnumValueDefinition,ke.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw be(this._lexer.source,this._lexer.token.start,`${at(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ke.BRACE_L,this.parseInputValueDef,ke.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===ke.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(ke.BRACE_L,this.parseOperationTypeDefinition,ke.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ke.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ee.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(ke.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Ce,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new we(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw be(this._lexer.source,t.start,`Expected ${st(e)}, found ${at(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==ke.NAME||t.value!==e)throw be(this._lexer.source,t.start,`Expected "${e}", found ${at(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===ke.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return be(this._lexer.source,t.start,`Unexpected ${at(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function at(e){const t=e.value;return st(e.kind)+(null!=t?` "${t}"`:"")}function st(e){return function(e){return e===ke.BANG||e===ke.DOLLAR||e===ke.AMP||e===ke.PAREN_L||e===ke.PAREN_R||e===ke.SPREAD||e===ke.COLON||e===ke.EQUALS||e===ke.AT||e===ke.BRACKET_L||e===ke.BRACKET_R||e===ke.BRACE_L||e===ke.PIPE||e===ke.BRACE_R}(e)?`"${e}"`:e}var ut=new Map,ct=new Map,lt=!0,ft=!1;function pt(e){return e.replace(/[\s,]+/g," ").trim()}function dt(e){var t,n,r,i=pt(e);if(!ut.has(i)){var o=function(e,t){return new ot(e,t).parseDocument()}(e,{experimentalFragmentVariables:ft,allowLegacyFragmentVariables:ft});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ut.set(i,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=o,n=new Set,r=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=pt((a=e.loc).source.body.substring(a.start,a.end)),o=ct.get(t);o&&!o.has(i)?lt&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||ct.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),se(se({},t),{definitions:r}))))}return ut.get(i)}function ht(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),dt(r)}var yt,vt=ht;(yt=ht||(ht={})).gql=vt,yt.resetCaches=function(){ut.clear(),ct.clear()},yt.disableFragmentWarnings=function(){lt=!1},yt.enableExperimentalFragmentVariables=function(){ft=!0},yt.disableExperimentalFragmentVariables=function(){ft=!1},ht.default=ht;var mt,gt,bt,Et=ht(mt||(gt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],bt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],Object.defineProperty?Object.defineProperty(gt,"raw",{value:bt}):gt.raw=bt,mt=gt)),_t=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},wt=ht(It||(It=_t(["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Ot=ht(St||(St=_t(["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"],["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"]))),Tt=ht(kt||(kt=_t(["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"],["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"])),wt,Et,Ot);const xt=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:ht(Dt||(Dt=_t(["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "],["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "])),Tt),fetchPolicy:"network-only",variables:{paging:{first:50},filter:{status:{eq:N.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:R.RefId,direction:q.Asc}]}})},e}();var It,St,kt,Dt,At=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Nt=ht(Ft||(Ft=At(["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"],["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"])),Et),Rt=ht(jt||(jt=At(["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Pt=ht(Mt||(Mt=At(["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"],["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"])),Nt,Rt);const Ct=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:ht(Lt||(Lt=At(["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "],["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "])),Pt),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var Ft,jt,Mt,Lt;const qt=function(e){this.paywall=new xt(e),this.customers=new Ct(e)};var Ut=n(1609),Vt=n.n(Ut),Bt=n(2492),Qt=n.n(Bt);function zt(e){var t=e.customerId;if(!t||Vt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Wt=n(5161),Gt=n.n(Wt),Kt=n(9734),$t=n.n(Kt),Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yt.apply(this,arguments)},Ht=function(){function e(){this.getResetPeriodData=function(e,t){switch(e){case Z.Monthly:return{monthlyResetPeriodConfiguration:{accordingTo:t.monthlyAccordingTo||D.SubscriptionStart}};case Z.Weekly:return{weeklyResetPeriodConfiguration:{accordingTo:t.weeklyAccordingTo||Y.EveryFriday}};default:return{}}}}return e.prototype.mapBooleanEntitlement=function(e,t){return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapNumericEntitlement=function(e,t){var n=e.calculatedEntitlement,r=n.hasUnlimitedUsage,i=n.usageLimit;return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:r,value:i||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapMeteredEntitlement=function(e,t,n){var r=e.calculatedEntitlement,i=r.hasUnlimitedUsage,o=r.usageLimit,a=r.feature,s=e.featureUsage,u=s.currentUsage,c=s.nextResetDate,l=s.resetPeriod,f=null;return a&&a.featureType===J.Numeric&&a.meterType===k.Incremental&&l&&(f={nextResetDate:c,resetPeriod:l}),{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:i,usageLimit:o||void 0,currentUsage:u,requestedUsage:n||0,resetSettings:f||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{meterType:e.calculatedEntitlement.feature.meterType||void 0,isMetered:!0}):void 0}},e.prototype.mapEntitlement=function(e,t,n){var r=e.calculatedEntitlement;if(!r.feature)return this.mapBooleanEntitlement(e,t);var i=r.feature,o=i.featureType,a=i.meterType,s=o===J.Numeric&&(a===k.Incremental||a===k.Fluctuating);switch(o){case J.Boolean:return this.mapBooleanEntitlement(e,t);case J.Numeric:return s?this.mapMeteredEntitlement(e,t,n):this.mapNumericEntitlement(e,t)}},e.prototype.mapFeatureType=function(e){switch(e){case w.Boolean:return J.Boolean;case w.Number:return J.Numeric}},e.prototype.mapEntitlementResetPeriod=function(e){switch(e){case v.Day:return Z.Daily;case v.Hour:return Z.Hourly;case v.Week:return Z.Weekly;case v.Month:return Z.Monthly}},e.prototype.mapApiEntitlementResetPeriod=function(e){switch(e){case Z.Daily:return v.Day;case Z.Hourly:return v.Hour;case Z.Weekly:return v.Week;case Z.Monthly:return v.Month}},e.prototype.mapCachedEntitlement=function(e,t,n){var r;return e.feature&&(r={id:e.feature.refId,featureType:this.mapFeatureType(e.feature.featureType),meterType:e.feature.meterType||void 0,units:e.feature.featureUnits||void 0,unitsPlural:e.feature.featureUnitsPlural||void 0,displayName:e.feature.displayName,description:e.feature.description||""}),{calculatedEntitlement:{usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,feature:r},featureUsage:{resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage||0,nextResetDate:n||e.nextResetDate}}},e.prototype.mapCachedEntitlements=function(e){var t=this;return new Map(e.map((function(e){var n;return[(null===(n=e.feature)||void 0===n?void 0:n.refId)||"",t.mapCachedEntitlement(e)]})))},e.prototype.mapPlans=function(e){var t=this,n=e.plans.edges.map((function(e){return e.node}));return this.sortPlans(n).map((function(e,n){return t.mapPlan(e,n)}))},e.prototype.mapCustomer=function(e){var t=this;return new ie({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:Gt()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:Gt()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPrice=function(e){var t=e.feature,n=e.price,r={pricingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,units:t.featureUnits,unitsPlural:t.featureUnitsPlural}),r},e.prototype.mapPlan=function(e,t){var n,r,i=this;return void 0===t&&(t=0),{id:e.refId,order:t,displayName:e.displayName,description:e.description,basePlan:e.basePlan?{id:e.basePlan.refId,displayName:e.basePlan.displayName}:void 0,entitlements:Gt()($t()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:Gt()($t()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),pricePoints:Gt()(e.prices,(function(e){return i.mapPrice(e)})),defaultTrialConfig:e.defaultTrialConfig,compatibleAddons:null!==(r=null===(n=e.compatibleAddons)||void 0===n?void 0:n.map((function(e){return i.mapAddon(e)})))&&void 0!==r?r:[],product:{id:e.product.refId,displayName:e.product.displayName}}},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,feature:{id:t.refId,featureType:this.mapFeatureType(t.featureType),description:t.description||"",meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,displayName:t.displayName,isMetered:t.meterType===k.Fluctuating||t.meterType===k.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,feature:{id:t.refId,displayName:t.displayName,description:t.description||"",featureType:this.mapFeatureType(t.featureType),meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,isMetered:t.meterType===k.Fluctuating||t.meterType===k.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,expiresAt:e.endDate,hasExpirationDate:!!e.endDate,isVisible:e.isVisible}},e.prototype.mapSubscription=function(e){var t,n=this,r=(e.prices||[])[0];return{id:e.refId,status:e.status,plan:this.mapPlan(e.plan),price:r?this.mapPrice(r.price):null,addons:(null===(t=e.addons)||void 0===t?void 0:t.map((function(e){var t=e.quantity,r=e.addon;return{quantity:t,addon:n.mapAddon(r)}})))||[],startDate:new Date(e.startDate),endDate:e.endDate&&new Date(e.endDate)}},e.prototype.mapAddon=function(e){var t=this;return{id:e.refId,displayName:e.displayName,description:e.description||"",entitlements:Gt()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=$t()(e.filter((function(e){return!e.basePlan})),(function(e){return e.refId})),n=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],t,!0);function r(e,t,n){var i=$t()(t.filter((function(t){var n;return(null===(n=t.basePlan)||void 0===n?void 0:n.refId)===e})),(function(e){return e.refId}));n.push.apply(n,i),n.length!==t.length&&i.forEach((function(e){return r(e.refId,t,n)}))}return t.forEach((function(t){return r(t.refId,e,n)})),n},e.prototype.mapAccessDeniedReason=function(e){switch(e){case H.InvalidFeatureType:return a.Unknown;case H.CustomerNotFound:return a.CustomerNotFound;case H.FeatureNotFound:return a.FeatureNotFound;case H.NoActiveSubscriptions:return a.NoActiveSubscription;case H.CustomerNotEntitledForFeature:return a.NoFeatureEntitlementInSubscription;case H.RequestedUsageExceedsLimit:return a.RequestedUsageExceedingLimit;case H.Unknown:return a.Unknown}},e.prototype.mapFallbackBooleanEntitlementResult=function(e,t){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0}},e.prototype.mapFallbackNumericEntitlementResult=function(e,t){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0,usageLimit:e.value,hasUnlimitedUsage:e.isUnlimited}},e.prototype.mapEntitlementResult=function(e,t,n){return Yt({hasAccess:e.hasAccess,accessDeniedReason:e.accessDeniedReason?this.mapAccessDeniedReason(e.accessDeniedReason):void 0,hasUnlimitedUsage:null==t?void 0:t.calculatedEntitlement.hasUnlimitedUsage,usageLimit:null==t?void 0:t.calculatedEntitlement.usageLimit,currentUsage:null==t?void 0:t.featureUsage.currentUsage,requestedUsage:n,nextResetDate:null==t?void 0:t.featureUsage.nextResetDate,resetPeriod:(null==t?void 0:t.featureUsage.resetPeriod)?this.mapApiEntitlementResetPeriod(t.featureUsage.resetPeriod):void 0},this.getResetPeriodData(null==t?void 0:t.featureUsage.resetPeriod,null==t?void 0:t.featureUsage.resetPeriodConfiguration))},e.prototype.mapFallbackMeteredEntitlementResult=function(e,t,n){return{hasAccess:e.hasAccess,accessDeniedReason:t.accessDeniedReason?this.mapAccessDeniedReason(t.accessDeniedReason):void 0,hasUnlimitedUsage:e.isUnlimited,usageLimit:e.usageLimit,requestedUsage:n}},e}(),Jt="Invariant Violation",Xt=Object.setPrototypeOf,Zt=void 0===Xt?function(e,t){return e.__proto__=t,e}:Xt,en=function(e){function t(n){void 0===n&&(n=Jt);var r=e.call(this,"number"==typeof n?Jt+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Jt,Zt(r,t.prototype),r}return ae(t,e),t}(Error);function tn(e,t){if(!e)throw new en(t)}var nn=["debug","log","warn","error","silent"],rn=nn.indexOf("log");function on(e){return function(){if(nn.indexOf(e)>=rn){var t=console[e]||console.log;return t.apply(console,arguments)}}}function an(e){try{return e()}catch(e){}}!function(e){e.debug=on("debug"),e.log=on("log"),e.warn=on("warn"),e.error=on("error")}(tn||(tn={}));const sn=an((function(){return globalThis}))||an((function(){return window}))||an((function(){return self}))||an((function(){return n.g}))||an((function(){return Function("return this")()}));var un="__",cn=[un,un].join("DEV");const ln=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(sn,cn,{value:"production"!==an((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),sn[cn]}}();function fn(e){try{return e()}catch(e){}}var pn=fn((function(){return globalThis}))||fn((function(){return window}))||fn((function(){return self}))||fn((function(){return n.g}))||fn((function(){return Function("return this")()})),dn=!1;function hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t,n){return t&&yn(e.prototype,t),n&&yn(e,n),e}!pn||fn((function(){return"production"}))||fn((function(){return process}))||(Object.defineProperty(pn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),dn=!0),dn&&(delete pn.process,dn=!1),__DEV__?tn("boolean"==typeof ln,ln):tn("boolean"==typeof ln,38);var mn=function(){return"function"==typeof Symbol},gn=function(e){return mn()&&Boolean(Symbol[e])},bn=function(e){return gn(e)?Symbol[e]:"@@"+e};mn()&&!gn("observable")&&(Symbol.observable=Symbol("observable"));var En=bn("iterator"),_n=bn("observable"),wn=bn("species");function On(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function Tn(e){var t=e.constructor;return void 0!==t&&null===(t=t[wn])&&(t=void 0),void 0!==t?t:Cn}function xn(e){return e instanceof Cn}function In(e){In.log?In.log(e):setTimeout((function(){throw e}))}function Sn(e){Promise.resolve().then((function(){try{e()}catch(e){In(e)}}))}function kn(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=On(t,"unsubscribe");n&&n.call(t)}}catch(e){In(e)}}function Dn(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function An(e,t,n){e._state="running";var r=e._observer;try{var i=On(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(Dn(e),!i)throw n;i.call(r,n);break;case"complete":Dn(e),i&&i.call(r)}}catch(e){In(e)}"closed"===e._state?kn(e):"running"===e._state&&(e._state="ready")}function Nn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void Sn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(An(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void An(e,t,n);e._queue.push({type:t,value:n})}}var Rn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new Pn(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(Dn(this),kn(this))},vn(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Pn=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){Nn(this._subscription,"next",e)},t.error=function(e){Nn(this._subscription,"error",e)},t.complete=function(){Nn(this._subscription,"complete")},vn(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Cn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Rn(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Tn(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[_n]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=On(t,_n);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return xn(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(gn("iterator")&&(r=On(t,En)))return new n((function(e){Sn((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){Sn((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){Sn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},vn(e,null,[{key:wn,get:function(){return this}}]),e}();function Fn(e){return null!==e&&"object"==typeof e}function jn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new en("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed."):new en(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?tn(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):tn(1===r.length,44),n=r[0].name.value),se(se({},e),{definitions:fe([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function Mn(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function Ln(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?tn(n,"No fragment named "+e.name.value+"."):tn(n,45),n;default:return null}}function qn(e){return{__ref:String(e)}}function Un(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Vn(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return Vn(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return Vn(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new en('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new en(54);e[t.value]=null}}mn()&&Object.defineProperty(Cn,Symbol("extensions"),{value:{symbol:_n,hostReportError:In},configurable:!0});var Bn=["connection","include","skip","client","rest","export"],Qn=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),n.connection.key+"("+zn(i)+")"}return n.connection.key}var o=e;if(t){var a=zn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Bn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+zn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=zn;return zn=e,t}}),zn=function(e){return JSON.stringify(e,Wn)};function Wn(e,t){return Fn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function Gn(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Vn(n,r,i,t)})),n}return null}function Kn(e){return e.alias?e.alias.value:e.name.value}function $n(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(Yn(o)){if("__typename"===o.name.value)return e[Kn(o)]}else{var a=$n(e,Ln(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Yn(e){return"Field"===e.kind}function Hn(e){return"InlineFragment"===e.kind}function Jn(e){__DEV__?tn(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn(e&&"Document"===e.kind,46);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new en('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new en(47);return e}));return __DEV__?tn(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):tn(t.length<=1,48),e}function Xn(e){return Jn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Zn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function er(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function tr(e){var t=Xn(e);return __DEV__?tn(t&&"query"===t.operation,"Must contain a query definition."):tn(t&&"query"===t.operation,49),t}function nr(e){var t;Jn(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new en("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new en(53)}function rr(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Vn(t,e.variable.name,e.defaultValue)})),t}function ir(e,t){return t?t(e):Cn.of()}function or(e){return"function"==typeof e?new ur(e):e}function ar(e){return e.request.length<=1}var sr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ae(t,e),t}(Error),ur=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Cn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(or).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=or(n),o=or(r||new e(ir));return ar(i)&&ar(o)?new e((function(e){return t(e)?i.request(e)||Cn.of():o.request(e)||Cn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Cn.of():o.request(e,n)||Cn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=se({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=se(se({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return se({},n)}}),t}(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?Zn(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new en("illegal argument: "+i):new en(26)}return e}(t))))||Cn.of()},e.concat=function(t,n){var r=or(t);if(ar(r))return __DEV__&&tn.warn(new sr("You are calling concat on a terminating link, which will have no effect",r)),r;var i=or(n);return ar(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Cn.of()}))||Cn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Cn.of()}))||Cn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(ir)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new en("request is not implemented"):new en(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();const cr=Object.freeze({});function lr(e,t,n=Te){const r=new Map;for(const e of Object.values(Ee))r.set(e,fr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],d=[];let h=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===d.length?void 0:p[p.length-1],o=s,s=d.pop(),g)if(u){o=o.slice();let e=0;for(const[t,n]of f){const r=t-e;null===n?(o.splice(r,1),e++):o[r]=n}}else{o=Object.defineProperties({},Object.getOwnPropertyDescriptors(o));for(const[e,t]of f)o[e]=t}l=i.index,c=i.keys,f=i.edits,u=i.inArray,i=i.prev}else{if(a=s?u?l:c[l]:void 0,o=s?s[a]:h,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var y,v;Ie(o)||Re(!1,`Invalid AST Node: ${Ae(o)}.`);const n=e?null===(y=r.get(o.kind))||void 0===y?void 0:y.leave:null===(v=r.get(o.kind))||void 0===v?void 0:v.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,d),b===cr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!Ie(b)){p.pop();continue}o=b}}var m;void 0===b&&g&&f.push([a,o]),e?p.pop():(i={inArray:u,index:l,keys:c,edits:f,prev:i},u=Array.isArray(o),c=u?o:null!==(m=n[o.kind])&&void 0!==m?m:[],l=-1,f=[],s&&d.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(h=f[f.length-1][1]),h}function fr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var pr=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new en("Network request failed. "+t+" is not serializable: "+e.message):new en(23);throw r.parseError=e,r}return n},dr=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},hr=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},yr=Object.prototype.hasOwnProperty;function vr(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;throw n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,n}})).then((function(n){return t.status>=300&&hr(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||yr.call(n,"data")||yr.call(n,"errors")||hr(t,n,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),n}))}}var mr=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new en("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new en(22)};const gr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function br(e){return Er[e.charCodeAt(0)]}const Er=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function _r(e){return lr(e,wr)}const wr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Or(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=xr("(",Or(e.variableDefinitions,", "),")"),n=Or([e.operation,Or([e.name,t]),Or(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+xr(" = ",n)+xr(" ",Or(r," "))},SelectionSet:{leave:({selections:e})=>Tr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=xr("",e,": ")+t;let a=o+xr("(",Or(n,", "),")");return a.length>80&&(a=o+xr("(\n",Ir(Or(n,"\n")),"\n)")),Or([a,Or(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+xr(" ",Or(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Or(["...",xr("on ",e),Or(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${xr("(",Or(n,", "),")")} on ${t} ${xr("",Or(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t=!1){const n=!e.includes("\n"),r=e.startsWith(" ")||e.startsWith("\t"),i=e.endsWith('"'),o=e.endsWith("\\"),a=!n||i||o||t;let s="";return!a||n&&r||(s+="\n"),s+=e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(e):`"${e.replace(gr,br)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Or(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Or(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+xr("(",Or(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>xr("",e,"\n")+Or(["schema",Or(t," "),Tr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>xr("",e,"\n")+Or(["scalar",t,Or(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>xr("",e,"\n")+Or(["type",t,xr("implements ",Or(n," & ")),Or(r," "),Tr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>xr("",e,"\n")+t+(Sr(n)?xr("(\n",Ir(Or(n,"\n")),"\n)"):xr("(",Or(n,", "),")"))+": "+r+xr(" ",Or(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>xr("",e,"\n")+Or([t+": "+n,xr("= ",r),Or(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>xr("",e,"\n")+Or(["interface",t,xr("implements ",Or(n," & ")),Or(r," "),Tr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>xr("",e,"\n")+Or(["union",t,Or(n," "),xr("= ",Or(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>xr("",e,"\n")+Or(["enum",t,Or(n," "),Tr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>xr("",e,"\n")+Or([t,Or(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>xr("",e,"\n")+Or(["input",t,Or(n," "),Tr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>xr("",e,"\n")+"directive @"+t+(Sr(n)?xr("(\n",Ir(Or(n,"\n")),"\n)"):xr("(",Or(n,", "),")"))+(r?" repeatable":"")+" on "+Or(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Or(["extend schema",Or(e," "),Tr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Or(["extend scalar",e,Or(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Or(["extend type",e,xr("implements ",Or(t," & ")),Or(n," "),Tr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Or(["extend interface",e,xr("implements ",Or(t," & ")),Or(n," "),Tr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Or(["extend union",e,Or(t," "),xr("= ",Or(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Or(["extend enum",e,Or(t," "),Tr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Or(["extend input",e,Or(t," "),Tr(n)]," ")}};function Or(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function Tr(e){return xr("{\n",Ir(Or(e,"\n")),"\n}")}function xr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Ir(e){return xr(" ",e.replace(/\n/g,"\n "))}function Sr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var kr={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Dr=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=se(se({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=se(se(se({},i),e.options),{headers:se(se({},i.headers),Ar(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=se(se({},o),e.http)}));var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=_r(c)),{options:i,body:l}};function Ar(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}var Nr=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function Rr(e){return new Cn((function(t){t.error(e)}))}var Pr=an((function(){return fetch})),Cr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=e.includeUnusedVariables,s=void 0!==a&&a,u=ue(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&mr(r||Pr);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new ur((function(e){var t=dr(e,n),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,l=u.name,f=u.version;l&&(a["apollographql-client-name"]=l),f&&(a["apollographql-client-version"]=f)}var p,d=se(se({},a),i.headers),h={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:d},y=Dr(e,kr,c,h),v=y.options,m=y.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));lr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=se({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!v.signal){var b=Nr(),E=b.controller,_=b.signal;(p=E)&&(v.signal=_)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(v.method="GET"),"GET"===v.method){var w=function(e,t){var n=[],r=function(e,t){n.push(e+"="+encodeURIComponent(t))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=pr(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=pr(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+a}}(t,m),O=w.newURI,T=w.parseError;if(T)return Rr(T);t=O}else try{v.body=pr(m,"Payload")}catch(T){return Rr(T)}return new Cn((function(n){return(r||an((function(){return fetch}))||Pr)(t,v).then((function(t){return e.setContext({response:t}),t})).then(vr(e)).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(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return ae(t,e),t}(ur),Fr=ur.execute;function jr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var Mr=Object.prototype,Lr=Mr.toString,qr=Mr.hasOwnProperty,Ur=Function.prototype.toString,Vr=new Map;function Br(e,t){try{return Qr(e,t)}finally{Vr.clear()}}function Qr(e,t){if(e===t)return!0;var n,r,i,o=Lr.call(e);if(o!==Lr.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Kr(e,t))return!0;var a=zr(e),s=zr(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!qr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Qr(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Kr(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!Qr(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var g=Ur.call(e);return g===Ur.call(t)&&(r=Gr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function zr(e){return Object.keys(e).filter(Wr,e)}function Wr(e){return void 0!==this[e]}var Gr="{ [native code] }";function Kr(e,t){var n=Vr.get(e);if(n){if(n.has(t))return!0}else Vr.set(e,n=new Set);return n.add(t),!1}var $r,Yr,Hr=function(){return Object.create(null)},Jr=Array.prototype,Xr=Jr.forEach,Zr=Jr.slice,ei=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Hr),this.weakness=e,this.makeData=t}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 Xr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Zr.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),ti="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ni="function"==typeof WeakSet,ri="function"==typeof Symbol&&"function"==typeof Symbol.for,ii=function(){function e(){this.known=new(ni?WeakSet:Set),this.pool=new ei(ti),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Fn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Fn(e)){var t=function(e){return Fn(e)?Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Fn(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),oi=Object.assign((function(e){if(Fn(e)){void 0===$r&&ai();var t=$r.admit(e),n=Yr.get(t);return void 0===n&&Yr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:ai});function ai(){$r=new ii,Yr=new(ti?WeakMap:Map)}function si(e,t,n){return new Cn((function(r){var i=r.next,o=r.error,a=r.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then((function(e){--s,i&&i.call(r,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){u=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function ui(e){return e.errors&&e.errors.length>0||!1}function ci(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var li={kind:"Field",name:{kind:"Name",value:"__typename"}};function fi(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&fi(t[e.name.value],t)}))}function pi(e){return fi(Xn(e)||function(e){__DEV__?tn("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn("Document"===e.kind,50),__DEV__?tn(e.definitions.length<=1,"Fragment must have exactly one definition."):tn(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?tn("FragmentDefinition"===t.kind,"Must be a fragment definition."):tn("FragmentDefinition"===t.kind,52),t}(e),Mn(er(e)))?null:e}function di(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function hi(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=pi(lr(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(di(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&mi(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(di(e)(t))return null}}}));return a&&ci(r,(function(e){return!!e.name&&!n[e.name]})).length&&(a=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return pi(lr(t,{OperationDefinition:{enter:function(t){return se(se({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,a)),a&&ci(o,(function(e){return!!e.name&&!i[e.name]})).length&&(a=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return pi(lr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var yi=Object.assign((function(e){return lr(Jn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Yn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Yn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return se(se({},e),{selections:fe(fe([],r,!0),[li],!1)})}}}}})}),{added:function(e){return e===li}}),vi={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&tn.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function mi(e){var t=[];return e.selections.forEach((function(e){(Yn(e)||Hn(e))&&e.selectionSet?mi(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function gi(e){return"query"===nr(e).operation?e:lr(e,{OperationDefinition:{enter:function(e){return se(se({},e),{operation:"query"})}}})}function bi(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?tn(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):tn(n&&1===n.length,40);var i=n[0];__DEV__?tn(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):tn(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),42),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?tn(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):tn(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function Ei(e,t){return function(e){var t=[];return lr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function _i(e){return e&&Ei(["client"],e)&&Ei(["export"],e)}var wi=new Map;function Oi(e){var t=wi.get(e)||1;return wi.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function Ti(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function xi(e){function t(t){Object.defineProperty(e,t,{value:Cn})}return ri&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Ii(e){return e&&"function"==typeof e.then}var Si=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],Ti(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),Ti(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?Ii(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),Ti(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new Cn(t)]),Ii(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return ae(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(Cn);function ki(e){return Array.isArray(e)&&e.length>0}xi(Si);var Di,Ai=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,u=n.errorMessage,c=n.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(ki((r=l).graphQLErrors)||ki(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+=t+"\n"})),r.networkError&&(i+=r.networkError.message+"\n"),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return ae(t,e),t}(Error);function Ni(e){return!!e&&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"}(Di||(Di={}));var Ri=Object.prototype.toString;function Pi(e){return Ci(e)}function Ci(e,t){switch(Ri.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=Ci(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=Ci(e[n],t)})),r;default:return e}}var Fi=Object.assign,ji=Object.hasOwnProperty,Mi=!1,Li=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=qi)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=Xn(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return ae(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||Di.ready,r=se(se({},t),{loading:Ni(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if((t||"network-only"!==o&&"no-cache"!==o&&"standby"!==o)&&!this.queryManager.transform(this.options.query).hasForcedResolvers){var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),Br(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==Di.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=Di.ready,r.loading=!1),delete r.partial):"no-cache"!==o&&(r.partial=!0),!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||Ui(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!Br(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||Br(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("no-cache"===r?n.fetchPolicy="no-cache":"cache-and-network"!==r&&(n.fetchPolicy="network-only"),__DEV__&&e&&ji.call(e,"variables")){var i=tr(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&tn.warn("Called refetch("+JSON.stringify(e)+") for query "+((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i))+", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?")}return e&&!Br(this.options.variables,e)&&(n.variables=this.options.variables=se(se({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,Di.refetch)},t.prototype.fetchMore=function(e){var t=this,n=se(se({},e.query?e:se(se(se({},this.options),e),{variables:se(se({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=Di.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,Di.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!Mi&&(__DEV__&&tn.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),Mi=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&tn.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Br(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},Di.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?tn(n,"Attempted to start a polling query without a polling interval."):tn(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(Ni(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},Di.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=se(se({},this.last),{result:this.queryManager.assumeImmutableResults?e:Pi(e),variables:t}),ki(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===Di.refetch||t===Di.fetchMore||t===Di.poll,i=this.options.variables,o=r?jr(this.options,e):Fi(this.options,jr(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!Br(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=Di.setVariables)));var a=o.variables&&se({},o.variables),s=this.fetch(o,t),u={next:function(e){n.reportResult(e,a)},error:function(e){n.reportError(e,a)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=u),s.addObserver(u),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),Ti(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=se(se({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:Di.error,loading:!1});this.updateLastResult(n,t),Ti(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Cn);function qi(e){__DEV__&&tn.error("Unhandled error",e.message,e.stack)}function Ui(e){__DEV__&&ki(e)&&__DEV__&&tn.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}xi(Li);var Vi=Object.prototype.hasOwnProperty;function Bi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Qi(e)}function Qi(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Wi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var zi=function(e,t,n){return this.merge(e[n],t[n])},Wi=function(){function e(e){void 0===e&&(e=zi),this.reconciler=e,this.isObject=Fn,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return Fn(t)&&Fn(e)?(Object.keys(t).forEach((function(i){if(Vi.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,fe([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Fn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Gi=null,Ki={},$i=1,Yi="@wry/context:Slot",Hi=Array,Ji=Hi[Yi]||function(){var e=function(){function e(){this.id=["slot",$i++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Gi;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Ki)break;return e!==Gi&&(Gi.slots[this.id]=t),!0}return Gi&&(Gi.slots[this.id]=Ki),!1},e.prototype.getValue=function(){if(this.hasValue())return Gi.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Gi;Gi={parent:a,slots:o};try{return t.apply(r,n)}finally{Gi=a}},e.bind=function(e){var t=Gi;return function(){var n=Gi;try{return Gi=t,e.apply(this,arguments)}finally{Gi=n}}},e.noContext=function(e,t,n){if(!Gi)return e.apply(n,t);var r=Gi;try{return Gi=null,e.apply(n,t)}finally{Gi=r}},e}();try{Object.defineProperty(Hi,Yi,{value:Hi[Yi]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Xi(){}Ji.bind,Ji.noContext;var Zi,eo=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Xi),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),to=new Ji,no=Object.prototype.hasOwnProperty,ro=void 0===(Zi=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Zi;function io(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var oo=[];function ao(e,t){if(!e)throw new Error(t||"assertion failure")}function so(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var uo=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!fo(this))return co(this),this.value[0]},e.prototype.recompute=function(e){return ao(!this.recomputing,"already recomputing"),co(this),fo(this)?function(e,t){return bo(e),to.withValue(e,lo,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{io(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,fo(e)||ho(e)}(e),so(e.value)}(this,e):so(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,po(this),io(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),bo(this),yo(this,(function(t,n){t.setDirty(),Eo(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=oo.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(ro(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),oo.push(this.deps),this.deps=null)},e.count=0,e}();function co(e){var t=to.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),fo(e)?vo(t,e):mo(t,e),t}function lo(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function fo(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function po(e){yo(e,vo)}function ho(e){yo(e,mo)}function yo(e,t){var n=e.parents.size;if(n)for(var r=ro(e.parents),i=0;i<n;++i)t(r[i],e)}function vo(e,t){ao(e.childValues.has(t)),ao(fo(t));var n=!fo(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=oo.pop()||new Set;e.dirtyChildren.add(t),n&&po(e)}function mo(e,t){ao(e.childValues.has(t)),ao(!fo(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),go(e,t),fo(e)||ho(e)}function go(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(oo.length<100&&oo.push(n),e.dirtyChildren=null))}function bo(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Eo(e,n)})),e.forgetDeps(),ao(null===e.dirtyChildren)}function Eo(e,t){t.parents.delete(e),e.childValues.delete(t),go(e,t)}var _o={setDirty:!0,dispose:!0,forget:!0};function wo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=to.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(io(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&no.call(_o,n)?n:"setDirty";ro(r).forEach((function(e){return e[i]()})),t.delete(e),io(r)}},r}function Oo(){var e=new ei("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}Oo();var To=new Set;function xo(e,t){void 0===t&&(t=Object.create(null));var n=new eo(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||Oo(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new uo(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),To.add(n),to.hasValue()||(To.forEach((function(e){return e.clean()})),To.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var Io=new Ji,So=new WeakMap;function ko(e){var t=So.get(e);return t||So.set(e,t={vars:new Set,dep:wo()}),t}function Do(e){ko(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Ao(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){ko(e).dep.dirty(r),No(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Io.getValue();s&&(i(s),ko(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),ko(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function No(e){e.broadcastWatches&&e.broadcastWatches()}var Ro=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Bi(t.resolvers,e)})):this.resolvers=Bi(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,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return ce(this,void 0,void 0,(function(){return le(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return se(se({},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 Ei(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Jn(e);var t=hi([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=lr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Yn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return se(se({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),ce(this,void 0,void 0,(function(){return le(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return se(se({},t),e.exportedVariables)}))]:[2,se({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return lr(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 cr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:gi(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),ce(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,d,h;return le(this,(function(y){return a=nr(e),s=er(e),u=Mn(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,d=f.client,h={fragmentMap:u,context:se(se({},n),{cache:p,client:d}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,h).then((function(e){return{result:e,exportedVariables:h.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return le(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return ce(u,void 0,void 0,(function(){var s,u;return le(this,(function(c){return bi(e,o)?Yn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Kn(e)]=t,n))}))]:(Hn(e)?s=e:(s=r[e.name.value],__DEV__?tn(s,"No fragment named "+e.name.value):tn(s,11)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return Qi(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return le(this,(function(d){return r=n.variables,i=e.name.value,o=Kn(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(f=l[a?i:o])&&(u=Promise.resolve(Io.withValue(this.cache,f,[t,Gn(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.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)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Po=new(ti?WeakMap:Map);function Co(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Po.set(e,(Po.get(e)+1)%1e15),n.apply(this,arguments)})}function Fo(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var jo=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Po.has(n)||(Po.set(n,0),Co(n,"evict"),Co(n,"modify"),Co(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||Di.loading;return this.variables&&this.networkStatus!==Di.loading&&!Br(this.variables,e.variables)&&(t=Di.setVariables),Br(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Fo(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Br(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Br(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Fo(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Ni(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=se(se({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Br(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Po.get(this.cache)&&Br(t,n.variables)&&Br(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=ki(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Mo(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Po.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Di.ready},e.prototype.markError=function(e){return this.networkStatus=Di.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Mo(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!ui(e);return!r&&n&&e.data&&(r=!0),r}var Lo=Object.prototype.hasOwnProperty,qo=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(ti?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new Ro({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new en("QueryManager stopped while query was in flight"):new en(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.onQueryUpdated,f=e.errorPolicy,p=void 0===f?"none":f,d=e.fetchPolicy,h=void 0===d?"network-only":d,y=e.keepRootFields,v=e.context;return ce(this,void 0,void 0,(function(){var e,o,s;return le(this,(function(f){switch(f.label){case 0:return __DEV__?tn(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):tn(t,14),__DEV__?tn("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):tn("network-only"===h||"no-cache"===h,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,v)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,updateQueries:i,update:c,keepRootFields:y}),this.broadcastQueries(),s=this,[2,new Promise((function(f,d){return si(s.getObservableFromLink(t,se(se({},v),{optimisticResponse:r}),n,!1),(function(f){if(ui(f)&&"none"===p)throw new Ai({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var d=se({},f);return"function"==typeof a&&(a=a(d)),"ignore"===p&&ui(d)&&delete d.errors,s.markMutationResult({mutationId:e,result:d,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:y})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){o&&(o.loading=!1,o.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),d(t instanceof Ai?t:new Ai({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&Mo(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var a=e.updateQueries;a&&this.queries.forEach((function(e,o){var s=e.observableQuery,u=s&&s.queryName;if(u&&Lo.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=c(h,{mutationResult:r,queryName:f&&Zn(f)||void 0,queryVariables:p});y&&i.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach((function(e){return t.write(e)}));var a=e.update;if(a){if(!o){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=se(se({},r),{data:s.result}))}a(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(se(se({},t),{result:{data:r}}),e)}catch(e){__DEV__&&tn.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),hi([vi],Jn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:_i(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:rr(Xn(r)),asQuery:se(se({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?se(se({},e),{operation:"query"}):e}))})},u=function(e){e&&!n.has(e)&&n.set(e,s)};u(e),u(r),u(o),u(a)}return n.get(e)},e.prototype.getVariables=function(e,t){return se(se({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=se(se({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new jo(this),n=new Li({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?tn(e.query,"query option is required. You must specify your GraphQL document in the query option."):tn(e.query,16),__DEV__?tn("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):tn("Document"===e.query.kind,17),__DEV__?tn(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):tn(!e.returnPartialData,18),__DEV__?tn(!e.pollInterval,"pollInterval option only supported on watchQuery."):tn(!e.pollInterval,19),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new en("Store reset while query was in flight (not completed in link chain)"):new en(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=Di.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):Fn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Fn(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}})),i.size&&i.forEach((function(e){var r=Oi("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Li({queryManager:t,queryInfo:i,options:se(se({},e),{fetchPolicy:"network-only"})});tn(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&tn.warn("Unknown query "+("string"==typeof t?"named ":"")+JSON.stringify(t,null,2)+" requested in refetchQueries options.include array")})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var u=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(Mo(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),ui(o))throw new Ai({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Cn((function(e){var t=null;return c.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this.inFlightLinkObservables,c=this.link,l={query:s,variables:n,operationName:Zn(s)||void 0,context:this.prepareContext(se(se({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=oi(n);if(!(o=f.get(p))){var d=new Si([Fr(c,l)]);f.set(p,o=d),d.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new Si([Fr(c,l)])}else o=new Si([Cn.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(o=si(o,(function(e){return a.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return si(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=ki(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new Ai({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||Di.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new Ai({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=Di.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,u=void 0===s?"cache-first":s,c=t.errorPolicy,l=void 0===c?"none":c,f=t.returnPartialData,p=void 0!==f&&f,d=t.notifyOnNetworkStatusChange,h=void 0!==d&&d,y=t.context,v=void 0===y?{}:y,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:h,context:v}),g=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new Si(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(g):g(m.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),function(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?Oi("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof jo&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),!1}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var d=function(){return e.getDiff(o)},h=function(t,n){void 0===n&&(n=e.networkStatus||Di.loading);var a=t.result;!__DEV__||c||Br(a,{})||Ui(t.missing);var s=function(e){return Cn.of(se({data:e,loading:Ni(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(a)},y="no-cache"===a?0:n===Di.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,y,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&Ni(n);switch(a){default:case"cache-first":return(g=d()).complete?[h(g,e.markReady())]:c||m?[h(g),v()]:[v()];case"cache-and-network":var g;return(g=d()).complete||c||m?[h(g),v()]:[v()];case"cache-only":return[h(d(),e.markReady())];case"network-only":return m?[h(d()),v()]:[v()];case"no-cache":return m?[h(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new jo(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return se(se({},t),{clientAwareness:this.clientAwareness})},e}(),Uo=!1;function Vo(e,t){return jr(e,t,t.variables&&{variables:se(se({},e.variables),t.variables)})}var Bo=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,d=void 0===p||p,h=e.defaultOptions,y=e.assumeImmutableResults,v=void 0!==y&&y,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,E=e.name,_=e.version,w=e.link;if(w||(w=n?new Cr({uri:n,credentials:r,headers:i}):ur.empty()),!o)throw __DEV__?new en("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new en(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=d,this.defaultOptions=h||{},this.typeDefs=g,c&&setTimeout((function(){return t.disableNetworkFetches=!1}),c),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),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Uo&&__DEV__&&(Uo=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,T=O&&O.userAgent,x=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&tn.log("Download the Apollo DevTools for a better development experience: "+x)}this.version="3.4.17",this.localState=new Ro({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new qo({cache:this.cache,link:this.link,queryDeduplication:d,ssrMode:s,clientAwareness:{name:E,version:_},localState:this.localState,assumeImmutableResults:v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Vo(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Vo(this.defaultOptions.query,e)),__DEV__?tn("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):tn("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Vo(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Fr(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&tn.debug("In client.refetchQueries, Promise.all promise rejected with error "+e)})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Qo=function(){function e(){this.getFragmentDoc=xo(jn)}return e.prototype.batch=function(e){var t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;this.performTransaction(e.update,t)},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=ue(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=ue(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),zo=function(e){function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.path=r,a.query=i,a.variables=o,a.__proto__=t.prototype,a}return ae(t,e),t}(Error);function Wo(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Fn(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Fn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Go=Object.prototype.hasOwnProperty;function Ko(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return n+":"+("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var $o={dataIdFromObject:Ko,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Yo(e){var t=e.canonizeResults;return void 0===t?$o.canonizeResults:t}var Ho=/^[_a-z][_0-9a-z]*/i;function Jo(e){var t=e.match(Ho);return t?t[0]:e}function Xo(e,t,n){return!!Fn(t)&&(Array.isArray(t)?t.every((function(t){return Xo(e,t,n)})):e.selections.every((function(e){if(Yn(e)&&bi(e,n)){var r=Kn(e);return Go.call(t,r)&&(!e.selectionSet||Xo(e.selectionSet,t[r],n))}return!0})))}function Zo(e){return Fn(e)&&!Un(e)&&!Array.isArray(e)}var ea=Object.create(null),ta=function(){return ea},na=Object.create(null),ra=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Wo(Un(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return Un(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return qn(e);if(Un(e))return e;var r=n.policies.identify(e)[0];if(r){var i=qn(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return se({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Go.call(this.data,e)){var n=this.data[e];if(n&&Go.call(n,t))return n[t]}return"__typename"===t&&Go.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof sa?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Go.call(this.data,e)?this.data[e]:this instanceof sa?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;Un(e)&&(e=e.__ref),Un(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?tn("string"==typeof n,"store.merge expects a string ID"):tn("string"==typeof n,1);var a=new Wi(ca).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=Jo(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof sa||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:ea,INVALIDATE:na,isReference:Un,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||qn(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=Jo(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===ta?ea:f(Wo(l),se(se({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===na?n.group.dirty(e,u):(p===ea&&(p=void 0),p!==l&&(i[u]=p,o=!0,l=p))}void 0!==l&&(a=!1)}})),o)return this.merge(e,i),a&&(this instanceof sa?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=ta,r):ta)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Go.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof sa&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){Go.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&Go.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ue(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof sa?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){Go.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof sa;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Go.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){Un(e)&&(t[e.__ref]=!0),Fn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Fn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),ia=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?wo():null,this.keyMaker=new ei(ti)},e.prototype.depend=function(e,t){if(this.d){this.d(oa(e,t));var n=Jo(t);n!==t&&this.d(oa(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(oa(e,t),"__exists"===t?"forget":"setDirty")},e}();function oa(e,t){return t+"#"+e}function aa(e,t){la(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new ia(i))||this;return a.stump=new ua(a),a.storageTrie=new ei(ti),o&&a.replace(o),a}return ae(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(ra||(ra={}));var sa=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return ae(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){Br(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return se(se({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Go.call(this.data,t)?se(se({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(ra),ua=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new ia(t.group.caching,t.group))||this}return ae(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(sa);function ca(e,t,n){var r=e[n],i=t[n];return Br(r,i)?r:i}function la(e){return!!(e instanceof ra&&e.group.caching)}function fa(e,t){return new zo(e.message,t.path.slice(),t.query,t.variables)}function pa(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var da=function(){function e(e){var t=this;this.knownResults=new(ti?WeakMap:Map),this.config=jr(e,{addTypename:!1!==e.addTypename,canonizeResults:Yo(e)}),this.canon=e.canon||new ii,this.executeSelectionSet=xo((function(e){var n,r=e.context.canonizeResults,i=pa(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?se(se({},o),{result:t.canon.admit(o.result)}):o:(aa(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:pa,makeCacheKey:function(e,t,n,r){if(la(n.store))return n.store.makeCacheKey(e,Un(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=xo((function(e){return aa(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(la(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new ii},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,o=e.variables,a=e.returnPartialData,s=void 0===a||a,u=e.canonizeResults,c=void 0===u?this.config.canonizeResults:u,l=this.config.cache.policies;o=se(se({},rr(tr(n))),o);var f=qn(i),p=this.executeSelectionSet({selectionSet:nr(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:oi(o),canonizeResults:c,fragmentMap:Mn(er(n)),path:[]}}),d=p.missing&&p.missing.length>0;if(d&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!d}},e.prototype.isFresh=function(e,t,n,r){if(la(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(Un(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[fa(__DEV__?new en("Dangling reference to missing "+r.__ref+" object"):new en(5),o)]};var a=o.variables,s=o.policies,u=o.store,c=[],l={result:null},f=u.getFieldValue(r,"__typename");function p(){return l.missing||(l.missing=[])}function d(e){var t;return e.missing&&(t=p()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof f&&!s.rootIdsByTypename[f]&&c.push({__typename:f});var h=new Set(n.selections);h.forEach((function(e){var n;if(bi(e,a))if(Yn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Kn(e);o.path.push(l),void 0===u?yi.added(e)||p().push(fa(__DEV__?new en("Can't find field '"+e.name.value+"' on "+(Un(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new en(6),o)):Array.isArray(u)?u=d(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:Un(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),tn(o.path.pop()===l)}else{var y=Ln(e,o.fragmentMap);y&&s.fragmentMatches(y,f)&&y.selectionSet.selections.forEach(h.add,h)}}));var y=Qi(c);return l.result=o.canonizeResults?this.canon.admit(y):Wo(y),this.knownResults.set(l.result,n),l},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){return e.missing&&(t=t||[]).push.apply(t,e.missing),tn(a.path.pop()===n),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:Un(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Fn(n)&&(__DEV__?tn(!Un(n),"Missing selection set for object of type "+function(e,t){return Un(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):tn(!Un(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),tn(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ha=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=Xn(r),c=new Wi;a=se(se({},rr(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:oi(a),fragmentMap:Mn(er(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1},f=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!Un(f))throw __DEV__?new en("Could not identify object "+JSON.stringify(i)):new en(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=qn(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(Un(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Yn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has(Jo(e))})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!Un(o)&&!Br(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=Jo(n),c=s+"."+u;if(!Ea.has(c)){Ea.add(c);var l=[];Array.isArray(o)||Array.isArray(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)})),__DEV__&&tn.warn("Cache data may be lost when replacing the "+u+" field of a "+s+" object.\n\nTo address this problem (which is not a bug in Apollo Client), "+(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"")+"define a custom merge function for the "+c+" field, so InMemoryCache can safely merge these objects:\n\n existing: "+JSON.stringify(o).slice(0,1e3)+"\n incoming: "+JSON.stringify(a).slice(0,1e3)+"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n")}}}}(s,i,e,l.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=s.identify(r,i,o.fragmentMap),c=u[0],l=u[1];if("string"==typeof(n=n||c)){var f=o.written[n]||(o.written[n]=[]),p=qn(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var d=Object.create(null);l&&(d=o.merge(d,l));var h=n&&s.rootTypenamesById[n]||$n(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof h&&(d.__typename=h);var y=new Set(i.selections);if(y.forEach((function(e){var n;if(bi(e,o.variables))if(Yn(e)){var i=Kn(e),u=r[i],c=o.clientOnly;if(o.clientOnly=c||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0!==u){var l=s.getStoreFieldName({typename:h,fieldName:e.name.value,field:e,variables:o.variables}),f=va(a,l),p=t.processFieldValue(u,e,o,f),v=void 0;if(e.selectionSet&&!(v=o.store.getFieldValue(p,"__typename"))&&Un(p)){var m=o.incomingById.get(p.__ref);v=m&&m.fields.__typename}var g=s.getMergeFunction(h,e.name.value,v);g?f.info={field:e,typename:h,merge:g}:ba(a,l),d=o.merge(d,((n={})[l]=p,n))}else o.clientOnly||yi.added(e)||__DEV__&&tn.error(("Missing field '"+Kn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=Ln(e,o.fragmentMap);b&&s.fragmentMatches(b,h,r,o.variables)&&b.selectionSet.selections.forEach(y.add,y)}})),"string"==typeof n){var v=o.incomingById.get(n);return v?(v.fields=o.merge(v.fields,d),v.mergeTree=ma(v.mergeTree,a),v.selections.forEach(y.add,y),v.selections=y):o.incomingById.set(n,{fields:d,mergeTree:ga(a)?void 0:a,selections:y}),qn(n)}return d},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,va(r,o));return ba(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?Pi(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!Un(n)){var s,u=Array.isArray(n)||!Un(t)&&!Zo(t)?void 0:t,c=n;u&&!i&&(i=[Un(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&tn(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):se({},c),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),ya=[];function va(e,t){var n=e.map;return n.has(t)||n.set(t,ya.pop()||{map:new Map}),n.get(t)}function ma(e,t){if(e===t||!t||ga(t))return e;if(!e||ga(e))return t;var n=e.info&&t.info?se(se({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var o=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,ma(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,ma(t.map.get(n),e.map.get(n)))}))}return i}function ga(e){return!e||!(e.info||e.map.size)}function ba(e,t){var n=e.map,r=n.get(t);r&&ga(r)&&(ya.push(r),n.delete(t))}var Ea=new Set;function _a(e){var t=Oi("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function wa(e){return void 0!==e.args?e.args:e.field?Gn(e.field,e.variables):null}Qn.setStringify(oi);var Oa=function(){},Ta=function(e,t){return t.fieldName},xa=function(e,t,n){return(0,n.mergeObjects)(e,t)},Ia=function(e,t){return t},Sa=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=se({dataIdFromObject:Ko},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,n){var r=t&&n?$n(e,t,n):e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,o={typename:r,selectionSet:t,fragmentMap:n},a=r&&this.getTypePolicy(r),s=a&&a.keyFn||this.config.dataIdFromObject;s;){var u=s(e,o);if(!Array.isArray(u)){i=u;break}s=Na(u)}return i=i?String(i):void 0,o.keyObject?[i,o.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=ue(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Go.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?xa:!1===t?Ia:e.merge}a(r,t.merge),r.keyFn=!1===i?Oa:Array.isArray(i)?Na(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?Ta:Array.isArray(s)?Aa(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||Ta)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?tn(!r||r===e,"Cannot change root "+e+" __typename more than once"):tn(!r||r===e,2),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(Ho);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Go.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,o=ue(r,["fields"]);Object.assign(n,o),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!n||!this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&tn.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Xo(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=wa(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=Aa(u)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Vn(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return Vn(r,n,i,t)}))),Qn(e.name.value,r,n)}(e.field,e.variables):Qn(r,wa(e))),!1===t?r:r===Jo(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=Jo(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=ka(this,n,e,t,t.store.getStorage(Un(n)?n.__ref:n,i));return Io.withValue(this.cache,u,[a,c])}return a}},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===xa?Da(r.store)(e,t):s===Ia?t:(r.overwrite&&(e=void 0),s(e,t,ka(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function ka(e,t,n,r,i){var o=e.getStoreFieldName(n),a=Jo(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:wa(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:Un,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(n,i){var o;if("string"==typeof n)o={fieldName:n,from:arguments.length>1?i:t};else{if(!Fn(n))return void(__DEV__&&tn.warn("Unexpected readField arguments: "+_a(Array.from(arguments))));o=se({},n),Go.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&tn.warn("Undefined 'from' passed to readField with arguments "+_a(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:Da(r.store)}}function Da(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new en("Cannot automatically merge arrays"):new en(3);if(Fn(t)&&Fn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(Un(t)&&Zo(n))return e.merge(t.__ref,n),t;if(Zo(t)&&Un(n))return e.merge(t,n.__ref),n;if(Zo(t)&&Zo(n))return se(se({},t),n)}return n}}function Aa(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(Pa(t,e,!1)):n.fieldName}}function Na(e){var t=new ei(ti);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=Ra(r.selectionSet,r.fragmentMap))}var a=r.keyObject=Pa(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function Ra(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Yn(e)){if(e.alias){var i=e.alias.value,o=e.name.value;o!==i&&((n.aliases||(n.aliases=Object.create(null)))[o]=i)}e.selectionSet&&((n.subsets||(n.subsets=Object.create(null)))[e.name.value]=Ra(e.selectionSet,t))}else{var a=Ln(e,t);a&&r.add(a.selectionSet)}}))})),n}function Pa(e,t,n,r){var i,o,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof o&&"string"==typeof i){var s=r&&r.subsets,u=s&&s[o];a[o]=Pa(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Go.call(e,l)?a[o=t]=e[i=l]:(__DEV__?tn(!n,"Missing field '"+l+"' while computing key fields"):tn(!n,4),i=o=void 0)}})),a}var Ca=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=Ao,n.txCount=0,n.config=function(e){return jr($o,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new Sa({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ae(t,e),t.prototype.init=function(){var e=this.data=new ra.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new ha(this,this.storeReader=new da({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Yo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=xo((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(la(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,oi({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof zo)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Go.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,n=this;return this.watches.size||ko(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){n.watches.delete(e)&&!n.watches.size&&Do(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){oi.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return Un(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Go.call(e,"id"))return!1;e=se(se({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),oi.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),Do(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t=this,n=e.update,r=e.optimistic,i=void 0===r||r,o=e.removeOptimistic,a=e.onWatchUpdated,s=function(e){var r=t,i=r.data,o=r.optimisticData;++t.txCount,e&&(t.data=t.optimisticData=e);try{n(t)}finally{--t.txCount,t.data=i,t.optimisticData=o}},u=new Set;a&&!this.txCount&&this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,s):!1===i?s(this.data):s(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),a&&u.size?(this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e,t){var n=a.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return t.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e)},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=yi(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Br(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Qo);const Fa=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var ja=n(4098),Ma=n.n(ja),La=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,o=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=o||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=se({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new Cn((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),o=[],a=[],s=[],u=[];n.forEach((function(e,t){o.push(e.observable),a.push(e.next),s.push(e.error),u.push(e.complete)}));var c=this.batchHandler(r,i)||Cn.of(),l=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return c.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),a.length!==e.length){var t=new Error("server returned results with length "+e.length+", expected length of "+a.length);return t.result=e,l(t)}e.forEach((function(e,t){a[t]&&a[t].forEach((function(t){return t(e)}))}))},error:l,complete:function(){u.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),o}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),qa=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,o=r.batchInterval,a=void 0===o?10:o,s=r.batchMax,u=void 0===s?0:s,c=r.batchHandler,l=void 0===c?function(){return null}:c,f=r.batchKey,p=void 0===f?function(){return""}:f;return n.batcher=new La({batchDebounce:i,batchInterval:a,batchMax:u,batchHandler:l,batchKey:p}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return ae(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(ur),Ua=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,o=void 0===i?"/graphql":i,a=r.fetch,s=r.includeExtensions,u=r.batchInterval,c=r.batchDebounce,l=r.batchMax,f=r.batchKey,p=ue(r,["uri","fetch","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);mr(a),a||(a=fetch);var d={http:{includeExtensions:s},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return n.batchDebounce=c,n.batchInterval=u||10,n.batchMax=l||10,f=f||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return dr(e,o)+JSON.stringify(n)},n.batcher=new qa({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:f,batchHandler:function(e){var t=dr(e[0],o),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,u=i.version;s&&(r["apollographql-client-name"]=s),u&&(r["apollographql-client-version"]=u)}var c,l={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:se(se({},r),n.headers)},f=e.map((function(e){return Dr(e,kr,d,l)})),p=f.map((function(e){return e.body})),h=f[0].options;if("GET"===h.method)return Rr(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=pr(p,"Payload")}catch(e){return Rr(e)}if(!h.signal){var y=Nr(),v=y.controller,m=y.signal;(c=v)&&(h.signal=m)}return new Cn((function(n){return a(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(vr(e)).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(){c&&c.abort()}}))}}),n}return ae(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(ur),Va=n(4147);function Ba(e){return new ur((function(t,n){return t.setContext({headers:{"X-API-KEY":e}}),n(t)}))}var Qa=function(){function e(){var e=this;this.setFeatures=function(t){return e.features=new Set(t)},this.entitlements=new Map,this.features=new Set,this.isLoaded=!1}return e.prototype.getEntitlement=function(e){return this.entitlements.get(e)||null},e.prototype.validateFeature=function(e){return this.features.has(e)},e.prototype.setEntitlements=function(e){this.entitlements=e,this.isLoaded=!0},e.prototype.getEntitlements=function(){return this.entitlements},e}(),za=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Wa=ht($a||($a=za(["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"]))),Ga=function(){function e(e){this.client=e}return e.prototype.getEntitlements=function(e){return this.client.query({query:ht(Ya||(Ya=za(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),Wa),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:ht(Ha||(Ha=za(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),Wa),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e.prototype.reportEntitlementRequested=function(e,t,n,r){return i=this,o=void 0,s=function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){switch(i.label){case 0:return[4,this.client.mutate({mutation:ht(Ja||(Ja=za(["\n mutation reportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {\n reportEntitlementCheckRequested(entitlementCheckRequested: $entitlementCheckRequested)\n }\n "],["\n mutation reportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {\n reportEntitlementCheckRequested(entitlementCheckRequested: $entitlementCheckRequested)\n }\n "]))),variables:{entitlementCheckRequested:{entitlementCheckResult:n,customerId:t,featureId:e,requestedUsage:r}}})];case 1:return i.sent(),[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{u(s.next(e))}catch(e){t(e)}}function r(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}u((s=s.apply(i,o||[])).next())}));var i,o,a,s},e}();const Ka=Ga;var $a,Ya,Ha,Ja,Xa=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n,r;if(!e||!e.calculatedEntitlement.feature)return{hasAccess:!1,accessDeniedReason:H.CustomerNotEntitledForFeature};var i=e.calculatedEntitlement.feature,o=i.featureType,a=i.meterType;switch(o){case J.Boolean:return{hasAccess:!0};case J.Numeric:if((null===(n=e.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)===X.None)return{hasAccess:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{hasAccess:!0};var s=e.featureUsage.currentUsage;return a===X.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(s=0),s+(t||0)<=((null===(r=e.calculatedEntitlement)||void 0===r?void 0:r.usageLimit)||0)?{hasAccess:!0}:{hasAccess:!1,accessDeniedReason:H.RequestedUsageExceedsLimit}}},e}(),Za=function(){function e(e,t,n){this.entitlementsApi=e,this.customerId=t,this.loggerService=n}return e.prototype.reportEntitlementCheckRequested=function(e,t,n){return r=this,i=void 0,a=function(){var r=this;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){return this.entitlementsApi.reportEntitlementRequested(e,this.customerId,t,n).then((function(){r.loggerService.debug("Successfully reported entitlement check requested")}),(function(e){r.loggerService.error("Failed to report entitlement check requested",e)})),[2]}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{u(a.next(e))}catch(e){t(e)}}function s(e){try{u(a.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a},e}(),es=function(){return es=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},es.apply(this,arguments)},ts=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ns=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},rs=function(){function e(e,t,n,r,i){this.customerId=e,this.cacheService=t,this.modelMapper=new Ht,this.loadingEntitlements=null,this.entitlementsApi=new Ka(n),this.entitlementCheckReportingService=new Za(new Ka(r),e,i),this.entitlementsPollingObserver=null}return e.prototype.startPolling=function(e){var t=this;this.entitlementsPollingObserver=this.entitlementsApi.pollEntitlements(this.customerId,e),this.entitlementsPollingObserver.subscribe((function(e){!e.errors&&e.data&&e.data.entitlements?t.storeFetchedEntitlementsInCache(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return ts(this,void 0,void 0,(function(){return ns(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e,t){var n=this.cacheService.getEntitlement(e),r=Xa.decideEntitlementPolicy(n);if((null==n?void 0:n.calculatedEntitlement.feature)&&n.calculatedEntitlement.feature.featureType!==J.Boolean)return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,this.modelMapper.mapFallbackBooleanEntitlementResult(t,r)),t;if(!n){var i=this.modelMapper.mapEntitlementResult(r);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,i),es(es({},r),{isFallback:!1})}var o=this.modelMapper.mapEntitlementResult(r,n);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,o),this.modelMapper.mapBooleanEntitlement(n,r)},e.prototype.getNumericEntitlement=function(e,t){var n,r=this.cacheService.getEntitlement(e),i=Xa.decideEntitlementPolicy(r);if((null==r?void 0:r.calculatedEntitlement.feature)&&(null===(n=r.calculatedEntitlement.feature)||void 0===n?void 0:n.featureType)!==J.Numeric){var o=this.modelMapper.mapFallbackNumericEntitlementResult(t,i);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,o),t}if(!r){var a=this.modelMapper.mapEntitlementResult(i);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,a),es(es({},i),{isFallback:!1,isUnlimited:!1})}var s=this.modelMapper.mapEntitlementResult(i,r);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,s),this.modelMapper.mapNumericEntitlement(r,i)},e.prototype.getMeteredEntitlement=function(e,t,n){var r,i,o=this.cacheService.getEntitlement(e),a=Xa.decideEntitlementPolicy(o,null==n?void 0:n.requestedUsage);if((null==o?void 0:o.calculatedEntitlement.feature)&&(null===(r=o.calculatedEntitlement.feature)||void 0===r?void 0:r.meterType)!==X.Fluctuating&&(null===(i=o.calculatedEntitlement.feature)||void 0===i?void 0:i.meterType)!==X.Incremental){var s=this.modelMapper.mapFallbackMeteredEntitlementResult(t,a,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,s),t}if(!o){var u=this.modelMapper.mapEntitlementResult(a,void 0,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,u),es(es({},a),{currentUsage:0,isFallback:!1,isUnlimited:!1,requestedUsage:(null==n?void 0:n.requestedUsage)||0})}var c=this.modelMapper.mapEntitlementResult(a,o,null==n?void 0:n.requestedUsage);return this.entitlementCheckReportingService.reportEntitlementCheckRequested(e,c),this.modelMapper.mapMeteredEntitlement(o,a,null==n?void 0:n.requestedUsage)},e.prototype.loadEntitlements=function(){return ts(this,void 0,void 0,(function(){var e;return ns(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.loadEntitlementsFromRemote()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.loadEntitlementsFromRemote=function(){return ts(this,void 0,void 0,(function(){var e;return ns(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent(),this.storeFetchedEntitlementsInCache(e.data.entitlements),[2]}}))}))},e.prototype.storeFetchedEntitlementsInCache=function(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)},e.prototype.getEntitlements=function(){return ts(this,void 0,void 0,(function(){var e=this;return ns(this,(function(t){switch(t.label){case 0:return this.cacheService.isLoaded?[3,2]:[4,this.loadEntitlements()];case 1:t.sent(),t.label=2;case 2:return[2,Array.from(this.cacheService.getEntitlements().values()).map((function(t){var n=Xa.decideEntitlementPolicy(t);return e.modelMapper.mapEntitlement(t,n)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),is=function(){return is=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},is.apply(this,arguments)},os=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},as=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},ss=function(){function e(e,t){this.modelMapper=new Ht,this.configuration=e,this.graphClient=function(e){var t=e.apiKey,n=e.baseUri,r=Ba(t),i=function(e){return new Cr({uri:"".concat(e,"/graphql"),fetch:Ma()})}(n);return new Bo({link:r.concat(i),cache:new Ca({possibleTypes:Fa.g}),name:"js-client-sdk",version:Va.version})}(this.configuration),this.batchedGraphClient=function(e){var t=e.apiKey,n=e.baseUri,r=Ba(t),i=function(e){return new Ua({uri:"".concat(e,"/graphql"),batchMax:25,batchInterval:500,fetch:Ma()})}(n);return new Bo({link:r.concat(i),cache:new Ca({possibleTypes:Fa.g}),name:"js-client-sdk",version:Va.version})}(this.configuration),this.loggerService=t,this.apiGateway=new qt(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return os(this,void 0,void 0,(function(){var n,i,o,a,s;return as(this,(function(u){switch(u.label){case 0:n=function(e){var t={baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4,logConfiguration:{logger:console,logLevel:r.ERROR}};return Qt()(t,e)}(t),i=new ee(n.logConfiguration.logger,n.logConfiguration.logLevel),u.label=1;case 1:return u.trys.push([1,4,,5]),o=function(e,t){var n=!0;return Vt()(e.apiKey)&&(t.error("You must configure the client with an SDK key"),n=!1),e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3&&(t.error("Entitlements polling interval cannot be lower than 5000ms"),n=!1),n}(n,i),o?(a=new e(n,i),t.customerId?[4,a.setCustomerId(t.customerId)]:[3,3]):[2,null];case 2:u.sent(),u.label=3;case 3:return[2,a];case 4:return s=u.sent(),i.error("Failed to initialize api ".concat(s)),[2,null];case 5:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return os(this,void 0,void 0,(function(){return as(this,(function(n){switch(n.label){case 0:return null===(t=this.entitlementsService)||void 0===t||t.stopPolling(),this.configuration.customerId=e,this.entitlementsService=new rs(e,new Qa,this.graphClient,this.batchedGraphClient,this.loggerService),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return os(this,void 0,void 0,(function(){return as(this,(function(t){switch(t.label){case 0:return[4,null===(e=this.entitlementsService)||void 0===e?void 0:e.refresh()];case 1:return t.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},te),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getBooleanEntitlement(t,r):r}catch(e){return this.loggerService.error("Failed to get boolean entitlement",e),r}},e.prototype.getNumericEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},ne),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getNumericEntitlement(t,r):r}catch(e){return this.loggerService.error("Failed to get numeric entitlement",e),r}},e.prototype.getMeteredEntitlement=function(e){var t=e.featureId,n=e.options,r=is(is({},re),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getMeteredEntitlement(t,r,n):r}catch(e){return this.loggerService.error("Failed to get metered entitlement",e),r}},e.prototype.getPaywall=function(e){var t=(void 0===e?{}:e).productId;return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(n){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e;return as(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(t)];case 1:return e=n.sent(),[2,this.modelMapper.mapPlans(e.data)]}}))}))}),(function(e){return"Failed to get paywall ".concat(e)}))]}))}))},e.prototype.getCustomer=function(){return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(t){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e,t,n;return as(this,(function(r){switch(r.label){case 0:return e=zt(this.configuration),[4,this.apiGateway.customers.getCustomer(e)];case 1:return t=r.sent(),n=t.data.customers.edges[0].node,[2,this.modelMapper.mapCustomer(n)]}}))}))}),(function(e){return"Failed to get customer ".concat(e)}))]}))}))},e.prototype.getEntitlements=function(){return os(this,void 0,void 0,(function(){var e=this;return as(this,(function(t){return[2,this.withErrorHandling((function(){return os(e,void 0,void 0,(function(){var e;return as(this,(function(t){return zt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))}),(function(e){return"Failed to get entitlements ".concat(e)}))]}))}))},e.prototype.withErrorHandling=function(e,t){try{return e()}catch(e){var n=t?t(e):"Operation failed ".concat(e);throw new Error(n)}},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.26.3","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","generate":"graphql-codegen && yarn run fix:lint","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","cross-fetch":"^3.1.4","graphql":"^16.0.1","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@graphql-codegen/cli":"^2.3.0","@graphql-codegen/fragment-matcher":"^3.2.1","@graphql-codegen/schema-ast":"^2.4.0","@graphql-codegen/typescript":"^2.4.0","@graphql-codegen/typescript-operations":"^2.2.0","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(8413)})()}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|