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

wonka

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wonka - npm Package Compare versions

Comparing version 0.1.0-2 to 0.1.0-3

bsconfig.json

2

dist/wonka.js

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

function r(r,n,t){for(var e=new Array(t),u=0,f=n;u<t;)e[u]=r[f],u=u+1|0,f=f+1|0;return e}function n(t,e){for(;;){var u=e,f=t,i=f.length,o=i||1,c=o-u.length|0;if(c){if(c<0){e=r(u,o,0|-c),t=f.apply(null,r(u,0,o));continue}return function(r,t){return function(e){return n(r,t.concat([e]))}}(f,u)}return f.apply(null,u)}}function t(r,t){var e=r.length;return 1===e?r(t):function(r,t,e){if(e>7||e<0)return n(r,[t]);switch(e){case 0:case 1:return r(t);case 2:return function(n){return r(t,n)};case 3:return function(n,e){return r(t,n,e)};case 4:return function(n,e,u){return r(t,n,e,u)};case 5:return function(n,e,u,f){return r(t,n,e,u,f)};case 6:return function(n,e,u,f,i){return r(t,n,e,u,f,i)};case 7:return function(n,e,u,f,i,o){return r(t,n,e,u,f,i,o)}}}(r,t,e)}function e(r,t,e){var u=r.length;return 2===u?r(t,e):function(r,t,e,u){if(u>7||u<0)return n(r,[t,e]);switch(u){case 0:case 1:return n(r(t),[e]);case 2:return r(t,e);case 3:return function(n){return r(t,e,n)};case 4:return function(n,u){return r(t,e,n,u)};case 5:return function(n,u,f){return r(t,e,n,u,f)};case 6:return function(n,u,f,i){return r(t,e,n,u,f,i)};case 7:return function(n,u,f,i,o){return r(t,e,n,u,f,i,o)}}}(r,t,e,u)}function u(r,t,e,u){var f=r.length;return 3===f?r(t,e,u):function(r,t,e,u,f){var i=0;if(f>7||f<0)return n(r,[t,e,u]);switch(f){case 0:case 1:i=1;break;case 2:return n(r(t,e),[u]);case 3:return r(t,e,u);case 4:return function(n){return r(t,e,u,n)};case 5:return function(n,f){return r(t,e,u,n,f)};case 6:return function(n,f,i){return r(t,e,u,n,f,i)};case 7:return function(n,f,i,o){return r(t,e,u,n,f,i,o)}}return 1===i?n(r(t),[e,u]):void 0}(r,t,e,u,f)}var f=[0];function i(r){var n=[r,(f[0]+=1,f[0])];return n.tag=248,n}i("Js_exn.Error");function o(r,n){var e=n.length;if(e){for(var u=function(r,n){for(var t=new Array(r),e=0,u=r-1|0;e<=u;++e)t[e]=n;return t}(e,t(r,n[0])),f=1,i=e-1|0;f<=i;++f)u[f]=t(r,n[f]);return u}return[]}i("Array.Bottom");function c(r,n){return n.tag=r,n}function a(){return 0}function l(r,n){var e=[a];return t(r,function(r){return"number"!=typeof r&&(r.tag||(e[0]=r[0])),n(r,e[0])})}function v(r,n){var e=[0,0,0];return t(r,c(0,[function(u){if(0!==u||0!==e[0])return 0;if(e[2]=1,e[1])return 0;return e[1]=1,function(u){for(;;){var f=n();if(f){if(e[2]=0,t(r,c(1,[f[0]])),e[2])continue;return 0}return e[0]=1,t(r,0)}}(),e[1]=0,0}]))}var s=null;function g(r){var n=r.first;if(null!==n){var t=n.next;return null===t?(function(r){r.length=0,r.first=s,r.last=s}(r),[n.content]):(r.length=r.length-1|0,r.first=t,[n.content])}return 0}function p(r){return null!==r?r.h:0}function h(r,n){return null!==n?null!==r?+(r.h>=n.h):0:1}function m(r){var n=r.left;r.left=n.right,n.right=r;var t=p(r.left),e=p(r.right);r.h=(t>e?t:e)+1|0;var u=p(n.left),f=r.h;return n.h=(u>f?u:f)+1|0,n}function y(r){var n=r.right;r.right=n.left,n.left=r;var t=p(r.left),e=p(r.right);r.h=(t>e?t:e)+1|0;var u=p(n.right),f=r.h;return n.h=(u>f?u:f)+1|0,n}function x(r){var n=p(r.left),t=p(r.right);return r.h=(n>t?n:t)+1|0,r}function b(r){var n,t,e=r.left,u=r.right,f=p(e),i=p(u);return f>(2+i|0)?h(e.left,e.right)?x(m(r)):x((t=y((n=r).left),n.left=t,m(n))):i>(2+f|0)?h(u.right,u.left)?x(y(r)):x(function(r){var n=m(r.right);return r.right=n,y(r)}(r)):(r.h=(f>i?f:i)+1|0,r)}var k=null;function d(r,n,t){var e=r.data,u=function r(n,t,e){if(null!==n){var u=n.key;if(t===u)return n.key=t,n.value=e,n;var f=n.right;if(t<u){var i=r(n.left,t,e);n.left=i}else n.right=r(f,t,e);return b(n)}return function(r,n){return{left:null,key:r,value:n,right:null,h:1}}(t,e)}(e,n,t);return u!==e?(r.data=u,0):0}function w(r,n){return function r(n,t){for(;;){var e=n;if(null===e)return 0;r(e.left,t),t(e.key,e.value),n=e.right}}(r.data,n)}function E(r,n){var t=r.key;if(n===t){var e=r.left,u=r.right;return null!==e?null!==u?(r.right=function r(n,t){var e=t.right,u=t.left;return null!==u?(t.left=r(n,u),b(t)):(n.key=t.key,e)}(r,u),b(r)):e:u}if(n<t){var f=r.left;return null!==f?(r.left=E(f,n),b(r)):r}var i=r.right;return null!==i?(r.right=E(i,n),b(r)):r}function L(r,n,e){var u=function(r){return t(e,c(1,[r]))};return t(e,c(0,[function(r){return 0!==r?t(n,u):0}])),t(r,u)}exports.create=function(r,n){return v(n,function(){return t(r,0)})},exports.fromList=function(r,n){var t=[r];return v(n,function(){var r=t[0];return r?(t[0]=r[1],[r[0]]):0})},exports.fromArray=function(r,n){var t=r.length,e=[0];return v(n,function(){if(e[0]<t){var n=[r[e[0]]];return e[0]=e[0]+1|0,n}return 0})},exports.fromValue=function(r,n){var e=[0];return t(n,c(0,[function(u){return 0!==u||e[0]?0:(e[0]=1,t(n,c(1,[r])),t(n,0))}]))},exports.empty=function(r){return t(r,c(0,[function(){return 0}])),t(r,0)},exports.never=function(r){return t(r,c(0,[function(){return 0}]))},exports.map=function(r,n,e){return t(n,function(n){var u;return u="number"==typeof n?0:n.tag?c(1,[t(r,n[0])]):c(0,[n[0]]),t(e,u)})},exports.filter=function(r,n,e){return l(n,function(n,u){return"number"==typeof n||!n.tag||t(r,n[0])?t(e,n):t(u,0)})},exports.scan=function(r,n,u,f){var i=[n];return t(u,function(n){var u;return"number"==typeof n?u=0:n.tag?(i[0]=e(r,i[0],n[0]),u=c(1,[i[0]])):u=c(0,[n[0]]),t(f,u)})},exports.merge=function(r,n){for(var e=r.length,u=o(function(){return a},r),f=[0,0],i=function(r){for(var n=0;;){var f=n;if(!(f<e))return 0;t(u[f],r),n=f+1|0}},l=0;;){var v=l;if(!(v<e))return 0;t(r[v],function(r){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===e?t(n,0):0):o.tag?t(n,o):(u[r]=o[0],f[0]=f[0]+1|0,f[0]===e?t(n,c(0,[i])):0)}}(v)),l=v+1|0}},exports.concat=function(r,n){var e=r.length,u=[a],f=function(i){return i<e?t(r[i],function(r){if("number"==typeof r)return f(i+1|0);if(r.tag)return t(n,r);var e=r[0];return u[0]=e,i||t(n,c(0,[function(r){return t(u[0],r)}])),t(e,0)}):t(n,0)};return f(0)},exports.share=function(r){var n=[{data:k},0,a,0,0];return function(e){var u=n[1];return d(n[0],u,e),n[1]=n[1]+1|0,u||t(r,function(r){return"number"==typeof r?(n[3]=1,w(n[0],function(r,n){return t(n,0)})):r.tag?n[3]?0:(n[4]=0,w(n[0],function(n,e){return t(e,r)})):(n[2]=r[0],0)}),t(e,c(0,[function(r){return 0!==r?(function(r,n){var t=r.data;if(null!==t){var e=E(t,n);e!==t&&(r.data=e)}}(n[0],u),null===n[0].data?(n[3]=1,t(n[2],1)):0):n[4]?0:(n[4]=1,t(n[2],r))}]))}},exports.combine=function(r,n,e){var u=[a,a,0,0,0,0,0];return t(r,function(r){var n=u[3];if("number"==typeof r)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=1,t(e,0));if(r.tag){var f=r[0];return n?u[6]?0:(u[2]=[f],u[4]=0,t(e,c(1,[[f,n[0]]]))):(u[2]=[f],u[4]=0,0)}return u[0]=r[0],0}),t(n,function(r){var n=u[2];if("number"==typeof r)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=1,t(e,0));if(r.tag){var f=r[0];return n?u[6]?0:(u[3]=[f],u[4]=0,t(e,c(1,[[n[0],f]]))):(u[3]=[f],u[4]=0,0)}return u[1]=r[0],0}),t(e,c(0,[function(r){return u[6]?0:0!==r?(u[6]=1,t(u[0],1),t(u[1],1)):u[4]?0:(u[4]=1,t(u[0],r),t(u[1],r))}]))},exports.take=function(r,n,e){var u=[0,a];return t(n,function(n){return"number"==typeof n?u[0]<r?(u[0]=r,t(e,0)):0:n.tag?u[0]<r?(u[0]=u[0]+1|0,t(e,n),u[0]===r?(t(e,0),t(u[1],1)):0):0:(u[1]=n[0],0)}),t(e,c(0,[function(n){return u[0]<r?0!==n?(u[0]=r,t(u[1],1)):t(u[1],0):0}]))},exports.takeLast=function(r,n,e){var u={length:0,first:s,last:s};return l(n,function(n,f){return"number"==typeof n?v(e,function(){return g(u)}):n.tag?(u.length>=r&&r>0&&g(u),function(r,n){var t={content:n,next:s},e=r.last;null!==e?(r.length=r.length+1|0,e.next=t,r.last=t):(r.length=1,r.first=t,r.last=t)}(u,n[0]),t(f,0)):t(f,0)})},exports.takeWhile=function(r,n,e){var u=[0],f=[a];return t(n,function(n){return"number"==typeof n?u[0]?0:(u[0]=1,t(e,0)):n.tag?u[0]?0:t(r,n[0])?t(e,n):(u[0]=1,t(e,0),t(f[0],1)):(f[0]=n[0],t(e,n))}),t(e,c(0,[function(r){return u[0]?0:0!==r?(u[0]=1,t(f[0],1)):t(f[0],0)}]))},exports.takeUntil=function(r,n,e){var u=[0,a,a];return t(n,function(n){return"number"==typeof n?u[0]?0:(t(u[2],1),u[0]=1,t(e,0)):n.tag?u[0]?0:t(e,n):(u[1]=n[0],t(r,function(r){if("number"==typeof r)return 0;if(r.tag)return u[0]=1,t(u[2],1),t(u[1],1),t(e,0);var n=r[0];return u[2]=n,t(n,0)}))}),t(e,c(0,[function(r){return u[0]?0:0!==r?(t(u[1],1),t(u[2],1)):t(u[1],0)}]))},exports.skip=function(r,n,e){var u=[r];return l(n,function(r,n){return"number"==typeof r||!r.tag||u[0]<=0?t(e,r):(u[0]=u[0]-1|0,t(n,0))})},exports.skipWhile=function(r,n,e){var u=[1];return l(n,function(n,f){return"number"!=typeof n&&n.tag&&u[0]?t(r,n[0])?t(f,0):(u[0]=0,t(e,n)):t(e,n)})},exports.skipUntil=function(r,n,e){var u=[1,0,0,a,a];return t(n,function(n){if("number"==typeof n)return u[0]&&t(u[4],1),u[1]=1,t(e,0);if(n.tag)return u[0]&&!u[1]?t(u[3],0):u[1]?0:(u[2]=0,t(e,n));var f=n[0];return u[3]=f,t(r,function(r){if("number"==typeof r)return 0;if(r.tag)return u[0]=0,t(u[4],1);var n=r[0];return u[4]=n,t(n,0),t(f,0)})}),t(e,c(0,[function(r){return 0!==r?(u[0]&&t(u[4],1),u[1]=1,t(u[3],1)):u[2]||u[1]?0:(u[2]=1,t(u[3],0))}]))},exports.flatten=function(r,n){var e=[a,a,0,1];return t(r,function(r){return"number"==typeof r?e[3]?t(n,0):(e[2]=1,0):r.tag?t(r[0],function(r){if("number"==typeof r)return e[2]?t(e[0],1):(e[3]=1,t(e[0],0));if(r.tag)return t(n,r);var u=r[0];return e[3]||t(e[1],1),e[3]=0,e[1]=u,t(u,0)}):(e[0]=r[0],0)}),t(n,c(0,[function(r){return 0!==r?(t(e[0],1),t(e[1],1)):e[3]||e[2]?e[2]?0:t(e[0],0):t(e[1],0)}]))},exports.forEach=function(r,n){return l(n,function(n,e){return"number"==typeof n?0:n.tag?(t(r,n[0]),t(e,0)):t(e,0)})},exports.subscribe=function(r,n){var e=[a],u=[0];return t(n,function(n){return"number"==typeof n?0:n.tag?u[0]?0:(t(r,n[0]),t(e[0],0)):(e[0]=n[0],t(e[0],0))}),function(){return u[0]?0:(u[0]=1,t(e[0],1))}},exports.fromListener=L,exports.fromDomEvent=function(r,n,t){var e=function(r,n,t){r.addEventListener(n,t)},f=function(r,n,t){r.addEventListener(n,t)};return L(function(t){return u(e,r,n,t)},function(t){return u(f,r,n,t)},t)},exports.interval=function(r,n){var e=[0],u=setInterval(function(){var r=e[0];return e[0]=e[0]+1|0,t(n,c(1,[r]))},r);return t(n,c(0,[function(r){return 0!==r?(clearInterval(u),0):0}]))},exports.fromPromise=function(r,n){var e=[0];return r.then(function(r){return e[0]||(t(n,c(1,[r])),t(n,0)),Promise.resolve(0)}),t(n,c(0,[function(r){return 0!==r?(e[0]=1,0):0}]))},exports.debounce=function(r,n,e){var u=[0],f=[0],i=function(){var r=f[0];return r?(f[0]=0,clearTimeout(r[0]),0):0};return t(n,function(n){if("number"==typeof n)return u[0]=1,f[0]?0:t(e,0);if(n.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,t(e,n),u[0]?t(e,0):0},t(r,n[0]))],0;var o=n[0];return t(e,c(0,[function(r){return 0!==r?(i(),t(o,1)):t(o,r)}]))})},exports.throttle=function(r,n,e){var u=[0],f=[0],i=function(){var r=f[0];return r?(clearTimeout(r[0]),0):0};return t(n,function(n){if("number"==typeof n)return i(),t(e,0);if(n.tag)return u[0]?0:(u[0]=1,i(),f[0]=[setTimeout(function(){return f[0]=0,u[0]=0,0},t(r,n[0]))],t(e,n));var o=n[0];return t(e,c(0,[function(r){return 0!==r?(i(),t(o,1)):t(o,r)}]))})},exports.sample=function(r,n,e){var u=[0,0,function(){return 0},function(){return 0}];return t(n,function(r){return"number"==typeof r?(u[0]=1,t(u[3],1),t(e,0)):r.tag?(u[1]=[r[0]],0):(u[2]=r[0],0)}),t(r,function(r){var n=u[1];return"number"==typeof r?(u[0]=1,t(u[2],1),t(e,0)):r.tag?n&&!u[0]?(u[1]=0,t(e,c(1,[n[0]]))):0:(u[3]=r[0],0)}),t(e,c(0,[function(r){return 0!==r?(u[0]=1,t(u[2],1),t(u[3],1)):(t(u[2],0),t(u[3],0))}]))},exports.delay=function(r,n,e){var u=[function(){return 0},0,0];return t(n,function(n){var f=0;if("number"==typeof n)f=1;else{if(!n.tag)return u[0]=n[0],0;f=1}if(1===f)return u[2]?0:(u[1]=u[1]+1|0,setTimeout(function(){return u[2]&&0===u[1]?t(e,0):u[1]=u[1]-1|0,t(e,n)},r),0)}),t(e,c(0,[function(r){return 0!==r?(u[2]=1,u[1]?0:t(e,0)):u[2]?0:t(u[0],r)}]))};
function r(r,n,t){for(var e=new Array(t),u=0,f=n;u<t;)e[u]=r[f],u=u+1|0,f=f+1|0;return e}function n(t,e){for(;;){var u=e,f=t,i=f.length,o=0===i?1:i,c=o-u.length|0;if(0===c)return f.apply(null,u);if(!(c<0))return function(r,t){return function(e){return n(r,t.concat([e]))}}(f,u);e=r(u,o,0|-c),t=f.apply(null,r(u,0,o))}}function t(r,t){var e=r.length;return 1===e?r(t):function(r,t,e){if(e>7||e<0)return n(r,[t]);switch(e){case 0:case 1:return r(t);case 2:return function(n){return r(t,n)};case 3:return function(n,e){return r(t,n,e)};case 4:return function(n,e,u){return r(t,n,e,u)};case 5:return function(n,e,u,f){return r(t,n,e,u,f)};case 6:return function(n,e,u,f,i){return r(t,n,e,u,f,i)};case 7:return function(n,e,u,f,i,o){return r(t,n,e,u,f,i,o)}}}(r,t,e)}function e(r,t,e){var u=r.length;return 2===u?r(t,e):function(r,t,e,u){if(u>7||u<0)return n(r,[t,e]);switch(u){case 0:case 1:return n(r(t),[e]);case 2:return r(t,e);case 3:return function(n){return r(t,e,n)};case 4:return function(n,u){return r(t,e,n,u)};case 5:return function(n,u,f){return r(t,e,n,u,f)};case 6:return function(n,u,f,i){return r(t,e,n,u,f,i)};case 7:return function(n,u,f,i,o){return r(t,e,n,u,f,i,o)}}}(r,t,e,u)}function u(r,t,e,u){var f=r.length;return 3===f?r(t,e,u):function(r,t,e,u,f){var i=0;if(f>7||f<0)return n(r,[t,e,u]);switch(f){case 0:case 1:i=1;break;case 2:return n(r(t,e),[u]);case 3:return r(t,e,u);case 4:return function(n){return r(t,e,u,n)};case 5:return function(n,f){return r(t,e,u,n,f)};case 6:return function(n,f,i){return r(t,e,u,n,f,i)};case 7:return function(n,f,i,o){return r(t,e,u,n,f,i,o)}}return 1===i?n(r(t),[e,u]):void 0}(r,t,e,u,f)}var f=[0];function i(r){var n=[r,(f[0]+=1,f[0])];return n.tag=248,n}i("Js_exn.Error");function o(r,n){var e=n.length;if(0===e)return[];for(var u=function(r,n){for(var t=new Array(r),e=0,u=r-1|0;e<=u;++e)t[e]=n;return t}(e,t(r,n[0])),f=1,i=e-1|0;f<=i;++f)u[f]=t(r,n[f]);return u}i("Array.Bottom");function c(r,n){return n.tag=r,n}function a(){return 0}function l(r,n){var e=[a];return t(r,function(r){return"number"!=typeof r&&(r.tag||(e[0]=r[0])),n(r,e[0])})}function v(r,n){var e=[!1,!1,!1];return t(r,c(0,[function(u){if(u||e[0])return 0;if(e[2]=!0,e[1])return 0;return e[1]=!0,function(u){for(;;){var f=n();if(f){if(e[2]=!1,t(r,c(1,[f[0]])),e[2])continue;return 0}return e[0]=!0,t(r,0)}}(),e[1]=!1,0}]))}var s=null;function g(r){var n=r.first;if(null!==n){var t=n.next;return null===t?(function(r){r.length=0,r.first=s,r.last=s}(r),[n.content]):(r.length=r.length-1|0,r.first=t,[n.content])}return 0}function h(r){return null!==r?r.height:0}function p(r,n){return null===n||null!==r&&r.height>=n.height}function m(r){var n=r.left;r.left=n.right,n.right=r;var t=h(r.left),e=h(r.right);r.height=(t>e?t:e)+1|0;var u=h(n.left),f=r.height;return n.height=(u>f?u:f)+1|0,n}function y(r){var n=r.right;r.right=n.left,n.left=r;var t=h(r.left),e=h(r.right);r.height=(t>e?t:e)+1|0;var u=h(n.right),f=r.height;return n.height=(u>f?u:f)+1|0,n}function x(r){var n=h(r.left),t=h(r.right);return r.height=(n>t?n:t)+1|0,r}function b(r){var n,t,e=r.left,u=r.right,f=h(e),i=h(u);return f>(2+i|0)?p(e.left,e.right)?x(m(r)):x((t=y((n=r).left),n.left=t,m(n))):i>(2+f|0)?p(u.right,u.left)?x(y(r)):x(function(r){var n=m(r.right);return r.right=n,y(r)}(r)):(r.height=(f>i?f:i)+1|0,r)}var k=null;function d(r,n,t){var e=r.data,u=function r(n,t,e){if(null!==n){var u=n.key;if(t===u)return n.key=t,n.value=e,n;var f=n.right;if(t<u){var i=r(n.left,t,e);n.left=i}else n.right=r(f,t,e);return b(n)}return function(r,n){return{key:r,value:n,height:1,left:null,right:null}}(t,e)}(e,n,t);return u!==e?(r.data=u,0):0}function w(r,n){return function r(n,t){for(;;){var e=n;if(null===e)return 0;r(e.left,t),t(e.key,e.value),n=e.right}}(r.data,n)}function E(r,n){var t=r.key;if(n===t){var e=r.left,u=r.right;return null!==e?null!==u?(r.right=function r(n,t){var e=t.right,u=t.left;return null!==u?(t.left=r(n,u),b(t)):(n.key=t.key,e)}(r,u),b(r)):e:u}if(n<t){var f=r.left;return null!==f?(r.left=E(f,n),b(r)):r}var i=r.right;return null!==i?(r.right=E(i,n),b(r)):r}function L(r,n,e){var u=function(r){return t(e,c(1,[r]))};return t(e,c(0,[function(r){return r?t(n,u):0}])),t(r,u)}exports.create=function(r,n){return v(n,function(){return t(r,0)})},exports.fromList=function(r,n){var t=[r];return v(n,function(){var r=t[0];return r?(t[0]=r[1],[r[0]]):0})},exports.fromArray=function(r,n){var t=r.length,e=[0];return v(n,function(){if(e[0]<t){var n=[r[e[0]]];return e[0]=e[0]+1|0,n}return 0})},exports.fromValue=function(r,n){var e=[!1];return t(n,c(0,[function(u){return u||e[0]?0:(e[0]=!0,t(n,c(1,[r])),t(n,0))}]))},exports.empty=function(r){return t(r,c(0,[function(){return 0}])),t(r,0)},exports.never=function(r){return t(r,c(0,[function(){return 0}]))},exports.map=function(r,n,e){return t(n,function(n){var u;return u="number"==typeof n?0:n.tag?c(1,[t(r,n[0])]):c(0,[n[0]]),t(e,u)})},exports.filter=function(r,n,e){return l(n,function(n,u){return"number"==typeof n||!n.tag||t(r,n[0])?t(e,n):t(u,0)})},exports.scan=function(r,n,u,f){var i=[n];return t(u,function(n){var u;return"number"==typeof n?u=0:n.tag?(i[0]=e(r,i[0],n[0]),u=c(1,[i[0]])):u=c(0,[n[0]]),t(f,u)})},exports.merge=function(r,n){for(var e=r.length,u=o(function(){return a},r),f=[0,0],i=function(r){for(var n=0;;){var f=n;if(!(f<e))return 0;t(u[f],r),n=f+1|0}},l=0;;){var v=l;if(!(v<e))return 0;t(r[v],function(r){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===e?t(n,0):0):o.tag?t(n,o):(u[r]=o[0],f[0]=f[0]+1|0,f[0]===e?t(n,c(0,[i])):0)}}(v)),l=v+1|0}},exports.concat=function(r,n){var e=r.length,u=[a],f=function(i){return i<e?t(r[i],function(r){if("number"==typeof r)return f(i+1|0);if(r.tag)return t(n,r);var e=r[0];return u[0]=e,0===i&&t(n,c(0,[function(r){return t(u[0],r)}])),t(e,0)}):t(n,0)};return f(0)},exports.share=function(r){var n=[{data:k},0,a,!1,!1];return function(e){var u=n[1];return d(n[0],u,e),n[1]=n[1]+1|0,0===u&&t(r,function(r){return"number"==typeof r?(n[3]=!0,w(n[0],function(r,n){return t(n,0)})):r.tag?n[3]?0:(n[4]=!1,w(n[0],function(n,e){return t(e,r)})):(n[2]=r[0],0)}),t(e,c(0,[function(r){return r?(function(r,n){var t=r.data;if(null!==t){var e=E(t,n);e!==t&&(r.data=e)}}(n[0],u),null===n[0].data?(n[3]=!0,t(n[2],1)):0):n[4]?0:(n[4]=!0,t(n[2],r))}]))}},exports.combine=function(r,n,e){var u=[a,a,0,0,!1,0,!1];return t(r,function(r){var n=u[3];if("number"==typeof r)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=!0,t(e,0));if(r.tag){var f=r[0];return n?u[6]?0:(u[2]=[f],u[4]=!1,t(e,c(1,[[f,n[0]]]))):(u[2]=[f],u[4]=!1,0)}return u[0]=r[0],0}),t(n,function(r){var n=u[2];if("number"==typeof r)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=!0,t(e,0));if(r.tag){var f=r[0];return n?u[6]?0:(u[3]=[f],u[4]=!1,t(e,c(1,[[n[0],f]]))):(u[3]=[f],u[4]=!1,0)}return u[1]=r[0],0}),t(e,c(0,[function(r){return u[6]?0:r?(u[6]=!0,t(u[0],1),t(u[1],1)):u[4]?0:(u[4]=!0,t(u[0],r),t(u[1],r))}]))},exports.take=function(r,n,e){var u=[0,a];return t(n,function(n){return"number"==typeof n?u[0]<r?(u[0]=r,t(e,0)):0:n.tag?u[0]<r?(u[0]=u[0]+1|0,t(e,n),u[0]===r?(t(e,0),t(u[1],1)):0):0:(u[1]=n[0],0)}),t(e,c(0,[function(n){return u[0]<r?n?(u[0]=r,t(u[1],1)):t(u[1],0):0}]))},exports.takeLast=function(r,n,e){var u={length:0,first:s,last:s};return l(n,function(n,f){return"number"==typeof n?v(e,function(){return g(u)}):n.tag?(u.length>=r&&r>0&&g(u),function(r,n){var t={content:n,next:s},e=r.last;null!==e?(r.length=r.length+1|0,e.next=t,r.last=t):(r.length=1,r.first=t,r.last=t)}(u,n[0]),t(f,0)):t(f,0)})},exports.takeWhile=function(r,n,e){var u=[!1],f=[a];return t(n,function(n){return"number"==typeof n?u[0]?0:(u[0]=!0,t(e,0)):n.tag?u[0]?0:t(r,n[0])?t(e,n):(u[0]=!0,t(e,0),t(f[0],1)):(f[0]=n[0],t(e,n))}),t(e,c(0,[function(r){return u[0]?0:r?(u[0]=!0,t(f[0],1)):t(f[0],0)}]))},exports.takeUntil=function(r,n,e){var u=[!1,a,a];return t(n,function(n){return"number"==typeof n?u[0]?0:(t(u[2],1),u[0]=!0,t(e,0)):n.tag?u[0]?0:t(e,n):(u[1]=n[0],t(r,function(r){if("number"==typeof r)return 0;if(r.tag)return u[0]=!0,t(u[2],1),t(u[1],1),t(e,0);var n=r[0];return u[2]=n,t(n,0)}))}),t(e,c(0,[function(r){return u[0]?0:r?(t(u[1],1),t(u[2],1)):t(u[1],0)}]))},exports.skip=function(r,n,e){var u=[r];return l(n,function(r,n){return"number"==typeof r||!r.tag||u[0]<=0?t(e,r):(u[0]=u[0]-1|0,t(n,0))})},exports.skipWhile=function(r,n,e){var u=[!0];return l(n,function(n,f){return"number"!=typeof n&&n.tag&&u[0]?t(r,n[0])?t(f,0):(u[0]=!1,t(e,n)):t(e,n)})},exports.skipUntil=function(r,n,e){var u=[!0,!1,!1,a,a];return t(n,function(n){if("number"==typeof n)return u[0]&&t(u[4],1),u[1]=!0,t(e,0);if(n.tag)return u[0]&&!u[1]?t(u[3],0):u[1]?0:(u[2]=!1,t(e,n));var f=n[0];return u[3]=f,t(r,function(r){if("number"==typeof r)return 0;if(r.tag)return u[0]=!1,t(u[4],1);var n=r[0];return u[4]=n,t(n,0),t(f,0)})}),t(e,c(0,[function(r){return r?(u[0]&&t(u[4],1),u[1]=!0,t(u[3],1)):u[2]||u[1]?0:(u[2]=!0,t(u[3],0))}]))},exports.flatten=function(r,n){var e=[a,a,!1,!0];return t(r,function(r){return"number"==typeof r?e[3]?t(n,0):(e[2]=!0,0):r.tag?t(r[0],function(r){if("number"==typeof r)return e[2]?t(e[0],1):(e[3]=!0,t(e[0],0));if(r.tag)return t(n,r);var u=r[0];return e[3]||t(e[1],1),e[3]=!1,e[1]=u,t(u,0)}):(e[0]=r[0],0)}),t(n,c(0,[function(r){return r?(t(e[0],1),t(e[1],1)):e[3]||e[2]?e[2]?0:t(e[0],0):t(e[1],0)}]))},exports.forEach=function(r,n){return l(n,function(n,e){return"number"==typeof n?0:n.tag?(t(r,n[0]),t(e,0)):t(e,0)})},exports.subscribe=function(r,n){var e=[a],u=[!1];return t(n,function(n){return"number"==typeof n?0:n.tag?u[0]?0:(t(r,n[0]),t(e[0],0)):(e[0]=n[0],t(e[0],0))}),function(){return u[0]?0:(u[0]=!0,t(e[0],1))}},exports.fromListener=L,exports.fromDomEvent=function(r,n,t){var e=function(r,n,t){r.addEventListener(n,t)},f=function(r,n,t){r.removeEventListener(n,t)};return L(function(t){return u(e,r,n,t)},function(t){return u(f,r,n,t)},t)},exports.interval=function(r,n){var e=[0],u=setInterval(function(){var r=e[0];return e[0]=e[0]+1|0,t(n,c(1,[r]))},r);return t(n,c(0,[function(r){return r?(clearInterval(u),0):0}]))},exports.fromPromise=function(r,n){var e=[!1];return r.then(function(r){return e[0]||(t(n,c(1,[r])),t(n,0)),Promise.resolve(0)}),t(n,c(0,[function(r){return r?(e[0]=!0,0):0}]))},exports.debounce=function(r,n,e){var u=[!1],f=[0],i=function(){var r=f[0];return r?(f[0]=0,clearTimeout(r[0]),0):0};return t(n,function(n){if("number"==typeof n)return u[0]=!0,f[0]?0:t(e,0);if(n.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,t(e,n),u[0]?t(e,0):0},t(r,n[0]))],0;var o=n[0];return t(e,c(0,[function(r){return r?(i(),t(o,1)):t(o,r)}]))})},exports.throttle=function(r,n,e){var u=[!1],f=[0],i=function(){var r=f[0];return r?(clearTimeout(r[0]),0):0};return t(n,function(n){if("number"==typeof n)return i(),t(e,0);if(n.tag)return u[0]?0:(u[0]=!0,i(),f[0]=[setTimeout(function(){return f[0]=0,u[0]=!1,0},t(r,n[0]))],t(e,n));var o=n[0];return t(e,c(0,[function(r){return r?(i(),t(o,1)):t(o,r)}]))})},exports.sample=function(r,n,e){var u=[!1,0,function(){return 0},function(){return 0}];return t(n,function(r){return"number"==typeof r?(u[0]=!0,t(u[3],1),t(e,0)):r.tag?(u[1]=[r[0]],0):(u[2]=r[0],0)}),t(r,function(r){var n=u[1];return"number"==typeof r?(u[0]=!0,t(u[2],1),t(e,0)):r.tag?n&&!u[0]?(u[1]=0,t(e,c(1,[n[0]]))):0:(u[3]=r[0],0)}),t(e,c(0,[function(r){return r?(u[0]=!0,t(u[2],1),t(u[3],1)):(t(u[2],0),t(u[3],0))}]))},exports.delay=function(r,n,e){var u=[function(){return 0},0,!1];return t(n,function(n){return"number"==typeof n||n.tag?u[2]?0:(u[1]=u[1]+1|0,setTimeout(function(){return u[2]&&0===u[1]?t(e,0):u[1]=u[1]-1|0,t(e,n)},r),0):(u[0]=n[0],0)}),t(e,c(0,[function(r){return r?(u[2]=!0,0===u[1]?t(e,0):0):u[2]?0:t(u[0],r)}]))};
//# sourceMappingURL=wonka.js.map

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

function n(n,r,t){for(var u=new Array(t),e=0,f=r;e<t;)u[e]=n[f],e=e+1|0,f=f+1|0;return u}function r(t,u){for(;;){var e=u,f=t,i=f.length,o=i||1,c=o-e.length|0;if(c){if(c<0){u=n(e,o,0|-c),t=f.apply(null,n(e,0,o));continue}return function(n,t){return function(u){return r(n,t.concat([u]))}}(f,e)}return f.apply(null,e)}}function t(n,t){var u=n.length;return 1===u?n(t):function(n,t,u){if(u>7||u<0)return r(n,[t]);switch(u){case 0:case 1:return n(t);case 2:return function(r){return n(t,r)};case 3:return function(r,u){return n(t,r,u)};case 4:return function(r,u,e){return n(t,r,u,e)};case 5:return function(r,u,e,f){return n(t,r,u,e,f)};case 6:return function(r,u,e,f,i){return n(t,r,u,e,f,i)};case 7:return function(r,u,e,f,i,o){return n(t,r,u,e,f,i,o)}}}(n,t,u)}function u(n,t,u){var e=n.length;return 2===e?n(t,u):function(n,t,u,e){if(e>7||e<0)return r(n,[t,u]);switch(e){case 0:case 1:return r(n(t),[u]);case 2:return n(t,u);case 3:return function(r){return n(t,u,r)};case 4:return function(r,e){return n(t,u,r,e)};case 5:return function(r,e,f){return n(t,u,r,e,f)};case 6:return function(r,e,f,i){return n(t,u,r,e,f,i)};case 7:return function(r,e,f,i,o){return n(t,u,r,e,f,i,o)}}}(n,t,u,e)}function e(n,t,u,e){var f=n.length;return 3===f?n(t,u,e):function(n,t,u,e,f){var i=0;if(f>7||f<0)return r(n,[t,u,e]);switch(f){case 0:case 1:i=1;break;case 2:return r(n(t,u),[e]);case 3:return n(t,u,e);case 4:return function(r){return n(t,u,e,r)};case 5:return function(r,f){return n(t,u,e,r,f)};case 6:return function(r,f,i){return n(t,u,e,r,f,i)};case 7:return function(r,f,i,o){return n(t,u,e,r,f,i,o)}}return 1===i?r(n(t),[u,e]):void 0}(n,t,u,e,f)}var f=[0];function i(n){var r=[n,(f[0]+=1,f[0])];return r.tag=248,r}i("Js_exn.Error");function o(n,r){var u=r.length;if(u){for(var e=function(n,r){for(var t=new Array(n),u=0,e=n-1|0;u<=e;++u)t[u]=r;return t}(u,t(n,r[0])),f=1,i=u-1|0;f<=i;++f)e[f]=t(n,r[f]);return e}return[]}i("Array.Bottom");function c(n,r){return r.tag=n,r}function a(){return 0}function l(n,r){var u=[a];return t(n,function(n){return"number"!=typeof n&&(n.tag||(u[0]=n[0])),r(n,u[0])})}function v(n,r){var u=[0,0,0];return t(n,c(0,[function(e){if(0!==e||0!==u[0])return 0;if(u[2]=1,u[1])return 0;return u[1]=1,function(e){for(;;){var f=r();if(f){if(u[2]=0,t(n,c(1,[f[0]])),u[2])continue;return 0}return u[0]=1,t(n,0)}}(),u[1]=0,0}]))}var g=null;function h(n){var r=n.first;if(null!==r){var t=r.next;return null===t?(function(n){n.length=0,n.first=g,n.last=g}(n),[r.content]):(n.length=n.length-1|0,n.first=t,[r.content])}return 0}function s(n){return null!==n?n.h:0}function y(n,r){return null!==r?null!==n?+(n.h>=r.h):0:1}function m(n){var r=n.left;n.left=r.right,r.right=n;var t=s(n.left),u=s(n.right);n.h=(t>u?t:u)+1|0;var e=s(r.left),f=n.h;return r.h=(e>f?e:f)+1|0,r}function p(n){var r=n.right;n.right=r.left,r.left=n;var t=s(n.left),u=s(n.right);n.h=(t>u?t:u)+1|0;var e=s(r.right),f=n.h;return r.h=(e>f?e:f)+1|0,r}function b(n){var r=s(n.left),t=s(n.right);return n.h=(r>t?r:t)+1|0,n}function d(n){var r,t,u=n.left,e=n.right,f=s(u),i=s(e);return f>(2+i|0)?y(u.left,u.right)?b(m(n)):b((t=p((r=n).left),r.left=t,m(r))):i>(2+f|0)?y(e.right,e.left)?b(p(n)):b(function(n){var r=m(n.right);return n.right=r,p(n)}(n)):(n.h=(f>i?f:i)+1|0,n)}var k=null;function w(n,r,t){var u=n.data,e=function n(r,t,u){if(null!==r){var e=r.key;if(t===e)return r.key=t,r.value=u,r;var f=r.right;if(t<e){var i=n(r.left,t,u);r.left=i}else r.right=n(f,t,u);return d(r)}return function(n,r){return{left:null,key:n,value:r,right:null,h:1}}(t,u)}(u,r,t);return e!==u?(n.data=e,0):0}function x(n,r){return function n(r,t){for(;;){var u=r;if(null===u)return 0;n(u.left,t),t(u.key,u.value),r=u.right}}(n.data,r)}function T(n,r){var t=n.key;if(r===t){var u=n.left,e=n.right;return null!==u?null!==e?(n.right=function n(r,t){var u=t.right,e=t.left;return null!==e?(t.left=n(r,e),d(t)):(r.key=t.key,u)}(n,e),d(n)):u:e}if(r<t){var f=n.left;return null!==f?(n.left=T(f,r),d(n)):n}var i=n.right;return null!==i?(n.right=T(i,r),d(n)):n}function E(n,r){return v(r,function(){return t(n,0)})}function A(n,r){var t=[n];return v(r,function(){var n=t[0];return n?(t[0]=n[1],[n[0]]):0})}function I(n,r){var t=n.length,u=[0];return v(r,function(){if(u[0]<t){var r=[n[u[0]]];return u[0]=u[0]+1|0,r}return 0})}function L(n,r){var u=[0];return t(r,c(0,[function(e){return 0!==e||u[0]?0:(u[0]=1,t(r,c(1,[n])),t(r,0))}]))}function B(n){return t(n,c(0,[function(){return 0}])),t(n,0)}function J(n){return t(n,c(0,[function(){return 0}]))}function P(n,r,u){return t(r,function(r){var e;return e="number"==typeof r?0:r.tag?c(1,[t(n,r[0])]):c(0,[r[0]]),t(u,e)})}function _(n,r,u){return l(r,function(r,e){return"number"==typeof r||!r.tag||t(n,r[0])?t(u,r):t(e,0)})}function j(n,r,e,f){var i=[r];return t(e,function(r){var e;return"number"==typeof r?e=0:r.tag?(i[0]=u(n,i[0],r[0]),e=c(1,[i[0]])):e=c(0,[r[0]]),t(f,e)})}function q(n,r){for(var u=n.length,e=o(function(){return a},n),f=[0,0],i=function(n){for(var r=0;;){var f=r;if(!(f<u))return 0;t(e[f],n),r=f+1|0}},l=0;;){var v=l;if(!(v<u))return 0;t(n[v],function(n){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===u?t(r,0):0):o.tag?t(r,o):(e[n]=o[0],f[0]=f[0]+1|0,f[0]===u?t(r,c(0,[i])):0)}}(v)),l=v+1|0}}function z(n,r){var u=n.length,e=[a],f=function(i){return i<u?t(n[i],function(n){if("number"==typeof n)return f(i+1|0);if(n.tag)return t(r,n);var u=n[0];return e[0]=u,i||t(r,c(0,[function(n){return t(e[0],n)}])),t(u,0)}):t(r,0)};return f(0)}function C(n){var r=[{data:k},0,a,0,0];return function(u){var e=r[1];return w(r[0],e,u),r[1]=r[1]+1|0,e||t(n,function(n){return"number"==typeof n?(r[3]=1,x(r[0],function(n,r){return t(r,0)})):n.tag?r[3]?0:(r[4]=0,x(r[0],function(r,u){return t(u,n)})):(r[2]=n[0],0)}),t(u,c(0,[function(n){return 0!==n?(function(n,r){var t=n.data;if(null!==t){var u=T(t,r);return u!==t?(n.data=u,0):0}}(r[0],e),null===r[0].data?(r[3]=1,t(r[2],1)):0):r[4]?0:(r[4]=1,t(r[2],n))}]))}}function D(n,r,u){var e=[a,a,0,0,0,0,0];return t(n,function(n){var r=e[3];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=1,t(u,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[2]=[f],e[4]=0,t(u,c(1,[[f,r[0]]]))):(e[2]=[f],e[4]=0,0)}return e[0]=n[0],0}),t(r,function(n){var r=e[2];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=1,t(u,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[3]=[f],e[4]=0,t(u,c(1,[[r[0],f]]))):(e[3]=[f],e[4]=0,0)}return e[1]=n[0],0}),t(u,c(0,[function(n){return e[6]?0:0!==n?(e[6]=1,t(e[0],1),t(e[1],1)):e[4]?0:(e[4]=1,t(e[0],n),t(e[1],n))}]))}function F(n,r,u){var e=[0,a];return t(r,function(r){return"number"==typeof r?e[0]<n?(e[0]=n,t(u,0)):0:r.tag?e[0]<n?(e[0]=e[0]+1|0,t(u,r),e[0]===n?(t(u,0),t(e[1],1)):0):0:(e[1]=r[0],0)}),t(u,c(0,[function(r){return e[0]<n?0!==r?(e[0]=n,t(e[1],1)):t(e[1],0):0}]))}function G(n,r,u){var e={length:0,first:g,last:g};return l(r,function(r,f){return"number"==typeof r?v(u,function(){return h(e)}):r.tag?(e.length>=n&&n>0&&h(e),function(n,r){var t={content:r,next:g},u=n.last;null!==u?(n.length=n.length+1|0,u.next=t,n.last=t):(n.length=1,n.first=t,n.last=t)}(e,r[0]),t(f,0)):t(f,0)})}function H(n,r,u){var e=[0],f=[a];return t(r,function(r){return"number"==typeof r?e[0]?0:(e[0]=1,t(u,0)):r.tag?e[0]?0:t(n,r[0])?t(u,r):(e[0]=1,t(u,0),t(f[0],1)):(f[0]=r[0],t(u,r))}),t(u,c(0,[function(n){return e[0]?0:0!==n?(e[0]=1,t(f[0],1)):t(f[0],0)}]))}function K(n,r,u){var e=[0,a,a];return t(r,function(r){return"number"==typeof r?e[0]?0:(t(e[2],1),e[0]=1,t(u,0)):r.tag?e[0]?0:t(u,r):(e[1]=r[0],t(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=1,t(e[2],1),t(e[1],1),t(u,0);var r=n[0];return e[2]=r,t(r,0)}))}),t(u,c(0,[function(n){return e[0]?0:0!==n?(t(e[1],1),t(e[2],1)):t(e[1],0)}]))}function M(n,r,u){var e=[n];return l(r,function(n,r){return"number"==typeof n||!n.tag||e[0]<=0?t(u,n):(e[0]=e[0]-1|0,t(r,0))})}function N(n,r,u){var e=[1];return l(r,function(r,f){return"number"!=typeof r&&r.tag&&e[0]?t(n,r[0])?t(f,0):(e[0]=0,t(u,r)):t(u,r)})}function O(n,r,u){var e=[1,0,0,a,a];return t(r,function(r){if("number"==typeof r)return e[0]&&t(e[4],1),e[1]=1,t(u,0);if(r.tag)return e[0]&&!e[1]?t(e[3],0):e[1]?0:(e[2]=0,t(u,r));var f=r[0];return e[3]=f,t(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=0,t(e[4],1);var r=n[0];return e[4]=r,t(r,0),t(f,0)})}),t(u,c(0,[function(n){return 0!==n?(e[0]&&t(e[4],1),e[1]=1,t(e[3],1)):e[2]||e[1]?0:(e[2]=1,t(e[3],0))}]))}function Q(n,r){var u=[a,a,0,1];return t(n,function(n){return"number"==typeof n?u[3]?t(r,0):(u[2]=1,0):n.tag?t(n[0],function(n){if("number"==typeof n)return u[2]?t(u[0],1):(u[3]=1,t(u[0],0));if(n.tag)return t(r,n);var e=n[0];return u[3]||t(u[1],1),u[3]=0,u[1]=e,t(e,0)}):(u[0]=n[0],0)}),t(r,c(0,[function(n){return 0!==n?(t(u[0],1),t(u[1],1)):u[3]||u[2]?u[2]?0:t(u[0],0):t(u[1],0)}]))}function R(n,r){return l(r,function(r,u){return"number"==typeof r?0:r.tag?(t(n,r[0]),t(u,0)):t(u,0)})}function S(n,r){var u=[a],e=[0];return t(r,function(r){return"number"==typeof r?0:r.tag?e[0]?0:(t(n,r[0]),t(u[0],0)):(u[0]=r[0],t(u[0],0))}),function(){return e[0]?0:(e[0]=1,t(u[0],1))}}function U(n,r,u){var e=function(n){return t(u,c(1,[n]))};return t(u,c(0,[function(n){return 0!==n?t(r,e):0}])),t(n,e)}function V(n,r,t){var u=function(n,r,t){n.addEventListener(r,t)},f=function(n,r,t){n.addEventListener(r,t)};return U(function(t){return e(u,n,r,t)},function(t){return e(f,n,r,t)},t)}function W(n,r){var u=[0],e=setInterval(function(){var n=u[0];return u[0]=u[0]+1|0,t(r,c(1,[n]))},n);return t(r,c(0,[function(n){return 0!==n?(clearInterval(e),0):0}]))}function X(n,r){var u=[0];return n.then(function(n){return u[0]||(t(r,c(1,[n])),t(r,0)),Promise.resolve(0)}),t(r,c(0,[function(n){return 0!==n?(u[0]=1,0):0}]))}function Y(n,r,u){var e=[0],f=[0],i=function(){var n=f[0];return n?(f[0]=0,clearTimeout(n[0]),0):0};return t(r,function(r){if("number"==typeof r)return e[0]=1,f[0]?0:t(u,0);if(r.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,t(u,r),e[0]?t(u,0):0},t(n,r[0]))],0;var o=r[0];return t(u,c(0,[function(n){return 0!==n?(i(),t(o,1)):t(o,n)}]))})}function Z(n,r,u){var e=[0],f=[0],i=function(){var n=f[0];return n?(clearTimeout(n[0]),0):0};return t(r,function(r){if("number"==typeof r)return i(),t(u,0);if(r.tag)return e[0]?0:(e[0]=1,i(),f[0]=[setTimeout(function(){return f[0]=0,e[0]=0,0},t(n,r[0]))],t(u,r));var o=r[0];return t(u,c(0,[function(n){return 0!==n?(i(),t(o,1)):t(o,n)}]))})}function $(n,r,u){var e=[0,0,function(){return 0},function(){return 0}];return t(r,function(n){return"number"==typeof n?(e[0]=1,t(e[3],1),t(u,0)):n.tag?(e[1]=[n[0]],0):(e[2]=n[0],0)}),t(n,function(n){var r=e[1];return"number"==typeof n?(e[0]=1,t(e[2],1),t(u,0)):n.tag?r&&!e[0]?(e[1]=0,t(u,c(1,[r[0]]))):0:(e[3]=n[0],0)}),t(u,c(0,[function(n){return 0!==n?(e[0]=1,t(e[2],1),t(e[3],1)):(t(e[2],0),t(e[3],0))}]))}function nn(n,r,u){var e=[function(){return 0},0,0];return t(r,function(r){var f=0;if("number"==typeof r)f=1;else{if(!r.tag)return e[0]=r[0],0;f=1}if(1===f)return e[2]?0:(e[1]=e[1]+1|0,setTimeout(function(){return e[2]&&0===e[1]?t(u,0):e[1]=e[1]-1|0,t(u,r)},n),0)}),t(u,c(0,[function(n){return 0!==n?(e[2]=1,e[1]?0:t(u,0)):e[2]?0:t(e[0],n)}]))}export{E as create,A as fromList,I as fromArray,L as fromValue,B as empty,J as never,P as map,_ as filter,j as scan,q as merge,z as concat,C as share,D as combine,F as take,G as takeLast,H as takeWhile,K as takeUntil,M as skip,N as skipWhile,O as skipUntil,Q as flatten,R as forEach,S as subscribe,U as fromListener,V as fromDomEvent,W as interval,X as fromPromise,Y as debounce,Z as throttle,$ as sample,nn as delay};
function n(n,r,t){for(var u=new Array(t),e=0,f=r;e<t;)u[e]=n[f],e=e+1|0,f=f+1|0;return u}function r(t,u){for(;;){var e=u,f=t,i=f.length,o=0===i?1:i,c=o-e.length|0;if(0===c)return f.apply(null,e);if(!(c<0))return function(n,t){return function(u){return r(n,t.concat([u]))}}(f,e);u=n(e,o,0|-c),t=f.apply(null,n(e,0,o))}}function t(n,t){var u=n.length;return 1===u?n(t):function(n,t,u){if(u>7||u<0)return r(n,[t]);switch(u){case 0:case 1:return n(t);case 2:return function(r){return n(t,r)};case 3:return function(r,u){return n(t,r,u)};case 4:return function(r,u,e){return n(t,r,u,e)};case 5:return function(r,u,e,f){return n(t,r,u,e,f)};case 6:return function(r,u,e,f,i){return n(t,r,u,e,f,i)};case 7:return function(r,u,e,f,i,o){return n(t,r,u,e,f,i,o)}}}(n,t,u)}function u(n,t,u){var e=n.length;return 2===e?n(t,u):function(n,t,u,e){if(e>7||e<0)return r(n,[t,u]);switch(e){case 0:case 1:return r(n(t),[u]);case 2:return n(t,u);case 3:return function(r){return n(t,u,r)};case 4:return function(r,e){return n(t,u,r,e)};case 5:return function(r,e,f){return n(t,u,r,e,f)};case 6:return function(r,e,f,i){return n(t,u,r,e,f,i)};case 7:return function(r,e,f,i,o){return n(t,u,r,e,f,i,o)}}}(n,t,u,e)}function e(n,t,u,e){var f=n.length;return 3===f?n(t,u,e):function(n,t,u,e,f){var i=0;if(f>7||f<0)return r(n,[t,u,e]);switch(f){case 0:case 1:i=1;break;case 2:return r(n(t,u),[e]);case 3:return n(t,u,e);case 4:return function(r){return n(t,u,e,r)};case 5:return function(r,f){return n(t,u,e,r,f)};case 6:return function(r,f,i){return n(t,u,e,r,f,i)};case 7:return function(r,f,i,o){return n(t,u,e,r,f,i,o)}}return 1===i?r(n(t),[u,e]):void 0}(n,t,u,e,f)}var f=[0];function i(n){var r=[n,(f[0]+=1,f[0])];return r.tag=248,r}i("Js_exn.Error");function o(n,r){var u=r.length;if(0===u)return[];for(var e=function(n,r){for(var t=new Array(n),u=0,e=n-1|0;u<=e;++u)t[u]=r;return t}(u,t(n,r[0])),f=1,i=u-1|0;f<=i;++f)e[f]=t(n,r[f]);return e}i("Array.Bottom");function c(n,r){return r.tag=n,r}function a(){return 0}function v(n,r){var u=[a];return t(n,function(n){return"number"!=typeof n&&(n.tag||(u[0]=n[0])),r(n,u[0])})}function l(n,r){var u=[!1,!1,!1];return t(n,c(0,[function(e){if(e||u[0])return 0;if(u[2]=!0,u[1])return 0;return u[1]=!0,function(e){for(;;){var f=r();if(f){if(u[2]=!1,t(n,c(1,[f[0]])),u[2])continue;return 0}return u[0]=!0,t(n,0)}}(),u[1]=!1,0}]))}var g=null;function h(n){var r=n.first;if(null!==r){var t=r.next;return null===t?(function(n){n.length=0,n.first=g,n.last=g}(n),[r.content]):(n.length=n.length-1|0,n.first=t,[r.content])}return 0}function s(n){return null!==n?n.height:0}function y(n,r){return null===r||null!==n&&n.height>=r.height}function m(n){var r=n.left;n.left=r.right,r.right=n;var t=s(n.left),u=s(n.right);n.height=(t>u?t:u)+1|0;var e=s(r.left),f=n.height;return r.height=(e>f?e:f)+1|0,r}function p(n){var r=n.right;n.right=r.left,r.left=n;var t=s(n.left),u=s(n.right);n.height=(t>u?t:u)+1|0;var e=s(r.right),f=n.height;return r.height=(e>f?e:f)+1|0,r}function b(n){var r=s(n.left),t=s(n.right);return n.height=(r>t?r:t)+1|0,n}function d(n){var r,t,u=n.left,e=n.right,f=s(u),i=s(e);return f>(2+i|0)?y(u.left,u.right)?b(m(n)):b((t=p((r=n).left),r.left=t,m(r))):i>(2+f|0)?y(e.right,e.left)?b(p(n)):b(function(n){var r=m(n.right);return n.right=r,p(n)}(n)):(n.height=(f>i?f:i)+1|0,n)}var k=null;function w(n,r,t){var u=n.data,e=function n(r,t,u){if(null!==r){var e=r.key;if(t===e)return r.key=t,r.value=u,r;var f=r.right;if(t<e){var i=n(r.left,t,u);r.left=i}else r.right=n(f,t,u);return d(r)}return function(n,r){return{key:n,value:r,height:1,left:null,right:null}}(t,u)}(u,r,t);return e!==u?(n.data=e,0):0}function x(n,r){return function n(r,t){for(;;){var u=r;if(null===u)return 0;n(u.left,t),t(u.key,u.value),r=u.right}}(n.data,r)}function T(n,r){var t=n.key;if(r===t){var u=n.left,e=n.right;return null!==u?null!==e?(n.right=function n(r,t){var u=t.right,e=t.left;return null!==e?(t.left=n(r,e),d(t)):(r.key=t.key,u)}(n,e),d(n)):u:e}if(r<t){var f=n.left;return null!==f?(n.left=T(f,r),d(n)):n}var i=n.right;return null!==i?(n.right=T(i,r),d(n)):n}function A(n,r){return l(r,function(){return t(n,0)})}function E(n,r){var t=[n];return l(r,function(){var n=t[0];return n?(t[0]=n[1],[n[0]]):0})}function I(n,r){var t=n.length,u=[0];return l(r,function(){if(u[0]<t){var r=[n[u[0]]];return u[0]=u[0]+1|0,r}return 0})}function L(n,r){var u=[!1];return t(r,c(0,[function(e){return e||u[0]?0:(u[0]=!0,t(r,c(1,[n])),t(r,0))}]))}function B(n){return t(n,c(0,[function(){return 0}])),t(n,0)}function J(n){return t(n,c(0,[function(){return 0}]))}function P(n,r,u){return t(r,function(r){var e;return e="number"==typeof r?0:r.tag?c(1,[t(n,r[0])]):c(0,[r[0]]),t(u,e)})}function _(n,r,u){return v(r,function(r,e){return"number"==typeof r||!r.tag||t(n,r[0])?t(u,r):t(e,0)})}function j(n,r,e,f){var i=[r];return t(e,function(r){var e;return"number"==typeof r?e=0:r.tag?(i[0]=u(n,i[0],r[0]),e=c(1,[i[0]])):e=c(0,[r[0]]),t(f,e)})}function q(n,r){for(var u=n.length,e=o(function(){return a},n),f=[0,0],i=function(n){for(var r=0;;){var f=r;if(!(f<u))return 0;t(e[f],n),r=f+1|0}},v=0;;){var l=v;if(!(l<u))return 0;t(n[l],function(n){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===u?t(r,0):0):o.tag?t(r,o):(e[n]=o[0],f[0]=f[0]+1|0,f[0]===u?t(r,c(0,[i])):0)}}(l)),v=l+1|0}}function z(n,r){var u=n.length,e=[a],f=function(i){return i<u?t(n[i],function(n){if("number"==typeof n)return f(i+1|0);if(n.tag)return t(r,n);var u=n[0];return e[0]=u,0===i&&t(r,c(0,[function(n){return t(e[0],n)}])),t(u,0)}):t(r,0)};return f(0)}function C(n){var r=[{data:k},0,a,!1,!1];return function(u){var e=r[1];return w(r[0],e,u),r[1]=r[1]+1|0,0===e&&t(n,function(n){return"number"==typeof n?(r[3]=!0,x(r[0],function(n,r){return t(r,0)})):n.tag?r[3]?0:(r[4]=!1,x(r[0],function(r,u){return t(u,n)})):(r[2]=n[0],0)}),t(u,c(0,[function(n){return n?(function(n,r){var t=n.data;if(null!==t){var u=T(t,r);return u!==t?(n.data=u,0):0}}(r[0],e),null===r[0].data?(r[3]=!0,t(r[2],1)):0):r[4]?0:(r[4]=!0,t(r[2],n))}]))}}function D(n,r,u){var e=[a,a,0,0,!1,0,!1];return t(n,function(n){var r=e[3];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=!0,t(u,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[2]=[f],e[4]=!1,t(u,c(1,[[f,r[0]]]))):(e[2]=[f],e[4]=!1,0)}return e[0]=n[0],0}),t(r,function(n){var r=e[2];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=!0,t(u,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[3]=[f],e[4]=!1,t(u,c(1,[[r[0],f]]))):(e[3]=[f],e[4]=!1,0)}return e[1]=n[0],0}),t(u,c(0,[function(n){return e[6]?0:n?(e[6]=!0,t(e[0],1),t(e[1],1)):e[4]?0:(e[4]=!0,t(e[0],n),t(e[1],n))}]))}function F(n,r,u){var e=[0,a];return t(r,function(r){return"number"==typeof r?e[0]<n?(e[0]=n,t(u,0)):0:r.tag?e[0]<n?(e[0]=e[0]+1|0,t(u,r),e[0]===n?(t(u,0),t(e[1],1)):0):0:(e[1]=r[0],0)}),t(u,c(0,[function(r){return e[0]<n?r?(e[0]=n,t(e[1],1)):t(e[1],0):0}]))}function G(n,r,u){var e={length:0,first:g,last:g};return v(r,function(r,f){return"number"==typeof r?l(u,function(){return h(e)}):r.tag?(e.length>=n&&n>0&&h(e),function(n,r){var t={content:r,next:g},u=n.last;null!==u?(n.length=n.length+1|0,u.next=t,n.last=t):(n.length=1,n.first=t,n.last=t)}(e,r[0]),t(f,0)):t(f,0)})}function H(n,r,u){var e=[!1],f=[a];return t(r,function(r){return"number"==typeof r?e[0]?0:(e[0]=!0,t(u,0)):r.tag?e[0]?0:t(n,r[0])?t(u,r):(e[0]=!0,t(u,0),t(f[0],1)):(f[0]=r[0],t(u,r))}),t(u,c(0,[function(n){return e[0]?0:n?(e[0]=!0,t(f[0],1)):t(f[0],0)}]))}function K(n,r,u){var e=[!1,a,a];return t(r,function(r){return"number"==typeof r?e[0]?0:(t(e[2],1),e[0]=!0,t(u,0)):r.tag?e[0]?0:t(u,r):(e[1]=r[0],t(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=!0,t(e[2],1),t(e[1],1),t(u,0);var r=n[0];return e[2]=r,t(r,0)}))}),t(u,c(0,[function(n){return e[0]?0:n?(t(e[1],1),t(e[2],1)):t(e[1],0)}]))}function M(n,r,u){var e=[n];return v(r,function(n,r){return"number"==typeof n||!n.tag||e[0]<=0?t(u,n):(e[0]=e[0]-1|0,t(r,0))})}function N(n,r,u){var e=[!0];return v(r,function(r,f){return"number"!=typeof r&&r.tag&&e[0]?t(n,r[0])?t(f,0):(e[0]=!1,t(u,r)):t(u,r)})}function O(n,r,u){var e=[!0,!1,!1,a,a];return t(r,function(r){if("number"==typeof r)return e[0]&&t(e[4],1),e[1]=!0,t(u,0);if(r.tag)return e[0]&&!e[1]?t(e[3],0):e[1]?0:(e[2]=!1,t(u,r));var f=r[0];return e[3]=f,t(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=!1,t(e[4],1);var r=n[0];return e[4]=r,t(r,0),t(f,0)})}),t(u,c(0,[function(n){return n?(e[0]&&t(e[4],1),e[1]=!0,t(e[3],1)):e[2]||e[1]?0:(e[2]=!0,t(e[3],0))}]))}function Q(n,r){var u=[a,a,!1,!0];return t(n,function(n){return"number"==typeof n?u[3]?t(r,0):(u[2]=!0,0):n.tag?t(n[0],function(n){if("number"==typeof n)return u[2]?t(u[0],1):(u[3]=!0,t(u[0],0));if(n.tag)return t(r,n);var e=n[0];return u[3]||t(u[1],1),u[3]=!1,u[1]=e,t(e,0)}):(u[0]=n[0],0)}),t(r,c(0,[function(n){return n?(t(u[0],1),t(u[1],1)):u[3]||u[2]?u[2]?0:t(u[0],0):t(u[1],0)}]))}function R(n,r){return v(r,function(r,u){return"number"==typeof r?0:r.tag?(t(n,r[0]),t(u,0)):t(u,0)})}function S(n,r){var u=[a],e=[!1];return t(r,function(r){return"number"==typeof r?0:r.tag?e[0]?0:(t(n,r[0]),t(u[0],0)):(u[0]=r[0],t(u[0],0))}),function(){return e[0]?0:(e[0]=!0,t(u[0],1))}}function U(n,r,u){var e=function(n){return t(u,c(1,[n]))};return t(u,c(0,[function(n){return n?t(r,e):0}])),t(n,e)}function V(n,r,t){var u=function(n,r,t){n.addEventListener(r,t)},f=function(n,r,t){n.removeEventListener(r,t)};return U(function(t){return e(u,n,r,t)},function(t){return e(f,n,r,t)},t)}function W(n,r){var u=[0],e=setInterval(function(){var n=u[0];return u[0]=u[0]+1|0,t(r,c(1,[n]))},n);return t(r,c(0,[function(n){return n?(clearInterval(e),0):0}]))}function X(n,r){var u=[!1];return n.then(function(n){return u[0]||(t(r,c(1,[n])),t(r,0)),Promise.resolve(0)}),t(r,c(0,[function(n){return n?(u[0]=!0,0):0}]))}function Y(n,r,u){var e=[!1],f=[0],i=function(){var n=f[0];return n?(f[0]=0,clearTimeout(n[0]),0):0};return t(r,function(r){if("number"==typeof r)return e[0]=!0,f[0]?0:t(u,0);if(r.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,t(u,r),e[0]?t(u,0):0},t(n,r[0]))],0;var o=r[0];return t(u,c(0,[function(n){return n?(i(),t(o,1)):t(o,n)}]))})}function Z(n,r,u){var e=[!1],f=[0],i=function(){var n=f[0];return n?(clearTimeout(n[0]),0):0};return t(r,function(r){if("number"==typeof r)return i(),t(u,0);if(r.tag)return e[0]?0:(e[0]=!0,i(),f[0]=[setTimeout(function(){return f[0]=0,e[0]=!1,0},t(n,r[0]))],t(u,r));var o=r[0];return t(u,c(0,[function(n){return n?(i(),t(o,1)):t(o,n)}]))})}function $(n,r,u){var e=[!1,0,function(){return 0},function(){return 0}];return t(r,function(n){return"number"==typeof n?(e[0]=!0,t(e[3],1),t(u,0)):n.tag?(e[1]=[n[0]],0):(e[2]=n[0],0)}),t(n,function(n){var r=e[1];return"number"==typeof n?(e[0]=!0,t(e[2],1),t(u,0)):n.tag?r&&!e[0]?(e[1]=0,t(u,c(1,[r[0]]))):0:(e[3]=n[0],0)}),t(u,c(0,[function(n){return n?(e[0]=!0,t(e[2],1),t(e[3],1)):(t(e[2],0),t(e[3],0))}]))}function nn(n,r,u){var e=[function(){return 0},0,!1];return t(r,function(r){return"number"==typeof r||r.tag?1===1?e[2]?0:(e[1]=e[1]+1|0,setTimeout(function(){return e[2]&&0===e[1]?t(u,0):e[1]=e[1]-1|0,t(u,r)},n),0):void 0:(e[0]=r[0],0)}),t(u,c(0,[function(n){return n?(e[2]=!0,0===e[1]?t(u,0):0):e[2]?0:t(e[0],n)}]))}export{A as create,E as fromList,I as fromArray,L as fromValue,B as empty,J as never,P as map,_ as filter,j as scan,q as merge,z as concat,C as share,D as combine,F as take,G as takeLast,H as takeWhile,K as takeUntil,M as skip,N as skipWhile,O as skipUntil,Q as flatten,R as forEach,S as subscribe,U as fromListener,V as fromDomEvent,W as interval,X as fromPromise,Y as debounce,Z as throttle,$ as sample,nn as delay};
//# sourceMappingURL=wonka.m.js.map

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

!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.wonka={})}(this,function(n){function r(n,r,t){for(var u=new Array(t),e=0,f=r;e<t;)u[e]=n[f],e=e+1|0,f=f+1|0;return u}function t(n,u){for(;;){var e=u,f=n,i=f.length,o=i||1,c=o-e.length|0;if(c){if(c<0){u=r(e,o,0|-c),n=f.apply(null,r(e,0,o));continue}return function(n,r){return function(u){return t(n,r.concat([u]))}}(f,e)}return f.apply(null,e)}}function u(n,r){var u=n.length;return 1===u?n(r):function(n,r,u){if(u>7||u<0)return t(n,[r]);switch(u){case 0:case 1:return n(r);case 2:return function(t){return n(r,t)};case 3:return function(t,u){return n(r,t,u)};case 4:return function(t,u,e){return n(r,t,u,e)};case 5:return function(t,u,e,f){return n(r,t,u,e,f)};case 6:return function(t,u,e,f,i){return n(r,t,u,e,f,i)};case 7:return function(t,u,e,f,i,o){return n(r,t,u,e,f,i,o)}}}(n,r,u)}function e(n,r,u){var e=n.length;return 2===e?n(r,u):function(n,r,u,e){if(e>7||e<0)return t(n,[r,u]);switch(e){case 0:case 1:return t(n(r),[u]);case 2:return n(r,u);case 3:return function(t){return n(r,u,t)};case 4:return function(t,e){return n(r,u,t,e)};case 5:return function(t,e,f){return n(r,u,t,e,f)};case 6:return function(t,e,f,i){return n(r,u,t,e,f,i)};case 7:return function(t,e,f,i,o){return n(r,u,t,e,f,i,o)}}}(n,r,u,e)}function f(n,r,u,e){var f=n.length;return 3===f?n(r,u,e):function(n,r,u,e,f){var i=0;if(f>7||f<0)return t(n,[r,u,e]);switch(f){case 0:case 1:i=1;break;case 2:return t(n(r,u),[e]);case 3:return n(r,u,e);case 4:return function(t){return n(r,u,e,t)};case 5:return function(t,f){return n(r,u,e,t,f)};case 6:return function(t,f,i){return n(r,u,e,t,f,i)};case 7:return function(t,f,i,o){return n(r,u,e,t,f,i,o)}}return 1===i?t(n(r),[u,e]):void 0}(n,r,u,e,f)}var i=[0];function o(n){var r=[n,(i[0]+=1,i[0])];return r.tag=248,r}o("Js_exn.Error");function c(n,r){var t=r.length;if(t){for(var e=function(n,r){for(var t=new Array(n),u=0,e=n-1|0;u<=e;++u)t[u]=r;return t}(t,u(n,r[0])),f=1,i=t-1|0;f<=i;++f)e[f]=u(n,r[f]);return e}return[]}o("Array.Bottom");function a(n,r){return r.tag=n,r}function l(){return 0}function v(n,r){var t=[l];return u(n,function(n){return"number"!=typeof n&&(n.tag||(t[0]=n[0])),r(n,t[0])})}function g(n,r){var t=[0,0,0];return u(n,a(0,[function(e){if(0!==e||0!==t[0])return 0;if(t[2]=1,t[1])return 0;return t[1]=1,function(e){for(;;){var f=r();if(f){if(t[2]=0,u(n,a(1,[f[0]])),t[2])continue;return 0}return t[0]=1,u(n,0)}}(),t[1]=0,0}]))}var s=null;function h(n){var r=n.first;if(null!==r){var t=r.next;return null===t?(function(n){n.length=0,n.first=s,n.last=s}(n),[r.content]):(n.length=n.length-1|0,n.first=t,[r.content])}return 0}function m(n){return null!==n?n.h:0}function y(n,r){return null!==r?null!==n?+(n.h>=r.h):0:1}function p(n){var r=n.left;n.left=r.right,r.right=n;var t=m(n.left),u=m(n.right);n.h=(t>u?t:u)+1|0;var e=m(r.left),f=n.h;return r.h=(e>f?e:f)+1|0,r}function b(n){var r=n.right;n.right=r.left,r.left=n;var t=m(n.left),u=m(n.right);n.h=(t>u?t:u)+1|0;var e=m(r.right),f=n.h;return r.h=(e>f?e:f)+1|0,r}function d(n){var r=m(n.left),t=m(n.right);return n.h=(r>t?r:t)+1|0,n}function k(n){var r,t,u=n.left,e=n.right,f=m(u),i=m(e);return f>(2+i|0)?y(u.left,u.right)?d(p(n)):d((t=b((r=n).left),r.left=t,p(r))):i>(2+f|0)?y(e.right,e.left)?d(b(n)):d(function(n){var r=p(n.right);return n.right=r,b(n)}(n)):(n.h=(f>i?f:i)+1|0,n)}var x=null;function w(n,r,t){var u=n.data,e=function n(r,t,u){if(null!==r){var e=r.key;if(t===e)return r.key=t,r.value=u,r;var f=r.right;if(t<e){var i=n(r.left,t,u);r.left=i}else r.right=n(f,t,u);return k(r)}return function(n,r){return{left:null,key:n,value:r,right:null,h:1}}(t,u)}(u,r,t);return e!==u?(n.data=e,0):0}function E(n,r){return function n(r,t){for(;;){var u=r;if(null===u)return 0;n(u.left,t),t(u.key,u.value),r=u.right}}(n.data,r)}function L(n,r){var t=n.key;if(r===t){var u=n.left,e=n.right;return null!==u?null!==e?(n.right=function n(r,t){var u=t.right,e=t.left;return null!==e?(t.left=n(r,e),k(t)):(r.key=t.key,u)}(n,e),k(n)):u:e}if(r<t){var f=n.left;return null!==f?(n.left=L(f,r),k(n)):n}var i=n.right;return null!==i?(n.right=L(i,r),k(n)):n}function T(n,r,t){var e=function(n){return u(t,a(1,[n]))};return u(t,a(0,[function(n){return 0!==n?u(r,e):0}])),u(n,e)}n.create=function(n,r){return g(r,function(){return u(n,0)})},n.fromList=function(n,r){var t=[n];return g(r,function(){var n=t[0];return n?(t[0]=n[1],[n[0]]):0})},n.fromArray=function(n,r){var t=n.length,u=[0];return g(r,function(){if(u[0]<t){var r=[n[u[0]]];return u[0]=u[0]+1|0,r}return 0})},n.fromValue=function(n,r){var t=[0];return u(r,a(0,[function(e){return 0!==e||t[0]?0:(t[0]=1,u(r,a(1,[n])),u(r,0))}]))},n.empty=function(n){return u(n,a(0,[function(){return 0}])),u(n,0)},n.never=function(n){return u(n,a(0,[function(){return 0}]))},n.map=function(n,r,t){return u(r,function(r){var e;return e="number"==typeof r?0:r.tag?a(1,[u(n,r[0])]):a(0,[r[0]]),u(t,e)})},n.filter=function(n,r,t){return v(r,function(r,e){return"number"==typeof r||!r.tag||u(n,r[0])?u(t,r):u(e,0)})},n.scan=function(n,r,t,f){var i=[r];return u(t,function(r){var t;return"number"==typeof r?t=0:r.tag?(i[0]=e(n,i[0],r[0]),t=a(1,[i[0]])):t=a(0,[r[0]]),u(f,t)})},n.merge=function(n,r){for(var t=n.length,e=c(function(){return l},n),f=[0,0],i=function(n){for(var r=0;;){var f=r;if(!(f<t))return 0;u(e[f],n),r=f+1|0}},o=0;;){var v=o;if(!(v<t))return 0;u(n[v],function(n){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===t?u(r,0):0):o.tag?u(r,o):(e[n]=o[0],f[0]=f[0]+1|0,f[0]===t?u(r,a(0,[i])):0)}}(v)),o=v+1|0}},n.concat=function(n,r){var t=n.length,e=[l],f=function(i){return i<t?u(n[i],function(n){if("number"==typeof n)return f(i+1|0);if(n.tag)return u(r,n);var t=n[0];return e[0]=t,i||u(r,a(0,[function(n){return u(e[0],n)}])),u(t,0)}):u(r,0)};return f(0)},n.share=function(n){var r=[{data:x},0,l,0,0];return function(t){var e=r[1];return w(r[0],e,t),r[1]=r[1]+1|0,e||u(n,function(n){return"number"==typeof n?(r[3]=1,E(r[0],function(n,r){return u(r,0)})):n.tag?r[3]?0:(r[4]=0,E(r[0],function(r,t){return u(t,n)})):(r[2]=n[0],0)}),u(t,a(0,[function(n){return 0!==n?(function(n,r){var t=n.data;if(null!==t){var u=L(t,r);u!==t&&(n.data=u)}}(r[0],e),null===r[0].data?(r[3]=1,u(r[2],1)):0):r[4]?0:(r[4]=1,u(r[2],n))}]))}},n.combine=function(n,r,t){var e=[l,l,0,0,0,0,0];return u(n,function(n){var r=e[3];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=1,u(t,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[2]=[f],e[4]=0,u(t,a(1,[[f,r[0]]]))):(e[2]=[f],e[4]=0,0)}return e[0]=n[0],0}),u(r,function(n){var r=e[2];if("number"==typeof n)return e[5]<1?(e[5]=e[5]+1|0,0):e[6]?0:(e[6]=1,u(t,0));if(n.tag){var f=n[0];return r?e[6]?0:(e[3]=[f],e[4]=0,u(t,a(1,[[r[0],f]]))):(e[3]=[f],e[4]=0,0)}return e[1]=n[0],0}),u(t,a(0,[function(n){return e[6]?0:0!==n?(e[6]=1,u(e[0],1),u(e[1],1)):e[4]?0:(e[4]=1,u(e[0],n),u(e[1],n))}]))},n.take=function(n,r,t){var e=[0,l];return u(r,function(r){return"number"==typeof r?e[0]<n?(e[0]=n,u(t,0)):0:r.tag?e[0]<n?(e[0]=e[0]+1|0,u(t,r),e[0]===n?(u(t,0),u(e[1],1)):0):0:(e[1]=r[0],0)}),u(t,a(0,[function(r){return e[0]<n?0!==r?(e[0]=n,u(e[1],1)):u(e[1],0):0}]))},n.takeLast=function(n,r,t){var e={length:0,first:s,last:s};return v(r,function(r,f){return"number"==typeof r?g(t,function(){return h(e)}):r.tag?(e.length>=n&&n>0&&h(e),function(n,r){var t={content:r,next:s},u=n.last;null!==u?(n.length=n.length+1|0,u.next=t,n.last=t):(n.length=1,n.first=t,n.last=t)}(e,r[0]),u(f,0)):u(f,0)})},n.takeWhile=function(n,r,t){var e=[0],f=[l];return u(r,function(r){return"number"==typeof r?e[0]?0:(e[0]=1,u(t,0)):r.tag?e[0]?0:u(n,r[0])?u(t,r):(e[0]=1,u(t,0),u(f[0],1)):(f[0]=r[0],u(t,r))}),u(t,a(0,[function(n){return e[0]?0:0!==n?(e[0]=1,u(f[0],1)):u(f[0],0)}]))},n.takeUntil=function(n,r,t){var e=[0,l,l];return u(r,function(r){return"number"==typeof r?e[0]?0:(u(e[2],1),e[0]=1,u(t,0)):r.tag?e[0]?0:u(t,r):(e[1]=r[0],u(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=1,u(e[2],1),u(e[1],1),u(t,0);var r=n[0];return e[2]=r,u(r,0)}))}),u(t,a(0,[function(n){return e[0]?0:0!==n?(u(e[1],1),u(e[2],1)):u(e[1],0)}]))},n.skip=function(n,r,t){var e=[n];return v(r,function(n,r){return"number"==typeof n||!n.tag||e[0]<=0?u(t,n):(e[0]=e[0]-1|0,u(r,0))})},n.skipWhile=function(n,r,t){var e=[1];return v(r,function(r,f){return"number"!=typeof r&&r.tag&&e[0]?u(n,r[0])?u(f,0):(e[0]=0,u(t,r)):u(t,r)})},n.skipUntil=function(n,r,t){var e=[1,0,0,l,l];return u(r,function(r){if("number"==typeof r)return e[0]&&u(e[4],1),e[1]=1,u(t,0);if(r.tag)return e[0]&&!e[1]?u(e[3],0):e[1]?0:(e[2]=0,u(t,r));var f=r[0];return e[3]=f,u(n,function(n){if("number"==typeof n)return 0;if(n.tag)return e[0]=0,u(e[4],1);var r=n[0];return e[4]=r,u(r,0),u(f,0)})}),u(t,a(0,[function(n){return 0!==n?(e[0]&&u(e[4],1),e[1]=1,u(e[3],1)):e[2]||e[1]?0:(e[2]=1,u(e[3],0))}]))},n.flatten=function(n,r){var t=[l,l,0,1];return u(n,function(n){return"number"==typeof n?t[3]?u(r,0):(t[2]=1,0):n.tag?u(n[0],function(n){if("number"==typeof n)return t[2]?u(t[0],1):(t[3]=1,u(t[0],0));if(n.tag)return u(r,n);var e=n[0];return t[3]||u(t[1],1),t[3]=0,t[1]=e,u(e,0)}):(t[0]=n[0],0)}),u(r,a(0,[function(n){return 0!==n?(u(t[0],1),u(t[1],1)):t[3]||t[2]?t[2]?0:u(t[0],0):u(t[1],0)}]))},n.forEach=function(n,r){return v(r,function(r,t){return"number"==typeof r?0:r.tag?(u(n,r[0]),u(t,0)):u(t,0)})},n.subscribe=function(n,r){var t=[l],e=[0];return u(r,function(r){return"number"==typeof r?0:r.tag?e[0]?0:(u(n,r[0]),u(t[0],0)):(t[0]=r[0],u(t[0],0))}),function(){return e[0]?0:(e[0]=1,u(t[0],1))}},n.fromListener=T,n.fromDomEvent=function(n,r,t){var u=function(n,r,t){n.addEventListener(r,t)},e=function(n,r,t){n.addEventListener(r,t)};return T(function(t){return f(u,n,r,t)},function(t){return f(e,n,r,t)},t)},n.interval=function(n,r){var t=[0],e=setInterval(function(){var n=t[0];return t[0]=t[0]+1|0,u(r,a(1,[n]))},n);return u(r,a(0,[function(n){return 0!==n?(clearInterval(e),0):0}]))},n.fromPromise=function(n,r){var t=[0];return n.then(function(n){return t[0]||(u(r,a(1,[n])),u(r,0)),Promise.resolve(0)}),u(r,a(0,[function(n){return 0!==n?(t[0]=1,0):0}]))},n.debounce=function(n,r,t){var e=[0],f=[0],i=function(){var n=f[0];return n?(f[0]=0,clearTimeout(n[0]),0):0};return u(r,function(r){if("number"==typeof r)return e[0]=1,f[0]?0:u(t,0);if(r.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,u(t,r),e[0]?u(t,0):0},u(n,r[0]))],0;var o=r[0];return u(t,a(0,[function(n){return 0!==n?(i(),u(o,1)):u(o,n)}]))})},n.throttle=function(n,r,t){var e=[0],f=[0],i=function(){var n=f[0];return n?(clearTimeout(n[0]),0):0};return u(r,function(r){if("number"==typeof r)return i(),u(t,0);if(r.tag)return e[0]?0:(e[0]=1,i(),f[0]=[setTimeout(function(){return f[0]=0,e[0]=0,0},u(n,r[0]))],u(t,r));var o=r[0];return u(t,a(0,[function(n){return 0!==n?(i(),u(o,1)):u(o,n)}]))})},n.sample=function(n,r,t){var e=[0,0,function(){return 0},function(){return 0}];return u(r,function(n){return"number"==typeof n?(e[0]=1,u(e[3],1),u(t,0)):n.tag?(e[1]=[n[0]],0):(e[2]=n[0],0)}),u(n,function(n){var r=e[1];return"number"==typeof n?(e[0]=1,u(e[2],1),u(t,0)):n.tag?r&&!e[0]?(e[1]=0,u(t,a(1,[r[0]]))):0:(e[3]=n[0],0)}),u(t,a(0,[function(n){return 0!==n?(e[0]=1,u(e[2],1),u(e[3],1)):(u(e[2],0),u(e[3],0))}]))},n.delay=function(n,r,t){var e=[function(){return 0},0,0];return u(r,function(r){var f=0;if("number"==typeof r)f=1;else{if(!r.tag)return e[0]=r[0],0;f=1}if(1===f)return e[2]?0:(e[1]=e[1]+1|0,setTimeout(function(){return e[2]&&0===e[1]?u(t,0):e[1]=e[1]-1|0,u(t,r)},n),0)}),u(t,a(0,[function(n){return 0!==n?(e[2]=1,e[1]?0:u(t,0)):e[2]?0:u(e[0],n)}]))}});
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.wonka={})}(this,function(n){function r(n,r,t){for(var e=new Array(t),u=0,f=r;u<t;)e[u]=n[f],u=u+1|0,f=f+1|0;return e}function t(n,e){for(;;){var u=e,f=n,i=f.length,o=0===i?1:i,c=o-u.length|0;if(0===c)return f.apply(null,u);if(!(c<0))return function(n,r){return function(e){return t(n,r.concat([e]))}}(f,u);e=r(u,o,0|-c),n=f.apply(null,r(u,0,o))}}function e(n,r){var e=n.length;return 1===e?n(r):function(n,r,e){if(e>7||e<0)return t(n,[r]);switch(e){case 0:case 1:return n(r);case 2:return function(t){return n(r,t)};case 3:return function(t,e){return n(r,t,e)};case 4:return function(t,e,u){return n(r,t,e,u)};case 5:return function(t,e,u,f){return n(r,t,e,u,f)};case 6:return function(t,e,u,f,i){return n(r,t,e,u,f,i)};case 7:return function(t,e,u,f,i,o){return n(r,t,e,u,f,i,o)}}}(n,r,e)}function u(n,r,e){var u=n.length;return 2===u?n(r,e):function(n,r,e,u){if(u>7||u<0)return t(n,[r,e]);switch(u){case 0:case 1:return t(n(r),[e]);case 2:return n(r,e);case 3:return function(t){return n(r,e,t)};case 4:return function(t,u){return n(r,e,t,u)};case 5:return function(t,u,f){return n(r,e,t,u,f)};case 6:return function(t,u,f,i){return n(r,e,t,u,f,i)};case 7:return function(t,u,f,i,o){return n(r,e,t,u,f,i,o)}}}(n,r,e,u)}function f(n,r,e,u){var f=n.length;return 3===f?n(r,e,u):function(n,r,e,u,f){var i=0;if(f>7||f<0)return t(n,[r,e,u]);switch(f){case 0:case 1:i=1;break;case 2:return t(n(r,e),[u]);case 3:return n(r,e,u);case 4:return function(t){return n(r,e,u,t)};case 5:return function(t,f){return n(r,e,u,t,f)};case 6:return function(t,f,i){return n(r,e,u,t,f,i)};case 7:return function(t,f,i,o){return n(r,e,u,t,f,i,o)}}return 1===i?t(n(r),[e,u]):void 0}(n,r,e,u,f)}var i=[0];function o(n){var r=[n,(i[0]+=1,i[0])];return r.tag=248,r}o("Js_exn.Error");function c(n,r){var t=r.length;if(0===t)return[];for(var u=function(n,r){for(var t=new Array(n),e=0,u=n-1|0;e<=u;++e)t[e]=r;return t}(t,e(n,r[0])),f=1,i=t-1|0;f<=i;++f)u[f]=e(n,r[f]);return u}o("Array.Bottom");function a(n,r){return r.tag=n,r}function l(){return 0}function v(n,r){var t=[l];return e(n,function(n){return"number"!=typeof n&&(n.tag||(t[0]=n[0])),r(n,t[0])})}function g(n,r){var t=[!1,!1,!1];return e(n,a(0,[function(u){if(u||t[0])return 0;if(t[2]=!0,t[1])return 0;return t[1]=!0,function(u){for(;;){var f=r();if(f){if(t[2]=!1,e(n,a(1,[f[0]])),t[2])continue;return 0}return t[0]=!0,e(n,0)}}(),t[1]=!1,0}]))}var h=null;function s(n){var r=n.first;if(null!==r){var t=r.next;return null===t?(function(n){n.length=0,n.first=h,n.last=h}(n),[r.content]):(n.length=n.length-1|0,n.first=t,[r.content])}return 0}function m(n){return null!==n?n.height:0}function y(n,r){return null===r||null!==n&&n.height>=r.height}function p(n){var r=n.left;n.left=r.right,r.right=n;var t=m(n.left),e=m(n.right);n.height=(t>e?t:e)+1|0;var u=m(r.left),f=n.height;return r.height=(u>f?u:f)+1|0,r}function b(n){var r=n.right;n.right=r.left,r.left=n;var t=m(n.left),e=m(n.right);n.height=(t>e?t:e)+1|0;var u=m(r.right),f=n.height;return r.height=(u>f?u:f)+1|0,r}function d(n){var r=m(n.left),t=m(n.right);return n.height=(r>t?r:t)+1|0,n}function k(n){var r,t,e=n.left,u=n.right,f=m(e),i=m(u);return f>(2+i|0)?y(e.left,e.right)?d(p(n)):d((t=b((r=n).left),r.left=t,p(r))):i>(2+f|0)?y(u.right,u.left)?d(b(n)):d(function(n){var r=p(n.right);return n.right=r,b(n)}(n)):(n.height=(f>i?f:i)+1|0,n)}var x=null;function w(n,r,t){var e=n.data,u=function n(r,t,e){if(null!==r){var u=r.key;if(t===u)return r.key=t,r.value=e,r;var f=r.right;if(t<u){var i=n(r.left,t,e);r.left=i}else r.right=n(f,t,e);return k(r)}return function(n,r){return{key:n,value:r,height:1,left:null,right:null}}(t,e)}(e,r,t);return u!==e?(n.data=u,0):0}function E(n,r){return function n(r,t){for(;;){var e=r;if(null===e)return 0;n(e.left,t),t(e.key,e.value),r=e.right}}(n.data,r)}function L(n,r){var t=n.key;if(r===t){var e=n.left,u=n.right;return null!==e?null!==u?(n.right=function n(r,t){var e=t.right,u=t.left;return null!==u?(t.left=n(r,u),k(t)):(r.key=t.key,e)}(n,u),k(n)):e:u}if(r<t){var f=n.left;return null!==f?(n.left=L(f,r),k(n)):n}var i=n.right;return null!==i?(n.right=L(i,r),k(n)):n}function T(n,r,t){var u=function(n){return e(t,a(1,[n]))};return e(t,a(0,[function(n){return n?e(r,u):0}])),e(n,u)}n.create=function(n,r){return g(r,function(){return e(n,0)})},n.fromList=function(n,r){var t=[n];return g(r,function(){var n=t[0];return n?(t[0]=n[1],[n[0]]):0})},n.fromArray=function(n,r){var t=n.length,e=[0];return g(r,function(){if(e[0]<t){var r=[n[e[0]]];return e[0]=e[0]+1|0,r}return 0})},n.fromValue=function(n,r){var t=[!1];return e(r,a(0,[function(u){return u||t[0]?0:(t[0]=!0,e(r,a(1,[n])),e(r,0))}]))},n.empty=function(n){return e(n,a(0,[function(){return 0}])),e(n,0)},n.never=function(n){return e(n,a(0,[function(){return 0}]))},n.map=function(n,r,t){return e(r,function(r){var u;return u="number"==typeof r?0:r.tag?a(1,[e(n,r[0])]):a(0,[r[0]]),e(t,u)})},n.filter=function(n,r,t){return v(r,function(r,u){return"number"==typeof r||!r.tag||e(n,r[0])?e(t,r):e(u,0)})},n.scan=function(n,r,t,f){var i=[r];return e(t,function(r){var t;return"number"==typeof r?t=0:r.tag?(i[0]=u(n,i[0],r[0]),t=a(1,[i[0]])):t=a(0,[r[0]]),e(f,t)})},n.merge=function(n,r){for(var t=n.length,u=c(function(){return l},n),f=[0,0],i=function(n){for(var r=0;;){var f=r;if(!(f<t))return 0;e(u[f],n),r=f+1|0}},o=0;;){var v=o;if(!(v<t))return 0;e(n[v],function(n){return function(o){return"number"==typeof o?(f[1]=f[1]+1|0,f[1]===t?e(r,0):0):o.tag?e(r,o):(u[n]=o[0],f[0]=f[0]+1|0,f[0]===t?e(r,a(0,[i])):0)}}(v)),o=v+1|0}},n.concat=function(n,r){var t=n.length,u=[l],f=function(i){return i<t?e(n[i],function(n){if("number"==typeof n)return f(i+1|0);if(n.tag)return e(r,n);var t=n[0];return u[0]=t,0===i&&e(r,a(0,[function(n){return e(u[0],n)}])),e(t,0)}):e(r,0)};return f(0)},n.share=function(n){var r=[{data:x},0,l,!1,!1];return function(t){var u=r[1];return w(r[0],u,t),r[1]=r[1]+1|0,0===u&&e(n,function(n){return"number"==typeof n?(r[3]=!0,E(r[0],function(n,r){return e(r,0)})):n.tag?r[3]?0:(r[4]=!1,E(r[0],function(r,t){return e(t,n)})):(r[2]=n[0],0)}),e(t,a(0,[function(n){return n?(function(n,r){var t=n.data;if(null!==t){var e=L(t,r);e!==t&&(n.data=e)}}(r[0],u),null===r[0].data?(r[3]=!0,e(r[2],1)):0):r[4]?0:(r[4]=!0,e(r[2],n))}]))}},n.combine=function(n,r,t){var u=[l,l,0,0,!1,0,!1];return e(n,function(n){var r=u[3];if("number"==typeof n)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=!0,e(t,0));if(n.tag){var f=n[0];return r?u[6]?0:(u[2]=[f],u[4]=!1,e(t,a(1,[[f,r[0]]]))):(u[2]=[f],u[4]=!1,0)}return u[0]=n[0],0}),e(r,function(n){var r=u[2];if("number"==typeof n)return u[5]<1?(u[5]=u[5]+1|0,0):u[6]?0:(u[6]=!0,e(t,0));if(n.tag){var f=n[0];return r?u[6]?0:(u[3]=[f],u[4]=!1,e(t,a(1,[[r[0],f]]))):(u[3]=[f],u[4]=!1,0)}return u[1]=n[0],0}),e(t,a(0,[function(n){return u[6]?0:n?(u[6]=!0,e(u[0],1),e(u[1],1)):u[4]?0:(u[4]=!0,e(u[0],n),e(u[1],n))}]))},n.take=function(n,r,t){var u=[0,l];return e(r,function(r){return"number"==typeof r?u[0]<n?(u[0]=n,e(t,0)):0:r.tag?u[0]<n?(u[0]=u[0]+1|0,e(t,r),u[0]===n?(e(t,0),e(u[1],1)):0):0:(u[1]=r[0],0)}),e(t,a(0,[function(r){return u[0]<n?r?(u[0]=n,e(u[1],1)):e(u[1],0):0}]))},n.takeLast=function(n,r,t){var u={length:0,first:h,last:h};return v(r,function(r,f){return"number"==typeof r?g(t,function(){return s(u)}):r.tag?(u.length>=n&&n>0&&s(u),function(n,r){var t={content:r,next:h},e=n.last;null!==e?(n.length=n.length+1|0,e.next=t,n.last=t):(n.length=1,n.first=t,n.last=t)}(u,r[0]),e(f,0)):e(f,0)})},n.takeWhile=function(n,r,t){var u=[!1],f=[l];return e(r,function(r){return"number"==typeof r?u[0]?0:(u[0]=!0,e(t,0)):r.tag?u[0]?0:e(n,r[0])?e(t,r):(u[0]=!0,e(t,0),e(f[0],1)):(f[0]=r[0],e(t,r))}),e(t,a(0,[function(n){return u[0]?0:n?(u[0]=!0,e(f[0],1)):e(f[0],0)}]))},n.takeUntil=function(n,r,t){var u=[!1,l,l];return e(r,function(r){return"number"==typeof r?u[0]?0:(e(u[2],1),u[0]=!0,e(t,0)):r.tag?u[0]?0:e(t,r):(u[1]=r[0],e(n,function(n){if("number"==typeof n)return 0;if(n.tag)return u[0]=!0,e(u[2],1),e(u[1],1),e(t,0);var r=n[0];return u[2]=r,e(r,0)}))}),e(t,a(0,[function(n){return u[0]?0:n?(e(u[1],1),e(u[2],1)):e(u[1],0)}]))},n.skip=function(n,r,t){var u=[n];return v(r,function(n,r){return"number"==typeof n||!n.tag||u[0]<=0?e(t,n):(u[0]=u[0]-1|0,e(r,0))})},n.skipWhile=function(n,r,t){var u=[!0];return v(r,function(r,f){return"number"!=typeof r&&r.tag&&u[0]?e(n,r[0])?e(f,0):(u[0]=!1,e(t,r)):e(t,r)})},n.skipUntil=function(n,r,t){var u=[!0,!1,!1,l,l];return e(r,function(r){if("number"==typeof r)return u[0]&&e(u[4],1),u[1]=!0,e(t,0);if(r.tag)return u[0]&&!u[1]?e(u[3],0):u[1]?0:(u[2]=!1,e(t,r));var f=r[0];return u[3]=f,e(n,function(n){if("number"==typeof n)return 0;if(n.tag)return u[0]=!1,e(u[4],1);var r=n[0];return u[4]=r,e(r,0),e(f,0)})}),e(t,a(0,[function(n){return n?(u[0]&&e(u[4],1),u[1]=!0,e(u[3],1)):u[2]||u[1]?0:(u[2]=!0,e(u[3],0))}]))},n.flatten=function(n,r){var t=[l,l,!1,!0];return e(n,function(n){return"number"==typeof n?t[3]?e(r,0):(t[2]=!0,0):n.tag?e(n[0],function(n){if("number"==typeof n)return t[2]?e(t[0],1):(t[3]=!0,e(t[0],0));if(n.tag)return e(r,n);var u=n[0];return t[3]||e(t[1],1),t[3]=!1,t[1]=u,e(u,0)}):(t[0]=n[0],0)}),e(r,a(0,[function(n){return n?(e(t[0],1),e(t[1],1)):t[3]||t[2]?t[2]?0:e(t[0],0):e(t[1],0)}]))},n.forEach=function(n,r){return v(r,function(r,t){return"number"==typeof r?0:r.tag?(e(n,r[0]),e(t,0)):e(t,0)})},n.subscribe=function(n,r){var t=[l],u=[!1];return e(r,function(r){return"number"==typeof r?0:r.tag?u[0]?0:(e(n,r[0]),e(t[0],0)):(t[0]=r[0],e(t[0],0))}),function(){return u[0]?0:(u[0]=!0,e(t[0],1))}},n.fromListener=T,n.fromDomEvent=function(n,r,t){var e=function(n,r,t){n.addEventListener(r,t)},u=function(n,r,t){n.removeEventListener(r,t)};return T(function(t){return f(e,n,r,t)},function(t){return f(u,n,r,t)},t)},n.interval=function(n,r){var t=[0],u=setInterval(function(){var n=t[0];return t[0]=t[0]+1|0,e(r,a(1,[n]))},n);return e(r,a(0,[function(n){return n?(clearInterval(u),0):0}]))},n.fromPromise=function(n,r){var t=[!1];return n.then(function(n){return t[0]||(e(r,a(1,[n])),e(r,0)),Promise.resolve(0)}),e(r,a(0,[function(n){return n?(t[0]=!0,0):0}]))},n.debounce=function(n,r,t){var u=[!1],f=[0],i=function(){var n=f[0];return n?(f[0]=0,clearTimeout(n[0]),0):0};return e(r,function(r){if("number"==typeof r)return u[0]=!0,f[0]?0:e(t,0);if(r.tag)return i(),f[0]=[setTimeout(function(){return f[0]=0,e(t,r),u[0]?e(t,0):0},e(n,r[0]))],0;var o=r[0];return e(t,a(0,[function(n){return n?(i(),e(o,1)):e(o,n)}]))})},n.throttle=function(n,r,t){var u=[!1],f=[0],i=function(){var n=f[0];return n?(clearTimeout(n[0]),0):0};return e(r,function(r){if("number"==typeof r)return i(),e(t,0);if(r.tag)return u[0]?0:(u[0]=!0,i(),f[0]=[setTimeout(function(){return f[0]=0,u[0]=!1,0},e(n,r[0]))],e(t,r));var o=r[0];return e(t,a(0,[function(n){return n?(i(),e(o,1)):e(o,n)}]))})},n.sample=function(n,r,t){var u=[!1,0,function(){return 0},function(){return 0}];return e(r,function(n){return"number"==typeof n?(u[0]=!0,e(u[3],1),e(t,0)):n.tag?(u[1]=[n[0]],0):(u[2]=n[0],0)}),e(n,function(n){var r=u[1];return"number"==typeof n?(u[0]=!0,e(u[2],1),e(t,0)):n.tag?r&&!u[0]?(u[1]=0,e(t,a(1,[r[0]]))):0:(u[3]=n[0],0)}),e(t,a(0,[function(n){return n?(u[0]=!0,e(u[2],1),e(u[3],1)):(e(u[2],0),e(u[3],0))}]))},n.delay=function(n,r,t){var u=[function(){return 0},0,!1];return e(r,function(r){return"number"==typeof r||r.tag?u[2]?0:(u[1]=u[1]+1|0,setTimeout(function(){return u[2]&&0===u[1]?e(t,0):u[1]=u[1]-1|0,e(t,r)},n),0):(u[0]=r[0],0)}),e(t,a(0,[function(n){return n?(u[2]=!0,0===u[1]?e(t,0):0):u[2]?0:e(u[0],n)}]))}});
//# sourceMappingURL=wonka.umd.js.map

@@ -58,3 +58,3 @@

})];
var signals = /* int array */[];
var signals = /* array */[];
var source = function (x) {

@@ -61,0 +61,0 @@ Curry._1(x, /* Start */Block.__(0, [(function (signal) {

@@ -25,12 +25,12 @@

var state = /* record */[
/* exhausted : false */0,
/* inLoop : false */0,
/* gotSignal : false */0
/* exhausted */false,
/* inLoop */false,
/* gotSignal */false
];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
var match = state[/* exhausted */0];
if (signal !== 0 || match !== 0) {
if (signal || match) {
return /* () */0;
} else {
state[/* gotSignal */2] = /* true */1;
state[/* gotSignal */2] = true;
if (state[/* inLoop */1]) {

@@ -43,3 +43,3 @@ return 0;

if (match) {
state[/* gotSignal */2] = /* false */0;
state[/* gotSignal */2] = false;
Curry._1(sink, /* Push */Block.__(1, [match[0]]));

@@ -49,3 +49,2 @@ if (state[/* gotSignal */2]) {

continue ;
} else {

@@ -55,3 +54,3 @@ return 0;

} else {
state[/* exhausted */0] = /* true */1;
state[/* exhausted */0] = true;
return Curry._1(sink, /* End */0);

@@ -61,5 +60,5 @@ }

};
state[/* inLoop */1] = /* true */1;
state[/* inLoop */1] = true;
explode(/* () */0);
state[/* inLoop */1] = /* false */0;
state[/* inLoop */1] = false;
return /* () */0;

@@ -66,0 +65,0 @@ }

@@ -44,8 +44,8 @@

function fromValue(x, sink) {
var ended = [/* false */0];
var ended = [false];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0 || ended[0]) {
if (signal || ended[0]) {
return /* () */0;
} else {
ended[0] = /* true */1;
ended[0] = true;
Curry._1(sink, /* Push */Block.__(1, [x]));

@@ -123,3 +123,2 @@ return Curry._1(sink, /* End */0);

continue ;
} else {

@@ -159,3 +158,2 @@ return 0;

continue ;
} else {

@@ -181,3 +179,3 @@ return 0;

talkback[0] = tb;
if (!i) {
if (i === 0) {
Curry._1(sink, /* Start */Block.__(0, [(function (signal) {

@@ -202,4 +200,4 @@ return Curry._1(talkback[0], signal);

/* talkback */Wonka_helpers.talkbackPlaceholder,
/* ended : false */0,
/* gotSignal : false */0
/* ended */false,
/* gotSignal */false
];

@@ -210,6 +208,6 @@ return (function (sink) {

state[/* idCounter */1] = state[/* idCounter */1] + 1 | 0;
if (!id) {
if (id === 0) {
Curry._1(source, (function (signal) {
if (typeof signal === "number") {
state[/* ended */3] = /* true */1;
state[/* ended */3] = true;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (_, sink) {

@@ -222,3 +220,3 @@ return Curry._1(sink, /* End */0);

} else {
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (_, sink) {

@@ -235,6 +233,6 @@ return Curry._1(sink, signal);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
Belt_MutableMapInt.remove(state[/* sinks */0], id);
if (Belt_MutableMapInt.isEmpty(state[/* sinks */0])) {
state[/* ended */3] = /* true */1;
state[/* ended */3] = true;
return Curry._1(state[/* talkback */2], /* End */1);

@@ -247,3 +245,3 @@ } else {

} else {
state[/* gotSignal */4] = /* true */1;
state[/* gotSignal */4] = true;
return Curry._1(state[/* talkback */2], signal);

@@ -261,5 +259,5 @@ }

/* lastValB : None */0,
/* gotSignal : false */0,
/* gotSignal */false,
/* endCounter */0,
/* ended : false */0
/* ended */false
];

@@ -275,3 +273,3 @@ Curry._1(sourceA, (function (signal) {

} else {
state[/* ended */6] = /* true */1;
state[/* ended */6] = true;
return Curry._1(sink, /* End */0);

@@ -286,3 +284,3 @@ }

state[/* lastValA */2] = /* Some */[a];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[

@@ -295,3 +293,3 @@ a,

state[/* lastValA */2] = /* Some */[a];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return /* () */0;

@@ -313,3 +311,3 @@ }

} else {
state[/* ended */6] = /* true */1;
state[/* ended */6] = true;
return Curry._1(sink, /* End */0);

@@ -324,3 +322,3 @@ }

state[/* lastValB */3] = /* Some */[b];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[

@@ -333,3 +331,3 @@ match[0],

state[/* lastValB */3] = /* Some */[b];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return /* () */0;

@@ -345,4 +343,4 @@ }

return 0;
} else if (signal !== 0) {
state[/* ended */6] = /* true */1;
} else if (signal) {
state[/* ended */6] = true;
Curry._1(state[/* talkbackA */0], /* End */1);

@@ -353,3 +351,3 @@ return Curry._1(state[/* talkbackB */1], /* End */1);

} else {
state[/* gotSignal */4] = /* true */1;
state[/* gotSignal */4] = true;
Curry._1(state[/* talkbackA */0], signal);

@@ -394,3 +392,3 @@ return Curry._1(state[/* talkbackB */1], signal);

if (state[/* taken */0] < max) {
if (signal !== 0) {
if (signal) {
state[/* taken */0] = max;

@@ -428,3 +426,3 @@ return Curry._1(state[/* talkback */1], /* End */1);

function takeWhile(predicate, source, sink) {
var ended = [/* false */0];
var ended = [false];
var talkback = [Wonka_helpers.talkbackPlaceholder];

@@ -436,3 +434,3 @@ Curry._1(source, (function (signal) {

} else {
ended[0] = /* true */1;
ended[0] = true;
return Curry._1(sink, /* End */0);

@@ -446,3 +444,3 @@ }

} else {
ended[0] = /* true */1;
ended[0] = true;
Curry._1(sink, /* End */0);

@@ -459,4 +457,4 @@ return Curry._1(talkback[0], /* End */1);

return 0;
} else if (signal !== 0) {
ended[0] = /* true */1;
} else if (signal) {
ended[0] = true;
return Curry._1(talkback[0], /* End */1);

@@ -471,3 +469,3 @@ } else {

var state = /* record */[
/* ended : false */0,
/* ended */false,
/* sourceTalkback */Wonka_helpers.talkbackPlaceholder,

@@ -482,3 +480,3 @@ /* notifierTalkback */Wonka_helpers.talkbackPlaceholder

Curry._1(state[/* notifierTalkback */2], /* End */1);
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
return Curry._1(sink, /* End */0);

@@ -498,3 +496,3 @@ }

} else if (signal.tag) {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */2], /* End */1);

@@ -514,3 +512,3 @@ Curry._1(state[/* sourceTalkback */1], /* End */1);

return 0;
} else if (signal !== 0) {
} else if (signal) {
Curry._1(state[/* sourceTalkback */1], /* End */1);

@@ -537,3 +535,3 @@ return Curry._1(state[/* notifierTalkback */2], /* End */1);

function skipWhile(predicate, source, sink) {
var skip = [/* true */1];
var skip = [true];
return Wonka_helpers.captureTalkback(source, (function (signal, talkback) {

@@ -545,3 +543,3 @@ if (typeof signal === "number" || !signal.tag || !skip[0]) {

} else {
skip[0] = /* false */0;
skip[0] = false;
return Curry._1(sink, signal);

@@ -554,5 +552,5 @@ }

var state = /* record */[
/* skip : true */1,
/* ended : false */0,
/* gotSignal : false */0,
/* skip */true,
/* ended */false,
/* gotSignal */false,
/* sourceTalkback */Wonka_helpers.talkbackPlaceholder,

@@ -566,3 +564,3 @@ /* notifierTalkback */Wonka_helpers.talkbackPlaceholder

}
state[/* ended */1] = /* true */1;
state[/* ended */1] = true;
return Curry._1(sink, /* End */0);

@@ -575,3 +573,3 @@ } else if (signal.tag) {

} else {
state[/* gotSignal */2] = /* false */0;
state[/* gotSignal */2] = false;
return Curry._1(sink, signal);

@@ -586,3 +584,3 @@ }

} else if (signal.tag) {
state[/* skip */0] = /* false */0;
state[/* skip */0] = false;
return Curry._1(state[/* notifierTalkback */4], /* End */1);

@@ -599,10 +597,10 @@ } else {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
if (state[/* skip */0]) {
Curry._1(state[/* notifierTalkback */4], /* End */1);
}
state[/* ended */1] = /* true */1;
state[/* ended */1] = true;
return Curry._1(state[/* sourceTalkback */3], /* End */1);
} else if (!state[/* gotSignal */2] && !state[/* ended */1]) {
state[/* gotSignal */2] = /* true */1;
state[/* gotSignal */2] = true;
return Curry._1(state[/* sourceTalkback */3], /* Pull */0);

@@ -619,4 +617,4 @@ } else {

/* innerTalkback */Wonka_helpers.talkbackPlaceholder,
/* sourceEnded : false */0,
/* innerEnded : true */1
/* sourceEnded */false,
/* innerEnded */true
];

@@ -628,3 +626,3 @@ Curry._1(source, (function (signal) {

} else {
state[/* sourceEnded */2] = /* true */1;
state[/* sourceEnded */2] = true;
return /* () */0;

@@ -639,3 +637,3 @@ }

} else {
state[/* innerEnded */3] = /* true */1;
state[/* innerEnded */3] = true;
return Curry._1(state[/* sourceTalkback */0], /* Pull */0);

@@ -650,3 +648,3 @@ }

}
state[/* innerEnded */3] = /* false */0;
state[/* innerEnded */3] = false;
state[/* innerTalkback */1] = tb;

@@ -662,3 +660,3 @@ return Curry._1(tb, /* Pull */0);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
Curry._1(state[/* sourceTalkback */0], /* End */1);

@@ -691,3 +689,3 @@ return Curry._1(state[/* innerTalkback */1], /* End */1);

var talkback = [Wonka_helpers.talkbackPlaceholder];
var ended = [/* false */0];
var ended = [false];
Curry._1(source, (function (signal) {

@@ -712,3 +710,3 @@ if (typeof signal === "number") {

} else {
ended[0] = /* true */1;
ended[0] = true;
return Curry._1(talkback[0], /* End */1);

@@ -715,0 +713,0 @@ }

@@ -11,3 +11,3 @@

Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
return Curry._1(removeListener, handler);

@@ -29,3 +29,3 @@ } else {

function (element, event, handler) {
element.addEventListener(event, handler);
element.removeEventListener(event, handler);
}

@@ -48,3 +48,3 @@ );

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
clearInterval(id);

@@ -59,3 +59,3 @@ return /* () */0;

function fromPromise(promise, sink) {
var ended = [/* false */0];
var ended = [false];
promise.then((function (value) {

@@ -69,4 +69,4 @@ if (!ended[0]) {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
ended[0] = /* true */1;
if (signal) {
ended[0] = true;
return /* () */0;

@@ -80,3 +80,3 @@ } else {

function debounce(debounceF, source, sink) {
var gotEndSignal = [/* false */0];
var gotEndSignal = [false];
var id = [/* None */0];

@@ -95,3 +95,3 @@ var $$clearTimeout$1 = function () {

if (typeof signal === "number") {
gotEndSignal[0] = /* true */1;
gotEndSignal[0] = true;
var match = id[0];

@@ -118,3 +118,3 @@ if (match) {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
$$clearTimeout$1(/* () */0);

@@ -131,3 +131,3 @@ return Curry._1(tb, /* End */1);

function throttle(throttleF, source, sink) {
var skip = [/* false */0];
var skip = [false];
var id = [/* None */0];

@@ -151,7 +151,7 @@ var $$clearTimeout$1 = function () {

} else {
skip[0] = /* true */1;
skip[0] = true;
$$clearTimeout$1(/* () */0);
id[0] = /* Some */[setTimeout((function () {
id[0] = /* None */0;
skip[0] = /* false */0;
skip[0] = false;
return /* () */0;

@@ -164,3 +164,3 @@ }), Curry._1(throttleF, signal[0]))];

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
$$clearTimeout$1(/* () */0);

@@ -178,3 +178,3 @@ return Curry._1(tb, /* End */1);

var state = /* record */[
/* ended : false */0,
/* ended */false,
/* value : None */0,

@@ -190,3 +190,3 @@ /* sourceTalkback */(function () {

if (typeof signal === "number") {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */3], /* End */1);

@@ -205,3 +205,3 @@ return Curry._1(sink, /* End */0);

if (typeof signal === "number") {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);

@@ -222,4 +222,4 @@ return Curry._1(sink, /* End */0);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
state[/* ended */0] = /* true */1;
if (signal) {
state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);

@@ -240,10 +240,8 @@ return Curry._1(state[/* notifierTalkback */3], /* End */1);

/* active */0,
/* gotEndSignal : false */0
/* gotEndSignal */false
];
Curry._1(source, (function (signal) {
var exit = 0;
if (typeof signal === "number") {
if (typeof signal === "number" || signal.tag) {
exit = 1;
} else if (signal.tag) {
exit = 1;
} else {

@@ -272,8 +270,8 @@ state[/* talkback */0] = signal[0];

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
state[/* gotEndSignal */2] = /* true */1;
if (state[/* active */1]) {
if (signal) {
state[/* gotEndSignal */2] = true;
if (state[/* active */1] === 0) {
return Curry._1(sink, /* End */0);
} else {
return 0;
} else {
return Curry._1(sink, /* End */0);
}

@@ -280,0 +278,0 @@ } else if (state[/* gotEndSignal */2]) {

@@ -58,3 +58,3 @@ 'use strict';

})];
var signals = /* int array */[];
var signals = /* array */[];
var source = function (x) {

@@ -61,0 +61,0 @@ Curry._1(x, /* Start */Block.__(0, [(function (signal) {

@@ -25,12 +25,12 @@ 'use strict';

var state = /* record */[
/* exhausted : false */0,
/* inLoop : false */0,
/* gotSignal : false */0
/* exhausted */false,
/* inLoop */false,
/* gotSignal */false
];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
var match = state[/* exhausted */0];
if (signal !== 0 || match !== 0) {
if (signal || match) {
return /* () */0;
} else {
state[/* gotSignal */2] = /* true */1;
state[/* gotSignal */2] = true;
if (state[/* inLoop */1]) {

@@ -43,3 +43,3 @@ return 0;

if (match) {
state[/* gotSignal */2] = /* false */0;
state[/* gotSignal */2] = false;
Curry._1(sink, /* Push */Block.__(1, [match[0]]));

@@ -49,3 +49,2 @@ if (state[/* gotSignal */2]) {

continue ;
} else {

@@ -55,3 +54,3 @@ return 0;

} else {
state[/* exhausted */0] = /* true */1;
state[/* exhausted */0] = true;
return Curry._1(sink, /* End */0);

@@ -61,5 +60,5 @@ }

};
state[/* inLoop */1] = /* true */1;
state[/* inLoop */1] = true;
explode(/* () */0);
state[/* inLoop */1] = /* false */0;
state[/* inLoop */1] = false;
return /* () */0;

@@ -66,0 +65,0 @@ }

@@ -44,8 +44,8 @@ 'use strict';

function fromValue(x, sink) {
var ended = [/* false */0];
var ended = [false];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0 || ended[0]) {
if (signal || ended[0]) {
return /* () */0;
} else {
ended[0] = /* true */1;
ended[0] = true;
Curry._1(sink, /* Push */Block.__(1, [x]));

@@ -123,3 +123,2 @@ return Curry._1(sink, /* End */0);

continue ;
} else {

@@ -159,3 +158,2 @@ return 0;

continue ;
} else {

@@ -181,3 +179,3 @@ return 0;

talkback[0] = tb;
if (!i) {
if (i === 0) {
Curry._1(sink, /* Start */Block.__(0, [(function (signal) {

@@ -202,4 +200,4 @@ return Curry._1(talkback[0], signal);

/* talkback */Wonka_helpers.talkbackPlaceholder,
/* ended : false */0,
/* gotSignal : false */0
/* ended */false,
/* gotSignal */false
];

@@ -210,6 +208,6 @@ return (function (sink) {

state[/* idCounter */1] = state[/* idCounter */1] + 1 | 0;
if (!id) {
if (id === 0) {
Curry._1(source, (function (signal) {
if (typeof signal === "number") {
state[/* ended */3] = /* true */1;
state[/* ended */3] = true;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (_, sink) {

@@ -222,3 +220,3 @@ return Curry._1(sink, /* End */0);

} else {
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (_, sink) {

@@ -235,6 +233,6 @@ return Curry._1(sink, signal);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
Belt_MutableMapInt.remove(state[/* sinks */0], id);
if (Belt_MutableMapInt.isEmpty(state[/* sinks */0])) {
state[/* ended */3] = /* true */1;
state[/* ended */3] = true;
return Curry._1(state[/* talkback */2], /* End */1);

@@ -247,3 +245,3 @@ } else {

} else {
state[/* gotSignal */4] = /* true */1;
state[/* gotSignal */4] = true;
return Curry._1(state[/* talkback */2], signal);

@@ -261,5 +259,5 @@ }

/* lastValB : None */0,
/* gotSignal : false */0,
/* gotSignal */false,
/* endCounter */0,
/* ended : false */0
/* ended */false
];

@@ -275,3 +273,3 @@ Curry._1(sourceA, (function (signal) {

} else {
state[/* ended */6] = /* true */1;
state[/* ended */6] = true;
return Curry._1(sink, /* End */0);

@@ -286,3 +284,3 @@ }

state[/* lastValA */2] = /* Some */[a];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[

@@ -295,3 +293,3 @@ a,

state[/* lastValA */2] = /* Some */[a];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return /* () */0;

@@ -313,3 +311,3 @@ }

} else {
state[/* ended */6] = /* true */1;
state[/* ended */6] = true;
return Curry._1(sink, /* End */0);

@@ -324,3 +322,3 @@ }

state[/* lastValB */3] = /* Some */[b];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[

@@ -333,3 +331,3 @@ match[0],

state[/* lastValB */3] = /* Some */[b];
state[/* gotSignal */4] = /* false */0;
state[/* gotSignal */4] = false;
return /* () */0;

@@ -345,4 +343,4 @@ }

return 0;
} else if (signal !== 0) {
state[/* ended */6] = /* true */1;
} else if (signal) {
state[/* ended */6] = true;
Curry._1(state[/* talkbackA */0], /* End */1);

@@ -353,3 +351,3 @@ return Curry._1(state[/* talkbackB */1], /* End */1);

} else {
state[/* gotSignal */4] = /* true */1;
state[/* gotSignal */4] = true;
Curry._1(state[/* talkbackA */0], signal);

@@ -394,3 +392,3 @@ return Curry._1(state[/* talkbackB */1], signal);

if (state[/* taken */0] < max) {
if (signal !== 0) {
if (signal) {
state[/* taken */0] = max;

@@ -428,3 +426,3 @@ return Curry._1(state[/* talkback */1], /* End */1);

function takeWhile(predicate, source, sink) {
var ended = [/* false */0];
var ended = [false];
var talkback = [Wonka_helpers.talkbackPlaceholder];

@@ -436,3 +434,3 @@ Curry._1(source, (function (signal) {

} else {
ended[0] = /* true */1;
ended[0] = true;
return Curry._1(sink, /* End */0);

@@ -446,3 +444,3 @@ }

} else {
ended[0] = /* true */1;
ended[0] = true;
Curry._1(sink, /* End */0);

@@ -459,4 +457,4 @@ return Curry._1(talkback[0], /* End */1);

return 0;
} else if (signal !== 0) {
ended[0] = /* true */1;
} else if (signal) {
ended[0] = true;
return Curry._1(talkback[0], /* End */1);

@@ -471,3 +469,3 @@ } else {

var state = /* record */[
/* ended : false */0,
/* ended */false,
/* sourceTalkback */Wonka_helpers.talkbackPlaceholder,

@@ -482,3 +480,3 @@ /* notifierTalkback */Wonka_helpers.talkbackPlaceholder

Curry._1(state[/* notifierTalkback */2], /* End */1);
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
return Curry._1(sink, /* End */0);

@@ -498,3 +496,3 @@ }

} else if (signal.tag) {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */2], /* End */1);

@@ -514,3 +512,3 @@ Curry._1(state[/* sourceTalkback */1], /* End */1);

return 0;
} else if (signal !== 0) {
} else if (signal) {
Curry._1(state[/* sourceTalkback */1], /* End */1);

@@ -537,3 +535,3 @@ return Curry._1(state[/* notifierTalkback */2], /* End */1);

function skipWhile(predicate, source, sink) {
var skip = [/* true */1];
var skip = [true];
return Wonka_helpers.captureTalkback(source, (function (signal, talkback) {

@@ -545,3 +543,3 @@ if (typeof signal === "number" || !signal.tag || !skip[0]) {

} else {
skip[0] = /* false */0;
skip[0] = false;
return Curry._1(sink, signal);

@@ -554,5 +552,5 @@ }

var state = /* record */[
/* skip : true */1,
/* ended : false */0,
/* gotSignal : false */0,
/* skip */true,
/* ended */false,
/* gotSignal */false,
/* sourceTalkback */Wonka_helpers.talkbackPlaceholder,

@@ -566,3 +564,3 @@ /* notifierTalkback */Wonka_helpers.talkbackPlaceholder

}
state[/* ended */1] = /* true */1;
state[/* ended */1] = true;
return Curry._1(sink, /* End */0);

@@ -575,3 +573,3 @@ } else if (signal.tag) {

} else {
state[/* gotSignal */2] = /* false */0;
state[/* gotSignal */2] = false;
return Curry._1(sink, signal);

@@ -586,3 +584,3 @@ }

} else if (signal.tag) {
state[/* skip */0] = /* false */0;
state[/* skip */0] = false;
return Curry._1(state[/* notifierTalkback */4], /* End */1);

@@ -599,10 +597,10 @@ } else {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
if (state[/* skip */0]) {
Curry._1(state[/* notifierTalkback */4], /* End */1);
}
state[/* ended */1] = /* true */1;
state[/* ended */1] = true;
return Curry._1(state[/* sourceTalkback */3], /* End */1);
} else if (!state[/* gotSignal */2] && !state[/* ended */1]) {
state[/* gotSignal */2] = /* true */1;
state[/* gotSignal */2] = true;
return Curry._1(state[/* sourceTalkback */3], /* Pull */0);

@@ -619,4 +617,4 @@ } else {

/* innerTalkback */Wonka_helpers.talkbackPlaceholder,
/* sourceEnded : false */0,
/* innerEnded : true */1
/* sourceEnded */false,
/* innerEnded */true
];

@@ -628,3 +626,3 @@ Curry._1(source, (function (signal) {

} else {
state[/* sourceEnded */2] = /* true */1;
state[/* sourceEnded */2] = true;
return /* () */0;

@@ -639,3 +637,3 @@ }

} else {
state[/* innerEnded */3] = /* true */1;
state[/* innerEnded */3] = true;
return Curry._1(state[/* sourceTalkback */0], /* Pull */0);

@@ -650,3 +648,3 @@ }

}
state[/* innerEnded */3] = /* false */0;
state[/* innerEnded */3] = false;
state[/* innerTalkback */1] = tb;

@@ -662,3 +660,3 @@ return Curry._1(tb, /* Pull */0);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
Curry._1(state[/* sourceTalkback */0], /* End */1);

@@ -691,3 +689,3 @@ return Curry._1(state[/* innerTalkback */1], /* End */1);

var talkback = [Wonka_helpers.talkbackPlaceholder];
var ended = [/* false */0];
var ended = [false];
Curry._1(source, (function (signal) {

@@ -712,3 +710,3 @@ if (typeof signal === "number") {

} else {
ended[0] = /* true */1;
ended[0] = true;
return Curry._1(talkback[0], /* End */1);

@@ -715,0 +713,0 @@ }

@@ -11,3 +11,3 @@ 'use strict';

Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
return Curry._1(removeListener, handler);

@@ -29,3 +29,3 @@ } else {

function (element, event, handler) {
element.addEventListener(event, handler);
element.removeEventListener(event, handler);
}

@@ -48,3 +48,3 @@ );

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
clearInterval(id);

@@ -59,3 +59,3 @@ return /* () */0;

function fromPromise(promise, sink) {
var ended = [/* false */0];
var ended = [false];
promise.then((function (value) {

@@ -69,4 +69,4 @@ if (!ended[0]) {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
ended[0] = /* true */1;
if (signal) {
ended[0] = true;
return /* () */0;

@@ -80,3 +80,3 @@ } else {

function debounce(debounceF, source, sink) {
var gotEndSignal = [/* false */0];
var gotEndSignal = [false];
var id = [/* None */0];

@@ -95,3 +95,3 @@ var $$clearTimeout$1 = function () {

if (typeof signal === "number") {
gotEndSignal[0] = /* true */1;
gotEndSignal[0] = true;
var match = id[0];

@@ -118,3 +118,3 @@ if (match) {

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
$$clearTimeout$1(/* () */0);

@@ -131,3 +131,3 @@ return Curry._1(tb, /* End */1);

function throttle(throttleF, source, sink) {
var skip = [/* false */0];
var skip = [false];
var id = [/* None */0];

@@ -151,7 +151,7 @@ var $$clearTimeout$1 = function () {

} else {
skip[0] = /* true */1;
skip[0] = true;
$$clearTimeout$1(/* () */0);
id[0] = /* Some */[setTimeout((function () {
id[0] = /* None */0;
skip[0] = /* false */0;
skip[0] = false;
return /* () */0;

@@ -164,3 +164,3 @@ }), Curry._1(throttleF, signal[0]))];

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
if (signal) {
$$clearTimeout$1(/* () */0);

@@ -178,3 +178,3 @@ return Curry._1(tb, /* End */1);

var state = /* record */[
/* ended : false */0,
/* ended */false,
/* value : None */0,

@@ -190,3 +190,3 @@ /* sourceTalkback */(function () {

if (typeof signal === "number") {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */3], /* End */1);

@@ -205,3 +205,3 @@ return Curry._1(sink, /* End */0);

if (typeof signal === "number") {
state[/* ended */0] = /* true */1;
state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);

@@ -222,4 +222,4 @@ return Curry._1(sink, /* End */0);

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
state[/* ended */0] = /* true */1;
if (signal) {
state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);

@@ -240,10 +240,8 @@ return Curry._1(state[/* notifierTalkback */3], /* End */1);

/* active */0,
/* gotEndSignal : false */0
/* gotEndSignal */false
];
Curry._1(source, (function (signal) {
var exit = 0;
if (typeof signal === "number") {
if (typeof signal === "number" || signal.tag) {
exit = 1;
} else if (signal.tag) {
exit = 1;
} else {

@@ -272,8 +270,8 @@ state[/* talkback */0] = signal[0];

return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
if (signal !== 0) {
state[/* gotEndSignal */2] = /* true */1;
if (state[/* active */1]) {
if (signal) {
state[/* gotEndSignal */2] = true;
if (state[/* active */1] === 0) {
return Curry._1(sink, /* End */0);
} else {
return 0;
} else {
return Curry._1(sink, /* End */0);
}

@@ -280,0 +278,0 @@ } else if (state[/* gotEndSignal */2]) {

{
"name": "wonka",
"version": "0.1.0-2",
"version": "0.1.0-3",
"author": "Phil Pluckthun <phil@kitten.sh>",
"files": [

@@ -10,3 +11,4 @@ "dist",

"docs/*.md",
"*.md"
"*.md",
"bsconfig.json"
],

@@ -44,5 +46,4 @@ "scripts": {

"devDependencies": {
"bs-jest": "^0.3.2",
"bs-loader": "^2.0.1",
"bs-platform": "^2.2.0",
"@glennsl/bs-jest": "^0.4.2",
"bs-platform": "^3.1.4",
"bundlesize": "^0.16.0",

@@ -55,12 +56,10 @@ "coveralls": "^3.0.0",

"moduleFileExtensions": [
"re",
"js",
"ml"
"js"
],
"testMatch": [
"**/__tests__/*_test.re"
"**/__tests__/*_test.js"
],
"transform": {
".(re|ml)": "bs-loader"
}
"modulePathIgnorePatterns": [
"/es6/"
]
},

@@ -67,0 +66,0 @@ "bundlesize": [

@@ -19,2 +19,106 @@ # Wonka

**Work in Progress:** Please come back in — let's say — one week! :tada:
* [What is `Wonka`](#what-is-wonka)
* [Why it exists](#why-it-exists)
* [Installation](#installation)
* [Getting Started](#getting-started)
* [Documentation (In Progress)](#documentation)
## What is `Wonka`
`Wonka` is a library for lightweight observables and iterables loosely based on the [callbag spec](https://github.com/callbag/callbag).
It exposes a set of helpers to create and transform sources and output sinks, meaning it helps you to turn an event source or an
iterable set of data into streams, and manipulate these streams.
## Why it exists
Reason has been becoming increasingly popular, but it's missing a good pattern for streams that feels native to the language.
The functional nature of callbags make them a perfect starting point to fix this, and to introduce a reactive programming
pattern to a language that is well suited for it.
Hence `Wonka` is a library that aims to make complex streams of data easy to deal with.
## Installation
Install the library first: `yarn add wonka` or `npm install --save wonka`,
Then add `wonka` to `bs-dependencies` in your `bsconfig.json` file like so:
```diff
{
"name": "<your name>",
"version": "0.1.0",
"sources": ["src"],
"bsc-flags": ["-bs-super-errors"],
"bs-dependencies": [
+ "wonka"
]
}
```
## Getting Started
Writing your first stream is very easy! Let's suppose you would like to create a stream from a list, filter out some values,
then map over the remaining ones, and lastly iterate over the final values.
This can be done with a few operators that might remind you of functions you would also call on iterables.
```reason
let example = [1, 2, 3, 4, 5, 6];
Wonka.fromList(example)
|> Wonka.filter(x => x mod 2 === 0)
|> Wonka.map(x => x * 2)
|> Wonka.forEach(x => print_endline(string_of_int(x)));
/* prints: 4, 8, 12 */
```
To explain what's going on:
- `fromList` creates a pullable source with values from the list
- `filter` only lets even values through
- `map` multiplies the values by `2`
- `forEach` pulls values from the resulting source and prints them
As you can see, all helpers that we've used are exposed on the `Wonka` module.
But if we would like to use JavaScript-based APIs, then we need to use the `WonkaJs` module.
Let's look at the same example, but instead of a list we will use an `interval` stream.
This stream will output ascending numbers starting from `0` indefinitely.
We will code the same example as before but we'd like the `interval` to push
a new number every `50ms` and to stop after seven values.
```reason
WonkaJs.interval(50)
|> Wonka.take(7)
|> Wonka.filter(x => x mod 2 === 0)
|> Wonka.map(x => x * 2)
|> Wonka.forEach(x => print_endline(string_of_int(x)));
/* prints: 4, 8, 12 */
```
The last three functions stay the same, but we are now using `interval` as our source.
This is a listenable source, meaning that it pushes values downwards when it sees fit.
And the `take` operator tells our source to stop sending values after having received seven
values.
And already you have mastered all the basics of `Wonka` and learned about a couple of its operators!
Go, you! :tada:
## Documentation
I am currently still working on getting some documentation up and running. Those will contain:
- The API, i.e. a list of all helpers
- Examples
- Usage Guides & Recipes
- Developer Guides (How to write a source/operator/sink)
- Modified Callbag spec
Stay tuned and read the signature files in the meantime please:
- [wonka.rei](./src/wonka.rei)
- [wonkaJs.rei](./src/wonka.rei)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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