Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-saga

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/chunk-cbceff6d.js

2

dist/redux-saga-core.esmodules-browsers.js

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

import{a as t,b as e,c as n,d as c,e as a,f as s,g as r,h as i,i as u,j as f,k as l,l as d,m as h,n as g,o as p,p as v,q as y,r as b,s as m,t as k,u as E,v as x,w as j,x as S,y as R,z as M,A as T,B as w,C as A,D as $,E as C,F as O,G as N,H as I,I as D,J as q,K as z,L,M as P,N as F,O as G,P as _,Q as B,R as H,S as J,T as K,U as Q,V as U,W as V,X as W,Y as X,Z as Y,_ as Z,$ as tt}from"./chunk-18a48331.js";export{a9 as buffers,o as CANCEL,aa as SAGA_LOCATION,ab as detach}from"./chunk-18a48331.js";const et=[];let nt=0;function ct(t){try{st(),t()}finally{rt()}}function ot(t){et.push(t),nt||(st(),it())}function at(t){try{return st(),t()}finally{it()}}function st(){nt++}function rt(){nt--}function it(){let t;for(rt();!nt&&void 0!==(t=et.shift());)ct(t)}const ut=t=>e=>t.some(t=>gt(t)(e)),ft=t=>e=>t(e),lt=t=>e=>e.type===t+"",dt=t=>e=>e.type===t,ht=()=>t;function gt(t){const o="*"===t?ht:e(t)?lt:n(t)?ut:c(t)?lt:a(t)?ft:s(t)?dt:null;if(null===o)throw Error(`invalid pattern: ${t}`);return o(t)}const pt={type:r},vt=t=>t&&t.type===r;function yt(t){void 0===t&&(t=i());let e=!1,n=[];return{take:function(c){e&&t.isEmpty()?c(pt):t.isEmpty()?(n.push(c),c.cancel=(()=>{h(n,c)})):c(t.take())},put:function(c){if(e)return;if(0===n.length)return t.put(c);n.shift()(c)},flush:function(n){e&&t.isEmpty()?n(pt):n(t.flush())},close:function(){if(e)return;e=!0;const t=n;n=[];for(let e=0,n=t.length;n>e;e++)(0,t[e])(pt)}}}function bt(t,e){void 0===e&&(e=u());let n,c=!1;const o=yt(e),s=()=>{c||(c=!0,a(n)&&n(),o.close())};return n=t(t=>{vt(t)?s():o.put(t)}),n=f(n),c&&n(),{take:o.take,flush:o.flush,close:s}}function mt(){let t=!1,e=[],n=e;const c=()=>{n===e&&(n=e.slice())},o=()=>{t=!0;const c=e=n;n=[],c.forEach(t=>{t(pt)})};return{[l]:!0,put(c){if(t)return;if(vt(c))return void o();const a=e=n;for(let t=0,e=a.length;e>t;t++){const e=a[t];e[d](c)&&(e.cancel(),e(c))}},take(e,o){void 0===o&&(o=ht),t?e(pt):(e[d]=o,c(),n.push(e),e.cancel=f(()=>{c(),h(n,e)}))},close:o}}function kt(){const t=mt(),e=t.put;return t.put=(t=>{t[g]?e(t):ot(()=>{e(t)})}),t}!function(t){var e,n=t.Symbol;"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var Et=function(){return Math.random().toString(36).substring(7).split("").join(".")};Et(),Et();const xt=0,jt=1,St=2,Rt=3;function Mt(t,e){const n=t[p];a(n)&&(e.cancel=n),t.then(e,t=>{e(t,!0)})}let Tt=0;var wt=()=>++Tt;function At(t){t.isRunning()&&t.cancel()}const $t={[v]:function(t,e,n){let c=e.channel,o=void 0===c?t.channel:c,a=e.pattern,s=e.maybe;const r=t=>{t instanceof Error?n(t,!0):!vt(t)||s?n(t):n(G)};try{o.take(r,O(a)?gt(a):null)}catch(t){return void n(t,!0)}n.cancel=r.cancel},[y]:function(t,e,n){let c=e.channel,o=e.action,a=e.resolve;ot(()=>{let e;try{e=(c?c.put:t.dispatch)(o)}catch(t){return void n(t,!0)}a&&C(e)?Mt(e,n):n(e)})},[b]:function(t,e,c,o){let a=o.digestEffect;const s=Tt,r=Object.keys(e);if(0===r.length)return void c(n(e)?[]:{});const i=q(e,c);r.forEach(t=>{a(e[t],s,i[t],t)})},[m]:function(t,e,c,o){let a=o.digestEffect;const s=Tt,r=Object.keys(e),i=n(e)?L(r.length):{},u={};let f=!1;r.forEach(t=>{const e=(e,n)=>{f||(n||B(e)?(c.cancel(),c(e,n)):(c.cancel(),f=!0,i[t]=e,c(i)))};e.cancel=D,u[t]=e}),c.cancel=(()=>{f||(f=!0,r.forEach(t=>u[t].cancel()))}),r.forEach(t=>{f||a(e[t],s,u[t],t)})},[k]:function(t,e,n,c){let o=e.context,a=e.fn,s=e.args,r=c.task;try{const e=a.apply(o,s);if(C(e))return void Mt(e,n);if(N(e))return void Gt(t,e,r.context,Tt,I(a),!1,n);n(e)}catch(t){n(t,!0)}},[E]:function(t,e,n){let c=e.context,o=e.fn,a=e.args;try{const t=(t,e)=>{_(t)?n(e):n(t,!0)};o.apply(c,a.concat(t)),t.cancel&&(n.cancel=t.cancel)}catch(t){n(t,!0)}},[x]:function(t,e,n,c){let o=e.fn,a=e.detached,s=c.task;const r=function(t){let e=t.context,n=t.fn,c=t.args;try{const t=n.apply(e,c);return N(t)?t:F(function(e){return void 0===e&&(e=t),{value:e,done:!C(e)}})}catch(t){return F(()=>{throw t})}}({context:e.context,fn:o,args:e.args}),i=function(t,e){return t.isSagaIterator?{name:t.meta.name}:I(e)}(r,o);at(()=>{const e=Gt(t,r,s.context,Tt,i,a,D);a?n(e):e.isRunning()?(s.queue.addTask(e),n(e)):e.isAborted()?s.queue.abort(e.error()):n(e)})},[j]:function(t,e,c,o){let a=o.task;const s=(t,e)=>{if(t.isRunning()){const n={task:a,cb:e};e.cancel=(()=>{h(t.joiners,n)}),t.joiners.push(n)}else t.isAborted()?e(t.error(),!0):e(t.result())};if(n(e)){if(0===e.length)return void c([]);const t=q(e,c);e.forEach((e,n)=>{s(e,t[n])})}else s(e,c)},[S]:function(t,e,c,o){e===z?At(o.task):n(e)?e.forEach(At):At(e),c()},[R]:function(t,e,n){let c=e.selector,o=e.args;try{n(c(t.getState(),...o))}catch(t){n(t,!0)}},[M]:function(t,e,n){let c=e.pattern;const o=yt(e.buffer),a=gt(c),s=e=>{vt(e)||t.channel.take(s,a),o.put(e)},r=o.close;o.close=(()=>{s.cancel(),r()}),t.channel.take(s,a),n(o)},[T]:function(t,e,n,c){n(c.task.isCancelled())},[w]:function(t,e,n){e.flush(n)},[A]:function(t,e,n,c){n(c.task.context[e])},[$]:function(t,e,n,c){P(c.task.context,e),n()}};function Ct(t,e){return`${t}?${e}`}function Ot(t){const e=t.name,n=t.location;return n?`${e} ${Ct(n.fileName,n.lineNumber)}`:e}function Nt(t){const e=H(t=>t.cancelledTasks,t);return e.length?["Tasks cancelled due to error:",...e].join("\n"):""}let It=null;const Dt=[],qt=t=>{t.crashedEffect=It,Dt.push(t)},zt=()=>{It=null,Dt.length=0},Lt=t=>{It=t},Pt=()=>{const t=Dt[0],e=Dt.slice(1),n=t.crashedEffect?function(t){const e=J(t);if(e)return`${e.code} ${Ct(e.fileName,e.lineNumber)}`;return""}(t.crashedEffect):null;return[`The above error occurred in task ${Ot(t.meta)}${n?` \n when executing effect ${n}`:""}`,...e.map(t=>` created by ${Ot(t.meta)}`),Nt(Dt)].join("\n")};function Ft(t,e,n,c,o,a,s){let r,i,u=xt,f=null;const l=[],d=Object.create(n),g=function(t,e,n){let c,o=[],a=!1;function s(t){e(),i(),n(t,!0)}function r(e){o.push(e),e.cont=((r,i)=>{a||(h(o,e),e.cont=D,i?s(r):(e===t&&(c=r),o.length||(a=!0,n(c))))})}function i(){a||(a=!0,o.forEach(t=>{t.cont=D,t.cancel()}),o=[])}return r(t),{addTask:r,cancelAll:i,abort:s,getTasks:()=>o}}(e,function(){l.push(...g.getTasks().map(t=>t.meta.name))},p);function p(e,n){if(n){if(u=St,qt({meta:o,cancelledTasks:l}),v.isRoot){const n=Pt();zt(),t.onError(e,{sagaStack:n})}i=e,f&&f.reject(e)}else e===Q?u=jt:u!==jt&&(u=Rt),r=e,f&&f.resolve(e);v.cont(e,n),v.joiners.forEach(t=>{t.cb(e,n)}),v.joiners=null}const v={[K]:!0,id:c,meta:o,isRoot:a,context:d,joiners:[],queue:g,cancel:function(){u===xt&&(u=jt,g.cancelAll(),p(Q,!1))},cont:s,end:p,setContext:function(t){P(d,t)},toPromise:function(){return f?f.promise:(f=function(){const t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}(),u===St?f.reject(i):u!==xt&&f.resolve(r),f.promise)},isRunning:()=>u===xt,isCancelled:()=>u===jt||u===xt&&e.status===jt,isAborted:()=>u===St,result:()=>r,error:()=>i};return v}function Gt(t,e,n,c,o,s,r){const i=t.finalizeRunEffect(function(e,n,c){if(C(e))Mt(e,c);else if(N(e))Gt(t,e,f.context,n,o,!1,c);else if(e&&e[W]){const n=$t[e.type];n(t,e.payload,c,l)}else c(e)});d.cancel=D;const u={meta:o,cancel:function(){u.status===xt&&(u.status=jt,d(Q))},status:xt},f=Ft(t,u,n,c,o,s,r),l={task:f,digestEffect:h};return r.cancel=f.cancel,d(),f;function d(t,n){try{let o;n?(o=e.throw(t),zt()):U(t)?(u.status=jt,d.cancel(),o=a(e.return)?e.return(Q):{done:!0,value:Q}):o=V(t)?a(e.return)?e.return():{done:!0}:e.next(t),o.done?(u.status!==jt&&(u.status=Rt),u.cont(o.value)):h(o.value,c,d)}catch(t){if(u.status===jt)throw t;u.status=St,u.cont(t,!0)}}function h(e,n,c,o){void 0===o&&(o="");const a=wt();let s;function r(n,o){s||(s=!0,c.cancel=D,t.sagaMonitor&&(o?t.sagaMonitor.effectRejected(a,n):t.sagaMonitor.effectResolved(a,n)),o&&Lt(e),c(n,o))}t.sagaMonitor&&t.sagaMonitor.effectTriggered({effectId:a,parentEffectId:n,label:o,effect:e}),r.cancel=D,c.cancel=(()=>{s||(s=!0,r.cancel(),r.cancel=D,t.sagaMonitor&&t.sagaMonitor.effectCancelled(a))}),i(e,a,r)}}function _t(t,e){let n=t.channel,c=void 0===n?kt():n,o=t.dispatch,a=t.getState,s=t.context,r=void 0===s?{}:s,i=t.sagaMonitor,u=t.effectMiddlewares,f=t.onError,l=void 0===f?Y:f;for(var d=arguments.length,h=Array(d>2?d-2:0),g=2;d>g;g++)h[g-2]=arguments[g];const p=e(...h),v=wt();let y;if(i&&(i.rootSagaStarted=i.rootSagaStarted||D,i.effectTriggered=i.effectTriggered||D,i.effectResolved=i.effectResolved||D,i.effectRejected=i.effectRejected||D,i.effectCancelled=i.effectCancelled||D,i.actionDispatched=i.actionDispatched||D,i.rootSagaStarted({effectId:v,saga:e,args:h})),u){const t=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}(...u);y=(e=>(n,c,o)=>{return t(t=>e(t,c,o))(n)})}else y=Z;const b={channel:c,dispatch:X(o),getState:a,sagaMonitor:i,onError:l,finalizeRunEffect:y};return at(()=>{const t=Gt(b,p,r,v,I(e),!0,D);return i&&i.effectResolved(v,t),t})}export default function(t){void 0===t&&(t={});let e,n=t,c=n.context,o=void 0===c?{}:c,a=n.channel,s=void 0===a?kt():a,r=n.sagaMonitor,i=function(t,e){if(null==t)return{};var n,c,o={},a=Object.keys(t);for(c=0;a.length>c;c++)0>e.indexOf(n=a[c])&&(o[n]=t[n]);return o}(n,["context","channel","sagaMonitor"]);function u(t){return e=_t.bind(null,tt({},i,{context:o,channel:s,dispatch:t.dispatch,getState:t.getState,sagaMonitor:r})),t=>e=>{r&&r.actionDispatched&&r.actionDispatched(e);const n=t(e);return s.put(e),n}}return u.run=function(){return e(...arguments)},u.setContext=(t=>{P(o,t)}),u}export{_t as runSaga,pt as END,vt as isEnd,bt as eventChannel,yt as channel,mt as multicastChannel,kt as stdChannel};
import{a as t,b as e,c as n,d as c,e as a,f as s,g as r,h as i,i as f,j as l,k as u,l as d,m as h,n as g,o as p,p as v,q as b,r as y,s as m,t as k,u as E,v as x,w as j,x as S,y as R,z as M,A as T,B as w,C as A,D as $,E as C,F as O,G as N,H as I,I as D,J as q,K as z,L,M as P,N as F,O as G,P as _,Q as B,R as H,S as J,T as K,U as Q,V as U,W as V,X as W,Y as X,Z as Y,_ as Z,$ as tt}from"./chunk-cbceff6d.js";export{a9 as buffers,o as CANCEL,aa as SAGA_LOCATION,ab as detach}from"./chunk-cbceff6d.js";const et=[];let nt=0;function ct(t){try{st(),t()}finally{rt()}}function ot(t){et.push(t),nt||(st(),it())}function at(t){try{return st(),t()}finally{it()}}function st(){nt++}function rt(){nt--}function it(){let t;for(rt();!nt&&void 0!==(t=et.shift());)ct(t)}const ft=t=>e=>t.some(t=>gt(t)(e)),lt=t=>e=>t(e),ut=t=>e=>e.type===t+"",dt=t=>e=>e.type===t,ht=()=>t;function gt(t){const o="*"===t?ht:e(t)?ut:n(t)?ft:c(t)?ut:a(t)?lt:s(t)?dt:null;if(null===o)throw Error(`invalid pattern: ${t}`);return o(t)}const pt={type:r},vt=t=>t&&t.type===r;function bt(t){void 0===t&&(t=i());let e=!1,n=[];return{take:function(c){e&&t.isEmpty()?c(pt):t.isEmpty()?(n.push(c),c.cancel=(()=>{h(n,c)})):c(t.take())},put:function(c){if(e)return;if(0===n.length)return t.put(c);n.shift()(c)},flush:function(n){e&&t.isEmpty()?n(pt):n(t.flush())},close:function(){if(e)return;e=!0;const t=n;n=[];for(let e=0,n=t.length;n>e;e++)(0,t[e])(pt)}}}function yt(t,e){void 0===e&&(e=f());let n,c=!1;const o=bt(e),s=()=>{c||(c=!0,a(n)&&n(),o.close())};return n=t(t=>{vt(t)?s():o.put(t)}),n=l(n),c&&n(),{take:o.take,flush:o.flush,close:s}}function mt(){let t=!1,e=[],n=e;const c=()=>{n===e&&(n=e.slice())},o=()=>{t=!0;const c=e=n;n=[],c.forEach(t=>{t(pt)})};return{[u]:!0,put(c){if(t)return;if(vt(c))return void o();const a=e=n;for(let t=0,e=a.length;e>t;t++){const e=a[t];e[d](c)&&(e.cancel(),e(c))}},take(e,o){void 0===o&&(o=ht),t?e(pt):(e[d]=o,c(),n.push(e),e.cancel=l(()=>{c(),h(n,e)}))},close:o}}function kt(){const t=mt(),e=t.put;return t.put=(t=>{t[g]?e(t):ot(()=>{e(t)})}),t}!function(t){var e,n=t.Symbol;"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var Et=function(){return Math.random().toString(36).substring(7).split("").join(".")};Et(),Et();const xt=0,jt=1,St=2,Rt=3;function Mt(t,e){const n=t[p];a(n)&&(e.cancel=n),t.then(e,t=>{e(t,!0)})}let Tt=0;var wt=()=>++Tt;function At(t){t.isRunning()&&t.cancel()}const $t={[v]:function(t,e,n){let c=e.channel,o=void 0===c?t.channel:c,a=e.pattern,s=e.maybe;const r=t=>{t instanceof Error?n(t,!0):!vt(t)||s?n(t):n(G)};try{o.take(r,O(a)?gt(a):null)}catch(t){return void n(t,!0)}n.cancel=r.cancel},[b]:function(t,e,n){let c=e.channel,o=e.action,a=e.resolve;ot(()=>{let e;try{e=(c?c.put:t.dispatch)(o)}catch(t){return void n(t,!0)}a&&C(e)?Mt(e,n):n(e)})},[y]:function(t,e,c,o){let a=o.digestEffect;const s=Tt,r=Object.keys(e);if(0===r.length)return void c(n(e)?[]:{});const i=q(e,c);r.forEach(t=>{a(e[t],s,i[t],t)})},[m]:function(t,e,c,o){let a=o.digestEffect;const s=Tt,r=Object.keys(e),i=n(e)?L(r.length):{},f={};let l=!1;r.forEach(t=>{const e=(e,n)=>{l||(n||B(e)?(c.cancel(),c(e,n)):(c.cancel(),l=!0,i[t]=e,c(i)))};e.cancel=D,f[t]=e}),c.cancel=(()=>{l||(l=!0,r.forEach(t=>f[t].cancel()))}),r.forEach(t=>{l||a(e[t],s,f[t],t)})},[k]:function(t,e,n,c){let o=e.context,a=e.fn,s=e.args,r=c.task;try{const e=a.apply(o,s);if(C(e))return void Mt(e,n);if(N(e))return void Gt(t,e,r.context,Tt,I(a),!1,n);n(e)}catch(t){n(t,!0)}},[E]:function(t,e,n){let c=e.context,o=e.fn,a=e.args;try{const t=(t,e)=>{_(t)?n(e):n(t,!0)};o.apply(c,a.concat(t)),t.cancel&&(n.cancel=t.cancel)}catch(t){n(t,!0)}},[x]:function(t,e,n,c){let o=e.fn,a=e.detached,s=c.task;const r=function(t){let e=t.context,n=t.fn,c=t.args;try{const t=n.apply(e,c);if(N(t))return t;let o=!1;return F(e=>o?{value:e,done:!0}:(o=!0,{value:t,done:!C(t)}))}catch(t){return F(()=>{throw t})}}({context:e.context,fn:o,args:e.args}),i=function(t,e){return t.isSagaIterator?{name:t.meta.name}:I(e)}(r,o);at(()=>{const e=Gt(t,r,s.context,Tt,i,a,D);a?n(e):e.isRunning()?(s.queue.addTask(e),n(e)):e.isAborted()?s.queue.abort(e.error()):n(e)})},[j]:function(t,e,c,o){let a=o.task;const s=(t,e)=>{if(t.isRunning()){const n={task:a,cb:e};e.cancel=(()=>{h(t.joiners,n)}),t.joiners.push(n)}else t.isAborted()?e(t.error(),!0):e(t.result())};if(n(e)){if(0===e.length)return void c([]);const t=q(e,c);e.forEach((e,n)=>{s(e,t[n])})}else s(e,c)},[S]:function(t,e,c,o){e===z?At(o.task):n(e)?e.forEach(At):At(e),c()},[R]:function(t,e,n){let c=e.selector,o=e.args;try{n(c(t.getState(),...o))}catch(t){n(t,!0)}},[M]:function(t,e,n){let c=e.pattern;const o=bt(e.buffer),a=gt(c),s=e=>{vt(e)||t.channel.take(s,a),o.put(e)},r=o.close;o.close=(()=>{s.cancel(),r()}),t.channel.take(s,a),n(o)},[T]:function(t,e,n,c){n(c.task.isCancelled())},[w]:function(t,e,n){e.flush(n)},[A]:function(t,e,n,c){n(c.task.context[e])},[$]:function(t,e,n,c){P(c.task.context,e),n()}};function Ct(t,e){return`${t}?${e}`}function Ot(t){const e=t.name,n=t.location;return n?`${e} ${Ct(n.fileName,n.lineNumber)}`:e}function Nt(t){const e=H(t=>t.cancelledTasks,t);return e.length?["Tasks cancelled due to error:",...e].join("\n"):""}let It=null;const Dt=[],qt=t=>{t.crashedEffect=It,Dt.push(t)},zt=()=>{It=null,Dt.length=0},Lt=t=>{It=t},Pt=()=>{const t=Dt[0],e=Dt.slice(1),n=t.crashedEffect?function(t){const e=J(t);if(e)return`${e.code} ${Ct(e.fileName,e.lineNumber)}`;return""}(t.crashedEffect):null;return[`The above error occurred in task ${Ot(t.meta)}${n?` \n when executing effect ${n}`:""}`,...e.map(t=>` created by ${Ot(t.meta)}`),Nt(Dt)].join("\n")};function Ft(t,e,n,c,o,a,s){let r,i,f=xt,l=null;const u=[],d=Object.create(n),g=function(t,e,n){let c,o=[],a=!1;function s(t){e(),i(),n(t,!0)}function r(e){o.push(e),e.cont=((r,i)=>{a||(h(o,e),e.cont=D,i?s(r):(e===t&&(c=r),o.length||(a=!0,n(c))))})}function i(){a||(a=!0,o.forEach(t=>{t.cont=D,t.cancel()}),o=[])}return r(t),{addTask:r,cancelAll:i,abort:s,getTasks:()=>o}}(e,function(){u.push(...g.getTasks().map(t=>t.meta.name))},p);function p(e,n){if(n){if(f=St,qt({meta:o,cancelledTasks:u}),v.isRoot){const n=Pt();zt(),t.onError(e,{sagaStack:n})}i=e,l&&l.reject(e)}else e===Q?f=jt:f!==jt&&(f=Rt),r=e,l&&l.resolve(e);v.cont(e,n),v.joiners.forEach(t=>{t.cb(e,n)}),v.joiners=null}const v={[K]:!0,id:c,meta:o,isRoot:a,context:d,joiners:[],queue:g,cancel:function(){f===xt&&(f=jt,g.cancelAll(),p(Q,!1))},cont:s,end:p,setContext:function(t){P(d,t)},toPromise:function(){return l?l.promise:(l=function(){const t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}(),f===St?l.reject(i):f!==xt&&l.resolve(r),l.promise)},isRunning:()=>f===xt,isCancelled:()=>f===jt||f===xt&&e.status===jt,isAborted:()=>f===St,result:()=>r,error:()=>i};return v}function Gt(t,e,n,c,o,s,r){const i=t.finalizeRunEffect(function(e,n,c){if(C(e))Mt(e,c);else if(N(e))Gt(t,e,l.context,n,o,!1,c);else if(e&&e[W]){const n=$t[e.type];n(t,e.payload,c,u)}else c(e)});d.cancel=D;const f={meta:o,cancel:function(){f.status===xt&&(f.status=jt,d(Q))},status:xt},l=Ft(t,f,n,c,o,s,r),u={task:l,digestEffect:h};return r.cancel=l.cancel,d(),l;function d(t,n){try{let o;n?(o=e.throw(t),zt()):U(t)?(f.status=jt,d.cancel(),o=a(e.return)?e.return(Q):{done:!0,value:Q}):o=V(t)?a(e.return)?e.return():{done:!0}:e.next(t),o.done?(f.status!==jt&&(f.status=Rt),f.cont(o.value)):h(o.value,c,d)}catch(t){if(f.status===jt)throw t;f.status=St,f.cont(t,!0)}}function h(e,n,c,o){void 0===o&&(o="");const a=wt();let s;function r(n,o){s||(s=!0,c.cancel=D,t.sagaMonitor&&(o?t.sagaMonitor.effectRejected(a,n):t.sagaMonitor.effectResolved(a,n)),o&&Lt(e),c(n,o))}t.sagaMonitor&&t.sagaMonitor.effectTriggered({effectId:a,parentEffectId:n,label:o,effect:e}),r.cancel=D,c.cancel=(()=>{s||(s=!0,r.cancel(),r.cancel=D,t.sagaMonitor&&t.sagaMonitor.effectCancelled(a))}),i(e,a,r)}}function _t(t,e){let n=t.channel,c=void 0===n?kt():n,o=t.dispatch,a=t.getState,s=t.context,r=void 0===s?{}:s,i=t.sagaMonitor,f=t.effectMiddlewares,l=t.onError,u=void 0===l?Y:l;for(var d=arguments.length,h=Array(d>2?d-2:0),g=2;d>g;g++)h[g-2]=arguments[g];const p=e(...h),v=wt();let b;if(i&&(i.rootSagaStarted=i.rootSagaStarted||D,i.effectTriggered=i.effectTriggered||D,i.effectResolved=i.effectResolved||D,i.effectRejected=i.effectRejected||D,i.effectCancelled=i.effectCancelled||D,i.actionDispatched=i.actionDispatched||D,i.rootSagaStarted({effectId:v,saga:e,args:h})),f){const t=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}(...f);b=(e=>(n,c,o)=>{return t(t=>e(t,c,o))(n)})}else b=Z;const y={channel:c,dispatch:X(o),getState:a,sagaMonitor:i,onError:u,finalizeRunEffect:b};return at(()=>{const t=Gt(y,p,r,v,I(e),!0,D);return i&&i.effectResolved(v,t),t})}export default function(t){void 0===t&&(t={});let e,n=t,c=n.context,o=void 0===c?{}:c,a=n.channel,s=void 0===a?kt():a,r=n.sagaMonitor,i=function(t,e){if(null==t)return{};var n,c,o={},a=Object.keys(t);for(c=0;a.length>c;c++)0>e.indexOf(n=a[c])&&(o[n]=t[n]);return o}(n,["context","channel","sagaMonitor"]);function f(t){return e=_t.bind(null,tt({},i,{context:o,channel:s,dispatch:t.dispatch,getState:t.getState,sagaMonitor:r})),t=>e=>{r&&r.actionDispatched&&r.actionDispatched(e);const n=t(e);return s.put(e),n}}return f.run=function(){return e(...arguments)},f.setContext=(t=>{P(o,t)}),f}export{_t as runSaga,pt as END,vt as isEnd,yt as eventChannel,bt as channel,mt as multicastChannel,kt as stdChannel};

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

import{N as e,a0 as t,d as a,e as n,a1 as r,a2 as o,a3 as f,a4 as s,a5 as c,a6 as u,a7 as l,a8 as q}from"./chunk-18a48331.js";export{ac as effectTypes,a1 as take,ad as takeMaybe,ae as put,af as putResolve,ag as all,a8 as race,a4 as call,ah as apply,ai as cps,a2 as fork,aj as spawn,ak as join,a3 as cancel,al as select,a5 as actionChannel,am as cancelled,an as flush,ao as getContext,ap as setContext,a7 as delay}from"./chunk-18a48331.js";const d=e=>({done:!0,value:e}),v={};function i(e){return t(e)?"channel":a(e)?e+"":n(e)?e.name:e+""}function x(t,a,n){let r,o,f,s=a;function c(e,a){if(s===v)return d(e);if(a&&!o)throw s=v,a;{r&&r(e);const n=a?t[o](a):t[s]();return f=n.effect,r=n.stateUpdater,o=n.errorState,(s=n.nextState)===v?d(e):f}}return e(c,e=>c(null,e),n)}function h(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),f=2;a>f;f++)n[f-2]=arguments[f];const s={done:!1,value:r(e)},c=e=>({done:!1,value:o(t,...n,e)});let u,l=e=>u=e;return x({q1:()=>({nextState:"q2",effect:s,stateUpdater:l}),q2:()=>({nextState:"q1",effect:c(u)})},"q1",`takeEvery(${i(e)}, ${t.name})`)}function p(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),s=2;a>s;s++)n[s-2]=arguments[s];const c={done:!1,value:r(e)},u=e=>({done:!1,value:o(t,...n,e)}),l=e=>({done:!1,value:f(e)});let q,d;const v=e=>q=e,h=e=>d=e;return x({q1:()=>({nextState:"q2",effect:c,stateUpdater:h}),q2:()=>q?{nextState:"q3",effect:l(q)}:{nextState:"q1",effect:u(d),stateUpdater:v},q3:()=>({nextState:"q1",effect:u(d),stateUpdater:v})},"q1",`takeLatest(${i(e)}, ${t.name})`)}function S(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),o=2;a>o;o++)n[o-2]=arguments[o];const f={done:!1,value:r(e)},c=e=>({done:!1,value:s(t,...n,e)});let u;const l=e=>u=e;return x({q1:()=>({nextState:"q2",effect:f,stateUpdater:l}),q2:()=>({nextState:"q1",effect:c(u)})},"q1",`takeLeading(${i(e)}, ${t.name})`)}function y(e,t,a){for(var n=arguments.length,f=Array(n>3?n-3:0),s=3;n>s;s++)f[s-3]=arguments[s];let q,d;const v={done:!1,value:c(t,u(1))},h=()=>({done:!1,value:r(d)}),p=e=>({done:!1,value:o(a,...f,e)}),S={done:!1,value:l(e)},y=e=>q=e,g=e=>d=e;return x({q1:()=>({nextState:"q2",effect:v,stateUpdater:g}),q2:()=>({nextState:"q3",effect:h(),stateUpdater:y}),q3:()=>({nextState:"q4",effect:p(q)}),q4:()=>({nextState:"q2",effect:S})},"q1",`throttle(${i(t)}, ${a.name})`)}function g(e,t,a){let n=e;for(var r=arguments.length,o=Array(r>3?r-3:0),f=3;r>f;f++)o[f-3]=arguments[f];const c={done:!1,value:s(a,...o)},u={done:!1,value:l(t)};return x({q1:()=>({nextState:"q2",effect:c,errorState:"q10"}),q2:()=>({nextState:v}),q10(e){if(0>=(n-=1))throw e;return{nextState:"q1",effect:u}}},"q1",`retry(${a.name})`)}function k(e,t,a){for(var n=arguments.length,f=Array(n>3?n-3:0),s=3;n>s;s++)f[s-3]=arguments[s];let c,u;const d={done:!1,value:r(t)},v={done:!1,value:q({action:r(t),debounce:l(e)})},h=e=>({done:!1,value:o(a,...f,e)}),p=e=>({done:!1,value:e}),S=e=>c=e,y=e=>u=e;return x({q1:()=>({nextState:"q2",effect:d,stateUpdater:S}),q2:()=>({nextState:"q3",effect:v,stateUpdater:y}),q3:()=>u.debounce?{nextState:"q1",effect:h(c)}:{nextState:"q2",effect:p(u.action),stateUpdater:S}},"q1",`debounce(${i(t)}, ${a.name})`)}function A(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return o(h,e,t,...n)}function m(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return o(p,e,t,...n)}function U(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return o(S,e,t,...n)}function $(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),f=3;n>f;f++)r[f-3]=arguments[f];return o(y,e,t,a,...r)}function b(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),o=3;n>o;o++)r[o-3]=arguments[o];return s(g,e,t,a,...r)}function j(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),f=3;n>f;f++)r[f-3]=arguments[f];return o(k,e,t,a,...r)}export{j as debounce,b as retry,A as takeEvery,m as takeLatest,U as takeLeading,$ as throttle};
import{N as e,a0 as t,d as a,e as n,a1 as r,a2 as f,a3 as o,a4 as s,a5 as c,a6 as u,a7 as l,a8 as q}from"./chunk-cbceff6d.js";export{ac as effectTypes,a1 as take,ad as takeMaybe,ae as put,af as putResolve,ag as all,a8 as race,a4 as call,ah as apply,ai as cps,a2 as fork,aj as spawn,ak as join,a3 as cancel,al as select,a5 as actionChannel,am as cancelled,an as flush,ao as getContext,ap as setContext,a7 as delay}from"./chunk-cbceff6d.js";const d=e=>({done:!0,value:e}),v={};function i(e){return t(e)?"channel":a(e)?e+"":n(e)?e.name:e+""}function x(t,a,n){let r,f,o,s=a;function c(e,a){if(s===v)return d(e);if(a&&!f)throw s=v,a;{r&&r(e);const n=a?t[f](a):t[s]();return o=n.effect,r=n.stateUpdater,f=n.errorState,(s=n.nextState)===v?d(e):o}}return e(c,e=>c(null,e),n)}function h(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),o=2;a>o;o++)n[o-2]=arguments[o];const s={done:!1,value:r(e)},c=e=>({done:!1,value:f(t,...n,e)});let u,l=e=>u=e;return x({q1:()=>({nextState:"q2",effect:s,stateUpdater:l}),q2:()=>({nextState:"q1",effect:c(u)})},"q1",`takeEvery(${i(e)}, ${t.name})`)}function p(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),s=2;a>s;s++)n[s-2]=arguments[s];const c={done:!1,value:r(e)},u=e=>({done:!1,value:f(t,...n,e)}),l=e=>({done:!1,value:o(e)});let q,d;const v=e=>q=e,h=e=>d=e;return x({q1:()=>({nextState:"q2",effect:c,stateUpdater:h}),q2:()=>q?{nextState:"q3",effect:l(q)}:{nextState:"q1",effect:u(d),stateUpdater:v},q3:()=>({nextState:"q1",effect:u(d),stateUpdater:v})},"q1",`takeLatest(${i(e)}, ${t.name})`)}function S(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),f=2;a>f;f++)n[f-2]=arguments[f];const o={done:!1,value:r(e)},c=e=>({done:!1,value:s(t,...n,e)});let u;const l=e=>u=e;return x({q1:()=>({nextState:"q2",effect:o,stateUpdater:l}),q2:()=>({nextState:"q1",effect:c(u)})},"q1",`takeLeading(${i(e)}, ${t.name})`)}function y(e,t,a){for(var n=arguments.length,o=Array(n>3?n-3:0),s=3;n>s;s++)o[s-3]=arguments[s];let q,d;const v={done:!1,value:c(t,u(1))},h=()=>({done:!1,value:r(d)}),p=e=>({done:!1,value:f(a,...o,e)}),S={done:!1,value:l(e)},y=e=>q=e,g=e=>d=e;return x({q1:()=>({nextState:"q2",effect:v,stateUpdater:g}),q2:()=>({nextState:"q3",effect:h(),stateUpdater:y}),q3:()=>({nextState:"q4",effect:p(q)}),q4:()=>({nextState:"q2",effect:S})},"q1",`throttle(${i(t)}, ${a.name})`)}function g(e,t,a){let n=e;for(var r=arguments.length,f=Array(r>3?r-3:0),o=3;r>o;o++)f[o-3]=arguments[o];const c={done:!1,value:s(a,...f)},u={done:!1,value:l(t)};return x({q1:()=>({nextState:"q2",effect:c,errorState:"q10"}),q2:()=>({nextState:v}),q10(e){if(0>=(n-=1))throw e;return{nextState:"q1",effect:u}}},"q1",`retry(${a.name})`)}function k(e,t,a){for(var n=arguments.length,o=Array(n>3?n-3:0),s=3;n>s;s++)o[s-3]=arguments[s];let c,u;const d={done:!1,value:r(t)},v={done:!1,value:q({action:r(t),debounce:l(e)})},h=e=>({done:!1,value:f(a,...o,e)}),p=e=>({done:!1,value:e}),S=e=>c=e,y=e=>u=e;return x({q1:()=>({nextState:"q2",effect:d,stateUpdater:S}),q2:()=>({nextState:"q3",effect:v,stateUpdater:y}),q3:()=>u.debounce?{nextState:"q1",effect:h(c)}:{nextState:"q2",effect:p(u.action),stateUpdater:S}},"q1",`debounce(${i(t)}, ${a.name})`)}function A(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return f(h,e,t,...n)}function m(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return f(p,e,t,...n)}function U(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),r=2;a>r;r++)n[r-2]=arguments[r];return f(S,e,t,...n)}function $(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),o=3;n>o;o++)r[o-3]=arguments[o];return f(y,e,t,a,...r)}function b(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),f=3;n>f;f++)r[f-3]=arguments[f];return s(g,e,t,a,...r)}function j(e,t,a){for(var n=arguments.length,r=Array(n>3?n-3:0),o=3;n>o;o++)r[o-3]=arguments[o];return f(k,e,t,a,...r)}export{j as debounce,b as retry,A as takeEvery,m as takeLatest,U as takeLeading,$ as throttle};

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

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).ReduxSaga={})}(this,function(n){"use strict";var t=function(n){return"@@redux-saga/"+n},e=t("CANCEL_PROMISE"),r=t("CHANNEL_END"),o=t("IO"),a=t("MATCH"),c=t("MULTICAST"),u=t("SAGA_ACTION"),f=t("SELF_CANCELLATION"),i=t("TASK"),l=t("TASK_CANCEL"),s=t("TERMINATE"),v=t("LOCATION");function d(){return(d=Object.assign||function(n){for(var t=1;arguments.length>t;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}var p=function(n){return null==n},h=function(n){return null!=n},y=function(n){return"function"==typeof n},g=function(n){return"string"==typeof n},E=Array.isArray,b=function(n){return n&&y(n.then)},m=function(n){return n&&y(n.next)&&y(n.throw)},S=function n(t){return t&&(g(t)||C(t)||y(t)||E(t)&&t.every(n))},A=function(n){return n&&y(n.take)&&y(n.close)},x=function(n){return y(n)&&n.hasOwnProperty("toString")},C=function(n){return!!n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype},k=function(n){return A(n)&&n[c]},q=function(n){return function(){return n}}(!0),T=function(){},O=function(n){return n},L=function(n,t){d(n,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(function(e){n[e]=t[e]})},N=function(n,t){var e;return(e=[]).concat.apply(e,t.map(n))};function j(n,t){var e=n.indexOf(t);0>e||n.splice(e,1)}function w(n){var t=!1;return function(){t||(t=!0,n())}}var R=function(n){throw n},M=function(n){return{value:n,done:!0}};function I(n,t,e){void 0===t&&(t=R),void 0===e&&(e="iterator");var r={meta:{name:e},next:n,throw:t,return:M,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function U(n,t){var e=t.sagaStack;console.error(n),console.error(e)}var P=function(n){return Array.apply(null,Array(n))},_=function(n){return function(t){return n(Object.defineProperty(t,u,{value:!0}))}},D=function(n){return n===s},F=function(n){return n===l},H=function(n){return D(n)||F(n)};function K(n,t){var e,r=Object.keys(n),o=r.length,a=0,c=E(n)?P(o):{},u={};return r.forEach(function(n){var r=function(r,u){e||(u||H(r)?(t.cancel(),t(r,u)):(c[n]=r,++a===o&&(e=!0,t(c))))};r.cancel=T,u[n]=r}),t.cancel=function(){e||(e=!0,r.forEach(function(n){return u[n].cancel()}))},u}function z(n){return{name:n.name||"anonymous",location:G(n)}}function G(n){return n[v]}var X="Channel's Buffer overflow!",J=1,B=3,Q=4,V={isEmpty:q,put:T,take:T};function W(n,t){void 0===n&&(n=10);var e=Array(n),r=0,o=0,a=0,c=function(t){e[o]=t,o=(o+1)%n,r++},u=function(){if(0!=r){var t=e[a];return e[a]=null,r--,a=(a+1)%n,t}},f=function(){for(var n=[];r;)n.push(u());return n};return{isEmpty:function(){return 0==r},put:function(u){var i;if(n>r)c(u);else switch(t){case J:throw Error(X);case B:e[o]=u,a=o=(o+1)%n;break;case Q:i=2*n,e=f(),r=e.length,o=e.length,a=0,e.length=i,n=i,c(u)}},take:u,flush:f}}var Y=function(){return V},Z=function(n){return W(n,B)},$=function(n){return W(n,Q)},nn=Object.freeze({none:Y,fixed:function(n){return W(n,J)},dropping:function(n){return W(n,2)},sliding:Z,expanding:$}),tn=[],en=0;function rn(n){try{cn(),n()}finally{un()}}function on(n){tn.push(n),en||(cn(),fn())}function an(n){try{return cn(),n()}finally{fn()}}function cn(){en++}function un(){en--}function fn(){var n;for(un();!en&&void 0!==(n=tn.shift());)rn(n)}var ln=function(n){return function(t){return n.some(function(n){return hn(n)(t)})}},sn=function(n){return function(t){return n(t)}},vn=function(n){return function(t){return t.type===n+""}},dn=function(n){return function(t){return t.type===n}},pn=function(){return q};function hn(n){var t="*"===n?pn:g(n)?vn:E(n)?ln:x(n)?vn:y(n)?sn:C(n)?dn:null;if(null===t)throw Error("invalid pattern: "+n);return t(n)}var yn={type:r},gn=function(n){return n&&n.type===r};function En(n){void 0===n&&(n=$());var t=!1,e=[];return{take:function(r){t&&n.isEmpty()?r(yn):n.isEmpty()?(e.push(r),r.cancel=function(){j(e,r)}):r(n.take())},put:function(r){if(!t){if(0===e.length)return n.put(r);e.shift()(r)}},flush:function(e){t&&n.isEmpty()?e(yn):e(n.flush())},close:function(){if(!t){t=!0;var n=e;e=[];for(var r=0,o=n.length;o>r;r++)(0,n[r])(yn)}}}}function bn(){var n,t=!1,e=[],r=e,o=function(){r===e&&(r=e.slice())},u=function(){t=!0;var n=e=r;r=[],n.forEach(function(n){n(yn)})};return(n={})[c]=!0,n.put=function(n){if(!t)if(gn(n))u();else for(var o=e=r,c=0,f=o.length;f>c;c++){var i=o[c];i[a](n)&&(i.cancel(),i(n))}},n.take=function(n,e){void 0===e&&(e=pn),t?n(yn):(n[a]=e,o(),r.push(n),n.cancel=w(function(){o(),j(r,n)}))},n.close=u,n}function mn(){var n=bn(),t=n.put;return n.put=function(n){n[u]?t(n):on(function(){t(n)})},n}!function(n){var t,e=n.Symbol;"function"==typeof e?e.observable?t=e.observable:(t=e("observable"),e.observable=t):t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var Sn=function(){return Math.random().toString(36).substring(7).split("").join(".")};Sn(),Sn();var An=0,xn=1,Cn=2,kn=3,qn="TAKE",Tn="PUT",On="ALL",Ln="RACE",Nn="CALL",jn="CPS",wn="FORK",Rn="JOIN",Mn="CANCEL",In="SELECT",Un="ACTION_CHANNEL",Pn="CANCELLED",_n="FLUSH",Dn="GET_CONTEXT",Fn="SET_CONTEXT",Hn=Object.freeze({TAKE:qn,PUT:Tn,ALL:On,RACE:Ln,CALL:Nn,CPS:jn,FORK:wn,JOIN:Rn,CANCEL:Mn,SELECT:In,ACTION_CHANNEL:Un,CANCELLED:Pn,FLUSH:_n,GET_CONTEXT:Dn,SET_CONTEXT:Fn});function Kn(n,t){var r=n[e];y(r)&&(t.cancel=r),n.then(t,function(n){t(n,!0)})}var zn,Gn=0,Xn=function(){return++Gn};function Jn(n){n.isRunning()&&n.cancel()}var Bn=((zn={})[qn]=function(n,t,e){var r=t.channel,o=void 0===r?n.channel:r,a=t.pattern,c=t.maybe,u=function(n){n instanceof Error?e(n,!0):!gn(n)||c?e(n):e(s)};try{o.take(u,h(a)?hn(a):null)}catch(n){return void e(n,!0)}e.cancel=u.cancel},zn[Tn]=function(n,t,e){var r=t.channel,o=t.action,a=t.resolve;on(function(){var t;try{t=(r?r.put:n.dispatch)(o)}catch(n){return void e(n,!0)}a&&b(t)?Kn(t,e):e(t)})},zn[On]=function(n,t,e,r){var o=r.digestEffect,a=Gn,c=Object.keys(t);if(0!==c.length){var u=K(t,e);c.forEach(function(n){o(t[n],a,u[n],n)})}else e(E(t)?[]:{})},zn[Ln]=function(n,t,e,r){var o=r.digestEffect,a=Gn,c=Object.keys(t),u=E(t)?P(c.length):{},f={},i=!1;c.forEach(function(n){var t=function(t,r){i||(r||H(t)?(e.cancel(),e(t,r)):(e.cancel(),i=!0,u[n]=t,e(u)))};t.cancel=T,f[n]=t}),e.cancel=function(){i||(i=!0,c.forEach(function(n){return f[n].cancel()}))},c.forEach(function(n){i||o(t[n],a,f[n],n)})},zn[Nn]=function(n,t,e,r){var o=t.context,a=t.fn,c=t.args,u=r.task;try{var f=a.apply(o,c);if(b(f))return void Kn(f,e);if(m(f))return void ot(n,f,u.context,Gn,z(a),!1,e);e(f)}catch(n){e(n,!0)}},zn[jn]=function(n,t,e){var r=t.context,o=t.fn,a=t.args;try{var c=function(n,t){p(n)?e(t):e(n,!0)};o.apply(r,a.concat(c)),c.cancel&&(e.cancel=c.cancel)}catch(n){e(n,!0)}},zn[wn]=function(n,t,e,r){var o=t.fn,a=t.detached,c=r.task,u=function(n){var t=n.context,e=n.fn,r=n.args;try{var o=e.apply(t,r);return m(o)?o:I(function(n){return void 0===n&&(n=o),{value:n,done:!b(n)}})}catch(n){return I(function(){throw n})}}({context:t.context,fn:o,args:t.args}),f=function(n,t){return n.isSagaIterator?{name:n.meta.name}:z(t)}(u,o);an(function(){var t=ot(n,u,c.context,Gn,f,a,T);a?e(t):t.isRunning()?(c.queue.addTask(t),e(t)):t.isAborted()?c.queue.abort(t.error()):e(t)})},zn[Rn]=function(n,t,e,r){var o=r.task,a=function(n,t){if(n.isRunning()){var e={task:o,cb:t};t.cancel=function(){j(n.joiners,e)},n.joiners.push(e)}else n.isAborted()?t(n.error(),!0):t(n.result())};if(E(t)){if(0===t.length)return void e([]);var c=K(t,e);t.forEach(function(n,t){a(n,c[t])})}else a(t,e)},zn[Mn]=function(n,t,e,r){t===f?Jn(r.task):E(t)?t.forEach(Jn):Jn(t),e()},zn[In]=function(n,t,e){var r=t.selector,o=t.args;try{e(r.apply(void 0,[n.getState()].concat(o)))}catch(n){e(n,!0)}},zn[Un]=function(n,t,e){var r=t.pattern,o=En(t.buffer),a=hn(r),c=function t(e){gn(e)||n.channel.take(t,a),o.put(e)},u=o.close;o.close=function(){c.cancel(),u()},n.channel.take(c,a),e(o)},zn[Pn]=function(n,t,e,r){e(r.task.isCancelled())},zn[_n]=function(n,t,e){t.flush(e)},zn[Dn]=function(n,t,e,r){e(r.task.context[t])},zn[Fn]=function(n,t,e,r){L(r.task.context,t),e()},zn);function Qn(n,t){return n+"?"+t}function Vn(n){var t=n.name,e=n.location;return e?t+" "+Qn(e.fileName,e.lineNumber):t}function Wn(n){var t=N(function(n){return n.cancelledTasks},n);return t.length?["Tasks cancelled due to error:"].concat(t).join("\n"):""}var Yn=null,Zn=[],$n=function(n){n.crashedEffect=Yn,Zn.push(n)},nt=function(){Yn=null,Zn.length=0},tt=function(n){Yn=n},et=function(){var n,t=Zn[0],e=Zn.slice(1),r=t.crashedEffect?(n=G(t.crashedEffect))?n.code+" "+Qn(n.fileName,n.lineNumber):"":null;return["The above error occurred in task "+Vn(t.meta)+(r?" \n when executing effect "+r:"")].concat(e.map(function(n){return" created by "+Vn(n.meta)}),[Wn(Zn)]).join("\n")};function rt(n,t,e,r,o,a,c){var u,f,s,v=An,d=null,p=[],h=Object.create(e),y=function(n,t,e){var r,o=[],a=!1;function c(n){t(),f(),e(n,!0)}function u(t){o.push(t),t.cont=function(u,f){a||(j(o,t),t.cont=T,f?c(u):(t===n&&(r=u),o.length||(a=!0,e(r))))}}function f(){a||(a=!0,o.forEach(function(n){n.cont=T,n.cancel()}),o=[])}return u(n),{addTask:u,cancelAll:f,abort:c,getTasks:function(){return o}}}(t,function(){p.push.apply(p,y.getTasks().map(function(n){return n.meta.name}))},g);function g(t,e){if(e){if(v=Cn,$n({meta:o,cancelledTasks:p}),E.isRoot){var r=et();nt(),n.onError(t,{sagaStack:r})}s=t,d&&d.reject(t)}else t===l?v=xn:v!==xn&&(v=kn),f=t,d&&d.resolve(t);E.cont(t,e),E.joiners.forEach(function(n){n.cb(t,e)}),E.joiners=null}var E=((u={})[i]=!0,u.id=r,u.meta=o,u.isRoot=a,u.context=h,u.joiners=[],u.queue=y,u.cancel=function(){v===An&&(v=xn,y.cancelAll(),g(l,!1))},u.cont=c,u.end=g,u.setContext=function(n){L(h,n)},u.toPromise=function(){return d?d.promise:((n={}).promise=new Promise(function(t,e){n.resolve=t,n.reject=e}),d=n,v===Cn?d.reject(s):v!==An&&d.resolve(f),d.promise);var n},u.isRunning=function(){return v===An},u.isCancelled=function(){return v===xn||v===An&&t.status===xn},u.isAborted=function(){return v===Cn},u.result=function(){return f},u.error=function(){return s},u);return E}function ot(n,t,e,r,a,c,u){var f=n.finalizeRunEffect(function(t,e,r){if(b(t))Kn(t,r);else if(m(t))ot(n,t,s.context,e,a,!1,r);else if(t&&t[o]){var c=Bn[t.type];c(n,t.payload,r,v)}else r(t)});d.cancel=T;var i={meta:a,cancel:function(){i.status===An&&(i.status=xn,d(l))},status:An},s=rt(n,i,e,r,a,c,u),v={task:s,digestEffect:p};return u.cancel=s.cancel,d(),s;function d(n,e){try{var o;e?(o=t.throw(n),nt()):F(n)?(i.status=xn,d.cancel(),o=y(t.return)?t.return(l):{done:!0,value:l}):o=D(n)?y(t.return)?t.return():{done:!0}:t.next(n),o.done?(i.status!==xn&&(i.status=kn),i.cont(o.value)):p(o.value,r,d)}catch(n){if(i.status===xn)throw n;i.status=Cn,i.cont(n,!0)}}function p(t,e,r,o){void 0===o&&(o="");var a,c=Xn();function u(e,o){a||(a=!0,r.cancel=T,n.sagaMonitor&&(o?n.sagaMonitor.effectRejected(c,e):n.sagaMonitor.effectResolved(c,e)),o&&tt(t),r(e,o))}n.sagaMonitor&&n.sagaMonitor.effectTriggered({effectId:c,parentEffectId:e,label:o,effect:t}),u.cancel=T,r.cancel=function(){a||(a=!0,u.cancel(),u.cancel=T,n.sagaMonitor&&n.sagaMonitor.effectCancelled(c))},f(t,c,u)}}function at(n,t){for(var e=n.channel,r=void 0===e?mn():e,o=n.dispatch,a=n.getState,c=n.context,u=void 0===c?{}:c,f=n.sagaMonitor,i=n.effectMiddlewares,l=n.onError,s=void 0===l?U:l,v=arguments.length,d=Array(v>2?v-2:0),p=2;v>p;p++)d[p-2]=arguments[p];var h,y=t.apply(void 0,d),g=Xn();if(f&&(f.rootSagaStarted=f.rootSagaStarted||T,f.effectTriggered=f.effectTriggered||T,f.effectResolved=f.effectResolved||T,f.effectRejected=f.effectRejected||T,f.effectCancelled=f.effectCancelled||T,f.actionDispatched=f.actionDispatched||T,f.rootSagaStarted({effectId:g,saga:t,args:d})),i){var E=function(){for(var n=arguments.length,t=Array(n),e=0;n>e;e++)t[e]=arguments[e];return 0===t.length?function(n){return n}:1===t.length?t[0]:t.reduce(function(n,t){return function(){return n(t.apply(void 0,arguments))}})}.apply(void 0,i);h=function(n){return function(t,e,r){return E(function(t){return n(t,e,r)})(t)}}}else h=O;var b={channel:r,dispatch:_(o),getState:a,sagaMonitor:f,onError:s,finalizeRunEffect:h};return an(function(){var n=ot(b,y,u,g,z(t),!0,T);return f&&f.effectResolved(g,n),n})}function ct(n,t){var r;void 0===t&&(t=!0);var o=new Promise(function(e){r=setTimeout(e,n,t)});return o[e]=function(){clearTimeout(r)},o}var ut=function(n,t){var e;return(e={})[o]=!0,e.combinator=!1,e.type=n,e.payload=t,e},ft=function(n){return ut(wn,d({},n.payload,{detached:!0}))};function it(n,t){if(void 0===n&&(n="*"),S(n))return ut(qn,{pattern:n});if(k(n)&&h(t)&&S(t))return ut(qn,{channel:n,pattern:t});if(A(n))return ut(qn,{channel:n});throw Error("take(patternOrChannel): argument "+n+" is not valid channel or a valid pattern")}function lt(n,t){return p(t)&&(t=n,n=void 0),ut(Tn,{channel:n,action:t})}function st(n){var t=ut(Ln,n);return t.combinator=!0,t}function vt(n,t){var e,r=null;return y(n)?e=n:(E(n)?(r=n[0],e=n[1]):(r=n.context,e=n.fn),r&&g(e)&&y(r[e])&&(e=r[e])),{context:r,fn:e,args:t}}function dt(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(Nn,vt(n,e))}function pt(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(wn,vt(n,e))}function ht(n){return void 0===n&&(n=f),ut(Mn,n)}function yt(n,t){return ut(Un,{pattern:n,buffer:t})}var gt=dt.bind(null,ct),Et=function(n){return{done:!0,value:n}},bt={};function mt(n){return A(n)?"channel":x(n)?n+"":y(n)?n.name:n+""}function St(n,t,e){var r,o,a,c=t;function u(t,e){if(c===bt)return Et(t);if(e&&!o)throw c=bt,e;r&&r(t);var u=e?n[o](e):n[c]();return a=u.effect,r=u.stateUpdater,o=u.errorState,(c=u.nextState)===bt?Et(t):a}return I(u,function(n){return u(null,n)},e)}function At(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var a,c={done:!1,value:it(n)},u=function(n){return a=n};return St({q1:function(){return{nextState:"q2",effect:c,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:(n=a,{done:!1,value:pt.apply(void 0,[t].concat(r,[n]))})};var n}},"q1","takeEvery("+mt(n)+", "+t.name+")")}function xt(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var a,c,u={done:!1,value:it(n)},f=function(n){return{done:!1,value:pt.apply(void 0,[t].concat(r,[n]))}},i=function(n){return{done:!1,value:ht(n)}},l=function(n){return a=n},s=function(n){return c=n};return St({q1:function(){return{nextState:"q2",effect:u,stateUpdater:s}},q2:function(){return a?{nextState:"q3",effect:i(a)}:{nextState:"q1",effect:f(c),stateUpdater:l}},q3:function(){return{nextState:"q1",effect:f(c),stateUpdater:l}}},"q1","takeLatest("+mt(n)+", "+t.name+")")}function Ct(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var a,c={done:!1,value:it(n)},u=function(n){return a=n};return St({q1:function(){return{nextState:"q2",effect:c,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:(n=a,{done:!1,value:dt.apply(void 0,[t].concat(r,[n]))})};var n}},"q1","takeLeading("+mt(n)+", "+t.name+")")}function kt(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),a=3;r>a;a++)o[a-3]=arguments[a];var c,u,f={done:!1,value:yt(t,Z(1))},i={done:!1,value:gt(n)},l=function(n){return c=n},s=function(n){return u=n};return St({q1:function(){return{nextState:"q2",effect:f,stateUpdater:s}},q2:function(){return{nextState:"q3",effect:{done:!1,value:it(u)},stateUpdater:l}},q3:function(){return{nextState:"q4",effect:(n=c,{done:!1,value:pt.apply(void 0,[e].concat(o,[n]))})};var n},q4:function(){return{nextState:"q2",effect:i}}},"q1","throttle("+mt(t)+", "+e.name+")")}function qt(n,t,e){for(var r=n,o=arguments.length,a=Array(o>3?o-3:0),c=3;o>c;c++)a[c-3]=arguments[c];var u={done:!1,value:dt.apply(void 0,[e].concat(a))},f={done:!1,value:gt(t)};return St({q1:function(){return{nextState:"q2",effect:u,errorState:"q10"}},q2:function(){return{nextState:bt}},q10:function(n){if(0>=(r-=1))throw n;return{nextState:"q1",effect:f}}},"q1","retry("+e.name+")")}function Tt(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),a=3;r>a;a++)o[a-3]=arguments[a];var c,u,f={done:!1,value:it(t)},i={done:!1,value:st({action:it(t),debounce:gt(n)})},l=function(n){return c=n},s=function(n){return u=n};return St({q1:function(){return{nextState:"q2",effect:f,stateUpdater:l}},q2:function(){return{nextState:"q3",effect:i,stateUpdater:s}},q3:function(){return u.debounce?{nextState:"q1",effect:(t=c,{done:!1,value:pt.apply(void 0,[e].concat(o,[t]))})}:{nextState:"q2",effect:(n=u.action,{done:!1,value:n}),stateUpdater:l};var n,t}},"q1","debounce("+mt(t)+", "+e.name+")")}n.effects=Object.freeze({effectTypes:Hn,take:it,takeMaybe:function(){var n=it.apply(void 0,arguments);return n.payload.maybe=!0,n},put:lt,putResolve:function(){var n=lt.apply(void 0,arguments);return n.payload.resolve=!0,n},all:function(n){var t=ut(On,n);return t.combinator=!0,t},race:st,call:dt,apply:function(n,t,e){return void 0===e&&(e=[]),ut(Nn,vt([n,t],e))},cps:function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(jn,vt(n,e))},fork:pt,spawn:function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ft(pt.apply(void 0,[n].concat(e)))},join:function(n){return ut(Rn,n)},cancel:ht,select:function(n){void 0===n&&(n=O);for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(In,{selector:n,args:e})},actionChannel:yt,cancelled:function(){return ut(Pn,{})},flush:function(n){return ut(_n,n)},getContext:function(n){return ut(Dn,n)},setContext:function(n){return ut(Fn,n)},delay:gt,debounce:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),a=3;r>a;a++)o[a-3]=arguments[a];return pt.apply(void 0,[Tt,n,t,e].concat(o))},retry:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),a=3;r>a;a++)o[a-3]=arguments[a];return dt.apply(void 0,[qt,n,t,e].concat(o))},takeEvery:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[At,n,t].concat(r))},takeLatest:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[xt,n,t].concat(r))},takeLeading:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[Ct,n,t].concat(r))},throttle:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),a=3;r>a;a++)o[a-3]=arguments[a];return pt.apply(void 0,[kt,n,t,e].concat(o))}}),n.default=function(n){void 0===n&&(n={});var t,e=n,r=e.context,o=void 0===r?{}:r,a=e.channel,c=void 0===a?mn():a,u=e.sagaMonitor,f=function(n,t){if(null==n)return{};var e,r,o={},a=Object.keys(n);for(r=0;a.length>r;r++)0>t.indexOf(e=a[r])&&(o[e]=n[e]);return o}(e,["context","channel","sagaMonitor"]);function i(n){return t=at.bind(null,d({},f,{context:o,channel:c,dispatch:n.dispatch,getState:n.getState,sagaMonitor:u})),function(n){return function(t){u&&u.actionDispatched&&u.actionDispatched(t);var e=n(t);return c.put(t),e}}}return i.run=function(){return t.apply(void 0,arguments)},i.setContext=function(n){L(o,n)},i},n.buffers=nn,n.CANCEL=e,n.SAGA_LOCATION=v,n.runSaga=at,n.END=yn,n.isEnd=gn,n.eventChannel=function(n,t){void 0===t&&(t=Y());var e,r=!1,o=En(t),a=function(){r||(r=!0,y(e)&&e(),o.close())};return e=w(e=n(function(n){gn(n)?a():o.put(n)})),r&&e(),{take:o.take,flush:o.flush,close:a}},n.channel=En,n.multicastChannel=bn,n.stdChannel=mn,n.detach=ft,Object.defineProperty(n,"__esModule",{value:!0})});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).ReduxSaga={})}(this,function(n){"use strict";var t=function(n){return"@@redux-saga/"+n},e=t("CANCEL_PROMISE"),r=t("CHANNEL_END"),o=t("IO"),c=t("MATCH"),a=t("MULTICAST"),u=t("SAGA_ACTION"),f=t("SELF_CANCELLATION"),i=t("TASK"),l=t("TASK_CANCEL"),s=t("TERMINATE"),v=t("LOCATION");function d(){return(d=Object.assign||function(n){for(var t=1;arguments.length>t;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}var p=function(n){return null==n},h=function(n){return null!=n},y=function(n){return"function"==typeof n},g=function(n){return"string"==typeof n},E=Array.isArray,b=function(n){return n&&y(n.then)},S=function(n){return n&&y(n.next)&&y(n.throw)},m=function n(t){return t&&(g(t)||C(t)||y(t)||E(t)&&t.every(n))},A=function(n){return n&&y(n.take)&&y(n.close)},x=function(n){return y(n)&&n.hasOwnProperty("toString")},C=function(n){return!!n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype},q=function(n){return A(n)&&n[a]},T=function(n){return function(){return n}}(!0),k=function(){},O=function(n){return n},L=function(n,t){d(n,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(function(e){n[e]=t[e]})},N=function(n,t){var e;return(e=[]).concat.apply(e,t.map(n))};function j(n,t){var e=n.indexOf(t);0>e||n.splice(e,1)}function w(n){var t=!1;return function(){t||(t=!0,n())}}var R=function(n){throw n},M=function(n){return{value:n,done:!0}};function I(n,t,e){void 0===t&&(t=R),void 0===e&&(e="iterator");var r={meta:{name:e},next:n,throw:t,return:M,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function U(n,t){var e=t.sagaStack;console.error(n),console.error(e)}var P=function(n){return Array.apply(null,Array(n))},_=function(n){return function(t){return n(Object.defineProperty(t,u,{value:!0}))}},D=function(n){return n===s},F=function(n){return n===l},H=function(n){return D(n)||F(n)};function K(n,t){var e,r=Object.keys(n),o=r.length,c=0,a=E(n)?P(o):{},u={};return r.forEach(function(n){var r=function(r,u){e||(u||H(r)?(t.cancel(),t(r,u)):(a[n]=r,++c===o&&(e=!0,t(a))))};r.cancel=k,u[n]=r}),t.cancel=function(){e||(e=!0,r.forEach(function(n){return u[n].cancel()}))},u}function z(n){return{name:n.name||"anonymous",location:G(n)}}function G(n){return n[v]}var X="Channel's Buffer overflow!",J=1,B=3,Q=4,V={isEmpty:T,put:k,take:k};function W(n,t){void 0===n&&(n=10);var e=Array(n),r=0,o=0,c=0,a=function(t){e[o]=t,o=(o+1)%n,r++},u=function(){if(0!=r){var t=e[c];return e[c]=null,r--,c=(c+1)%n,t}},f=function(){for(var n=[];r;)n.push(u());return n};return{isEmpty:function(){return 0==r},put:function(u){var i;if(n>r)a(u);else switch(t){case J:throw Error(X);case B:e[o]=u,c=o=(o+1)%n;break;case Q:i=2*n,e=f(),r=e.length,o=e.length,c=0,e.length=i,n=i,a(u)}},take:u,flush:f}}var Y=function(){return V},Z=function(n){return W(n,B)},$=function(n){return W(n,Q)},nn=Object.freeze({none:Y,fixed:function(n){return W(n,J)},dropping:function(n){return W(n,2)},sliding:Z,expanding:$}),tn=[],en=0;function rn(n){try{an(),n()}finally{un()}}function on(n){tn.push(n),en||(an(),fn())}function cn(n){try{return an(),n()}finally{fn()}}function an(){en++}function un(){en--}function fn(){var n;for(un();!en&&void 0!==(n=tn.shift());)rn(n)}var ln=function(n){return function(t){return n.some(function(n){return hn(n)(t)})}},sn=function(n){return function(t){return n(t)}},vn=function(n){return function(t){return t.type===n+""}},dn=function(n){return function(t){return t.type===n}},pn=function(){return T};function hn(n){var t="*"===n?pn:g(n)?vn:E(n)?ln:x(n)?vn:y(n)?sn:C(n)?dn:null;if(null===t)throw Error("invalid pattern: "+n);return t(n)}var yn={type:r},gn=function(n){return n&&n.type===r};function En(n){void 0===n&&(n=$());var t=!1,e=[];return{take:function(r){t&&n.isEmpty()?r(yn):n.isEmpty()?(e.push(r),r.cancel=function(){j(e,r)}):r(n.take())},put:function(r){if(!t){if(0===e.length)return n.put(r);e.shift()(r)}},flush:function(e){t&&n.isEmpty()?e(yn):e(n.flush())},close:function(){if(!t){t=!0;var n=e;e=[];for(var r=0,o=n.length;o>r;r++)(0,n[r])(yn)}}}}function bn(){var n,t=!1,e=[],r=e,o=function(){r===e&&(r=e.slice())},u=function(){t=!0;var n=e=r;r=[],n.forEach(function(n){n(yn)})};return(n={})[a]=!0,n.put=function(n){if(!t)if(gn(n))u();else for(var o=e=r,a=0,f=o.length;f>a;a++){var i=o[a];i[c](n)&&(i.cancel(),i(n))}},n.take=function(n,e){void 0===e&&(e=pn),t?n(yn):(n[c]=e,o(),r.push(n),n.cancel=w(function(){o(),j(r,n)}))},n.close=u,n}function Sn(){var n=bn(),t=n.put;return n.put=function(n){n[u]?t(n):on(function(){t(n)})},n}!function(n){var t,e=n.Symbol;"function"==typeof e?e.observable?t=e.observable:(t=e("observable"),e.observable=t):t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var mn=function(){return Math.random().toString(36).substring(7).split("").join(".")};mn(),mn();var An=0,xn=1,Cn=2,qn=3,Tn="TAKE",kn="PUT",On="ALL",Ln="RACE",Nn="CALL",jn="CPS",wn="FORK",Rn="JOIN",Mn="CANCEL",In="SELECT",Un="ACTION_CHANNEL",Pn="CANCELLED",_n="FLUSH",Dn="GET_CONTEXT",Fn="SET_CONTEXT",Hn=Object.freeze({TAKE:Tn,PUT:kn,ALL:On,RACE:Ln,CALL:Nn,CPS:jn,FORK:wn,JOIN:Rn,CANCEL:Mn,SELECT:In,ACTION_CHANNEL:Un,CANCELLED:Pn,FLUSH:_n,GET_CONTEXT:Dn,SET_CONTEXT:Fn});function Kn(n,t){var r=n[e];y(r)&&(t.cancel=r),n.then(t,function(n){t(n,!0)})}var zn,Gn=0,Xn=function(){return++Gn};function Jn(n){n.isRunning()&&n.cancel()}var Bn=((zn={})[Tn]=function(n,t,e){var r=t.channel,o=void 0===r?n.channel:r,c=t.pattern,a=t.maybe,u=function(n){n instanceof Error?e(n,!0):!gn(n)||a?e(n):e(s)};try{o.take(u,h(c)?hn(c):null)}catch(n){return void e(n,!0)}e.cancel=u.cancel},zn[kn]=function(n,t,e){var r=t.channel,o=t.action,c=t.resolve;on(function(){var t;try{t=(r?r.put:n.dispatch)(o)}catch(n){return void e(n,!0)}c&&b(t)?Kn(t,e):e(t)})},zn[On]=function(n,t,e,r){var o=r.digestEffect,c=Gn,a=Object.keys(t);if(0!==a.length){var u=K(t,e);a.forEach(function(n){o(t[n],c,u[n],n)})}else e(E(t)?[]:{})},zn[Ln]=function(n,t,e,r){var o=r.digestEffect,c=Gn,a=Object.keys(t),u=E(t)?P(a.length):{},f={},i=!1;a.forEach(function(n){var t=function(t,r){i||(r||H(t)?(e.cancel(),e(t,r)):(e.cancel(),i=!0,u[n]=t,e(u)))};t.cancel=k,f[n]=t}),e.cancel=function(){i||(i=!0,a.forEach(function(n){return f[n].cancel()}))},a.forEach(function(n){i||o(t[n],c,f[n],n)})},zn[Nn]=function(n,t,e,r){var o=t.context,c=t.fn,a=t.args,u=r.task;try{var f=c.apply(o,a);if(b(f))return void Kn(f,e);if(S(f))return void ot(n,f,u.context,Gn,z(c),!1,e);e(f)}catch(n){e(n,!0)}},zn[jn]=function(n,t,e){var r=t.context,o=t.fn,c=t.args;try{var a=function(n,t){p(n)?e(t):e(n,!0)};o.apply(r,c.concat(a)),a.cancel&&(e.cancel=a.cancel)}catch(n){e(n,!0)}},zn[wn]=function(n,t,e,r){var o=t.fn,c=t.detached,a=r.task,u=function(n){var t=n.context,e=n.fn,r=n.args;try{var o=e.apply(t,r);if(S(o))return o;var c=!1;return I(function(n){return c?{value:n,done:!0}:(c=!0,{value:o,done:!b(o)})})}catch(n){return I(function(){throw n})}}({context:t.context,fn:o,args:t.args}),f=function(n,t){return n.isSagaIterator?{name:n.meta.name}:z(t)}(u,o);cn(function(){var t=ot(n,u,a.context,Gn,f,c,k);c?e(t):t.isRunning()?(a.queue.addTask(t),e(t)):t.isAborted()?a.queue.abort(t.error()):e(t)})},zn[Rn]=function(n,t,e,r){var o=r.task,c=function(n,t){if(n.isRunning()){var e={task:o,cb:t};t.cancel=function(){j(n.joiners,e)},n.joiners.push(e)}else n.isAborted()?t(n.error(),!0):t(n.result())};if(E(t)){if(0===t.length)return void e([]);var a=K(t,e);t.forEach(function(n,t){c(n,a[t])})}else c(t,e)},zn[Mn]=function(n,t,e,r){t===f?Jn(r.task):E(t)?t.forEach(Jn):Jn(t),e()},zn[In]=function(n,t,e){var r=t.selector,o=t.args;try{e(r.apply(void 0,[n.getState()].concat(o)))}catch(n){e(n,!0)}},zn[Un]=function(n,t,e){var r=t.pattern,o=En(t.buffer),c=hn(r),a=function t(e){gn(e)||n.channel.take(t,c),o.put(e)},u=o.close;o.close=function(){a.cancel(),u()},n.channel.take(a,c),e(o)},zn[Pn]=function(n,t,e,r){e(r.task.isCancelled())},zn[_n]=function(n,t,e){t.flush(e)},zn[Dn]=function(n,t,e,r){e(r.task.context[t])},zn[Fn]=function(n,t,e,r){L(r.task.context,t),e()},zn);function Qn(n,t){return n+"?"+t}function Vn(n){var t=n.name,e=n.location;return e?t+" "+Qn(e.fileName,e.lineNumber):t}function Wn(n){var t=N(function(n){return n.cancelledTasks},n);return t.length?["Tasks cancelled due to error:"].concat(t).join("\n"):""}var Yn=null,Zn=[],$n=function(n){n.crashedEffect=Yn,Zn.push(n)},nt=function(){Yn=null,Zn.length=0},tt=function(n){Yn=n},et=function(){var n,t=Zn[0],e=Zn.slice(1),r=t.crashedEffect?(n=G(t.crashedEffect))?n.code+" "+Qn(n.fileName,n.lineNumber):"":null;return["The above error occurred in task "+Vn(t.meta)+(r?" \n when executing effect "+r:"")].concat(e.map(function(n){return" created by "+Vn(n.meta)}),[Wn(Zn)]).join("\n")};function rt(n,t,e,r,o,c,a){var u,f,s,v=An,d=null,p=[],h=Object.create(e),y=function(n,t,e){var r,o=[],c=!1;function a(n){t(),f(),e(n,!0)}function u(t){o.push(t),t.cont=function(u,f){c||(j(o,t),t.cont=k,f?a(u):(t===n&&(r=u),o.length||(c=!0,e(r))))}}function f(){c||(c=!0,o.forEach(function(n){n.cont=k,n.cancel()}),o=[])}return u(n),{addTask:u,cancelAll:f,abort:a,getTasks:function(){return o}}}(t,function(){p.push.apply(p,y.getTasks().map(function(n){return n.meta.name}))},g);function g(t,e){if(e){if(v=Cn,$n({meta:o,cancelledTasks:p}),E.isRoot){var r=et();nt(),n.onError(t,{sagaStack:r})}s=t,d&&d.reject(t)}else t===l?v=xn:v!==xn&&(v=qn),f=t,d&&d.resolve(t);E.cont(t,e),E.joiners.forEach(function(n){n.cb(t,e)}),E.joiners=null}var E=((u={})[i]=!0,u.id=r,u.meta=o,u.isRoot=c,u.context=h,u.joiners=[],u.queue=y,u.cancel=function(){v===An&&(v=xn,y.cancelAll(),g(l,!1))},u.cont=a,u.end=g,u.setContext=function(n){L(h,n)},u.toPromise=function(){return d?d.promise:((n={}).promise=new Promise(function(t,e){n.resolve=t,n.reject=e}),d=n,v===Cn?d.reject(s):v!==An&&d.resolve(f),d.promise);var n},u.isRunning=function(){return v===An},u.isCancelled=function(){return v===xn||v===An&&t.status===xn},u.isAborted=function(){return v===Cn},u.result=function(){return f},u.error=function(){return s},u);return E}function ot(n,t,e,r,c,a,u){var f=n.finalizeRunEffect(function(t,e,r){if(b(t))Kn(t,r);else if(S(t))ot(n,t,s.context,e,c,!1,r);else if(t&&t[o]){var a=Bn[t.type];a(n,t.payload,r,v)}else r(t)});d.cancel=k;var i={meta:c,cancel:function(){i.status===An&&(i.status=xn,d(l))},status:An},s=rt(n,i,e,r,c,a,u),v={task:s,digestEffect:p};return u.cancel=s.cancel,d(),s;function d(n,e){try{var o;e?(o=t.throw(n),nt()):F(n)?(i.status=xn,d.cancel(),o=y(t.return)?t.return(l):{done:!0,value:l}):o=D(n)?y(t.return)?t.return():{done:!0}:t.next(n),o.done?(i.status!==xn&&(i.status=qn),i.cont(o.value)):p(o.value,r,d)}catch(n){if(i.status===xn)throw n;i.status=Cn,i.cont(n,!0)}}function p(t,e,r,o){void 0===o&&(o="");var c,a=Xn();function u(e,o){c||(c=!0,r.cancel=k,n.sagaMonitor&&(o?n.sagaMonitor.effectRejected(a,e):n.sagaMonitor.effectResolved(a,e)),o&&tt(t),r(e,o))}n.sagaMonitor&&n.sagaMonitor.effectTriggered({effectId:a,parentEffectId:e,label:o,effect:t}),u.cancel=k,r.cancel=function(){c||(c=!0,u.cancel(),u.cancel=k,n.sagaMonitor&&n.sagaMonitor.effectCancelled(a))},f(t,a,u)}}function ct(n,t){for(var e=n.channel,r=void 0===e?Sn():e,o=n.dispatch,c=n.getState,a=n.context,u=void 0===a?{}:a,f=n.sagaMonitor,i=n.effectMiddlewares,l=n.onError,s=void 0===l?U:l,v=arguments.length,d=Array(v>2?v-2:0),p=2;v>p;p++)d[p-2]=arguments[p];var h,y=t.apply(void 0,d),g=Xn();if(f&&(f.rootSagaStarted=f.rootSagaStarted||k,f.effectTriggered=f.effectTriggered||k,f.effectResolved=f.effectResolved||k,f.effectRejected=f.effectRejected||k,f.effectCancelled=f.effectCancelled||k,f.actionDispatched=f.actionDispatched||k,f.rootSagaStarted({effectId:g,saga:t,args:d})),i){var E=function(){for(var n=arguments.length,t=Array(n),e=0;n>e;e++)t[e]=arguments[e];return 0===t.length?function(n){return n}:1===t.length?t[0]:t.reduce(function(n,t){return function(){return n(t.apply(void 0,arguments))}})}.apply(void 0,i);h=function(n){return function(t,e,r){return E(function(t){return n(t,e,r)})(t)}}}else h=O;var b={channel:r,dispatch:_(o),getState:c,sagaMonitor:f,onError:s,finalizeRunEffect:h};return cn(function(){var n=ot(b,y,u,g,z(t),!0,k);return f&&f.effectResolved(g,n),n})}function at(n,t){var r;void 0===t&&(t=!0);var o=new Promise(function(e){r=setTimeout(e,n,t)});return o[e]=function(){clearTimeout(r)},o}var ut=function(n,t){var e;return(e={})[o]=!0,e.combinator=!1,e.type=n,e.payload=t,e},ft=function(n){return ut(wn,d({},n.payload,{detached:!0}))};function it(n,t){return void 0===n&&(n="*"),m(n)?ut(Tn,{pattern:n}):q(n)&&h(t)&&m(t)?ut(Tn,{channel:n,pattern:t}):A(n)?ut(Tn,{channel:n}):void 0}function lt(n,t){return p(t)&&(t=n,n=void 0),ut(kn,{channel:n,action:t})}function st(n){var t=ut(Ln,n);return t.combinator=!0,t}function vt(n,t){var e,r=null;return y(n)?e=n:(E(n)?(r=n[0],e=n[1]):(r=n.context,e=n.fn),r&&g(e)&&y(r[e])&&(e=r[e])),{context:r,fn:e,args:t}}function dt(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(Nn,vt(n,e))}function pt(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(wn,vt(n,e))}function ht(n){return void 0===n&&(n=f),ut(Mn,n)}function yt(n,t){return ut(Un,{pattern:n,buffer:t})}var gt=dt.bind(null,at),Et=function(n){return{done:!0,value:n}},bt={};function St(n){return A(n)?"channel":x(n)?n+"":y(n)?n.name:n+""}function mt(n,t,e){var r,o,c,a=t;function u(t,e){if(a===bt)return Et(t);if(e&&!o)throw a=bt,e;r&&r(t);var u=e?n[o](e):n[a]();return c=u.effect,r=u.stateUpdater,o=u.errorState,(a=u.nextState)===bt?Et(t):c}return I(u,function(n){return u(null,n)},e)}function At(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var c,a={done:!1,value:it(n)},u=function(n){return c=n};return mt({q1:function(){return{nextState:"q2",effect:a,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:(n=c,{done:!1,value:pt.apply(void 0,[t].concat(r,[n]))})};var n}},"q1","takeEvery("+St(n)+", "+t.name+")")}function xt(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var c,a,u={done:!1,value:it(n)},f=function(n){return{done:!1,value:pt.apply(void 0,[t].concat(r,[n]))}},i=function(n){return{done:!1,value:ht(n)}},l=function(n){return c=n},s=function(n){return a=n};return mt({q1:function(){return{nextState:"q2",effect:u,stateUpdater:s}},q2:function(){return c?{nextState:"q3",effect:i(c)}:{nextState:"q1",effect:f(a),stateUpdater:l}},q3:function(){return{nextState:"q1",effect:f(a),stateUpdater:l}}},"q1","takeLatest("+St(n)+", "+t.name+")")}function Ct(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];var c,a={done:!1,value:it(n)},u=function(n){return c=n};return mt({q1:function(){return{nextState:"q2",effect:a,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:(n=c,{done:!1,value:dt.apply(void 0,[t].concat(r,[n]))})};var n}},"q1","takeLeading("+St(n)+", "+t.name+")")}function qt(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),c=3;r>c;c++)o[c-3]=arguments[c];var a,u,f={done:!1,value:yt(t,Z(1))},i={done:!1,value:gt(n)},l=function(n){return a=n},s=function(n){return u=n};return mt({q1:function(){return{nextState:"q2",effect:f,stateUpdater:s}},q2:function(){return{nextState:"q3",effect:{done:!1,value:it(u)},stateUpdater:l}},q3:function(){return{nextState:"q4",effect:(n=a,{done:!1,value:pt.apply(void 0,[e].concat(o,[n]))})};var n},q4:function(){return{nextState:"q2",effect:i}}},"q1","throttle("+St(t)+", "+e.name+")")}function Tt(n,t,e){for(var r=n,o=arguments.length,c=Array(o>3?o-3:0),a=3;o>a;a++)c[a-3]=arguments[a];var u={done:!1,value:dt.apply(void 0,[e].concat(c))},f={done:!1,value:gt(t)};return mt({q1:function(){return{nextState:"q2",effect:u,errorState:"q10"}},q2:function(){return{nextState:bt}},q10:function(n){if(0>=(r-=1))throw n;return{nextState:"q1",effect:f}}},"q1","retry("+e.name+")")}function kt(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),c=3;r>c;c++)o[c-3]=arguments[c];var a,u,f={done:!1,value:it(t)},i={done:!1,value:st({action:it(t),debounce:gt(n)})},l=function(n){return a=n},s=function(n){return u=n};return mt({q1:function(){return{nextState:"q2",effect:f,stateUpdater:l}},q2:function(){return{nextState:"q3",effect:i,stateUpdater:s}},q3:function(){return u.debounce?{nextState:"q1",effect:(t=a,{done:!1,value:pt.apply(void 0,[e].concat(o,[t]))})}:{nextState:"q2",effect:(n=u.action,{done:!1,value:n}),stateUpdater:l};var n,t}},"q1","debounce("+St(t)+", "+e.name+")")}n.effects=Object.freeze({effectTypes:Hn,take:it,takeMaybe:function(){var n=it.apply(void 0,arguments);return n.payload.maybe=!0,n},put:lt,putResolve:function(){var n=lt.apply(void 0,arguments);return n.payload.resolve=!0,n},all:function(n){var t=ut(On,n);return t.combinator=!0,t},race:st,call:dt,apply:function(n,t,e){return void 0===e&&(e=[]),ut(Nn,vt([n,t],e))},cps:function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(jn,vt(n,e))},fork:pt,spawn:function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ft(pt.apply(void 0,[n].concat(e)))},join:function(n){return ut(Rn,n)},cancel:ht,select:function(n){void 0===n&&(n=O);for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return ut(In,{selector:n,args:e})},actionChannel:yt,cancelled:function(){return ut(Pn,{})},flush:function(n){return ut(_n,n)},getContext:function(n){return ut(Dn,n)},setContext:function(n){return ut(Fn,n)},delay:gt,debounce:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),c=3;r>c;c++)o[c-3]=arguments[c];return pt.apply(void 0,[kt,n,t,e].concat(o))},retry:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),c=3;r>c;c++)o[c-3]=arguments[c];return dt.apply(void 0,[Tt,n,t,e].concat(o))},takeEvery:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[At,n,t].concat(r))},takeLatest:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[xt,n,t].concat(r))},takeLeading:function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;e>o;o++)r[o-2]=arguments[o];return pt.apply(void 0,[Ct,n,t].concat(r))},throttle:function(n,t,e){for(var r=arguments.length,o=Array(r>3?r-3:0),c=3;r>c;c++)o[c-3]=arguments[c];return pt.apply(void 0,[qt,n,t,e].concat(o))}}),n.default=function(n){void 0===n&&(n={});var t,e=n,r=e.context,o=void 0===r?{}:r,c=e.channel,a=void 0===c?Sn():c,u=e.sagaMonitor,f=function(n,t){if(null==n)return{};var e,r,o={},c=Object.keys(n);for(r=0;c.length>r;r++)0>t.indexOf(e=c[r])&&(o[e]=n[e]);return o}(e,["context","channel","sagaMonitor"]);function i(n){return t=ct.bind(null,d({},f,{context:o,channel:a,dispatch:n.dispatch,getState:n.getState,sagaMonitor:u})),function(n){return function(t){u&&u.actionDispatched&&u.actionDispatched(t);var e=n(t);return a.put(t),e}}}return i.run=function(){return t.apply(void 0,arguments)},i.setContext=function(n){L(o,n)},i},n.buffers=nn,n.CANCEL=e,n.SAGA_LOCATION=v,n.runSaga=ct,n.END=yn,n.isEnd=gn,n.eventChannel=function(n,t){void 0===t&&(t=Y());var e,r=!1,o=En(t),c=function(){r||(r=!0,y(e)&&e(),o.close())};return e=w(e=n(function(n){gn(n)?c():o.put(n)})),r&&e(),{take:o.take,flush:o.flush,close:c}},n.channel=En,n.multicastChannel=bn,n.stdChannel=Sn,n.detach=ft,Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "redux-saga",
"version": "1.0.0",
"version": "1.0.1",
"description": "Saga middleware for Redux to handle Side Effects",

@@ -48,3 +48,3 @@ "main": "./dist/redux-saga-core-npm-proxy.cjs.js",

"dependencies": {
"@redux-saga/core": "^1.0.0"
"@redux-saga/core": "^1.0.1"
},

@@ -77,3 +77,3 @@ "devDependencies": {

],
"gitHead": "fc6a2e3d5b1aa37864a13be6db3115ad6afc1f1b"
"gitHead": "876ac7bb9d049e9a0c9526b4396b3fd0364d3181"
}

Sorry, the diff of this file is too big to display

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