From 286c29c0ce2d622a8aa821fbb6c2ba67ee728324 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 21 Feb 2021 19:28:11 +0100 Subject: [PATCH 1/3] Fix tests are requiring Node.js --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 875c3614..446855b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x,15.x] os: [ubuntu-latest, windows-latest, macOS-latest] steps: From f5909102a93218f8a3075d868b4c0a2009b1e215 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 21 Feb 2021 19:32:31 +0100 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8915695f..97acc495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [3.0.5] - 2021-02-21 + +### Changed + +- Ackee now requires Node.js 14 in the `package.json` even when Node.js 14 was already required +- Tests are testing with Node.js 14 and 15 + ## [3.0.4] - 2021-02-21 ### Fixed From 579fb1c71a72af56ae07948347c803c1064cc028 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 21 Feb 2021 19:32:58 +0100 Subject: [PATCH 3/3] 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 bd803254..0df96b30 100644 --- a/dist/index.js +++ b/dist/index.js @@ -80,7 +80,7 @@ n((function(e,t){}));var vs=n((function(e){!function e(){if("undefined"!=typeof * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -n((function(e,t){}));var tc=n((function(e){e.exports=ec}));function nc(){}function rc(){}Function.call.bind(Object.prototype.hasOwnProperty),rc.resetWarningCache=nc;var ac=n((function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rc,resetWarningCache:nc};return n.PropTypes=n,n}()})),oc=s.createContext(null);var ic=function(e){e()},lc=function(){return ic},uc={notify:function(){}};var sc=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=uc,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=lc(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=uc)},e}();function cc(){return(cc=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var fc={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hc={};function yc(e){return tc.isMemo(e)?mc:hc[e.$$typeof]||fc}hc[tc.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hc[tc.Memo]=mc;var vc=Object.defineProperty,gc=Object.getOwnPropertyNames,bc=Object.getOwnPropertySymbols,wc=Object.getOwnPropertyDescriptor,Ec=Object.getPrototypeOf,kc=Object.prototype;var Sc=function e(t,n,r){if("string"!=typeof n){if(kc){var a=Ec(n);a&&a!==kc&&e(t,a,r)}var o=gc(n);bc&&(o=o.concat(bc(n)));for(var i=yc(t),l=yc(n),u=0;u=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Hc(e,t){return e===t}function Kc(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Mc:n,a=t.mapStateToPropsFactories,o=void 0===a?$c:a,i=t.mapDispatchToPropsFactories,l=void 0===i?Fc:i,u=t.mergePropsFactories,s=void 0===u?qc:u,c=t.selectorFactory,d=void 0===c?Wc:c;return function(e,t,n,a){void 0===a&&(a={});var i=a,u=i.pure,c=void 0===u||u,f=i.areStatesEqual,p=void 0===f?Hc:f,m=i.areOwnPropsEqual,h=void 0===m?Dc:m,y=i.areStatePropsEqual,v=void 0===y?Dc:y,g=i.areMergedPropsEqual,b=void 0===g?Dc:g,w=dc(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=Bc(e,o,"mapStateToProps"),k=Bc(t,l,"mapDispatchToProps"),S=Bc(n,s,"mergeProps");return r(d,cc({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:S,pure:c,areStatesEqual:p,areOwnPropsEqual:h,areStatePropsEqual:v,areMergedPropsEqual:b},w))}}var Qc,Yc=Kc();Qc=vs.unstable_batchedUpdates,ic=Qc;var Gc=t(Ms).compose,Xc="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Gc:Gc.apply(null,arguments)};function Zc(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(a){return"function"==typeof a?a(n,r,e):t(a)}}}}var Jc=Zc();Jc.withExtraArgument=Zc;var ed="3.0.4",td="https://github.com/electerious/Ackee";const nd="ackee_state_3.0.4";var rd=(e,t)=>setTimeout((()=>{requestAnimationFrame(e)}),t),ad=1;var od,id,ld,ud={nextValue:function(){return(ad=(9301*ad+49297)%233280)/233280},seed:function(e){ad=e}},sd="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function cd(){ld=!1}function dd(e){if(e){if(e!==od){if(e.length!==sd.length)throw new Error("Custom alphabet for shortid must be "+sd.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 "+sd.length+" unique characters. These characters were not unique: "+t.join(", "));od=e,cd()}}else od!==sd&&(od=sd,cd())}function fd(){return ld||(ld=function(){od||dd(sd);for(var e,t=od.split(""),n=[],r=ud.nextValue();t.length>0;)r=ud.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var pd={get:function(){return od||sd},characters:function(e){return dd(e),od},seed:function(e){ud.seed(e),id!==e&&(cd(),id=e)},lookup:function(e){return fd()[e]},shuffled:fd},md="object"==typeof window&&(window.crypto||window.msCrypto),hd=md&&md.getRandomValues?function(e){return md.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=bd(vd)),t+=bd(n)};var Ed=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+pd.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},kd=n((function(e){var t=0;function n(){return wd(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return pd.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&pd.characters(e),pd.shuffled()},e.exports.isValid=Ed})),Sd=()=>`_${kd.generate()}`;const _d=Symbol(),xd=Symbol(),Td=Symbol(),Cd=(e,t)=>({type:_d,modalId:e,payload:t}),Nd=e=>({type:xd,modalId:e}),Rd=(e,t)=>({type:Td,modalId:e,payload:t});class Pd extends Error{constructor(e){super(e),this.name="HandledError",this.message=e}}var Od=(new Intl.DateTimeFormat).resolvedOptions().timeZone,Md=async({query:e,variables:t,props:n,signal:r})=>{try{const l=new Headers,u=n.token.value;l.append("Content-Type","application/json"),l.append("Time-Zone",Od),u&&l.append("Authorization",`Bearer ${u}`);const s=fetch("/api",{method:"post",headers:l,body:JSON.stringify({query:e,variables:t}),signal:r}),c=await(a=s,o="Request timeout",i=3e4,Promise.race([a,new Promise(((e,t)=>{setTimeout((()=>t(new Error(o))),i)}))]));if(!1===c.ok){const e=await c.text();throw new Error(e)}const d=await c.json();if(null!=d.errors){const e=d.errors[0].message;throw new Error(e)}return d.data}catch(e){if(console.error(e),"Token invalid"===e.message)throw n.resetState(),new Pd(e.message);throw e}var a,o,i},Ld=e=>{const t=Symbol(),n={};return e(((e=t)=>(null!=n[e]&&n[e].abort(),n[e]=new AbortController,n[e].signal)))};const Dd=Symbol(),Ad=Symbol(),Id=Symbol(),zd=Symbol(),Fd=Symbol(),$d=()=>({type:Dd}),jd=()=>({type:Ad}),qd=e=>({type:Id,value:e}),Ud=e=>({type:zd,payload:e}),Vd=e=>({type:Fd,payload:e}),Wd=Ld((e=>(t,n)=>async r=>{r(jd());try{const a=await Md({query:"\n\t\t\t\tmutation createToken($input: CreateTokenInput!) {\n\t\t\t\t\tcreateToken(input: $input) {\n\t\t\t\t\t\tpayload {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{input:{username:n.username,password:n.password}},props:t,signal:e()});r(qd(a.createToken.payload.id))}catch(e){if("AbortError"===e.name)return;if(r(Ud(!1)),"HandledError"===e.name)return;r(Vd(e))}})),Bd=Ld((e=>t=>async n=>{n($d());try{await Md({query:"\n\t\t\t\tmutation deleteToken($id: ID!) {\n\t\t\t\t\tdeleteToken(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:t.token.value},props:t,signal:e()})}catch(e){if("AbortError"===e.name)return;if("HandledError"===e.name)return;n(Vd(e))}})),Hd=Symbol(),Kd=Symbol(),Qd=Symbol(),Yd=Symbol(),Gd=()=>({type:Hd}),Xd=e=>({type:Kd,value:e}),Zd=e=>({type:Qd,payload:e}),Jd=e=>({type:Yd,payload:e}),ef=Ld((e=>t=>async n=>{n(Gd());try{const r=await Md({query:"\n\t\t\t\tquery fetchPermanentTokens {\n\t\t\t\t\tpermanentTokens {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(Xd(r.permanentTokens))}catch(e){if("AbortError"===e.name)return;if(n(Zd(!1)),"HandledError"===e.name)return;n(Jd(e))}})),tf=Ld((e=>(t,n,r)=>async a=>{a(Gd());try{await Md({query:"\n\t\t\t\tmutation updatePermanentToken($id: ID!, $input: UpdatePermanentTokenInput!) {\n\t\t\t\t\tupdatePermanentToken(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title}},props:t,signal:e(n)}),await a(ef(t))}catch(e){if("AbortError"===e.name)return;if(a(Zd(!1)),"HandledError"===e.name)return;a(Jd(e))}})),nf=Ld((e=>(t,n)=>async r=>{r(Gd());try{await Md({query:"\n\t\t\t\tmutation deletePermanentToken($id: ID!) {\n\t\t\t\t\tdeletePermanentToken(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(ef(t))}catch(e){if("AbortError"===e.name)return;if(r(Zd(!1)),"HandledError"===e.name)return;r(Jd(e))}})),rf=Symbol(),af=Symbol(),of=Symbol(),lf=Symbol(),uf=Symbol(),sf=Symbol(),cf=Symbol(),df=Symbol(),ff=Symbol(),pf=Symbol(),mf=Symbol(),hf=Symbol(),yf=Symbol(),vf=()=>({type:pf}),gf=e=>({type:mf,value:e}),bf=e=>({type:hf,payload:e}),wf=e=>({type:yf,payload:e}),Ef=Ld((e=>t=>async n=>{n(vf());try{const r=await Md({query:"\n\t\t\t\tquery fetchDomains {\n\t\t\t\t\tdomains {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(gf(r.domains))}catch(e){if("AbortError"===e.name)return;if(n(bf(!1)),"HandledError"===e.name)return;n(wf(e))}})),kf=Ld((e=>(t,n,r)=>async a=>{a(vf());try{await Md({query:"\n\t\t\t\tmutation updateDomain($id: ID!, $input: UpdateDomainInput!) {\n\t\t\t\t\tupdateDomain(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title}},props:t,signal:e(n)}),await a(Ef(t))}catch(e){if("AbortError"===e.name)return;if(a(bf(!1)),"HandledError"===e.name)return;a(wf(e))}})),Sf=Ld((e=>(t,n)=>async r=>{r(vf());try{await Md({query:"\n\t\t\t\tmutation deleteDomain($id: ID!) {\n\t\t\t\t\tdeleteDomain(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(Ef(t))}catch(e){if("AbortError"===e.name)return;if(r(bf(!1)),"HandledError"===e.name)return;r(wf(e))}})),_f=Symbol(),xf=Symbol(),Tf=Symbol(),Cf=Symbol(),Nf=()=>({type:_f}),Rf=e=>({type:xf,value:e}),Pf=e=>({type:Tf,payload:e}),Of=e=>({type:Cf,payload:e}),Mf=Ld((e=>t=>async n=>{n(Nf());try{const r=await Md({query:"\n\t\t\t\tquery fetchEvents {\n\t\t\t\t\tevents {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t\ttype\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(Rf(r.events))}catch(e){if("AbortError"===e.name)return;if(n(Pf(!1)),"HandledError"===e.name)return;n(Of(e))}})),Lf=Ld((e=>(t,n,r)=>async a=>{a(Nf());try{await Md({query:"\n\t\t\t\tmutation updateEvent($id: ID!, $input: UpdateEventInput!) {\n\t\t\t\t\tupdateEvent(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title,type:r.type}},props:t,signal:e(n)}),await a(Mf(t))}catch(e){if("AbortError"===e.name)return;if(a(Pf(!1)),"HandledError"===e.name)return;a(Of(e))}})),Df=Ld((e=>(t,n)=>async r=>{r(Nf());try{await Md({query:"\n\t\t\t\tmutation deleteEvent($id: ID!) {\n\t\t\t\t\tdeleteEvent(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(Mf(t))}catch(e){if("AbortError"===e.name)return;if(r(Pf(!1)),"HandledError"===e.name)return;r(Of(e))}}));var Af=(e,t)=>{vs.unstable_batchedUpdates((()=>{t.forEach((t=>e(t)))}))};const If=Symbol(),zf=Symbol(),Ff=Symbol(),$f=Symbol(),jf=(e,t)=>({type:If,id:e,value:t}),qf=(e,t)=>({type:zf,id:e,value:t}),Uf=(e,t)=>({type:Ff,id:e,payload:t}),Vf=e=>({type:$f,payload:e}),Wf=Ld((e=>(t,n)=>async r=>{if(0===n.length)return;const a=n.map((e=>e.id)).join(""),o=e=>`_${e}`,i=n.map(((e,t)=>{const{query:n}=e;return`${o(t)}: ${n}`})).join("");Af(r,n.map((e=>{const{id:t,enhancer:n}=e;return jf(t,n())})));try{const l=await Md({query:`\n\t\t\t\t{\n\t\t\t\t\t${i}\n\t\t\t\t}\n\t\t\t`,props:t,signal:e(a)});Af(r,n.map(((e,t)=>{const{id:n,selector:r,enhancer:a}=e,i=o(t);return qf(n,a(r(l,i)))})))}catch(e){if("AbortError"===e.name)return;if(Af(r,n.map((e=>Uf(e.id,!1)))),"HandledError"===e.name)return;r(Vf(e))}}));var Bf=Object.freeze({__proto__:null,SET_MODALS_STATE:_d,REMOVE_MODALS_STATE:xd,SET_MODALS_VISIBLE:Td,setModalsState:Cd,removeModalsState:Nd,setModalsVisible:Rd,addModalsModal:e=>async t=>{const n=Sd();t(Cd(n,e)),rd((()=>{t(Rd(n,!0))}),30)},removeModalsModal:e=>async t=>{t(Rd(e,!1)),rd((()=>{t(Nd(e))}),300)},RESET_STATE:Dd,SET_TOKEN_START:Ad,SET_TOKEN_END:Id,SET_TOKEN_FETCHING:zd,SET_TOKEN_ERROR:Fd,resetState:$d,setTokenStart:jd,setTokenEnd:qd,setTokenFetching:Ud,setTokenError:Vd,addToken:Wd,deleteToken:Bd,SET_PERMANENT_TOKENS_START:Hd,SET_PERMANENT_TOKENS_END:Kd,SET_PERMANENT_TOKENS_FETCHING:Qd,SET_PERMANENT_TOKENS_ERROR:Yd,setPermanentTokensStart:Gd,setPermanentTokensEnd:Xd,setPermanentTokensFetching:Zd,setPermanentTokensError:Jd,fetchPermanentTokens:ef,addPermanentToken:(e,t)=>async n=>{n(Gd());try{await Md({query:"\n\t\t\t\tmutation createPermanentToken($input: CreatePermanentTokenInput!) {\n\t\t\t\t\tcreatePermanentToken(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title}},props:e}),await n(ef(e))}catch(e){if("AbortError"===e.name)return;if(n(Zd(!1)),"HandledError"===e.name)return;n(Jd(e))}},updatePermanentToken:tf,deletePermanentToken:nf,SET_FILTER_SORTING:rf,SET_FILTER_RANGE:af,SET_FILTER_INTERVAL:of,SET_FILTER_VIEWS_TYPE:lf,SET_FILTER_REFERRERS_TYPE:uf,SET_FILTER_DEVICES_TYPE:sf,SET_FILTER_BROWSERS_TYPE:cf,SET_FILTER_SIZES_TYPE:df,SET_FILTER_SYSTEMS_TYPE:ff,setFilterSorting:e=>({type:rf,payload:e}),setFilterRange:e=>({type:af,payload:e}),setFilterInterval:e=>({type:of,payload:e}),setFilterViewsType:e=>({type:lf,payload:e}),setFilterReferrersType:e=>({type:uf,payload:e}),setFilterDevicesType:e=>({type:sf,payload:e}),setFilterBrowsersType:e=>({type:cf,payload:e}),setFilterSizesType:e=>({type:df,payload:e}),setFilterSystemsType:e=>({type:ff,payload:e}),SET_DOMAINS_START:pf,SET_DOMAINS_END:mf,SET_DOMAINS_FETCHING:hf,SET_DOMAINS_ERROR:yf,setDomainsStart:vf,setDomainsEnd:gf,setDomainsFetching:bf,setDomainsError:wf,fetchDomains:Ef,addDomain:(e,t)=>async n=>{n(vf());try{await Md({query:"\n\t\t\t\tmutation createDomain($input: CreateDomainInput!) {\n\t\t\t\t\tcreateDomain(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title}},props:e}),await n(Ef(e))}catch(e){if("AbortError"===e.name)return;if(n(bf(!1)),"HandledError"===e.name)return;n(wf(e))}},updateDomain:kf,deleteDomain:Sf,SET_EVENTS_START:_f,SET_EVENTS_END:xf,SET_EVENTS_FETCHING:Tf,SET_EVENTS_ERROR:Cf,setEventsStart:Nf,setEventsEnd:Rf,setEventsFetching:Pf,setEventsError:Of,fetchEvents:Mf,addEvent:(e,t)=>async n=>{n(Nf());try{await Md({query:"\n\t\t\t\tmutation createEvent($input: CreateEventInput!) {\n\t\t\t\t\tcreateEvent(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title,type:t.type}},props:e}),await n(Mf(e))}catch(e){if("AbortError"===e.name)return;if(n(Pf(!1)),"HandledError"===e.name)return;n(Of(e))}},updateEvent:Lf,deleteEvent:Df,SET_WIDGETS_START:If,SET_WIDGETS_END:zf,SET_WIDGETS_FETCHING:Ff,SET_WIDGETS_ERROR:$f,setWidgetsStart:jf,setWidgetsEnd:qf,setWidgetsFetching:Uf,setWidgetsError:Vf,fetchWidgets:Wf});function Hf(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Jf(e)?2:ep(e)?3:0}function Xf(e,t){return 2===Gf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zf(e,t,n){var r=Gf(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function Jf(e){return Cp&&e instanceof Map}function ep(e){return Np&&e instanceof Set}function tp(e){return e.o||e.t}function np(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Dp(e);delete t[Mp];for(var n=Lp(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=ap),Object.freeze(e),t&&Yf(e,(function(e,t){return rp(t,!0)}),!0)),e}function ap(){Hf(2)}function op(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ip(e){var t=Ap[e];return t||Hf(18,e),t}function lp(){return xp}function up(e,t){t&&(ip("Patches"),e.u=[],e.s=[],e.v=t)}function sp(e){cp(e),e.p.forEach(fp),e.p=null}function cp(e){e===xp&&(xp=e.l)}function dp(e){return xp={p:[],l:xp,h:e,m:!0,_:0}}function fp(e){var t=e[Mp];0===t.i||1===t.i?t.j():t.g=!0}function pp(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||ip("ES5").S(t,e,r),r?(n[Mp].P&&(sp(t),Hf(4)),Qf(e)&&(e=mp(t,e),t.l||yp(t,e)),t.u&&ip("Patches").M(n[Mp],e,t.u,t.s)):e=mp(t,n,[]),sp(t),t.u&&t.v(t.u,t.s),e!==Pp?e:void 0}function mp(e,t,n){if(op(t))return t;var r=t[Mp];if(!r)return Yf(t,(function(a,o){return hp(e,r,t,a,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return yp(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=4===r.i||5===r.i?r.o=np(r.k):r.o;Yf(3===r.i?new Set(a):a,(function(t,o){return hp(e,r,a,t,o,n)})),yp(e,a,!1),n&&e.u&&ip("Patches").R(r,n,e.u,e.s)}return r.o}function hp(e,t,n,r,a,o){if(Kf(a)){var i=mp(e,a,o&&t&&3!==t.i&&!Xf(t.D,r)?o.concat(r):void 0);if(Zf(n,r,i),!Kf(i))return;e.m=!1}if(Qf(a)&&!op(a)){if(!e.h.N&&e._<1)return;mp(e,a),t&&t.A.l||yp(e,a)}}function yp(e,t,n){void 0===n&&(n=!1),e.h.N&&e.m&&rp(t,n)}function vp(e,t){var n=e[Mp];return(n?tp(n):e)[t]}function gp(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function bp(e){e.P||(e.P=!0,e.l&&bp(e.l))}function wp(e){e.o||(e.o=np(e.t))}function Ep(e,t,n){var r=Jf(t)?ip("MapSet").T(t,n):ep(t)?ip("MapSet").F(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:lp(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=r,o=Ip;n&&(a=[r],o=zp);var i=Proxy.revocable(a,o),l=i.revoke,u=i.proxy;return r.k=u,r.j=l,u}(t,n):ip("ES5").J(t,n);return(n?n.A:lp()).p.push(r),r}function kp(e){return Kf(e)||Hf(22,e),function e(t){if(!Qf(t))return t;var n,r=t[Mp],a=Gf(t);if(r){if(!r.P&&(r.i<4||!ip("ES5").K(r)))return r.t;r.I=!0,n=Sp(t,a),r.I=!1}else n=Sp(t,a);return Yf(n,(function(t,a){r&&function(e,t){return 2===Gf(e)?e.get(t):e[t]}(r.t,t)===a||Zf(n,t,e(a))})),3===a?new Set(n):n}(e)}function Sp(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return np(e)}var _p,xp,Tp="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Cp="undefined"!=typeof Map,Np="undefined"!=typeof Set,Rp="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Pp=Tp?Symbol.for("immer-nothing"):((_p={})["immer-nothing"]=!0,_p),Op=Tp?Symbol.for("immer-draftable"):"__$immer_draftable",Mp=Tp?Symbol.for("immer-state"):"__$immer_state",Lp="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Dp=Object.getOwnPropertyDescriptors||function(e){var t={};return Lp(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Ap={},Ip={get:function(e,t){if(t===Mp)return e;var n=tp(e);if(!Xf(n,t))return function(e,t,n){var r,a=gp(t,n);return a?"value"in a?a.value:null===(r=a.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!Qf(r)?r:r===vp(e.t,t)?(wp(e),e.o[t]=Ep(e.A.h,r,e)):r},has:function(e,t){return t in tp(e)},ownKeys:function(e){return Reflect.ownKeys(tp(e))},set:function(e,t,n){var r=gp(tp(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var a=vp(tp(e),t),o=null==a?void 0:a[Mp];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,a)&&(void 0!==n||Xf(e.t,t)))return!0;wp(e),bp(e)}return e.o[t]=n,e.D[t]=!0,!0},deleteProperty:function(e,t){return void 0!==vp(e.t,t)||t in e.t?(e.D[t]=!1,wp(e),bp(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=tp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Hf(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Hf(12)}},zp={};Yf(Ip,(function(e,t){zp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),zp.deleteProperty=function(e,t){return Ip.deleteProperty.call(this,e[0],t)},zp.set=function(e,t,n){return Ip.set.call(this,e[0],t,n,e[0])};var Fp=new(function(){function e(e){this.O=Rp,this.N=!0,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,n){if("function"==typeof e&&"function"!=typeof t){var r=t;t=e;var a=this;return function(e){var n=this;void 0===e&&(e=r);for(var o=arguments.length,i=Array(o>1?o-1:0),l=1;l1?n-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var a=ip("Patches").$;return Kf(e)?a(e,t):this.produce(e,(function(e){return a(e,t.slice(n+1))}))},e}()),$p=Fp.produce;Fp.produceWithPatches.bind(Fp),Fp.setAutoFreeze.bind(Fp),Fp.setUseProxies.bind(Fp),Fp.applyPatches.bind(Fp),Fp.createDraft.bind(Fp),Fp.finishDraft.bind(Fp);var jp=$p(((e,t)=>{switch(t.type){case _d:e.value[t.modalId]=e.value[t.modalId]||{id:void 0,type:void 0,props:{},visible:!1},e.value[t.modalId].id=t.modalId,e.value[t.modalId].type=t.payload.type,e.value[t.modalId].props=t.payload.props||{},e.value[t.modalId].visible=t.payload.visible||!1;break;case xd:delete e.value[t.modalId];break;case Td:e.value[t.modalId].visible=t.payload||!1}}),{value:{}});var qp=$p(((e,t)=>{switch(t.type){case Ad:e.fetching=!0,e.error=void 0;break;case Id:e.value=t.value||void 0,e.fetching=!1;break;case zd:e.fetching=t.payload||!1;break;case Fd:e.error=t.payload||void 0}}),{value:void 0,fetching:!1,error:void 0});var Up=$p(((e,t)=>{switch(t.type){case Hd:e.fetching=!0,e.error=void 0;break;case Kd:e.value=t.value||[],e.fetching=!1;break;case Qd:e.fetching=t.payload||!1;break;case Yd:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});var Vp="TOP",Wp="NEW",Bp="RECENT";var Hp="LAST_24_HOURS",Kp="LAST_7_DAYS",Qp="LAST_30_DAYS",Yp="LAST_6_MONTHS";var Gp="DAILY",Xp="MONTHLY",Zp="YEARLY";var Jp="UNIQUE",em="TOTAL";var tm="WITH_SOURCE",nm="NO_SOURCE",rm="ONLY_SOURCE";var am="WITH_MODEL",om="NO_MODEL";var im="WITH_VERSION",lm="NO_VERSION";var um="BROWSER_HEIGHT",sm="BROWSER_RESOLUTION",cm="BROWSER_WIDTH",dm="SCREEN_HEIGHT",fm="SCREEN_RESOLUTION",pm="SCREEN_WIDTH";var mm="WITH_VERSION",hm="NO_VERSION";const ym=()=>({sorting:Vp,range:Kp,interval:Gp,viewsType:Jp,referrersType:tm,devicesType:am,browsersType:im,sizesType:sm,systemsType:mm});var vm=$p(((e,t)=>{switch(t.type){case rf:e.sorting=t.payload;break;case af:e.range=t.payload;break;case of:e.interval=t.payload;break;case lf:e.viewsType=t.payload;break;case uf:e.referrersType=t.payload;break;case sf:e.devicesType=t.payload;break;case cf:e.browsersType=t.payload;break;case df:e.sizesType=t.payload;break;case ff:e.systemsType=t.payload}}),ym());var gm=$p(((e,t)=>{switch(t.type){case pf:e.fetching=!0,e.error=void 0;break;case mf:e.value=t.value||[],e.fetching=!1;break;case hf:e.fetching=t.payload||!1;break;case yf:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});var bm=$p(((e,t)=>{switch(t.type){case _f:e.fetching=!0,e.error=void 0;break;case xf:e.value=t.value||[],e.fetching=!1;break;case Tf:e.fetching=t.payload||!1;break;case Cf:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});const wm=_s({modals:jp,token:qp,permanentTokens:Up,filter:vm,domains:gm,events:bm,widgets:$p(((e,t)=>{switch(t.type){case If:e.value[t.id]=e.value[t.id]||{value:void 0,fetching:!1};const n=null==e.value[t.id].value?t.value:e.value[t.id].value;e.value[t.id].value=n,e.value[t.id].fetching=!0;break;case zf:e.value[t.id].value=t.value,e.value[t.id].fetching=!1;break;case Ff:e.value[t.id].fetching=t.payload||!1;break;case $f:e.error=t.payload||void 0}}),{value:{},error:void 0})});var Em=n((function(e,t){!function(e,t){function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),e.length!==t.length||e.some((function(e,n){return!Object.is(e,t[n])}))},a={error:null},o=function(e){function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o!1===km.includes(e.message),xm=Sm||(Sm={});xm.Pop="POP",xm.Push="PUSH",xm.Replace="REPLACE";function Tm(e){e.preventDefault(),e.returnValue=""}function Cm(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function Nm(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}function Rm(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var Pm=n((function(t,n){var r=[].slice;!function(e,r){null!==n?t.exports=r():e.UrlPattern=r()}(e,(function(){var e,t,n,a,o,i,l,u,s,c,d,f,p,m,h;return s=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},l=function(e,t){var n,r,a;for(a=[],n=-1,r=e.length;++n(Array.isArray(i)?i.length-1:0)))return o=Array.isArray(i)?i[a]:i,r&&(n[t]=a+1),o;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 a,o;if(Array.isArray(e)){for(a=-1,o=e.length;++a!0===Wm.some((t=>null!=t.pattern.match(e)))?e:Bm.pattern.stringify();var Km=()=>{const e=s.useMemo((()=>function(e){function t(){var e=Rm(l.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=u.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(s)m.call(s),s=null;else{var e=Sm.Pop,n=t(),r=n[0];if(n=n[1],m.length){if(null!=r){var a=d-r;a&&(s={action:e,location:n,retry:function(){i(-1*a)}},i(a))}}else o(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=l.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:Nm(e))}function a(e,t){return void 0===t&&(t=null),cc({},f,{},"string"==typeof e?Rm(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function o(e){c=e,e=t(),d=e[0],f=e[1],p.call({action:c,location:f})}function i(e){u.go(e)}void 0===e&&(e={});var l=void 0===(e=e.window)?document.defaultView:e,u=l.history,s=null;l.addEventListener("popstate",n),l.addEventListener("hashchange",(function(){Nm(t()[1])!==Nm(f)&&n()}));var c=Sm.Pop,d=(e=t())[0],f=e[1],p=Cm(),m=Cm();return null==d&&(d=0,u.replaceState(cc({},u.state,{idx:d}),"")),{get action(){return c},get location(){return f},createHref:r,push:function e(t,n){var i=Sm.Push,s=a(t,n);if(!m.length||(m.call({action:i,location:s,retry:function(){e(t,n)}}),0)){var c=[{usr:s.state,key:s.key,idx:d+1},r(s)];s=c[0],c=c[1];try{u.pushState(s,"",c)}catch(e){l.location.assign(c)}o(i)}},replace:function e(t,n){var i=Sm.Replace,l=a(t,n);m.length&&(m.call({action:i,location:l,retry:function(){e(t,n)}}),1)||(l=[{usr:l.state,key:l.key,idx:d},r(l)],u.replaceState(l[0],"",l[1]),o(i))},go:i,back:function(){i(-1)},forward:function(){i(1)},listen:function(e){return p.push(e)},block:function(e){var t=m.push(e);return 1===m.length&&l.addEventListener("beforeunload",Tm),function(){t(),m.length||l.removeEventListener("beforeunload",Tm)}}}}()),[]),[t,n]=s.useState(Hm(e.location));s.useEffect((()=>e.listen((({location:e})=>{n(Hm(e))}))),[e]);return[s.useCallback((t=>{e.push({pathname:t})}),[e]),t]},Qm=e=>[e.message,e.stack].join("\n");const Ym=e=>{e.target.select(),document.execCommand("copy")},Gm=e=>{const t=s.createElement("textarea",{className:"input",id:e.id,required:e.required,disabled:e.disabled,readOnly:e.readOnly,placeholder:e.placeholder,value:e.value,rows:e.rows,onChange:e.onChange,onFocus:!0===e.copyOnFocus?Ym:void 0});return!0===e.copyOnFocus?s.createElement("div",{className:"inputMessage",title:"Copied to clipboard"},t):t};Gm.propTypes={id:ac.string,required:ac.bool,disabled:ac.bool,readOnly:ac.bool,placeholder:ac.string,value:ac.string,rows:ac.number,onChange:ac.func,copyOnFocus:ac.bool};const Xm=e=>s.createElement("div",{className:"spacer",style:{"--size":e.size}});Xm.propTypes={size:ac.number.isRequired}; +n((function(e,t){}));var tc=n((function(e){e.exports=ec}));function nc(){}function rc(){}Function.call.bind(Object.prototype.hasOwnProperty),rc.resetWarningCache=nc;var ac=n((function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rc,resetWarningCache:nc};return n.PropTypes=n,n}()})),oc=s.createContext(null);var ic=function(e){e()},lc=function(){return ic},uc={notify:function(){}};var sc=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=uc,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=lc(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=uc)},e}();function cc(){return(cc=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var fc={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hc={};function yc(e){return tc.isMemo(e)?mc:hc[e.$$typeof]||fc}hc[tc.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hc[tc.Memo]=mc;var vc=Object.defineProperty,gc=Object.getOwnPropertyNames,bc=Object.getOwnPropertySymbols,wc=Object.getOwnPropertyDescriptor,Ec=Object.getPrototypeOf,kc=Object.prototype;var Sc=function e(t,n,r){if("string"!=typeof n){if(kc){var a=Ec(n);a&&a!==kc&&e(t,a,r)}var o=gc(n);bc&&(o=o.concat(bc(n)));for(var i=yc(t),l=yc(n),u=0;u=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Hc(e,t){return e===t}function Kc(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Mc:n,a=t.mapStateToPropsFactories,o=void 0===a?$c:a,i=t.mapDispatchToPropsFactories,l=void 0===i?Fc:i,u=t.mergePropsFactories,s=void 0===u?qc:u,c=t.selectorFactory,d=void 0===c?Wc:c;return function(e,t,n,a){void 0===a&&(a={});var i=a,u=i.pure,c=void 0===u||u,f=i.areStatesEqual,p=void 0===f?Hc:f,m=i.areOwnPropsEqual,h=void 0===m?Dc:m,y=i.areStatePropsEqual,v=void 0===y?Dc:y,g=i.areMergedPropsEqual,b=void 0===g?Dc:g,w=dc(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=Bc(e,o,"mapStateToProps"),k=Bc(t,l,"mapDispatchToProps"),S=Bc(n,s,"mergeProps");return r(d,cc({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:S,pure:c,areStatesEqual:p,areOwnPropsEqual:h,areStatePropsEqual:v,areMergedPropsEqual:b},w))}}var Qc,Yc=Kc();Qc=vs.unstable_batchedUpdates,ic=Qc;var Gc=t(Ms).compose,Xc="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Gc:Gc.apply(null,arguments)};function Zc(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(a){return"function"==typeof a?a(n,r,e):t(a)}}}}var Jc=Zc();Jc.withExtraArgument=Zc;var ed="3.0.5",td="https://github.com/electerious/Ackee";const nd="ackee_state_3.0.5";var rd=(e,t)=>setTimeout((()=>{requestAnimationFrame(e)}),t),ad=1;var od,id,ld,ud={nextValue:function(){return(ad=(9301*ad+49297)%233280)/233280},seed:function(e){ad=e}},sd="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function cd(){ld=!1}function dd(e){if(e){if(e!==od){if(e.length!==sd.length)throw new Error("Custom alphabet for shortid must be "+sd.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 "+sd.length+" unique characters. These characters were not unique: "+t.join(", "));od=e,cd()}}else od!==sd&&(od=sd,cd())}function fd(){return ld||(ld=function(){od||dd(sd);for(var e,t=od.split(""),n=[],r=ud.nextValue();t.length>0;)r=ud.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var pd={get:function(){return od||sd},characters:function(e){return dd(e),od},seed:function(e){ud.seed(e),id!==e&&(cd(),id=e)},lookup:function(e){return fd()[e]},shuffled:fd},md="object"==typeof window&&(window.crypto||window.msCrypto),hd=md&&md.getRandomValues?function(e){return md.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=bd(vd)),t+=bd(n)};var Ed=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+pd.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},kd=n((function(e){var t=0;function n(){return wd(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return pd.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&pd.characters(e),pd.shuffled()},e.exports.isValid=Ed})),Sd=()=>`_${kd.generate()}`;const _d=Symbol(),xd=Symbol(),Td=Symbol(),Cd=(e,t)=>({type:_d,modalId:e,payload:t}),Nd=e=>({type:xd,modalId:e}),Rd=(e,t)=>({type:Td,modalId:e,payload:t});class Pd extends Error{constructor(e){super(e),this.name="HandledError",this.message=e}}var Od=(new Intl.DateTimeFormat).resolvedOptions().timeZone,Md=async({query:e,variables:t,props:n,signal:r})=>{try{const l=new Headers,u=n.token.value;l.append("Content-Type","application/json"),l.append("Time-Zone",Od),u&&l.append("Authorization",`Bearer ${u}`);const s=fetch("/api",{method:"post",headers:l,body:JSON.stringify({query:e,variables:t}),signal:r}),c=await(a=s,o="Request timeout",i=3e4,Promise.race([a,new Promise(((e,t)=>{setTimeout((()=>t(new Error(o))),i)}))]));if(!1===c.ok){const e=await c.text();throw new Error(e)}const d=await c.json();if(null!=d.errors){const e=d.errors[0].message;throw new Error(e)}return d.data}catch(e){if(console.error(e),"Token invalid"===e.message)throw n.resetState(),new Pd(e.message);throw e}var a,o,i},Ld=e=>{const t=Symbol(),n={};return e(((e=t)=>(null!=n[e]&&n[e].abort(),n[e]=new AbortController,n[e].signal)))};const Dd=Symbol(),Ad=Symbol(),Id=Symbol(),zd=Symbol(),Fd=Symbol(),$d=()=>({type:Dd}),jd=()=>({type:Ad}),qd=e=>({type:Id,value:e}),Ud=e=>({type:zd,payload:e}),Vd=e=>({type:Fd,payload:e}),Wd=Ld((e=>(t,n)=>async r=>{r(jd());try{const a=await Md({query:"\n\t\t\t\tmutation createToken($input: CreateTokenInput!) {\n\t\t\t\t\tcreateToken(input: $input) {\n\t\t\t\t\t\tpayload {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{input:{username:n.username,password:n.password}},props:t,signal:e()});r(qd(a.createToken.payload.id))}catch(e){if("AbortError"===e.name)return;if(r(Ud(!1)),"HandledError"===e.name)return;r(Vd(e))}})),Bd=Ld((e=>t=>async n=>{n($d());try{await Md({query:"\n\t\t\t\tmutation deleteToken($id: ID!) {\n\t\t\t\t\tdeleteToken(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:t.token.value},props:t,signal:e()})}catch(e){if("AbortError"===e.name)return;if("HandledError"===e.name)return;n(Vd(e))}})),Hd=Symbol(),Kd=Symbol(),Qd=Symbol(),Yd=Symbol(),Gd=()=>({type:Hd}),Xd=e=>({type:Kd,value:e}),Zd=e=>({type:Qd,payload:e}),Jd=e=>({type:Yd,payload:e}),ef=Ld((e=>t=>async n=>{n(Gd());try{const r=await Md({query:"\n\t\t\t\tquery fetchPermanentTokens {\n\t\t\t\t\tpermanentTokens {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(Xd(r.permanentTokens))}catch(e){if("AbortError"===e.name)return;if(n(Zd(!1)),"HandledError"===e.name)return;n(Jd(e))}})),tf=Ld((e=>(t,n,r)=>async a=>{a(Gd());try{await Md({query:"\n\t\t\t\tmutation updatePermanentToken($id: ID!, $input: UpdatePermanentTokenInput!) {\n\t\t\t\t\tupdatePermanentToken(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title}},props:t,signal:e(n)}),await a(ef(t))}catch(e){if("AbortError"===e.name)return;if(a(Zd(!1)),"HandledError"===e.name)return;a(Jd(e))}})),nf=Ld((e=>(t,n)=>async r=>{r(Gd());try{await Md({query:"\n\t\t\t\tmutation deletePermanentToken($id: ID!) {\n\t\t\t\t\tdeletePermanentToken(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(ef(t))}catch(e){if("AbortError"===e.name)return;if(r(Zd(!1)),"HandledError"===e.name)return;r(Jd(e))}})),rf=Symbol(),af=Symbol(),of=Symbol(),lf=Symbol(),uf=Symbol(),sf=Symbol(),cf=Symbol(),df=Symbol(),ff=Symbol(),pf=Symbol(),mf=Symbol(),hf=Symbol(),yf=Symbol(),vf=()=>({type:pf}),gf=e=>({type:mf,value:e}),bf=e=>({type:hf,payload:e}),wf=e=>({type:yf,payload:e}),Ef=Ld((e=>t=>async n=>{n(vf());try{const r=await Md({query:"\n\t\t\t\tquery fetchDomains {\n\t\t\t\t\tdomains {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(gf(r.domains))}catch(e){if("AbortError"===e.name)return;if(n(bf(!1)),"HandledError"===e.name)return;n(wf(e))}})),kf=Ld((e=>(t,n,r)=>async a=>{a(vf());try{await Md({query:"\n\t\t\t\tmutation updateDomain($id: ID!, $input: UpdateDomainInput!) {\n\t\t\t\t\tupdateDomain(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title}},props:t,signal:e(n)}),await a(Ef(t))}catch(e){if("AbortError"===e.name)return;if(a(bf(!1)),"HandledError"===e.name)return;a(wf(e))}})),Sf=Ld((e=>(t,n)=>async r=>{r(vf());try{await Md({query:"\n\t\t\t\tmutation deleteDomain($id: ID!) {\n\t\t\t\t\tdeleteDomain(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(Ef(t))}catch(e){if("AbortError"===e.name)return;if(r(bf(!1)),"HandledError"===e.name)return;r(wf(e))}})),_f=Symbol(),xf=Symbol(),Tf=Symbol(),Cf=Symbol(),Nf=()=>({type:_f}),Rf=e=>({type:xf,value:e}),Pf=e=>({type:Tf,payload:e}),Of=e=>({type:Cf,payload:e}),Mf=Ld((e=>t=>async n=>{n(Nf());try{const r=await Md({query:"\n\t\t\t\tquery fetchEvents {\n\t\t\t\t\tevents {\n\t\t\t\t\t\tid\n\t\t\t\t\t\ttitle\n\t\t\t\t\t\ttype\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",props:t,signal:e()});n(Rf(r.events))}catch(e){if("AbortError"===e.name)return;if(n(Pf(!1)),"HandledError"===e.name)return;n(Of(e))}})),Lf=Ld((e=>(t,n,r)=>async a=>{a(Nf());try{await Md({query:"\n\t\t\t\tmutation updateEvent($id: ID!, $input: UpdateEventInput!) {\n\t\t\t\t\tupdateEvent(id: $id, input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n,input:{title:r.title,type:r.type}},props:t,signal:e(n)}),await a(Mf(t))}catch(e){if("AbortError"===e.name)return;if(a(Pf(!1)),"HandledError"===e.name)return;a(Of(e))}})),Df=Ld((e=>(t,n)=>async r=>{r(Nf());try{await Md({query:"\n\t\t\t\tmutation deleteEvent($id: ID!) {\n\t\t\t\t\tdeleteEvent(id: $id) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t",variables:{id:n},props:t,signal:e(n)}),await r(Mf(t))}catch(e){if("AbortError"===e.name)return;if(r(Pf(!1)),"HandledError"===e.name)return;r(Of(e))}}));var Af=(e,t)=>{vs.unstable_batchedUpdates((()=>{t.forEach((t=>e(t)))}))};const If=Symbol(),zf=Symbol(),Ff=Symbol(),$f=Symbol(),jf=(e,t)=>({type:If,id:e,value:t}),qf=(e,t)=>({type:zf,id:e,value:t}),Uf=(e,t)=>({type:Ff,id:e,payload:t}),Vf=e=>({type:$f,payload:e}),Wf=Ld((e=>(t,n)=>async r=>{if(0===n.length)return;const a=n.map((e=>e.id)).join(""),o=e=>`_${e}`,i=n.map(((e,t)=>{const{query:n}=e;return`${o(t)}: ${n}`})).join("");Af(r,n.map((e=>{const{id:t,enhancer:n}=e;return jf(t,n())})));try{const l=await Md({query:`\n\t\t\t\t{\n\t\t\t\t\t${i}\n\t\t\t\t}\n\t\t\t`,props:t,signal:e(a)});Af(r,n.map(((e,t)=>{const{id:n,selector:r,enhancer:a}=e,i=o(t);return qf(n,a(r(l,i)))})))}catch(e){if("AbortError"===e.name)return;if(Af(r,n.map((e=>Uf(e.id,!1)))),"HandledError"===e.name)return;r(Vf(e))}}));var Bf=Object.freeze({__proto__:null,SET_MODALS_STATE:_d,REMOVE_MODALS_STATE:xd,SET_MODALS_VISIBLE:Td,setModalsState:Cd,removeModalsState:Nd,setModalsVisible:Rd,addModalsModal:e=>async t=>{const n=Sd();t(Cd(n,e)),rd((()=>{t(Rd(n,!0))}),30)},removeModalsModal:e=>async t=>{t(Rd(e,!1)),rd((()=>{t(Nd(e))}),300)},RESET_STATE:Dd,SET_TOKEN_START:Ad,SET_TOKEN_END:Id,SET_TOKEN_FETCHING:zd,SET_TOKEN_ERROR:Fd,resetState:$d,setTokenStart:jd,setTokenEnd:qd,setTokenFetching:Ud,setTokenError:Vd,addToken:Wd,deleteToken:Bd,SET_PERMANENT_TOKENS_START:Hd,SET_PERMANENT_TOKENS_END:Kd,SET_PERMANENT_TOKENS_FETCHING:Qd,SET_PERMANENT_TOKENS_ERROR:Yd,setPermanentTokensStart:Gd,setPermanentTokensEnd:Xd,setPermanentTokensFetching:Zd,setPermanentTokensError:Jd,fetchPermanentTokens:ef,addPermanentToken:(e,t)=>async n=>{n(Gd());try{await Md({query:"\n\t\t\t\tmutation createPermanentToken($input: CreatePermanentTokenInput!) {\n\t\t\t\t\tcreatePermanentToken(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title}},props:e}),await n(ef(e))}catch(e){if("AbortError"===e.name)return;if(n(Zd(!1)),"HandledError"===e.name)return;n(Jd(e))}},updatePermanentToken:tf,deletePermanentToken:nf,SET_FILTER_SORTING:rf,SET_FILTER_RANGE:af,SET_FILTER_INTERVAL:of,SET_FILTER_VIEWS_TYPE:lf,SET_FILTER_REFERRERS_TYPE:uf,SET_FILTER_DEVICES_TYPE:sf,SET_FILTER_BROWSERS_TYPE:cf,SET_FILTER_SIZES_TYPE:df,SET_FILTER_SYSTEMS_TYPE:ff,setFilterSorting:e=>({type:rf,payload:e}),setFilterRange:e=>({type:af,payload:e}),setFilterInterval:e=>({type:of,payload:e}),setFilterViewsType:e=>({type:lf,payload:e}),setFilterReferrersType:e=>({type:uf,payload:e}),setFilterDevicesType:e=>({type:sf,payload:e}),setFilterBrowsersType:e=>({type:cf,payload:e}),setFilterSizesType:e=>({type:df,payload:e}),setFilterSystemsType:e=>({type:ff,payload:e}),SET_DOMAINS_START:pf,SET_DOMAINS_END:mf,SET_DOMAINS_FETCHING:hf,SET_DOMAINS_ERROR:yf,setDomainsStart:vf,setDomainsEnd:gf,setDomainsFetching:bf,setDomainsError:wf,fetchDomains:Ef,addDomain:(e,t)=>async n=>{n(vf());try{await Md({query:"\n\t\t\t\tmutation createDomain($input: CreateDomainInput!) {\n\t\t\t\t\tcreateDomain(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title}},props:e}),await n(Ef(e))}catch(e){if("AbortError"===e.name)return;if(n(bf(!1)),"HandledError"===e.name)return;n(wf(e))}},updateDomain:kf,deleteDomain:Sf,SET_EVENTS_START:_f,SET_EVENTS_END:xf,SET_EVENTS_FETCHING:Tf,SET_EVENTS_ERROR:Cf,setEventsStart:Nf,setEventsEnd:Rf,setEventsFetching:Pf,setEventsError:Of,fetchEvents:Mf,addEvent:(e,t)=>async n=>{n(Nf());try{await Md({query:"\n\t\t\t\tmutation createEvent($input: CreateEventInput!) {\n\t\t\t\t\tcreateEvent(input: $input) {\n\t\t\t\t\t\tsuccess\n\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t",variables:{input:{title:t.title,type:t.type}},props:e}),await n(Mf(e))}catch(e){if("AbortError"===e.name)return;if(n(Pf(!1)),"HandledError"===e.name)return;n(Of(e))}},updateEvent:Lf,deleteEvent:Df,SET_WIDGETS_START:If,SET_WIDGETS_END:zf,SET_WIDGETS_FETCHING:Ff,SET_WIDGETS_ERROR:$f,setWidgetsStart:jf,setWidgetsEnd:qf,setWidgetsFetching:Uf,setWidgetsError:Vf,fetchWidgets:Wf});function Hf(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Jf(e)?2:ep(e)?3:0}function Xf(e,t){return 2===Gf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zf(e,t,n){var r=Gf(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function Jf(e){return Cp&&e instanceof Map}function ep(e){return Np&&e instanceof Set}function tp(e){return e.o||e.t}function np(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Dp(e);delete t[Mp];for(var n=Lp(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=ap),Object.freeze(e),t&&Yf(e,(function(e,t){return rp(t,!0)}),!0)),e}function ap(){Hf(2)}function op(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ip(e){var t=Ap[e];return t||Hf(18,e),t}function lp(){return xp}function up(e,t){t&&(ip("Patches"),e.u=[],e.s=[],e.v=t)}function sp(e){cp(e),e.p.forEach(fp),e.p=null}function cp(e){e===xp&&(xp=e.l)}function dp(e){return xp={p:[],l:xp,h:e,m:!0,_:0}}function fp(e){var t=e[Mp];0===t.i||1===t.i?t.j():t.g=!0}function pp(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||ip("ES5").S(t,e,r),r?(n[Mp].P&&(sp(t),Hf(4)),Qf(e)&&(e=mp(t,e),t.l||yp(t,e)),t.u&&ip("Patches").M(n[Mp],e,t.u,t.s)):e=mp(t,n,[]),sp(t),t.u&&t.v(t.u,t.s),e!==Pp?e:void 0}function mp(e,t,n){if(op(t))return t;var r=t[Mp];if(!r)return Yf(t,(function(a,o){return hp(e,r,t,a,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return yp(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=4===r.i||5===r.i?r.o=np(r.k):r.o;Yf(3===r.i?new Set(a):a,(function(t,o){return hp(e,r,a,t,o,n)})),yp(e,a,!1),n&&e.u&&ip("Patches").R(r,n,e.u,e.s)}return r.o}function hp(e,t,n,r,a,o){if(Kf(a)){var i=mp(e,a,o&&t&&3!==t.i&&!Xf(t.D,r)?o.concat(r):void 0);if(Zf(n,r,i),!Kf(i))return;e.m=!1}if(Qf(a)&&!op(a)){if(!e.h.N&&e._<1)return;mp(e,a),t&&t.A.l||yp(e,a)}}function yp(e,t,n){void 0===n&&(n=!1),e.h.N&&e.m&&rp(t,n)}function vp(e,t){var n=e[Mp];return(n?tp(n):e)[t]}function gp(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function bp(e){e.P||(e.P=!0,e.l&&bp(e.l))}function wp(e){e.o||(e.o=np(e.t))}function Ep(e,t,n){var r=Jf(t)?ip("MapSet").T(t,n):ep(t)?ip("MapSet").F(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:lp(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=r,o=Ip;n&&(a=[r],o=zp);var i=Proxy.revocable(a,o),l=i.revoke,u=i.proxy;return r.k=u,r.j=l,u}(t,n):ip("ES5").J(t,n);return(n?n.A:lp()).p.push(r),r}function kp(e){return Kf(e)||Hf(22,e),function e(t){if(!Qf(t))return t;var n,r=t[Mp],a=Gf(t);if(r){if(!r.P&&(r.i<4||!ip("ES5").K(r)))return r.t;r.I=!0,n=Sp(t,a),r.I=!1}else n=Sp(t,a);return Yf(n,(function(t,a){r&&function(e,t){return 2===Gf(e)?e.get(t):e[t]}(r.t,t)===a||Zf(n,t,e(a))})),3===a?new Set(n):n}(e)}function Sp(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return np(e)}var _p,xp,Tp="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Cp="undefined"!=typeof Map,Np="undefined"!=typeof Set,Rp="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Pp=Tp?Symbol.for("immer-nothing"):((_p={})["immer-nothing"]=!0,_p),Op=Tp?Symbol.for("immer-draftable"):"__$immer_draftable",Mp=Tp?Symbol.for("immer-state"):"__$immer_state",Lp="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Dp=Object.getOwnPropertyDescriptors||function(e){var t={};return Lp(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Ap={},Ip={get:function(e,t){if(t===Mp)return e;var n=tp(e);if(!Xf(n,t))return function(e,t,n){var r,a=gp(t,n);return a?"value"in a?a.value:null===(r=a.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!Qf(r)?r:r===vp(e.t,t)?(wp(e),e.o[t]=Ep(e.A.h,r,e)):r},has:function(e,t){return t in tp(e)},ownKeys:function(e){return Reflect.ownKeys(tp(e))},set:function(e,t,n){var r=gp(tp(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var a=vp(tp(e),t),o=null==a?void 0:a[Mp];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,a)&&(void 0!==n||Xf(e.t,t)))return!0;wp(e),bp(e)}return e.o[t]=n,e.D[t]=!0,!0},deleteProperty:function(e,t){return void 0!==vp(e.t,t)||t in e.t?(e.D[t]=!1,wp(e),bp(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=tp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Hf(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Hf(12)}},zp={};Yf(Ip,(function(e,t){zp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),zp.deleteProperty=function(e,t){return Ip.deleteProperty.call(this,e[0],t)},zp.set=function(e,t,n){return Ip.set.call(this,e[0],t,n,e[0])};var Fp=new(function(){function e(e){this.O=Rp,this.N=!0,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,n){if("function"==typeof e&&"function"!=typeof t){var r=t;t=e;var a=this;return function(e){var n=this;void 0===e&&(e=r);for(var o=arguments.length,i=Array(o>1?o-1:0),l=1;l1?n-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var a=ip("Patches").$;return Kf(e)?a(e,t):this.produce(e,(function(e){return a(e,t.slice(n+1))}))},e}()),$p=Fp.produce;Fp.produceWithPatches.bind(Fp),Fp.setAutoFreeze.bind(Fp),Fp.setUseProxies.bind(Fp),Fp.applyPatches.bind(Fp),Fp.createDraft.bind(Fp),Fp.finishDraft.bind(Fp);var jp=$p(((e,t)=>{switch(t.type){case _d:e.value[t.modalId]=e.value[t.modalId]||{id:void 0,type:void 0,props:{},visible:!1},e.value[t.modalId].id=t.modalId,e.value[t.modalId].type=t.payload.type,e.value[t.modalId].props=t.payload.props||{},e.value[t.modalId].visible=t.payload.visible||!1;break;case xd:delete e.value[t.modalId];break;case Td:e.value[t.modalId].visible=t.payload||!1}}),{value:{}});var qp=$p(((e,t)=>{switch(t.type){case Ad:e.fetching=!0,e.error=void 0;break;case Id:e.value=t.value||void 0,e.fetching=!1;break;case zd:e.fetching=t.payload||!1;break;case Fd:e.error=t.payload||void 0}}),{value:void 0,fetching:!1,error:void 0});var Up=$p(((e,t)=>{switch(t.type){case Hd:e.fetching=!0,e.error=void 0;break;case Kd:e.value=t.value||[],e.fetching=!1;break;case Qd:e.fetching=t.payload||!1;break;case Yd:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});var Vp="TOP",Wp="NEW",Bp="RECENT";var Hp="LAST_24_HOURS",Kp="LAST_7_DAYS",Qp="LAST_30_DAYS",Yp="LAST_6_MONTHS";var Gp="DAILY",Xp="MONTHLY",Zp="YEARLY";var Jp="UNIQUE",em="TOTAL";var tm="WITH_SOURCE",nm="NO_SOURCE",rm="ONLY_SOURCE";var am="WITH_MODEL",om="NO_MODEL";var im="WITH_VERSION",lm="NO_VERSION";var um="BROWSER_HEIGHT",sm="BROWSER_RESOLUTION",cm="BROWSER_WIDTH",dm="SCREEN_HEIGHT",fm="SCREEN_RESOLUTION",pm="SCREEN_WIDTH";var mm="WITH_VERSION",hm="NO_VERSION";const ym=()=>({sorting:Vp,range:Kp,interval:Gp,viewsType:Jp,referrersType:tm,devicesType:am,browsersType:im,sizesType:sm,systemsType:mm});var vm=$p(((e,t)=>{switch(t.type){case rf:e.sorting=t.payload;break;case af:e.range=t.payload;break;case of:e.interval=t.payload;break;case lf:e.viewsType=t.payload;break;case uf:e.referrersType=t.payload;break;case sf:e.devicesType=t.payload;break;case cf:e.browsersType=t.payload;break;case df:e.sizesType=t.payload;break;case ff:e.systemsType=t.payload}}),ym());var gm=$p(((e,t)=>{switch(t.type){case pf:e.fetching=!0,e.error=void 0;break;case mf:e.value=t.value||[],e.fetching=!1;break;case hf:e.fetching=t.payload||!1;break;case yf:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});var bm=$p(((e,t)=>{switch(t.type){case _f:e.fetching=!0,e.error=void 0;break;case xf:e.value=t.value||[],e.fetching=!1;break;case Tf:e.fetching=t.payload||!1;break;case Cf:e.error=t.payload||void 0}}),{value:[],fetching:!1,error:void 0});const wm=_s({modals:jp,token:qp,permanentTokens:Up,filter:vm,domains:gm,events:bm,widgets:$p(((e,t)=>{switch(t.type){case If:e.value[t.id]=e.value[t.id]||{value:void 0,fetching:!1};const n=null==e.value[t.id].value?t.value:e.value[t.id].value;e.value[t.id].value=n,e.value[t.id].fetching=!0;break;case zf:e.value[t.id].value=t.value,e.value[t.id].fetching=!1;break;case Ff:e.value[t.id].fetching=t.payload||!1;break;case $f:e.error=t.payload||void 0}}),{value:{},error:void 0})});var Em=n((function(e,t){!function(e,t){function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),e.length!==t.length||e.some((function(e,n){return!Object.is(e,t[n])}))},a={error:null},o=function(e){function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o!1===km.includes(e.message),xm=Sm||(Sm={});xm.Pop="POP",xm.Push="PUSH",xm.Replace="REPLACE";function Tm(e){e.preventDefault(),e.returnValue=""}function Cm(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function Nm(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}function Rm(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var Pm=n((function(t,n){var r=[].slice;!function(e,r){null!==n?t.exports=r():e.UrlPattern=r()}(e,(function(){var e,t,n,a,o,i,l,u,s,c,d,f,p,m,h;return s=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},l=function(e,t){var n,r,a;for(a=[],n=-1,r=e.length;++n(Array.isArray(i)?i.length-1:0)))return o=Array.isArray(i)?i[a]:i,r&&(n[t]=a+1),o;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 a,o;if(Array.isArray(e)){for(a=-1,o=e.length;++a!0===Wm.some((t=>null!=t.pattern.match(e)))?e:Bm.pattern.stringify();var Km=()=>{const e=s.useMemo((()=>function(e){function t(){var e=Rm(l.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=u.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(s)m.call(s),s=null;else{var e=Sm.Pop,n=t(),r=n[0];if(n=n[1],m.length){if(null!=r){var a=d-r;a&&(s={action:e,location:n,retry:function(){i(-1*a)}},i(a))}}else o(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=l.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:Nm(e))}function a(e,t){return void 0===t&&(t=null),cc({},f,{},"string"==typeof e?Rm(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function o(e){c=e,e=t(),d=e[0],f=e[1],p.call({action:c,location:f})}function i(e){u.go(e)}void 0===e&&(e={});var l=void 0===(e=e.window)?document.defaultView:e,u=l.history,s=null;l.addEventListener("popstate",n),l.addEventListener("hashchange",(function(){Nm(t()[1])!==Nm(f)&&n()}));var c=Sm.Pop,d=(e=t())[0],f=e[1],p=Cm(),m=Cm();return null==d&&(d=0,u.replaceState(cc({},u.state,{idx:d}),"")),{get action(){return c},get location(){return f},createHref:r,push:function e(t,n){var i=Sm.Push,s=a(t,n);if(!m.length||(m.call({action:i,location:s,retry:function(){e(t,n)}}),0)){var c=[{usr:s.state,key:s.key,idx:d+1},r(s)];s=c[0],c=c[1];try{u.pushState(s,"",c)}catch(e){l.location.assign(c)}o(i)}},replace:function e(t,n){var i=Sm.Replace,l=a(t,n);m.length&&(m.call({action:i,location:l,retry:function(){e(t,n)}}),1)||(l=[{usr:l.state,key:l.key,idx:d},r(l)],u.replaceState(l[0],"",l[1]),o(i))},go:i,back:function(){i(-1)},forward:function(){i(1)},listen:function(e){return p.push(e)},block:function(e){var t=m.push(e);return 1===m.length&&l.addEventListener("beforeunload",Tm),function(){t(),m.length||l.removeEventListener("beforeunload",Tm)}}}}()),[]),[t,n]=s.useState(Hm(e.location));s.useEffect((()=>e.listen((({location:e})=>{n(Hm(e))}))),[e]);return[s.useCallback((t=>{e.push({pathname:t})}),[e]),t]},Qm=e=>[e.message,e.stack].join("\n");const Ym=e=>{e.target.select(),document.execCommand("copy")},Gm=e=>{const t=s.createElement("textarea",{className:"input",id:e.id,required:e.required,disabled:e.disabled,readOnly:e.readOnly,placeholder:e.placeholder,value:e.value,rows:e.rows,onChange:e.onChange,onFocus:!0===e.copyOnFocus?Ym:void 0});return!0===e.copyOnFocus?s.createElement("div",{className:"inputMessage",title:"Copied to clipboard"},t):t};Gm.propTypes={id:ac.string,required:ac.bool,disabled:ac.bool,readOnly:ac.bool,placeholder:ac.string,value:ac.string,rows:ac.number,onChange:ac.func,copyOnFocus:ac.bool};const Xm=e=>s.createElement("div",{className:"spacer",style:{"--size":e.size}});Xm.propTypes={size:ac.number.isRequired}; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see diff --git a/package.json b/package.json index 98443ed4..7d1407bc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ackee", "private": true, - "version": "3.0.4", + "version": "3.0.5", "authors": [ "Tobias Reich " ],