From a9926dc55d5fdbf2664f40b07b9d4a7868b49040 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 27 Jun 2021 16:42:14 +0200 Subject: [PATCH] Update version & rebuild --- dist/index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4249a957..0b632423 100644 --- a/dist/index.js +++ b/dist/index.js @@ -105,7 +105,7 @@ n((function(e,t){}));var yu=n((function(e){!function e(){if("undefined"!=typeof LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function xh(e){return e.replace(/[\s,]+/g," ").trim()}function Th(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=xh((o=e.loc).source.body.substring(o.start,o.end)),a=kh.get(r);a&&!a.has(i)?Sh&&console.warn("Warning: fragment with name "+r+" 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"):a||kh.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),Eh(Eh({},e),{definitions:n})}function Oh(e){var t=xh(e);if(!wh.has(t)){var n=function(e,t){return new bc(e,t).parseDocument()}(e,{experimentalFragmentVariables:_h});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");wh.set(t,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}(Th(n)))}return wh.get(t)}function Nh(e){for(var t=[],n=1;n0?new ud({graphQLErrors:o}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:a,error:s}),r&&r(a)},t.prototype.onMutationError=function(e,t){this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0})},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){if(this.isMounted&&(!this.previousResult||!Gf(this.previousResult,e)))return this.setResult(e),this.previousResult=e,e},t}(od),$h=function(e){function t(t){var n=t.options,r=t.context,i=t.onNewData,a=e.call(this,n,r)||this;return a.runLazy=!1,a.previous=Object.create(null),a.runLazyQuery=function(e){a.cleanup(),a.runLazy=!0,a.lazyOptions=e,a.onNewData()},a.getQueryResult=function(){var e=a.observableQueryFields(),t=a.getOptions();if(t.skip)e=zc(zc({},e),{data:void 0,error:void 0,loading:!1,networkStatus:Cd.ready,called:!0});else if(a.currentObservable){var n=a.currentObservable.getCurrentResult(),r=n.data,i=n.loading,o=n.partial,s=n.networkStatus,l=n.errors,u=n.error;if(l&&l.length>0&&(u=new ud({graphQLErrors:l})),e=zc(zc({},e),{data:r,loading:i,networkStatus:s,error:u,called:!0}),i);else if(u)Object.assign(e,{data:(a.currentObservable.getLastResult()||{}).data});else{var c=a.currentObservable.options.fetchPolicy;if(t.partialRefetch&&o&&(!r||0===Object.keys(r).length)&&"cache-only"!==c)return Object.assign(e,{loading:!0,networkStatus:Cd.loading}),e.refetch(),e}}e.client=a.client,a.setOptions(t,!0);var f=a.previous.result;return a.previous.loading=f&&f.loading||!1,e.previousData=f&&(f.data||f.previousData),a.previous.result=e,a.currentObservable&&a.currentObservable.resetQueryStoreErrors(),e},a.obsRefetch=function(e){var t;return null===(t=a.currentObservable)||void 0===t?void 0:t.refetch(e)},a.obsFetchMore=function(e){return a.currentObservable.fetchMore(e)},a.obsUpdateQuery=function(e){return a.currentObservable.updateQuery(e)},a.obsStartPolling=function(e){var t;null===(t=a.currentObservable)||void 0===t||t.startPolling(e)},a.obsStopPolling=function(){var e;null===(e=a.currentObservable)||void 0===e||e.stopPolling()},a.obsSubscribeToMore=function(e){return a.currentObservable.subscribeToMore(e)},a.onNewData=i,a}return jc(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,n=e.query;return(t||n!==this.previous.query)&&(this.removeQuerySubscription(),this.removeObservable(!t),this.previous.query=n),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:Cd.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this,t=this.getOptions();return!t.skip&&!1!==t.ssr&&new Promise((function(t){return e.startQuerySubscription(t)}))},t.prototype.afterExecute=function(e){var t=(void 0===e?{}:e).lazy,n=void 0!==t&&t;return this.isMounted=!0,n&&!this.runLazy||this.handleErrorOrCompleted(),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),this.removeObservable(!0),delete this.previous.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=zc(zc({},t.variables),this.lazyOptions.variables),t.context=zc(zc({},t.context),this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.ssrInitiated=function(){return this.context&&this.context.renderPromises},t.prototype.getExecuteResult=function(){var e=this.getQueryResult();return this.startQuerySubscription(),e},t.prototype.getExecuteSsrResult=function(){var e=this.getOptions(),t=e.ssr,n=e.skip,r=!1===t,i=this.refreshClient().client.disableNetworkFetches,a=zc({loading:!0,networkStatus:Cd.loading,called:!0,data:void 0,stale:!1,client:this.client},this.observableQueryFields());if(r&&(this.ssrInitiated()||i))return this.previous.result=a,a;if(this.ssrInitiated()){var o=this.getQueryResult()||a;return o.loading&&!n&&this.context.renderPromises.addQueryPromise(this,(function(){return null})),o}},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,ed.Query);var t=e.displayName||"Query";return!this.ssrInitiated()||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e.fetchPolicy="cache-first"),zc(zc({},e),{displayName:t,context:e.context})},t.prototype.initializeObservableQuery=function(){if(this.ssrInitiated()&&(this.currentObservable=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable){var e=this.prepareObservableQueryOptions();this.previous.observableQueryOptions=zc(zc({},e),{children:null}),this.currentObservable=this.refreshClient().client.watchQuery(zc({},e)),this.ssrInitiated()&&this.context.renderPromises.registerSSRObservable(this.currentObservable,e)}},t.prototype.updateObservableQuery=function(){if(this.currentObservable){if(!this.getOptions().skip){var e=zc(zc({},this.prepareObservableQueryOptions()),{children:null});Gf(e,this.previous.observableQueryOptions)||(this.previous.observableQueryOptions=e,this.currentObservable.setOptions(e).catch((function(){})))}}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(e){var t=this;void 0===e&&(e=this.onNewData),this.currentSubscription||this.getOptions().skip||(this.currentSubscription=this.currentObservable.subscribe({next:function(n){var r=n.loading,i=n.networkStatus,a=n.data,o=t.previous.result;o&&o.loading===r&&o.networkStatus===i&&Gf(o.data,a)||e()},error:function(n){if(t.resubscribeToQuery(),!n.hasOwnProperty("graphQLErrors"))throw n;var r=t.previous.result;(r&&r.loading||!Gf(n,t.previous.error))&&(t.previous.error=n,e())}}))},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable;if(e){var t=e.getLastError(),n=e.getLastResult();e.resetLastResults(),this.startQuerySubscription(),Object.assign(e,{lastError:t,lastResult:n})}},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable&&this.previous.result){var e=this.previous.result,t=e.data,n=e.loading,r=e.error;if(!n){var i=this.getOptions(),a=i.query,o=i.variables,s=i.onCompleted,l=i.onError,u=i.skip;if(this.previousOptions&&!this.previous.loading&&Gf(this.previousOptions.query,a)&&Gf(this.previousOptions.variables,o))return;!s||r||u?l&&r&&l(r):s(t)}}},t.prototype.removeQuerySubscription=function(){this.currentSubscription&&(this.currentSubscription.unsubscribe(),delete this.currentSubscription)},t.prototype.removeObservable=function(e){this.currentObservable&&(this.currentObservable.tearDownQuery(),e&&delete this.currentObservable)},t.prototype.observableQueryFields=function(){var e;return{variables:null===(e=this.currentObservable)||void 0===e?void 0:e.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(od);function Vh(e,t,n){void 0===n&&(n=!1);var r=u.useContext(Qf()),i=u.useReducer((function(e){return e+1}),0),a=i[0],o=i[1],s=t?zc(zc({},t),{query:e}):{query:e},l=u.useRef(),c=l.current||(l.current=new $h({options:s,context:r,onNewData:function(){c.ssrInitiated()?o():Promise.resolve().then((function(){return l.current&&o()}))}}));c.setOptions(s),c.context=r;var f,d,p,h={options:zc(zc({},s),{onError:void 0,onCompleted:void 0}),context:r,tick:a},v=(f=function(){return n?c.executeLazy():c.execute()},d=h,(p=u.useRef()).current&&Gf(d,p.current.key)||(p.current={key:d,value:f()}),p.current.value),m=n?v[1]:v;return u.useEffect((function(){return function(){return c.cleanup()}}),[]),u.useEffect((function(){return c.afterExecute({lazy:n})}),[m.loading,m.networkStatus,m.error,m.data]),v}function Qh(e,t){var n=u.useContext(Qf()),r=u.useState({called:!1,loading:!1}),i=r[0],a=r[1],o=t?zc(zc({},t),{mutation:e}):{mutation:e},s=u.useRef();var l=(s.current||(s.current=new zh({options:o,context:n,result:i,setResult:a})),s.current);return l.setOptions(o),l.context=n,u.useEffect((function(){return l.afterExecute()})),l.execute(i)}function Uh(e,t){return Vh(e,t,!1)}var Bh=t(Object.freeze({__proto__:null,ApolloClient:bh,mergeOptions:gh,ObservableQuery:Fd,get NetworkStatus(){return Cd},isApolloError:ld,ApolloError:ud,get Cache(){return wp},ApolloCache:kp,InMemoryCache:uh,MissingFieldError:Sp,defaultDataIdFromObject:Gp,makeVar:Kp,fromError:cd,toPromise:function(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t||(t=!0,n(e))},error:r})}))},fromPromise:function(e){return new Of((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))},throwServerError:fd,Observable:Of,isReference:Yc,makeReference:Hc,gql:jh,resetCaches:Rh,disableFragmentWarnings:Ch,enableExperimentalFragmentVariables:Ih,disableExperimentalFragmentVariables:Dh,empty:md,from:yd,split:gd,concat:bd,execute:Ed,ApolloLink:vd,parseAndCheckHttpResponse:kd,serializeFetchParameter:Sd,fallbackHttpConfig:_d,selectHttpOptionsAndBody:xd,checkFetcher:Td,createSignalIfSupported:Od,selectURI:Nd,createHttpLink:Id,HttpLink:Dd,rewriteURIForGET:Rd,setLogVerbosity:function(e){var t=_u[xu];return xu=Math.max(0,_u.indexOf(e)),t},ApolloProvider:Uf,ApolloConsumer:function(e){var t=Qf();return u.createElement(t.Consumer,null,(function(t){return Su(t&&t.client,27),e.children(t.client)}))},getApolloContext:Qf,resetApolloContext:Qf,get DocumentType(){return ed},operationName:id,parser:ad,useApolloClient:function(){var e=u.useContext(Qf()).client;return Su(e,33),e},useLazyQuery:function(e,t){return Vh(e,t,!0)},useMutation:Qh,useQuery:Uh,useSubscription:function(e,t){var n=u.useContext(Qf()),r=t?zc(zc({},t),{subscription:e}):{subscription:e},i=u.useState({loading:!r.skip,error:void 0,data:void 0}),a=i[0],o=i[1],s=u.useRef(),l=(s.current||(s.current=new sd({options:r,context:n,setResult:o})),s.current);return l.setOptions(r,!0),l.context=n,u.useEffect((function(){return l.afterExecute()})),u.useEffect((function(){return l.cleanup.bind(l)}),[]),l.execute(a)},useReactiveVar:function(e){var t=e(),n=u.useState(t)[1];return u.useEffect((function(){var r=e();if(t===r)return e.onNextChange(n);n(r)}),[t]),t}})),Wh=n((function(e,t){var n,r=Bh,i=u;!function(e){e.REQUEST="REQUEST",e.ERROR="ERROR",e.SUCCESS="SUCCESS",e.CANCEL="CANCEL"}(n||(n={}));var a=n,o=function(e){function t(t){e.call(this),this.dispatcher=t}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.request=function(e,t){var n=this;this.dispatcher.dispatch({type:a.REQUEST,payload:{operation:e}});var i=t(e);return new r.Observable((function(t){var r=!0,o=i.subscribe({next:function(i){r=!1,n.dispatcher.dispatch({type:a.SUCCESS,payload:{operation:e,result:i}}),t.next(i)},error:function(i){r=!1,n.dispatcher.dispatch({type:a.ERROR,payload:{operation:e,networkError:i}}),t.error(i)},complete:t.complete.bind(t)});return function(){r&&n.dispatcher.dispatch({type:a.CANCEL,payload:{operation:e}}),o&&o.unsubscribe()}}))},t}(r.ApolloLink),s=function(){this.listeners=[]};function l(e,t,n){var r=i.useReducer(t,n),a=r[0],o=r[1];return i.useEffect((function(){var t;function n(e){t=requestAnimationFrame((function(){o(e)}))}return e.addListener(n),function(){e.removeListener(n),cancelAnimationFrame(t)}}),[e]),a}s.prototype.addListener=function(e){this.listeners.push(e)},s.prototype.removeListener=function(e){this.listeners=this.listeners.filter((function(t){return t!==e}))},s.prototype.dispatch=function(e){this.listeners.forEach((function(t){t(e)}))};var c="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function f(e,t){return e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&e.operation===t}))}function d(e){return function(t,n){if(void 0===t&&(t=0),!f(n.payload.operation,e))return t;switch(n.type){case a.REQUEST:return t+1;case a.ERROR:case a.SUCCESS:case a.CANCEL:return Math.max(t-1,0)}return t}}function p(e){return function(t,n){if(!f(n.payload.operation,e))return t;switch(n.type){case a.REQUEST:return;case a.ERROR:var r=n.payload;return{networkError:r.networkError,operation:r.operation};case a.SUCCESS:var i=n.payload,o=i.result;return o&&o.errors?{graphQLErrors:o.errors,response:o,operation:i.operation}:t}return t}}var h=d("query"),v=d("mutation"),m=p("query"),y=p("mutation"),g={numPendingQueries:0,numPendingMutations:0,queryError:void 0,mutationError:void 0};function b(e){return!1!==e.getContext().useApolloNetworkStatus}t.ActionTypes=a,t.createNetworkStatusNotifier=function(){var e=new s;return{link:new o(e),useApolloNetworkStatus:function(t){return function(e,t){t||(t={});var n,r,a=(n=t.shouldHandleOperation||b,r=i.useRef((function(){throw new Error("Function is called before it was assigned.")})),c((function(){r.current=n})),i.useCallback((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return r.current.apply(r,e)}),[]));return l(e,i.useMemo((function(){return function(e,t){return a(t.payload.operation)?function(e,t){if(f(t.payload.operation,"subscription"))return e;var n=Object.assign({},e);return n.numPendingQueries=h(n.numPendingQueries,t),n.numPendingMutations=v(n.numPendingMutations,t),n.queryError=m(n.queryError,t),n.mutationError=y(n.mutationError,t),Object.keys(e).some((function(t){return n[t]!==e[t]}))?n:e}(e,t):e}}),[a]),g)}(e,t)},useApolloNetworkStatusReducer:function(t,n){return l(e,t,n)}}}}));const Kh=(e,t)=>{switch(t.type){case Wh.ActionTypes.REQUEST:return e+1;case Wh.ActionTypes.ERROR:case Wh.ActionTypes.SUCCESS:case Wh.ActionTypes.CANCEL:return Math.max(e-1,0);default:return e}},Hh=(e,t)=>{switch(t.type){case Wh.ActionTypes.REQUEST:return[];case Wh.ActionTypes.ERROR:const{networkError:n}=t.payload;return[n];case Wh.ActionTypes.SUCCESS:const{result:r}=t.payload;return!0===(null!=r&&null!=r.errors)?[...r.errors]:e;default:return e}};var Yh="3.0.6",Gh="https://github.com/electerious/Ackee",Jh=(e,t)=>({get:()=>{const n=localStorage.getItem(e);return null==n?t:JSON.parse(n)},set:t=>{const n=JSON.stringify(t);return localStorage.setItem(e,n),t},reset:()=>(localStorage.removeItem(e),t)});const Xh=Symbol(),Zh=Symbol(),{get:ev,set:tv,reset:nv}=Jh("ackee_token_3.0.6"),rv=(e,t)=>{switch(t.type){case Xh:return tv(t.token);case Zh:return nv();default:return e}};var iv=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,a=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=a||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=zc({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new Of((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),a=[],o=[],s=[],l=[];n.forEach((function(e,t){a.push(e.observable),o.push(e.next),s.push(e.error),l.push(e.complete)}));var u=this.batchHandler(r,i)||Of.of(),c=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return u.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),o.length!==e.length){var t=new Error("server returned results with length "+e.length+", expected length of "+o.length);return t.result=e,c(t)}e.forEach((function(e,t){o[t]&&o[t].forEach((function(t){return t(e)}))}))},error:c,complete:function(){l.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),a}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),av=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,a=r.batchInterval,o=void 0===a?10:a,s=r.batchMax,l=void 0===s?0:s,u=r.batchHandler,c=void 0===u?function(){return null}:u,f=r.batchKey,d=void 0===f?function(){return""}:f;return n.batcher=new iv({batchDebounce:i,batchInterval:o,batchMax:l,batchHandler:c,batchKey:d}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return jc(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(vd),ov=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,a=void 0===i?"/graphql":i,o=r.fetch,s=r.includeExtensions,l=r.batchInterval,u=r.batchDebounce,c=r.batchMax,f=r.batchKey,d=$c(r,["uri","fetch","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);Td(o),o||(o=fetch);var p={http:{includeExtensions:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};n.batchDebounce=u,n.batchInterval=l||10,n.batchMax=c||10;return f=f||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return Nd(e,a)+JSON.stringify(n)},n.batcher=new av({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:f,batchHandler:function(e){var t=Nd(e[0],a),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,l=i.version;s&&(r["apollographql-client-name"]=s),l&&(r["apollographql-client-version"]=l)}var u,c={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:zc(zc({},r),n.headers)},f=e.map((function(e){return xd(e,_d,p,c)})),d=f.map((function(e){return e.body})),h=f[0].options;if("GET"===h.method)return cd(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=Sd(d)}catch(e){return cd(e)}if(!h.signal){var v=Od(),m=v.controller,y=v.signal;(u=m)&&(h.signal=y)}return new Of((function(n){return o(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(kd(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){u&&u.abort()}}))}}),n}return jc(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(vd),sv=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function lv(){return(lv=Object.assign||function(e){for(var t=1;t(Array.isArray(o)?o.length-1:0)))return a=Array.isArray(o)?o[i]:o,r&&(n[t]=i+1),a;if(r)throw new Error("too few values provided for key `"+t+"`")}else if(r)throw new Error("no values provided for key `"+t+"`")},n=function(e,t,r){var i,a;if(Array.isArray(e)){for(i=-1,a=e.length;++i!0===Rv.some((t=>null!=t.pattern.match(e)))?e:Cv.pattern.stringify();var Dv=()=>{const e=u.useMemo((()=>function(e){function t(){var e=hv(s.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=l.state||{};return[r.idx,{pathname:void 0===t?"/":t,search:void 0===n?"":n,hash:void 0===e?"":e,state:r.usr||null,key:r.key||"default"}]}function n(){if(u)h.call(u),u=null;else{var e=uv.Pop,n=t(),r=n[0];if(n=n[1],h.length){if(null!=r){var i=f-r;i&&(u={action:e,location:n,retry:function(){o(-1*i)}},o(i))}}else a(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=s.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:pv(e))}function i(e,t){return void 0===t&&(t=null),lv({},d,{},"string"==typeof e?hv(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),f=e[0],d=e[1],p.call({action:c,location:d})}function o(e){l.go(e)}void 0===e&&(e={});var s=void 0===(e=e.window)?document.defaultView:e,l=s.history,u=null;s.addEventListener("popstate",n),s.addEventListener("hashchange",(function(){pv(t()[1])!==pv(d)&&n()}));var c=uv.Pop,f=(e=t())[0],d=e[1],p=dv(),h=dv();return null==f&&(f=0,l.replaceState(lv({},l.state,{idx:f}),"")),{get action(){return c},get location(){return d},createHref:r,push:function e(t,n){var o=uv.Push,u=i(t,n);if(!h.length||(h.call({action:o,location:u,retry:function(){e(t,n)}}),0)){var c=[{usr:u.state,key:u.key,idx:f+1},r(u)];u=c[0],c=c[1];try{l.pushState(u,"",c)}catch(e){s.location.assign(c)}a(o)}},replace:function e(t,n){var o=uv.Replace,s=i(t,n);h.length&&(h.call({action:o,location:s,retry:function(){e(t,n)}}),1)||(s=[{usr:s.state,key:s.key,idx:f},r(s)],l.replaceState(s[0],"",s[1]),a(o))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return p.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&s.addEventListener("beforeunload",fv),function(){t(),h.length||s.removeEventListener("beforeunload",fv)}}}}()),[]),[t,n]=u.useState(Iv(e.location));u.useEffect((()=>e.listen((({location:e})=>{n(Iv(e))}))),[e]);return{setRoute:u.useCallback((t=>{e.push({pathname:t})}),[e]),route:t}},Pv=1;var Av,Fv,Mv,Lv={nextValue:function(){return(Pv=(9301*Pv+49297)%233280)/233280},seed:function(e){Pv=e}},qv="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function jv(){Mv=!1}function zv(e){if(e){if(e!==Av){if(e.length!==qv.length)throw new Error("Custom alphabet for shortid must be "+qv.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+qv.length+" unique characters. These characters were not unique: "+t.join(", "));Av=e,jv()}}else Av!==qv&&(Av=qv,jv())}function $v(){return Mv||(Mv=function(){Av||zv(qv);for(var e,t=Av.split(""),n=[],r=Lv.nextValue();t.length>0;)r=Lv.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var Vv={get:function(){return Av||qv},characters:function(e){return zv(e),Av},seed:function(e){Lv.seed(e),Fv!==e&&(jv(),Fv=e)},lookup:function(e){return $v()[e]},shuffled:$v},Qv="object"==typeof window&&(window.crypto||window.msCrypto),Uv=Qv&&Qv.getRandomValues?function(e){return Qv.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=Hv(Wv)),t+=Hv(n)};var Gv=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+Vv.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},Jv=n((function(e){var t=0;function n(){return Yv(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return Vv.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&Vv.characters(e),Vv.shuffled()},e.exports.isValid=Gv})),Xv=()=>`_${Jv.generate()}`;const Zv=Symbol(),em=Symbol(),tm=Symbol(),nm={},rm=(e,t)=>{switch(t.type){case Zv:return{...e,[t.modalId]:{id:t.modalId,type:t.payload.type,props:t.payload.props}};case em:const n={...e};return delete n[t.modalId],n;case tm:return nm;default:return e}};var im="TOP",am="NEW",om="RECENT";var sm="LAST_24_HOURS",lm="LAST_7_DAYS",um="LAST_30_DAYS",cm="LAST_6_MONTHS";var fm="DAILY",dm="MONTHLY",pm="YEARLY";var hm="UNIQUE",vm="TOTAL";var mm="WITH_SOURCE",ym="NO_SOURCE",gm="ONLY_SOURCE";var bm="WITH_MODEL",Em="NO_MODEL";var wm="WITH_VERSION",km="NO_VERSION";var Sm="BROWSER_HEIGHT",_m="BROWSER_RESOLUTION",xm="BROWSER_WIDTH",Tm="SCREEN_HEIGHT",Om="SCREEN_RESOLUTION",Nm="SCREEN_WIDTH";var Rm="WITH_VERSION",Cm="NO_VERSION";const Im=Symbol(),Dm=Symbol(),Pm=Symbol(),Am=Symbol(),Fm=Symbol(),Mm=Symbol(),Lm=Symbol(),qm=Symbol(),jm=Symbol(),zm=Symbol(),{get:$m,set:Vm,reset:Qm}=Jh("ackee_filter_3.0.6",{sorting:im,range:lm,interval:fm,viewsType:hm,referrersType:mm,devicesType:bm,browsersType:wm,sizesType:_m,systemsType:Rm}),Um=(e,t)=>{switch(t.type){case Im:return Vm({...e,sorting:t.payload});case Dm:return Vm({...e,range:t.payload});case Pm:return Vm({...e,interval:t.payload});case Am:return Vm({...e,viewsType:t.payload});case Fm:return Vm({...e,referrersType:t.payload});case Mm:return Vm({...e,devicesType:t.payload});case Lm:return Vm({...e,browsersType:t.payload});case qm:return Vm({...e,sizesType:t.payload});case jm:return Vm({...e,systemsType:t.payload});case zm:return Qm();default:return e}};const Bm=["Token invalid","Token missing","Username or password incorrect"];var Wm=e=>!0===Bm.includes(e.message),Km="function"==typeof Symbol&&Symbol.for,Hm=Km?Symbol.for("react.element"):60103,Ym=Km?Symbol.for("react.portal"):60106,Gm=Km?Symbol.for("react.fragment"):60107,Jm=Km?Symbol.for("react.strict_mode"):60108,Xm=Km?Symbol.for("react.profiler"):60114,Zm=Km?Symbol.for("react.provider"):60109,ey=Km?Symbol.for("react.context"):60110,ty=Km?Symbol.for("react.async_mode"):60111,ny=Km?Symbol.for("react.concurrent_mode"):60111,ry=Km?Symbol.for("react.forward_ref"):60112,iy=Km?Symbol.for("react.suspense"):60113,ay=Km?Symbol.for("react.suspense_list"):60120,oy=Km?Symbol.for("react.memo"):60115,sy=Km?Symbol.for("react.lazy"):60116,ly=Km?Symbol.for("react.block"):60121,uy=Km?Symbol.for("react.fundamental"):60117,cy=Km?Symbol.for("react.responder"):60118,fy=Km?Symbol.for("react.scope"):60119;function dy(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hm:switch(e=e.type){case ty:case ny:case Gm:case Xm:case Jm:case iy:return e;default:switch(e=e&&e.$$typeof){case ey:case ry:case sy:case oy:case Zm:return e;default:return t}}case Ym:return t}}}function py(e){return dy(e)===ny}var hy={AsyncMode:ty,ConcurrentMode:ny,ContextConsumer:ey,ContextProvider:Zm,Element:Hm,ForwardRef:ry,Fragment:Gm,Lazy:sy,Memo:oy,Portal:Ym,Profiler:Xm,StrictMode:Jm,Suspense:iy,isAsyncMode:function(e){return py(e)||dy(e)===ty},isConcurrentMode:py,isContextConsumer:function(e){return dy(e)===ey},isContextProvider:function(e){return dy(e)===Zm},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hm},isForwardRef:function(e){return dy(e)===ry},isFragment:function(e){return dy(e)===Gm},isLazy:function(e){return dy(e)===sy},isMemo:function(e){return dy(e)===oy},isPortal:function(e){return dy(e)===Ym},isProfiler:function(e){return dy(e)===Xm},isStrictMode:function(e){return dy(e)===Jm},isSuspense:function(e){return dy(e)===iy},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Gm||e===ny||e===Xm||e===Jm||e===iy||e===ay||"object"==typeof e&&null!==e&&(e.$$typeof===sy||e.$$typeof===oy||e.$$typeof===Zm||e.$$typeof===ey||e.$$typeof===ry||e.$$typeof===uy||e.$$typeof===cy||e.$$typeof===fy||e.$$typeof===ly)},typeOf:dy}; + ***************************************************************************** */function xh(e){return e.replace(/[\s,]+/g," ").trim()}function Th(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=xh((o=e.loc).source.body.substring(o.start,o.end)),a=kh.get(r);a&&!a.has(i)?Sh&&console.warn("Warning: fragment with name "+r+" 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"):a||kh.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),Eh(Eh({},e),{definitions:n})}function Oh(e){var t=xh(e);if(!wh.has(t)){var n=function(e,t){return new bc(e,t).parseDocument()}(e,{experimentalFragmentVariables:_h});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");wh.set(t,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}(Th(n)))}return wh.get(t)}function Nh(e){for(var t=[],n=1;n0?new ud({graphQLErrors:o}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:a,error:s}),r&&r(a)},t.prototype.onMutationError=function(e,t){this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0})},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){if(this.isMounted&&(!this.previousResult||!Gf(this.previousResult,e)))return this.setResult(e),this.previousResult=e,e},t}(od),$h=function(e){function t(t){var n=t.options,r=t.context,i=t.onNewData,a=e.call(this,n,r)||this;return a.runLazy=!1,a.previous=Object.create(null),a.runLazyQuery=function(e){a.cleanup(),a.runLazy=!0,a.lazyOptions=e,a.onNewData()},a.getQueryResult=function(){var e=a.observableQueryFields(),t=a.getOptions();if(t.skip)e=zc(zc({},e),{data:void 0,error:void 0,loading:!1,networkStatus:Cd.ready,called:!0});else if(a.currentObservable){var n=a.currentObservable.getCurrentResult(),r=n.data,i=n.loading,o=n.partial,s=n.networkStatus,l=n.errors,u=n.error;if(l&&l.length>0&&(u=new ud({graphQLErrors:l})),e=zc(zc({},e),{data:r,loading:i,networkStatus:s,error:u,called:!0}),i);else if(u)Object.assign(e,{data:(a.currentObservable.getLastResult()||{}).data});else{var c=a.currentObservable.options.fetchPolicy;if(t.partialRefetch&&o&&(!r||0===Object.keys(r).length)&&"cache-only"!==c)return Object.assign(e,{loading:!0,networkStatus:Cd.loading}),e.refetch(),e}}e.client=a.client,a.setOptions(t,!0);var f=a.previous.result;return a.previous.loading=f&&f.loading||!1,e.previousData=f&&(f.data||f.previousData),a.previous.result=e,a.currentObservable&&a.currentObservable.resetQueryStoreErrors(),e},a.obsRefetch=function(e){var t;return null===(t=a.currentObservable)||void 0===t?void 0:t.refetch(e)},a.obsFetchMore=function(e){return a.currentObservable.fetchMore(e)},a.obsUpdateQuery=function(e){return a.currentObservable.updateQuery(e)},a.obsStartPolling=function(e){var t;null===(t=a.currentObservable)||void 0===t||t.startPolling(e)},a.obsStopPolling=function(){var e;null===(e=a.currentObservable)||void 0===e||e.stopPolling()},a.obsSubscribeToMore=function(e){return a.currentObservable.subscribeToMore(e)},a.onNewData=i,a}return jc(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,n=e.query;return(t||n!==this.previous.query)&&(this.removeQuerySubscription(),this.removeObservable(!t),this.previous.query=n),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:Cd.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this,t=this.getOptions();return!t.skip&&!1!==t.ssr&&new Promise((function(t){return e.startQuerySubscription(t)}))},t.prototype.afterExecute=function(e){var t=(void 0===e?{}:e).lazy,n=void 0!==t&&t;return this.isMounted=!0,n&&!this.runLazy||this.handleErrorOrCompleted(),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),this.removeObservable(!0),delete this.previous.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=zc(zc({},t.variables),this.lazyOptions.variables),t.context=zc(zc({},t.context),this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.ssrInitiated=function(){return this.context&&this.context.renderPromises},t.prototype.getExecuteResult=function(){var e=this.getQueryResult();return this.startQuerySubscription(),e},t.prototype.getExecuteSsrResult=function(){var e=this.getOptions(),t=e.ssr,n=e.skip,r=!1===t,i=this.refreshClient().client.disableNetworkFetches,a=zc({loading:!0,networkStatus:Cd.loading,called:!0,data:void 0,stale:!1,client:this.client},this.observableQueryFields());if(r&&(this.ssrInitiated()||i))return this.previous.result=a,a;if(this.ssrInitiated()){var o=this.getQueryResult()||a;return o.loading&&!n&&this.context.renderPromises.addQueryPromise(this,(function(){return null})),o}},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,ed.Query);var t=e.displayName||"Query";return!this.ssrInitiated()||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e.fetchPolicy="cache-first"),zc(zc({},e),{displayName:t,context:e.context})},t.prototype.initializeObservableQuery=function(){if(this.ssrInitiated()&&(this.currentObservable=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable){var e=this.prepareObservableQueryOptions();this.previous.observableQueryOptions=zc(zc({},e),{children:null}),this.currentObservable=this.refreshClient().client.watchQuery(zc({},e)),this.ssrInitiated()&&this.context.renderPromises.registerSSRObservable(this.currentObservable,e)}},t.prototype.updateObservableQuery=function(){if(this.currentObservable){if(!this.getOptions().skip){var e=zc(zc({},this.prepareObservableQueryOptions()),{children:null});Gf(e,this.previous.observableQueryOptions)||(this.previous.observableQueryOptions=e,this.currentObservable.setOptions(e).catch((function(){})))}}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(e){var t=this;void 0===e&&(e=this.onNewData),this.currentSubscription||this.getOptions().skip||(this.currentSubscription=this.currentObservable.subscribe({next:function(n){var r=n.loading,i=n.networkStatus,a=n.data,o=t.previous.result;o&&o.loading===r&&o.networkStatus===i&&Gf(o.data,a)||e()},error:function(n){if(t.resubscribeToQuery(),!n.hasOwnProperty("graphQLErrors"))throw n;var r=t.previous.result;(r&&r.loading||!Gf(n,t.previous.error))&&(t.previous.error=n,e())}}))},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable;if(e){var t=e.getLastError(),n=e.getLastResult();e.resetLastResults(),this.startQuerySubscription(),Object.assign(e,{lastError:t,lastResult:n})}},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable&&this.previous.result){var e=this.previous.result,t=e.data,n=e.loading,r=e.error;if(!n){var i=this.getOptions(),a=i.query,o=i.variables,s=i.onCompleted,l=i.onError,u=i.skip;if(this.previousOptions&&!this.previous.loading&&Gf(this.previousOptions.query,a)&&Gf(this.previousOptions.variables,o))return;!s||r||u?l&&r&&l(r):s(t)}}},t.prototype.removeQuerySubscription=function(){this.currentSubscription&&(this.currentSubscription.unsubscribe(),delete this.currentSubscription)},t.prototype.removeObservable=function(e){this.currentObservable&&(this.currentObservable.tearDownQuery(),e&&delete this.currentObservable)},t.prototype.observableQueryFields=function(){var e;return{variables:null===(e=this.currentObservable)||void 0===e?void 0:e.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(od);function Vh(e,t,n){void 0===n&&(n=!1);var r=u.useContext(Qf()),i=u.useReducer((function(e){return e+1}),0),a=i[0],o=i[1],s=t?zc(zc({},t),{query:e}):{query:e},l=u.useRef(),c=l.current||(l.current=new $h({options:s,context:r,onNewData:function(){c.ssrInitiated()?o():Promise.resolve().then((function(){return l.current&&o()}))}}));c.setOptions(s),c.context=r;var f,d,p,h={options:zc(zc({},s),{onError:void 0,onCompleted:void 0}),context:r,tick:a},v=(f=function(){return n?c.executeLazy():c.execute()},d=h,(p=u.useRef()).current&&Gf(d,p.current.key)||(p.current={key:d,value:f()}),p.current.value),m=n?v[1]:v;return u.useEffect((function(){return function(){return c.cleanup()}}),[]),u.useEffect((function(){return c.afterExecute({lazy:n})}),[m.loading,m.networkStatus,m.error,m.data]),v}function Qh(e,t){var n=u.useContext(Qf()),r=u.useState({called:!1,loading:!1}),i=r[0],a=r[1],o=t?zc(zc({},t),{mutation:e}):{mutation:e},s=u.useRef();var l=(s.current||(s.current=new zh({options:o,context:n,result:i,setResult:a})),s.current);return l.setOptions(o),l.context=n,u.useEffect((function(){return l.afterExecute()})),l.execute(i)}function Uh(e,t){return Vh(e,t,!1)}var Bh=t(Object.freeze({__proto__:null,ApolloClient:bh,mergeOptions:gh,ObservableQuery:Fd,get NetworkStatus(){return Cd},isApolloError:ld,ApolloError:ud,get Cache(){return wp},ApolloCache:kp,InMemoryCache:uh,MissingFieldError:Sp,defaultDataIdFromObject:Gp,makeVar:Kp,fromError:cd,toPromise:function(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t||(t=!0,n(e))},error:r})}))},fromPromise:function(e){return new Of((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))},throwServerError:fd,Observable:Of,isReference:Yc,makeReference:Hc,gql:jh,resetCaches:Rh,disableFragmentWarnings:Ch,enableExperimentalFragmentVariables:Ih,disableExperimentalFragmentVariables:Dh,empty:md,from:yd,split:gd,concat:bd,execute:Ed,ApolloLink:vd,parseAndCheckHttpResponse:kd,serializeFetchParameter:Sd,fallbackHttpConfig:_d,selectHttpOptionsAndBody:xd,checkFetcher:Td,createSignalIfSupported:Od,selectURI:Nd,createHttpLink:Id,HttpLink:Dd,rewriteURIForGET:Rd,setLogVerbosity:function(e){var t=_u[xu];return xu=Math.max(0,_u.indexOf(e)),t},ApolloProvider:Uf,ApolloConsumer:function(e){var t=Qf();return u.createElement(t.Consumer,null,(function(t){return Su(t&&t.client,27),e.children(t.client)}))},getApolloContext:Qf,resetApolloContext:Qf,get DocumentType(){return ed},operationName:id,parser:ad,useApolloClient:function(){var e=u.useContext(Qf()).client;return Su(e,33),e},useLazyQuery:function(e,t){return Vh(e,t,!0)},useMutation:Qh,useQuery:Uh,useSubscription:function(e,t){var n=u.useContext(Qf()),r=t?zc(zc({},t),{subscription:e}):{subscription:e},i=u.useState({loading:!r.skip,error:void 0,data:void 0}),a=i[0],o=i[1],s=u.useRef(),l=(s.current||(s.current=new sd({options:r,context:n,setResult:o})),s.current);return l.setOptions(r,!0),l.context=n,u.useEffect((function(){return l.afterExecute()})),u.useEffect((function(){return l.cleanup.bind(l)}),[]),l.execute(a)},useReactiveVar:function(e){var t=e(),n=u.useState(t)[1];return u.useEffect((function(){var r=e();if(t===r)return e.onNextChange(n);n(r)}),[t]),t}})),Wh=n((function(e,t){var n,r=Bh,i=u;!function(e){e.REQUEST="REQUEST",e.ERROR="ERROR",e.SUCCESS="SUCCESS",e.CANCEL="CANCEL"}(n||(n={}));var a=n,o=function(e){function t(t){e.call(this),this.dispatcher=t}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.request=function(e,t){var n=this;this.dispatcher.dispatch({type:a.REQUEST,payload:{operation:e}});var i=t(e);return new r.Observable((function(t){var r=!0,o=i.subscribe({next:function(i){r=!1,n.dispatcher.dispatch({type:a.SUCCESS,payload:{operation:e,result:i}}),t.next(i)},error:function(i){r=!1,n.dispatcher.dispatch({type:a.ERROR,payload:{operation:e,networkError:i}}),t.error(i)},complete:t.complete.bind(t)});return function(){r&&n.dispatcher.dispatch({type:a.CANCEL,payload:{operation:e}}),o&&o.unsubscribe()}}))},t}(r.ApolloLink),s=function(){this.listeners=[]};function l(e,t,n){var r=i.useReducer(t,n),a=r[0],o=r[1];return i.useEffect((function(){var t;function n(e){t=requestAnimationFrame((function(){o(e)}))}return e.addListener(n),function(){e.removeListener(n),cancelAnimationFrame(t)}}),[e]),a}s.prototype.addListener=function(e){this.listeners.push(e)},s.prototype.removeListener=function(e){this.listeners=this.listeners.filter((function(t){return t!==e}))},s.prototype.dispatch=function(e){this.listeners.forEach((function(t){t(e)}))};var c="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function f(e,t){return e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&e.operation===t}))}function d(e){return function(t,n){if(void 0===t&&(t=0),!f(n.payload.operation,e))return t;switch(n.type){case a.REQUEST:return t+1;case a.ERROR:case a.SUCCESS:case a.CANCEL:return Math.max(t-1,0)}return t}}function p(e){return function(t,n){if(!f(n.payload.operation,e))return t;switch(n.type){case a.REQUEST:return;case a.ERROR:var r=n.payload;return{networkError:r.networkError,operation:r.operation};case a.SUCCESS:var i=n.payload,o=i.result;return o&&o.errors?{graphQLErrors:o.errors,response:o,operation:i.operation}:t}return t}}var h=d("query"),v=d("mutation"),m=p("query"),y=p("mutation"),g={numPendingQueries:0,numPendingMutations:0,queryError:void 0,mutationError:void 0};function b(e){return!1!==e.getContext().useApolloNetworkStatus}t.ActionTypes=a,t.createNetworkStatusNotifier=function(){var e=new s;return{link:new o(e),useApolloNetworkStatus:function(t){return function(e,t){t||(t={});var n,r,a=(n=t.shouldHandleOperation||b,r=i.useRef((function(){throw new Error("Function is called before it was assigned.")})),c((function(){r.current=n})),i.useCallback((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return r.current.apply(r,e)}),[]));return l(e,i.useMemo((function(){return function(e,t){return a(t.payload.operation)?function(e,t){if(f(t.payload.operation,"subscription"))return e;var n=Object.assign({},e);return n.numPendingQueries=h(n.numPendingQueries,t),n.numPendingMutations=v(n.numPendingMutations,t),n.queryError=m(n.queryError,t),n.mutationError=y(n.mutationError,t),Object.keys(e).some((function(t){return n[t]!==e[t]}))?n:e}(e,t):e}}),[a]),g)}(e,t)},useApolloNetworkStatusReducer:function(t,n){return l(e,t,n)}}}}));const Kh=(e,t)=>{switch(t.type){case Wh.ActionTypes.REQUEST:return e+1;case Wh.ActionTypes.ERROR:case Wh.ActionTypes.SUCCESS:case Wh.ActionTypes.CANCEL:return Math.max(e-1,0);default:return e}},Hh=(e,t)=>{switch(t.type){case Wh.ActionTypes.REQUEST:return[];case Wh.ActionTypes.ERROR:const{networkError:n}=t.payload;return[n];case Wh.ActionTypes.SUCCESS:const{result:r}=t.payload;return!0===(null!=r&&null!=r.errors)?[...r.errors]:e;default:return e}};var Yh="3.1.0",Gh="https://github.com/electerious/Ackee",Jh=(e,t)=>({get:()=>{const n=localStorage.getItem(e);return null==n?t:JSON.parse(n)},set:t=>{const n=JSON.stringify(t);return localStorage.setItem(e,n),t},reset:()=>(localStorage.removeItem(e),t)});const Xh=Symbol(),Zh=Symbol(),{get:ev,set:tv,reset:nv}=Jh("ackee_token_3.1.0"),rv=(e,t)=>{switch(t.type){case Xh:return tv(t.token);case Zh:return nv();default:return e}};var iv=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,a=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=a||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=zc({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new Of((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),a=[],o=[],s=[],l=[];n.forEach((function(e,t){a.push(e.observable),o.push(e.next),s.push(e.error),l.push(e.complete)}));var u=this.batchHandler(r,i)||Of.of(),c=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return u.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),o.length!==e.length){var t=new Error("server returned results with length "+e.length+", expected length of "+o.length);return t.result=e,c(t)}e.forEach((function(e,t){o[t]&&o[t].forEach((function(t){return t(e)}))}))},error:c,complete:function(){l.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),a}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),av=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,a=r.batchInterval,o=void 0===a?10:a,s=r.batchMax,l=void 0===s?0:s,u=r.batchHandler,c=void 0===u?function(){return null}:u,f=r.batchKey,d=void 0===f?function(){return""}:f;return n.batcher=new iv({batchDebounce:i,batchInterval:o,batchMax:l,batchHandler:c,batchKey:d}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return jc(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(vd),ov=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,a=void 0===i?"/graphql":i,o=r.fetch,s=r.includeExtensions,l=r.batchInterval,u=r.batchDebounce,c=r.batchMax,f=r.batchKey,d=$c(r,["uri","fetch","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);Td(o),o||(o=fetch);var p={http:{includeExtensions:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};n.batchDebounce=u,n.batchInterval=l||10,n.batchMax=c||10;return f=f||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return Nd(e,a)+JSON.stringify(n)},n.batcher=new av({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:f,batchHandler:function(e){var t=Nd(e[0],a),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,l=i.version;s&&(r["apollographql-client-name"]=s),l&&(r["apollographql-client-version"]=l)}var u,c={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:zc(zc({},r),n.headers)},f=e.map((function(e){return xd(e,_d,p,c)})),d=f.map((function(e){return e.body})),h=f[0].options;if("GET"===h.method)return cd(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=Sd(d)}catch(e){return cd(e)}if(!h.signal){var v=Od(),m=v.controller,y=v.signal;(u=m)&&(h.signal=y)}return new Of((function(n){return o(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(kd(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){u&&u.abort()}}))}}),n}return jc(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(vd),sv=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function lv(){return(lv=Object.assign||function(e){for(var t=1;t(Array.isArray(o)?o.length-1:0)))return a=Array.isArray(o)?o[i]:o,r&&(n[t]=i+1),a;if(r)throw new Error("too few values provided for key `"+t+"`")}else if(r)throw new Error("no values provided for key `"+t+"`")},n=function(e,t,r){var i,a;if(Array.isArray(e)){for(i=-1,a=e.length;++i!0===Rv.some((t=>null!=t.pattern.match(e)))?e:Cv.pattern.stringify();var Dv=()=>{const e=u.useMemo((()=>function(e){function t(){var e=hv(s.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=l.state||{};return[r.idx,{pathname:void 0===t?"/":t,search:void 0===n?"":n,hash:void 0===e?"":e,state:r.usr||null,key:r.key||"default"}]}function n(){if(u)h.call(u),u=null;else{var e=uv.Pop,n=t(),r=n[0];if(n=n[1],h.length){if(null!=r){var i=f-r;i&&(u={action:e,location:n,retry:function(){o(-1*i)}},o(i))}}else a(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=s.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:pv(e))}function i(e,t){return void 0===t&&(t=null),lv({},d,{},"string"==typeof e?hv(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),f=e[0],d=e[1],p.call({action:c,location:d})}function o(e){l.go(e)}void 0===e&&(e={});var s=void 0===(e=e.window)?document.defaultView:e,l=s.history,u=null;s.addEventListener("popstate",n),s.addEventListener("hashchange",(function(){pv(t()[1])!==pv(d)&&n()}));var c=uv.Pop,f=(e=t())[0],d=e[1],p=dv(),h=dv();return null==f&&(f=0,l.replaceState(lv({},l.state,{idx:f}),"")),{get action(){return c},get location(){return d},createHref:r,push:function e(t,n){var o=uv.Push,u=i(t,n);if(!h.length||(h.call({action:o,location:u,retry:function(){e(t,n)}}),0)){var c=[{usr:u.state,key:u.key,idx:f+1},r(u)];u=c[0],c=c[1];try{l.pushState(u,"",c)}catch(e){s.location.assign(c)}a(o)}},replace:function e(t,n){var o=uv.Replace,s=i(t,n);h.length&&(h.call({action:o,location:s,retry:function(){e(t,n)}}),1)||(s=[{usr:s.state,key:s.key,idx:f},r(s)],l.replaceState(s[0],"",s[1]),a(o))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return p.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&s.addEventListener("beforeunload",fv),function(){t(),h.length||s.removeEventListener("beforeunload",fv)}}}}()),[]),[t,n]=u.useState(Iv(e.location));u.useEffect((()=>e.listen((({location:e})=>{n(Iv(e))}))),[e]);return{setRoute:u.useCallback((t=>{e.push({pathname:t})}),[e]),route:t}},Pv=1;var Av,Fv,Mv,Lv={nextValue:function(){return(Pv=(9301*Pv+49297)%233280)/233280},seed:function(e){Pv=e}},qv="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function jv(){Mv=!1}function zv(e){if(e){if(e!==Av){if(e.length!==qv.length)throw new Error("Custom alphabet for shortid must be "+qv.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+qv.length+" unique characters. These characters were not unique: "+t.join(", "));Av=e,jv()}}else Av!==qv&&(Av=qv,jv())}function $v(){return Mv||(Mv=function(){Av||zv(qv);for(var e,t=Av.split(""),n=[],r=Lv.nextValue();t.length>0;)r=Lv.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var Vv={get:function(){return Av||qv},characters:function(e){return zv(e),Av},seed:function(e){Lv.seed(e),Fv!==e&&(jv(),Fv=e)},lookup:function(e){return $v()[e]},shuffled:$v},Qv="object"==typeof window&&(window.crypto||window.msCrypto),Uv=Qv&&Qv.getRandomValues?function(e){return Qv.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=Hv(Wv)),t+=Hv(n)};var Gv=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+Vv.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},Jv=n((function(e){var t=0;function n(){return Yv(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return Vv.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&Vv.characters(e),Vv.shuffled()},e.exports.isValid=Gv})),Xv=()=>`_${Jv.generate()}`;const Zv=Symbol(),em=Symbol(),tm=Symbol(),nm={},rm=(e,t)=>{switch(t.type){case Zv:return{...e,[t.modalId]:{id:t.modalId,type:t.payload.type,props:t.payload.props}};case em:const n={...e};return delete n[t.modalId],n;case tm:return nm;default:return e}};var im="TOP",am="NEW",om="RECENT";var sm="LAST_24_HOURS",lm="LAST_7_DAYS",um="LAST_30_DAYS",cm="LAST_6_MONTHS";var fm="DAILY",dm="MONTHLY",pm="YEARLY";var hm="UNIQUE",vm="TOTAL";var mm="WITH_SOURCE",ym="NO_SOURCE",gm="ONLY_SOURCE";var bm="WITH_MODEL",Em="NO_MODEL";var wm="WITH_VERSION",km="NO_VERSION";var Sm="BROWSER_HEIGHT",_m="BROWSER_RESOLUTION",xm="BROWSER_WIDTH",Tm="SCREEN_HEIGHT",Om="SCREEN_RESOLUTION",Nm="SCREEN_WIDTH";var Rm="WITH_VERSION",Cm="NO_VERSION";const Im=Symbol(),Dm=Symbol(),Pm=Symbol(),Am=Symbol(),Fm=Symbol(),Mm=Symbol(),Lm=Symbol(),qm=Symbol(),jm=Symbol(),zm=Symbol(),{get:$m,set:Vm,reset:Qm}=Jh("ackee_filter_3.1.0",{sorting:im,range:lm,interval:fm,viewsType:hm,referrersType:mm,devicesType:bm,browsersType:wm,sizesType:_m,systemsType:Rm}),Um=(e,t)=>{switch(t.type){case Im:return Vm({...e,sorting:t.payload});case Dm:return Vm({...e,range:t.payload});case Pm:return Vm({...e,interval:t.payload});case Am:return Vm({...e,viewsType:t.payload});case Fm:return Vm({...e,referrersType:t.payload});case Mm:return Vm({...e,devicesType:t.payload});case Lm:return Vm({...e,browsersType:t.payload});case qm:return Vm({...e,sizesType:t.payload});case jm:return Vm({...e,systemsType:t.payload});case zm:return Qm();default:return e}};const Bm=["Token invalid","Token missing","Username or password incorrect"];var Wm=e=>!0===Bm.includes(e.message),Km="function"==typeof Symbol&&Symbol.for,Hm=Km?Symbol.for("react.element"):60103,Ym=Km?Symbol.for("react.portal"):60106,Gm=Km?Symbol.for("react.fragment"):60107,Jm=Km?Symbol.for("react.strict_mode"):60108,Xm=Km?Symbol.for("react.profiler"):60114,Zm=Km?Symbol.for("react.provider"):60109,ey=Km?Symbol.for("react.context"):60110,ty=Km?Symbol.for("react.async_mode"):60111,ny=Km?Symbol.for("react.concurrent_mode"):60111,ry=Km?Symbol.for("react.forward_ref"):60112,iy=Km?Symbol.for("react.suspense"):60113,ay=Km?Symbol.for("react.suspense_list"):60120,oy=Km?Symbol.for("react.memo"):60115,sy=Km?Symbol.for("react.lazy"):60116,ly=Km?Symbol.for("react.block"):60121,uy=Km?Symbol.for("react.fundamental"):60117,cy=Km?Symbol.for("react.responder"):60118,fy=Km?Symbol.for("react.scope"):60119;function dy(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hm:switch(e=e.type){case ty:case ny:case Gm:case Xm:case Jm:case iy:return e;default:switch(e=e&&e.$$typeof){case ey:case ry:case sy:case oy:case Zm:return e;default:return t}}case Ym:return t}}}function py(e){return dy(e)===ny}var hy={AsyncMode:ty,ConcurrentMode:ny,ContextConsumer:ey,ContextProvider:Zm,Element:Hm,ForwardRef:ry,Fragment:Gm,Lazy:sy,Memo:oy,Portal:Ym,Profiler:Xm,StrictMode:Jm,Suspense:iy,isAsyncMode:function(e){return py(e)||dy(e)===ty},isConcurrentMode:py,isContextConsumer:function(e){return dy(e)===ey},isContextProvider:function(e){return dy(e)===Zm},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hm},isForwardRef:function(e){return dy(e)===ry},isFragment:function(e){return dy(e)===Gm},isLazy:function(e){return dy(e)===sy},isMemo:function(e){return dy(e)===oy},isPortal:function(e){return dy(e)===Ym},isProfiler:function(e){return dy(e)===Xm},isStrictMode:function(e){return dy(e)===Jm},isSuspense:function(e){return dy(e)===iy},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Gm||e===ny||e===Xm||e===Jm||e===iy||e===ay||"object"==typeof e&&null!==e&&(e.$$typeof===sy||e.$$typeof===oy||e.$$typeof===Zm||e.$$typeof===ey||e.$$typeof===ry||e.$$typeof===uy||e.$$typeof===cy||e.$$typeof===fy||e.$$typeof===ly)},typeOf:dy}; /** @license React v16.13.1 * react-is.development.js * diff --git a/package.json b/package.json index b354499f..6ccacf3b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ackee", "private": true, - "version": "3.0.6", + "version": "3.1.0", "authors": [ "Tobias Reich " ],