New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@airma/react-effect

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@airma/react-effect - npm Package Compare versions

Comparing version 17.0.0 to 17.0.1

2

dist/index.js

@@ -1,1 +0,1 @@

!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@airma/react-state")):"function"==typeof define&&define.amd?define(["react","@airma/react-state"],r):"object"==typeof exports?exports["@airma/react-effect"]=r(require("react"),require("@airma/react-state")):t["@airma/react-effect"]=r(t.react,t["@airma/react-state"])}(self,(function(t,r){return function(){var n={4933:function(t,r,n){var e=n(6291),o=n(7073),i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not a function")}},8209:function(t,r,n){var e=n(1814),o=n(7073),i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not a constructor")}},9076:function(t,r,n){var e=n(6291),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||e(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},2814:function(t,r,n){var e=n(6282),o=TypeError;t.exports=function(t,r){if(e(r,t))return t;throw o("Incorrect invocation")}},4905:function(t,r,n){var e=n(2366),o=String,i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not an object")}},5029:function(t,r,n){var e=n(678),o=n(6971),i=n(4821),u=function(t){return function(r,n,u){var c,a=e(r),f=i(a),s=o(u,f);if(t&&n!=n){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},9020:function(t,r,n){"use strict";var e=n(5061);t.exports=function(t,r){var n=[][t];return!!n&&e((function(){n.call(null,r||function(){return 1},1)}))}},2040:function(t,r,n){var e=n(4933),o=n(7615),i=n(2901),u=n(4821),c=TypeError,a=function(t){return function(r,n,a,f){e(n);var s=o(r),p=i(s),l=u(s),v=t?l-1:0,d=t?-1:1;if(a<2)for(;;){if(v in p){f=p[v],v+=d;break}if(v+=d,t?v<0:l<=v)throw c("Reduce of empty array with no initial value")}for(;t?v>=0:l>v;v+=d)v in p&&(f=n(f,p[v],v,s));return f}};t.exports={left:a(!1),right:a(!0)}},650:function(t,r,n){var e=n(936);t.exports=e([].slice)},3165:function(t,r,n){var e=n(6802)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[e]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var n=!1;try{var i={};i[e]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},5489:function(t,r,n){var e=n(936),o=e({}.toString),i=e("".slice);t.exports=function(t){return i(o(t),8,-1)}},486:function(t,r,n){var e=n(8171),o=n(6291),i=n(5489),u=n(6802)("toStringTag"),c=Object,a="Arguments"==i(function(){return arguments}());t.exports=e?i:function(t){var r,n,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,r){try{return t[r]}catch(t){}}(r=c(t),u))?n:a?i(r):"Object"==(e=i(r))&&o(r.callee)?"Arguments":e}},6810:function(t,r,n){var e=n(8382),o=n(2466),i=n(8117),u=n(6462);t.exports=function(t,r,n){for(var c=o(r),a=u.f,f=i.f,s=0;s<c.length;s++){var p=c[s];e(t,p)||n&&e(n,p)||a(t,p,f(r,p))}}},430:function(t,r,n){var e=n(1502),o=n(6462),i=n(6034);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},6034:function(t){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5850:function(t,r,n){var e=n(6291),o=n(6462),i=n(7192),u=n(1756);t.exports=function(t,r,n,c){c||(c={});var a=c.enumerable,f=void 0!==c.name?c.name:r;if(e(n)&&i(n,f,c),c.global)a?t[r]=n:u(r,n);else{try{c.unsafe?t[r]&&(a=!0):delete t[r]}catch(t){}a?t[r]=n:o.f(t,r,{value:n,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},1756:function(t,r,n){var e=n(5001),o=Object.defineProperty;t.exports=function(t,r){try{o(e,t,{value:r,configurable:!0,writable:!0})}catch(n){e[t]=r}return r}},1502:function(t,r,n){var e=n(5061);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5178:function(t){var r="object"==typeof document&&document.all,n=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:n}},6009:function(t,r,n){var e=n(5001),o=n(2366),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},6837:function(t,r,n){var e=n(5065),o=n(566);t.exports=!e&&!o&&"object"==typeof window&&"object"==typeof document},5065:function(t){t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},1368:function(t,r,n){var e=n(9966),o=n(5001);t.exports=/ipad|iphone|ipod/i.test(e)&&void 0!==o.Pebble},311:function(t,r,n){var e=n(9966);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},566:function(t,r,n){var e=n(5489),o=n(5001);t.exports="process"==e(o.process)},4832:function(t,r,n){var e=n(9966);t.exports=/web0s(?!.*chrome)/i.test(e)},9966:function(t,r,n){var e=n(3425);t.exports=e("navigator","userAgent")||""},2821:function(t,r,n){var e,o,i=n(5001),u=n(9966),c=i.process,a=i.Deno,f=c&&c.versions||a&&a.version,s=f&&f.v8;s&&(o=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&u&&(!(e=u.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=u.match(/Chrome\/(\d+)/))&&(o=+e[1]),t.exports=o},2089:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9638:function(t,r,n){var e=n(5001),o=n(8117).f,i=n(430),u=n(5850),c=n(1756),a=n(6810),f=n(1092);t.exports=function(t,r){var n,s,p,l,v,d=t.target,y=t.global,h=t.stat;if(n=y?e:h?e[d]||c(d,{}):(e[d]||{}).prototype)for(s in r){if(l=r[s],p=t.dontCallGetSet?(v=o(n,s))&&v.value:n[s],!f(y?s:d+(h?".":"#")+s,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;a(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),u(n,s,l,t)}}},5061:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},5494:function(t,r,n){var e=n(8483),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(e?u.bind(i):function(){return u.apply(i,arguments)})},9918:function(t,r,n){var e=n(1017),o=n(4933),i=n(8483),u=e(e.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?u(t,r):function(){return t.apply(r,arguments)}}},8483:function(t,r,n){var e=n(5061);t.exports=!e((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3927:function(t,r,n){var e=n(8483),o=Function.prototype.call;t.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},9873:function(t,r,n){var e=n(1502),o=n(8382),i=Function.prototype,u=e&&Object.getOwnPropertyDescriptor,c=o(i,"name"),a=c&&"something"===function(){}.name,f=c&&(!e||e&&u(i,"name").configurable);t.exports={EXISTS:c,PROPER:a,CONFIGURABLE:f}},1017:function(t,r,n){var e=n(5489),o=n(936);t.exports=function(t){if("Function"===e(t))return o(t)}},936:function(t,r,n){var e=n(8483),o=Function.prototype,i=o.call,u=e&&o.bind.bind(i,i);t.exports=e?u:function(t){return function(){return i.apply(t,arguments)}}},3425:function(t,r,n){var e=n(5001),o=n(6291),i=function(t){return o(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?i(e[t]):e[t]&&e[t][r]}},6354:function(t,r,n){var e=n(486),o=n(3815),i=n(860),u=n(501),c=n(6802)("iterator");t.exports=function(t){if(!i(t))return o(t,c)||o(t,"@@iterator")||u[e(t)]}},8437:function(t,r,n){var e=n(3927),o=n(4933),i=n(4905),u=n(7073),c=n(6354),a=TypeError;t.exports=function(t,r){var n=arguments.length<2?c(t):r;if(o(n))return i(e(n,t));throw a(u(t)+" is not iterable")}},3815:function(t,r,n){var e=n(4933),o=n(860);t.exports=function(t,r){var n=t[r];return o(n)?void 0:e(n)}},5001:function(t,r,n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8382:function(t,r,n){var e=n(936),o=n(7615),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},2499:function(t){t.exports={}},3455:function(t,r,n){var e=n(5001);t.exports=function(t,r){var n=e.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,r))}},2118:function(t,r,n){var e=n(3425);t.exports=e("document","documentElement")},7788:function(t,r,n){var e=n(1502),o=n(5061),i=n(6009);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},2901:function(t,r,n){var e=n(936),o=n(5061),i=n(5489),u=Object,c=e("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?c(t,""):u(t)}:u},685:function(t,r,n){var e=n(936),o=n(6291),i=n(9982),u=e(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},684:function(t,r,n){var e,o,i,u=n(1899),c=n(5001),a=n(2366),f=n(430),s=n(8382),p=n(9982),l=n(1695),v=n(2499),d="Object already initialized",y=c.TypeError,h=c.WeakMap;if(u||p.state){var b=p.state||(p.state=new h);b.get=b.get,b.has=b.has,b.set=b.set,e=function(t,r){if(b.has(t))throw y(d);return r.facade=t,b.set(t,r),r},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var g=l("state");v[g]=!0,e=function(t,r){if(s(t,g))throw y(d);return r.facade=t,f(t,g,r),r},o=function(t){return s(t,g)?t[g]:{}},i=function(t){return s(t,g)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!a(r)||(n=o(r)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},5557:function(t,r,n){var e=n(6802),o=n(501),i=e("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},119:function(t,r,n){var e=n(5489);t.exports=Array.isArray||function(t){return"Array"==e(t)}},6291:function(t,r,n){var e=n(5178),o=e.all;t.exports=e.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},1814:function(t,r,n){var e=n(936),o=n(5061),i=n(6291),u=n(486),c=n(3425),a=n(685),f=function(){},s=[],p=c("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=e(l.exec),d=!l.exec(f),y=function(t){if(!i(t))return!1;try{return p(f,s,t),!0}catch(t){return!1}},h=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!v(l,a(t))}catch(t){return!0}};h.sham=!0,t.exports=!p||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?h:y},1092:function(t,r,n){var e=n(5061),o=n(6291),i=/#|\.prototype\./,u=function(t,r){var n=a[c(t)];return n==s||n!=f&&(o(r)?e(r):!!r)},c=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=u.data={},f=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},860:function(t){t.exports=function(t){return null==t}},2366:function(t,r,n){var e=n(6291),o=n(5178),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:e(t)||t===i}:function(t){return"object"==typeof t?null!==t:e(t)}},13:function(t){t.exports=!1},6448:function(t,r,n){var e=n(3425),o=n(6291),i=n(6282),u=n(7558),c=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=e("Symbol");return o(r)&&i(r.prototype,c(t))}},8971:function(t,r,n){var e=n(9918),o=n(3927),i=n(4905),u=n(7073),c=n(5557),a=n(4821),f=n(6282),s=n(8437),p=n(6354),l=n(9200),v=TypeError,d=function(t,r){this.stopped=t,this.result=r},y=d.prototype;t.exports=function(t,r,n){var h,b,g,m,O,x,w,j=n&&n.that,S=!(!n||!n.AS_ENTRIES),P=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),T=!(!n||!n.INTERRUPTED),R=e(r,j),A=function(t){return h&&l(h,"normal",t),new d(!0,t)},I=function(t){return S?(i(t),T?R(t[0],t[1],A):R(t[0],t[1])):T?R(t,A):R(t)};if(P)h=t.iterator;else if(E)h=t;else{if(!(b=p(t)))throw v(u(t)+" is not iterable");if(c(b)){for(g=0,m=a(t);m>g;g++)if((O=I(t[g]))&&f(y,O))return O;return new d(!1)}h=s(t,b)}for(x=P?t.next:h.next;!(w=o(x,h)).done;){try{O=I(w.value)}catch(t){l(h,"throw",t)}if("object"==typeof O&&O&&f(y,O))return O}return new d(!1)}},9200:function(t,r,n){var e=n(3927),o=n(4905),i=n(3815);t.exports=function(t,r,n){var u,c;o(t);try{if(!(u=i(t,"return"))){if("throw"===r)throw n;return n}u=e(u,t)}catch(t){c=!0,u=t}if("throw"===r)throw n;if(c)throw u;return o(u),n}},501:function(t){t.exports={}},4821:function(t,r,n){var e=n(4479);t.exports=function(t){return e(t.length)}},7192:function(t,r,n){var e=n(5061),o=n(6291),i=n(8382),u=n(1502),c=n(9873).CONFIGURABLE,a=n(685),f=n(684),s=f.enforce,p=f.get,l=Object.defineProperty,v=u&&!e((function(){return 8!==l((function(){}),"length",{value:8}).length})),d=String(String).split("String"),y=t.exports=function(t,r,n){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(r="get "+r),n&&n.setter&&(r="set "+r),(!i(t,"name")||c&&t.name!==r)&&(u?l(t,"name",{value:r,configurable:!0}):t.name=r),v&&n&&i(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?u&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=s(t);return i(e,"source")||(e.source=d.join("string"==typeof r?r:"")),t};Function.prototype.toString=y((function(){return o(this)&&p(this).source||a(this)}),"toString")},1367:function(t){var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?n:r)(e)}},3690:function(t,r,n){var e,o,i,u,c,a,f,s,p=n(5001),l=n(9918),v=n(8117).f,d=n(8680).set,y=n(311),h=n(1368),b=n(4832),g=n(566),m=p.MutationObserver||p.WebKitMutationObserver,O=p.document,x=p.process,w=p.Promise,j=v(p,"queueMicrotask"),S=j&&j.value;S||(e=function(){var t,r;for(g&&(t=x.domain)&&t.exit();o;){r=o.fn,o=o.next;try{r()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},y||g||b||!m||!O?!h&&w&&w.resolve?((f=w.resolve(void 0)).constructor=w,s=l(f.then,f),u=function(){s(e)}):g?u=function(){x.nextTick(e)}:(d=l(d,p),u=function(){d(e)}):(c=!0,a=O.createTextNode(""),new m(e).observe(a,{characterData:!0}),u=function(){a.data=c=!c})),t.exports=S||function(t){var r={fn:t,next:void 0};i&&(i.next=r),o||(o=r,u()),i=r}},7714:function(t,r,n){"use strict";var e=n(4933),o=TypeError,i=function(t){var r,n;this.promise=new t((function(t,e){if(void 0!==r||void 0!==n)throw o("Bad Promise constructor");r=t,n=e})),this.resolve=e(r),this.reject=e(n)};t.exports.f=function(t){return new i(t)}},6462:function(t,r,n){var e=n(1502),o=n(7788),i=n(5780),u=n(4905),c=n(1030),a=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",v="writable";r.f=e?i?function(t,r,n){if(u(t),r=c(r),u(n),"function"==typeof t&&"prototype"===r&&"value"in n&&v in n&&!n.writable){var e=s(t,r);e&&e.writable&&(t[r]=n.value,n={configurable:l in n?n.configurable:e.configurable,enumerable:p in n?n.enumerable:e.enumerable,writable:!1})}return f(t,r,n)}:f:function(t,r,n){if(u(t),r=c(r),u(n),o)try{return f(t,r,n)}catch(t){}if("get"in n||"set"in n)throw a("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},8117:function(t,r,n){var e=n(1502),o=n(3927),i=n(9265),u=n(6034),c=n(678),a=n(1030),f=n(8382),s=n(7788),p=Object.getOwnPropertyDescriptor;r.f=e?p:function(t,r){if(t=c(t),r=a(r),s)try{return p(t,r)}catch(t){}if(f(t,r))return u(!o(i.f,t,r),t[r])}},9219:function(t,r,n){var e=n(3855),o=n(2089).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},2822:function(t,r){r.f=Object.getOwnPropertySymbols},6282:function(t,r,n){var e=n(936);t.exports=e({}.isPrototypeOf)},3855:function(t,r,n){var e=n(936),o=n(8382),i=n(678),u=n(5029).indexOf,c=n(2499),a=e([].push);t.exports=function(t,r){var n,e=i(t),f=0,s=[];for(n in e)!o(c,n)&&o(e,n)&&a(s,n);for(;r.length>f;)o(e,n=r[f++])&&(~u(s,n)||a(s,n));return s}},9265:function(t,r){"use strict";var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!n.call({1:2},1);r.f=o?function(t){var r=e(this,t);return!!r&&r.enumerable}:n},2848:function(t,r,n){var e=n(936),o=n(4905),i=n(9076);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,n={};try{(t=e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),r=n instanceof Array}catch(t){}return function(n,e){return o(n),i(e),r?t(n,e):n.__proto__=e,n}}():void 0)},379:function(t,r,n){var e=n(3927),o=n(6291),i=n(2366),u=TypeError;t.exports=function(t,r){var n,c;if("string"===r&&o(n=t.toString)&&!i(c=e(n,t)))return c;if(o(n=t.valueOf)&&!i(c=e(n,t)))return c;if("string"!==r&&o(n=t.toString)&&!i(c=e(n,t)))return c;throw u("Can't convert object to primitive value")}},2466:function(t,r,n){var e=n(3425),o=n(936),i=n(9219),u=n(2822),c=n(4905),a=o([].concat);t.exports=e("Reflect","ownKeys")||function(t){var r=i.f(c(t)),n=u.f;return n?a(r,n(t)):r}},7040:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8410:function(t,r,n){var e=n(5001),o=n(7883),i=n(6291),u=n(1092),c=n(685),a=n(6802),f=n(6837),s=n(5065),p=n(13),l=n(2821),v=o&&o.prototype,d=a("species"),y=!1,h=i(e.PromiseRejectionEvent),b=u("Promise",(function(){var t=c(o),r=t!==String(o);if(!r&&66===l)return!0;if(p&&(!v.catch||!v.finally))return!0;if(!l||l<51||!/native code/.test(t)){var n=new o((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((n.constructor={})[d]=e,!(y=n.then((function(){}))instanceof e))return!0}return!r&&(f||s)&&!h}));t.exports={CONSTRUCTOR:b,REJECTION_EVENT:h,SUBCLASSING:y}},7883:function(t,r,n){var e=n(5001);t.exports=e.Promise},7504:function(t,r,n){var e=n(4905),o=n(2366),i=n(7714);t.exports=function(t,r){if(e(t),o(r)&&r.constructor===t)return r;var n=i.f(t);return(0,n.resolve)(r),n.promise}},3653:function(t,r,n){var e=n(7883),o=n(3165),i=n(8410).CONSTRUCTOR;t.exports=i||!o((function(t){e.all(t).then(void 0,(function(){}))}))},8791:function(t){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var r={item:t,next:null};this.head?this.tail.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=r},4475:function(t,r,n){var e=n(860),o=TypeError;t.exports=function(t){if(e(t))throw o("Can't call method on "+t);return t}},3126:function(t,r,n){"use strict";var e=n(3425),o=n(6462),i=n(6802),u=n(1502),c=i("species");t.exports=function(t){var r=e(t),n=o.f;u&&r&&!r[c]&&n(r,c,{configurable:!0,get:function(){return this}})}},606:function(t,r,n){var e=n(6462).f,o=n(8382),i=n(6802)("toStringTag");t.exports=function(t,r,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&e(t,i,{configurable:!0,value:r})}},1695:function(t,r,n){var e=n(6809),o=n(1050),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},9982:function(t,r,n){var e=n(5001),o=n(1756),i="__core-js_shared__",u=e[i]||o(i,{});t.exports=u},6809:function(t,r,n){var e=n(13),o=n(9982);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.26.1",mode:e?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},3571:function(t,r,n){var e=n(4905),o=n(8209),i=n(860),u=n(6802)("species");t.exports=function(t,r){var n,c=e(t).constructor;return void 0===c||i(n=e(c)[u])?r:o(n)}},5947:function(t,r,n){var e=n(2821),o=n(5061);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},8680:function(t,r,n){var e,o,i,u,c=n(5001),a=n(5494),f=n(9918),s=n(6291),p=n(8382),l=n(5061),v=n(2118),d=n(650),y=n(6009),h=n(7427),b=n(311),g=n(566),m=c.setImmediate,O=c.clearImmediate,x=c.process,w=c.Dispatch,j=c.Function,S=c.MessageChannel,P=c.String,E=0,T={},R="onreadystatechange";try{e=c.location}catch(t){}var A=function(t){if(p(T,t)){var r=T[t];delete T[t],r()}},I=function(t){return function(){A(t)}},M=function(t){A(t.data)},D=function(t){c.postMessage(P(t),e.protocol+"//"+e.host)};m&&O||(m=function(t){h(arguments.length,1);var r=s(t)?t:j(t),n=d(arguments,1);return T[++E]=function(){a(r,void 0,n)},o(E),E},O=function(t){delete T[t]},g?o=function(t){x.nextTick(I(t))}:w&&w.now?o=function(t){w.now(I(t))}:S&&!b?(u=(i=new S).port2,i.port1.onmessage=M,o=f(u.postMessage,u)):c.addEventListener&&s(c.postMessage)&&!c.importScripts&&e&&"file:"!==e.protocol&&!l(D)?(o=D,c.addEventListener("message",M,!1)):o=R in y("script")?function(t){v.appendChild(y("script")).onreadystatechange=function(){v.removeChild(this),A(t)}}:function(t){setTimeout(I(t),0)}),t.exports={set:m,clear:O}},6971:function(t,r,n){var e=n(9398),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},678:function(t,r,n){var e=n(2901),o=n(4475);t.exports=function(t){return e(o(t))}},9398:function(t,r,n){var e=n(1367);t.exports=function(t){var r=+t;return r!=r||0===r?0:e(r)}},4479:function(t,r,n){var e=n(9398),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},7615:function(t,r,n){var e=n(4475),o=Object;t.exports=function(t){return o(e(t))}},6973:function(t,r,n){var e=n(3927),o=n(2366),i=n(6448),u=n(3815),c=n(379),a=n(6802),f=TypeError,s=a("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var n,a=u(t,s);if(a){if(void 0===r&&(r="default"),n=e(a,t,r),!o(n)||i(n))return n;throw f("Can't convert object to primitive value")}return void 0===r&&(r="number"),c(t,r)}},1030:function(t,r,n){var e=n(6973),o=n(6448);t.exports=function(t){var r=e(t,"string");return o(r)?r:r+""}},8171:function(t,r,n){var e={};e[n(6802)("toStringTag")]="z",t.exports="[object z]"===String(e)},7073:function(t){var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},1050:function(t,r,n){var e=n(936),o=0,i=Math.random(),u=e(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},7558:function(t,r,n){var e=n(5947);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5780:function(t,r,n){var e=n(1502),o=n(5061);t.exports=e&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7427:function(t){var r=TypeError;t.exports=function(t,n){if(t<n)throw r("Not enough arguments");return t}},1899:function(t,r,n){var e=n(5001),o=n(6291),i=e.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},6802:function(t,r,n){var e=n(5001),o=n(6809),i=n(8382),u=n(1050),c=n(5947),a=n(7558),f=o("wks"),s=e.Symbol,p=s&&s.for,l=a?s:s&&s.withoutSetter||u;t.exports=function(t){if(!i(f,t)||!c&&"string"!=typeof f[t]){var r="Symbol."+t;c&&i(s,t)?f[t]=s[t]:f[t]=a&&p?p(r):l(r)}return f[t]}},2937:function(t,r,n){"use strict";var e=n(9638),o=n(2040).left,i=n(9020),u=n(2821),c=n(566);e({target:"Array",proto:!0,forced:!i("reduce")||!c&&u>79&&u<83},{reduce:function(t){var r=arguments.length;return o(this,t,r,r>1?arguments[1]:void 0)}})},8547:function(t,r,n){"use strict";var e=n(9638),o=n(936),i=n(119),u=o([].reverse),c=[1,2];e({target:"Array",proto:!0,forced:String(c)===String(c.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),u(this)}})},5370:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(4933),u=n(7714),c=n(7040),a=n(8971);e({target:"Promise",stat:!0,forced:n(3653)},{all:function(t){var r=this,n=u.f(r),e=n.resolve,f=n.reject,s=c((function(){var n=i(r.resolve),u=[],c=0,s=1;a(t,(function(t){var i=c++,a=!1;s++,o(n,r,t).then((function(t){a||(a=!0,u[i]=t,--s||e(u))}),f)})),--s||e(u)}));return s.error&&f(s.value),n.promise}})},4139:function(t,r,n){"use strict";var e=n(9638),o=n(13),i=n(8410).CONSTRUCTOR,u=n(7883),c=n(3425),a=n(6291),f=n(5850),s=u&&u.prototype;if(e({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&a(u)){var p=c("Promise").prototype.catch;s.catch!==p&&f(s,"catch",p,{unsafe:!0})}},9688:function(t,r,n){"use strict";var e,o,i,u=n(9638),c=n(13),a=n(566),f=n(5001),s=n(3927),p=n(5850),l=n(2848),v=n(606),d=n(3126),y=n(4933),h=n(6291),b=n(2366),g=n(2814),m=n(3571),O=n(8680).set,x=n(3690),w=n(3455),j=n(7040),S=n(8791),P=n(684),E=n(7883),T=n(8410),R=n(7714),A="Promise",I=T.CONSTRUCTOR,M=T.REJECTION_EVENT,D=T.SUBCLASSING,F=P.getterFor(A),C=P.set,_=E&&E.prototype,N=E,k=_,L=f.TypeError,U=f.document,K=f.process,G=R.f,z=G,q=!!(U&&U.createEvent&&f.dispatchEvent),B="unhandledrejection",H=function(t){var r;return!(!b(t)||!h(r=t.then))&&r},J=function(t,r){var n,e,o,i=r.value,u=1==r.state,c=u?t.ok:t.fail,a=t.resolve,f=t.reject,p=t.domain;try{c?(u||(2===r.rejection&&Q(r),r.rejection=1),!0===c?n=i:(p&&p.enter(),n=c(i),p&&(p.exit(),o=!0)),n===t.promise?f(L("Promise-chain cycle")):(e=H(n))?s(e,n,a,f):a(n)):f(i)}catch(t){p&&!o&&p.exit(),f(t)}},W=function(t,r){t.notified||(t.notified=!0,x((function(){for(var n,e=t.reactions;n=e.get();)J(n,t);t.notified=!1,r&&!t.rejection&&Y(t)})))},V=function(t,r,n){var e,o;q?((e=U.createEvent("Event")).promise=r,e.reason=n,e.initEvent(t,!1,!0),f.dispatchEvent(e)):e={promise:r,reason:n},!M&&(o=f["on"+t])?o(e):t===B&&w("Unhandled promise rejection",n)},Y=function(t){s(O,f,(function(){var r,n=t.facade,e=t.value;if($(t)&&(r=j((function(){a?K.emit("unhandledRejection",e,n):V(B,n,e)})),t.rejection=a||$(t)?2:1,r.error))throw r.value}))},$=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){s(O,f,(function(){var r=t.facade;a?K.emit("rejectionHandled",r):V("rejectionhandled",r,t.value)}))},X=function(t,r,n){return function(e){t(r,e,n)}},Z=function(t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,W(t,!0))},tt=function(t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===r)throw L("Promise can't be resolved itself");var e=H(r);e?x((function(){var n={done:!1};try{s(e,r,X(tt,n,t),X(Z,n,t))}catch(r){Z(n,r,t)}})):(t.value=r,t.state=1,W(t,!1))}catch(r){Z({done:!1},r,t)}}};if(I&&(k=(N=function(t){g(this,k),y(t),s(e,this);var r=F(this);try{t(X(tt,r),X(Z,r))}catch(t){Z(r,t)}}).prototype,(e=function(t){C(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=p(k,"then",(function(t,r){var n=F(this),e=G(m(this,N));return n.parent=!0,e.ok=!h(t)||t,e.fail=h(r)&&r,e.domain=a?K.domain:void 0,0==n.state?n.reactions.add(e):x((function(){J(e,n)})),e.promise})),o=function(){var t=new e,r=F(t);this.promise=t,this.resolve=X(tt,r),this.reject=X(Z,r)},R.f=G=function(t){return t===N||undefined===t?new o(t):z(t)},!c&&h(E)&&_!==Object.prototype)){i=_.then,D||p(_,"then",(function(t,r){var n=this;return new N((function(t,r){s(i,n,t,r)})).then(t,r)}),{unsafe:!0});try{delete _.constructor}catch(t){}l&&l(_,k)}u({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:N}),v(N,A,!1,!0),d(A)},3045:function(t,r,n){n(9688),n(5370),n(4139),n(7508),n(5858),n(1856)},7508:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(4933),u=n(7714),c=n(7040),a=n(8971);e({target:"Promise",stat:!0,forced:n(3653)},{race:function(t){var r=this,n=u.f(r),e=n.reject,f=c((function(){var u=i(r.resolve);a(t,(function(t){o(u,r,t).then(n.resolve,e)}))}));return f.error&&e(f.value),n.promise}})},5858:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(7714);e({target:"Promise",stat:!0,forced:n(8410).CONSTRUCTOR},{reject:function(t){var r=i.f(this);return o(r.reject,void 0,t),r.promise}})},1856:function(t,r,n){"use strict";var e=n(9638),o=n(3425),i=n(13),u=n(7883),c=n(8410).CONSTRUCTOR,a=n(7504),f=o("Promise"),s=i&&!c;e({target:"Promise",stat:!0,forced:i||c},{resolve:function(t){return a(s&&this===f?u:this,t)}})},7400:function(t){"use strict";t.exports=r},8156:function(r){"use strict";r.exports=t}},e={};function o(t){var r=e[t];if(void 0!==r)return r.exports;var i=e[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.d=function(t,r){for(var n in r)o.o(r,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";function t(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function r(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function n(t,n){if(t){if("string"==typeof t)return r(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}function e(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,r)||n(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}o.r(i),o.d(i,{GlobalRefreshProvider:function(){return P},SessionProvider:function(){return N},Strategy:function(){return m},createSessionKey:function(){return y},useIsFetching:function(){return _},useMutation:function(){return F},useQuery:function(){return D},useSession:function(){return C},withSessionProvider:function(){return k}});o(2937),o(8547),o(3045);var c=o(8156),a=o(7400);function f(t,r){if(null==t)return{};var n,e,o=function(t,r){if(null==t)return{};var n,e,o={},i=Object.keys(t);for(e=0;e<i.length;e++)n=i[e],r.indexOf(n)>=0||(o[n]=t[n]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(e=0;e<i.length;e++)n=i[e],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var s=["version"];function p(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function l(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?p(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function v(t){var r=t.version,n=f(t,s),e=function(t){return l(l({},t),{},{version:r})};return{state:n,version:r||0,setState:function(r){return e("function"!=typeof r?r:r(t))},trigger:function(){return l(l({},t),{},{version:(r||0)+1})}}}var d=function(t){return l({data:void 0,isError:!1,isFetching:!1,abandon:!1,triggerType:void 0,loaded:!1},t)};function y(t){var r={implemented:!1},n=(0,a.factory)(v,d());return n.effect=[function(){return t.apply(void 0,arguments)}],n.implement=function(t){r.implemented||(n.effect[0]=t,r.implemented=!0)},n}function h(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function b(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?h(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):h(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var g=function(t,r){return!!Object.is(t,r)||null!=t&&null!=r&&JSON.stringify(t)===JSON.stringify(r)};var m={debounce:function(t){var r="number"==typeof t?t:t.duration;return function(t){var n=t.current,e=t.runner,o=t.store;if(o.current){var i=o.current,u=i.id,c=i.resolve;o.current=void 0,clearTimeout(u),c(b(b({},n()),{},{abandon:!0}))}return new Promise((function(t){var n=setTimeout((function(){t(e())}),r);o.current={id:n,resolve:t}}))}},once:function(){return function(t){var r=t.current,n=t.runner,e=t.store;return e.current?new Promise((function(t){t(b(b({},r()),{},{abandon:!0}))})):(e.current=!0,n().then((function(t){return t.isError&&(e.current=!1),t})))}},error:function(t,r){var n=(r||{}).withAbandoned;return function(r){return(0,r.runner)().then((function(r){return!r.isError||r.isErrorProcessed||r.abandon&&!n?r:(t(r.error),b(b({},r),{},{isErrorProcessed:!0}))}))}},success:function(t,r){var n=(r||{}).withAbandoned;return function(r){return(0,r.runner)().then((function(r){return r.isError||r.abandon&&!n||t(r.data),r}))}},memo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;return function(r){var n=r.runner,e=r.current;return n().then((function(r){var n=e();return("function"==typeof t?t(n.data,r.data):n.data===r.data)?b(b({},r),{},{data:n.data}):r}))}}};function O(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function x(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var w=[],j=(0,a.factory)((function(t){return{isFetching:t.length>0,startFetching:function(r){return t.some((function(t){return t===r}))?t:t.concat(r)},endFetching:function(r){return t.some((function(t){return t===r}))?t.filter((function(t){return t!==r})):t}}}),w),S=(0,c.createContext)(null);function P(t){var r=t.value,n=t.children;return(0,a.useIsModelMatchedInStore)(j)?(0,c.createElement)(S.Provider,{value:r||null},n):(0,c.createElement)(a.ModelProvider,{value:j},(0,c.createElement)(S.Provider,{value:r||null},n))}function E(){return(0,c.useContext)(S)}function T(t,r){if(!("function"==typeof t.pipe))return[v,t,r];var n=u(t.effect,2);return[t,n[0],n[1]||r]}function R(t){return function(r){var n=t(r);if(!n||"function"!=typeof n.then)throw new Error("The callback have to return a promise object.");return n.then((function(t){return{data:t,error:void 0,isError:!1}}),(function(t){return{error:t,isError:!0}}))}}function A(t,r){var n=function(t){return t.runner()};return function(o){return e(r).reverse().reduce((function(r,n,e){var o=t[e]||{current:void 0};return function(t){if(null==n)return r(t);return n(x(x({},t),{},{store:o,runner:function(){return r(t)}}))}}),n)(o).then((function(t){var r=o.current().loaded,n=t.abandon,e=t.isError,i=t.isFetching,u=r||!n&&!e&&!i;return x(x({},t),{},{loaded:u})}))}}function I(t){return Array.isArray(t)?t:[t]}function M(t){var r=(0,c.useRef)(t);r.current=t;var n=(0,c.useRef)((function(){return r.current.apply(r,arguments)}));return n.current}function D(t,r){var n=u(T(t,Array.isArray(r)?{variables:r}:r),3),o=n[0],i=n[1],f=n[2],s=f||{},p=s.variables,l=s.deps,y=s.triggerOn,h=void 0===y?["mount","update","manual"]:y,b=s.manual,g=s.strategy,m=s.defaultData,O=Object.prototype.hasOwnProperty.call(f||{},"defaultData"),S=o===v?[o,d(O?{data:m,loaded:!0}:void 0)]:O?[o,d({data:m,loaded:!0})]:[o],P=a.useModel.apply(void 0,e(S)),D=(0,a.useRealtimeInstance)(P),F=(0,a.useModel)(j,w,{autoLink:!0}),C=F.startFetching,_=F.endFetching,N=(E()||{}).strategy,k=!l&&!p||b?["manual"]:h,L=I(g),U=N?N(L,"query"):L,K=R((function(t){return i.apply(void 0,e(t||p||[]))})),G=(0,c.useRef)(!0),z=(0,c.useRef)({}),q=(0,c.useRef)(U.map((function(){return{current:void 0}}))),B=(0,c.useRef)(0),H=function(t,r){var n=B.current+1;B.current=n;var e=D.state;return(0,D.setState)(x(x({},e),{},{isFetching:!0,fetchingKey:z.current,triggerType:t})),C(z.current),K(r).then((function(r){var e=n!==B.current;return x(x(x({},D.state),r),{},{abandon:e,isFetching:!1,fetchingKey:void 0,triggerType:t})}))},J=function(t,r,n){var e={current:function(){return D.state},variables:n||p||[],runner:function(){return t(r,n)},store:q};return A(q.current,U)(e)},W=function(t){var r="manual";return k.indexOf(r)<0?new Promise((function(t){t(x(x({},D.state),{},{abandon:!0}))})):J(H,r,t).then((function(t){return t.abandon||(D.setState(t),_(z.current)),t}))},V=M((function(){return W()})),Y=M((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W(r)})),$=l||p||[];(0,c.useEffect)((function(){var t=G.current;G.current=!1;var r=D.state.fetchingKey;r&&r!==z.current||function(t){var r=D.state.fetchingKey;if(!r||r===z.current){var n=t?"mount":"update";k.indexOf(n)<0||J(H,n).then((function(t){return t.abandon||(D.setState(t),_(z.current)),t}))}}(t)}),e($));var Q=(0,c.useRef)(D.version);return(0,c.useEffect)((function(){if(Q.current!==P.version){Q.current=P.version;var t=D.state.fetchingKey;t&&t!==z.current||W()}}),[P.version]),(0,c.useEffect)((function(){return function(){_(z.current)}}),[]),[P.state,V,Y]}function F(t,r){var n=u(T(t,Array.isArray(r)?{variables:r}:r),3),o=n[0],i=n[1],f=n[2],s=f||{},p=s.variables,l=s.strategy,y=s.defaultData,h=s.deps,b=s.triggerOn,g=void 0===b?["manual"]:b,m=Object.prototype.hasOwnProperty.call(f||{},"defaultData"),O=o===v?[o,d(m?{data:y,loaded:!0}:void 0)]:m?[o,d({data:y,loaded:!0})]:[o],S=a.useModel.apply(void 0,e(O)),P=(0,a.useRealtimeInstance)(S),D=(0,a.useModel)(j,w,{autoLink:!0}),F=D.startFetching,C=D.endFetching,_=(E()||{}).strategy,N=I(l),k=_?_(N,"mutation"):N,L=R((function(t){return i.apply(void 0,e(t||p||[]))})),U=(0,c.useRef)(k.map((function(){return{current:void 0}}))),K=(0,c.useRef)(!0),G=(0,c.useRef)({}),z=(0,c.useRef)(!1),q=function(t,r){if(z.current)return new Promise((function(r){r(x(x({},P.state),{},{abandon:!0,triggerType:t}))}));z.current=!0;var n=P.state,e=P.setState;return F(G.current),e(x(x({},n),{},{isFetching:!0,fetchingKey:G.current,triggerType:t})),L(r).then((function(r){return z.current=!1,x(x(x({},P.state),r),{},{isFetching:!1,fetchingKey:void 0,triggerType:t})}))},B=function(t,r,n){var e={current:function(){return P.state},variables:n||p||[],runner:function(){return t(r,n)},store:U};return A(U.current,k)(e)},H=function(t){var r="manual";return g.indexOf(r)<0?new Promise((function(t){t(x(x({},P.state),{},{abandon:!0}))})):B(q,r,t).then((function(t){return t.abandon||(P.setState(t),C(G.current)),t}))},J=M((function(){return H()})),W=M((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H(r)})),V=(0,c.useRef)(S.version),Y=h||p||[];return(0,c.useEffect)((function(){var t=K.current;K.current=!1;var r=P.state.fetchingKey;r&&r!==G.current||function(t){var r=P.state.fetchingKey;if(!r||r===G.current){var n=t?"mount":"update";g.indexOf(n)<0||B(q,n).then((function(t){return t.abandon||(P.setState(t),C(G.current)),t}))}}(t)}),e(Y)),(0,c.useEffect)((function(){if(V.current!==S.version){V.current=S.version;var t=P.state.fetchingKey;t&&t!==G.current||H()}}),[S.version]),(0,c.useEffect)((function(){return function(){C(G.current)}}),[]),[S.state,J,W]}function C(t,r){var n=(0,a.useSelector)(t,(function(t){return[t.state,t.trigger]})),e=(r||{}).loaded,o=u(n,1)[0].loaded;if(e&&!o)throw new Error("The session is not loaded yet, check config, and set {loaded: undefined}.");return n}function _(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var e=(0,c.useMemo)((function(){return r.some((function(t){return t.isFetching}))}),r),o=(0,a.useIsModelMatchedInStore)(j),i=(0,a.useModel)(j,w,{autoLink:!0}),u=i.isFetching;if(!o&&!r.length)throw new Error("You should provide a `GlobalRefreshProvider` to support a global `isFetching` detect.");return o&&!r.length?u:e}var N=a.ModelProvider,k=a.withModelProvider}(),i}()}));
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@airma/react-state")):"function"==typeof define&&define.amd?define(["react","@airma/react-state"],r):"object"==typeof exports?exports["@airma/react-effect"]=r(require("react"),require("@airma/react-state")):t["@airma/react-effect"]=r(t.react,t["@airma/react-state"])}(self,(function(t,r){return function(){var n={4933:function(t,r,n){var e=n(6291),o=n(7073),i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not a function")}},8209:function(t,r,n){var e=n(1814),o=n(7073),i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not a constructor")}},9076:function(t,r,n){var e=n(6291),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||e(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},2814:function(t,r,n){var e=n(6282),o=TypeError;t.exports=function(t,r){if(e(r,t))return t;throw o("Incorrect invocation")}},4905:function(t,r,n){var e=n(2366),o=String,i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not an object")}},5029:function(t,r,n){var e=n(678),o=n(6971),i=n(4821),u=function(t){return function(r,n,u){var c,a=e(r),f=i(a),s=o(u,f);if(t&&n!=n){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},9020:function(t,r,n){"use strict";var e=n(5061);t.exports=function(t,r){var n=[][t];return!!n&&e((function(){n.call(null,r||function(){return 1},1)}))}},2040:function(t,r,n){var e=n(4933),o=n(7615),i=n(2901),u=n(4821),c=TypeError,a=function(t){return function(r,n,a,f){e(n);var s=o(r),p=i(s),l=u(s),v=t?l-1:0,d=t?-1:1;if(a<2)for(;;){if(v in p){f=p[v],v+=d;break}if(v+=d,t?v<0:l<=v)throw c("Reduce of empty array with no initial value")}for(;t?v>=0:l>v;v+=d)v in p&&(f=n(f,p[v],v,s));return f}};t.exports={left:a(!1),right:a(!0)}},650:function(t,r,n){var e=n(936);t.exports=e([].slice)},3165:function(t,r,n){var e=n(6802)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[e]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var n=!1;try{var i={};i[e]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},5489:function(t,r,n){var e=n(936),o=e({}.toString),i=e("".slice);t.exports=function(t){return i(o(t),8,-1)}},486:function(t,r,n){var e=n(8171),o=n(6291),i=n(5489),u=n(6802)("toStringTag"),c=Object,a="Arguments"==i(function(){return arguments}());t.exports=e?i:function(t){var r,n,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,r){try{return t[r]}catch(t){}}(r=c(t),u))?n:a?i(r):"Object"==(e=i(r))&&o(r.callee)?"Arguments":e}},6810:function(t,r,n){var e=n(8382),o=n(2466),i=n(8117),u=n(6462);t.exports=function(t,r,n){for(var c=o(r),a=u.f,f=i.f,s=0;s<c.length;s++){var p=c[s];e(t,p)||n&&e(n,p)||a(t,p,f(r,p))}}},430:function(t,r,n){var e=n(1502),o=n(6462),i=n(6034);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},6034:function(t){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5850:function(t,r,n){var e=n(6291),o=n(6462),i=n(7192),u=n(1756);t.exports=function(t,r,n,c){c||(c={});var a=c.enumerable,f=void 0!==c.name?c.name:r;if(e(n)&&i(n,f,c),c.global)a?t[r]=n:u(r,n);else{try{c.unsafe?t[r]&&(a=!0):delete t[r]}catch(t){}a?t[r]=n:o.f(t,r,{value:n,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},1756:function(t,r,n){var e=n(5001),o=Object.defineProperty;t.exports=function(t,r){try{o(e,t,{value:r,configurable:!0,writable:!0})}catch(n){e[t]=r}return r}},1502:function(t,r,n){var e=n(5061);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5178:function(t){var r="object"==typeof document&&document.all,n=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:n}},6009:function(t,r,n){var e=n(5001),o=n(2366),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},6837:function(t,r,n){var e=n(5065),o=n(566);t.exports=!e&&!o&&"object"==typeof window&&"object"==typeof document},5065:function(t){t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},1368:function(t,r,n){var e=n(9966),o=n(5001);t.exports=/ipad|iphone|ipod/i.test(e)&&void 0!==o.Pebble},311:function(t,r,n){var e=n(9966);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},566:function(t,r,n){var e=n(5489),o=n(5001);t.exports="process"==e(o.process)},4832:function(t,r,n){var e=n(9966);t.exports=/web0s(?!.*chrome)/i.test(e)},9966:function(t,r,n){var e=n(3425);t.exports=e("navigator","userAgent")||""},2821:function(t,r,n){var e,o,i=n(5001),u=n(9966),c=i.process,a=i.Deno,f=c&&c.versions||a&&a.version,s=f&&f.v8;s&&(o=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&u&&(!(e=u.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=u.match(/Chrome\/(\d+)/))&&(o=+e[1]),t.exports=o},2089:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9638:function(t,r,n){var e=n(5001),o=n(8117).f,i=n(430),u=n(5850),c=n(1756),a=n(6810),f=n(1092);t.exports=function(t,r){var n,s,p,l,v,d=t.target,y=t.global,h=t.stat;if(n=y?e:h?e[d]||c(d,{}):(e[d]||{}).prototype)for(s in r){if(l=r[s],p=t.dontCallGetSet?(v=o(n,s))&&v.value:n[s],!f(y?s:d+(h?".":"#")+s,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;a(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),u(n,s,l,t)}}},5061:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},5494:function(t,r,n){var e=n(8483),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(e?u.bind(i):function(){return u.apply(i,arguments)})},9918:function(t,r,n){var e=n(1017),o=n(4933),i=n(8483),u=e(e.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?u(t,r):function(){return t.apply(r,arguments)}}},8483:function(t,r,n){var e=n(5061);t.exports=!e((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3927:function(t,r,n){var e=n(8483),o=Function.prototype.call;t.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},9873:function(t,r,n){var e=n(1502),o=n(8382),i=Function.prototype,u=e&&Object.getOwnPropertyDescriptor,c=o(i,"name"),a=c&&"something"===function(){}.name,f=c&&(!e||e&&u(i,"name").configurable);t.exports={EXISTS:c,PROPER:a,CONFIGURABLE:f}},1017:function(t,r,n){var e=n(5489),o=n(936);t.exports=function(t){if("Function"===e(t))return o(t)}},936:function(t,r,n){var e=n(8483),o=Function.prototype,i=o.call,u=e&&o.bind.bind(i,i);t.exports=e?u:function(t){return function(){return i.apply(t,arguments)}}},3425:function(t,r,n){var e=n(5001),o=n(6291),i=function(t){return o(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?i(e[t]):e[t]&&e[t][r]}},6354:function(t,r,n){var e=n(486),o=n(3815),i=n(860),u=n(501),c=n(6802)("iterator");t.exports=function(t){if(!i(t))return o(t,c)||o(t,"@@iterator")||u[e(t)]}},8437:function(t,r,n){var e=n(3927),o=n(4933),i=n(4905),u=n(7073),c=n(6354),a=TypeError;t.exports=function(t,r){var n=arguments.length<2?c(t):r;if(o(n))return i(e(n,t));throw a(u(t)+" is not iterable")}},3815:function(t,r,n){var e=n(4933),o=n(860);t.exports=function(t,r){var n=t[r];return o(n)?void 0:e(n)}},5001:function(t,r,n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8382:function(t,r,n){var e=n(936),o=n(7615),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},2499:function(t){t.exports={}},3455:function(t,r,n){var e=n(5001);t.exports=function(t,r){var n=e.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,r))}},2118:function(t,r,n){var e=n(3425);t.exports=e("document","documentElement")},7788:function(t,r,n){var e=n(1502),o=n(5061),i=n(6009);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},2901:function(t,r,n){var e=n(936),o=n(5061),i=n(5489),u=Object,c=e("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?c(t,""):u(t)}:u},685:function(t,r,n){var e=n(936),o=n(6291),i=n(9982),u=e(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},684:function(t,r,n){var e,o,i,u=n(1899),c=n(5001),a=n(2366),f=n(430),s=n(8382),p=n(9982),l=n(1695),v=n(2499),d="Object already initialized",y=c.TypeError,h=c.WeakMap;if(u||p.state){var b=p.state||(p.state=new h);b.get=b.get,b.has=b.has,b.set=b.set,e=function(t,r){if(b.has(t))throw y(d);return r.facade=t,b.set(t,r),r},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var g=l("state");v[g]=!0,e=function(t,r){if(s(t,g))throw y(d);return r.facade=t,f(t,g,r),r},o=function(t){return s(t,g)?t[g]:{}},i=function(t){return s(t,g)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!a(r)||(n=o(r)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},5557:function(t,r,n){var e=n(6802),o=n(501),i=e("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},119:function(t,r,n){var e=n(5489);t.exports=Array.isArray||function(t){return"Array"==e(t)}},6291:function(t,r,n){var e=n(5178),o=e.all;t.exports=e.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},1814:function(t,r,n){var e=n(936),o=n(5061),i=n(6291),u=n(486),c=n(3425),a=n(685),f=function(){},s=[],p=c("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=e(l.exec),d=!l.exec(f),y=function(t){if(!i(t))return!1;try{return p(f,s,t),!0}catch(t){return!1}},h=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!v(l,a(t))}catch(t){return!0}};h.sham=!0,t.exports=!p||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?h:y},1092:function(t,r,n){var e=n(5061),o=n(6291),i=/#|\.prototype\./,u=function(t,r){var n=a[c(t)];return n==s||n!=f&&(o(r)?e(r):!!r)},c=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=u.data={},f=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},860:function(t){t.exports=function(t){return null==t}},2366:function(t,r,n){var e=n(6291),o=n(5178),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:e(t)||t===i}:function(t){return"object"==typeof t?null!==t:e(t)}},13:function(t){t.exports=!1},6448:function(t,r,n){var e=n(3425),o=n(6291),i=n(6282),u=n(7558),c=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=e("Symbol");return o(r)&&i(r.prototype,c(t))}},8971:function(t,r,n){var e=n(9918),o=n(3927),i=n(4905),u=n(7073),c=n(5557),a=n(4821),f=n(6282),s=n(8437),p=n(6354),l=n(9200),v=TypeError,d=function(t,r){this.stopped=t,this.result=r},y=d.prototype;t.exports=function(t,r,n){var h,b,g,m,O,x,w,j=n&&n.that,S=!(!n||!n.AS_ENTRIES),P=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),T=!(!n||!n.INTERRUPTED),R=e(r,j),A=function(t){return h&&l(h,"normal",t),new d(!0,t)},I=function(t){return S?(i(t),T?R(t[0],t[1],A):R(t[0],t[1])):T?R(t,A):R(t)};if(P)h=t.iterator;else if(E)h=t;else{if(!(b=p(t)))throw v(u(t)+" is not iterable");if(c(b)){for(g=0,m=a(t);m>g;g++)if((O=I(t[g]))&&f(y,O))return O;return new d(!1)}h=s(t,b)}for(x=P?t.next:h.next;!(w=o(x,h)).done;){try{O=I(w.value)}catch(t){l(h,"throw",t)}if("object"==typeof O&&O&&f(y,O))return O}return new d(!1)}},9200:function(t,r,n){var e=n(3927),o=n(4905),i=n(3815);t.exports=function(t,r,n){var u,c;o(t);try{if(!(u=i(t,"return"))){if("throw"===r)throw n;return n}u=e(u,t)}catch(t){c=!0,u=t}if("throw"===r)throw n;if(c)throw u;return o(u),n}},501:function(t){t.exports={}},4821:function(t,r,n){var e=n(4479);t.exports=function(t){return e(t.length)}},7192:function(t,r,n){var e=n(5061),o=n(6291),i=n(8382),u=n(1502),c=n(9873).CONFIGURABLE,a=n(685),f=n(684),s=f.enforce,p=f.get,l=Object.defineProperty,v=u&&!e((function(){return 8!==l((function(){}),"length",{value:8}).length})),d=String(String).split("String"),y=t.exports=function(t,r,n){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(r="get "+r),n&&n.setter&&(r="set "+r),(!i(t,"name")||c&&t.name!==r)&&(u?l(t,"name",{value:r,configurable:!0}):t.name=r),v&&n&&i(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?u&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=s(t);return i(e,"source")||(e.source=d.join("string"==typeof r?r:"")),t};Function.prototype.toString=y((function(){return o(this)&&p(this).source||a(this)}),"toString")},1367:function(t){var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?n:r)(e)}},3690:function(t,r,n){var e,o,i,u,c,a,f,s,p=n(5001),l=n(9918),v=n(8117).f,d=n(8680).set,y=n(311),h=n(1368),b=n(4832),g=n(566),m=p.MutationObserver||p.WebKitMutationObserver,O=p.document,x=p.process,w=p.Promise,j=v(p,"queueMicrotask"),S=j&&j.value;S||(e=function(){var t,r;for(g&&(t=x.domain)&&t.exit();o;){r=o.fn,o=o.next;try{r()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},y||g||b||!m||!O?!h&&w&&w.resolve?((f=w.resolve(void 0)).constructor=w,s=l(f.then,f),u=function(){s(e)}):g?u=function(){x.nextTick(e)}:(d=l(d,p),u=function(){d(e)}):(c=!0,a=O.createTextNode(""),new m(e).observe(a,{characterData:!0}),u=function(){a.data=c=!c})),t.exports=S||function(t){var r={fn:t,next:void 0};i&&(i.next=r),o||(o=r,u()),i=r}},7714:function(t,r,n){"use strict";var e=n(4933),o=TypeError,i=function(t){var r,n;this.promise=new t((function(t,e){if(void 0!==r||void 0!==n)throw o("Bad Promise constructor");r=t,n=e})),this.resolve=e(r),this.reject=e(n)};t.exports.f=function(t){return new i(t)}},6462:function(t,r,n){var e=n(1502),o=n(7788),i=n(5780),u=n(4905),c=n(1030),a=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",v="writable";r.f=e?i?function(t,r,n){if(u(t),r=c(r),u(n),"function"==typeof t&&"prototype"===r&&"value"in n&&v in n&&!n.writable){var e=s(t,r);e&&e.writable&&(t[r]=n.value,n={configurable:l in n?n.configurable:e.configurable,enumerable:p in n?n.enumerable:e.enumerable,writable:!1})}return f(t,r,n)}:f:function(t,r,n){if(u(t),r=c(r),u(n),o)try{return f(t,r,n)}catch(t){}if("get"in n||"set"in n)throw a("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},8117:function(t,r,n){var e=n(1502),o=n(3927),i=n(9265),u=n(6034),c=n(678),a=n(1030),f=n(8382),s=n(7788),p=Object.getOwnPropertyDescriptor;r.f=e?p:function(t,r){if(t=c(t),r=a(r),s)try{return p(t,r)}catch(t){}if(f(t,r))return u(!o(i.f,t,r),t[r])}},9219:function(t,r,n){var e=n(3855),o=n(2089).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},2822:function(t,r){r.f=Object.getOwnPropertySymbols},6282:function(t,r,n){var e=n(936);t.exports=e({}.isPrototypeOf)},3855:function(t,r,n){var e=n(936),o=n(8382),i=n(678),u=n(5029).indexOf,c=n(2499),a=e([].push);t.exports=function(t,r){var n,e=i(t),f=0,s=[];for(n in e)!o(c,n)&&o(e,n)&&a(s,n);for(;r.length>f;)o(e,n=r[f++])&&(~u(s,n)||a(s,n));return s}},9265:function(t,r){"use strict";var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!n.call({1:2},1);r.f=o?function(t){var r=e(this,t);return!!r&&r.enumerable}:n},2848:function(t,r,n){var e=n(936),o=n(4905),i=n(9076);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,n={};try{(t=e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),r=n instanceof Array}catch(t){}return function(n,e){return o(n),i(e),r?t(n,e):n.__proto__=e,n}}():void 0)},379:function(t,r,n){var e=n(3927),o=n(6291),i=n(2366),u=TypeError;t.exports=function(t,r){var n,c;if("string"===r&&o(n=t.toString)&&!i(c=e(n,t)))return c;if(o(n=t.valueOf)&&!i(c=e(n,t)))return c;if("string"!==r&&o(n=t.toString)&&!i(c=e(n,t)))return c;throw u("Can't convert object to primitive value")}},2466:function(t,r,n){var e=n(3425),o=n(936),i=n(9219),u=n(2822),c=n(4905),a=o([].concat);t.exports=e("Reflect","ownKeys")||function(t){var r=i.f(c(t)),n=u.f;return n?a(r,n(t)):r}},7040:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8410:function(t,r,n){var e=n(5001),o=n(7883),i=n(6291),u=n(1092),c=n(685),a=n(6802),f=n(6837),s=n(5065),p=n(13),l=n(2821),v=o&&o.prototype,d=a("species"),y=!1,h=i(e.PromiseRejectionEvent),b=u("Promise",(function(){var t=c(o),r=t!==String(o);if(!r&&66===l)return!0;if(p&&(!v.catch||!v.finally))return!0;if(!l||l<51||!/native code/.test(t)){var n=new o((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((n.constructor={})[d]=e,!(y=n.then((function(){}))instanceof e))return!0}return!r&&(f||s)&&!h}));t.exports={CONSTRUCTOR:b,REJECTION_EVENT:h,SUBCLASSING:y}},7883:function(t,r,n){var e=n(5001);t.exports=e.Promise},7504:function(t,r,n){var e=n(4905),o=n(2366),i=n(7714);t.exports=function(t,r){if(e(t),o(r)&&r.constructor===t)return r;var n=i.f(t);return(0,n.resolve)(r),n.promise}},3653:function(t,r,n){var e=n(7883),o=n(3165),i=n(8410).CONSTRUCTOR;t.exports=i||!o((function(t){e.all(t).then(void 0,(function(){}))}))},8791:function(t){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var r={item:t,next:null};this.head?this.tail.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=r},4475:function(t,r,n){var e=n(860),o=TypeError;t.exports=function(t){if(e(t))throw o("Can't call method on "+t);return t}},3126:function(t,r,n){"use strict";var e=n(3425),o=n(6462),i=n(6802),u=n(1502),c=i("species");t.exports=function(t){var r=e(t),n=o.f;u&&r&&!r[c]&&n(r,c,{configurable:!0,get:function(){return this}})}},606:function(t,r,n){var e=n(6462).f,o=n(8382),i=n(6802)("toStringTag");t.exports=function(t,r,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&e(t,i,{configurable:!0,value:r})}},1695:function(t,r,n){var e=n(6809),o=n(1050),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},9982:function(t,r,n){var e=n(5001),o=n(1756),i="__core-js_shared__",u=e[i]||o(i,{});t.exports=u},6809:function(t,r,n){var e=n(13),o=n(9982);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.26.1",mode:e?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},3571:function(t,r,n){var e=n(4905),o=n(8209),i=n(860),u=n(6802)("species");t.exports=function(t,r){var n,c=e(t).constructor;return void 0===c||i(n=e(c)[u])?r:o(n)}},5947:function(t,r,n){var e=n(2821),o=n(5061);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},8680:function(t,r,n){var e,o,i,u,c=n(5001),a=n(5494),f=n(9918),s=n(6291),p=n(8382),l=n(5061),v=n(2118),d=n(650),y=n(6009),h=n(7427),b=n(311),g=n(566),m=c.setImmediate,O=c.clearImmediate,x=c.process,w=c.Dispatch,j=c.Function,S=c.MessageChannel,P=c.String,E=0,T={},R="onreadystatechange";try{e=c.location}catch(t){}var A=function(t){if(p(T,t)){var r=T[t];delete T[t],r()}},I=function(t){return function(){A(t)}},M=function(t){A(t.data)},D=function(t){c.postMessage(P(t),e.protocol+"//"+e.host)};m&&O||(m=function(t){h(arguments.length,1);var r=s(t)?t:j(t),n=d(arguments,1);return T[++E]=function(){a(r,void 0,n)},o(E),E},O=function(t){delete T[t]},g?o=function(t){x.nextTick(I(t))}:w&&w.now?o=function(t){w.now(I(t))}:S&&!b?(u=(i=new S).port2,i.port1.onmessage=M,o=f(u.postMessage,u)):c.addEventListener&&s(c.postMessage)&&!c.importScripts&&e&&"file:"!==e.protocol&&!l(D)?(o=D,c.addEventListener("message",M,!1)):o=R in y("script")?function(t){v.appendChild(y("script")).onreadystatechange=function(){v.removeChild(this),A(t)}}:function(t){setTimeout(I(t),0)}),t.exports={set:m,clear:O}},6971:function(t,r,n){var e=n(9398),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},678:function(t,r,n){var e=n(2901),o=n(4475);t.exports=function(t){return e(o(t))}},9398:function(t,r,n){var e=n(1367);t.exports=function(t){var r=+t;return r!=r||0===r?0:e(r)}},4479:function(t,r,n){var e=n(9398),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},7615:function(t,r,n){var e=n(4475),o=Object;t.exports=function(t){return o(e(t))}},6973:function(t,r,n){var e=n(3927),o=n(2366),i=n(6448),u=n(3815),c=n(379),a=n(6802),f=TypeError,s=a("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var n,a=u(t,s);if(a){if(void 0===r&&(r="default"),n=e(a,t,r),!o(n)||i(n))return n;throw f("Can't convert object to primitive value")}return void 0===r&&(r="number"),c(t,r)}},1030:function(t,r,n){var e=n(6973),o=n(6448);t.exports=function(t){var r=e(t,"string");return o(r)?r:r+""}},8171:function(t,r,n){var e={};e[n(6802)("toStringTag")]="z",t.exports="[object z]"===String(e)},7073:function(t){var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},1050:function(t,r,n){var e=n(936),o=0,i=Math.random(),u=e(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},7558:function(t,r,n){var e=n(5947);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5780:function(t,r,n){var e=n(1502),o=n(5061);t.exports=e&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7427:function(t){var r=TypeError;t.exports=function(t,n){if(t<n)throw r("Not enough arguments");return t}},1899:function(t,r,n){var e=n(5001),o=n(6291),i=e.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},6802:function(t,r,n){var e=n(5001),o=n(6809),i=n(8382),u=n(1050),c=n(5947),a=n(7558),f=o("wks"),s=e.Symbol,p=s&&s.for,l=a?s:s&&s.withoutSetter||u;t.exports=function(t){if(!i(f,t)||!c&&"string"!=typeof f[t]){var r="Symbol."+t;c&&i(s,t)?f[t]=s[t]:f[t]=a&&p?p(r):l(r)}return f[t]}},2937:function(t,r,n){"use strict";var e=n(9638),o=n(2040).left,i=n(9020),u=n(2821),c=n(566);e({target:"Array",proto:!0,forced:!i("reduce")||!c&&u>79&&u<83},{reduce:function(t){var r=arguments.length;return o(this,t,r,r>1?arguments[1]:void 0)}})},8547:function(t,r,n){"use strict";var e=n(9638),o=n(936),i=n(119),u=o([].reverse),c=[1,2];e({target:"Array",proto:!0,forced:String(c)===String(c.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),u(this)}})},5370:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(4933),u=n(7714),c=n(7040),a=n(8971);e({target:"Promise",stat:!0,forced:n(3653)},{all:function(t){var r=this,n=u.f(r),e=n.resolve,f=n.reject,s=c((function(){var n=i(r.resolve),u=[],c=0,s=1;a(t,(function(t){var i=c++,a=!1;s++,o(n,r,t).then((function(t){a||(a=!0,u[i]=t,--s||e(u))}),f)})),--s||e(u)}));return s.error&&f(s.value),n.promise}})},4139:function(t,r,n){"use strict";var e=n(9638),o=n(13),i=n(8410).CONSTRUCTOR,u=n(7883),c=n(3425),a=n(6291),f=n(5850),s=u&&u.prototype;if(e({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&a(u)){var p=c("Promise").prototype.catch;s.catch!==p&&f(s,"catch",p,{unsafe:!0})}},9688:function(t,r,n){"use strict";var e,o,i,u=n(9638),c=n(13),a=n(566),f=n(5001),s=n(3927),p=n(5850),l=n(2848),v=n(606),d=n(3126),y=n(4933),h=n(6291),b=n(2366),g=n(2814),m=n(3571),O=n(8680).set,x=n(3690),w=n(3455),j=n(7040),S=n(8791),P=n(684),E=n(7883),T=n(8410),R=n(7714),A="Promise",I=T.CONSTRUCTOR,M=T.REJECTION_EVENT,D=T.SUBCLASSING,F=P.getterFor(A),C=P.set,_=E&&E.prototype,N=E,k=_,L=f.TypeError,U=f.document,K=f.process,G=R.f,z=G,q=!!(U&&U.createEvent&&f.dispatchEvent),B="unhandledrejection",H=function(t){var r;return!(!b(t)||!h(r=t.then))&&r},J=function(t,r){var n,e,o,i=r.value,u=1==r.state,c=u?t.ok:t.fail,a=t.resolve,f=t.reject,p=t.domain;try{c?(u||(2===r.rejection&&Q(r),r.rejection=1),!0===c?n=i:(p&&p.enter(),n=c(i),p&&(p.exit(),o=!0)),n===t.promise?f(L("Promise-chain cycle")):(e=H(n))?s(e,n,a,f):a(n)):f(i)}catch(t){p&&!o&&p.exit(),f(t)}},W=function(t,r){t.notified||(t.notified=!0,x((function(){for(var n,e=t.reactions;n=e.get();)J(n,t);t.notified=!1,r&&!t.rejection&&Y(t)})))},V=function(t,r,n){var e,o;q?((e=U.createEvent("Event")).promise=r,e.reason=n,e.initEvent(t,!1,!0),f.dispatchEvent(e)):e={promise:r,reason:n},!M&&(o=f["on"+t])?o(e):t===B&&w("Unhandled promise rejection",n)},Y=function(t){s(O,f,(function(){var r,n=t.facade,e=t.value;if($(t)&&(r=j((function(){a?K.emit("unhandledRejection",e,n):V(B,n,e)})),t.rejection=a||$(t)?2:1,r.error))throw r.value}))},$=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){s(O,f,(function(){var r=t.facade;a?K.emit("rejectionHandled",r):V("rejectionhandled",r,t.value)}))},X=function(t,r,n){return function(e){t(r,e,n)}},Z=function(t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,W(t,!0))},tt=function(t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===r)throw L("Promise can't be resolved itself");var e=H(r);e?x((function(){var n={done:!1};try{s(e,r,X(tt,n,t),X(Z,n,t))}catch(r){Z(n,r,t)}})):(t.value=r,t.state=1,W(t,!1))}catch(r){Z({done:!1},r,t)}}};if(I&&(k=(N=function(t){g(this,k),y(t),s(e,this);var r=F(this);try{t(X(tt,r),X(Z,r))}catch(t){Z(r,t)}}).prototype,(e=function(t){C(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=p(k,"then",(function(t,r){var n=F(this),e=G(m(this,N));return n.parent=!0,e.ok=!h(t)||t,e.fail=h(r)&&r,e.domain=a?K.domain:void 0,0==n.state?n.reactions.add(e):x((function(){J(e,n)})),e.promise})),o=function(){var t=new e,r=F(t);this.promise=t,this.resolve=X(tt,r),this.reject=X(Z,r)},R.f=G=function(t){return t===N||undefined===t?new o(t):z(t)},!c&&h(E)&&_!==Object.prototype)){i=_.then,D||p(_,"then",(function(t,r){var n=this;return new N((function(t,r){s(i,n,t,r)})).then(t,r)}),{unsafe:!0});try{delete _.constructor}catch(t){}l&&l(_,k)}u({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:N}),v(N,A,!1,!0),d(A)},3045:function(t,r,n){n(9688),n(5370),n(4139),n(7508),n(5858),n(1856)},7508:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(4933),u=n(7714),c=n(7040),a=n(8971);e({target:"Promise",stat:!0,forced:n(3653)},{race:function(t){var r=this,n=u.f(r),e=n.reject,f=c((function(){var u=i(r.resolve);a(t,(function(t){o(u,r,t).then(n.resolve,e)}))}));return f.error&&e(f.value),n.promise}})},5858:function(t,r,n){"use strict";var e=n(9638),o=n(3927),i=n(7714);e({target:"Promise",stat:!0,forced:n(8410).CONSTRUCTOR},{reject:function(t){var r=i.f(this);return o(r.reject,void 0,t),r.promise}})},1856:function(t,r,n){"use strict";var e=n(9638),o=n(3425),i=n(13),u=n(7883),c=n(8410).CONSTRUCTOR,a=n(7504),f=o("Promise"),s=i&&!c;e({target:"Promise",stat:!0,forced:i||c},{resolve:function(t){return a(s&&this===f?u:this,t)}})},7400:function(t){"use strict";t.exports=r},8156:function(r){"use strict";r.exports=t}},e={};function o(t){var r=e[t];if(void 0!==r)return r.exports;var i=e[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.d=function(t,r){for(var n in r)o.o(r,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";function t(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function r(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function n(t,n){if(t){if("string"==typeof t)return r(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}function e(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,r)||n(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}o.r(i),o.d(i,{GlobalProvider:function(){return P},SessionProvider:function(){return N},Strategy:function(){return m},createSessionKey:function(){return y},useIsFetching:function(){return _},useMutation:function(){return F},useQuery:function(){return D},useSession:function(){return C},withSessionProvider:function(){return k}});o(2937),o(8547),o(3045);var c=o(8156),a=o(7400);function f(t,r){if(null==t)return{};var n,e,o=function(t,r){if(null==t)return{};var n,e,o={},i=Object.keys(t);for(e=0;e<i.length;e++)n=i[e],r.indexOf(n)>=0||(o[n]=t[n]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(e=0;e<i.length;e++)n=i[e],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var s=["version"];function p(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function l(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?p(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function v(t){var r=t.version,n=f(t,s),e=function(t){return l(l({},t),{},{version:r})};return{state:n,version:r||0,setState:function(r){return e("function"!=typeof r?r:r(t))},trigger:function(){return l(l({},t),{},{version:(r||0)+1})}}}var d=function(t){return l({data:void 0,isError:!1,isFetching:!1,abandon:!1,triggerType:void 0,loaded:!1},t)};function y(t){var r={implemented:!1},n=(0,a.factory)(v,d());return n.effect=[function(){return t.apply(void 0,arguments)}],n.implement=function(t){r.implemented||(n.effect[0]=t,r.implemented=!0)},n}function h(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function b(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?h(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):h(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var g=function(t,r){return!!Object.is(t,r)||null!=t&&null!=r&&JSON.stringify(t)===JSON.stringify(r)};var m={debounce:function(t){var r="number"==typeof t?t:t.duration;return function(t){var n=t.current,e=t.runner,o=t.store;if(o.current){var i=o.current,u=i.id,c=i.resolve;o.current=void 0,clearTimeout(u),c(b(b({},n()),{},{abandon:!0}))}return new Promise((function(t){var n=setTimeout((function(){t(e())}),r);o.current={id:n,resolve:t}}))}},once:function(){return function(t){var r=t.current,n=t.runner,e=t.store;return e.current?new Promise((function(t){t(b(b({},r()),{},{abandon:!0}))})):(e.current=!0,n().then((function(t){return t.isError&&(e.current=!1),t})))}},error:function(t,r){var n=(r||{}).withAbandoned;return function(r){return(0,r.runner)().then((function(r){return!r.isError||r.isErrorProcessed||r.abandon&&!n?r:(t(r.error),b(b({},r),{},{isErrorProcessed:!0}))}))}},success:function(t,r){var n=(r||{}).withAbandoned;return function(r){return(0,r.runner)().then((function(r){return r.isError||r.abandon&&!n||t(r.data),r}))}},memo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;return function(r){var n=r.runner,e=r.current;return n().then((function(r){var n=e();return("function"==typeof t?t(n.data,r.data):n.data===r.data)?b(b({},r),{},{data:n.data}):r}))}}};function O(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function x(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var w=[],j=(0,a.factory)((function(t){return{isFetching:t.length>0,startFetching:function(r){return t.some((function(t){return t===r}))?t:t.concat(r)},endFetching:function(r){return t.some((function(t){return t===r}))?t.filter((function(t){return t!==r})):t}}}),w),S=(0,c.createContext)(null);function P(t){var r=t.value,n=t.children;return(0,a.useIsModelMatchedInStore)(j)?(0,c.createElement)(S.Provider,{value:r||null},n):(0,c.createElement)(a.ModelProvider,{value:j},(0,c.createElement)(S.Provider,{value:r||null},n))}function E(){return(0,c.useContext)(S)}function T(t,r){if(!("function"==typeof t.pipe))return[v,t,r];var n=u(t.effect,2);return[t,n[0],n[1]||r]}function R(t){return function(r){var n=t(r);if(!n||"function"!=typeof n.then)throw new Error("The callback have to return a promise object.");return n.then((function(t){return{data:t,error:void 0,isError:!1}}),(function(t){return{error:t,isError:!0}}))}}function A(t,r){var n=function(t){return t.runner()};return function(o){return e(r).reverse().reduce((function(r,n,e){var o=t[e]||{current:void 0};return function(t){if(null==n)return r(t);return n(x(x({},t),{},{store:o,runner:function(){return r(t)}}))}}),n)(o).then((function(t){var r=o.current().loaded,n=t.abandon,e=t.isError,i=t.isFetching,u=r||!n&&!e&&!i;return x(x({},t),{},{loaded:u})}))}}function I(t){return Array.isArray(t)?t:[t]}function M(t){var r=(0,c.useRef)(t);r.current=t;var n=(0,c.useRef)((function(){return r.current.apply(r,arguments)}));return n.current}function D(t,r){var n=u(T(t,Array.isArray(r)?{variables:r}:r),3),o=n[0],i=n[1],f=n[2],s=f||{},p=s.variables,l=s.deps,y=s.triggerOn,h=void 0===y?["mount","update","manual"]:y,b=s.manual,g=s.strategy,m=s.defaultData,O=Object.prototype.hasOwnProperty.call(f||{},"defaultData"),S=o===v?[o,d(O?{data:m,loaded:!0}:void 0)]:O?[o,d({data:m,loaded:!0})]:[o],P=a.useModel.apply(void 0,e(S)),D=(0,a.useRealtimeInstance)(P),F=(0,a.useModel)(j,w,{autoLink:!0}),C=F.startFetching,_=F.endFetching,N=(E()||{}).strategy,k=!l&&!p||b?["manual"]:h,L=I(g),U=N?N(L,"query"):L,K=R((function(t){return i.apply(void 0,e(t||p||[]))})),G=(0,c.useRef)(!0),z=(0,c.useRef)({}),q=(0,c.useRef)(U.map((function(){return{current:void 0}}))),B=(0,c.useRef)(0),H=function(t,r){var n=B.current+1;B.current=n;var e=D.state;return(0,D.setState)(x(x({},e),{},{isFetching:!0,fetchingKey:z.current,triggerType:t})),C(z.current),K(r).then((function(r){var e=n!==B.current;return x(x(x({},D.state),r),{},{abandon:e,isFetching:!1,fetchingKey:void 0,triggerType:t})}))},J=function(t,r,n){var e={current:function(){return D.state},variables:n||p||[],runner:function(){return t(r,n)},store:q};return A(q.current,U)(e)},W=function(t){var r="manual";return k.indexOf(r)<0?new Promise((function(t){t(x(x({},D.state),{},{abandon:!0}))})):J(H,r,t).then((function(t){return t.abandon||(D.setState(t),_(z.current)),t}))},V=M((function(){return W()})),Y=M((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W(r)})),$=l||p||[];(0,c.useEffect)((function(){var t=G.current;G.current=!1;var r=D.state.fetchingKey;r&&r!==z.current||function(t){var r=D.state.fetchingKey;if(!r||r===z.current){var n=t?"mount":"update";k.indexOf(n)<0||J(H,n).then((function(t){return t.abandon||(D.setState(t),_(z.current)),t}))}}(t)}),e($));var Q=(0,c.useRef)(D.version);return(0,c.useEffect)((function(){if(Q.current!==P.version){Q.current=P.version;var t=D.state.fetchingKey;t&&t!==z.current||W()}}),[P.version]),(0,c.useEffect)((function(){return function(){_(z.current)}}),[]),[P.state,V,Y]}function F(t,r){var n=u(T(t,Array.isArray(r)?{variables:r}:r),3),o=n[0],i=n[1],f=n[2],s=f||{},p=s.variables,l=s.strategy,y=s.defaultData,h=s.deps,b=s.triggerOn,g=void 0===b?["manual"]:b,m=Object.prototype.hasOwnProperty.call(f||{},"defaultData"),O=o===v?[o,d(m?{data:y,loaded:!0}:void 0)]:m?[o,d({data:y,loaded:!0})]:[o],S=a.useModel.apply(void 0,e(O)),P=(0,a.useRealtimeInstance)(S),D=(0,a.useModel)(j,w,{autoLink:!0}),F=D.startFetching,C=D.endFetching,_=(E()||{}).strategy,N=I(l),k=_?_(N,"mutation"):N,L=R((function(t){return i.apply(void 0,e(t||p||[]))})),U=(0,c.useRef)(k.map((function(){return{current:void 0}}))),K=(0,c.useRef)(!0),G=(0,c.useRef)({}),z=(0,c.useRef)(!1),q=function(t,r){if(z.current)return new Promise((function(r){r(x(x({},P.state),{},{abandon:!0,triggerType:t}))}));z.current=!0;var n=P.state,e=P.setState;return F(G.current),e(x(x({},n),{},{isFetching:!0,fetchingKey:G.current,triggerType:t})),L(r).then((function(r){return z.current=!1,x(x(x({},P.state),r),{},{isFetching:!1,fetchingKey:void 0,triggerType:t})}))},B=function(t,r,n){var e={current:function(){return P.state},variables:n||p||[],runner:function(){return t(r,n)},store:U};return A(U.current,k)(e)},H=function(t){var r="manual";return g.indexOf(r)<0?new Promise((function(t){t(x(x({},P.state),{},{abandon:!0}))})):B(q,r,t).then((function(t){return t.abandon||(P.setState(t),C(G.current)),t}))},J=M((function(){return H()})),W=M((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H(r)})),V=(0,c.useRef)(S.version),Y=h||p||[];return(0,c.useEffect)((function(){var t=K.current;K.current=!1;var r=P.state.fetchingKey;r&&r!==G.current||function(t){var r=P.state.fetchingKey;if(!r||r===G.current){var n=t?"mount":"update";g.indexOf(n)<0||B(q,n).then((function(t){return t.abandon||(P.setState(t),C(G.current)),t}))}}(t)}),e(Y)),(0,c.useEffect)((function(){if(V.current!==S.version){V.current=S.version;var t=P.state.fetchingKey;t&&t!==G.current||H()}}),[S.version]),(0,c.useEffect)((function(){return function(){C(G.current)}}),[]),[S.state,J,W]}function C(t,r){var n=(0,a.useSelector)(t,(function(t){return[t.state,t.trigger]})),e=(r||{}).loaded,o=u(n,1)[0].loaded;if(e&&!o)throw new Error("The session is not loaded yet, check config, and set {loaded: undefined}.");return n}function _(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var e=(0,c.useMemo)((function(){return r.some((function(t){return t.isFetching}))}),r),o=(0,a.useIsModelMatchedInStore)(j),i=(0,a.useModel)(j,w,{autoLink:!0}),u=i.isFetching;if(!o&&!r.length)throw new Error("You should provide a `GlobalRefreshProvider` to support a global `isFetching` detect.");return o&&!r.length?u:e}var N=a.ModelProvider,k=a.withModelProvider}(),i}()}));

@@ -178,4 +178,4 @@ import { StoreKeys, StoreKey } from '@airma/react-state';

export declare const GlobalRefreshProvider: FC<{
value: GlobalConfig;
export declare const GlobalProvider: FC<{
value?: GlobalConfig;
children?: ReactNode;

@@ -182,0 +182,0 @@ }>;

{
"private": false,
"name": "@airma/react-effect",
"version": "17.0.0",
"version": "17.0.1",
"description": "This is a react async state management tool",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc