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

fable-core

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fable-core - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

2

fable-core.min.js
!function(n,t){if("function"==typeof define&&define.amd)define(["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var e={exports:{}};t(e.exports),n.es2015=e.exports}}(this,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t={interfaces:Symbol("interfaces"),typeName:Symbol("typeName")};n.Symbol=t;var e=n.Choice=function(n,t){this.Case=n,this.Fields=[t]},r=n.Util={};r.__types=new Map,r.setInterfaces=function(n,e,o){var u=n[t.interfaces];if(Array.isArray(e)&&e.length>0)if(Array.isArray(u))for(var i=0;i<e.length;i++)u.push(e[i]);else n[t.interfaces]=e;o&&(n[t.typeName]=o,r.__types.set(o,n.constructor))},r.hasInterface=function(n,e){return Array.isArray(n[t.interfaces])&&n[t.interfaces].indexOf(e)>=0},r.getRestParams=function(n,t){for(var e=n.length,r=Array(e>t?e-t:0),o=t;e>o;o++)r[o-t]=n[o];return r},r.compareTo=function(n,t){function e(n){return Array.isArray(n)||ArrayBuffer.isView(n)||n instanceof s||n instanceof Map||n instanceof Set}function o(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(typeof n!=typeof t)return-1;if(null!=n&&null!=t&&"object"==typeof n&&"object"==typeof t){var u;if(Object.getPrototypeOf(n)!=Object.getPrototypeOf(t))return-1;if(r.hasInterface(n,"System.IComparable"))return n.compareTo(t);if(e(n))return u=r.compareTo(l.length(n),l.length(t)),0!=u?u:l.fold2(function(n,t,e){return 0!=n?n:r.compareTo(t,e)},0,o(n),o(t));if(n instanceof Date)return t>n?-1:n>t?1:0;var i=Object.getOwnPropertyNames(n),a=Object.getOwnPropertyNames(t);return u=r.compareTo(i.length,a.length),0!=u?u:l.fold2(function(e,o,u){return 0!=e?e:r.compareTo(n[o],t[u])},0,i.sort(),a.sort())}return t>n?-1:n>t?1:0},r.createObj=function(n){return l.fold(function(n,t){return n[t[0]]=t[1],n},{},n)},r.toJson=function(n){function e(n,e){if(ArrayBuffer.isView(e))return Array.from(e);if("object"==typeof e){if(e instanceof s||e instanceof Map||e instanceof Set)throw"JSON serialization of List, Map or Set is not supported";if(e[t.typeName]){var r={__type:e[t.typeName]};return Object.assign(r,e)}}return e}return JSON.stringify(n,e)},r.ofJson=function(n){function t(n,t){if("object"==typeof t&&t.__type){var e=r.__types.get(t.__type);if(e)return delete t.__type,Object.assign(new e,t)}return t}return JSON.parse(n,t)};var o=n.TimeSpan={};o.create=o.fromTicks=function(){var n=0,t=0,e=0,r=0,o=0;switch(arguments.length){case 1:return arguments[0]/1e4;case 3:t=arguments[0],e=arguments[1],r=arguments[2];break;default:n=arguments[0],t=arguments[1],e=arguments[2],r=arguments[3],o=arguments[4]||0}return 864e5*n+36e5*t+6e4*e+1e3*r+o},o.fromDays=function(n){return o.create(n,0,0,0)},o.fromHours=function(n){return o.create(n,0,0)},o.fromMinutes=function(n){return o.create(0,n,0)},o.fromSeconds=function(n){return o.create(0,0,n)},o.days=function(n){return Math.floor(n/864e5)},o.hours=function(n){return Math.floor(n%864e5/36e5)},o.minutes=function(n){return Math.floor(n%36e5/6e4)},o.seconds=function(n){return Math.floor(n%6e4/1e3)},o.milliseconds=function(n){return Math.floor(n%1e3)},o.ticks=function(n){return 1e4*n},o.totalDays=function(n){return n/864e5},o.totalHours=function(n){return n/36e5},o.totalMinutes=function(n){return n/6e4},o.totalSeconds=function(n){return n/1e3},o.duration=Math.abs,o.negate=function(n){return-n},o.add=function(n,t){return n+t},o.subtract=function(n,t){return n-t},o.compareTo=o.compare=r.compareTo;var u={};n.Date=u,u.__changeKind=function(n,t){var e;return n.kind==t?n:(e=new Date(n.getTime()),e.kind=t,e)},u.__getValue=function(n,t){return 1==n.kind?n["getUTC"+t]():n["get"+t]()},u.minValue=function(){return u.parse(-864e13,1)},u.maxValue=function(){return u.parse(864e13,1)},u.parse=function(n,t){var e=null==n?new Date:new Date(n);if(isNaN(e.getTime()))throw"The string is not a valid Date.";return e.kind=t||2,e},u.create=function(n,t,e,r,o,u,i,a){r=r||0,o=o||0,u=u||0,i=i||0,a=a||2;var c=1===a?new Date(Date.UTC(n,t-1,e,r,o,u,i)):new Date(n,t-1,e,r,o,u,i);if(isNaN(c.getTime()))throw"The parameters describe an unrepresentable Date.";return c.kind=a,c},u.now=u.parse,u.utcNow=function(){return u.parse(null,1)},u.today=function(){return u.date(u.now())},u.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},u.daysInMonth=function(n,t){return 2==t?u.isLeapYear(n)?29:28:t>=8?t%2==0?31:30:t%2==0?30:31},u.toUniversalTime=function(n){return u.__changeKind(n,1)},u.toLocalTime=function(n){return u.__changeKind(n,2)},u.timeOfDay=function(n){return o.create(u.hour(n),u.minute(n),u.second(n))},u.date=function(n){return u.create(u.year(n),u.month(n),u.day(n),0,0,0,0,n.kind)},u.day=function(n){return u.__getValue(n,"Date")},u.hour=function(n){return u.__getValue(n,"Hours")},u.millisecond=function(n){return u.__getValue(n,"Milliseconds")},u.minute=function(n){return u.__getValue(n,"Minutes")},u.month=function(n){return u.__getValue(n,"Month")+1},u.second=function(n){return u.__getValue(n,"Seconds")},u.year=function(n){return u.__getValue(n,"FullYear")},u.ticks=u.toBinary=function(n){return 1e4*(n.getTime()+62135604e6)},u.dayOfWeek=function(n){return u.__getValue(n,"Day")},u.dayOfYear=function(n){for(var t=u.year(n),e=u.month(n),r=u.day(n),o=1;e>o;o++)r+=u.daysInMonth(t,o);return r},u.add=u.op_Addition=function(n,t){return u.parse(n.getTime()+t,n.kind)},u.addDays=function(n,t){return u.parse(n.getTime()+864e5*t,n.kind)},u.addHours=function(n,t){return u.parse(n.getTime()+36e5*t,n.kind)},u.addMinutes=function(n,t){return u.parse(n.getTime()+6e4*t,n.kind)},u.addSeconds=function(n,t){return u.parse(n.getTime()+1e3*t,n.kind)},u.addMilliseconds=function(n,t){return u.parse(n.getTime()+t,n.kind)},u.addTicks=function(n,t){return u.parse(n.getTime()+t/1e4,n.kind)},u.addYears=function(n,t){var e=u.month(n),r=u.year(n)+t,o=u.daysInMonth(r,e),i=Math.min(o,u.day(n));return u.create(r,e,i,u.hour(n),u.minute(n),u.second(n),u.millisecond(n),n.kind)},u.addMonths=function(n,t){var e=u.month(n)+t,r=0,o=0;e>12?(r=e%12,o=Math.floor(e/12),e=r):1>e&&(r=12+e%12,o=Math.floor(e/12)+(12==r?-1:0),e=r);var i=u.year(n)+o,a=u.daysInMonth(i,e),c=Math.min(a,u.day(n));return u.create(i,e,c,u.hour(n),u.minute(n),u.second(n),u.millisecond(n),n.kind)},u.subtract=u.op_Subtraction=function(n,t){return"number"==typeof t?u.parse(n.getTime()-t,n.kind):n.getTime()-t.getTime()},u.toLongDateString=function(n){return n.toDateString()},u.toShortDateString=function(n){return n.toLocaleDateString()},u.toLongTimeString=function(n){return n.toLocaleTimeString()},u.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},u.equals=function(n,t){return n.getTime()==t.getTime()},u.compareTo=u.compare=r.compareTo;var i=n.Timer=function(n){this.interval=n>0?n:100,this.autoReset=!0,this._elapsed=new w};Object.defineProperty(i.prototype,"elapsed",{get:function(){return this._elapsed}}),Object.defineProperty(i.prototype,"enabled",{get:function(){return this._enabled},set:function(n){if(!this._isDisposed&&this._enabled!=n)if(this._enabled=n)if(this.autoReset){var t=this;this._intervalId=setInterval(function(){t.autoReset||(t.enabled=!1),t._elapsed.trigger(new Date)},this.interval)}else{var t=this;this._timeoutId=setTimeout(function(){t.enabled=!1,t._timeoutId=0,t.autoReset&&(t.enabled=!0),t._elapsed.trigger(new Date)},this.interval)}else this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)}}),i.prototype.dispose=i.prototype.close=function(){this.enabled=!1,this._isDisposed=!0},i.prototype.start=function(){this.enabled=!0},i.prototype.stop=function(){this.enabled=!1},r.setInterfaces(i.prototype,["System.IDisposable"]);var a={};n.String=a,a.fsFormatRegExp=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,a.fsFormat=function(n){function t(n){return!(null===n||"object"!=typeof n||n instanceof Number||n instanceof String||n instanceof Boolean)}function e(n,e){return n.replace(a.fsFormatRegExp,function(n,r,o,u,i,c){switch(c){case"f":case"F":e=e.toFixed(i||6);break;case"g":case"G":e=e.toPrecision(i);break;case"e":case"E":e=e.toExponential(i);break;case"A":e=(e instanceof Map?"map ":e instanceof Set?"set ":"")+JSON.stringify(e,function(n,e){return e&&e[Symbol.iterator]&&!Array.isArray(e)&&t(e)?Array.from(e):e})}var f=o.indexOf("+")>=0&&parseInt(e)>=0;if(!isNaN(u=parseInt(u))){var s=u>=0&&o.indexOf("0")>=0?"0":" ";e=a.padLeft(e,Math.abs(u)-(f?1:0),s,0>u)}return r+(f?"+"+e:e)})}function r(n){return function(t){var u=e(n,t);return a.fsFormatRegExp.test(u)?r(u):o(u.replace(/%%/g,"%"))}}var o;return function(t){return o=t,a.fsFormatRegExp.test(n)?r(n):o(n)}},a.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,a.format=function(n,t){return t=r.getRestParams(arguments,1),n.replace(a.formatRegExp,function(n,e,r,o){var i=t[e];if("number"==typeof i)switch((o||"").substring(0,1)){case"f":case"F":i=o.length>1?i.toFixed(o.substring(1)):i.toFixed(2);break;case"g":case"G":i=o.length>1?i.toPrecision(o.substring(1)):i.toPrecision();break;case"e":case"E":i=o.length>1?i.toExponential(o.substring(1)):i.toExponential();break;case"p":case"P":i=(o.length>1?(100*i).toFixed(o.substring(1)):(100*i).toFixed(2))+" %"}else if(i instanceof Date){if(1===o.length)switch(o){case"D":i=i.toDateString();break;case"T":i=i.toLocaleTimeString();break;case"d":i=i.toLocaleDateString();break;case"t":i=i.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}i=o.replace(/\w+/g,function(n){var t=n;switch(n.substring(0,1)){case"y":t=n.length<4?u.year(i)%100:u.year(i);break;case"h":t=i.getHours()>12?u.hour(i)%12:u.hour(i);break;case"M":t=u.month(i);break;case"d":t=u.day(i);break;case"H":t=u.hour(i);break;case"m":t=u.minute(i);break;case"s":t=u.second(i)}return t!==n&&10>t&&n.length>1&&(t="0"+t),t})}return isNaN(r=parseInt((r||"").substring(1)))||(i=a.padLeft(i,Math.abs(r)," ",0>r)),i})},a.init=function(n,t){if(0>n)throw"String length must be non-negative";for(var e=new Array(n),r=0;n>r;r++)e[r]=t(r);return e.join("")},a.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},a.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},a.padLeft=function(n,t,e,r){var o=-1;for(e=e||" ",n=String(n),t-=n.length;++o<t;)n=r?n+e:e+n;return n},a.padRight=function(n,t,e){return a.padLeft(n,t,e,!0)},a.replace=function(n,t,e){return n.replace(new RegExp(c.escape(t),"g"),e)},a.replicate=function(n,t){return a.init(n,function(){return t})},a.split=function(n,t,e,o){if(e="number"==typeof e?e:null,o="number"==typeof o?o:null,0>e)throw"Count cannot be less than zero";if(0===e)return[];t=Array.isArray(t)?t:r.getRestParams(arguments,1),t=t.filter(function(n){return n}).map(function(n){return c.escape(n)}),t=t.length>0?t:[" "];for(var u,i=0,a=[],f=new RegExp(t.join("|"),"g");(null==e||e>1)&&null!==(u=f.exec(n));)(!o||u.index-i>0)&&(e=null!=e?e-1:e,a.push(n.substring(i,u.index))),i=f.lastIndex;return(!o||n.length-i>0)&&a.push(n.substring(i)),a},a.join=a.concat=function(n,t){return t="string"==typeof t?r.getRestParams(arguments,1):t,(Array.isArray(t)?t:Array.from(t)).join(n)},a.endsWith=function(n,t){var e=n.lastIndexOf(t);return e>=0&&e==n.length-t.length},a.newGuid=function(){var n,t,e="";for(n=0;32>n;n++)t=16*Math.random()|0,(8===n||12===n||16===n||20===n)&&(e+="-"),e+=(12===n?4:16===n?3&t|8:t).toString(16);return e};var c={};n.RegExp=c,c.create=function(n,t){var e="g";return e+=1&t?"i":"",e+=2&t?"m":"",new RegExp(n,e)},c.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},c.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},c.isMatch=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=c.create(t,e);return r.test(n)},c.match=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=c.create(t,e);return r.exec(n)},c.matches=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=c.create(t,e);if(!r.global)throw"Non-global RegExp";for(var o,u=[];null!==(o=r.exec(n));)u.push(o);return u},c.options=function(n){var t=256;return t|=n.ignoreCase?1:0,t|=n.multiline?2:0},c.replace=function(n,t,e,r,o){if("string"==typeof n){var u=n;n=c.create(t,r),t=u,r=void 0}if("function"==typeof e){r=null==r?-1:r,o=null==o?0:o;var i=function(){var n=arguments[0];if(0!==r){r--;for(var t=[],o=arguments.length,u=0;o-2>u;u++)t.push(arguments[u]);t.index=arguments[o-2],t.input=arguments[o-1],n=e(t)}return n};return t.substring(0,o)+t.substring(o).replace(n,i)}if(null!=r){var a;o=null==o?0:o;var f=t.substring(o),s=c.matches(n,f),l=s.length>r?(a=s[r-1],f.substring(0,a.index+a[0].length)):f;return t.substring(0,o)+l.replace(n,e)+t.substring(o+l.length)}return t.replace(n,e)},c.split=function(n,t,e,r){if("string"==typeof n){var o=n;n=c.create(t,e),t=o,e=void 0}return t=null!=r?t.substring(r):t,t.split(n,e)};var f={};n.Array=f,f.addRangeInPlace=function(n,t){l.iter(function(n){t.push(n)},n)},f.blit=function(n,t,e,r,o){for(;o--;)e[r++]=n[t++]},f.partition=function(n,t){for(var e=[],r=[],o=0,u=0,i=0;i<t.length;i++)n(t[i])?e[o++]=t[i]:r[u++]=t[i];return[e,r]},f.permute=function(n,t){for(var e=t.map(function(){return 0}),r=new Array(t.length),o=0;o<t.length;o++){var u=n(o);if(0>u||u>=t.length)throw"Not a valid permutation";e[u]=t[o],r[u]=1}for(o=0;o<t.length;o++)if(1!=r[o])throw"Not a valid permutation";return e},f.removeInPlace=function(n,t){var e=t.indexOf(n);return e>-1?(t.splice(e,1),!0):!1},f.setSlice=function(n,t,e,r){var o=(e||n.length-1)-t;if(ArrayBuffer.isView(n)&&r.length<=o)n.set(r,t);else for(var u=0|t,i=0;o>=i;u++,i++)n[u]=r[i]},f.sortInPlaceBy=function(n,t,e){return e=e||1,t.sort(function(t,r){return t=n(t),r=n(r),(r>t?-1:t==r?0:1)*e})},f.unzip=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=0;r<n.length;r++)t[r]=n[r][0],e[r]=n[r][1];return[t,e]},f.unzip3=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=new Array(n.length),o=0;o<n.length;o++)t[o]=n[o][0],e[o]=n[o][1],r[o]=n[o][2];return[t,e,r]};var s=n.List=function(n,t){this.head=n,this.tail=t};s.ofArray=function(n,t){for(var e=n.length-1,r=t||new s;e>=0;e--)r=new s(n[e],r);return r},Object.defineProperty(s.prototype,"length",{get:function(){return l.fold(function(n,t){return n+1},0,this)}}),s.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var t=n;return n=n.tail,{done:null==t.tail,value:t.head}}}},s.append=s.prototype.append=function(n,t){return null==t&&(t=n,n=this),l.fold(function(n,t){return new s(t,n)},t,s.rev(n))},s.choose=s.prototype.choose=function(n,t){return s.rev(l.fold(function(t,e){var r=n(e);return null!=r?new s(r,t):t},new s,t||this))},s.collect=s.prototype.collect=function(n,t){return l.fold(function(t,e){return n(e).append(t)},new s,s.rev(t||this))},s.concat=s.prototype.concat=function(n){return s.collect(function(n){return n},n||this)},s.filter=s.prototype.filter=s.where=s.prototype.where=function(n,t){return s.rev(l.fold(function(t,e){return n(e)?new s(e,t):t},new s,t||this))},s.init=function(n,t){if(0>n)throw"List length must be non-negative";for(var e=new s,r=1;n>=r;r++)e=new s(t(n-r),e);return e},s.map=s.prototype.map=function(n,t){return s.rev(l.fold(function(t,e){return new s(n(e),t)},new s,t||this))},s.mapi=s.prototype.mapi=function(n,t){return s.rev(l.fold(function(t,e,r){return new s(n(r,e),t)},new s,t||this))},s.partition=s.prototype.partition=function(n,t){return l.fold(function(t,e){var r=t[0],o=t[1];return n(e)?[new s(e,r),o]:[r,new s(e,o)]},[new s,new s],s.rev(t||this))},s.replicate=function(n,t){return s.init(n,function(){return t})},s.rev=s.prototype.rev=function(n){return l.fold(function(n,t){return new s(t,n)},new s,n||this)},s.singleton=function(n){return new s(n,new s)},s.slice=s.prototype.slice=function(n,t,e){var r=null==n,o=null==t;return s.rev(l.fold(function(e,u,i){var a=(r||i>=n)&&(o||t>=i);return a?new s(u,e):e},new s,e||this))},s.unzip=s.prototype.unzip=function(n){return l.foldBack(function(n,t){return[new s(n[0],t[0]),new s(n[1],t[1])]},n||this,[new s,new s])},s.unzip3=s.prototype.unzip3=function(n){return l.foldBack(function(n,t){return[new s(n[0],t[0]),new s(n[1],t[1]),new s(n[2],t[2])]},n||this,[new s,new s,new s])};var l=n.Seq={};l.__failIfNone=function(n){if(null==n)throw"Seq did not contain any matching element";return n},l.toList=function(n){return l.foldBack(function(n,t){return new s(n,t)},n,new s)},l.ofList=function(n){return l.delay(function(){return l.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},n)})},l.ofArray=function(n){return l.delay(function(){return l.unfold(function(t){return t<n.length?[n[t],t+1]:null},0)})},l.append=function(n,t){return l.delay(function(){var e=!1,r=[n[Symbol.iterator](),t];return l.unfold(function(){var n;if(!e){if(n=r[0].next(),!n.done)return[n.value,r];e=!0,r=[null,r[1][Symbol.iterator]()]}return n=r[1].next(),n.done?null:[n.value,r]},r)})},l.average=function(n){var t=1,e=l.reduce(function(n,e){return t++,n+e},n);return e/t},l.averageBy=function(n,t){var e=1,r=l.reduce(function(t,r){return e++,(2===e?n(t):t)+n(r)},t);return r/e},l.countBy=function(n,t){return l.map(function(n){return[n[0],l.length(n[1])]},l.groupBy(n,t))},l.concat=function(n){return l.delay(function(){var t=n[Symbol.iterator]();return l.unfold(function(n){for(var e,r=null,o=!1;!o;)null==n?(e=t.next(),e.done?o=!0:n=e.value[Symbol.iterator]()):(e=n.next(),e.done?n=null:(r=e.value,o=!0));return null!=n&&null!=r?[r,n]:null},null)})},l.collect=function(n,t){return l.concat(l.map(n,t))},l.choose=function(n,t){var e=function(t){var r=t.next();if(!r.done){var o=n(r.value);return null!=o?[o,t]:e(t)}};return l.delay(function(){return l.unfold(function(n){return e(n)},t[Symbol.iterator]())})},l.compareWith=function(n,t,e){var r=l.tryFind(function(n){return 0!=n},l.map2(function(t,e){return n(t,e)},t,e));return null!=r?r:l.length(t)-l.length(e)},l.delay=function(n){var t={};return t[Symbol.iterator]=function(){return n()[Symbol.iterator]()},t},l.distinctBy=function(n,t){return l.choose(function(n){return n[0]},l.scan(function(t,e){var r=t[1],o=n(e);return r.has(o)?[null,r]:[e,r.add(o)]},[null,new Set],t))},l.distinct=function(n){return l.distinctBy(function(n){return n},n)},l.empty=function(){return l.unfold(function(){})},l.enumerateWhile=function(n,t){return l.concat(l.unfold(function(){return n()?[t,!0]:null}),!0)},l.enumerateThenFinally=function(n,t){return l.delay(function(){var e;try{e=n[Symbol.iterator]()}finally{t()}return l.unfold(function(n){try{var e=n.next();return e.done?null:[e.value,n]}finally{t()}},e)})},l.enumerateUsing=function(n,t){var e=!1,r=function(){e||(e=!0,n.dispose())};try{return l.enumerateThenFinally(t(n),r)}finally{r()}},l.exactlyOne=function(n){var t=n[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";var r=t.next();if(!r.done)throw"Seq had multiple items";return e.value},l.exists=function(n,t){var e=function(t){var r=t.next();return!r.done&&(n(r.value)||e(t))};return e(t[Symbol.iterator]())},l.exists2=function(n,t,e){var r=function(t,e){var o=t.next(),u=e.next();return!o.done&&!u.done&&(n(o.value,u.value)||r(t,e))};return r(t[Symbol.iterator](),e[Symbol.iterator]())},l.filter=l.where=function(n,t){var e=function(t){var r=t.next();return r.done?void 0:n(r.value)?[r.value,t]:e(t)};return l.delay(function(){return l.unfold(e,t[Symbol.iterator]())})},l.fold=function(n,t,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(n,t);for(var r=0,o=null,u=e[Symbol.iterator]();o=u.next(),!o.done;r++)t=n(t,o.value,r);return t},l.foldBack=function(n,t,e){for(var r=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),o=r.length-1;o>=0;o--)e=n(r[o],e,o);return e},l.fold2=function(n,t,e,r){for(var o,u,i=e[Symbol.iterator](),a=r[Symbol.iterator](),c=0;o=i.next(),u=a.next(),!o.done&&!u.done;c++)t=n(t,o.value,u.value,c);return t},l.foldBack2=function(n,t,e,r){for(var o=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),u=Array.isArray(e)||ArrayBuffer.isView(e)?e:Array.from(e),i=o.length-1;i>=0;i--)r=n(o[i],u[i],r,i);return r},l.forall=function(n,t){return l.fold(function(t,e){return t&&n(e)},!0,t)},l.forall2=function(n,t,e){return l.fold2(function(t,e,r){return t&&n(e,r)},!0,t,e)},l.groupBy=function(n,t){return l.fold(function(t,e){var r=n(e),o=t.get(r);return null!=o?t.set(r,new s(e,o)):t.set(r,new s(e,new s))},new Map,t)},l.tryHead=function(n){var t=n[Symbol.iterator](),e=t.next();return e.done?null:e.value},l.head=function(n){return l.__failIfNone(l.tryHead(n))},l.init=function(n,t){return l.delay(function(){return l.unfold(function(e){return n>e?[t(e),e+1]:null},0)})},l.initInfinite=function(n){return l.delay(function(){return l.unfold(function(t){return[n(t),t+1]},0)})},l.tryItem=function(n,t){if(0>n)return null;if(Array.isArray(t)||ArrayBuffer.isView(t))return n<t.length?t[n]:null;for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(e===n)return o.value}},l.item=function(n,t){return l.__failIfNone(l.tryItem(n,t))},l.iter=function(n,t){l.fold(function(t,e){n(e)},null,t)},l.iter2=function(n,t,e){l.fold2(function(t,e,r){n(e,r)},null,t,e)},l.iteri=function(n,t){l.fold(function(t,e,r){n(r,e)},null,t)},l.iteri2=function(n,t,e){l.fold2(function(t,e,r,o){n(o,e,r)},null,t,e)},l.isEmpty=function(n){var t=n[Symbol.iterator]();return t.next().done},l.tryLast=function(n){try{return l.reduce(function(n,t){return t},n)}catch(t){return null}},l.last=function(n){return l.__failIfNone(l.tryLast(n))},l.length=function(n){return Array.isArray(n)||ArrayBuffer.isView(n)?n.length:l.fold(function(n,t){return n+1},0,n)},l.map=function(n,t){return l.delay(function(){return l.unfold(function(t){var e=t.next();return e.done?null:[n(e.value),t]},t[Symbol.iterator]())})},l.mapi=function(n,t){return l.delay(function(){var e=0;return l.unfold(function(t){var r=t.next();return r.done?null:[n(e++,r.value),t]},t[Symbol.iterator]())})},l.map2=function(n,t,e){return l.delay(function(){var r=t[Symbol.iterator](),o=e[Symbol.iterator]();return l.unfold(function(){var t=r.next(),e=o.next();return t.done||e.done?null:[n(t.value,e.value),null]})})},l.mapi2=function(n,t,e){return l.delay(function(){var r=0,o=t[Symbol.iterator](),u=e[Symbol.iterator]();return l.unfold(function(){var t=o.next(),e=u.next();return t.done||e.done?null:[n(r++,t.value,e.value),null]})})},l.map3=function(n,t,e,r){return l.delay(function(){var o=t[Symbol.iterator](),u=e[Symbol.iterator](),i=r[Symbol.iterator]();return l.unfold(function(){var t=o.next(),e=u.next(),r=i.next();return t.done||e.done||r.done?null:[n(t.value,e.value,r.value),null]})})},l.max=function(n){return l.reduce(function(n,t){return Math.max(n,t)},n)},l.maxBy=function(n,t){return l.reduce(function(t,e){return n(e)>n(t)?e:t},t)},l.min=function(n){return l.reduce(function(n,t){return Math.min(n,t)},n)},l.minBy=function(n,t){return l.reduce(function(t,e){return n(e)>n(t)?t:e},t)},l.pairwise=function(n){return l.skip(1,l.scan(function(n,t){return[n[1],t]},[0,0],n))},l.permute=function(n,t){var e=Array.from(t);return l.ofArray(f.permute(n,e))},l.rangeStep=function(n,t,e){if(0===t)throw"Step cannot be 0";return l.unfold(function(n){return t>0&&e>=n||0>t&&n>=e?[n,n+t]:null},n)},l.rangeChar=function(n,t){return l.unfold(function(n){return t>=n?[n,String.fromCharCode(n.charCodeAt(0)+1)]:null},n)},l.range=function(n,t){return l.rangeStep(n,1,t)},l.readonly=function(n){return l.map(function(n){return n},n)},l.reduce=function(n,t){if(Array.isArray(t)||ArrayBuffer.isView(t))return t.reduce(n);var e=t[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";for(var o=r.value;r=e.next(),!r.done;)o=n(o,r.value);return o},l.reduceBack=function(n,t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t);if(0===e.length)throw"Seq was empty";for(var r=e[e.length-1],o=e.length-2;o>=0;o--)r=n(e[o],r,o);return r},l.replicate=function(n,t){return l.init(n,function(){return t})},l.rev=function(n){var t=Array.isArray(n)||ArrayBuffer.isView(n)?n.slice(0):Array.from(n);return t.reverse()},l.scan=function(n,t,e){return l.delay(function(){var r=e[Symbol.iterator]();return l.unfold(function(e){if(null==e)return[t,t];var o=r.next();return o.done?void 0:(e=n(e,o.value),[e,e])},null)})},l.scanBack=function(n,t,e){return l.rev(l.scan(function(t,e){return n(e,t)},e,l.rev(t)))},l.singleton=function(n){return l.unfold(function(n){return null!=n?[n,null]:null},n)},l.skip=function(n,t){var e={};return e[Symbol.iterator]=function(){for(var e=t[Symbol.iterator](),r=1;n>=r;r++)if(e.next().done)throw"Seq has not enough elements";return e},e},l.skipWhile=function(n,t){return l.delay(function(){var e=!1;return l.filter(function(t){return e||(e=!n(t))},t)})},l.sortWith=function(n,t){var e=Array.from(t);return l.ofArray(e.sort(n))},l.sum=function(n,t){return t=t||function(n,t){return n+t},l.reduce(function(n,e){return t(n,e)},n)},l.sumBy=function(n,t,e){var r=!0;return e=e||function(n,t){return n+t},l.reduce(function(t,e){return t=r?n(t):t,r=!1,t+n(e)},t)},l.tail=function(n){var t=n[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";var r={};return r[Symbol.iterator]=function(){return t},r},l.take=function(n,t,e){return l.delay(function(){var r=t[Symbol.iterator]();return l.unfold(function(t){if(n>t){var o=r.next();if(!o.done)return[o.value,t+1];if(!e)throw"Seq has not enough elements"}},0)})},l.truncate=function(n,t){return l.take(n,t,!0)},l.takeWhile=function(n,t){return l.delay(function(){var e=t[Symbol.iterator]();return l.unfold(function(t){var r=e.next();return!r.done&&n(r.value)?[r.value,null]:void 0},0)})},l.tryFind=function(n,t){for(var e,r=0,o=t[Symbol.iterator]();;r++){if(e=o.next(),e.done)return null;if(n(e.value,r))return e.value}},l.find=function(n,t){return l.__failIfNone(l.tryFind(n,t))},l.tryFindBack=function(n,t){for(var e,r=null,o=0,u=t[Symbol.iterator]();;o++){if(e=u.next(),e.done)return r;n(e.value,o)&&(r=e.value)}},l.findBack=function(n,t){return l.__failIfNone(l.tryFindBack(n,t))},l.tryFindIndex=function(n,t){for(var e,r=0,o=t[Symbol.iterator]();;r++){if(e=o.next(),e.done)return null;if(n(e.value,r))return r}},l.findIndex=function(n,t){return l.__failIfNone(l.tryFindIndex(n,t))},l.tryFindIndexBack=function(n,t){for(var e,r=null,o=0,u=t[Symbol.iterator]();;o++){if(e=u.next(),e.done)return r;n(e.value,o)&&(r=o)}},l.findIndexBack=function(n,t){return l.__failIfNone(l.tryFindIndexBack(n,t))},l.tryPick=function(n,t){for(var e,r=0,o=t[Symbol.iterator]();e=o.next(),!e.done;r++){var u=n(e.value,r);if(null!=u)return u}},l.pick=function(n,t){return l.__failIfNone(l.tryPick(n,t))},l.unfold=function(n,t){var e={};return e[Symbol.iterator]=function(){return{next:function(){var e=n(t);return null!=e?(t=e[1],{done:!1,value:e[0]}):{done:!0}}}},e},l.zip=function(n,t){return l.map2(function(n,t){return[n,t]},n,t)},l.zip3=function(n,t,e){return l.map3(function(n,t,e){return[n,t,e]},n,t,e)};var d={};n.Set=d,d.ofArray=function(n){for(var t=new Set,e=0;e<n.length;e++)t.add(n[e]);return t},d.ofSeq=function(n){return l.fold(function(n,t){return n.add(t)},new Set,n)},d.op_Addition=d.union=function(n,t){var e=new Set(n);return t.forEach(function(n){e.add(n)}),e},d.unionMany=function(n){return l.fold(function(n,t){return t.forEach(function(t){n.add(t)}),n},new Set,n)},d.op_Subtraction=d.difference=function(n,t){var e=new Set(n);return t.forEach(function(n){e["delete"](n)}),e},d.intersect=function(n,t){var e=new Set(n);return n.forEach(function(n){t.has(n)||e["delete"](n)}),e},d.intersectMany=function(n){var t=Array.isArray(n)?n:Array.from(n);if(0==t.length)throw"Seq was empty";var e=new Set(t[0]);return l.iter(function(n){for(var r=1;r<t.length;r++)if(!t[r].has(n)){e["delete"](n);break}},t[0]),e},d.isProperSubsetOf=d.isProperSubset=function(n,t){return l.forall(function(n){return t.has(n)},n)&&l.exists(function(t){return!n.has(t)},t)},d.isSubsetOf=d.isSubset=function(n,t){return l.forall(function(n){return t.has(n)},n)},d.isProperSupersetOf=d.isProperSuperset=function(n,t){return d.isProperSubset(t,n)},d.isSupersetOf=d.isSuperset=function(n,t){return d.isSubset(t,n)},d.copyTo=function(n,t,e,r){if(!t instanceof Array)throw"Array is invalid";r=r||t.length;for(var o=e||0,u=n[Symbol.iterator]();r--;){var i=u.next();if(i.done)break;t[o++]=i.value}},d.partition=function(n,t){return l.fold(function(t,e){var r=t[0],o=t[1];return n(e)?[r.add(e),o]:[r,o.add(e)]},[new Set,new Set],t)},d.removeInPlace=function(n,t){return t["delete"](n),t},d.remove=function(n,t){return d.removeInPlace(n,new Set(t))};var p={};n.Map=p,p.ofArray=function(n){for(var t=new Map,e=0;e<n.length;e++)t.set(n[e][0],n[e][1]);return t},p.ofSeq=function(n){return l.fold(function(n,t){return n.set(t[0],t[1])},new Map,n)},p.containsValue=function(n,t){return l.fold(function(e,r){return e||t.get(r)===n},!1,t.keys())},p.exists=function(n,t){return l.exists(function(t){return n(t[0],t[1])},t)},p.filter=function(n,t){return l.fold(function(t,e){return n(e[0],e[1])?t.set(e[0],e[1]):t},new Map,t)},p.fold=function(n,t,e){return l.fold(function(t,e){return n(t,e[0],e[1])},t,e)},p.foldBack=function(n,t,e){return l.foldBack(function(t,e){return n(t[0],t[1],e)},t,e)},p.forall=function(n,t){return l.forall(function(t){return n(t[0],t[1])},t)},p.iter=function(n,t){return l.iter(function(t){n(t[0],t[1])},t)},p.map=function(n,t){return l.fold(function(t,e){return t.set(e[0],n(e[0],e[1]))},new Map,t)},p.partition=function(n,t){return l.fold(function(t,e){var r=t[0],o=t[1],u=e[0],i=e[1];return n(u,i)?[r.set(u,i),o]:[r,o.set(u,i)]},[new Map,new Map],t)},p.findKey=function(n,t){return l.pick(function(t){return n(t[0],t[1])?t[0]:null},t)},p.tryFindKey=function(n,t){return l.tryPick(function(t){return n(t[0],t[1])?t[0]:null},t)},p.pick=function(n,t){return l.pick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},p.removeInPlace=d.removeInPlace,p.remove=function(n,t){return p.removeInPlace(n,new Map(t))},p.tryPick=function(n,t){return l.tryPick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)};var y=n.Async={};y.__protectedCont=function(n){return function(t){if(t.cancelToken.isCancelled)t.onCancel("cancelled");else try{n(t)}catch(e){t.onError(e)}}},y.bind=function(n,t){return y.__protectedCont(function(e){n({onSuccess:function(n){return t(n)(e)},onError:e.onError,onCancel:e.onCancel,cancelToken:e.cancelToken})})},y.combine=function(n,t){return y.bind(n,function(){return t})},y.delay=function(n){return y.__protectedCont(function(t){n()(t)})},y["for"]=function(n,t){var e=n[Symbol.iterator](),r=e.next();return y["while"](function(){return!r.done},y.delay(function(){var n=t(r.value);return r=e.next(),n}))},y["return"]=function(n){return y.__protectedCont(function(t){t.onSuccess(n)})},y.returnFrom=function(n){return n},y.tryFinally=function(n,t){return y.__protectedCont(function(e){n({onSuccess:function(n){t(),e.onSuccess(n)},onError:function(n){t(),e.onError(n)},onCancel:function(n){t(),e.onCancel(n)},cancelToken:e.cancelToken})})},y.tryWith=function(n,t){return y.__protectedCont(function(e){n({onSuccess:e.onSuccess,onCancel:e.onCancel,cancelToken:e.cancelToken,onError:function(n){e.onSuccess(t(n))}})})},y.using=function(n,t){return y.tryFinally(t(n),function(){n.dispose()})},y["while"]=function(n,t){return n()?y.bind(t,function(){return y["while"](n,t)}):y["return"]()},y.zero=function(){return y.__protectedCont(function(n){n.onSuccess()})},y.start=y.startImmediate=y.startWithContinuations=function(n,t,e,r,o){"function"!=typeof t&&(o=t,t=null),n({onSuccess:t?t:function(){},onError:e?e:function(){},onCancel:r?r:function(){},cancelToken:o?o:{}})},y.ignore=function(n){return y.bind(n,function(){return y["return"]()})},Object.defineProperty(y,"cancellationToken",{get:function(){return y.__protectedCont(function(n){return n.onSuccess(n.cancelToken)})}}),y.fromContinuations=function(n){return y.__protectedCont(function(t){return n([t.onSuccess,t.onError,t.onCancel])})},y.startAsPromise=function(n,t){return new Promise(function(e,r){y.startWithContinuations(n,e,r,r,t?t:{})})},y.awaitPromise=function(n){return y.fromContinuations(function(t){n.then(t[0])["catch"](function(n){("cancelled"==n?t[2]:t[1])(n);
})})},y.parallel=function(n){return y.awaitPromise(Promise.all(l.map(function(n){return y.startAsPromise(n)},n)))},y["catch"]=function(n){return y.__protectedCont(function(t){n({onSuccess:function(n){t.onSuccess(new e("Choice1Of2",n))},onError:function(n){t.onSuccess(new e("Choice2Of2",n))},onCancel:t.onCancel,cancelToken:t.cancelToken})})},y.sleep=function(n){return y.__protectedCont(function(t){setTimeout(function(){t.cancelToken.isCancelled?t.onCancel("cancelled"):t.onSuccess()},n)})};var m=function(){};m.prototype.add=function(n){var t={value:n};this.firstAndLast?(this.firstAndLast[1].next=t,this.firstAndLast=[this.firstAndLast[0],t]):this.firstAndLast=[t,t]},m.prototype.tryGet=function(n){if(this.firstAndLast){var t=this.firstAndLast[0].value;return this.firstAndLast[0].next?this.firstAndLast=[this.firstAndLast[0].next,this.firstAndLast[1]]:delete this.firstAndLast,t}};var h=n.MailboxProcessor=function(n){this.body=n,this.messages=new m};h.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},h.prototype.start=function(){y.startImmediate(this.body(this))},h.start=function(n){var t=new h(n);return t.start(),t},h.prototype.receive=function(){var n=this;return y.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},h.prototype.postAndAsyncReply=function(n){function t(){e&&r&&r(e)}var e,r,o={reply:function(n){e=n,t()}};return this.messages.add(n(o)),this.__processEvents(),y.fromContinuations(function(n){r=n[0],t()})},h.prototype.post=function(n){this.messages.add(n),this.__processEvents()};var v=function(n,t,e){this.onNext=n,this.onError=t||function(n){},this.onCompleted=e||function(){}};r.setInterfaces(v.prototype,["System.IObserver"]);var g=function(n){this.subscribe=n};r.setInterfaces(g.prototype,["System.IObservable"]);var b={};n.Observable=b,b.__protect=function(n,t,e){try{t(n())}catch(r){e(r)}},b.map=function(n,t){return new g(function(e){return t.subscribe(new v(function(t){b.__protect(function(){n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))})},b.choose=function(n,t){return new g(function(e){return t.subscribe(new v(function(t){b.__protect(function(){n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))})},b.filter=function(n,t){return b.choose(function(t){return n(t)?t:null},t)},b.partition=function(n,t){return[b.filter(n,t),b.filter(function(t){return!n(t)},t)]},b.scan=function(n,t,e){return new g(function(r){return e.subscribe(new v(function(e){b.__protect(function(){n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},b.add=function(n,t){t.subscribe(new v(n))},b.subscribe=function(n,t){return t.subscribe(new v(n))},b.pairwise=function(n){return new g(function(t){var e=null;return n.subscribe(new v(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},b.merge=function(n,e){return new g(function(r){var o=!1,u=!1,i=!1,a=n.subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(u=!0,i&&(o=!0,r.onCompleted()))})),c=e.subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(i=!0,u&&(o=!0,r.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[t.interfaces]=["System.IDisposable"],f})},b.split=function(n,t){return[b.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),b.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]};var w=n.Event=function(n,e){var r=this;this.delegates=e||new Array,this.trigger=function(n){l.iter(function(t){t(n)},r.delegates)};var o=function(n){r.delegates.push(n)},u=function(n){var t=function(t,e,r){return""+t==""+n},e=r.delegates.findIndex(t);e>-1&&r.delegates.splice(e,1)};this.subscribe=function(n){var e;return o(n),e={dispose:function(){u(n)}},e[t.interfaces]=["System.IDisposable"],e},this.add=function(n){o(n)},this.addHandler=function(n){var t=function(t){return n(void 0,t)};o(t)},this.removeHandler=function(n){var t=function(t){return n(void 0,t)};u(t)},this._subscribe=n||function(n){var e,r=n.onNext;return o(r),e={dispose:function(){u(r)}},e[t.interfaces]=["System.IDisposable"],e}};Object.defineProperty(w.prototype,"publish",{get:function(){return this}}),w.add=function(n,t){t._subscribe(new v(n))},w.map=function(n,t){var e=function(e){t._subscribe(new v(function(t){b.__protect(function(){return n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))};return new w(e,t.delegates)},w.choose=function(n,t){var e=function(e){return t._subscribe(new v(function(t){b.__protect(function(){return n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))};return new w(e,t.delegates)},w.filter=function(n,t){return w.choose(function(t){return n(t)?t:null},t)},w.partition=function(n,t){return[w.filter(n,t),w.filter(function(t){return!n(t)},t)]},w.scan=function(n,t,e){var r=function(r){return e._subscribe(new v(function(e){b.__protect(function(){return n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))};return new w(r,e.delegates)},w.pairwise=function(n){var t=function(t){var e=null;return n._subscribe(new v(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))};return new w(t,n.delegates)},w.merge=function(n,e){var r=function(r){var o=!1,u=!1,i=!1,a=n._subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(u=!0,i&&(o=!0,r.onCompleted()))})),c=e._subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(i=!0,u&&(o=!0,r.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[t.interfaces]=["System.IDisposable"],f};return new w(r,n.delegates.concat(e.delegates))},w.split=function(n,t){return[w.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),w.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]}});
})})},y.parallel=function(n){return y.awaitPromise(Promise.all(l.map(function(n){return y.startAsPromise(n)},n)))},y["catch"]=function(n){return y.__protectedCont(function(t){n({onSuccess:function(n){t.onSuccess(new e("Choice1Of2",n))},onError:function(n){t.onSuccess(new e("Choice2Of2",n))},onCancel:t.onCancel,cancelToken:t.cancelToken})})},y.sleep=function(n){return y.__protectedCont(function(t){setTimeout(function(){t.cancelToken.isCancelled?t.onCancel("cancelled"):t.onSuccess()},n)})};var h=function(){};h.prototype.add=function(n){var t={value:n};this.firstAndLast?(this.firstAndLast[1].next=t,this.firstAndLast=[this.firstAndLast[0],t]):this.firstAndLast=[t,t]},h.prototype.tryGet=function(n){if(this.firstAndLast){var t=this.firstAndLast[0].value;return this.firstAndLast[0].next?this.firstAndLast=[this.firstAndLast[0].next,this.firstAndLast[1]]:delete this.firstAndLast,t}};var m=n.MailboxProcessor=function(n){this.body=n,this.messages=new h};m.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},m.prototype.start=function(){y.startImmediate(this.body(this))},m.start=function(n){var t=new m(n);return t.start(),t},m.prototype.receive=function(){var n=this;return y.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},m.prototype.postAndAsyncReply=function(n){function t(){e&&r&&r(e)}var e,r,o={reply:function(n){e=n,t()}};return this.messages.add(n(o)),this.__processEvents(),y.fromContinuations(function(n){r=n[0],t()})},m.prototype.post=function(n){this.messages.add(n),this.__processEvents()};var v=function(n,t,e){this.onNext=n,this.onError=t||function(n){},this.onCompleted=e||function(){}};r.setInterfaces(v.prototype,["System.IObserver"]);var g=function(n){this.subscribe=n};r.setInterfaces(g.prototype,["System.IObservable"]);var b={};n.Observable=b,b.__protect=function(n,t,e){try{t(n())}catch(r){e(r)}},b.map=function(n,t){return new g(function(e){return t.subscribe(new v(function(t){b.__protect(function(){n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))})},b.choose=function(n,t){return new g(function(e){return t.subscribe(new v(function(t){b.__protect(function(){n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))})},b.filter=function(n,t){return b.choose(function(t){return n(t)?t:null},t)},b.partition=function(n,t){return[b.filter(n,t),b.filter(function(t){return!n(t)},t)]},b.scan=function(n,t,e){return new g(function(r){return e.subscribe(new v(function(e){b.__protect(function(){n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},b.add=function(n,t){t.subscribe(new v(n))},b.subscribe=function(n,t){return t.subscribe(new v(n))},b.pairwise=function(n){return new g(function(t){var e=null;return n.subscribe(new v(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},b.merge=function(n,e){return new g(function(r){var o=!1,u=!1,i=!1,a=n.subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(u=!0,i&&(o=!0,r.onCompleted()))})),c=e.subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(i=!0,u&&(o=!0,r.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[t.interfaces]=["System.IDisposable"],f})},b.split=function(n,t){return[b.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),b.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]};var w=n.Event=function(n,e){var r=this;this.delegates=e||new Array,this.trigger=function(n){l.iter(function(t){t(n)},r.delegates)};var o=function(n){r.delegates.push(n)},u=function(n){var t=function(t,e,r){return""+t==""+n},e=r.delegates.findIndex(t);e>-1&&r.delegates.splice(e,1)};this.subscribe=function(n){var e;return o(n),e={dispose:function(){u(n)}},e[t.interfaces]=["System.IDisposable"],e},this.add=function(n){o(n)},this.addHandler=function(n){var t=function(t){return n(void 0,t)};o(t)},this.removeHandler=function(n){var t=function(t){return n(void 0,t)};u(t)},this._subscribe=n||function(n){var e,r=n.onNext;return o(r),e={dispose:function(){u(r)}},e[t.interfaces]=["System.IDisposable"],e}};Object.defineProperty(w.prototype,"publish",{get:function(){return this}}),w.add=function(n,t){t._subscribe(new v(n))},w.map=function(n,t){var e=function(e){t._subscribe(new v(function(t){b.__protect(function(){return n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))};return new w(e,t.delegates)},w.choose=function(n,t){var e=function(e){return t._subscribe(new v(function(t){b.__protect(function(){return n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))};return new w(e,t.delegates)},w.filter=function(n,t){return w.choose(function(t){return n(t)?t:null},t)},w.partition=function(n,t){return[w.filter(n,t),w.filter(function(t){return!n(t)},t)]},w.scan=function(n,t,e){var r=function(r){return e._subscribe(new v(function(e){b.__protect(function(){return n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))};return new w(r,e.delegates)},w.pairwise=function(n){var t=function(t){var e=null;return n._subscribe(new v(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))};return new w(t,n.delegates)},w.merge=function(n,e){var r=function(r){var o=!1,u=!1,i=!1,a=n._subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(u=!0,i&&(o=!0,r.onCompleted()))})),c=e._subscribe(new v(function(n){o||r.onNext(n)},function(n){o||(o=!0,r.onError(n))},function(){o||(i=!0,u&&(o=!0,r.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[t.interfaces]=["System.IDisposable"],f};return new w(r,n.delegates.concat(e.delegates))},w.split=function(n,t){return[w.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),w.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]};var S=n.Lazy=function(n){this.factory=n,this.isValueCreated=!1};S.createFromValue=function(n){return new S(function(){return n})},Object.defineProperty(S.prototype,"value",{get:function(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}})});
{
"name": "fable-core",
"version": "0.1.11",
"version": "0.1.12",
"description": "Fable core lib & bindings for native JS objects, browser and node APIs",

@@ -5,0 +5,0 @@ "main": "fable-core.js",

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 too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc