@stigg/js-client-sdk 0.22.1 → 0.22.2
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,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function y(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=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=d(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(_)}),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){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(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(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(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 E(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=E),t.Headers=p,t.Request=b,t.Response=E,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),h=n||l||f||p,d=h?r(e.length,String):[],v=d.length;for(var y in e)!t&&!c.call(e,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||d.push(y);return d}},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},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)}},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]",h="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,y,m){var g=u(e),b=u(t),_=g?p:s(e),E=b?p:s(t),w=(_=_==f?h:_)==h,O=(E=E==f?h:E)==h,x=_==E;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return m||(m=new r),g||l(e)?i(e,t,n,v,y,m):o(e,t,_,n,v,y,m);if(!(1&n)){var I=w&&d.call(e,"__wrapped__"),T=O&&d.call(t,"__wrapped__");if(I||T){var S=I?e.value():e,D=T?t.value():t;return m||(m=new r),y(S,D,n,v,m)}}return!!x&&(m||(m=new r),a(e,t,n,v,y,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 h=new r;if(o)var d=o(f,p,l,e,t,h);if(!(void 0===d?i(p,f,3,o,h):d))return!1}}return!0}},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 h=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===h&&(h=o),i(t,u,h)}}),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),h=n(3218),d=n(8630),v=n(6719),y=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,_,E){var w=y(e,n),O=y(t,n),x=E.get(O);if(x)r(e,n,x);else{var I=_?_(w,O,n+"",e,t,E):void 0,T=void 0===I;if(T){var S=c(O),D=!S&&f(O),k=!S&&!D&&v(O);I=O,S||D||k?c(w)?I=w:l(w)?I=a(w):D?(T=!1,I=i(O,!0)):k?(T=!1,I=o(O,!0)):I=[]:d(O)||u(O)?(I=w,u(w)?I=m(w):h(w)&&!p(w)||(I=s(O))):T=!1}T&&(E.set(O,I),b(I,O,g,_,E),E.delete(O)),r(e,n,I)}}},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 h=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(h,(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}},7518:e=>{e.exports=function(e){return 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),h=u.get(t);if(p&&h)return p==t&&h==e;var d=-1,v=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var m=e[d],g=t[d];if(a)var b=c?a(g,m,d,t,e,u):a(m,g,d,e,t,u);if(void 0!==b){if(b)continue;v=!1;break}if(y){if(!i(t,(function(e,t){if(!o(y,t)&&(m===e||s(m,e,n,a,u)))return y.push(t)}))){v=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},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 h=s;case"[object Set]":var d=1&r;if(h||(h=u),e.size!=t.size&&!d)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var y=a(h(e),h(t),r,c,f,p);return p.delete(e),y;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 h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var v=!0;s.set(e,t),s.set(t,e);for(var y=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)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var _=e.constructor,E=t.constructor;_==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E||(v=!1)}return s.delete(e),s.delete(t),v}},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]",h="[object WeakMap]",d="[object DataView]",v=c(r),y=c(i),m=c(o),g=c(a),b=c(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=d||i&&_(new i)!=l||o&&_(o.resolve())!=f||a&&_(new a)!=p||s&&_(new s)!=h)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case y:return l;case m:return f;case g:return p;case b:return h}return t}),e.exports=_},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}},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""}},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}},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}},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)}},6486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,h=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",_="[object Function]",E="[object GeneratorFunction]",w="[object Map]",O="[object Number]",x="[object Object]",I="[object Promise]",T="[object RegExp]",S="[object Set]",D="[object String]",k="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",C="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",U="[object Int32Array]",L="[object Uint8Array]",M="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",B=/\b__p \+= '';/g,Q=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,$=RegExp(W.source),K=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+xe+"]",Te="["+Ee+"]",Se="\\d+",De="["+we+"]",ke="[^\\ud800-\\udfff"+xe+Se+"\\u2700-\\u27bf"+we+Oe+"]",Ae="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Pe="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Oe+"]",Fe="(?:"+De+"|"+ke+")",je="(?:"+Ce+"|"+ke+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Le="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+Te+"|"+Ae+")?",qe="[\\ufe0e\\ufe0f]?",Ve=qe+Me+"(?:\\u200d(?:"+[Ne,Pe,Re].join("|")+")"+qe+Me+")*",Be="(?:"+["[\\u2700-\\u27bf]",Pe,Re].join("|")+")"+Ve,Qe="(?:"+[Ne+Te+"?",Te,Pe,Re,"[\\ud800-\\udfff]"].join("|")+")",ze=RegExp("['’]","g"),We=RegExp(Te,"g"),Ge=RegExp(Ae+"(?="+Ae+")|"+Qe+Ve,"g"),$e=RegExp([Ce+"?"+De+"+"+Ue+"(?="+[Ie,Ce,"$"].join("|")+")",je+"+"+Le+"(?="+[Ie,Ce+Fe,"$"].join("|")+")",Ce+"?"+Fe+"+"+Ue,Ce+"+"+Le,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,Be].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,Xe={};Xe[R]=Xe[C]=Xe[F]=Xe[j]=Xe[U]=Xe[L]=Xe[M]=Xe[q]=Xe[V]=!0,Xe[v]=Xe[y]=Xe[N]=Xe[m]=Xe[P]=Xe[g]=Xe[b]=Xe[_]=Xe[w]=Xe[O]=Xe[x]=Xe[T]=Xe[S]=Xe[D]=Xe[A]=!1;var Ze={};Ze[v]=Ze[y]=Ze[N]=Ze[P]=Ze[m]=Ze[g]=Ze[R]=Ze[C]=Ze[F]=Ze[j]=Ze[U]=Ze[w]=Ze[O]=Ze[x]=Ze[T]=Ze[S]=Ze[D]=Ze[k]=Ze[L]=Ze[M]=Ze[q]=Ze[V]=!0,Ze[b]=Ze[_]=Ze[A]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,ht=lt&<.isMap,dt=lt&<.isRegExp,vt=lt&<.isSet,yt=lt&<.isTypedArray;function mt(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)}function gt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function wt(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}function Ot(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function xt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(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}function Tt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function St(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Dt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var At=Ut("length");function Nt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Pt(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}function Rt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Pt(e,Ft,n)}function Ct(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ft(e){return e!=e}function jt(e,t){var n=null==e?0:e.length;return n?qt(e,t)/n:p}function Ut(e){return function(t){return null==t?i:t[e]}}function Lt(e){return function(t){return null==e?i:e[t]}}function Mt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Bt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Qt(e){return function(t){return e(t)}}function zt(e,t){return It(t,(function(t){return e[t]}))}function Wt(e,t){return e.has(t)}function Gt(e,t){for(var n=-1,r=e.length;++n<r&&Rt(t,e[n],0)>-1;);return n}function $t(e,t){for(var n=e.length;n--&&Rt(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=Lt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Jt=Lt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ht(e){return"\\"+et[e]}function Xt(e){return Ke.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Xt(e)?function(e){for(var t=Ge.lastIndex=0;Ge.test(e);)++t;return t}(e):At(e)}function an(e){return Xt(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=Lt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Je))).Array,ie=t.Date,Ee=t.Error,we=t.Function,Oe=t.Math,xe=t.Object,Ie=t.RegExp,Te=t.String,Se=t.TypeError,De=r.prototype,ke=we.prototype,Ae=xe.prototype,Ne=t["__core-js_shared__"],Pe=ke.toString,Re=Ae.hasOwnProperty,Ce=0,Fe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Ae.toString,Ue=Pe.call(xe),Le=ot._,Me=Ie("^"+Pe.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ut?t.Buffer:i,Ve=t.Symbol,Be=t.Uint8Array,Qe=qe?qe.allocUnsafe:i,Ge=en(xe.getPrototypeOf,xe),Ke=xe.create,et=Ae.propertyIsEnumerable,rt=De.splice,it=Ve?Ve.isConcatSpreadable:i,at=Ve?Ve.iterator:i,st=Ve?Ve.toStringTag:i,ct=function(){try{var e=co(xe,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,At=ie&&ie.now!==ot.Date.now&&ie.now,Lt=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Oe.ceil,fn=Oe.floor,pn=xe.getOwnPropertySymbols,hn=qe?qe.isBuffer:i,dn=t.isFinite,vn=De.join,yn=en(xe.keys,xe),mn=Oe.max,gn=Oe.min,bn=ie.now,_n=t.parseInt,En=Oe.random,wn=De.reverse,On=co(t,"DataView"),xn=co(t,"Map"),In=co(t,"Promise"),Tn=co(t,"Set"),Sn=co(t,"WeakMap"),Dn=co(xe,"create"),kn=Sn&&new Sn,An={},Nn=Mo(On),Pn=Mo(xn),Rn=Mo(In),Cn=Mo(Tn),Fn=Mo(Sn),jn=Ve?Ve.prototype:i,Un=jn?jn.valueOf:i,Ln=jn?jn.toString:i;function Mn(e){if(ns(e)&&!Wa(e)&&!(e instanceof Qn)){if(e instanceof Bn)return e;if(Re.call(e,"__wrapped__"))return qo(e)}return new Bn(e)}var qn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function zn(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])}}function Wn(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])}}function Gn(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])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Yn(e,t){var n=Wa(e),r=!n&&za(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Vt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Gr(0,t-1)]:i}function Hn(e,t){return Co(Si(e),ar(t,0,e.length))}function Xn(e){return Co(Si(e))}function Zn(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Re.call(e,t)&&Va(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Di(t,Ps(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:Ss(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!ts(e))return e;var f=Wa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Si(e,s)}else{var p=po(e),h=p==_||p==E;if(Ya(e))return Ei(e,u);if(p==x||p==v||h&&!o){if(s=c||h?{}:vo(e),!u)return c?function(e,t){return Di(e,fo(e),t)}(e,function(e,t){return e&&Di(t,Rs(t),e)}(s,e)):function(e,t){return Di(e,lo(e),t)}(e,rr(s,e))}else{if(!Ze[p])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case N:return wi(e);case m:case g:return new i(+e);case P:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case C:case F:case j:case U:case L:case M:case q:case V:return Oi(e,n);case w:return new i;case O:case D:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new i;case k:return r=e,Un?xe(Un.call(r)):{}}}(e,p,u)}}a||(a=new Kn);var d=a.get(e);if(d)return d;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,a))}));var y=f?i:(l?c?no:to:c?Rs:Ps)(e);return bt(y||e,(function(r,i){y&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=xe(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Se(o);return Ao((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=It(t,Qt(n))),r?(o=xt,a=!1):t.length>=200&&(o=Wt,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Mn.templateSettings={escape:Y,evaluate:J,interpolate:H,variable:"",imports:{_:Mn}},Mn.prototype=Vn.prototype,Mn.prototype.constructor=Mn,Bn.prototype=qn(Vn.prototype),Bn.prototype.constructor=Bn,Qn.prototype=qn(Vn.prototype),Qn.prototype.constructor=Qn,zn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(Dn){var n=t[e];return n===a?i:n}return Re.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return Dn?t[e]!==i:Re.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dn&&t===i?a:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Wn.prototype.has=function(e){return tr(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(xn||Wn),string:new zn}},Gn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return so(this,e).get(e)},Gn.prototype.has=function(e){return so(this,e).has(e)},Gn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),pr=Ni(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):Tt(i,s):r||(i[i.length]=s)}return i}var mr=Pi(),gr=Pi(!0);function br(e,t){return e&&mr(e,t,Ps)}function _r(e,t){return e&&gr(e,t,Ps)}function Er(e,t){return wt(t,(function(t){return Xa(e[t])}))}function wr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[Lo(t[n++])];return n&&n==r?e:i}function Or(e,t,n){var r=t(e);return Wa(e)?r:Tt(r,n(e))}function xr(e){return null==e?e===i?"[object Undefined]":"[object Null]":st&&st in xe(e)?function(e){var t=Re.call(e,st),n=e[st];try{e[st]=i;var r=!0}catch(e){}var o=je.call(e);return r&&(t?e[st]=n:delete e[st]),o}(e):function(e){return je.call(e)}(e)}function Ir(e,t){return e>t}function Tr(e,t){return null!=e&&Re.call(e,t)}function Sr(e,t){return null!=e&&t in xe(e)}function Dr(e,t,n){for(var o=n?xt:Ot,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=It(p,Qt(t))),l=gn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new $n(u&&p):i}p=e[0];var h=-1,d=c[0];e:for(;++h<a&&f.length<l;){var v=p[h],y=t?t(v):v;if(v=n||0!==v?v:0,!(d?Wt(d,y):o(f,y,n))){for(u=s;--u;){var m=c[u];if(!(m?Wt(m,y):o(e[u],y,n)))continue e}d&&d.push(y),f.push(v)}}return f}function kr(e,t,n){var r=null==(e=To(e,t=mi(t,e)))?e:e[Lo(Ho(t))];return null==r?i:mt(r,e,n)}function Ar(e){return ns(e)&&xr(e)==v}function Nr(e,t,n,r,o){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Wa(e),u=Wa(t),c=s?y:po(e),l=u?y:po(t),f=(c=c==v?x:c)==x,p=(l=l==v?x:l)==x,h=c==l;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Kn),s||ls(e)?Zi(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case m:case g:case O:return Va(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case D:return e==t+"";case w:var s=Zt;case S:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Zi(s(e),s(t),r,i,o,a);return a.delete(e),l;case k:if(Un)return Un.call(e)==Un.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var d=f&&Re.call(e,"__wrapped__"),_=p&&Re.call(t,"__wrapped__");if(d||_){var E=d?e.value():e,I=_?t.value():t;return a||(a=new Kn),o(E,I,n,r,a)}}return!!h&&(a||(a=new Kn),function(e,t,n,r,o,a){var s=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Re.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var y=e[f=u[l]],m=t[f];if(r)var g=s?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(!(g===i?y===m||o(y,m,n,r,a):g)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(e),a.delete(t),d}(e,t,n,r,o,a))}(e,t,n,r,Nr,o))}function Pr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=xe(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Kn;if(r)var h=r(l,f,c,e,t,p);if(!(h===i?Nr(f,l,3,r,p):h))return!1}}return!0}function Rr(e){return!(!ts(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?Me:ve).test(Mo(e));var t}function Cr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Wa(e)?Mr(e[0],e[1]):Lr(e):hu(e)}function Fr(e){if(!wo(e))return yn(e);var t=[];for(var n in xe(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Ur(e,t){var n=-1,i=$a(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Lr(e){var t=uo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Mr(e,t){return bo(e)&&Oo(t)?xo(Lo(e),t):function(n){var r=Ss(n,e);return r===i&&r===t?Ds(n,e):Nr(t,r,3)}}function qr(e,t,n,r,o){e!==t&&mr(t,(function(a,s){if(o||(o=new Kn),ts(a))!function(e,t,n,r,o,a,s){var u=Do(e,n),c=Do(t,n),l=s.get(c);if(l)Zn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):i,p=f===i;if(p){var h=Wa(c),d=!h&&Ya(c),v=!h&&!d&&ls(c);f=c,h||d||v?Wa(u)?f=u:Ka(u)?f=Si(u):d?(p=!1,f=Ei(c,!0)):v?(p=!1,f=Oi(c,!0)):f=[]:os(c)||za(c)?(f=u,za(u)?f=gs(u):ts(u)&&!Xa(u)||(f=vo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c)),Zn(e,n,f)}}(e,t,s,n,qr,r,o);else{var u=r?r(Do(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Zn(e,s,u)}}),Rs)}function Vr(e,t){var n=e.length;if(n)return mo(t+=t<0?n:0,n)?e[t]:i}function Br(e,t,n){t=t.length?It(t,(function(e){return Wa(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;t=It(t,Qt(ao()));var i=Ur(e,(function(e,n,i){var o=It(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=wr(e,a);n(s,a)&&Hr(o,mi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ct:Rt,o=-1,a=t.length,s=e;for(e===t&&(t=Si(t)),n&&(s=It(e,Qt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;mo(i)?rt.call(e,i,1):ci(e,i)}}return e}function Gr(e,t){return e+fn(En()*(t-e+1))}function $r(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return No(Io(e,t,iu),e+"")}function Yr(e){return Jn(Vs(e))}function Jr(e,t){var n=Vs(e);return Co(n,ar(t,0,n.length))}function Hr(e,t,n,r){if(!ts(e))return e;for(var o=-1,a=(t=mi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Lo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ts(f)?f:mo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Xr=kn?function(e,t){return kn.set(e,t),e}:iu,Zr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Co(Vs(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===i;o<a;){var f=fn((o+a)/2),p=n(e[f]),h=p!==i,d=null===p,v=p==p,y=cs(p);if(s)var m=r||v;else m=l?v&&(r||h):u?v&&h&&(r||!d):c?v&&h&&!d&&(r||!y):!d&&!y&&(r?p<=t:p<t);m?o=f+1:a=f}return gn(a,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ai(e){return"number"==typeof e?e:cs(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Wa(e))return It(e,si)+"";if(cs(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=xt;else if(o>=200){var c=t?null:$i(e);if(c)return nn(c);a=!1,i=Wt,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function ci(e,t){return null==(e=To(e,t=mi(t,e)))||delete e[Lo(Ho(t))]}function li(e,t,n,r){return Hr(e,t,n(wr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Qn&&(n=n.value()),St(t,(function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=lr(a[o]||s,e[u],t,n));return ui(yr(a,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function vi(e){return Ka(e)?e:[]}function yi(e){return"function"==typeof e?e:iu}function mi(e,t){return Wa(e)?e:bo(e,t)?[e]:Uo(bs(e))}var gi=Kr;function bi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function Oi(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=cs(e),s=t!==i,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ii(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=t.length,l=mn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ti(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=mn(a-u,0),p=r(f+l),h=!i;++o<f;)p[o]=e[o];for(var d=o;++c<l;)p[d+c]=t[c];for(;++s<u;)(h||o<a)&&(p[d+n[s]]=e[o++]);return p}function Si(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Di(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function ki(e,t){return function(n,r){var i=Wa(n)?gt:nr,o=t?t():{};return i(n,e,ao(r,2),o)}}function Ai(e){return Kr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&go(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=xe(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!$a(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=xe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(e){return function(t,n,r){for(var i=-1,o=xe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Ri(e){return function(t){var n=Xt(t=bs(t))?an(t):i,r=n?n[0]:t.charAt(0),o=n?bi(n,1).join(""):t.slice(1);return r[e]()+o}}function Ci(e){return function(t){return St(Xs(zs(t).replace(ze,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=qn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function ji(e){return function(t,n,r){var o=xe(t);if(!$a(t)){var a=ao(n,3);t=Ps(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Ui(e){return eo((function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Se(o);if(a&&!u&&"wrapper"==io(s))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var c=io(s=t[r]),l="wrapper"==c?ro(s):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Li(e,t,n,o,a,s,u,l,f,p){var h=t&c,d=1&t,v=2&t,y=24&t,m=512&t,g=v?i:Fi(e);return function i(){for(var c=arguments.length,b=r(c),_=c;_--;)b[_]=arguments[_];if(y)var E=oo(i),w=Kt(b,E);if(o&&(b=Ii(b,o,a,y)),s&&(b=Ti(b,s,u,y)),c-=w,y&&c<p){var O=tn(b,E);return Wi(e,t,Li,i.placeholder,n,b,O,l,f,p-c)}var x=d?n:this,I=v?x[e]:e;return c=b.length,l?b=So(b,l):m&&c>1&&b.reverse(),h&&f<c&&(b.length=f),this&&this!==ot&&this instanceof i&&(I=g||Fi(I)),I.apply(x,b)}}function Mi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ai(n),r=ai(r)),o=e(n,r)}return o}}function Vi(e){return eo((function(t){return t=It(t,Qt(ao())),Kr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function Bi(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?$r(t,e):t;var r=$r(t,ln(e/on(t)));return Xt(t)?bi(an(r),0,e).join(""):r.slice(0,e)}function Qi(e){return function(t,n,o){return o&&"number"!=typeof o&&go(t,n,o)&&(n=o=i),t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n,i){for(var o=-1,a=mn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:ds(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Wi(e,t,n,r,o,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var h=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,c,l,f],d=n.apply(i,h);return _o(e)&&ko(d,h),d.placeholder=r,Po(d,e,t)}function Gi(e){var t=Oe[e];return function(e,n){if(e=ms(e),(n=null==n?0:gn(vs(n),292))&&dn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $i=Tn&&1/nn(new Tn([,-0]))[1]==l?function(e){return new Tn(e)}:cu;function Ki(e){return function(t){var n=po(t);return n==w?Zt(t):n==S?rn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,a,l,f,p,h){var d=2&t;if(!d&&"function"!=typeof e)throw new Se(o);var v=a?a.length:0;if(v||(t&=-97,a=l=i),p=p===i?p:mn(vs(p),0),h=h===i?h:vs(h),v-=l?l.length:0,64&t){var y=a,m=l;a=l=i}var g=d?i:ro(e),b=[e,t,n,a,l,y,m,f,p,h];if(g&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ii(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ti(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,g),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(h=b[9]=b[9]===i?d?0:e.length:mn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Fi(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=oo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Wi(e,t,Li,a.placeholder,i,u,f,i,i,n-s):mt(this&&this!==ot&&this instanceof a?o:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?Li.apply(i,b):function(e,t,n,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ot&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return mt(p,o?n:this,f)}}(e,t,n,a);else var _=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Po((g?Xr:ko)(_,b),e,t)}function Ji(e,t,n,r){return e===i||Va(e,Ae[n])&&!Re.call(r,n)?t:e}function Hi(e,t,n,r,o,a){return ts(e)&&ts(t)&&(a.set(t,e),qr(e,t,i,Hi,a),a.delete(t)),e}function Xi(e){return os(e)?i:e}function Zi(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],y=t[p];if(r)var m=s?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==i){if(m)continue;h=!1;break}if(d){if(!kt(t,(function(e,t){if(!Wt(d,t)&&(v===e||o(v,e,n,r,a)))return d.push(t)}))){h=!1;break}}else if(v!==y&&!o(v,y,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function eo(e){return No(Io(e,i,Go),e+"")}function to(e){return Or(e,Ps,lo)}function no(e){return Or(e,Rs,fo)}var ro=kn?function(e){return kn.get(e)}:cu;function io(e){for(var t=e.name+"",n=An[t],r=Re.call(An,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Re.call(Mn,"placeholder")?Mn:e).placeholder}function ao(){var e=Mn.iteratee||ou;return e=e===ou?Cr:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Oo(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Rr(n)?n:i}var lo=pn?function(e){return null==e?[]:(e=xe(e),wt(pn(e),(function(t){return et.call(e,t)})))}:yu,fo=pn?function(e){for(var t=[];e;)Tt(t,lo(e)),e=Ge(e);return t}:yu,po=xr;function ho(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var a=Lo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&es(i)&&mo(a,i)&&(Wa(e)||za(e))}function vo(e){return"function"!=typeof e.constructor||wo(e)?{}:qn(Ge(e))}function yo(e){return Wa(e)||za(e)||!!(it&&e&&e[it])}function mo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function go(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?$a(n)&&mo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function bo(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||Z.test(e)||!X.test(e)||null!=t&&e in xe(t)}function _o(e){var t=io(e),n=Mn[t];if("function"!=typeof n||!(t in Qn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(On&&po(new On(new ArrayBuffer(1)))!=P||xn&&po(new xn)!=w||In&&po(In.resolve())!=I||Tn&&po(new Tn)!=S||Sn&&po(new Sn)!=A)&&(po=function(e){var t=xr(e),n=t==x?e.constructor:i,r=n?Mo(n):"";if(r)switch(r){case Nn:return P;case Pn:return w;case Rn:return I;case Cn:return S;case Fn:return A}return t});var Eo=Ne?Xa:mu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!ts(e)}function xo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in xe(n))}}function Io(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=mn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),mt(e,this,u)}}function To(e,t){return t.length<2?e:wr(e,ti(t,0,-1))}function So(e,t){for(var n=e.length,r=gn(t.length,n),o=Si(e);r--;){var a=t[r];e[r]=mo(a,n)?o[a]:i}return e}function Do(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ko=Ro(Xr),Ao=Lt||function(e,t){return ot.setTimeout(e,t)},No=Ro(Zr);function Po(e,t,n){var r=t+"";return No(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(d,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Co(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Gr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Fo,jo,Uo=(Fo=Fa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===jo.size&&jo.clear(),e})),jo=Fo.cache,Fo);function Lo(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Qn)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Si(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Kr((function(e,t){return Ka(e)?lr(e,yr(t,1,Ka,!0)):[]})),Bo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),ao(n,2)):[]})),Qo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),i,n):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Pt(e,ao(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vs(n),o=n<0?mn(r+o,0):gn(o,r-1)),Pt(e,ao(t,3),o,!0)}function Go(e){return null!=e&&e.length?yr(e,1):[]}function $o(e){return e&&e.length?e[0]:i}var Ko=Kr((function(e){var t=It(e,vi);return t.length&&t[0]===e[0]?Dr(t):[]})),Yo=Kr((function(e){var t=Ho(e),n=It(e,vi);return t===Ho(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Dr(n,ao(t,2)):[]})),Jo=Kr((function(e){var t=Ho(e),n=It(e,vi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Dr(n,i,t):[]}));function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var ea=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Wr(e,It(t,(function(e){return mo(e,n)?+e:e})).sort(xi)),r}));function ta(e){return null==e?e:wn.call(e)}var na=Kr((function(e){return ui(yr(e,1,Ka,!0))})),ra=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),ui(yr(e,1,Ka,!0),ao(t,2))})),ia=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,ui(yr(e,1,Ka,!0),i,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Ka(e))return t=mn(e.length,t),!0})),Vt(t,(function(t){return It(e,Ut(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:It(n,(function(e){return mt(t,i,e)}))}var sa=Kr((function(e,t){return Ka(e)?lr(e,t):[]})),ua=Kr((function(e){return hi(wt(e,Ka))})),ca=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),hi(wt(e,Ka),ao(t,2))})),la=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,hi(wt(e,Ka),i,t)})),fa=Kr(oa),pa=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function ha(e){var t=Mn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var va=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Qn&&mo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ya=ki((function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)})),ma=ji(zo),ga=ji(Wo);function ba(e,t){return(Wa(e)?bt:fr)(e,ao(t,3))}function _a(e,t){return(Wa(e)?_t:pr)(e,ao(t,3))}var Ea=ki((function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])})),wa=Kr((function(e,t,n){var i=-1,o="function"==typeof t,a=$a(e)?r(e.length):[];return fr(e,(function(e){a[++i]=o?mt(t,e,n):kr(e,t,n)})),a})),Oa=ki((function(e,t,n){ir(e,n,t)}));function xa(e,t){return(Wa(e)?It:Ur)(e,ao(t,3))}var Ia=ki((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ta=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&go(e,t[0],t[1])?t=[]:n>2&&go(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,yr(t,1),[])})),Sa=At||function(){return ot.Date.now()};function Da(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,c,i,i,i,i,t)}function ka(e,t){var n;if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Aa=Kr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Aa));r|=u}return Yi(e,r,t,n,i)})),Na=Kr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Na));r|=u}return Yi(t,r,e,n,i)}));function Pa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Se(o);function v(t){var n=r,o=a;return r=a=i,f=t,u=e.apply(o,n)}function y(e){return f=e,c=Ao(g,t),p?v(e):u}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-f>=s}function g(){var e=Sa();if(m(e))return b(e);c=Ao(g,function(e){var n=t-(e-l);return h?gn(n,s-(e-f)):n}(e))}function b(e){return c=i,d&&r?v(e):(r=a=i,u)}function _(){var e=Sa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return y(l);if(h)return _i(c),c=Ao(g,t),v(l)}return c===i&&(c=Ao(g,t)),u}return t=ms(t)||0,ts(n)&&(p=!!n.leading,s=(h="maxWait"in n)?mn(ms(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){c!==i&&_i(c),f=0,r=l=a=c=i},_.flush=function(){return c===i?u:b(Sa())},_}var Ra=Kr((function(e,t){return cr(e,1,t)})),Ca=Kr((function(e,t,n){return cr(e,ms(t)||0,n)}));function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Se(o);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(Fa.Cache||Gn),n}function ja(e){if("function"!=typeof e)throw new Se(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=Gn;var Ua=gi((function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Qt(ao())):It(yr(t,1),Qt(ao()))).length;return Kr((function(r){for(var i=-1,o=gn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),La=Kr((function(e,t){var n=tn(t,oo(La));return Yi(e,u,i,t,n)})),Ma=Kr((function(e,t){var n=tn(t,oo(Ma));return Yi(e,64,i,t,n)})),qa=eo((function(e,t){return Yi(e,256,i,i,i,t)}));function Va(e,t){return e===t||e!=e&&t!=t}var Ba=zi(Ir),Qa=zi((function(e,t){return e>=t})),za=Ar(function(){return arguments}())?Ar:function(e){return ns(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Wa=r.isArray,Ga=ft?Qt(ft):function(e){return ns(e)&&xr(e)==N};function $a(e){return null!=e&&es(e.length)&&!Xa(e)}function Ka(e){return ns(e)&&$a(e)}var Ya=hn||mu,Ja=pt?Qt(pt):function(e){return ns(e)&&xr(e)==g};function Ha(e){if(!ns(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Xa(e){if(!ts(e))return!1;var t=xr(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=ht?Qt(ht):function(e){return ns(e)&&po(e)==w};function is(e){return"number"==typeof e||ns(e)&&xr(e)==O}function os(e){if(!ns(e)||xr(e)!=x)return!1;var t=Ge(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==Ue}var as=dt?Qt(dt):function(e){return ns(e)&&xr(e)==T},ss=vt?Qt(vt):function(e){return ns(e)&&po(e)==S};function us(e){return"string"==typeof e||!Wa(e)&&ns(e)&&xr(e)==D}function cs(e){return"symbol"==typeof e||ns(e)&&xr(e)==k}var ls=yt?Qt(yt):function(e){return ns(e)&&es(e.length)&&!!Xe[xr(e)]},fs=zi(jr),ps=zi((function(e,t){return e<=t}));function hs(e){if(!e)return[];if($a(e))return us(e)?an(e):Si(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=po(e);return(t==w?Zt:t==S?nn:Vs)(e)}function ds(e){return e?(e=ms(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ys(e){return e?ar(vs(e),0,h):0}function ms(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Bt(e);var n=de.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):he.test(e)?p:+e}function gs(e){return Di(e,Rs(e))}function bs(e){return null==e?"":si(e)}var _s=Ai((function(e,t){if(wo(t)||$a(t))Di(t,Ps(t),e);else for(var n in t)Re.call(t,n)&&er(e,n,t[n])})),Es=Ai((function(e,t){Di(t,Rs(t),e)})),ws=Ai((function(e,t,n,r){Di(t,Rs(t),e,r)})),Os=Ai((function(e,t,n,r){Di(t,Ps(t),e,r)})),xs=eo(or),Is=Kr((function(e,t){e=xe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&go(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||Va(f,Ae[l])&&!Re.call(e,l))&&(e[l]=a[l])}return e})),Ts=Kr((function(e){return e.push(i,Hi),mt(Fs,i,e)}));function Ss(e,t,n){var r=null==e?i:wr(e,t);return r===i?n:r}function Ds(e,t){return null!=e&&ho(e,t,Sr)}var ks=Mi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),tu(iu)),As=Mi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),ao),Ns=Kr(kr);function Ps(e){return $a(e)?Yn(e):Fr(e)}function Rs(e){return $a(e)?Yn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}(e)}var Cs=Ai((function(e,t,n){qr(e,t,n)})),Fs=Ai((function(e,t,n,r){qr(e,t,n,r)})),js=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Di(e,no(e),n),r&&(n=sr(n,7,Xi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Us=eo((function(e,t){return null==e?{}:function(e,t){return Qr(e,t,(function(t,n){return Ds(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=It(no(e),(function(e){return[e]}));return t=ao(t),Qr(e,n,(function(e,n){return t(e,n[0])}))}var Ms=Ki(Ps),qs=Ki(Rs);function Vs(e){return null==e?[]:zt(e,Ps(e))}var Bs=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Qs(t):t)}));function Qs(e){return Hs(bs(e).toLowerCase())}function zs(e){return(e=bs(e))&&e.replace(ge,Yt).replace(We,"")}var Ws=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$s=Ri("toLowerCase"),Ks=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Ci((function(e,t,n){return e+(n?" ":"")+Hs(t)})),Js=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Hs=Ri("toUpperCase");function Xs(e,t,n){return e=bs(e),(t=n?i:t)===i?function(e){return Ye.test(e)}(e)?function(e){return e.match($e)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Zs=Kr((function(e,t){try{return mt(e,i,t)}catch(e){return Ha(e)?e:new Ee(e)}})),eu=eo((function(e,t){return bt(t,(function(t){t=Lo(t),ir(e,t,Aa(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Ui(),ru=Ui(!0);function iu(e){return e}function ou(e){return Cr("function"==typeof e?e:sr(e,1))}var au=Kr((function(e,t){return function(n){return kr(n,e,t)}})),su=Kr((function(e,t){return function(n){return kr(e,n,t)}}));function uu(e,t,n){var r=Ps(t),i=Er(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Ps(t)));var o=!(ts(n)&&"chain"in n&&!n.chain),a=Xa(e);return bt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Si(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function cu(){}var lu=Vi(It),fu=Vi(Et),pu=Vi(kt);function hu(e){return bo(e)?Ut(Lo(e)):function(e){return function(t){return wr(t,e)}}(e)}var du=Qi(),vu=Qi(!0);function yu(){return[]}function mu(){return!1}var gu,bu=qi((function(e,t){return e+t}),0),_u=Gi("ceil"),Eu=qi((function(e,t){return e/t}),1),wu=Gi("floor"),Ou=qi((function(e,t){return e*t}),1),xu=Gi("round"),Iu=qi((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=Da,Mn.assign=_s,Mn.assignIn=Es,Mn.assignInWith=ws,Mn.assignWith=Os,Mn.at=xs,Mn.before=ka,Mn.bind=Aa,Mn.bindAll=eu,Mn.bindKey=Na,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Mn.chain=ha,Mn.chunk=function(e,t,n){t=(n?go(e,t,n):t===i)?1:mn(vs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=r(ln(o/t));a<o;)u[s++]=ti(e,a,a+=t);return u},Mn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Tt(Wa(n)?Si(n):[n],yr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ao();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Se(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},Mn.conforms=function(e){return function(e){var t=Ps(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Mn.constant=tu,Mn.countBy=ya,Mn.create=function(e,t){var n=qn(e);return null==t?n:rr(n,t)},Mn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Mn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Mn.debounce=Pa,Mn.defaults=Is,Mn.defaultsDeep=Ts,Mn.defer=Ra,Mn.delay=Ca,Mn.difference=Vo,Mn.differenceBy=Bo,Mn.differenceWith=Qo,Mn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:vs(t))<0?0:t,r):[]},Mn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:vs(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0):[]},Mn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&go(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=vs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vs(r))<0&&(r+=o),r=n>r?0:ys(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Mn.filter=function(e,t){return(Wa(e)?wt:vr)(e,ao(t,3))},Mn.flatMap=function(e,t){return yr(xa(e,t),1)},Mn.flatMapDeep=function(e,t){return yr(xa(e,t),l)},Mn.flatMapDepth=function(e,t,n){return n=n===i?1:vs(n),yr(xa(e,t),n)},Mn.flatten=Go,Mn.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Mn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===i?1:vs(t)):[]},Mn.flip=function(e){return Yi(e,512)},Mn.flow=nu,Mn.flowRight=ru,Mn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Mn.functions=function(e){return null==e?[]:Er(e,Ps(e))},Mn.functionsIn=function(e){return null==e?[]:Er(e,Rs(e))},Mn.groupBy=Ea,Mn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Mn.intersection=Ko,Mn.intersectionBy=Yo,Mn.intersectionWith=Jo,Mn.invert=ks,Mn.invertBy=As,Mn.invokeMap=wa,Mn.iteratee=ou,Mn.keyBy=Oa,Mn.keys=Ps,Mn.keysIn=Rs,Mn.map=xa,Mn.mapKeys=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Mn.mapValues=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Mn.matches=function(e){return Lr(sr(e,1))},Mn.matchesProperty=function(e,t){return Mr(e,sr(t,1))},Mn.memoize=Fa,Mn.merge=Cs,Mn.mergeWith=Fs,Mn.method=au,Mn.methodOf=su,Mn.mixin=uu,Mn.negate=ja,Mn.nthArg=function(e){return e=vs(e),Kr((function(t){return Vr(t,e)}))},Mn.omit=js,Mn.omitBy=function(e,t){return Ls(e,ja(ao(t)))},Mn.once=function(e){return ka(2,e)},Mn.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Br(e,t,n))},Mn.over=lu,Mn.overArgs=Ua,Mn.overEvery=fu,Mn.overSome=pu,Mn.partial=La,Mn.partialRight=Ma,Mn.partition=Ia,Mn.pick=Us,Mn.pickBy=Ls,Mn.property=hu,Mn.propertyOf=function(e){return function(t){return null==e?i:wr(e,t)}},Mn.pull=Xo,Mn.pullAll=Zo,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,ao(n,2)):e},Mn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Mn.pullAt=ea,Mn.range=du,Mn.rangeRight=vu,Mn.rearg=qa,Mn.reject=function(e,t){return(Wa(e)?wt:vr)(e,ja(ao(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ao(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Wr(e,i),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new Se(o);return Kr(e,t=t===i?t:vs(t))},Mn.reverse=ta,Mn.sampleSize=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),(Wa(e)?Hn:Jr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Hr(e,t,n)},Mn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Hr(e,t,n,r)},Mn.shuffle=function(e){return(Wa(e)?Xn:ei)(e)},Mn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&go(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===i?r:vs(n)),ti(e,t,n)):[]},Mn.sortBy=Ta,Mn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,ao(t,2)):[]},Mn.split=function(e,t,n){return n&&"number"!=typeof n&&go(e,t,n)&&(t=n=i),(n=n===i?h:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=si(t))&&Xt(e)?bi(an(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new Se(o);return t=null==t?0:mn(vs(t),0),Kr((function(n){var r=n[t],i=bi(n,0,t);return r&&Tt(i,r),mt(e,this,i)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:vs(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:vs(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?fi(e,ao(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Se(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:r,maxWait:t,trailing:i})},Mn.thru=da,Mn.toArray=hs,Mn.toPairs=Ms,Mn.toPairsIn=qs,Mn.toPath=function(e){return Wa(e)?It(e,Lo):cs(e)?[e]:Si(Uo(bs(e)))},Mn.toPlainObject=gs,Mn.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||ls(e);if(t=ao(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ts(e)&&Xa(o)?qn(Ge(e)):{}}return(i?bt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Mn.unary=function(e){return Da(e,1)},Mn.union=na,Mn.unionBy=ra,Mn.unionWith=ia,Mn.uniq=function(e){return e&&e.length?ui(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?ui(e,ao(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Mn.unset=function(e,t){return null==e||ci(e,t)},Mn.unzip=oa,Mn.unzipWith=aa,Mn.update=function(e,t,n){return null==e?e:li(e,t,yi(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,yi(n),r)},Mn.values=Vs,Mn.valuesIn=function(e){return null==e?[]:zt(e,Rs(e))},Mn.without=sa,Mn.words=Xs,Mn.wrap=function(e,t){return La(yi(t),e)},Mn.xor=ua,Mn.xorBy=ca,Mn.xorWith=la,Mn.zip=fa,Mn.zipObject=function(e,t){return di(e||[],t||[],er)},Mn.zipObjectDeep=function(e,t){return di(e||[],t||[],Hr)},Mn.zipWith=pa,Mn.entries=Ms,Mn.entriesIn=qs,Mn.extend=Es,Mn.extendWith=ws,uu(Mn,Mn),Mn.add=bu,Mn.attempt=Zs,Mn.camelCase=Bs,Mn.capitalize=Qs,Mn.ceil=_u,Mn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))==n?n:0),t!==i&&(t=(t=ms(t))==t?t:0),ar(ms(e),t,n)},Mn.clone=function(e){return sr(e,4)},Mn.cloneDeep=function(e){return sr(e,5)},Mn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Mn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Mn.conformsTo=function(e,t){return null==t||ur(e,t,Ps(t))},Mn.deburr=zs,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=Eu,Mn.endsWith=function(e,t,n){e=bs(e),t=si(t);var r=e.length,o=n=n===i?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Mn.eq=Va,Mn.escape=function(e){return(e=bs(e))&&K.test(e)?e.replace(G,Jt):e},Mn.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,n){var r=Wa(e)?Et:hr;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Mn.find=ma,Mn.findIndex=zo,Mn.findKey=function(e,t){return Nt(e,ao(t,3),br)},Mn.findLast=ga,Mn.findLastIndex=Wo,Mn.findLastKey=function(e,t){return Nt(e,ao(t,3),_r)},Mn.floor=wu,Mn.forEach=ba,Mn.forEachRight=_a,Mn.forIn=function(e,t){return null==e?e:mr(e,ao(t,3),Rs)},Mn.forInRight=function(e,t){return null==e?e:gr(e,ao(t,3),Rs)},Mn.forOwn=function(e,t){return e&&br(e,ao(t,3))},Mn.forOwnRight=function(e,t){return e&&_r(e,ao(t,3))},Mn.get=Ss,Mn.gt=Ba,Mn.gte=Qa,Mn.has=function(e,t){return null!=e&&ho(e,t,Tr)},Mn.hasIn=Ds,Mn.head=$o,Mn.identity=iu,Mn.includes=function(e,t,n,r){e=$a(e)?e:Vs(e),n=n&&!r?vs(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),us(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Rt(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Rt(e,t,i)},Mn.inRange=function(e,t,n){return t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n){return e>=gn(t,n)&&e<mn(t,n)}(e=ms(e),t,n)},Mn.invoke=Ns,Mn.isArguments=za,Mn.isArray=Wa,Mn.isArrayBuffer=Ga,Mn.isArrayLike=$a,Mn.isArrayLikeObject=Ka,Mn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&xr(e)==m},Mn.isBuffer=Ya,Mn.isDate=Ja,Mn.isElement=function(e){return ns(e)&&1===e.nodeType&&!os(e)},Mn.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ls(e)||za(e)))return!e.length;var t=po(e);if(t==w||t==S)return!e.size;if(wo(e))return!Fr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Nr(e,t)},Mn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Mn.isError=Ha,Mn.isFinite=function(e){return"number"==typeof e&&dn(e)},Mn.isFunction=Xa,Mn.isInteger=Za,Mn.isLength=es,Mn.isMap=rs,Mn.isMatch=function(e,t){return e===t||Pr(e,t,uo(t))},Mn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Pr(e,t,uo(t),n)},Mn.isNaN=function(e){return is(e)&&e!=+e},Mn.isNative=function(e){if(Eo(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=is,Mn.isObject=ts,Mn.isObjectLike=ns,Mn.isPlainObject=os,Mn.isRegExp=as,Mn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=f},Mn.isSet=ss,Mn.isString=us,Mn.isSymbol=cs,Mn.isTypedArray=ls,Mn.isUndefined=function(e){return e===i},Mn.isWeakMap=function(e){return ns(e)&&po(e)==A},Mn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==xr(e)},Mn.join=function(e,t){return null==e?"":vn.call(e,t)},Mn.kebabCase=Ws,Mn.last=Ho,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vs(n))<0?mn(r+o,0):gn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Mn.lowerCase=Gs,Mn.lowerFirst=$s,Mn.lt=fs,Mn.lte=ps,Mn.max=function(e){return e&&e.length?dr(e,iu,Ir):i},Mn.maxBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Ir):i},Mn.mean=function(e){return jt(e,iu)},Mn.meanBy=function(e,t){return jt(e,ao(t,2))},Mn.min=function(e){return e&&e.length?dr(e,iu,jr):i},Mn.minBy=function(e,t){return e&&e.length?dr(e,ao(t,2),jr):i},Mn.stubArray=yu,Mn.stubFalse=mu,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=Ou,Mn.nth=function(e,t){return e&&e.length?Vr(e,vs(t)):i},Mn.noConflict=function(){return ot._===this&&(ot._=Le),this},Mn.noop=cu,Mn.now=Sa,Mn.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Bi(fn(i),n)+e+Bi(ln(i),n)},Mn.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Bi(t-r,n):e},Mn.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Bi(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(bs(e).replace(re,""),t||0)},Mn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&go(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ds(e),t===i?(t=e,e=0):t=ds(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return gn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Mn.reduce=function(e,t,n){var r=Wa(e)?St:Mt,i=arguments.length<3;return r(e,ao(t,4),n,i,fr)},Mn.reduceRight=function(e,t,n){var r=Wa(e)?Dt:Mt,i=arguments.length<3;return r(e,ao(t,4),n,i,pr)},Mn.repeat=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),$r(bs(e),t)},Mn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Lo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Mn.round=xu,Mn.runInContext=e,Mn.sample=function(e){return(Wa(e)?Jn:Yr)(e)},Mn.size=function(e){if(null==e)return 0;if($a(e))return us(e)?on(e):e.length;var t=po(e);return t==w||t==S?e.size:Fr(e).length},Mn.snakeCase=Ks,Mn.some=function(e,t,n){var r=Wa(e)?kt:ni;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Mn.sortedIndex=function(e,t){return ri(e,t)},Mn.sortedIndexBy=function(e,t,n){return ii(e,t,ao(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Va(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return ii(e,t,ao(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Mn.startCase=Ys,Mn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Mn.subtract=Iu,Mn.sum=function(e){return e&&e.length?qt(e,iu):0},Mn.sumBy=function(e,t){return e&&e.length?qt(e,ao(t,2)):0},Mn.template=function(e,t,n){var r=Mn.templateSettings;n&&go(e,t,n)&&(t=i),e=bs(e),t=ws({},t,r,Ji);var o,a,s=ws({},t.imports,r.imports,Ji),u=Ps(s),c=zt(s,u),l=0,f=t.interpolate||be,p="__p += '",h=Ie((t.escape||be).source+"|"+f.source+"|"+(f===H?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),d="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),p+=e.slice(l,u).replace(_e,Ht),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Re.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new Ee("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(B,""):p).replace(Q,"$1").replace(z,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Zs((function(){return we(u,d+"return "+p).apply(i,c)}));if(y.source=p,Ha(y))throw y;return y},Mn.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=h,r=gn(e,h);t=ao(t),e-=h;for(var i=Vt(r,t);++n<e;)t(n);return i},Mn.toFinite=ds,Mn.toInteger=vs,Mn.toLength=ys,Mn.toLower=function(e){return bs(e).toLowerCase()},Mn.toNumber=ms,Mn.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Mn.toString=bs,Mn.toUpper=function(e){return bs(e).toUpperCase()},Mn.trim=function(e,t,n){if((e=bs(e))&&(n||t===i))return Bt(e);if(!e||!(t=si(t)))return e;var r=an(e),o=an(t);return bi(r,Gt(r,o),$t(r,o)+1).join("")},Mn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.slice(0,sn(e)+1);if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,0,$t(r,an(t))+1).join("")},Mn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,Gt(r,an(t))).join("")},Mn.truncate=function(e,t){var n=30,r="...";if(ts(t)){var o="separator"in t?t.separator:o;n="length"in t?vs(t.length):n,r="omission"in t?si(t.omission):r}var a=(e=bs(e)).length;if(Xt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?bi(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Mn.unescape=function(e){return(e=bs(e))&&$.test(e)?e.replace(W,un):e},Mn.uniqueId=function(e){var t=++Ce;return bs(e)+t},Mn.upperCase=Js,Mn.upperFirst=Hs,Mn.each=ba,Mn.eachRight=_a,Mn.first=$o,uu(Mn,(gu={},br(Mn,(function(e,t){Re.call(Mn.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),Mn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),bt(["drop","take"],(function(e,t){Qn.prototype[e]=function(n){n=n===i?1:mn(vs(n),0);var r=this.__filtered__&&!t?new Qn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Qn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Qn.prototype[e]=function(){return this.__filtered__?new Qn(this):this[n](1)}})),Qn.prototype.compact=function(){return this.filter(iu)},Qn.prototype.find=function(e){return this.filter(e).head()},Qn.prototype.findLast=function(e){return this.reverse().find(e)},Qn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Qn(this):this.map((function(n){return kr(n,e,t)}))})),Qn.prototype.reject=function(e){return this.filter(ja(ao(e)))},Qn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Qn.prototype.toArray=function(){return this.take(h)},br(Qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Mn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Mn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Qn,c=s[0],l=u||Wa(t),f=function(e){var t=o.apply(Mn,Tt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&l){t=v?t:new Qn(this);var y=e.apply(t,s);return y.__actions__.push({func:da,args:[f],thisArg:i}),new Bn(y,p)}return d&&v?e.apply(this,s):(y=this.thru(f),d?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),br(Qn.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Re.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Li(i,2).name]=[{name:"wrapper",func:i}],Qn.prototype.clone=function(){var e=new Qn(this.__wrapped__);return e.__actions__=Si(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Si(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Si(this.__views__),e},Qn.prototype.reverse=function(){if(this.__filtered__){var e=new Qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=gn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var v=-1,y=e[c+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,_=g(y);if(2==b)y=_;else if(!_){if(1==b)continue e;break e}}d[p++]=y}return d},Mn.prototype.at=va,Mn.prototype.chain=function(){return ha(this)},Mn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===i&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=qo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Qn){var t=e;return this.__actions__.length&&(t=new Qn(this)),(t=t.reverse()).__actions__.push({func:da,args:[ta],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(ta)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,at&&(Mn.prototype[at]=function(){return this}),Mn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},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}},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)}},3890:(e,t,n)=>{"use strict";var r,i,o,a,s,u,c,l,f,p,h,d,v,y,m,g,b,_,E,w,O,x,I,T,S,D,k,A,N,P,R,C,F,j,U,L,M,q,V,B,Q,z,W,G,$,K;n.r(t),n.d(t,{AccessDeniedReason:()=>r,BillingModel:()=>s,BillingPeriod:()=>u,CustomerModel:()=>J,EntitlementResetPeriod:()=>h,ErrorCode:()=>v,FeatureType:()=>$,INVALID_ENTITLEMENT:()=>Y,MeterType:()=>K,TrialPeriodUnits:()=>B,default:()=>za}),function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(r||(r={})),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"}(i||(i={})),function(e){e.Id="id"}(o||(o={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(a||(a={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(s||(s={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(u||(u={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(c||(c={})),function(e){e.Usd="USD"}(l||(l={})),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"}(f||(f={})),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"}(p||(p={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(h||(h={})),function(e){e.DisplayName="displayName",e.Id="id"}(d||(d={})),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.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(v||(v={})),function(e){e.EnvironmentId="environmentId",e.Id="id"}(y||(y={})),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"}(m||(m={})),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"}(g||(g={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(b||(b={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(_||(_={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(E||(E={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(w||(w={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(O||(O={})),function(e){e.Id="id"}(x||(x={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(I||(I={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(T||(T={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(S||(S={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(D||(D={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(k||(k={})),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"}(A||(A={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(N||(N={})),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"}(P||(P={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(R||(R={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(C||(C={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(F||(F={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(j||(j={})),function(e){e.Asc="ASC",e.Desc="DESC"}(U||(U={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(L||(L={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(M||(M={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(q||(q={})),function(e){e.Active="ACTIVE",e.Expired="EXPIRED",e.Inactive="INACTIVE",e.InTrial="IN_TRIAL"}(V||(V={})),function(e){e.Day="DAY",e.Month="MONTH"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE",e.NoTrials="NO_TRIALS"}(Q||(Q={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(z||(z={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}(W||(W={})),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"}(G||(G={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}($||($={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(K||(K={}));var Y={isValid:!1,isGranted:!1,accessDeniedReason:r.Unknown},J=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===V.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===V.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===F.Active}))},e}(),H=function(e,t){return H=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])},H(e,t)};function X(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}H(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Z=function(){return Z=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},Z.apply(this,arguments)};function ee(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 te(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 ne(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 re(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 ie(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const oe=/\r\n|[\n\r]/g;function ae(e,t){let n=0,r=1;for(const i of e.body.matchAll(oe)){if("number"==typeof i.index||ie(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function se(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+ue([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ue([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ue(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 ce 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=le(Array.isArray(t)?t:t?[t]:void 0);const l=le(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=>ae(n,e))):null==l?void 0:l.map((e=>ae(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,ce):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"+se((t=n.loc).source,ae(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+se(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 le(e){return void 0===e||0===e.length?void 0:e}function fe(e,t,n){return new ce(`Syntax Error: ${n}`,void 0,e,[t])}let pe;var he;(he=pe||(pe={})).NAME="Name",he.DOCUMENT="Document",he.OPERATION_DEFINITION="OperationDefinition",he.VARIABLE_DEFINITION="VariableDefinition",he.SELECTION_SET="SelectionSet",he.FIELD="Field",he.ARGUMENT="Argument",he.FRAGMENT_SPREAD="FragmentSpread",he.INLINE_FRAGMENT="InlineFragment",he.FRAGMENT_DEFINITION="FragmentDefinition",he.VARIABLE="Variable",he.INT="IntValue",he.FLOAT="FloatValue",he.STRING="StringValue",he.BOOLEAN="BooleanValue",he.NULL="NullValue",he.ENUM="EnumValue",he.LIST="ListValue",he.OBJECT="ObjectValue",he.OBJECT_FIELD="ObjectField",he.DIRECTIVE="Directive",he.NAMED_TYPE="NamedType",he.LIST_TYPE="ListType",he.NON_NULL_TYPE="NonNullType",he.SCHEMA_DEFINITION="SchemaDefinition",he.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",he.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",he.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",he.FIELD_DEFINITION="FieldDefinition",he.INPUT_VALUE_DEFINITION="InputValueDefinition",he.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",he.UNION_TYPE_DEFINITION="UnionTypeDefinition",he.ENUM_TYPE_DEFINITION="EnumTypeDefinition",he.ENUM_VALUE_DEFINITION="EnumValueDefinition",he.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",he.DIRECTIVE_DEFINITION="DirectiveDefinition",he.SCHEMA_EXTENSION="SchemaExtension",he.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",he.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",he.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",he.UNION_TYPE_EXTENSION="UnionTypeExtension",he.ENUM_TYPE_EXTENSION="EnumTypeExtension",he.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class de{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 ve{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 ye={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"]},me=new Set(Object.keys(ye));function ge(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&me.has(t)}let be,_e;var Ee;function we(e){return Oe(e,[])}function Oe(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:Oe(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(Oe(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+": "+Oe(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function xe(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(be||(be={})),(Ee=_e||(_e={})).SOF="<SOF>",Ee.EOF="<EOF>",Ee.BANG="!",Ee.DOLLAR="$",Ee.AMP="&",Ee.PAREN_L="(",Ee.PAREN_R=")",Ee.SPREAD="...",Ee.COLON=":",Ee.EQUALS="=",Ee.AT="@",Ee.BRACKET_L="[",Ee.BRACKET_R="]",Ee.BRACE_L="{",Ee.PIPE="|",Ee.BRACE_R="}",Ee.NAME="Name",Ee.INT="Int",Ee.FLOAT="Float",Ee.STRING="String",Ee.BLOCK_STRING="BlockString",Ee.COMMENT="Comment";class Ie{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||xe(!1,`Body must be a string. Received: ${we(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||xe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||xe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Te;function Se(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&&De(t[r]);)++r;let i=t.length;for(;i>r&&De(t[i-1]);)--i;return t.slice(r,i).join("\n")}function De(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function ke(e){return e>=48&&e<=57}function Ae(e){return e>=97&&e<=122||e>=65&&e<=90}function Ne(e){return Ae(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"}(Te||(Te={}));class Pe{constructor(e){const t=new ve(_e.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!==_e.EOF)do{if(e.next)e=e.next;else{const t=Me(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===_e.COMMENT);return e}}function Re(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Ce(e,t){return Fe(e.charCodeAt(t))&&je(e.charCodeAt(t+1))}function Fe(e){return e>=55296&&e<=56319}function je(e){return e>=56320&&e<=57343}function Ue(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return _e.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Le(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new ve(t,n,r,o,a,i)}function Me(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 qe(e,i);case 33:return Le(e,_e.BANG,i,i+1);case 36:return Le(e,_e.DOLLAR,i,i+1);case 38:return Le(e,_e.AMP,i,i+1);case 40:return Le(e,_e.PAREN_L,i,i+1);case 41:return Le(e,_e.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return Le(e,_e.SPREAD,i,i+3);break;case 58:return Le(e,_e.COLON,i,i+1);case 61:return Le(e,_e.EQUALS,i,i+1);case 64:return Le(e,_e.AT,i,i+1);case 91:return Le(e,_e.BRACKET_L,i,i+1);case 93:return Le(e,_e.BRACKET_R,i,i+1);case 123:return Le(e,_e.BRACE_L,i,i+1);case 124:return Le(e,_e.PIPE,i,i+1);case 125:return Le(e,_e.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Ye(e,i):Qe(e,i)}if(ke(t)||45===t)return Ve(e,i,t);if(Ne(t))return Je(e,i);throw fe(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Re(t)||Ce(n,i)?`Unexpected character: ${Ue(e,i)}.`:`Invalid character: ${Ue(e,i)}.`)}return Le(e,_e.EOF,r,r)}function qe(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(Re(e))++i;else{if(!Ce(n,i))break;i+=2}}return Le(e,_e.COMMENT,t,i,n.slice(t+1,i))}function Ve(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),ke(o))throw fe(e.source,i,`Invalid number, unexpected digit after 0: ${Ue(e,i)}.`)}else i=Be(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=Be(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=Be(e,i,o),o=r.charCodeAt(i)),46===o||Ne(o))throw fe(e.source,i,`Invalid number, expected digit but got: ${Ue(e,i)}.`);return Le(e,a?_e.FLOAT:_e.INT,t,i,r.slice(t,i))}function Be(e,t,n){if(!ke(n))throw fe(e.source,t,`Invalid number, expected digit but got: ${Ue(e,t)}.`);const r=e.source.body;let i=t+1;for(;ke(r.charCodeAt(i));)++i;return i}function Qe(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),Le(e,_e.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Re(r))++i;else{if(!Ce(n,i))throw fe(e.source,i,`Invalid character within String: ${Ue(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?ze(e,i):We(e,i):Ke(e,i);a+=t.value,i+=t.size,o=i}}throw fe(e.source,i,"Unterminated string.")}function ze(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||!Re(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|$e(e),r<0)break}throw fe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function We(e,t){const n=e.source.body,r=Ge(n,t+2);if(Re(r))return{value:String.fromCodePoint(r),size:6};if(Fe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=Ge(n,t+8);if(je(e))return{value:String.fromCodePoint(r,e),size:12}}throw fe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ge(e,t){return $e(e.charCodeAt(t))<<12|$e(e.charCodeAt(t+1))<<8|$e(e.charCodeAt(t+2))<<4|$e(e.charCodeAt(t+3))}function $e(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ke(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 fe(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ye(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 ve(_e.BLOCK_STRING,t,a+3,i,o,Se(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(Re(r))++a;else{if(!Ce(n,a))throw fe(e.source,a,`Invalid character within String: ${Ue(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 fe(e.source,a,"Unterminated string.")}function Je(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Ae(o=n.charCodeAt(i))||ke(o)||95===o);)++i;var o;return Le(e,_e.NAME,t,i,n.slice(t,i))}class He{constructor(e,t){const n=function(e){return e instanceof Ie}(e)?e:new Ie(e);this._lexer=new Pe(n),this._options=t}parseName(){const e=this.expectToken(_e.NAME);return this.node(e,{kind:pe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:pe.DOCUMENT,definitions:this.many(_e.SOF,this.parseDefinition,_e.EOF)})}parseDefinition(){if(this.peek(_e.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===_e.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 fe(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(_e.BRACE_L))return this.node(e,{kind:pe.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(_e.NAME)&&(n=this.parseName()),this.node(e,{kind:pe.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(_e.NAME);switch(e.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(_e.PAREN_L,this.parseVariableDefinition,_e.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:pe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(_e.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(_e.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(_e.DOLLAR),this.node(e,{kind:pe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:pe.SELECTION_SET,selections:this.many(_e.BRACE_L,this.parseSelection,_e.BRACE_R)})}parseSelection(){return this.peek(_e.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(_e.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:pe.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(_e.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(_e.PAREN_L,t,_e.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(_e.COLON),this.node(t,{kind:pe.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(_e.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(_e.NAME)?this.node(e,{kind:pe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:pe.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:pe.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:pe.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 _e.BRACKET_L:return this.parseList(e);case _e.BRACE_L:return this.parseObject(e);case _e.INT:return this._lexer.advance(),this.node(t,{kind:pe.INT,value:t.value});case _e.FLOAT:return this._lexer.advance(),this.node(t,{kind:pe.FLOAT,value:t.value});case _e.STRING:case _e.BLOCK_STRING:return this.parseStringLiteral();case _e.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:pe.BOOLEAN,value:!0});case"false":return this.node(t,{kind:pe.BOOLEAN,value:!1});case"null":return this.node(t,{kind:pe.NULL});default:return this.node(t,{kind:pe.ENUM,value:t.value})}case _e.DOLLAR:if(e){if(this.expectToken(_e.DOLLAR),this._lexer.token.kind===_e.NAME){const e=this._lexer.token.value;throw fe(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:pe.STRING,value:e.value,block:e.kind===_e.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:pe.LIST,values:this.any(_e.BRACKET_L,(()=>this.parseValueLiteral(e)),_e.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:pe.OBJECT,fields:this.any(_e.BRACE_L,(()=>this.parseObjectField(e)),_e.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(_e.COLON),this.node(t,{kind:pe.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(_e.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(_e.AT),this.node(t,{kind:pe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(_e.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(_e.BRACKET_R),t=this.node(e,{kind:pe.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(_e.BANG)?this.node(e,{kind:pe.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:pe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(_e.STRING)||this.peek(_e.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(_e.BRACE_L,this.parseOperationTypeDefinition,_e.BRACE_R);return this.node(e,{kind:pe.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(_e.COLON);const n=this.parseNamedType();return this.node(e,{kind:pe.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:pe.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:pe.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(_e.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(_e.BRACE_L,this.parseFieldDefinition,_e.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(_e.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:pe.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(_e.PAREN_L,this.parseInputValueDef,_e.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(_e.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(_e.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:pe.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:pe.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:pe.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(_e.EQUALS)?this.delimitedMany(_e.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:pe.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(_e.BRACE_L,this.parseEnumValueDefinition,_e.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:pe.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 fe(this._lexer.source,this._lexer.token.start,`${Xe(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:pe.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(_e.BRACE_L,this.parseInputValueDef,_e.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===_e.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(_e.BRACE_L,this.parseOperationTypeDefinition,_e.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:pe.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:pe.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:pe.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:pe.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:pe.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:pe.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:pe.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(_e.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:pe.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(_e.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Te,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 de(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 fe(this._lexer.source,t.start,`Expected ${Ze(e)}, found ${Xe(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==_e.NAME||t.value!==e)throw fe(this._lexer.source,t.start,`Expected "${e}", found ${Xe(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===_e.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return fe(this._lexer.source,t.start,`Unexpected ${Xe(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 Xe(e){const t=e.value;return Ze(e.kind)+(null!=t?` "${t}"`:"")}function Ze(e){return function(e){return e===_e.BANG||e===_e.DOLLAR||e===_e.AMP||e===_e.PAREN_L||e===_e.PAREN_R||e===_e.SPREAD||e===_e.COLON||e===_e.EQUALS||e===_e.AT||e===_e.BRACKET_L||e===_e.BRACKET_R||e===_e.BRACE_L||e===_e.PIPE||e===_e.BRACE_R}(e)?`"${e}"`:e}var et=new Map,tt=new Map,nt=!0,rt=!1;function it(e){return e.replace(/[\s,]+/g," ").trim()}function ot(e){var t,n,r,i=it(e);if(!et.has(i)){var o=function(e,t){return new He(e,t).parseDocument()}(e,{experimentalFragmentVariables:rt,allowLegacyFragmentVariables:rt});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");et.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=it((a=e.loc).source.body.substring(a.start,a.end)),o=tt.get(t);o&&!o.has(i)?nt&&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||tt.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),Z(Z({},t),{definitions:r}))))}return et.get(i)}function at(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]})),ot(r)}var st,ut=at;(st=at||(at={})).gql=ut,st.resetCaches=function(){et.clear(),tt.clear()},st.disableFragmentWarnings=function(){nt=!1},st.enableExperimentalFragmentVariables=function(){rt=!0},st.disableExperimentalFragmentVariables=function(){rt=!1},at.default=at;var ct,lt,ft,pt=at(ct||(lt=["\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"],ft=["\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(lt,"raw",{value:ft}):lt.raw=ft,ct=lt)),ht=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},dt=at(gt||(gt=ht(["\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"]))),vt=at(bt||(bt=ht(["\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"]))),yt=at(_t||(_t=ht(["\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"])),dt,pt,vt);const mt=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:at(Et||(Et=ht(["\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 "])),yt),variables:{paging:{first:50},filter:{status:{eq:k.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:A.RefId,direction:U.Asc}]}})},e}();var gt,bt,_t,Et,wt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Ot=at(St||(St=wt(["\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"])),pt),xt=at(Dt||(Dt=wt(["\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"]))),It=at(kt||(kt=wt(["\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"])),Ot,xt);const Tt=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:at(At||(At=wt(["\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 "])),It),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var St,Dt,kt,At;const Nt=function(e){this.paywall=new mt(e),this.customers=new Tt(e)};var Pt=n(1609),Rt=n.n(Pt),Ct=n(2492),Ft=n.n(Ct);function jt(e){var t=e.customerId;if(!t||Rt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Ut=n(5161),Lt=n.n(Ut),Mt=n(9734),qt=n.n(Mt),Vt=function(){return Vt=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},Vt.apply(this,arguments)},Bt=function(){function e(){this.mapEntitlementByDecision=function(e,t,n,r){var i=n.calculatedEntitlement.featureType,o=n.calculatedEntitlement.meterType;if(!i)throw new Error("No feature type provided with unknown reason");switch(i){case $.Boolean:return{isValid:!0,featureType:i,isGranted:e.isGranted,accessDeniedReason:e.accessDeniedReason,featureId:t};case $.Number:return o===T.Fluctuating||o===T.Incremental?{isValid:!0,featureType:$.Number,isGranted:e.isGranted,usageLimit:n.calculatedEntitlement.usageLimit||0,featureUnits:n.calculatedEntitlement.featureUnits||"",featureUnitsPlural:n.calculatedEntitlement.featureUnitsPlural||"",accessDeniedReason:e.accessDeniedReason,hasUnlimitedUsage:n.calculatedEntitlement.hasUnlimitedUsage,meterType:o,currentUsage:n.featureUsage.currentUsage||0,requestedUsage:r||0,resetPeriod:n.featureUsage.resetPeriod,nextResetDate:n.featureUsage.nextResetDate,resetPeriodConfiguration:n.featureUsage.resetPeriodConfiguration,featureId:t}:{isValid:!0,featureType:$.Number,meterType:o,isGranted:e.isGranted,usageLimit:n.calculatedEntitlement.usageLimit||0,featureUnits:n.calculatedEntitlement.featureUnits||"",featureUnitsPlural:n.calculatedEntitlement.featureUnitsPlural||"",accessDeniedReason:e.accessDeniedReason,hasUnlimitedUsage:n.calculatedEntitlement.hasUnlimitedUsage,featureId:t};default:throw new Error("Feature type ".concat(i," is not supported in this version of the sdk"))}}}return e.prototype.mapSlimEntitlement=function(e){var t,n,i,o,a,s=null===(t=e.feature)||void 0===t?void 0:t.featureType,u=null===(n=e.feature)||void 0===n?void 0:n.meterType;if(!s){if(e.accessDeniedReason===r.FeatureNotFound)return{isValid:!1,isGranted:!1,accessDeniedReason:r.FeatureNotFound};throw new Error("No feature type provided with unknown reason")}switch(s){case $.Boolean:return{isValid:!0,featureType:s,isGranted:e.isGranted,accessDeniedReason:e.accessDeniedReason,featureId:null===(i=e.feature)||void 0===i?void 0:i.refId};case $.Number:return u===T.Fluctuating||u===T.Incremental?{isValid:!0,featureType:s,meterType:u,featureId:null===(o=e.feature)||void 0===o?void 0:o.refId,isGranted:e.isGranted,usageLimit:e.usageLimit||0,currentUsage:e.currentUsage||0,requestedUsage:e.requestedUsage||0,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod,nextResetDate:e.nextResetDate,resetPeriodConfiguration:e.resetPeriodConfiguration,accessDeniedReason:e.accessDeniedReason}:{isValid:!0,featureType:s,featureId:null===(a=e.feature)||void 0===a?void 0:a.refId,isGranted:!0,accessDeniedReason:e.accessDeniedReason,usageLimit:e.usageLimit||0,hasUnlimitedUsage:e.hasUnlimitedUsage};default:throw new Error("Feature type ".concat(s," is not supported in this version of the sdk"))}},e.prototype.mapFullEntitlementByDecision=function(e,t,n,r){return this.mapFullEntitlement(Vt(Vt(Vt(Vt(Vt({},t),{customerId:n}),e.calculatedEntitlement),e.featureUsage),{feature:{featureType:e.calculatedEntitlement.featureType,meterType:e.calculatedEntitlement.meterType,featureUnits:e.calculatedEntitlement.featureUnits,featureUnitsPlural:e.calculatedEntitlement.featureUnitsPlural,description:e.calculatedEntitlement.featureDescription,displayName:e.calculatedEntitlement.featureDisplayName||"",refId:e.calculatedEntitlement.featureId},requestedUsage:r}))},e.prototype.mapFullEntitlement=function(e){var t,n,r,i,o,a,s,u,c,l,f,p,h=this.mapSlimEntitlement(e),d=null===(t=e.feature)||void 0===t?void 0:t.featureType,v=null===(n=e.feature)||void 0===n?void 0:n.meterType;switch(d){case $.Boolean:return Vt(Vt({},h),{featureDisplayName:null===(r=e.feature)||void 0===r?void 0:r.displayName,featureDescription:null===(i=e.feature)||void 0===i?void 0:i.description});case $.Number:return v===T.Fluctuating||v===T.Incremental?Vt(Vt({},h),{featureUnits:(null===(o=e.feature)||void 0===o?void 0:o.featureUnits)||"",featureUnitsPlural:(null===(a=e.feature)||void 0===a?void 0:a.featureUnitsPlural)||"",featureDisplayName:null===(s=e.feature)||void 0===s?void 0:s.displayName,featureDescription:null===(u=e.feature)||void 0===u?void 0:u.description}):Vt(Vt({},h),{featureUnits:(null===(c=e.feature)||void 0===c?void 0:c.featureUnits)||"",featureUnitsPlural:(null===(l=e.feature)||void 0===l?void 0:l.featureUnitsPlural)||"",featureDisplayName:null===(f=e.feature)||void 0===f?void 0:f.displayName,featureDescription:null===(p=e.feature)||void 0===p?void 0:p.description});default:throw new Error("Feature type ".concat(d," is not supported in this version of the sdk"))}},e.prototype.mapCachedEntitlement=function(e,t,n){var r,i,o,a,s,u,c;return{calculatedEntitlement:{featureId:null===(r=e.feature)||void 0===r?void 0:r.refId,featureType:null===(i=e.feature)||void 0===i?void 0:i.featureType,meterType:null===(o=e.feature)||void 0===o?void 0:o.meterType,usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,featureUnits:null===(a=e.feature)||void 0===a?void 0:a.featureUnits,featureUnitsPlural:null===(s=e.feature)||void 0===s?void 0:s.featureUnitsPlural,featureDisplayName:null===(u=e.feature)||void 0===u?void 0:u.displayName,featureDescription:null===(c=e.feature)||void 0===c?void 0:c.description},featureUsage:{resetPeriod:e.resetPeriod,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage,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.mapPrice=function(e){var t=e.feature,n=e.price,r={billingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,featureUnits:t.featureUnits,featureUnitsPlural: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:Lt()(qt()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:Lt()(qt()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),prices:Lt()(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.mapCustomer=function(e){var t=this;return new J({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:Lt()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:Lt()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,featureType:t.featureType,featureMeterType:t.meterType,featureUnits:t.featureUnits,featureUnitsPlural:t.featureUnitsPlural,featureDisplayName:t.displayName,featureDescription:t.description,featureId:t.refId,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,featureType:t.featureType,featureMeterType:t.meterType,featureUnits:t.featureUnits,featureUnitsPlural:t.featureUnitsPlural,featureDisplayName:t.displayName,featureDescription:t.description,featureId:t.refId,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod,endDate: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:Lt()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=qt()(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=qt()(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}(),Qt="Invariant Violation",zt=Object.setPrototypeOf,Wt=void 0===zt?function(e,t){return e.__proto__=t,e}:zt,Gt=function(e){function t(n){void 0===n&&(n=Qt);var r=e.call(this,"number"==typeof n?Qt+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Qt,Wt(r,t.prototype),r}return X(t,e),t}(Error);function $t(e,t){if(!e)throw new Gt(t)}var Kt=["debug","log","warn","error","silent"],Yt=Kt.indexOf("log");function Jt(e){return function(){if(Kt.indexOf(e)>=Yt){var t=console[e]||console.log;return t.apply(console,arguments)}}}function Ht(e){try{return e()}catch(e){}}!function(e){e.debug=Jt("debug"),e.log=Jt("log"),e.warn=Jt("warn"),e.error=Jt("error")}($t||($t={}));const Xt=Ht((function(){return globalThis}))||Ht((function(){return window}))||Ht((function(){return self}))||Ht((function(){return n.g}))||Ht((function(){return Function("return this")()}));var Zt="__",en=[Zt,Zt].join("DEV");const tn=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(Xt,en,{value:"production"!==Ht((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),Xt[en]}}();function nn(e){try{return e()}catch(e){}}var rn=nn((function(){return globalThis}))||nn((function(){return window}))||nn((function(){return self}))||nn((function(){return n.g}))||nn((function(){return Function("return this")()})),on=!1;function an(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 sn(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 un(e,t,n){return t&&sn(e.prototype,t),n&&sn(e,n),e}!rn||nn((function(){return"production"}))||nn((function(){return process}))||(Object.defineProperty(rn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),on=!0),on&&(delete rn.process,on=!1),__DEV__?$t("boolean"==typeof tn,tn):$t("boolean"==typeof tn,38);var cn=function(){return"function"==typeof Symbol},ln=function(e){return cn()&&Boolean(Symbol[e])},fn=function(e){return ln(e)?Symbol[e]:"@@"+e};cn()&&!ln("observable")&&(Symbol.observable=Symbol("observable"));var pn=fn("iterator"),hn=fn("observable"),dn=fn("species");function vn(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function yn(e){var t=e.constructor;return void 0!==t&&null===(t=t[dn])&&(t=void 0),void 0!==t?t:Tn}function mn(e){return e instanceof Tn}function gn(e){gn.log?gn.log(e):setTimeout((function(){throw e}))}function bn(e){Promise.resolve().then((function(){try{e()}catch(e){gn(e)}}))}function _n(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=vn(t,"unsubscribe");n&&n.call(t)}}catch(e){gn(e)}}function En(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function wn(e,t,n){e._state="running";var r=e._observer;try{var i=vn(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(En(e),!i)throw n;i.call(r,n);break;case"complete":En(e),i&&i.call(r)}}catch(e){gn(e)}"closed"===e._state?_n(e):"running"===e._state&&(e._state="ready")}function On(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 bn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(wn(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void wn(e,t,n);e._queue.push({type:t,value:n})}}var xn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new In(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&&(En(this),_n(this))},un(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),In=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){On(this._subscription,"next",e)},t.error=function(e){On(this._subscription,"error",e)},t.complete=function(){On(this._subscription,"complete")},un(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Tn=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 xn(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(yn(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(yn(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=yn(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=yn(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=yn(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[hn]=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=vn(t,hn);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return mn(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(ln("iterator")&&(r=vn(t,pn)))return new n((function(e){bn((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 an(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)?an(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){bn((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){bn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},un(e,null,[{key:dn,get:function(){return this}}]),e}();function Sn(e){return null!==e&&"object"==typeof e}function Dn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Gt("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 Gt(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?$t(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):$t(1===r.length,44),n=r[0].name.value),Z(Z({},e),{definitions:re([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function kn(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function An(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?$t(n,"No fragment named "+e.name.value+"."):$t(n,45),n;default:return null}}function Nn(e){return{__ref:String(e)}}function Pn(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Rn(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 Rn(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 Rn(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 Gt('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new Gt(54);e[t.value]=null}}cn()&&Object.defineProperty(Tn,Symbol("extensions"),{value:{symbol:hn,hostReportError:gn},configurable:!0});var Cn=["connection","include","skip","client","rest","export"],Fn=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+"("+jn(i)+")"}return n.connection.key}var o=e;if(t){var a=jn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Cn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+jn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=jn;return jn=e,t}}),jn=function(e){return JSON.stringify(e,Un)};function Un(e,t){return Sn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function Ln(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Rn(n,r,i,t)})),n}return null}function Mn(e){return e.alias?e.alias.value:e.name.value}function qn(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(Vn(o)){if("__typename"===o.name.value)return e[Mn(o)]}else{var a=qn(e,An(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Vn(e){return"Field"===e.kind}function Bn(e){return"InlineFragment"===e.kind}function Qn(e){__DEV__?$t(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'):$t(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 Gt('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new Gt(47);return e}));return __DEV__?$t(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):$t(t.length<=1,48),e}function zn(e){return Qn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Wn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function Gn(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function $n(e){var t=zn(e);return __DEV__?$t(t&&"query"===t.operation,"Must contain a query definition."):$t(t&&"query"===t.operation,49),t}function Kn(e){var t;Qn(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 Gt("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new Gt(53)}function Yn(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Rn(t,e.variable.name,e.defaultValue)})),t}function Jn(e,t){return t?t(e):Tn.of()}function Hn(e){return"function"==typeof e?new er(e):e}function Xn(e){return e.request.length<=1}var Zn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return X(t,e),t}(Error),er=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Tn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(Hn).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=Hn(n),o=Hn(r||new e(Jn));return Xn(i)&&Xn(o)?new e((function(e){return t(e)?i.request(e)||Tn.of():o.request(e)||Tn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Tn.of():o.request(e,n)||Tn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=Z({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=Z(Z({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Z({},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?Wn(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 Gt("illegal argument: "+i):new Gt(26)}return e}(t))))||Tn.of()},e.concat=function(t,n){var r=Hn(t);if(Xn(r))return __DEV__&&$t.warn(new Zn("You are calling concat on a terminating link, which will have no effect",r)),r;var i=Hn(n);return Xn(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Tn.of()}))||Tn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Tn.of()}))||Tn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(Jn)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Gt("request is not implemented"):new Gt(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 tr=Object.freeze({});function nr(e,t,n=ye){const r=new Map;for(const e of Object.values(pe))r.set(e,rr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],h=[];let d=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===h.length?void 0:p[p.length-1],o=s,s=h.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]:d,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var v,y;ge(o)||xe(!1,`Invalid AST Node: ${we(o)}.`);const n=e?null===(v=r.get(o.kind))||void 0===v?void 0:v.leave:null===(y=r.get(o.kind))||void 0===y?void 0:y.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,h),b===tr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!ge(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&&h.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(d=f[f.length-1][1]),d}function rr(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 ir=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new Gt("Network request failed. "+t+" is not serializable: "+e.message):new Gt(23);throw r.parseError=e,r}return n},or=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},ar=Object.prototype.hasOwnProperty;const sr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ur(e){return cr[e.charCodeAt(0)]}const cr=["\\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 lr(e){return nr(e,fr)}const fr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>pr(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=dr("(",pr(e.variableDefinitions,", "),")"),n=pr([e.operation,pr([e.name,t]),pr(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+dr(" = ",n)+dr(" ",pr(r," "))},SelectionSet:{leave:({selections:e})=>hr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=dr("",e,": ")+t;let a=o+dr("(",pr(n,", "),")");return a.length>80&&(a=o+dr("(\n",vr(pr(n,"\n")),"\n)")),pr([a,pr(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+dr(" ",pr(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>pr(["...",dr("on ",e),pr(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${dr("(",pr(n,", "),")")} on ${t} ${dr("",pr(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(sr,ur)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+pr(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+pr(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+dr("(",pr(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>dr("",e,"\n")+pr(["schema",pr(t," "),hr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>dr("",e,"\n")+pr(["scalar",t,pr(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dr("",e,"\n")+pr(["type",t,dr("implements ",pr(n," & ")),pr(r," "),hr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>dr("",e,"\n")+t+(yr(n)?dr("(\n",vr(pr(n,"\n")),"\n)"):dr("(",pr(n,", "),")"))+": "+r+dr(" ",pr(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>dr("",e,"\n")+pr([t+": "+n,dr("= ",r),pr(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dr("",e,"\n")+pr(["interface",t,dr("implements ",pr(n," & ")),pr(r," "),hr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>dr("",e,"\n")+pr(["union",t,pr(n," "),dr("= ",pr(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>dr("",e,"\n")+pr(["enum",t,pr(n," "),hr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>dr("",e,"\n")+pr([t,pr(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>dr("",e,"\n")+pr(["input",t,pr(n," "),hr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>dr("",e,"\n")+"directive @"+t+(yr(n)?dr("(\n",vr(pr(n,"\n")),"\n)"):dr("(",pr(n,", "),")"))+(r?" repeatable":"")+" on "+pr(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>pr(["extend schema",pr(e," "),hr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>pr(["extend scalar",e,pr(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>pr(["extend type",e,dr("implements ",pr(t," & ")),pr(n," "),hr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>pr(["extend interface",e,dr("implements ",pr(t," & ")),pr(n," "),hr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>pr(["extend union",e,pr(t," "),dr("= ",pr(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>pr(["extend enum",e,pr(t," "),hr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>pr(["extend input",e,pr(t," "),hr(n)]," ")}};function pr(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function hr(e){return dr("{\n",vr(pr(e,"\n")),"\n}")}function dr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function vr(e){return dr(" ",e.replace(/\n/g,"\n "))}function yr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var mr={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}};function gr(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}function br(e){return new Tn((function(t){t.error(e)}))}var _r=Ht((function(){return fetch})),Er=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=ee(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Gt("\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 Gt(22)}(r||_r);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new er((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(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,h=Z(Z({},a),i.headers),d={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:h},v=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Z(Z({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=Z(Z(Z({},i),e.options),{headers:Z(Z({},i.headers),gr(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=Z(Z({},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=lr(c)),{options:i,body:l}}(e,mr,c,d),y=v.options,m=v.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));nr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=Z({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!y.signal){var b=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),_=b.controller,E=b.signal;(p=_)&&(y.signal=E)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(y.method="GET"),"GET"===y.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=ir(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=ir(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,x=w.parseError;if(x)return br(x);t=O}else try{y.body=ir(m,"Payload")}catch(x){return br(x)}return new Tn((function(n){var i;return(r||Ht((function(){return fetch}))||_r)(t,y).then((function(t){return e.setContext({response:t}),t})).then((i=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}})).then((function(t){return e.status>=300&&or(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||ar.call(t,"data")||ar.call(t,"errors")||or(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(e){return e.operationName})):i.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return X(t,e),t}(er),wr=er.execute;function Or(){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 xr=Object.prototype,Ir=xr.toString,Tr=xr.hasOwnProperty,Sr=Function.prototype.toString,Dr=new Map;function kr(e,t){try{return Ar(e,t)}finally{Dr.clear()}}function Ar(e,t){if(e===t)return!0;var n,r,i,o=Ir.call(e);if(o!==Ir.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Cr(e,t))return!0;var a=Nr(e),s=Nr(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!Tr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Ar(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(Cr(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,v=d[0],y=d[1];if(!t.has(v))return!1;if(p&&!Ar(y,t.get(v)))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=Sr.call(e);return g===Sr.call(t)&&(r=Rr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function Nr(e){return Object.keys(e).filter(Pr,e)}function Pr(e){return void 0!==this[e]}var Rr="{ [native code] }";function Cr(e,t){var n=Dr.get(e);if(n){if(n.has(t))return!0}else Dr.set(e,n=new Set);return n.add(t),!1}var Fr,jr,Ur=function(){return Object.create(null)},Lr=Array.prototype,Mr=Lr.forEach,qr=Lr.slice,Vr=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Ur),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 Mr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(qr.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}(),Br="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),Qr="function"==typeof WeakSet,zr="function"==typeof Symbol&&"function"==typeof Symbol.for,Wr=function(){function e(){this.known=new(Qr?WeakSet:Set),this.pool=new Vr(Br),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Sn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Sn(e)){var t=function(e){return Sn(e)?Array.isArray(e)?e.slice(0):Z({__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(Sn(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}(),Gr=Object.assign((function(e){if(Sn(e)){void 0===Fr&&$r();var t=Fr.admit(e),n=jr.get(t);return void 0===n&&jr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:$r});function $r(){Fr=new Wr,jr=new(Br?WeakMap:Map)}function Kr(e,t,n){return new Tn((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 Yr(e){return e.errors&&e.errors.length>0||!1}function Jr(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 Hr={kind:"Field",name:{kind:"Name",value:"__typename"}};function Xr(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&Xr(t[e.name.value],t)}))}function Zr(e){return Xr(zn(e)||function(e){__DEV__?$t("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'):$t("Document"===e.kind,50),__DEV__?$t(e.definitions.length<=1,"Fragment must have exactly one definition."):$t(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?$t("FragmentDefinition"===t.kind,"Must be a fragment definition."):$t("FragmentDefinition"===t.kind,52),t}(e),kn(Gn(e)))?null:e}function ei(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ti(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=Zr(nr(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(ei(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&ii(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(ei(e)(t))return null}}}));return a&&Jr(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 Zr(nr(t,{OperationDefinition:{enter:function(t){return Z(Z({},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&&Jr(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 Zr(nr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var ni=Object.assign((function(e){return nr(Qn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Vn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Vn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return Z(Z({},e),{selections:re(re([],r,!0),[Hr],!1)})}}}}})}),{added:function(e){return e===Hr}}),ri={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&$t.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 ii(e){var t=[];return e.selections.forEach((function(e){(Vn(e)||Bn(e))&&e.selectionSet?ii(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function oi(e){return"query"===Kn(e).operation?e:nr(e,{OperationDefinition:{enter:function(e){return Z(Z({},e),{operation:"query"})}}})}function ai(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__?$t(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):$t(n&&1===n.length,40);var i=n[0];__DEV__?$t(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):$t(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?$t(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):$t(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__?$t(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):$t(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function si(e,t){return function(e){var t=[];return nr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function ui(e){return e&&si(["client"],e)&&si(["export"],e)}var ci=new Map;function li(e){var t=ci.get(e)||1;return ci.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function fi(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function pi(e){function t(t){Object.defineProperty(e,t,{value:Tn})}return zr&&Symbol.species&&t(Symbol.species),t("@@species"),e}function hi(e){return e&&"function"==typeof e.then}var di=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],fi(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),fi(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?hi(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(),fi(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 Tn(t)]),hi(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return X(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}(Tn);function vi(e){return Array.isArray(e)&&e.length>0}pi(di);var yi,mi=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="",(vi((r=l).graphQLErrors)||vi(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 X(t,e),t}(Error);function gi(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"}(yi||(yi={}));var bi=Object.prototype.toString;function _i(e){return Ei(e)}function Ei(e,t){switch(bi.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]=Ei(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]=Ei(e[n],t)})),r;default:return e}}var wi=Object.assign,Oi=Object.hasOwnProperty,xi=!1,Ii=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=Ti)}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=zn(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 X(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||yi.ready,r=Z(Z({},t),{loading:gi(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),kr(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==yi.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=yi.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||Si(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!kr(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||kr(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&&Oi.call(e,"variables")){var i=$n(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&$t.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&&!kr(this.options.variables,e)&&(n.variables=this.options.variables=Z(Z({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,yi.refetch)},t.prototype.fetchMore=function(e){var t=this,n=Z(Z({},e.query?e:Z(Z(Z({},this.options),e),{variables:Z(Z({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=yi.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,yi.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!xi&&(__DEV__&&$t.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."),xi=!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__&&$t.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 kr(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},yi.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__?$t(n,"Attempted to start a polling query without a polling interval."):$t(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(gi(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},yi.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=Z(Z({},this.last),{result:this.queryManager.assumeImmutableResults?e:_i(e),variables:t}),vi(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===yi.refetch||t===yi.fetchMore||t===yi.poll,i=this.options.variables,o=r?Or(this.options,e):wi(this.options,Or(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!kr(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=yi.setVariables)));var a=o.variables&&Z({},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),fi(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=Z(Z({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:yi.error,loading:!1});this.updateLastResult(n,t),fi(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}(Tn);function Ti(e){__DEV__&&$t.error("Unhandled error",e.message,e.stack)}function Si(e){__DEV__&&vi(e)&&__DEV__&&$t.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}pi(Ii);var Di=Object.prototype.hasOwnProperty;function ki(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ai(e)}function Ai(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Pi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Ni=function(e,t,n){return this.merge(e[n],t[n])},Pi=function(){function e(e){void 0===e&&(e=Ni),this.reconciler=e,this.isObject=Sn,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 Sn(t)&&Sn(e)?(Object.keys(t).forEach((function(i){if(Di.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,re([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 Sn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):Z({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Ri=null,Ci={},Fi=1,ji="@wry/context:Slot",Ui=Array,Li=Ui[ji]||function(){var e=function(){function e(){this.id=["slot",Fi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ri;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Ci)break;return e!==Ri&&(Ri.slots[this.id]=t),!0}return Ri&&(Ri.slots[this.id]=Ci),!1},e.prototype.getValue=function(){if(this.hasValue())return Ri.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Ri;Ri={parent:a,slots:o};try{return t.apply(r,n)}finally{Ri=a}},e.bind=function(e){var t=Ri;return function(){var n=Ri;try{return Ri=t,e.apply(this,arguments)}finally{Ri=n}}},e.noContext=function(e,t,n){if(!Ri)return e.apply(n,t);var r=Ri;try{return Ri=null,e.apply(n,t)}finally{Ri=r}},e}();try{Object.defineProperty(Ui,ji,{value:Ui[ji]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Mi(){}Li.bind,Li.noContext;var qi,Vi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Mi),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}(),Bi=new Li,Qi=Object.prototype.hasOwnProperty,zi=void 0===(qi=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:qi;function Wi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Gi=[];function $i(e,t){if(!e)throw new Error(t||"assertion failure")}function Ki(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Yi=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&&!Xi(this))return Ji(this),this.value[0]},e.prototype.recompute=function(e){return $i(!this.recomputing,"already recomputing"),Ji(this),Xi(this)?function(e,t){return oo(e),Bi.withValue(e,Hi,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Wi(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Xi(e)||eo(e)}(e),Ki(e.value)}(this,e):Ki(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Zi(this),Wi(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),oo(this),to(this,(function(t,n){t.setDirty(),ao(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Gi.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(zi(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Gi.push(this.deps),this.deps=null)},e.count=0,e}();function Ji(e){var t=Bi.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Xi(e)?no(t,e):ro(t,e),t}function Hi(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 Xi(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Zi(e){to(e,no)}function eo(e){to(e,ro)}function to(e,t){var n=e.parents.size;if(n)for(var r=zi(e.parents),i=0;i<n;++i)t(r[i],e)}function no(e,t){$i(e.childValues.has(t)),$i(Xi(t));var n=!Xi(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Gi.pop()||new Set;e.dirtyChildren.add(t),n&&Zi(e)}function ro(e,t){$i(e.childValues.has(t)),$i(!Xi(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()),io(e,t),Xi(e)||eo(e)}function io(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(Gi.length<100&&Gi.push(n),e.dirtyChildren=null))}function oo(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){ao(e,n)})),e.forgetDeps(),$i(null===e.dirtyChildren)}function ao(e,t){t.parents.delete(e),e.childValues.delete(t),io(e,t)}var so={setDirty:!0,dispose:!0,forget:!0};function uo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Bi.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(Wi(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Qi.call(so,n)?n:"setDirty";zi(r).forEach((function(e){return e[i]()})),t.delete(e),Wi(r)}},r}function co(){var e=new Vr("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}co();var lo=new Set;function fo(e,t){void 0===t&&(t=Object.create(null));var n=new Vi(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||co(),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 Yi(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),lo.add(n),Bi.hasValue()||(lo.forEach((function(e){return e.clean()})),lo.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 po=new Li,ho=new WeakMap;function vo(e){var t=ho.get(e);return t||ho.set(e,t={vars:new Set,dep:uo()}),t}function yo(e){vo(e).vars.forEach((function(t){return t.forgetCache(e)}))}function mo(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){vo(e).dep.dirty(r),go(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=po.getValue();s&&(i(s),vo(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),vo(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function go(e){e.broadcastWatches&&e.broadcastWatches()}var bo=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=ki(t.resolvers,e)})):this.resolvers=ki(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 te(this,void 0,void 0,(function(){return ne(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return Z(Z({},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 si(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Qn(e);var t=ti([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=nr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Vn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return Z(Z({},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={}),te(this,void 0,void 0,(function(){return ne(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return Z(Z({},t),e.exportedVariables)}))]:[2,Z({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return nr(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 tr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:oi(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),te(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,h,d;return ne(this,(function(v){return a=Kn(e),s=Gn(e),u=kn(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,h=f.client,d={fragmentMap:u,context:Z(Z({},n),{cache:p,client:h}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then((function(e){return{result:e,exportedVariables:d.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return te(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return ne(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return te(u,void 0,void 0,(function(){var s,u;return ne(this,(function(c){return ai(e,o)?Vn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Mn(e)]=t,n))}))]:(Bn(e)?s=e:(s=r[e.name.value],__DEV__?$t(s,"No fragment named "+e.name.value):$t(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 Ai(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return te(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return ne(this,(function(h){return r=n.variables,i=e.name.value,o=Mn(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(po.withValue(this.cache,f,[t,Ln(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}(),_o=new(Br?WeakMap:Map);function Eo(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return _o.set(e,(_o.get(e)+1)%1e15),n.apply(this,arguments)})}function wo(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Oo=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;_o.has(n)||(_o.set(n,0),Eo(n,"evict"),Eo(n,"modify"),Eo(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||yi.loading;return this.variables&&this.networkStatus!==yi.loading&&!kr(this.variables,e.variables)&&(t=yi.setVariables),kr(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(){wo(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&&kr(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||kr(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;wo(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(gi(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=Z(Z({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&kr(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===_o.get(this.cache)&&kr(t,n.variables)&&kr(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=vi(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(xo(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:_o.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=yi.ready},e.prototype.markError=function(e){return this.networkStatus=yi.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function xo(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!Yr(e);return!r&&n&&e.data&&(r=!0),r}var Io=Object.prototype.hasOwnProperty,To=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(Br?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 bo({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 Gt("QueryManager stopped while query was in flight"):new Gt(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,h=e.fetchPolicy,d=void 0===h?"network-only":h,v=e.keepRootFields,y=e.context;return te(this,void 0,void 0,(function(){var e,o,s;return ne(this,(function(f){switch(f.label){case 0:return __DEV__?$t(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):$t(t,14),__DEV__?$t("network-only"===d||"no-cache"===d,"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."):$t("network-only"===d||"no-cache"===d,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,y)]:[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:d,errorPolicy:p,context:y,updateQueries:i,update:c,keepRootFields:v}),this.broadcastQueries(),s=this,[2,new Promise((function(f,h){return Kr(s.getObservableFromLink(t,Z(Z({},y),{optimisticResponse:r}),n,!1),(function(f){if(Yr(f)&&"none"===p)throw new mi({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var h=Z({},f);return"function"==typeof a&&(a=a(h)),"ignore"===p&&Yr(h)&&delete h.errors,s.markMutationResult({mutationId:e,result:h,document:t,variables:n,fetchPolicy:d,errorPolicy:p,context:y,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:v})})).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(),h(t instanceof mi?t:new mi({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&&xo(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&&Io.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var v=c(d,{mutationResult:r,queryName:f&&Wn(f)||void 0,queryVariables:p});v&&i.push({result:v,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=Z(Z({},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(Z(Z({},t),{result:{data:r}}),e)}catch(e){__DEV__&&$t.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),ti([ri],Qn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:ui(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:Yn(zn(r)),asQuery:Z(Z({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?Z(Z({},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 Z(Z({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=Z(Z({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new Oo(this),n=new Ii({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__?$t(e.query,"query option is required. You must specify your GraphQL document in the query option."):$t(e.query,16),__DEV__?$t("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):$t("Document"===e.query.kind,17),__DEV__?$t(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):$t(!e.returnPartialData,18),__DEV__?$t(!e.pollInterval,"pollInterval option only supported on watchQuery."):$t(!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 Gt("Store reset while query was in flight (not completed in link chain)"):new Gt(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=yi.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):Sn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Sn(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=li("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Ii({queryManager:t,queryInfo:i,options:Z(Z({},e),{fetchPolicy:"network-only"})});$t(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&$t.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&&(xo(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Yr(o))throw new mi({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Tn((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:Wn(s)||void 0,context:this.prepareContext(Z(Z({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=Gr(n);if(!(o=f.get(p))){var h=new di([wr(c,l)]);f.set(p,o=h),h.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new di([wr(c,l)])}else o=new di([Tn.of({data:{}})]),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(o=Kr(o,(function(e){return a.localState.runResolvers({document:d,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return Kr(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=vi(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new mi({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||yi.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new mi({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=yi.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,h=t.notifyOnNetworkStatusChange,d=void 0!==h&&h,v=t.context,y=void 0===v?{}:v,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:d,context:y}),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 di(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?li("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 Oo&&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 h=function(){return e.getDiff(o)},d=function(t,n){void 0===n&&(n=e.networkStatus||yi.loading);var a=t.result;!__DEV__||c||kr(a,{})||Si(t.missing);var s=function(e){return Tn.of(Z({data:e,loading:gi(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)},v="no-cache"===a?0:n===yi.refetch&&"merge"!==s?1:2,y=function(){return r.getResultsFromLink(e,v,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&gi(n);switch(a){default:case"cache-first":return(g=h()).complete?[d(g,e.markReady())]:c||m?[d(g),y()]:[y()];case"cache-and-network":var g;return(g=h()).complete||c||m?[d(g),y()]:[y()];case"cache-only":return[d(h(),e.markReady())];case"network-only":return m?[d(h()),y()]:[y()];case"no-cache":return m?[d(e.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new Oo(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Z(Z({},t),{clientAwareness:this.clientAwareness})},e}(),So=!1;function Do(e,t){return Or(e,t,t.variables&&{variables:Z(Z({},e.variables),t.variables)})}var ko=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,h=void 0===p||p,d=e.defaultOptions,v=e.assumeImmutableResults,y=void 0!==v&&v,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,_=e.name,E=e.version,w=e.link;if(w||(w=n?new Er({uri:n,credentials:r,headers:i}):er.empty()),!o)throw __DEV__?new Gt("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 Gt(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=d||{},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),!So&&__DEV__&&(So=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,x=O&&O.userAgent,I=void 0;"string"==typeof x&&(x.indexOf("Chrome/")>-1?I="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":x.indexOf("Firefox/")>-1&&(I="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),I&&__DEV__&&$t.log("Download the Apollo DevTools for a better development experience: "+I)}this.version="3.4.17",this.localState=new bo({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new To({cache:this.cache,link:this.link,queryDeduplication:h,ssrMode:s,clientAwareness:{name:_,version:E},localState:this.localState,assumeImmutableResults:y,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=Do(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Z(Z({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Do(this.defaultOptions.query,e)),__DEV__?$t("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."):$t("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Z(Z({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Do(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 wr(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__&&$t.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}(),Ao=function(){function e(){this.getFragmentDoc=fo(Dn)}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(Z(Z({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(Z(Z({},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=ee(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=ee(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),No=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 X(t,e),t}(Error);function Po(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Sn(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){Sn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Ro=Object.prototype.hasOwnProperty;function Co(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 Fo={dataIdFromObject:Co,addTypename:!0,resultCaching:!0,canonizeResults:!1};function jo(e){var t=e.canonizeResults;return void 0===t?Fo.canonizeResults:t}var Uo=/^[_a-z][_0-9a-z]*/i;function Lo(e){var t=e.match(Uo);return t?t[0]:e}function Mo(e,t,n){return!!Sn(t)&&(Array.isArray(t)?t.every((function(t){return Mo(e,t,n)})):e.selections.every((function(e){if(Vn(e)&&ai(e,n)){var r=Mn(e);return Ro.call(t,r)&&(!e.selectionSet||Mo(e.selectionSet,t[r],n))}return!0})))}function qo(e){return Sn(e)&&!Pn(e)&&!Array.isArray(e)}var Vo=Object.create(null),Bo=function(){return Vo},Qo=Object.create(null),zo=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 Po(Pn(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return Pn(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Nn(e);if(Pn(e))return e;var r=n.policies.identify(e)[0];if(r){var i=Nn(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return Z({},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),Ro.call(this.data,e)){var n=this.data[e];if(n&&Ro.call(n,t))return n[t]}return"__typename"===t&&Ro.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Ko?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Ro.call(this.data,e)?this.data[e]:this instanceof Ko?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;Pn(e)&&(e=e.__ref),Pn(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__?$t("string"==typeof n,"store.merge expects a string ID"):$t("string"==typeof n,1);var a=new Pi(Jo).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=Lo(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof Ko||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:Vo,INVALIDATE:Qo,isReference:Pn,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||Nn(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=Lo(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===Bo?Vo:f(Po(l),Z(Z({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===Qo?n.group.dirty(e,u):(p===Vo&&(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 Ko?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]=Bo,r):Bo)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Ro.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Ko&&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){Ro.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&&Ro.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ee(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 Ko?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){Ro.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 Ko;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Ro.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){Pn(e)&&(t[e.__ref]=!0),Sn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Sn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Wo=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?uo():null,this.keyMaker=new Vr(Br)},e.prototype.depend=function(e,t){if(this.d){this.d(Go(e,t));var n=Lo(t);n!==t&&this.d(Go(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Go(e,t),"__exists"===t?"forget":"setDirty")},e}();function Go(e,t){return t+"#"+e}function $o(e,t){Ho(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 Wo(i))||this;return a.stump=new Yo(a),a.storageTrie=new Vr(Br),o&&a.replace(o),a}return X(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}(zo||(zo={}));var Ko=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 X(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){kr(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 Z(Z({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Ro.call(this.data,t)?Z(Z({},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}(zo),Yo=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Wo(t.group.caching,t.group))||this}return X(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Ko);function Jo(e,t,n){var r=e[n],i=t[n];return kr(r,i)?r:i}function Ho(e){return!!(e instanceof zo&&e.group.caching)}function Xo(e,t){return new No(e.message,t.path.slice(),t.query,t.variables)}function Zo(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ea=function(){function e(e){var t=this;this.knownResults=new(Br?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:jo(e)}),this.canon=e.canon||new Wr,this.executeSelectionSet=fo((function(e){var n,r=e.context.canonizeResults,i=Zo(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?Z(Z({},o),{result:t.canon.admit(o.result)}):o:($o(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Zo,makeCacheKey:function(e,t,n,r){if(Ho(n.store))return n.store.makeCacheKey(e,Pn(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=fo((function(e){return $o(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(Ho(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Wr},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=Z(Z({},Yn($n(n))),o);var f=Nn(i),p=this.executeSelectionSet({selectionSet:Kn(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:Gr(o),canonizeResults:c,fragmentMap:kn(Gn(n)),path:[]}}),h=p.missing&&p.missing.length>0;if(h&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!h}},e.prototype.isFresh=function(e,t,n,r){if(Ho(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(Pn(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[Xo(__DEV__?new Gt("Dangling reference to missing "+r.__ref+" object"):new Gt(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 h(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 d=new Set(n.selections);d.forEach((function(e){var n;if(ai(e,a))if(Vn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Mn(e);o.path.push(l),void 0===u?ni.added(e)||p().push(Xo(__DEV__?new Gt("Can't find field '"+e.name.value+"' on "+(Pn(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new Gt(6),o)):Array.isArray(u)?u=h(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:Pn(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),$t(o.path.pop()===l)}else{var v=An(e,o.fragmentMap);v&&s.fragmentMatches(v,f)&&v.selectionSet.selections.forEach(d.add,d)}}));var v=Ai(c);return l.result=o.canonizeResults?this.canon.admit(v):Po(v),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),$t(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:Pn(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Sn(n)&&(__DEV__?$t(!Pn(n),"Missing selection set for object of type "+function(e,t){return Pn(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):$t(!Pn(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),$t(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ta=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=zn(r),c=new Pi;a=Z(Z({},Yn(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:Gr(a),fragmentMap:kn(Gn(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(!Pn(f))throw __DEV__?new Gt("Could not identify object "+JSON.stringify(i)):new Gt(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=Nn(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(Pn(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Vn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has(Lo(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&&!Pn(o)&&!kr(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=Lo(n),c=s+"."+u;if(!sa.has(c)){sa.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__&&$t.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=Nn(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var h=Object.create(null);l&&(h=o.merge(h,l));var d=n&&s.rootTypenamesById[n]||qn(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof d&&(h.__typename=d);var v=new Set(i.selections);if(v.forEach((function(e){var n;if(ai(e,o.variables))if(Vn(e)){var i=Mn(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:d,fieldName:e.name.value,field:e,variables:o.variables}),f=ra(a,l),p=t.processFieldValue(u,e,o,f),y=void 0;if(e.selectionSet&&!(y=o.store.getFieldValue(p,"__typename"))&&Pn(p)){var m=o.incomingById.get(p.__ref);y=m&&m.fields.__typename}var g=s.getMergeFunction(d,e.name.value,y);g?f.info={field:e,typename:d,merge:g}:aa(a,l),h=o.merge(h,((n={})[l]=p,n))}else o.clientOnly||ni.added(e)||__DEV__&&$t.error(("Missing field '"+Mn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=An(e,o.fragmentMap);b&&s.fragmentMatches(b,d,r,o.variables)&&b.selectionSet.selections.forEach(v.add,v)}})),"string"==typeof n){var y=o.incomingById.get(n);return y?(y.fields=o.merge(y.fields,h),y.mergeTree=ia(y.mergeTree,a),y.selections.forEach(v.add,v),y.selections=v):o.incomingById.set(n,{fields:h,mergeTree:oa(a)?void 0:a,selections:v}),Nn(n)}return h},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,ra(r,o));return aa(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?_i(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!Pn(n)){var s,u=Array.isArray(n)||!Pn(t)&&!qo(t)?void 0:t,c=n;u&&!i&&(i=[Pn(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&&$t(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):Z({},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}(),na=[];function ra(e,t){var n=e.map;return n.has(t)||n.set(t,na.pop()||{map:new Map}),n.get(t)}function ia(e,t){if(e===t||!t||oa(t))return e;if(!e||oa(e))return t;var n=e.info&&t.info?Z(Z({},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,ia(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,ia(t.map.get(n),e.map.get(n)))}))}return i}function oa(e){return!e||!(e.info||e.map.size)}function aa(e,t){var n=e.map,r=n.get(t);r&&oa(r)&&(na.push(r),n.delete(t))}var sa=new Set;function ua(e){var t=li("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function ca(e){return void 0!==e.args?e.args:e.field?Ln(e.field,e.variables):null}Fn.setStringify(Gr);var la=function(){},fa=function(e,t){return t.fieldName},pa=function(e,t,n){return(0,n.mergeObjects)(e,t)},ha=function(e,t){return t},da=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=Z({dataIdFromObject:Co},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?qn(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=ga(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=ee(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Ro.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?pa:!1===t?ha:e.merge}a(r,t.merge),r.keyFn=!1===i?la:Array.isArray(i)?ga(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?fa:Array.isArray(s)?ma(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||fa)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?$t(!r||r===e,"Cannot change root "+e+" __typename more than once"):$t(!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(Uo);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Ro.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=ee(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__&&$t.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Mo(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=ca(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=ma(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 Rn(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 Rn(r,n,i,t)}))),Fn(e.name.value,r,n)}(e.field,e.variables):Fn(r,ca(e))),!1===t?r:r===Lo(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=Lo(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=va(this,n,e,t,t.store.getStorage(Pn(n)?n.__ref:n,i));return po.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===pa?ya(r.store)(e,t):s===ha?t:(r.overwrite&&(e=void 0),s(e,t,va(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function va(e,t,n,r,i){var o=e.getStoreFieldName(n),a=Lo(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:ca(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:Pn,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(!Sn(n))return void(__DEV__&&$t.warn("Unexpected readField arguments: "+ua(Array.from(arguments))));o=Z({},n),Ro.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&$t.warn("Undefined 'from' passed to readField with arguments "+ua(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:ya(r.store)}}function ya(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new Gt("Cannot automatically merge arrays"):new Gt(3);if(Sn(t)&&Sn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(Pn(t)&&qo(n))return e.merge(t.__ref,n),t;if(qo(t)&&Pn(n))return e.merge(t,n.__ref),n;if(qo(t)&&qo(n))return Z(Z({},t),n)}return n}}function ma(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(_a(t,e,!1)):n.fieldName}}function ga(e){var t=new Vr(Br);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=ba(r.selectionSet,r.fragmentMap))}var a=r.keyObject=_a(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function ba(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Vn(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]=ba(e.selectionSet,t))}else{var a=An(e,t);a&&r.add(a.selectionSet)}}))})),n}function _a(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]=_a(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Ro.call(e,l)?a[o=t]=e[i=l]:(__DEV__?$t(!n,"Missing field '"+l+"' while computing key fields"):$t(!n,4),i=o=void 0)}})),a}var Ea=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=mo,n.txCount=0,n.config=function(e){return Or(Fo,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new da({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return X(t,e),t.prototype.init=function(){var e=this.data=new zo.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 ta(this,this.storeReader=new ea({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:jo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=fo((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(Ho(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,Gr({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(Z(Z({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof No)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(Ro.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(Z(Z({},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||vo(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&&yo(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gr.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 Pn(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Ro.call(e,"id"))return!1;e=Z(Z({},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(),Gr.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),yo(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(Z(Z({},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(Z(Z({},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=ni(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&&kr(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Ao);const wa=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var Oa=n(4098),xa=n.n(Oa),Ia=n(4147);var Ta=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}(),Sa=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Da=at(Na||(Na=Sa(["\n fragment SlimEntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n feature {\n ...SlimFeatureFragment\n }\n }\n fragment SlimFeatureFragment on EntitlementFeature {\n featureType\n meterType\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment SlimEntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n feature {\n ...SlimFeatureFragment\n }\n }\n fragment SlimFeatureFragment on EntitlementFeature {\n featureType\n meterType\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"]))),ka=at(Pa||(Pa=Sa(["\n fragment EntitlementFragment on EntitlementWithSummary {\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 EntitlementWithSummary {\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"])));const Aa=function(){function e(e){this.client=e}return e.prototype.getEntitlement=function(e){return this.client.query({query:at(Ra||(Ra=Sa(["\n query Entitlement($query: FetchEntitlementQuery!) {\n entitlement(query: $query) {\n ...SlimEntitlementFragment\n }\n }\n ","\n "],["\n query Entitlement($query: FetchEntitlementQuery!) {\n entitlement(query: $query) {\n ...SlimEntitlementFragment\n }\n }\n ","\n "])),Da),variables:{query:e},fetchPolicy:"network-only"})},e.prototype.getEntitlements=function(e){return this.client.query({query:at(Ca||(Ca=Sa(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ka),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:at(Fa||(Fa=Sa(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ka),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e}();var Na,Pa,Ra,Ca,Fa,ja=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n;if(!e)return{isGranted:!1,accessDeniedReason:r.NoFeatureEntitlementInSubscription};var i=e.calculatedEntitlement.featureType,o=e.calculatedEntitlement.meterType;switch(i){case $.Boolean:return{isGranted:!0};case $.Number:if(e.calculatedEntitlement.meterType===K.None)return{isGranted:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{isGranted:!0};var a=e.featureUsage.currentUsage;return o===K.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(a=0),a+(t||0)<=((null===(n=e.calculatedEntitlement)||void 0===n?void 0:n.usageLimit)||0)?{isGranted:!0}:{isGranted:!1,accessDeniedReason:r.RequestedUsageExceedingLimit}}},e}(),Ua=n(6486),La=function(){return La=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},La.apply(this,arguments)},Ma=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())}))},qa=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])}}},Va=function(){function e(e,t,n){this.customerId=e,this.cacheService=t,this.modelMapper=new Bt,this.loadingEntitlements=null,this.entitlementsApi=new Aa(n),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.handleFetchedEntitlements(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return Ma(this,void 0,void 0,(function(){return qa(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getEntitlement=function(e,t){var n=this.cacheService.getEntitlement(e),i=ja.decideEntitlementPolicy(n,t);return n?this.modelMapper.mapEntitlementByDecision(i,e,n,t):(0,Ua.includes)([r.CustomerNotFound,r.Unknown],i.accessDeniedReason)?La({isValid:!1},i):La({isValid:!0},i)},e.prototype.loadEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e;return qa(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.doLoadEntitlements()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.doLoadEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e;return qa(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent().data.entitlements,this.handleFetchedEntitlements(e),[2]}}))}))},e.prototype.handleFetchedEntitlements=function(e){if(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)}else console.log("Failed to load entitlements")},e.prototype.getEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e=this;return qa(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=ja.decideEntitlementPolicy(t);return e.modelMapper.mapFullEntitlementByDecision(t,n,e.customerId)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),Ba=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())}))},Qa=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])}}},za=function(){function e(e){this.modelMapper=new Bt,function(e){if(Rt()(e.sdkKey))throw new Error("You must configure the client with an SDK key");if(!e.customerId)throw new Error("You must configure the client with a customerId");if(e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3)throw new Error("Entitlements polling interval cannot be lower than 5000ms")}(e),this.configuration=function(e){return Ft()({baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4},e)}(e),this.graphClient=function(e){var t=e.sdkKey,n=e.baseUri,r=new er((function(e,n){return e.setContext({headers:{"X-API-KEY":t}}),n(e)})),i=new Er({uri:"".concat(n,"/graphql"),fetch:xa()});return new ko({link:r.concat(i),cache:new Ea({possibleTypes:wa.g}),name:"js-client-sdk",version:Ia.version})}(this.configuration),this.apiGateway=new Nt(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return Ba(this,void 0,void 0,(function(){var n,r;return Qa(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=new e(t),t.customerId?[4,n.setCustomerId(t.customerId)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2,n];case 3:throw r=i.sent(),new Error("Failed to initialize api ".concat(r));case 4:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return Ba(this,void 0,void 0,(function(){return Qa(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 Va(e,new Ta,this.graphClient),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return Ba(this,void 0,void 0,(function(){return Qa(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.getEntitlement=function(e,t){var n,r,i;jt(this.configuration);try{return(null===(n=this.entitlementsService)||void 0===n?void 0:n.getEntitlement(e,null==t?void 0:t.requestedUsage))||this.handleNoEntitlementFound(null==t?void 0:t.fallbackGrantedValue)}catch(e){var o=(null===(i=null===(r=e.graphQLErrors)||void 0===r?void 0:r[0])||void 0===i?void 0:i.extensions)||e;return console.error("Failed to get entitlement",o),this.handleNoEntitlementFound(null==t?void 0:t.fallbackGrantedValue)}},e.prototype.handleNoEntitlementFound=function(e){return e?{isValid:!1,isGranted:e,accessDeniedReason:e?r.Unknown:null}:Y},e.prototype.getPaywall=function(e){return Ba(this,void 0,void 0,(function(){var t;return Qa(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(e)];case 1:return t=n.sent(),[2,this.modelMapper.mapPlans(t.data)]}}))}))},e.prototype.getCustomer=function(){return Ba(this,void 0,void 0,(function(){var e,t,n;return Qa(this,(function(r){switch(r.label){case 0:return e=jt(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)]}}))}))},e.prototype.getEntitlements=function(){var e;return Ba(this,void 0,void 0,(function(){return Qa(this,(function(t){return jt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.22.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"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","graphql":"^16.0.1","husky":"^7.0.4","cross-fetch":"^3.1.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","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typescript":"^4.5.3","msw":"^0.35.0","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"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(3890)})()}));
|
|
2
|
+
!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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function y(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=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=d(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(_)}),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){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(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(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(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 E(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=E),t.Headers=p,t.Request=b,t.Response=E,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),h=n||l||f||p,d=h?r(e.length,String):[],v=d.length;for(var y in e)!t&&!c.call(e,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||d.push(y);return d}},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},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)}},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]",h="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,y,m){var g=u(e),b=u(t),_=g?p:s(e),E=b?p:s(t),w=(_=_==f?h:_)==h,O=(E=E==f?h:E)==h,x=_==E;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return m||(m=new r),g||l(e)?i(e,t,n,v,y,m):o(e,t,_,n,v,y,m);if(!(1&n)){var I=w&&d.call(e,"__wrapped__"),T=O&&d.call(t,"__wrapped__");if(I||T){var S=I?e.value():e,D=T?t.value():t;return m||(m=new r),y(S,D,n,v,m)}}return!!x&&(m||(m=new r),a(e,t,n,v,y,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 h=new r;if(o)var d=o(f,p,l,e,t,h);if(!(void 0===d?i(p,f,3,o,h):d))return!1}}return!0}},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 h=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===h&&(h=o),i(t,u,h)}}),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),h=n(3218),d=n(8630),v=n(6719),y=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,_,E){var w=y(e,n),O=y(t,n),x=E.get(O);if(x)r(e,n,x);else{var I=_?_(w,O,n+"",e,t,E):void 0,T=void 0===I;if(T){var S=c(O),D=!S&&f(O),k=!S&&!D&&v(O);I=O,S||D||k?c(w)?I=w:l(w)?I=a(w):D?(T=!1,I=i(O,!0)):k?(T=!1,I=o(O,!0)):I=[]:d(O)||u(O)?(I=w,u(w)?I=m(w):h(w)&&!p(w)||(I=s(O))):T=!1}T&&(E.set(O,I),b(I,O,g,_,E),E.delete(O)),r(e,n,I)}}},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 h=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(h,(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}},7518:e=>{e.exports=function(e){return 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),h=u.get(t);if(p&&h)return p==t&&h==e;var d=-1,v=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var m=e[d],g=t[d];if(a)var b=c?a(g,m,d,t,e,u):a(m,g,d,e,t,u);if(void 0!==b){if(b)continue;v=!1;break}if(y){if(!i(t,(function(e,t){if(!o(y,t)&&(m===e||s(m,e,n,a,u)))return y.push(t)}))){v=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},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 h=s;case"[object Set]":var d=1&r;if(h||(h=u),e.size!=t.size&&!d)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var y=a(h(e),h(t),r,c,f,p);return p.delete(e),y;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 h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var v=!0;s.set(e,t),s.set(t,e);for(var y=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)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var _=e.constructor,E=t.constructor;_==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E||(v=!1)}return s.delete(e),s.delete(t),v}},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]",h="[object WeakMap]",d="[object DataView]",v=c(r),y=c(i),m=c(o),g=c(a),b=c(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=d||i&&_(new i)!=l||o&&_(o.resolve())!=f||a&&_(new a)!=p||s&&_(new s)!=h)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case y:return l;case m:return f;case g:return p;case b:return h}return t}),e.exports=_},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}},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""}},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}},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}},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)}},6486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,h=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",_="[object Function]",E="[object GeneratorFunction]",w="[object Map]",O="[object Number]",x="[object Object]",I="[object Promise]",T="[object RegExp]",S="[object Set]",D="[object String]",k="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",C="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",U="[object Int32Array]",L="[object Uint8Array]",M="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",B=/\b__p \+= '';/g,Q=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,$=RegExp(W.source),K=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+xe+"]",Te="["+Ee+"]",Se="\\d+",De="["+we+"]",ke="[^\\ud800-\\udfff"+xe+Se+"\\u2700-\\u27bf"+we+Oe+"]",Ae="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Pe="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Oe+"]",Fe="(?:"+De+"|"+ke+")",je="(?:"+Ce+"|"+ke+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Le="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+Te+"|"+Ae+")?",qe="[\\ufe0e\\ufe0f]?",Ve=qe+Me+"(?:\\u200d(?:"+[Ne,Pe,Re].join("|")+")"+qe+Me+")*",Be="(?:"+["[\\u2700-\\u27bf]",Pe,Re].join("|")+")"+Ve,Qe="(?:"+[Ne+Te+"?",Te,Pe,Re,"[\\ud800-\\udfff]"].join("|")+")",ze=RegExp("['’]","g"),We=RegExp(Te,"g"),Ge=RegExp(Ae+"(?="+Ae+")|"+Qe+Ve,"g"),$e=RegExp([Ce+"?"+De+"+"+Ue+"(?="+[Ie,Ce,"$"].join("|")+")",je+"+"+Le+"(?="+[Ie,Ce+Fe,"$"].join("|")+")",Ce+"?"+Fe+"+"+Ue,Ce+"+"+Le,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,Be].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,Xe={};Xe[R]=Xe[C]=Xe[F]=Xe[j]=Xe[U]=Xe[L]=Xe[M]=Xe[q]=Xe[V]=!0,Xe[v]=Xe[y]=Xe[N]=Xe[m]=Xe[P]=Xe[g]=Xe[b]=Xe[_]=Xe[w]=Xe[O]=Xe[x]=Xe[T]=Xe[S]=Xe[D]=Xe[A]=!1;var Ze={};Ze[v]=Ze[y]=Ze[N]=Ze[P]=Ze[m]=Ze[g]=Ze[R]=Ze[C]=Ze[F]=Ze[j]=Ze[U]=Ze[w]=Ze[O]=Ze[x]=Ze[T]=Ze[S]=Ze[D]=Ze[k]=Ze[L]=Ze[M]=Ze[q]=Ze[V]=!0,Ze[b]=Ze[_]=Ze[A]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,ht=lt&<.isMap,dt=lt&<.isRegExp,vt=lt&<.isSet,yt=lt&<.isTypedArray;function mt(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)}function gt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function wt(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}function Ot(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function xt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(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}function Tt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function St(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Dt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var At=Ut("length");function Nt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Pt(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}function Rt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Pt(e,Ft,n)}function Ct(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ft(e){return e!=e}function jt(e,t){var n=null==e?0:e.length;return n?qt(e,t)/n:p}function Ut(e){return function(t){return null==t?i:t[e]}}function Lt(e){return function(t){return null==e?i:e[t]}}function Mt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Bt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Qt(e){return function(t){return e(t)}}function zt(e,t){return It(t,(function(t){return e[t]}))}function Wt(e,t){return e.has(t)}function Gt(e,t){for(var n=-1,r=e.length;++n<r&&Rt(t,e[n],0)>-1;);return n}function $t(e,t){for(var n=e.length;n--&&Rt(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=Lt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Jt=Lt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ht(e){return"\\"+et[e]}function Xt(e){return Ke.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Xt(e)?function(e){for(var t=Ge.lastIndex=0;Ge.test(e);)++t;return t}(e):At(e)}function an(e){return Xt(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=Lt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Je))).Array,ie=t.Date,Ee=t.Error,we=t.Function,Oe=t.Math,xe=t.Object,Ie=t.RegExp,Te=t.String,Se=t.TypeError,De=r.prototype,ke=we.prototype,Ae=xe.prototype,Ne=t["__core-js_shared__"],Pe=ke.toString,Re=Ae.hasOwnProperty,Ce=0,Fe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Ae.toString,Ue=Pe.call(xe),Le=ot._,Me=Ie("^"+Pe.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ut?t.Buffer:i,Ve=t.Symbol,Be=t.Uint8Array,Qe=qe?qe.allocUnsafe:i,Ge=en(xe.getPrototypeOf,xe),Ke=xe.create,et=Ae.propertyIsEnumerable,rt=De.splice,it=Ve?Ve.isConcatSpreadable:i,at=Ve?Ve.iterator:i,st=Ve?Ve.toStringTag:i,ct=function(){try{var e=co(xe,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,At=ie&&ie.now!==ot.Date.now&&ie.now,Lt=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Oe.ceil,fn=Oe.floor,pn=xe.getOwnPropertySymbols,hn=qe?qe.isBuffer:i,dn=t.isFinite,vn=De.join,yn=en(xe.keys,xe),mn=Oe.max,gn=Oe.min,bn=ie.now,_n=t.parseInt,En=Oe.random,wn=De.reverse,On=co(t,"DataView"),xn=co(t,"Map"),In=co(t,"Promise"),Tn=co(t,"Set"),Sn=co(t,"WeakMap"),Dn=co(xe,"create"),kn=Sn&&new Sn,An={},Nn=Mo(On),Pn=Mo(xn),Rn=Mo(In),Cn=Mo(Tn),Fn=Mo(Sn),jn=Ve?Ve.prototype:i,Un=jn?jn.valueOf:i,Ln=jn?jn.toString:i;function Mn(e){if(ns(e)&&!Wa(e)&&!(e instanceof Qn)){if(e instanceof Bn)return e;if(Re.call(e,"__wrapped__"))return qo(e)}return new Bn(e)}var qn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function zn(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])}}function Wn(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])}}function Gn(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])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Yn(e,t){var n=Wa(e),r=!n&&za(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Vt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Gr(0,t-1)]:i}function Hn(e,t){return Co(Si(e),ar(t,0,e.length))}function Xn(e){return Co(Si(e))}function Zn(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Re.call(e,t)&&Va(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Di(t,Ps(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:Ss(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!ts(e))return e;var f=Wa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Si(e,s)}else{var p=po(e),h=p==_||p==E;if(Ya(e))return Ei(e,u);if(p==x||p==v||h&&!o){if(s=c||h?{}:vo(e),!u)return c?function(e,t){return Di(e,fo(e),t)}(e,function(e,t){return e&&Di(t,Rs(t),e)}(s,e)):function(e,t){return Di(e,lo(e),t)}(e,rr(s,e))}else{if(!Ze[p])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case N:return wi(e);case m:case g:return new i(+e);case P:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case C:case F:case j:case U:case L:case M:case q:case V:return Oi(e,n);case w:return new i;case O:case D:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new i;case k:return r=e,Un?xe(Un.call(r)):{}}}(e,p,u)}}a||(a=new Kn);var d=a.get(e);if(d)return d;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,a))}));var y=f?i:(l?c?no:to:c?Rs:Ps)(e);return bt(y||e,(function(r,i){y&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=xe(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Se(o);return Ao((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=It(t,Qt(n))),r?(o=xt,a=!1):t.length>=200&&(o=Wt,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Mn.templateSettings={escape:Y,evaluate:J,interpolate:H,variable:"",imports:{_:Mn}},Mn.prototype=Vn.prototype,Mn.prototype.constructor=Mn,Bn.prototype=qn(Vn.prototype),Bn.prototype.constructor=Bn,Qn.prototype=qn(Vn.prototype),Qn.prototype.constructor=Qn,zn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(Dn){var n=t[e];return n===a?i:n}return Re.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return Dn?t[e]!==i:Re.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dn&&t===i?a:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Wn.prototype.has=function(e){return tr(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(xn||Wn),string:new zn}},Gn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return so(this,e).get(e)},Gn.prototype.has=function(e){return so(this,e).has(e)},Gn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),pr=Ni(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):Tt(i,s):r||(i[i.length]=s)}return i}var mr=Pi(),gr=Pi(!0);function br(e,t){return e&&mr(e,t,Ps)}function _r(e,t){return e&&gr(e,t,Ps)}function Er(e,t){return wt(t,(function(t){return Xa(e[t])}))}function wr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[Lo(t[n++])];return n&&n==r?e:i}function Or(e,t,n){var r=t(e);return Wa(e)?r:Tt(r,n(e))}function xr(e){return null==e?e===i?"[object Undefined]":"[object Null]":st&&st in xe(e)?function(e){var t=Re.call(e,st),n=e[st];try{e[st]=i;var r=!0}catch(e){}var o=je.call(e);return r&&(t?e[st]=n:delete e[st]),o}(e):function(e){return je.call(e)}(e)}function Ir(e,t){return e>t}function Tr(e,t){return null!=e&&Re.call(e,t)}function Sr(e,t){return null!=e&&t in xe(e)}function Dr(e,t,n){for(var o=n?xt:Ot,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=It(p,Qt(t))),l=gn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new $n(u&&p):i}p=e[0];var h=-1,d=c[0];e:for(;++h<a&&f.length<l;){var v=p[h],y=t?t(v):v;if(v=n||0!==v?v:0,!(d?Wt(d,y):o(f,y,n))){for(u=s;--u;){var m=c[u];if(!(m?Wt(m,y):o(e[u],y,n)))continue e}d&&d.push(y),f.push(v)}}return f}function kr(e,t,n){var r=null==(e=To(e,t=mi(t,e)))?e:e[Lo(Ho(t))];return null==r?i:mt(r,e,n)}function Ar(e){return ns(e)&&xr(e)==v}function Nr(e,t,n,r,o){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Wa(e),u=Wa(t),c=s?y:po(e),l=u?y:po(t),f=(c=c==v?x:c)==x,p=(l=l==v?x:l)==x,h=c==l;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Kn),s||ls(e)?Zi(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case m:case g:case O:return Va(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case D:return e==t+"";case w:var s=Zt;case S:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Zi(s(e),s(t),r,i,o,a);return a.delete(e),l;case k:if(Un)return Un.call(e)==Un.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var d=f&&Re.call(e,"__wrapped__"),_=p&&Re.call(t,"__wrapped__");if(d||_){var E=d?e.value():e,I=_?t.value():t;return a||(a=new Kn),o(E,I,n,r,a)}}return!!h&&(a||(a=new Kn),function(e,t,n,r,o,a){var s=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Re.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var y=e[f=u[l]],m=t[f];if(r)var g=s?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(!(g===i?y===m||o(y,m,n,r,a):g)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(e),a.delete(t),d}(e,t,n,r,o,a))}(e,t,n,r,Nr,o))}function Pr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=xe(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Kn;if(r)var h=r(l,f,c,e,t,p);if(!(h===i?Nr(f,l,3,r,p):h))return!1}}return!0}function Rr(e){return!(!ts(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?Me:ve).test(Mo(e));var t}function Cr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Wa(e)?Mr(e[0],e[1]):Lr(e):hu(e)}function Fr(e){if(!wo(e))return yn(e);var t=[];for(var n in xe(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Ur(e,t){var n=-1,i=$a(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Lr(e){var t=uo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Mr(e,t){return bo(e)&&Oo(t)?xo(Lo(e),t):function(n){var r=Ss(n,e);return r===i&&r===t?Ds(n,e):Nr(t,r,3)}}function qr(e,t,n,r,o){e!==t&&mr(t,(function(a,s){if(o||(o=new Kn),ts(a))!function(e,t,n,r,o,a,s){var u=Do(e,n),c=Do(t,n),l=s.get(c);if(l)Zn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):i,p=f===i;if(p){var h=Wa(c),d=!h&&Ya(c),v=!h&&!d&&ls(c);f=c,h||d||v?Wa(u)?f=u:Ka(u)?f=Si(u):d?(p=!1,f=Ei(c,!0)):v?(p=!1,f=Oi(c,!0)):f=[]:os(c)||za(c)?(f=u,za(u)?f=gs(u):ts(u)&&!Xa(u)||(f=vo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c)),Zn(e,n,f)}}(e,t,s,n,qr,r,o);else{var u=r?r(Do(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Zn(e,s,u)}}),Rs)}function Vr(e,t){var n=e.length;if(n)return mo(t+=t<0?n:0,n)?e[t]:i}function Br(e,t,n){t=t.length?It(t,(function(e){return Wa(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;t=It(t,Qt(ao()));var i=Ur(e,(function(e,n,i){var o=It(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=wr(e,a);n(s,a)&&Hr(o,mi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ct:Rt,o=-1,a=t.length,s=e;for(e===t&&(t=Si(t)),n&&(s=It(e,Qt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;mo(i)?rt.call(e,i,1):ci(e,i)}}return e}function Gr(e,t){return e+fn(En()*(t-e+1))}function $r(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return No(Io(e,t,iu),e+"")}function Yr(e){return Jn(Vs(e))}function Jr(e,t){var n=Vs(e);return Co(n,ar(t,0,n.length))}function Hr(e,t,n,r){if(!ts(e))return e;for(var o=-1,a=(t=mi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Lo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ts(f)?f:mo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Xr=kn?function(e,t){return kn.set(e,t),e}:iu,Zr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Co(Vs(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===i;o<a;){var f=fn((o+a)/2),p=n(e[f]),h=p!==i,d=null===p,v=p==p,y=cs(p);if(s)var m=r||v;else m=l?v&&(r||h):u?v&&h&&(r||!d):c?v&&h&&!d&&(r||!y):!d&&!y&&(r?p<=t:p<t);m?o=f+1:a=f}return gn(a,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ai(e){return"number"==typeof e?e:cs(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Wa(e))return It(e,si)+"";if(cs(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=xt;else if(o>=200){var c=t?null:$i(e);if(c)return nn(c);a=!1,i=Wt,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function ci(e,t){return null==(e=To(e,t=mi(t,e)))||delete e[Lo(Ho(t))]}function li(e,t,n,r){return Hr(e,t,n(wr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Qn&&(n=n.value()),St(t,(function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=lr(a[o]||s,e[u],t,n));return ui(yr(a,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function vi(e){return Ka(e)?e:[]}function yi(e){return"function"==typeof e?e:iu}function mi(e,t){return Wa(e)?e:bo(e,t)?[e]:Uo(bs(e))}var gi=Kr;function bi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function Oi(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=cs(e),s=t!==i,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ii(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=t.length,l=mn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ti(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=mn(a-u,0),p=r(f+l),h=!i;++o<f;)p[o]=e[o];for(var d=o;++c<l;)p[d+c]=t[c];for(;++s<u;)(h||o<a)&&(p[d+n[s]]=e[o++]);return p}function Si(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Di(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function ki(e,t){return function(n,r){var i=Wa(n)?gt:nr,o=t?t():{};return i(n,e,ao(r,2),o)}}function Ai(e){return Kr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&go(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=xe(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!$a(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=xe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(e){return function(t,n,r){for(var i=-1,o=xe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Ri(e){return function(t){var n=Xt(t=bs(t))?an(t):i,r=n?n[0]:t.charAt(0),o=n?bi(n,1).join(""):t.slice(1);return r[e]()+o}}function Ci(e){return function(t){return St(Xs(zs(t).replace(ze,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=qn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function ji(e){return function(t,n,r){var o=xe(t);if(!$a(t)){var a=ao(n,3);t=Ps(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Ui(e){return eo((function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Se(o);if(a&&!u&&"wrapper"==io(s))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var c=io(s=t[r]),l="wrapper"==c?ro(s):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Li(e,t,n,o,a,s,u,l,f,p){var h=t&c,d=1&t,v=2&t,y=24&t,m=512&t,g=v?i:Fi(e);return function i(){for(var c=arguments.length,b=r(c),_=c;_--;)b[_]=arguments[_];if(y)var E=oo(i),w=Kt(b,E);if(o&&(b=Ii(b,o,a,y)),s&&(b=Ti(b,s,u,y)),c-=w,y&&c<p){var O=tn(b,E);return Wi(e,t,Li,i.placeholder,n,b,O,l,f,p-c)}var x=d?n:this,I=v?x[e]:e;return c=b.length,l?b=So(b,l):m&&c>1&&b.reverse(),h&&f<c&&(b.length=f),this&&this!==ot&&this instanceof i&&(I=g||Fi(I)),I.apply(x,b)}}function Mi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ai(n),r=ai(r)),o=e(n,r)}return o}}function Vi(e){return eo((function(t){return t=It(t,Qt(ao())),Kr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function Bi(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?$r(t,e):t;var r=$r(t,ln(e/on(t)));return Xt(t)?bi(an(r),0,e).join(""):r.slice(0,e)}function Qi(e){return function(t,n,o){return o&&"number"!=typeof o&&go(t,n,o)&&(n=o=i),t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n,i){for(var o=-1,a=mn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:ds(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Wi(e,t,n,r,o,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var h=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,c,l,f],d=n.apply(i,h);return _o(e)&&ko(d,h),d.placeholder=r,Po(d,e,t)}function Gi(e){var t=Oe[e];return function(e,n){if(e=ms(e),(n=null==n?0:gn(vs(n),292))&&dn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $i=Tn&&1/nn(new Tn([,-0]))[1]==l?function(e){return new Tn(e)}:cu;function Ki(e){return function(t){var n=po(t);return n==w?Zt(t):n==S?rn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,a,l,f,p,h){var d=2&t;if(!d&&"function"!=typeof e)throw new Se(o);var v=a?a.length:0;if(v||(t&=-97,a=l=i),p=p===i?p:mn(vs(p),0),h=h===i?h:vs(h),v-=l?l.length:0,64&t){var y=a,m=l;a=l=i}var g=d?i:ro(e),b=[e,t,n,a,l,y,m,f,p,h];if(g&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ii(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ti(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,g),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(h=b[9]=b[9]===i?d?0:e.length:mn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Fi(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=oo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Wi(e,t,Li,a.placeholder,i,u,f,i,i,n-s):mt(this&&this!==ot&&this instanceof a?o:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?Li.apply(i,b):function(e,t,n,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ot&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return mt(p,o?n:this,f)}}(e,t,n,a);else var _=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Po((g?Xr:ko)(_,b),e,t)}function Ji(e,t,n,r){return e===i||Va(e,Ae[n])&&!Re.call(r,n)?t:e}function Hi(e,t,n,r,o,a){return ts(e)&&ts(t)&&(a.set(t,e),qr(e,t,i,Hi,a),a.delete(t)),e}function Xi(e){return os(e)?i:e}function Zi(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],y=t[p];if(r)var m=s?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==i){if(m)continue;h=!1;break}if(d){if(!kt(t,(function(e,t){if(!Wt(d,t)&&(v===e||o(v,e,n,r,a)))return d.push(t)}))){h=!1;break}}else if(v!==y&&!o(v,y,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function eo(e){return No(Io(e,i,Go),e+"")}function to(e){return Or(e,Ps,lo)}function no(e){return Or(e,Rs,fo)}var ro=kn?function(e){return kn.get(e)}:cu;function io(e){for(var t=e.name+"",n=An[t],r=Re.call(An,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Re.call(Mn,"placeholder")?Mn:e).placeholder}function ao(){var e=Mn.iteratee||ou;return e=e===ou?Cr:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Oo(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Rr(n)?n:i}var lo=pn?function(e){return null==e?[]:(e=xe(e),wt(pn(e),(function(t){return et.call(e,t)})))}:yu,fo=pn?function(e){for(var t=[];e;)Tt(t,lo(e)),e=Ge(e);return t}:yu,po=xr;function ho(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var a=Lo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&es(i)&&mo(a,i)&&(Wa(e)||za(e))}function vo(e){return"function"!=typeof e.constructor||wo(e)?{}:qn(Ge(e))}function yo(e){return Wa(e)||za(e)||!!(it&&e&&e[it])}function mo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function go(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?$a(n)&&mo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function bo(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||Z.test(e)||!X.test(e)||null!=t&&e in xe(t)}function _o(e){var t=io(e),n=Mn[t];if("function"!=typeof n||!(t in Qn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(On&&po(new On(new ArrayBuffer(1)))!=P||xn&&po(new xn)!=w||In&&po(In.resolve())!=I||Tn&&po(new Tn)!=S||Sn&&po(new Sn)!=A)&&(po=function(e){var t=xr(e),n=t==x?e.constructor:i,r=n?Mo(n):"";if(r)switch(r){case Nn:return P;case Pn:return w;case Rn:return I;case Cn:return S;case Fn:return A}return t});var Eo=Ne?Xa:mu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!ts(e)}function xo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in xe(n))}}function Io(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=mn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),mt(e,this,u)}}function To(e,t){return t.length<2?e:wr(e,ti(t,0,-1))}function So(e,t){for(var n=e.length,r=gn(t.length,n),o=Si(e);r--;){var a=t[r];e[r]=mo(a,n)?o[a]:i}return e}function Do(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ko=Ro(Xr),Ao=Lt||function(e,t){return ot.setTimeout(e,t)},No=Ro(Zr);function Po(e,t,n){var r=t+"";return No(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(d,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Co(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Gr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Fo,jo,Uo=(Fo=Fa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===jo.size&&jo.clear(),e})),jo=Fo.cache,Fo);function Lo(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Qn)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Si(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Kr((function(e,t){return Ka(e)?lr(e,yr(t,1,Ka,!0)):[]})),Bo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),ao(n,2)):[]})),Qo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),i,n):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Pt(e,ao(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vs(n),o=n<0?mn(r+o,0):gn(o,r-1)),Pt(e,ao(t,3),o,!0)}function Go(e){return null!=e&&e.length?yr(e,1):[]}function $o(e){return e&&e.length?e[0]:i}var Ko=Kr((function(e){var t=It(e,vi);return t.length&&t[0]===e[0]?Dr(t):[]})),Yo=Kr((function(e){var t=Ho(e),n=It(e,vi);return t===Ho(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Dr(n,ao(t,2)):[]})),Jo=Kr((function(e){var t=Ho(e),n=It(e,vi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Dr(n,i,t):[]}));function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var ea=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Wr(e,It(t,(function(e){return mo(e,n)?+e:e})).sort(xi)),r}));function ta(e){return null==e?e:wn.call(e)}var na=Kr((function(e){return ui(yr(e,1,Ka,!0))})),ra=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),ui(yr(e,1,Ka,!0),ao(t,2))})),ia=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,ui(yr(e,1,Ka,!0),i,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Ka(e))return t=mn(e.length,t),!0})),Vt(t,(function(t){return It(e,Ut(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:It(n,(function(e){return mt(t,i,e)}))}var sa=Kr((function(e,t){return Ka(e)?lr(e,t):[]})),ua=Kr((function(e){return hi(wt(e,Ka))})),ca=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),hi(wt(e,Ka),ao(t,2))})),la=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,hi(wt(e,Ka),i,t)})),fa=Kr(oa),pa=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function ha(e){var t=Mn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var va=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Qn&&mo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ya=ki((function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)})),ma=ji(zo),ga=ji(Wo);function ba(e,t){return(Wa(e)?bt:fr)(e,ao(t,3))}function _a(e,t){return(Wa(e)?_t:pr)(e,ao(t,3))}var Ea=ki((function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])})),wa=Kr((function(e,t,n){var i=-1,o="function"==typeof t,a=$a(e)?r(e.length):[];return fr(e,(function(e){a[++i]=o?mt(t,e,n):kr(e,t,n)})),a})),Oa=ki((function(e,t,n){ir(e,n,t)}));function xa(e,t){return(Wa(e)?It:Ur)(e,ao(t,3))}var Ia=ki((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ta=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&go(e,t[0],t[1])?t=[]:n>2&&go(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,yr(t,1),[])})),Sa=At||function(){return ot.Date.now()};function Da(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,c,i,i,i,i,t)}function ka(e,t){var n;if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Aa=Kr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Aa));r|=u}return Yi(e,r,t,n,i)})),Na=Kr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Na));r|=u}return Yi(t,r,e,n,i)}));function Pa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Se(o);function v(t){var n=r,o=a;return r=a=i,f=t,u=e.apply(o,n)}function y(e){return f=e,c=Ao(g,t),p?v(e):u}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-f>=s}function g(){var e=Sa();if(m(e))return b(e);c=Ao(g,function(e){var n=t-(e-l);return h?gn(n,s-(e-f)):n}(e))}function b(e){return c=i,d&&r?v(e):(r=a=i,u)}function _(){var e=Sa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return y(l);if(h)return _i(c),c=Ao(g,t),v(l)}return c===i&&(c=Ao(g,t)),u}return t=ms(t)||0,ts(n)&&(p=!!n.leading,s=(h="maxWait"in n)?mn(ms(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){c!==i&&_i(c),f=0,r=l=a=c=i},_.flush=function(){return c===i?u:b(Sa())},_}var Ra=Kr((function(e,t){return cr(e,1,t)})),Ca=Kr((function(e,t,n){return cr(e,ms(t)||0,n)}));function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Se(o);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(Fa.Cache||Gn),n}function ja(e){if("function"!=typeof e)throw new Se(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=Gn;var Ua=gi((function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Qt(ao())):It(yr(t,1),Qt(ao()))).length;return Kr((function(r){for(var i=-1,o=gn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),La=Kr((function(e,t){var n=tn(t,oo(La));return Yi(e,u,i,t,n)})),Ma=Kr((function(e,t){var n=tn(t,oo(Ma));return Yi(e,64,i,t,n)})),qa=eo((function(e,t){return Yi(e,256,i,i,i,t)}));function Va(e,t){return e===t||e!=e&&t!=t}var Ba=zi(Ir),Qa=zi((function(e,t){return e>=t})),za=Ar(function(){return arguments}())?Ar:function(e){return ns(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Wa=r.isArray,Ga=ft?Qt(ft):function(e){return ns(e)&&xr(e)==N};function $a(e){return null!=e&&es(e.length)&&!Xa(e)}function Ka(e){return ns(e)&&$a(e)}var Ya=hn||mu,Ja=pt?Qt(pt):function(e){return ns(e)&&xr(e)==g};function Ha(e){if(!ns(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Xa(e){if(!ts(e))return!1;var t=xr(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=ht?Qt(ht):function(e){return ns(e)&&po(e)==w};function is(e){return"number"==typeof e||ns(e)&&xr(e)==O}function os(e){if(!ns(e)||xr(e)!=x)return!1;var t=Ge(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==Ue}var as=dt?Qt(dt):function(e){return ns(e)&&xr(e)==T},ss=vt?Qt(vt):function(e){return ns(e)&&po(e)==S};function us(e){return"string"==typeof e||!Wa(e)&&ns(e)&&xr(e)==D}function cs(e){return"symbol"==typeof e||ns(e)&&xr(e)==k}var ls=yt?Qt(yt):function(e){return ns(e)&&es(e.length)&&!!Xe[xr(e)]},fs=zi(jr),ps=zi((function(e,t){return e<=t}));function hs(e){if(!e)return[];if($a(e))return us(e)?an(e):Si(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=po(e);return(t==w?Zt:t==S?nn:Vs)(e)}function ds(e){return e?(e=ms(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ys(e){return e?ar(vs(e),0,h):0}function ms(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Bt(e);var n=de.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):he.test(e)?p:+e}function gs(e){return Di(e,Rs(e))}function bs(e){return null==e?"":si(e)}var _s=Ai((function(e,t){if(wo(t)||$a(t))Di(t,Ps(t),e);else for(var n in t)Re.call(t,n)&&er(e,n,t[n])})),Es=Ai((function(e,t){Di(t,Rs(t),e)})),ws=Ai((function(e,t,n,r){Di(t,Rs(t),e,r)})),Os=Ai((function(e,t,n,r){Di(t,Ps(t),e,r)})),xs=eo(or),Is=Kr((function(e,t){e=xe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&go(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||Va(f,Ae[l])&&!Re.call(e,l))&&(e[l]=a[l])}return e})),Ts=Kr((function(e){return e.push(i,Hi),mt(Fs,i,e)}));function Ss(e,t,n){var r=null==e?i:wr(e,t);return r===i?n:r}function Ds(e,t){return null!=e&&ho(e,t,Sr)}var ks=Mi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),tu(iu)),As=Mi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),ao),Ns=Kr(kr);function Ps(e){return $a(e)?Yn(e):Fr(e)}function Rs(e){return $a(e)?Yn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}(e)}var Cs=Ai((function(e,t,n){qr(e,t,n)})),Fs=Ai((function(e,t,n,r){qr(e,t,n,r)})),js=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Di(e,no(e),n),r&&(n=sr(n,7,Xi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Us=eo((function(e,t){return null==e?{}:function(e,t){return Qr(e,t,(function(t,n){return Ds(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=It(no(e),(function(e){return[e]}));return t=ao(t),Qr(e,n,(function(e,n){return t(e,n[0])}))}var Ms=Ki(Ps),qs=Ki(Rs);function Vs(e){return null==e?[]:zt(e,Ps(e))}var Bs=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Qs(t):t)}));function Qs(e){return Hs(bs(e).toLowerCase())}function zs(e){return(e=bs(e))&&e.replace(ge,Yt).replace(We,"")}var Ws=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$s=Ri("toLowerCase"),Ks=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Ci((function(e,t,n){return e+(n?" ":"")+Hs(t)})),Js=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Hs=Ri("toUpperCase");function Xs(e,t,n){return e=bs(e),(t=n?i:t)===i?function(e){return Ye.test(e)}(e)?function(e){return e.match($e)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Zs=Kr((function(e,t){try{return mt(e,i,t)}catch(e){return Ha(e)?e:new Ee(e)}})),eu=eo((function(e,t){return bt(t,(function(t){t=Lo(t),ir(e,t,Aa(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Ui(),ru=Ui(!0);function iu(e){return e}function ou(e){return Cr("function"==typeof e?e:sr(e,1))}var au=Kr((function(e,t){return function(n){return kr(n,e,t)}})),su=Kr((function(e,t){return function(n){return kr(e,n,t)}}));function uu(e,t,n){var r=Ps(t),i=Er(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Ps(t)));var o=!(ts(n)&&"chain"in n&&!n.chain),a=Xa(e);return bt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Si(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function cu(){}var lu=Vi(It),fu=Vi(Et),pu=Vi(kt);function hu(e){return bo(e)?Ut(Lo(e)):function(e){return function(t){return wr(t,e)}}(e)}var du=Qi(),vu=Qi(!0);function yu(){return[]}function mu(){return!1}var gu,bu=qi((function(e,t){return e+t}),0),_u=Gi("ceil"),Eu=qi((function(e,t){return e/t}),1),wu=Gi("floor"),Ou=qi((function(e,t){return e*t}),1),xu=Gi("round"),Iu=qi((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=Da,Mn.assign=_s,Mn.assignIn=Es,Mn.assignInWith=ws,Mn.assignWith=Os,Mn.at=xs,Mn.before=ka,Mn.bind=Aa,Mn.bindAll=eu,Mn.bindKey=Na,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Mn.chain=ha,Mn.chunk=function(e,t,n){t=(n?go(e,t,n):t===i)?1:mn(vs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=r(ln(o/t));a<o;)u[s++]=ti(e,a,a+=t);return u},Mn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Tt(Wa(n)?Si(n):[n],yr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ao();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Se(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},Mn.conforms=function(e){return function(e){var t=Ps(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Mn.constant=tu,Mn.countBy=ya,Mn.create=function(e,t){var n=qn(e);return null==t?n:rr(n,t)},Mn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Mn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Mn.debounce=Pa,Mn.defaults=Is,Mn.defaultsDeep=Ts,Mn.defer=Ra,Mn.delay=Ca,Mn.difference=Vo,Mn.differenceBy=Bo,Mn.differenceWith=Qo,Mn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:vs(t))<0?0:t,r):[]},Mn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:vs(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0):[]},Mn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&go(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=vs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vs(r))<0&&(r+=o),r=n>r?0:ys(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Mn.filter=function(e,t){return(Wa(e)?wt:vr)(e,ao(t,3))},Mn.flatMap=function(e,t){return yr(xa(e,t),1)},Mn.flatMapDeep=function(e,t){return yr(xa(e,t),l)},Mn.flatMapDepth=function(e,t,n){return n=n===i?1:vs(n),yr(xa(e,t),n)},Mn.flatten=Go,Mn.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Mn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===i?1:vs(t)):[]},Mn.flip=function(e){return Yi(e,512)},Mn.flow=nu,Mn.flowRight=ru,Mn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Mn.functions=function(e){return null==e?[]:Er(e,Ps(e))},Mn.functionsIn=function(e){return null==e?[]:Er(e,Rs(e))},Mn.groupBy=Ea,Mn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Mn.intersection=Ko,Mn.intersectionBy=Yo,Mn.intersectionWith=Jo,Mn.invert=ks,Mn.invertBy=As,Mn.invokeMap=wa,Mn.iteratee=ou,Mn.keyBy=Oa,Mn.keys=Ps,Mn.keysIn=Rs,Mn.map=xa,Mn.mapKeys=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Mn.mapValues=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Mn.matches=function(e){return Lr(sr(e,1))},Mn.matchesProperty=function(e,t){return Mr(e,sr(t,1))},Mn.memoize=Fa,Mn.merge=Cs,Mn.mergeWith=Fs,Mn.method=au,Mn.methodOf=su,Mn.mixin=uu,Mn.negate=ja,Mn.nthArg=function(e){return e=vs(e),Kr((function(t){return Vr(t,e)}))},Mn.omit=js,Mn.omitBy=function(e,t){return Ls(e,ja(ao(t)))},Mn.once=function(e){return ka(2,e)},Mn.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Br(e,t,n))},Mn.over=lu,Mn.overArgs=Ua,Mn.overEvery=fu,Mn.overSome=pu,Mn.partial=La,Mn.partialRight=Ma,Mn.partition=Ia,Mn.pick=Us,Mn.pickBy=Ls,Mn.property=hu,Mn.propertyOf=function(e){return function(t){return null==e?i:wr(e,t)}},Mn.pull=Xo,Mn.pullAll=Zo,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,ao(n,2)):e},Mn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Mn.pullAt=ea,Mn.range=du,Mn.rangeRight=vu,Mn.rearg=qa,Mn.reject=function(e,t){return(Wa(e)?wt:vr)(e,ja(ao(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ao(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Wr(e,i),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new Se(o);return Kr(e,t=t===i?t:vs(t))},Mn.reverse=ta,Mn.sampleSize=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),(Wa(e)?Hn:Jr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Hr(e,t,n)},Mn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Hr(e,t,n,r)},Mn.shuffle=function(e){return(Wa(e)?Xn:ei)(e)},Mn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&go(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===i?r:vs(n)),ti(e,t,n)):[]},Mn.sortBy=Ta,Mn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,ao(t,2)):[]},Mn.split=function(e,t,n){return n&&"number"!=typeof n&&go(e,t,n)&&(t=n=i),(n=n===i?h:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=si(t))&&Xt(e)?bi(an(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new Se(o);return t=null==t?0:mn(vs(t),0),Kr((function(n){var r=n[t],i=bi(n,0,t);return r&&Tt(i,r),mt(e,this,i)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:vs(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:vs(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?fi(e,ao(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Se(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:r,maxWait:t,trailing:i})},Mn.thru=da,Mn.toArray=hs,Mn.toPairs=Ms,Mn.toPairsIn=qs,Mn.toPath=function(e){return Wa(e)?It(e,Lo):cs(e)?[e]:Si(Uo(bs(e)))},Mn.toPlainObject=gs,Mn.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||ls(e);if(t=ao(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ts(e)&&Xa(o)?qn(Ge(e)):{}}return(i?bt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Mn.unary=function(e){return Da(e,1)},Mn.union=na,Mn.unionBy=ra,Mn.unionWith=ia,Mn.uniq=function(e){return e&&e.length?ui(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?ui(e,ao(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Mn.unset=function(e,t){return null==e||ci(e,t)},Mn.unzip=oa,Mn.unzipWith=aa,Mn.update=function(e,t,n){return null==e?e:li(e,t,yi(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,yi(n),r)},Mn.values=Vs,Mn.valuesIn=function(e){return null==e?[]:zt(e,Rs(e))},Mn.without=sa,Mn.words=Xs,Mn.wrap=function(e,t){return La(yi(t),e)},Mn.xor=ua,Mn.xorBy=ca,Mn.xorWith=la,Mn.zip=fa,Mn.zipObject=function(e,t){return di(e||[],t||[],er)},Mn.zipObjectDeep=function(e,t){return di(e||[],t||[],Hr)},Mn.zipWith=pa,Mn.entries=Ms,Mn.entriesIn=qs,Mn.extend=Es,Mn.extendWith=ws,uu(Mn,Mn),Mn.add=bu,Mn.attempt=Zs,Mn.camelCase=Bs,Mn.capitalize=Qs,Mn.ceil=_u,Mn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))==n?n:0),t!==i&&(t=(t=ms(t))==t?t:0),ar(ms(e),t,n)},Mn.clone=function(e){return sr(e,4)},Mn.cloneDeep=function(e){return sr(e,5)},Mn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Mn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Mn.conformsTo=function(e,t){return null==t||ur(e,t,Ps(t))},Mn.deburr=zs,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=Eu,Mn.endsWith=function(e,t,n){e=bs(e),t=si(t);var r=e.length,o=n=n===i?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Mn.eq=Va,Mn.escape=function(e){return(e=bs(e))&&K.test(e)?e.replace(G,Jt):e},Mn.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,n){var r=Wa(e)?Et:hr;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Mn.find=ma,Mn.findIndex=zo,Mn.findKey=function(e,t){return Nt(e,ao(t,3),br)},Mn.findLast=ga,Mn.findLastIndex=Wo,Mn.findLastKey=function(e,t){return Nt(e,ao(t,3),_r)},Mn.floor=wu,Mn.forEach=ba,Mn.forEachRight=_a,Mn.forIn=function(e,t){return null==e?e:mr(e,ao(t,3),Rs)},Mn.forInRight=function(e,t){return null==e?e:gr(e,ao(t,3),Rs)},Mn.forOwn=function(e,t){return e&&br(e,ao(t,3))},Mn.forOwnRight=function(e,t){return e&&_r(e,ao(t,3))},Mn.get=Ss,Mn.gt=Ba,Mn.gte=Qa,Mn.has=function(e,t){return null!=e&&ho(e,t,Tr)},Mn.hasIn=Ds,Mn.head=$o,Mn.identity=iu,Mn.includes=function(e,t,n,r){e=$a(e)?e:Vs(e),n=n&&!r?vs(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),us(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Rt(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Rt(e,t,i)},Mn.inRange=function(e,t,n){return t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n){return e>=gn(t,n)&&e<mn(t,n)}(e=ms(e),t,n)},Mn.invoke=Ns,Mn.isArguments=za,Mn.isArray=Wa,Mn.isArrayBuffer=Ga,Mn.isArrayLike=$a,Mn.isArrayLikeObject=Ka,Mn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&xr(e)==m},Mn.isBuffer=Ya,Mn.isDate=Ja,Mn.isElement=function(e){return ns(e)&&1===e.nodeType&&!os(e)},Mn.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ls(e)||za(e)))return!e.length;var t=po(e);if(t==w||t==S)return!e.size;if(wo(e))return!Fr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Nr(e,t)},Mn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Mn.isError=Ha,Mn.isFinite=function(e){return"number"==typeof e&&dn(e)},Mn.isFunction=Xa,Mn.isInteger=Za,Mn.isLength=es,Mn.isMap=rs,Mn.isMatch=function(e,t){return e===t||Pr(e,t,uo(t))},Mn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Pr(e,t,uo(t),n)},Mn.isNaN=function(e){return is(e)&&e!=+e},Mn.isNative=function(e){if(Eo(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=is,Mn.isObject=ts,Mn.isObjectLike=ns,Mn.isPlainObject=os,Mn.isRegExp=as,Mn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=f},Mn.isSet=ss,Mn.isString=us,Mn.isSymbol=cs,Mn.isTypedArray=ls,Mn.isUndefined=function(e){return e===i},Mn.isWeakMap=function(e){return ns(e)&&po(e)==A},Mn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==xr(e)},Mn.join=function(e,t){return null==e?"":vn.call(e,t)},Mn.kebabCase=Ws,Mn.last=Ho,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vs(n))<0?mn(r+o,0):gn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Mn.lowerCase=Gs,Mn.lowerFirst=$s,Mn.lt=fs,Mn.lte=ps,Mn.max=function(e){return e&&e.length?dr(e,iu,Ir):i},Mn.maxBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Ir):i},Mn.mean=function(e){return jt(e,iu)},Mn.meanBy=function(e,t){return jt(e,ao(t,2))},Mn.min=function(e){return e&&e.length?dr(e,iu,jr):i},Mn.minBy=function(e,t){return e&&e.length?dr(e,ao(t,2),jr):i},Mn.stubArray=yu,Mn.stubFalse=mu,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=Ou,Mn.nth=function(e,t){return e&&e.length?Vr(e,vs(t)):i},Mn.noConflict=function(){return ot._===this&&(ot._=Le),this},Mn.noop=cu,Mn.now=Sa,Mn.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Bi(fn(i),n)+e+Bi(ln(i),n)},Mn.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Bi(t-r,n):e},Mn.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Bi(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(bs(e).replace(re,""),t||0)},Mn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&go(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ds(e),t===i?(t=e,e=0):t=ds(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return gn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Mn.reduce=function(e,t,n){var r=Wa(e)?St:Mt,i=arguments.length<3;return r(e,ao(t,4),n,i,fr)},Mn.reduceRight=function(e,t,n){var r=Wa(e)?Dt:Mt,i=arguments.length<3;return r(e,ao(t,4),n,i,pr)},Mn.repeat=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),$r(bs(e),t)},Mn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Lo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Mn.round=xu,Mn.runInContext=e,Mn.sample=function(e){return(Wa(e)?Jn:Yr)(e)},Mn.size=function(e){if(null==e)return 0;if($a(e))return us(e)?on(e):e.length;var t=po(e);return t==w||t==S?e.size:Fr(e).length},Mn.snakeCase=Ks,Mn.some=function(e,t,n){var r=Wa(e)?kt:ni;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Mn.sortedIndex=function(e,t){return ri(e,t)},Mn.sortedIndexBy=function(e,t,n){return ii(e,t,ao(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Va(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return ii(e,t,ao(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Mn.startCase=Ys,Mn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Mn.subtract=Iu,Mn.sum=function(e){return e&&e.length?qt(e,iu):0},Mn.sumBy=function(e,t){return e&&e.length?qt(e,ao(t,2)):0},Mn.template=function(e,t,n){var r=Mn.templateSettings;n&&go(e,t,n)&&(t=i),e=bs(e),t=ws({},t,r,Ji);var o,a,s=ws({},t.imports,r.imports,Ji),u=Ps(s),c=zt(s,u),l=0,f=t.interpolate||be,p="__p += '",h=Ie((t.escape||be).source+"|"+f.source+"|"+(f===H?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),d="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),p+=e.slice(l,u).replace(_e,Ht),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Re.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new Ee("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(B,""):p).replace(Q,"$1").replace(z,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Zs((function(){return we(u,d+"return "+p).apply(i,c)}));if(y.source=p,Ha(y))throw y;return y},Mn.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=h,r=gn(e,h);t=ao(t),e-=h;for(var i=Vt(r,t);++n<e;)t(n);return i},Mn.toFinite=ds,Mn.toInteger=vs,Mn.toLength=ys,Mn.toLower=function(e){return bs(e).toLowerCase()},Mn.toNumber=ms,Mn.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Mn.toString=bs,Mn.toUpper=function(e){return bs(e).toUpperCase()},Mn.trim=function(e,t,n){if((e=bs(e))&&(n||t===i))return Bt(e);if(!e||!(t=si(t)))return e;var r=an(e),o=an(t);return bi(r,Gt(r,o),$t(r,o)+1).join("")},Mn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.slice(0,sn(e)+1);if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,0,$t(r,an(t))+1).join("")},Mn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,Gt(r,an(t))).join("")},Mn.truncate=function(e,t){var n=30,r="...";if(ts(t)){var o="separator"in t?t.separator:o;n="length"in t?vs(t.length):n,r="omission"in t?si(t.omission):r}var a=(e=bs(e)).length;if(Xt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?bi(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Mn.unescape=function(e){return(e=bs(e))&&$.test(e)?e.replace(W,un):e},Mn.uniqueId=function(e){var t=++Ce;return bs(e)+t},Mn.upperCase=Js,Mn.upperFirst=Hs,Mn.each=ba,Mn.eachRight=_a,Mn.first=$o,uu(Mn,(gu={},br(Mn,(function(e,t){Re.call(Mn.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),Mn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),bt(["drop","take"],(function(e,t){Qn.prototype[e]=function(n){n=n===i?1:mn(vs(n),0);var r=this.__filtered__&&!t?new Qn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Qn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Qn.prototype[e]=function(){return this.__filtered__?new Qn(this):this[n](1)}})),Qn.prototype.compact=function(){return this.filter(iu)},Qn.prototype.find=function(e){return this.filter(e).head()},Qn.prototype.findLast=function(e){return this.reverse().find(e)},Qn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Qn(this):this.map((function(n){return kr(n,e,t)}))})),Qn.prototype.reject=function(e){return this.filter(ja(ao(e)))},Qn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Qn.prototype.toArray=function(){return this.take(h)},br(Qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Mn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Mn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Qn,c=s[0],l=u||Wa(t),f=function(e){var t=o.apply(Mn,Tt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&l){t=v?t:new Qn(this);var y=e.apply(t,s);return y.__actions__.push({func:da,args:[f],thisArg:i}),new Bn(y,p)}return d&&v?e.apply(this,s):(y=this.thru(f),d?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),br(Qn.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Re.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Li(i,2).name]=[{name:"wrapper",func:i}],Qn.prototype.clone=function(){var e=new Qn(this.__wrapped__);return e.__actions__=Si(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Si(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Si(this.__views__),e},Qn.prototype.reverse=function(){if(this.__filtered__){var e=new Qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=gn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var v=-1,y=e[c+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,_=g(y);if(2==b)y=_;else if(!_){if(1==b)continue e;break e}}d[p++]=y}return d},Mn.prototype.at=va,Mn.prototype.chain=function(){return ha(this)},Mn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===i&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=qo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Qn){var t=e;return this.__actions__.length&&(t=new Qn(this)),(t=t.reverse()).__actions__.push({func:da,args:[ta],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(ta)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,at&&(Mn.prototype[at]=function(){return this}),Mn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},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}},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)}},3890:(e,t,n)=>{"use strict";var r,i,o,a,s,u,c,l,f,p,h,d,v,y,m,g,b,_,E,w,O,x,I,T,S,D,k,A,N,P,R,C,F,j,U,L,M,q,V,B,Q,z,W,G,$,K;n.r(t),n.d(t,{AccessDeniedReason:()=>r,BillingModel:()=>s,BillingPeriod:()=>u,CustomerModel:()=>J,EntitlementResetPeriod:()=>h,ErrorCode:()=>v,FeatureType:()=>$,INVALID_ENTITLEMENT:()=>Y,MeterType:()=>K,TrialPeriodUnits:()=>B,default:()=>za}),function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(r||(r={})),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"}(i||(i={})),function(e){e.Id="id"}(o||(o={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(a||(a={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(s||(s={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(u||(u={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(c||(c={})),function(e){e.Usd="USD"}(l||(l={})),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"}(f||(f={})),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"}(p||(p={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(h||(h={})),function(e){e.DisplayName="displayName",e.Id="id"}(d||(d={})),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.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(v||(v={})),function(e){e.EnvironmentId="environmentId",e.Id="id"}(y||(y={})),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"}(m||(m={})),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"}(g||(g={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(b||(b={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(_||(_={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(E||(E={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(w||(w={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(O||(O={})),function(e){e.Id="id"}(x||(x={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(I||(I={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(T||(T={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(S||(S={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(D||(D={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(k||(k={})),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"}(A||(A={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(N||(N={})),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"}(P||(P={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(R||(R={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(C||(C={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(F||(F={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(j||(j={})),function(e){e.Asc="ASC",e.Desc="DESC"}(U||(U={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(L||(L={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(M||(M={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(q||(q={})),function(e){e.Active="ACTIVE",e.Expired="EXPIRED",e.Inactive="INACTIVE",e.InTrial="IN_TRIAL"}(V||(V={})),function(e){e.Day="DAY",e.Month="MONTH"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE",e.NoTrials="NO_TRIALS"}(Q||(Q={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(z||(z={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}(W||(W={})),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"}(G||(G={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}($||($={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(K||(K={}));var Y={isValid:!1,isGranted:!1,accessDeniedReason:r.Unknown},J=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===V.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===V.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===F.Active}))},e}(),H=function(e,t){return H=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])},H(e,t)};function X(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}H(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Z=function(){return Z=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},Z.apply(this,arguments)};function ee(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 te(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 ne(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 re(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 ie(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const oe=/\r\n|[\n\r]/g;function ae(e,t){let n=0,r=1;for(const i of e.body.matchAll(oe)){if("number"==typeof i.index||ie(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function se(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+ue([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ue([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ue(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 ce 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=le(Array.isArray(t)?t:t?[t]:void 0);const l=le(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=>ae(n,e))):null==l?void 0:l.map((e=>ae(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,ce):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"+se((t=n.loc).source,ae(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+se(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 le(e){return void 0===e||0===e.length?void 0:e}function fe(e,t,n){return new ce(`Syntax Error: ${n}`,void 0,e,[t])}let pe;var he;(he=pe||(pe={})).NAME="Name",he.DOCUMENT="Document",he.OPERATION_DEFINITION="OperationDefinition",he.VARIABLE_DEFINITION="VariableDefinition",he.SELECTION_SET="SelectionSet",he.FIELD="Field",he.ARGUMENT="Argument",he.FRAGMENT_SPREAD="FragmentSpread",he.INLINE_FRAGMENT="InlineFragment",he.FRAGMENT_DEFINITION="FragmentDefinition",he.VARIABLE="Variable",he.INT="IntValue",he.FLOAT="FloatValue",he.STRING="StringValue",he.BOOLEAN="BooleanValue",he.NULL="NullValue",he.ENUM="EnumValue",he.LIST="ListValue",he.OBJECT="ObjectValue",he.OBJECT_FIELD="ObjectField",he.DIRECTIVE="Directive",he.NAMED_TYPE="NamedType",he.LIST_TYPE="ListType",he.NON_NULL_TYPE="NonNullType",he.SCHEMA_DEFINITION="SchemaDefinition",he.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",he.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",he.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",he.FIELD_DEFINITION="FieldDefinition",he.INPUT_VALUE_DEFINITION="InputValueDefinition",he.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",he.UNION_TYPE_DEFINITION="UnionTypeDefinition",he.ENUM_TYPE_DEFINITION="EnumTypeDefinition",he.ENUM_VALUE_DEFINITION="EnumValueDefinition",he.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",he.DIRECTIVE_DEFINITION="DirectiveDefinition",he.SCHEMA_EXTENSION="SchemaExtension",he.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",he.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",he.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",he.UNION_TYPE_EXTENSION="UnionTypeExtension",he.ENUM_TYPE_EXTENSION="EnumTypeExtension",he.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class de{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 ve{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 ye={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"]},me=new Set(Object.keys(ye));function ge(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&me.has(t)}let be,_e;var Ee;function we(e){return Oe(e,[])}function Oe(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:Oe(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(Oe(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+": "+Oe(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function xe(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(be||(be={})),(Ee=_e||(_e={})).SOF="<SOF>",Ee.EOF="<EOF>",Ee.BANG="!",Ee.DOLLAR="$",Ee.AMP="&",Ee.PAREN_L="(",Ee.PAREN_R=")",Ee.SPREAD="...",Ee.COLON=":",Ee.EQUALS="=",Ee.AT="@",Ee.BRACKET_L="[",Ee.BRACKET_R="]",Ee.BRACE_L="{",Ee.PIPE="|",Ee.BRACE_R="}",Ee.NAME="Name",Ee.INT="Int",Ee.FLOAT="Float",Ee.STRING="String",Ee.BLOCK_STRING="BlockString",Ee.COMMENT="Comment";class Ie{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||xe(!1,`Body must be a string. Received: ${we(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||xe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||xe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Te;function Se(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&&De(t[r]);)++r;let i=t.length;for(;i>r&&De(t[i-1]);)--i;return t.slice(r,i).join("\n")}function De(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function ke(e){return e>=48&&e<=57}function Ae(e){return e>=97&&e<=122||e>=65&&e<=90}function Ne(e){return Ae(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"}(Te||(Te={}));class Pe{constructor(e){const t=new ve(_e.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!==_e.EOF)do{if(e.next)e=e.next;else{const t=Me(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===_e.COMMENT);return e}}function Re(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Ce(e,t){return Fe(e.charCodeAt(t))&&je(e.charCodeAt(t+1))}function Fe(e){return e>=55296&&e<=56319}function je(e){return e>=56320&&e<=57343}function Ue(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return _e.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Le(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new ve(t,n,r,o,a,i)}function Me(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 qe(e,i);case 33:return Le(e,_e.BANG,i,i+1);case 36:return Le(e,_e.DOLLAR,i,i+1);case 38:return Le(e,_e.AMP,i,i+1);case 40:return Le(e,_e.PAREN_L,i,i+1);case 41:return Le(e,_e.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return Le(e,_e.SPREAD,i,i+3);break;case 58:return Le(e,_e.COLON,i,i+1);case 61:return Le(e,_e.EQUALS,i,i+1);case 64:return Le(e,_e.AT,i,i+1);case 91:return Le(e,_e.BRACKET_L,i,i+1);case 93:return Le(e,_e.BRACKET_R,i,i+1);case 123:return Le(e,_e.BRACE_L,i,i+1);case 124:return Le(e,_e.PIPE,i,i+1);case 125:return Le(e,_e.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Ye(e,i):Qe(e,i)}if(ke(t)||45===t)return Ve(e,i,t);if(Ne(t))return Je(e,i);throw fe(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Re(t)||Ce(n,i)?`Unexpected character: ${Ue(e,i)}.`:`Invalid character: ${Ue(e,i)}.`)}return Le(e,_e.EOF,r,r)}function qe(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(Re(e))++i;else{if(!Ce(n,i))break;i+=2}}return Le(e,_e.COMMENT,t,i,n.slice(t+1,i))}function Ve(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),ke(o))throw fe(e.source,i,`Invalid number, unexpected digit after 0: ${Ue(e,i)}.`)}else i=Be(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=Be(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=Be(e,i,o),o=r.charCodeAt(i)),46===o||Ne(o))throw fe(e.source,i,`Invalid number, expected digit but got: ${Ue(e,i)}.`);return Le(e,a?_e.FLOAT:_e.INT,t,i,r.slice(t,i))}function Be(e,t,n){if(!ke(n))throw fe(e.source,t,`Invalid number, expected digit but got: ${Ue(e,t)}.`);const r=e.source.body;let i=t+1;for(;ke(r.charCodeAt(i));)++i;return i}function Qe(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),Le(e,_e.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Re(r))++i;else{if(!Ce(n,i))throw fe(e.source,i,`Invalid character within String: ${Ue(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?ze(e,i):We(e,i):Ke(e,i);a+=t.value,i+=t.size,o=i}}throw fe(e.source,i,"Unterminated string.")}function ze(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||!Re(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|$e(e),r<0)break}throw fe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function We(e,t){const n=e.source.body,r=Ge(n,t+2);if(Re(r))return{value:String.fromCodePoint(r),size:6};if(Fe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=Ge(n,t+8);if(je(e))return{value:String.fromCodePoint(r,e),size:12}}throw fe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ge(e,t){return $e(e.charCodeAt(t))<<12|$e(e.charCodeAt(t+1))<<8|$e(e.charCodeAt(t+2))<<4|$e(e.charCodeAt(t+3))}function $e(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ke(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 fe(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ye(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 ve(_e.BLOCK_STRING,t,a+3,i,o,Se(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(Re(r))++a;else{if(!Ce(n,a))throw fe(e.source,a,`Invalid character within String: ${Ue(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 fe(e.source,a,"Unterminated string.")}function Je(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Ae(o=n.charCodeAt(i))||ke(o)||95===o);)++i;var o;return Le(e,_e.NAME,t,i,n.slice(t,i))}class He{constructor(e,t){const n=function(e){return e instanceof Ie}(e)?e:new Ie(e);this._lexer=new Pe(n),this._options=t}parseName(){const e=this.expectToken(_e.NAME);return this.node(e,{kind:pe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:pe.DOCUMENT,definitions:this.many(_e.SOF,this.parseDefinition,_e.EOF)})}parseDefinition(){if(this.peek(_e.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===_e.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 fe(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(_e.BRACE_L))return this.node(e,{kind:pe.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(_e.NAME)&&(n=this.parseName()),this.node(e,{kind:pe.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(_e.NAME);switch(e.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(_e.PAREN_L,this.parseVariableDefinition,_e.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:pe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(_e.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(_e.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(_e.DOLLAR),this.node(e,{kind:pe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:pe.SELECTION_SET,selections:this.many(_e.BRACE_L,this.parseSelection,_e.BRACE_R)})}parseSelection(){return this.peek(_e.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(_e.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:pe.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(_e.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(_e.PAREN_L,t,_e.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(_e.COLON),this.node(t,{kind:pe.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(_e.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(_e.NAME)?this.node(e,{kind:pe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:pe.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:pe.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:pe.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 _e.BRACKET_L:return this.parseList(e);case _e.BRACE_L:return this.parseObject(e);case _e.INT:return this._lexer.advance(),this.node(t,{kind:pe.INT,value:t.value});case _e.FLOAT:return this._lexer.advance(),this.node(t,{kind:pe.FLOAT,value:t.value});case _e.STRING:case _e.BLOCK_STRING:return this.parseStringLiteral();case _e.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:pe.BOOLEAN,value:!0});case"false":return this.node(t,{kind:pe.BOOLEAN,value:!1});case"null":return this.node(t,{kind:pe.NULL});default:return this.node(t,{kind:pe.ENUM,value:t.value})}case _e.DOLLAR:if(e){if(this.expectToken(_e.DOLLAR),this._lexer.token.kind===_e.NAME){const e=this._lexer.token.value;throw fe(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:pe.STRING,value:e.value,block:e.kind===_e.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:pe.LIST,values:this.any(_e.BRACKET_L,(()=>this.parseValueLiteral(e)),_e.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:pe.OBJECT,fields:this.any(_e.BRACE_L,(()=>this.parseObjectField(e)),_e.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(_e.COLON),this.node(t,{kind:pe.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(_e.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(_e.AT),this.node(t,{kind:pe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(_e.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(_e.BRACKET_R),t=this.node(e,{kind:pe.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(_e.BANG)?this.node(e,{kind:pe.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:pe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(_e.STRING)||this.peek(_e.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(_e.BRACE_L,this.parseOperationTypeDefinition,_e.BRACE_R);return this.node(e,{kind:pe.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(_e.COLON);const n=this.parseNamedType();return this.node(e,{kind:pe.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:pe.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:pe.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(_e.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(_e.BRACE_L,this.parseFieldDefinition,_e.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(_e.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:pe.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(_e.PAREN_L,this.parseInputValueDef,_e.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(_e.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(_e.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:pe.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:pe.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:pe.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(_e.EQUALS)?this.delimitedMany(_e.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:pe.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(_e.BRACE_L,this.parseEnumValueDefinition,_e.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:pe.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 fe(this._lexer.source,this._lexer.token.start,`${Xe(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:pe.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(_e.BRACE_L,this.parseInputValueDef,_e.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===_e.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(_e.BRACE_L,this.parseOperationTypeDefinition,_e.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:pe.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:pe.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:pe.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:pe.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:pe.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:pe.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:pe.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(_e.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:pe.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(_e.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Te,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 de(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 fe(this._lexer.source,t.start,`Expected ${Ze(e)}, found ${Xe(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==_e.NAME||t.value!==e)throw fe(this._lexer.source,t.start,`Expected "${e}", found ${Xe(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===_e.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return fe(this._lexer.source,t.start,`Unexpected ${Xe(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 Xe(e){const t=e.value;return Ze(e.kind)+(null!=t?` "${t}"`:"")}function Ze(e){return function(e){return e===_e.BANG||e===_e.DOLLAR||e===_e.AMP||e===_e.PAREN_L||e===_e.PAREN_R||e===_e.SPREAD||e===_e.COLON||e===_e.EQUALS||e===_e.AT||e===_e.BRACKET_L||e===_e.BRACKET_R||e===_e.BRACE_L||e===_e.PIPE||e===_e.BRACE_R}(e)?`"${e}"`:e}var et=new Map,tt=new Map,nt=!0,rt=!1;function it(e){return e.replace(/[\s,]+/g," ").trim()}function ot(e){var t,n,r,i=it(e);if(!et.has(i)){var o=function(e,t){return new He(e,t).parseDocument()}(e,{experimentalFragmentVariables:rt,allowLegacyFragmentVariables:rt});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");et.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=it((a=e.loc).source.body.substring(a.start,a.end)),o=tt.get(t);o&&!o.has(i)?nt&&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||tt.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),Z(Z({},t),{definitions:r}))))}return et.get(i)}function at(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]})),ot(r)}var st,ut=at;(st=at||(at={})).gql=ut,st.resetCaches=function(){et.clear(),tt.clear()},st.disableFragmentWarnings=function(){nt=!1},st.enableExperimentalFragmentVariables=function(){rt=!0},st.disableExperimentalFragmentVariables=function(){rt=!1},at.default=at;var ct,lt,ft,pt=at(ct||(lt=["\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"],ft=["\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(lt,"raw",{value:ft}):lt.raw=ft,ct=lt)),ht=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},dt=at(gt||(gt=ht(["\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"]))),vt=at(bt||(bt=ht(["\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"]))),yt=at(_t||(_t=ht(["\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"])),dt,pt,vt);const mt=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:at(Et||(Et=ht(["\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 "])),yt),variables:{paging:{first:50},filter:{status:{eq:k.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:A.RefId,direction:U.Asc}]}})},e}();var gt,bt,_t,Et,wt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Ot=at(St||(St=wt(["\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"])),pt),xt=at(Dt||(Dt=wt(["\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"]))),It=at(kt||(kt=wt(["\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"])),Ot,xt);const Tt=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:at(At||(At=wt(["\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 "])),It),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var St,Dt,kt,At;const Nt=function(e){this.paywall=new mt(e),this.customers=new Tt(e)};var Pt=n(1609),Rt=n.n(Pt),Ct=n(2492),Ft=n.n(Ct);function jt(e){var t=e.customerId;if(!t||Rt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Ut=n(5161),Lt=n.n(Ut),Mt=n(9734),qt=n.n(Mt),Vt=function(){return Vt=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},Vt.apply(this,arguments)},Bt=function(){function e(){this.mapEntitlementByDecision=function(e,t,n,r){var i=n.calculatedEntitlement.featureType,o=n.calculatedEntitlement.meterType;if(!i)throw new Error("No feature type provided with unknown reason");switch(i){case $.Boolean:return{isValid:!0,featureType:i,isGranted:e.isGranted,accessDeniedReason:e.accessDeniedReason,featureId:t};case $.Number:return o===T.Fluctuating||o===T.Incremental?{isValid:!0,featureType:$.Number,isGranted:e.isGranted,usageLimit:n.calculatedEntitlement.usageLimit||0,featureUnits:n.calculatedEntitlement.featureUnits||"",featureUnitsPlural:n.calculatedEntitlement.featureUnitsPlural||"",accessDeniedReason:e.accessDeniedReason,hasUnlimitedUsage:n.calculatedEntitlement.hasUnlimitedUsage,meterType:o,currentUsage:n.featureUsage.currentUsage||0,requestedUsage:r||0,resetPeriod:n.featureUsage.resetPeriod,nextResetDate:n.featureUsage.nextResetDate,resetPeriodConfiguration:n.featureUsage.resetPeriodConfiguration,featureId:t}:{isValid:!0,featureType:$.Number,meterType:o,isGranted:e.isGranted,usageLimit:n.calculatedEntitlement.usageLimit||0,featureUnits:n.calculatedEntitlement.featureUnits||"",featureUnitsPlural:n.calculatedEntitlement.featureUnitsPlural||"",accessDeniedReason:e.accessDeniedReason,hasUnlimitedUsage:n.calculatedEntitlement.hasUnlimitedUsage,featureId:t};default:throw new Error("Feature type ".concat(i," is not supported in this version of the sdk"))}}}return e.prototype.mapSlimEntitlement=function(e){var t,n,i,o,a,s=null===(t=e.feature)||void 0===t?void 0:t.featureType,u=null===(n=e.feature)||void 0===n?void 0:n.meterType;if(!s){if(e.accessDeniedReason===r.FeatureNotFound)return{isValid:!1,isGranted:!1,accessDeniedReason:r.FeatureNotFound};throw new Error("No feature type provided with unknown reason")}switch(s){case $.Boolean:return{isValid:!0,featureType:s,isGranted:e.isGranted,accessDeniedReason:e.accessDeniedReason,featureId:null===(i=e.feature)||void 0===i?void 0:i.refId};case $.Number:return u===T.Fluctuating||u===T.Incremental?{isValid:!0,featureType:s,meterType:u,featureId:null===(o=e.feature)||void 0===o?void 0:o.refId,isGranted:e.isGranted,usageLimit:e.usageLimit||0,currentUsage:e.currentUsage||0,requestedUsage:e.requestedUsage||0,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod,nextResetDate:e.nextResetDate,resetPeriodConfiguration:e.resetPeriodConfiguration,accessDeniedReason:e.accessDeniedReason}:{isValid:!0,featureType:s,featureId:null===(a=e.feature)||void 0===a?void 0:a.refId,isGranted:!0,accessDeniedReason:e.accessDeniedReason,usageLimit:e.usageLimit||0,hasUnlimitedUsage:e.hasUnlimitedUsage};default:throw new Error("Feature type ".concat(s," is not supported in this version of the sdk"))}},e.prototype.mapFullEntitlementByDecision=function(e,t,n,r){return this.mapFullEntitlement(Vt(Vt(Vt(Vt(Vt({},t),{customerId:n}),e.calculatedEntitlement),e.featureUsage),{feature:{featureType:e.calculatedEntitlement.featureType,meterType:e.calculatedEntitlement.meterType,featureUnits:e.calculatedEntitlement.featureUnits,featureUnitsPlural:e.calculatedEntitlement.featureUnitsPlural,description:e.calculatedEntitlement.featureDescription,displayName:e.calculatedEntitlement.featureDisplayName||"",refId:e.calculatedEntitlement.featureId},requestedUsage:r}))},e.prototype.mapFullEntitlement=function(e){var t,n,r,i,o,a,s,u,c,l,f,p,h=this.mapSlimEntitlement(e),d=null===(t=e.feature)||void 0===t?void 0:t.featureType,v=null===(n=e.feature)||void 0===n?void 0:n.meterType;switch(d){case $.Boolean:return Vt(Vt({},h),{featureDisplayName:null===(r=e.feature)||void 0===r?void 0:r.displayName,featureDescription:null===(i=e.feature)||void 0===i?void 0:i.description});case $.Number:return v===T.Fluctuating||v===T.Incremental?Vt(Vt({},h),{featureUnits:(null===(o=e.feature)||void 0===o?void 0:o.featureUnits)||"",featureUnitsPlural:(null===(a=e.feature)||void 0===a?void 0:a.featureUnitsPlural)||"",featureDisplayName:null===(s=e.feature)||void 0===s?void 0:s.displayName,featureDescription:null===(u=e.feature)||void 0===u?void 0:u.description}):Vt(Vt({},h),{featureUnits:(null===(c=e.feature)||void 0===c?void 0:c.featureUnits)||"",featureUnitsPlural:(null===(l=e.feature)||void 0===l?void 0:l.featureUnitsPlural)||"",featureDisplayName:null===(f=e.feature)||void 0===f?void 0:f.displayName,featureDescription:null===(p=e.feature)||void 0===p?void 0:p.description});default:throw new Error("Feature type ".concat(d," is not supported in this version of the sdk"))}},e.prototype.mapCachedEntitlement=function(e,t,n){var r,i,o,a,s,u,c;return{calculatedEntitlement:{featureId:null===(r=e.feature)||void 0===r?void 0:r.refId,featureType:null===(i=e.feature)||void 0===i?void 0:i.featureType,meterType:null===(o=e.feature)||void 0===o?void 0:o.meterType,usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,featureUnits:null===(a=e.feature)||void 0===a?void 0:a.featureUnits,featureUnitsPlural:null===(s=e.feature)||void 0===s?void 0:s.featureUnitsPlural,featureDisplayName:null===(u=e.feature)||void 0===u?void 0:u.displayName,featureDescription:null===(c=e.feature)||void 0===c?void 0:c.description},featureUsage:{resetPeriod:e.resetPeriod,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage,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.mapPrice=function(e){var t=e.feature,n=e.price,r={billingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,featureUnits:t.featureUnits,featureUnitsPlural: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:Lt()(qt()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:Lt()(qt()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),prices:Lt()(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.mapCustomer=function(e){var t=this;return new J({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:Lt()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:Lt()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,featureType:t.featureType,featureMeterType:t.meterType,featureUnits:t.featureUnits,featureUnitsPlural:t.featureUnitsPlural,featureDisplayName:t.displayName,featureDescription:t.description,featureId:t.refId,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,featureType:t.featureType,featureMeterType:t.meterType,featureUnits:t.featureUnits,featureUnitsPlural:t.featureUnitsPlural,featureDisplayName:t.displayName,featureDescription:t.description,featureId:t.refId,hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod,endDate: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:Lt()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=qt()(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=qt()(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}(),Qt="Invariant Violation",zt=Object.setPrototypeOf,Wt=void 0===zt?function(e,t){return e.__proto__=t,e}:zt,Gt=function(e){function t(n){void 0===n&&(n=Qt);var r=e.call(this,"number"==typeof n?Qt+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Qt,Wt(r,t.prototype),r}return X(t,e),t}(Error);function $t(e,t){if(!e)throw new Gt(t)}var Kt=["debug","log","warn","error","silent"],Yt=Kt.indexOf("log");function Jt(e){return function(){if(Kt.indexOf(e)>=Yt){var t=console[e]||console.log;return t.apply(console,arguments)}}}function Ht(e){try{return e()}catch(e){}}!function(e){e.debug=Jt("debug"),e.log=Jt("log"),e.warn=Jt("warn"),e.error=Jt("error")}($t||($t={}));const Xt=Ht((function(){return globalThis}))||Ht((function(){return window}))||Ht((function(){return self}))||Ht((function(){return n.g}))||Ht((function(){return Function("return this")()}));var Zt="__",en=[Zt,Zt].join("DEV");const tn=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(Xt,en,{value:"production"!==Ht((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),Xt[en]}}();function nn(e){try{return e()}catch(e){}}var rn=nn((function(){return globalThis}))||nn((function(){return window}))||nn((function(){return self}))||nn((function(){return n.g}))||nn((function(){return Function("return this")()})),on=!1;function an(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 sn(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 un(e,t,n){return t&&sn(e.prototype,t),n&&sn(e,n),e}!rn||nn((function(){return"production"}))||nn((function(){return process}))||(Object.defineProperty(rn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),on=!0),on&&(delete rn.process,on=!1),__DEV__?$t("boolean"==typeof tn,tn):$t("boolean"==typeof tn,38);var cn=function(){return"function"==typeof Symbol},ln=function(e){return cn()&&Boolean(Symbol[e])},fn=function(e){return ln(e)?Symbol[e]:"@@"+e};cn()&&!ln("observable")&&(Symbol.observable=Symbol("observable"));var pn=fn("iterator"),hn=fn("observable"),dn=fn("species");function vn(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function yn(e){var t=e.constructor;return void 0!==t&&null===(t=t[dn])&&(t=void 0),void 0!==t?t:Tn}function mn(e){return e instanceof Tn}function gn(e){gn.log?gn.log(e):setTimeout((function(){throw e}))}function bn(e){Promise.resolve().then((function(){try{e()}catch(e){gn(e)}}))}function _n(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=vn(t,"unsubscribe");n&&n.call(t)}}catch(e){gn(e)}}function En(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function wn(e,t,n){e._state="running";var r=e._observer;try{var i=vn(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(En(e),!i)throw n;i.call(r,n);break;case"complete":En(e),i&&i.call(r)}}catch(e){gn(e)}"closed"===e._state?_n(e):"running"===e._state&&(e._state="ready")}function On(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 bn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(wn(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void wn(e,t,n);e._queue.push({type:t,value:n})}}var xn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new In(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&&(En(this),_n(this))},un(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),In=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){On(this._subscription,"next",e)},t.error=function(e){On(this._subscription,"error",e)},t.complete=function(){On(this._subscription,"complete")},un(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Tn=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 xn(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(yn(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(yn(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=yn(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=yn(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=yn(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[hn]=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=vn(t,hn);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return mn(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(ln("iterator")&&(r=vn(t,pn)))return new n((function(e){bn((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 an(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)?an(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){bn((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){bn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},un(e,null,[{key:dn,get:function(){return this}}]),e}();function Sn(e){return null!==e&&"object"==typeof e}function Dn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Gt("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 Gt(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?$t(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):$t(1===r.length,44),n=r[0].name.value),Z(Z({},e),{definitions:re([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function kn(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function An(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?$t(n,"No fragment named "+e.name.value+"."):$t(n,45),n;default:return null}}function Nn(e){return{__ref:String(e)}}function Pn(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Rn(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 Rn(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 Rn(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 Gt('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new Gt(54);e[t.value]=null}}cn()&&Object.defineProperty(Tn,Symbol("extensions"),{value:{symbol:hn,hostReportError:gn},configurable:!0});var Cn=["connection","include","skip","client","rest","export"],Fn=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+"("+jn(i)+")"}return n.connection.key}var o=e;if(t){var a=jn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Cn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+jn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=jn;return jn=e,t}}),jn=function(e){return JSON.stringify(e,Un)};function Un(e,t){return Sn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function Ln(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Rn(n,r,i,t)})),n}return null}function Mn(e){return e.alias?e.alias.value:e.name.value}function qn(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(Vn(o)){if("__typename"===o.name.value)return e[Mn(o)]}else{var a=qn(e,An(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Vn(e){return"Field"===e.kind}function Bn(e){return"InlineFragment"===e.kind}function Qn(e){__DEV__?$t(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'):$t(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 Gt('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new Gt(47);return e}));return __DEV__?$t(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):$t(t.length<=1,48),e}function zn(e){return Qn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Wn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function Gn(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function $n(e){var t=zn(e);return __DEV__?$t(t&&"query"===t.operation,"Must contain a query definition."):$t(t&&"query"===t.operation,49),t}function Kn(e){var t;Qn(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 Gt("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new Gt(53)}function Yn(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Rn(t,e.variable.name,e.defaultValue)})),t}function Jn(e,t){return t?t(e):Tn.of()}function Hn(e){return"function"==typeof e?new er(e):e}function Xn(e){return e.request.length<=1}var Zn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return X(t,e),t}(Error),er=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Tn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(Hn).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=Hn(n),o=Hn(r||new e(Jn));return Xn(i)&&Xn(o)?new e((function(e){return t(e)?i.request(e)||Tn.of():o.request(e)||Tn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Tn.of():o.request(e,n)||Tn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=Z({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=Z(Z({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Z({},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?Wn(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 Gt("illegal argument: "+i):new Gt(26)}return e}(t))))||Tn.of()},e.concat=function(t,n){var r=Hn(t);if(Xn(r))return __DEV__&&$t.warn(new Zn("You are calling concat on a terminating link, which will have no effect",r)),r;var i=Hn(n);return Xn(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Tn.of()}))||Tn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Tn.of()}))||Tn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(Jn)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Gt("request is not implemented"):new Gt(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 tr=Object.freeze({});function nr(e,t,n=ye){const r=new Map;for(const e of Object.values(pe))r.set(e,rr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],h=[];let d=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===h.length?void 0:p[p.length-1],o=s,s=h.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]:d,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var v,y;ge(o)||xe(!1,`Invalid AST Node: ${we(o)}.`);const n=e?null===(v=r.get(o.kind))||void 0===v?void 0:v.leave:null===(y=r.get(o.kind))||void 0===y?void 0:y.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,h),b===tr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!ge(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&&h.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(d=f[f.length-1][1]),d}function rr(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 ir=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new Gt("Network request failed. "+t+" is not serializable: "+e.message):new Gt(23);throw r.parseError=e,r}return n},or=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},ar=Object.prototype.hasOwnProperty;const sr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ur(e){return cr[e.charCodeAt(0)]}const cr=["\\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 lr(e){return nr(e,fr)}const fr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>pr(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=dr("(",pr(e.variableDefinitions,", "),")"),n=pr([e.operation,pr([e.name,t]),pr(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+dr(" = ",n)+dr(" ",pr(r," "))},SelectionSet:{leave:({selections:e})=>hr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=dr("",e,": ")+t;let a=o+dr("(",pr(n,", "),")");return a.length>80&&(a=o+dr("(\n",vr(pr(n,"\n")),"\n)")),pr([a,pr(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+dr(" ",pr(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>pr(["...",dr("on ",e),pr(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${dr("(",pr(n,", "),")")} on ${t} ${dr("",pr(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(sr,ur)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+pr(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+pr(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+dr("(",pr(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>dr("",e,"\n")+pr(["schema",pr(t," "),hr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>dr("",e,"\n")+pr(["scalar",t,pr(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dr("",e,"\n")+pr(["type",t,dr("implements ",pr(n," & ")),pr(r," "),hr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>dr("",e,"\n")+t+(yr(n)?dr("(\n",vr(pr(n,"\n")),"\n)"):dr("(",pr(n,", "),")"))+": "+r+dr(" ",pr(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>dr("",e,"\n")+pr([t+": "+n,dr("= ",r),pr(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dr("",e,"\n")+pr(["interface",t,dr("implements ",pr(n," & ")),pr(r," "),hr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>dr("",e,"\n")+pr(["union",t,pr(n," "),dr("= ",pr(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>dr("",e,"\n")+pr(["enum",t,pr(n," "),hr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>dr("",e,"\n")+pr([t,pr(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>dr("",e,"\n")+pr(["input",t,pr(n," "),hr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>dr("",e,"\n")+"directive @"+t+(yr(n)?dr("(\n",vr(pr(n,"\n")),"\n)"):dr("(",pr(n,", "),")"))+(r?" repeatable":"")+" on "+pr(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>pr(["extend schema",pr(e," "),hr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>pr(["extend scalar",e,pr(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>pr(["extend type",e,dr("implements ",pr(t," & ")),pr(n," "),hr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>pr(["extend interface",e,dr("implements ",pr(t," & ")),pr(n," "),hr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>pr(["extend union",e,pr(t," "),dr("= ",pr(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>pr(["extend enum",e,pr(t," "),hr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>pr(["extend input",e,pr(t," "),hr(n)]," ")}};function pr(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function hr(e){return dr("{\n",vr(pr(e,"\n")),"\n}")}function dr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function vr(e){return dr(" ",e.replace(/\n/g,"\n "))}function yr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var mr={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}};function gr(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}function br(e){return new Tn((function(t){t.error(e)}))}var _r=Ht((function(){return fetch})),Er=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=ee(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Gt("\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 Gt(22)}(r||_r);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new er((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(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,h=Z(Z({},a),i.headers),d={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:h},v=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Z(Z({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=Z(Z(Z({},i),e.options),{headers:Z(Z({},i.headers),gr(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=Z(Z({},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=lr(c)),{options:i,body:l}}(e,mr,c,d),y=v.options,m=v.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));nr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=Z({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!y.signal){var b=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),_=b.controller,E=b.signal;(p=_)&&(y.signal=E)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(y.method="GET"),"GET"===y.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=ir(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=ir(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,x=w.parseError;if(x)return br(x);t=O}else try{y.body=ir(m,"Payload")}catch(x){return br(x)}return new Tn((function(n){var i;return(r||Ht((function(){return fetch}))||_r)(t,y).then((function(t){return e.setContext({response:t}),t})).then((i=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}})).then((function(t){return e.status>=300&&or(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||ar.call(t,"data")||ar.call(t,"errors")||or(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(e){return e.operationName})):i.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return X(t,e),t}(er),wr=er.execute;function Or(){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 xr=Object.prototype,Ir=xr.toString,Tr=xr.hasOwnProperty,Sr=Function.prototype.toString,Dr=new Map;function kr(e,t){try{return Ar(e,t)}finally{Dr.clear()}}function Ar(e,t){if(e===t)return!0;var n,r,i,o=Ir.call(e);if(o!==Ir.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Cr(e,t))return!0;var a=Nr(e),s=Nr(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!Tr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Ar(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(Cr(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,v=d[0],y=d[1];if(!t.has(v))return!1;if(p&&!Ar(y,t.get(v)))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=Sr.call(e);return g===Sr.call(t)&&(r=Rr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function Nr(e){return Object.keys(e).filter(Pr,e)}function Pr(e){return void 0!==this[e]}var Rr="{ [native code] }";function Cr(e,t){var n=Dr.get(e);if(n){if(n.has(t))return!0}else Dr.set(e,n=new Set);return n.add(t),!1}var Fr,jr,Ur=function(){return Object.create(null)},Lr=Array.prototype,Mr=Lr.forEach,qr=Lr.slice,Vr=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Ur),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 Mr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(qr.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}(),Br="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),Qr="function"==typeof WeakSet,zr="function"==typeof Symbol&&"function"==typeof Symbol.for,Wr=function(){function e(){this.known=new(Qr?WeakSet:Set),this.pool=new Vr(Br),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Sn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Sn(e)){var t=function(e){return Sn(e)?Array.isArray(e)?e.slice(0):Z({__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(Sn(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}(),Gr=Object.assign((function(e){if(Sn(e)){void 0===Fr&&$r();var t=Fr.admit(e),n=jr.get(t);return void 0===n&&jr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:$r});function $r(){Fr=new Wr,jr=new(Br?WeakMap:Map)}function Kr(e,t,n){return new Tn((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 Yr(e){return e.errors&&e.errors.length>0||!1}function Jr(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 Hr={kind:"Field",name:{kind:"Name",value:"__typename"}};function Xr(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&Xr(t[e.name.value],t)}))}function Zr(e){return Xr(zn(e)||function(e){__DEV__?$t("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'):$t("Document"===e.kind,50),__DEV__?$t(e.definitions.length<=1,"Fragment must have exactly one definition."):$t(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?$t("FragmentDefinition"===t.kind,"Must be a fragment definition."):$t("FragmentDefinition"===t.kind,52),t}(e),kn(Gn(e)))?null:e}function ei(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ti(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=Zr(nr(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(ei(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&ii(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(ei(e)(t))return null}}}));return a&&Jr(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 Zr(nr(t,{OperationDefinition:{enter:function(t){return Z(Z({},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&&Jr(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 Zr(nr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var ni=Object.assign((function(e){return nr(Qn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Vn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Vn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return Z(Z({},e),{selections:re(re([],r,!0),[Hr],!1)})}}}}})}),{added:function(e){return e===Hr}}),ri={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&$t.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 ii(e){var t=[];return e.selections.forEach((function(e){(Vn(e)||Bn(e))&&e.selectionSet?ii(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function oi(e){return"query"===Kn(e).operation?e:nr(e,{OperationDefinition:{enter:function(e){return Z(Z({},e),{operation:"query"})}}})}function ai(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__?$t(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):$t(n&&1===n.length,40);var i=n[0];__DEV__?$t(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):$t(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?$t(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):$t(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__?$t(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):$t(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function si(e,t){return function(e){var t=[];return nr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function ui(e){return e&&si(["client"],e)&&si(["export"],e)}var ci=new Map;function li(e){var t=ci.get(e)||1;return ci.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function fi(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function pi(e){function t(t){Object.defineProperty(e,t,{value:Tn})}return zr&&Symbol.species&&t(Symbol.species),t("@@species"),e}function hi(e){return e&&"function"==typeof e.then}var di=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],fi(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),fi(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?hi(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(),fi(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 Tn(t)]),hi(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return X(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}(Tn);function vi(e){return Array.isArray(e)&&e.length>0}pi(di);var yi,mi=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="",(vi((r=l).graphQLErrors)||vi(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 X(t,e),t}(Error);function gi(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"}(yi||(yi={}));var bi=Object.prototype.toString;function _i(e){return Ei(e)}function Ei(e,t){switch(bi.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]=Ei(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]=Ei(e[n],t)})),r;default:return e}}var wi=Object.assign,Oi=Object.hasOwnProperty,xi=!1,Ii=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=Ti)}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=zn(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 X(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||yi.ready,r=Z(Z({},t),{loading:gi(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),kr(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==yi.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=yi.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||Si(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!kr(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||kr(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&&Oi.call(e,"variables")){var i=$n(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&$t.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&&!kr(this.options.variables,e)&&(n.variables=this.options.variables=Z(Z({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,yi.refetch)},t.prototype.fetchMore=function(e){var t=this,n=Z(Z({},e.query?e:Z(Z(Z({},this.options),e),{variables:Z(Z({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=yi.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,yi.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!xi&&(__DEV__&&$t.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."),xi=!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__&&$t.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 kr(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},yi.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__?$t(n,"Attempted to start a polling query without a polling interval."):$t(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(gi(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},yi.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=Z(Z({},this.last),{result:this.queryManager.assumeImmutableResults?e:_i(e),variables:t}),vi(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===yi.refetch||t===yi.fetchMore||t===yi.poll,i=this.options.variables,o=r?Or(this.options,e):wi(this.options,Or(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!kr(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=yi.setVariables)));var a=o.variables&&Z({},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),fi(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=Z(Z({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:yi.error,loading:!1});this.updateLastResult(n,t),fi(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}(Tn);function Ti(e){__DEV__&&$t.error("Unhandled error",e.message,e.stack)}function Si(e){__DEV__&&vi(e)&&__DEV__&&$t.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}pi(Ii);var Di=Object.prototype.hasOwnProperty;function ki(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ai(e)}function Ai(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Pi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Ni=function(e,t,n){return this.merge(e[n],t[n])},Pi=function(){function e(e){void 0===e&&(e=Ni),this.reconciler=e,this.isObject=Sn,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 Sn(t)&&Sn(e)?(Object.keys(t).forEach((function(i){if(Di.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,re([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 Sn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):Z({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Ri=null,Ci={},Fi=1,ji="@wry/context:Slot",Ui=Array,Li=Ui[ji]||function(){var e=function(){function e(){this.id=["slot",Fi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ri;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Ci)break;return e!==Ri&&(Ri.slots[this.id]=t),!0}return Ri&&(Ri.slots[this.id]=Ci),!1},e.prototype.getValue=function(){if(this.hasValue())return Ri.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Ri;Ri={parent:a,slots:o};try{return t.apply(r,n)}finally{Ri=a}},e.bind=function(e){var t=Ri;return function(){var n=Ri;try{return Ri=t,e.apply(this,arguments)}finally{Ri=n}}},e.noContext=function(e,t,n){if(!Ri)return e.apply(n,t);var r=Ri;try{return Ri=null,e.apply(n,t)}finally{Ri=r}},e}();try{Object.defineProperty(Ui,ji,{value:Ui[ji]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Mi(){}Li.bind,Li.noContext;var qi,Vi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Mi),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}(),Bi=new Li,Qi=Object.prototype.hasOwnProperty,zi=void 0===(qi=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:qi;function Wi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Gi=[];function $i(e,t){if(!e)throw new Error(t||"assertion failure")}function Ki(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Yi=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&&!Xi(this))return Ji(this),this.value[0]},e.prototype.recompute=function(e){return $i(!this.recomputing,"already recomputing"),Ji(this),Xi(this)?function(e,t){return oo(e),Bi.withValue(e,Hi,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Wi(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Xi(e)||eo(e)}(e),Ki(e.value)}(this,e):Ki(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Zi(this),Wi(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),oo(this),to(this,(function(t,n){t.setDirty(),ao(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Gi.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(zi(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Gi.push(this.deps),this.deps=null)},e.count=0,e}();function Ji(e){var t=Bi.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Xi(e)?no(t,e):ro(t,e),t}function Hi(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 Xi(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Zi(e){to(e,no)}function eo(e){to(e,ro)}function to(e,t){var n=e.parents.size;if(n)for(var r=zi(e.parents),i=0;i<n;++i)t(r[i],e)}function no(e,t){$i(e.childValues.has(t)),$i(Xi(t));var n=!Xi(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Gi.pop()||new Set;e.dirtyChildren.add(t),n&&Zi(e)}function ro(e,t){$i(e.childValues.has(t)),$i(!Xi(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()),io(e,t),Xi(e)||eo(e)}function io(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(Gi.length<100&&Gi.push(n),e.dirtyChildren=null))}function oo(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){ao(e,n)})),e.forgetDeps(),$i(null===e.dirtyChildren)}function ao(e,t){t.parents.delete(e),e.childValues.delete(t),io(e,t)}var so={setDirty:!0,dispose:!0,forget:!0};function uo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Bi.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(Wi(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Qi.call(so,n)?n:"setDirty";zi(r).forEach((function(e){return e[i]()})),t.delete(e),Wi(r)}},r}function co(){var e=new Vr("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}co();var lo=new Set;function fo(e,t){void 0===t&&(t=Object.create(null));var n=new Vi(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||co(),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 Yi(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),lo.add(n),Bi.hasValue()||(lo.forEach((function(e){return e.clean()})),lo.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 po=new Li,ho=new WeakMap;function vo(e){var t=ho.get(e);return t||ho.set(e,t={vars:new Set,dep:uo()}),t}function yo(e){vo(e).vars.forEach((function(t){return t.forgetCache(e)}))}function mo(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){vo(e).dep.dirty(r),go(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=po.getValue();s&&(i(s),vo(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),vo(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function go(e){e.broadcastWatches&&e.broadcastWatches()}var bo=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=ki(t.resolvers,e)})):this.resolvers=ki(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 te(this,void 0,void 0,(function(){return ne(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return Z(Z({},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 si(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Qn(e);var t=ti([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=nr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Vn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return Z(Z({},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={}),te(this,void 0,void 0,(function(){return ne(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return Z(Z({},t),e.exportedVariables)}))]:[2,Z({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return nr(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 tr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:oi(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),te(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,h,d;return ne(this,(function(v){return a=Kn(e),s=Gn(e),u=kn(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,h=f.client,d={fragmentMap:u,context:Z(Z({},n),{cache:p,client:h}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then((function(e){return{result:e,exportedVariables:d.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return te(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return ne(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return te(u,void 0,void 0,(function(){var s,u;return ne(this,(function(c){return ai(e,o)?Vn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Mn(e)]=t,n))}))]:(Bn(e)?s=e:(s=r[e.name.value],__DEV__?$t(s,"No fragment named "+e.name.value):$t(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 Ai(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return te(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return ne(this,(function(h){return r=n.variables,i=e.name.value,o=Mn(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(po.withValue(this.cache,f,[t,Ln(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}(),_o=new(Br?WeakMap:Map);function Eo(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return _o.set(e,(_o.get(e)+1)%1e15),n.apply(this,arguments)})}function wo(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Oo=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;_o.has(n)||(_o.set(n,0),Eo(n,"evict"),Eo(n,"modify"),Eo(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||yi.loading;return this.variables&&this.networkStatus!==yi.loading&&!kr(this.variables,e.variables)&&(t=yi.setVariables),kr(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(){wo(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&&kr(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||kr(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;wo(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(gi(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=Z(Z({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&kr(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===_o.get(this.cache)&&kr(t,n.variables)&&kr(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=vi(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(xo(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:_o.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=yi.ready},e.prototype.markError=function(e){return this.networkStatus=yi.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function xo(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!Yr(e);return!r&&n&&e.data&&(r=!0),r}var Io=Object.prototype.hasOwnProperty,To=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(Br?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 bo({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 Gt("QueryManager stopped while query was in flight"):new Gt(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,h=e.fetchPolicy,d=void 0===h?"network-only":h,v=e.keepRootFields,y=e.context;return te(this,void 0,void 0,(function(){var e,o,s;return ne(this,(function(f){switch(f.label){case 0:return __DEV__?$t(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):$t(t,14),__DEV__?$t("network-only"===d||"no-cache"===d,"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."):$t("network-only"===d||"no-cache"===d,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,y)]:[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:d,errorPolicy:p,context:y,updateQueries:i,update:c,keepRootFields:v}),this.broadcastQueries(),s=this,[2,new Promise((function(f,h){return Kr(s.getObservableFromLink(t,Z(Z({},y),{optimisticResponse:r}),n,!1),(function(f){if(Yr(f)&&"none"===p)throw new mi({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var h=Z({},f);return"function"==typeof a&&(a=a(h)),"ignore"===p&&Yr(h)&&delete h.errors,s.markMutationResult({mutationId:e,result:h,document:t,variables:n,fetchPolicy:d,errorPolicy:p,context:y,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:v})})).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(),h(t instanceof mi?t:new mi({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&&xo(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&&Io.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var v=c(d,{mutationResult:r,queryName:f&&Wn(f)||void 0,queryVariables:p});v&&i.push({result:v,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=Z(Z({},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(Z(Z({},t),{result:{data:r}}),e)}catch(e){__DEV__&&$t.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),ti([ri],Qn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:ui(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:Yn(zn(r)),asQuery:Z(Z({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?Z(Z({},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 Z(Z({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=Z(Z({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new Oo(this),n=new Ii({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__?$t(e.query,"query option is required. You must specify your GraphQL document in the query option."):$t(e.query,16),__DEV__?$t("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):$t("Document"===e.query.kind,17),__DEV__?$t(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):$t(!e.returnPartialData,18),__DEV__?$t(!e.pollInterval,"pollInterval option only supported on watchQuery."):$t(!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 Gt("Store reset while query was in flight (not completed in link chain)"):new Gt(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=yi.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):Sn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Sn(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=li("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Ii({queryManager:t,queryInfo:i,options:Z(Z({},e),{fetchPolicy:"network-only"})});$t(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&$t.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&&(xo(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Yr(o))throw new mi({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Tn((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:Wn(s)||void 0,context:this.prepareContext(Z(Z({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=Gr(n);if(!(o=f.get(p))){var h=new di([wr(c,l)]);f.set(p,o=h),h.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new di([wr(c,l)])}else o=new di([Tn.of({data:{}})]),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(o=Kr(o,(function(e){return a.localState.runResolvers({document:d,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return Kr(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=vi(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new mi({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||yi.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new mi({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=yi.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,h=t.notifyOnNetworkStatusChange,d=void 0!==h&&h,v=t.context,y=void 0===v?{}:v,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:d,context:y}),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 di(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?li("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 Oo&&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 h=function(){return e.getDiff(o)},d=function(t,n){void 0===n&&(n=e.networkStatus||yi.loading);var a=t.result;!__DEV__||c||kr(a,{})||Si(t.missing);var s=function(e){return Tn.of(Z({data:e,loading:gi(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)},v="no-cache"===a?0:n===yi.refetch&&"merge"!==s?1:2,y=function(){return r.getResultsFromLink(e,v,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&gi(n);switch(a){default:case"cache-first":return(g=h()).complete?[d(g,e.markReady())]:c||m?[d(g),y()]:[y()];case"cache-and-network":var g;return(g=h()).complete||c||m?[d(g),y()]:[y()];case"cache-only":return[d(h(),e.markReady())];case"network-only":return m?[d(h()),y()]:[y()];case"no-cache":return m?[d(e.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new Oo(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Z(Z({},t),{clientAwareness:this.clientAwareness})},e}(),So=!1;function Do(e,t){return Or(e,t,t.variables&&{variables:Z(Z({},e.variables),t.variables)})}var ko=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,h=void 0===p||p,d=e.defaultOptions,v=e.assumeImmutableResults,y=void 0!==v&&v,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,_=e.name,E=e.version,w=e.link;if(w||(w=n?new Er({uri:n,credentials:r,headers:i}):er.empty()),!o)throw __DEV__?new Gt("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 Gt(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=d||{},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),!So&&__DEV__&&(So=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,x=O&&O.userAgent,I=void 0;"string"==typeof x&&(x.indexOf("Chrome/")>-1?I="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":x.indexOf("Firefox/")>-1&&(I="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),I&&__DEV__&&$t.log("Download the Apollo DevTools for a better development experience: "+I)}this.version="3.4.17",this.localState=new bo({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new To({cache:this.cache,link:this.link,queryDeduplication:h,ssrMode:s,clientAwareness:{name:_,version:E},localState:this.localState,assumeImmutableResults:y,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=Do(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Z(Z({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Do(this.defaultOptions.query,e)),__DEV__?$t("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."):$t("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Z(Z({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Do(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 wr(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__&&$t.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}(),Ao=function(){function e(){this.getFragmentDoc=fo(Dn)}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(Z(Z({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(Z(Z({},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=ee(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=ee(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),No=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 X(t,e),t}(Error);function Po(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Sn(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){Sn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Ro=Object.prototype.hasOwnProperty;function Co(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 Fo={dataIdFromObject:Co,addTypename:!0,resultCaching:!0,canonizeResults:!1};function jo(e){var t=e.canonizeResults;return void 0===t?Fo.canonizeResults:t}var Uo=/^[_a-z][_0-9a-z]*/i;function Lo(e){var t=e.match(Uo);return t?t[0]:e}function Mo(e,t,n){return!!Sn(t)&&(Array.isArray(t)?t.every((function(t){return Mo(e,t,n)})):e.selections.every((function(e){if(Vn(e)&&ai(e,n)){var r=Mn(e);return Ro.call(t,r)&&(!e.selectionSet||Mo(e.selectionSet,t[r],n))}return!0})))}function qo(e){return Sn(e)&&!Pn(e)&&!Array.isArray(e)}var Vo=Object.create(null),Bo=function(){return Vo},Qo=Object.create(null),zo=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 Po(Pn(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return Pn(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Nn(e);if(Pn(e))return e;var r=n.policies.identify(e)[0];if(r){var i=Nn(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return Z({},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),Ro.call(this.data,e)){var n=this.data[e];if(n&&Ro.call(n,t))return n[t]}return"__typename"===t&&Ro.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Ko?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Ro.call(this.data,e)?this.data[e]:this instanceof Ko?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;Pn(e)&&(e=e.__ref),Pn(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__?$t("string"==typeof n,"store.merge expects a string ID"):$t("string"==typeof n,1);var a=new Pi(Jo).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=Lo(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof Ko||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:Vo,INVALIDATE:Qo,isReference:Pn,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||Nn(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=Lo(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===Bo?Vo:f(Po(l),Z(Z({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===Qo?n.group.dirty(e,u):(p===Vo&&(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 Ko?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]=Bo,r):Bo)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Ro.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Ko&&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){Ro.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&&Ro.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ee(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 Ko?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){Ro.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 Ko;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Ro.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){Pn(e)&&(t[e.__ref]=!0),Sn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Sn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Wo=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?uo():null,this.keyMaker=new Vr(Br)},e.prototype.depend=function(e,t){if(this.d){this.d(Go(e,t));var n=Lo(t);n!==t&&this.d(Go(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Go(e,t),"__exists"===t?"forget":"setDirty")},e}();function Go(e,t){return t+"#"+e}function $o(e,t){Ho(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 Wo(i))||this;return a.stump=new Yo(a),a.storageTrie=new Vr(Br),o&&a.replace(o),a}return X(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}(zo||(zo={}));var Ko=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 X(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){kr(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 Z(Z({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Ro.call(this.data,t)?Z(Z({},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}(zo),Yo=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Wo(t.group.caching,t.group))||this}return X(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Ko);function Jo(e,t,n){var r=e[n],i=t[n];return kr(r,i)?r:i}function Ho(e){return!!(e instanceof zo&&e.group.caching)}function Xo(e,t){return new No(e.message,t.path.slice(),t.query,t.variables)}function Zo(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ea=function(){function e(e){var t=this;this.knownResults=new(Br?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:jo(e)}),this.canon=e.canon||new Wr,this.executeSelectionSet=fo((function(e){var n,r=e.context.canonizeResults,i=Zo(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?Z(Z({},o),{result:t.canon.admit(o.result)}):o:($o(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Zo,makeCacheKey:function(e,t,n,r){if(Ho(n.store))return n.store.makeCacheKey(e,Pn(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=fo((function(e){return $o(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(Ho(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Wr},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=Z(Z({},Yn($n(n))),o);var f=Nn(i),p=this.executeSelectionSet({selectionSet:Kn(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:Gr(o),canonizeResults:c,fragmentMap:kn(Gn(n)),path:[]}}),h=p.missing&&p.missing.length>0;if(h&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!h}},e.prototype.isFresh=function(e,t,n,r){if(Ho(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(Pn(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[Xo(__DEV__?new Gt("Dangling reference to missing "+r.__ref+" object"):new Gt(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 h(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 d=new Set(n.selections);d.forEach((function(e){var n;if(ai(e,a))if(Vn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Mn(e);o.path.push(l),void 0===u?ni.added(e)||p().push(Xo(__DEV__?new Gt("Can't find field '"+e.name.value+"' on "+(Pn(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new Gt(6),o)):Array.isArray(u)?u=h(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:Pn(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),$t(o.path.pop()===l)}else{var v=An(e,o.fragmentMap);v&&s.fragmentMatches(v,f)&&v.selectionSet.selections.forEach(d.add,d)}}));var v=Ai(c);return l.result=o.canonizeResults?this.canon.admit(v):Po(v),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),$t(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:Pn(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Sn(n)&&(__DEV__?$t(!Pn(n),"Missing selection set for object of type "+function(e,t){return Pn(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):$t(!Pn(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),$t(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ta=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=zn(r),c=new Pi;a=Z(Z({},Yn(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:Gr(a),fragmentMap:kn(Gn(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(!Pn(f))throw __DEV__?new Gt("Could not identify object "+JSON.stringify(i)):new Gt(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=Nn(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(Pn(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Vn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has(Lo(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&&!Pn(o)&&!kr(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=Lo(n),c=s+"."+u;if(!sa.has(c)){sa.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__&&$t.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=Nn(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var h=Object.create(null);l&&(h=o.merge(h,l));var d=n&&s.rootTypenamesById[n]||qn(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof d&&(h.__typename=d);var v=new Set(i.selections);if(v.forEach((function(e){var n;if(ai(e,o.variables))if(Vn(e)){var i=Mn(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:d,fieldName:e.name.value,field:e,variables:o.variables}),f=ra(a,l),p=t.processFieldValue(u,e,o,f),y=void 0;if(e.selectionSet&&!(y=o.store.getFieldValue(p,"__typename"))&&Pn(p)){var m=o.incomingById.get(p.__ref);y=m&&m.fields.__typename}var g=s.getMergeFunction(d,e.name.value,y);g?f.info={field:e,typename:d,merge:g}:aa(a,l),h=o.merge(h,((n={})[l]=p,n))}else o.clientOnly||ni.added(e)||__DEV__&&$t.error(("Missing field '"+Mn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=An(e,o.fragmentMap);b&&s.fragmentMatches(b,d,r,o.variables)&&b.selectionSet.selections.forEach(v.add,v)}})),"string"==typeof n){var y=o.incomingById.get(n);return y?(y.fields=o.merge(y.fields,h),y.mergeTree=ia(y.mergeTree,a),y.selections.forEach(v.add,v),y.selections=v):o.incomingById.set(n,{fields:h,mergeTree:oa(a)?void 0:a,selections:v}),Nn(n)}return h},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,ra(r,o));return aa(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?_i(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!Pn(n)){var s,u=Array.isArray(n)||!Pn(t)&&!qo(t)?void 0:t,c=n;u&&!i&&(i=[Pn(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&&$t(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):Z({},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}(),na=[];function ra(e,t){var n=e.map;return n.has(t)||n.set(t,na.pop()||{map:new Map}),n.get(t)}function ia(e,t){if(e===t||!t||oa(t))return e;if(!e||oa(e))return t;var n=e.info&&t.info?Z(Z({},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,ia(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,ia(t.map.get(n),e.map.get(n)))}))}return i}function oa(e){return!e||!(e.info||e.map.size)}function aa(e,t){var n=e.map,r=n.get(t);r&&oa(r)&&(na.push(r),n.delete(t))}var sa=new Set;function ua(e){var t=li("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function ca(e){return void 0!==e.args?e.args:e.field?Ln(e.field,e.variables):null}Fn.setStringify(Gr);var la=function(){},fa=function(e,t){return t.fieldName},pa=function(e,t,n){return(0,n.mergeObjects)(e,t)},ha=function(e,t){return t},da=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=Z({dataIdFromObject:Co},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?qn(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=ga(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=ee(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Ro.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?pa:!1===t?ha:e.merge}a(r,t.merge),r.keyFn=!1===i?la:Array.isArray(i)?ga(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?fa:Array.isArray(s)?ma(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||fa)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?$t(!r||r===e,"Cannot change root "+e+" __typename more than once"):$t(!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(Uo);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Ro.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=ee(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__&&$t.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Mo(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=ca(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=ma(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 Rn(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 Rn(r,n,i,t)}))),Fn(e.name.value,r,n)}(e.field,e.variables):Fn(r,ca(e))),!1===t?r:r===Lo(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=Lo(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=va(this,n,e,t,t.store.getStorage(Pn(n)?n.__ref:n,i));return po.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===pa?ya(r.store)(e,t):s===ha?t:(r.overwrite&&(e=void 0),s(e,t,va(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function va(e,t,n,r,i){var o=e.getStoreFieldName(n),a=Lo(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:ca(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:Pn,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(!Sn(n))return void(__DEV__&&$t.warn("Unexpected readField arguments: "+ua(Array.from(arguments))));o=Z({},n),Ro.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&$t.warn("Undefined 'from' passed to readField with arguments "+ua(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:ya(r.store)}}function ya(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new Gt("Cannot automatically merge arrays"):new Gt(3);if(Sn(t)&&Sn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(Pn(t)&&qo(n))return e.merge(t.__ref,n),t;if(qo(t)&&Pn(n))return e.merge(t,n.__ref),n;if(qo(t)&&qo(n))return Z(Z({},t),n)}return n}}function ma(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(_a(t,e,!1)):n.fieldName}}function ga(e){var t=new Vr(Br);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=ba(r.selectionSet,r.fragmentMap))}var a=r.keyObject=_a(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function ba(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Vn(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]=ba(e.selectionSet,t))}else{var a=An(e,t);a&&r.add(a.selectionSet)}}))})),n}function _a(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]=_a(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Ro.call(e,l)?a[o=t]=e[i=l]:(__DEV__?$t(!n,"Missing field '"+l+"' while computing key fields"):$t(!n,4),i=o=void 0)}})),a}var Ea=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=mo,n.txCount=0,n.config=function(e){return Or(Fo,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new da({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return X(t,e),t.prototype.init=function(){var e=this.data=new zo.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 ta(this,this.storeReader=new ea({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:jo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=fo((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(Ho(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,Gr({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(Z(Z({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof No)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(Ro.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(Z(Z({},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||vo(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&&yo(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gr.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 Pn(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Ro.call(e,"id"))return!1;e=Z(Z({},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(),Gr.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),yo(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(Z(Z({},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(Z(Z({},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=ni(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&&kr(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Ao);const wa=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var Oa=n(4098),xa=n.n(Oa),Ia=n(4147);var Ta=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}(),Sa=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Da=at(Na||(Na=Sa(["\n fragment SlimEntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n feature {\n ...SlimFeatureFragment\n }\n }\n fragment SlimFeatureFragment on EntitlementFeature {\n featureType\n meterType\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment SlimEntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n feature {\n ...SlimFeatureFragment\n }\n }\n fragment SlimFeatureFragment on EntitlementFeature {\n featureType\n meterType\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"]))),ka=at(Pa||(Pa=Sa(["\n fragment EntitlementFragment on EntitlementWithSummary {\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 EntitlementWithSummary {\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"])));const Aa=function(){function e(e){this.client=e}return e.prototype.getEntitlement=function(e){return this.client.query({query:at(Ra||(Ra=Sa(["\n query Entitlement($query: FetchEntitlementQuery!) {\n entitlement(query: $query) {\n ...SlimEntitlementFragment\n }\n }\n ","\n "],["\n query Entitlement($query: FetchEntitlementQuery!) {\n entitlement(query: $query) {\n ...SlimEntitlementFragment\n }\n }\n ","\n "])),Da),variables:{query:e},fetchPolicy:"network-only"})},e.prototype.getEntitlements=function(e){return this.client.query({query:at(Ca||(Ca=Sa(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ka),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:at(Fa||(Fa=Sa(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ka),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e}();var Na,Pa,Ra,Ca,Fa,ja=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n;if(!e)return{isGranted:!1,accessDeniedReason:r.NoFeatureEntitlementInSubscription};var i=e.calculatedEntitlement.featureType,o=e.calculatedEntitlement.meterType;switch(i){case $.Boolean:return{isGranted:!0};case $.Number:if(e.calculatedEntitlement.meterType===K.None)return{isGranted:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{isGranted:!0};var a=e.featureUsage.currentUsage;return o===K.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(a=0),a+(t||0)<=((null===(n=e.calculatedEntitlement)||void 0===n?void 0:n.usageLimit)||0)?{isGranted:!0}:{isGranted:!1,accessDeniedReason:r.RequestedUsageExceedingLimit}}},e}(),Ua=n(6486),La=function(){return La=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},La.apply(this,arguments)},Ma=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())}))},qa=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])}}},Va=function(){function e(e,t,n){this.customerId=e,this.cacheService=t,this.modelMapper=new Bt,this.loadingEntitlements=null,this.entitlementsApi=new Aa(n),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.handleFetchedEntitlements(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return Ma(this,void 0,void 0,(function(){return qa(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getEntitlement=function(e,t){var n=this.cacheService.getEntitlement(e),i=ja.decideEntitlementPolicy(n,t);return n?this.modelMapper.mapEntitlementByDecision(i,e,n,t):(0,Ua.includes)([r.CustomerNotFound,r.Unknown],i.accessDeniedReason)?La({isValid:!1},i):La({isValid:!0},i)},e.prototype.loadEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e;return qa(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.doLoadEntitlements()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.doLoadEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e;return qa(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent().data.entitlements,this.handleFetchedEntitlements(e),[2]}}))}))},e.prototype.handleFetchedEntitlements=function(e){if(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)}else console.log("Failed to load entitlements")},e.prototype.getEntitlements=function(){return Ma(this,void 0,void 0,(function(){var e=this;return qa(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=ja.decideEntitlementPolicy(t);return e.modelMapper.mapFullEntitlementByDecision(t,n,e.customerId)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),Ba=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())}))},Qa=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])}}},za=function(){function e(e){this.modelMapper=new Bt,function(e){if(Rt()(e.sdkKey))throw new Error("You must configure the client with an SDK key");if(e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3)throw new Error("Entitlements polling interval cannot be lower than 5000ms")}(e),this.configuration=function(e){return Ft()({baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4},e)}(e),this.graphClient=function(e){var t=e.sdkKey,n=e.baseUri,r=new er((function(e,n){return e.setContext({headers:{"X-API-KEY":t}}),n(e)})),i=new Er({uri:"".concat(n,"/graphql"),fetch:xa()});return new ko({link:r.concat(i),cache:new Ea({possibleTypes:wa.g}),name:"js-client-sdk",version:Ia.version})}(this.configuration),this.apiGateway=new Nt(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return Ba(this,void 0,void 0,(function(){var n,r;return Qa(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=new e(t),t.customerId?[4,n.setCustomerId(t.customerId)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2,n];case 3:throw r=i.sent(),new Error("Failed to initialize api ".concat(r));case 4:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return Ba(this,void 0,void 0,(function(){return Qa(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 Va(e,new Ta,this.graphClient),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return Ba(this,void 0,void 0,(function(){return Qa(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.getEntitlement=function(e,t){var n,r,i;jt(this.configuration);try{return(null===(n=this.entitlementsService)||void 0===n?void 0:n.getEntitlement(e,null==t?void 0:t.requestedUsage))||this.handleNoEntitlementFound(null==t?void 0:t.fallbackGrantedValue)}catch(e){var o=(null===(i=null===(r=e.graphQLErrors)||void 0===r?void 0:r[0])||void 0===i?void 0:i.extensions)||e;return console.error("Failed to get entitlement",o),this.handleNoEntitlementFound(null==t?void 0:t.fallbackGrantedValue)}},e.prototype.handleNoEntitlementFound=function(e){return e?{isValid:!1,isGranted:e,accessDeniedReason:e?r.Unknown:null}:Y},e.prototype.getPaywall=function(e){return Ba(this,void 0,void 0,(function(){var t;return Qa(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(e)];case 1:return t=n.sent(),[2,this.modelMapper.mapPlans(t.data)]}}))}))},e.prototype.getCustomer=function(){return Ba(this,void 0,void 0,(function(){var e,t,n;return Qa(this,(function(r){switch(r.label){case 0:return e=jt(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)]}}))}))},e.prototype.getEntitlements=function(){var e;return Ba(this,void 0,void 0,(function(){return Qa(this,(function(t){return jt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.22.2","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"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","graphql":"^16.0.1","husky":"^7.0.4","cross-fetch":"^3.1.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","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typescript":"^4.5.3","msw":"^0.35.0","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"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(3890)})()}));
|
|
3
3
|
//# sourceMappingURL=index.js.map
|