fable-core
Advanced tools
Comparing version 0.2.0-alpha to 0.2.0
@@ -6,93 +6,111 @@ declare const FSymbol: { | ||
export { FSymbol as Symbol }; | ||
export declare class Choice { | ||
Case: any; | ||
Fields: any; | ||
constructor(t: any, d: any); | ||
export declare class Choice<T1, T2> { | ||
Case: "Choice1Of2" | "Choice2Of2"; | ||
Fields: Array<T1 | T2>; | ||
constructor(t: "Choice1Of2" | "Choice2Of2", c: number, d: T1 | T2); | ||
static Choice1Of2<T1, T2>(v: T1): Choice<T1, T2>; | ||
static Choice2Of2<T1, T2>(v: T2): Choice<T1, T2>; | ||
valueIfChoice1: T1; | ||
valueIfChoice2: T2; | ||
} | ||
export declare type Tuple<T1, T2> = [T1, T2]; | ||
export declare type Tuple3<T1, T2, T3> = [T1, T2, T3]; | ||
export declare function Tuple<T1, T2>(x: T1, y: T2): [T1, T2]; | ||
export declare function Tuple3<T1, T2, T3>(x: T1, y: T2, z: T3): [T1, T2, T3]; | ||
export declare class Util { | ||
private static __types; | ||
static setInterfaces: (proto: any, interfaces: any, typeName?: any) => void; | ||
static hasInterface: (obj: any, infc: any) => boolean; | ||
static getRestParams: (args: any, idx: any) => any[]; | ||
static compareTo: (x: any, y: any) => any; | ||
static createObj: (fields: any) => any; | ||
static toJson: (o: any) => string; | ||
static ofJson: (json: any) => any; | ||
static setInterfaces(proto: any, interfaces: string[], typeName?: string): void; | ||
static hasInterface(obj: any, interfaceName: string): boolean; | ||
static getRestParams(args: ArrayLike<any>, idx: number): any[]; | ||
static compareTo(x: any, y: any): number; | ||
static createDisposable(f: () => void): IDisposable; | ||
static createObj(fields: Iterable<Tuple<string, any>>): any; | ||
static toPlainJsObj: (source: any) => any; | ||
static toJson(o: any): string; | ||
static ofJson(json: any): any; | ||
} | ||
export declare class TimeSpan { | ||
static create: (d?: number, h?: number, m?: number, s?: number, ms?: number) => number; | ||
static fromTicks: (d?: number, h?: number, m?: number, s?: number, ms?: number) => number; | ||
static fromDays: (d: number) => number; | ||
static fromHours: (h: number) => number; | ||
static fromMinutes: (m: number) => number; | ||
static fromSeconds: (s: number) => number; | ||
static days: (ts: number) => number; | ||
static hours: (ts: number) => number; | ||
static minutes: (ts: number) => number; | ||
static seconds: (ts: number) => number; | ||
static milliseconds: (ts: number) => number; | ||
static ticks: (ts: number) => number; | ||
static totalDays: (ts: number) => number; | ||
static totalHours: (ts: number) => number; | ||
static totalMinutes: (ts: number) => number; | ||
static totalSeconds: (ts: number) => number; | ||
export declare class TimeSpan extends Number { | ||
static create(d?: number, h?: number, m?: number, s?: number, ms?: number): number; | ||
static fromTicks(ticks: number): number; | ||
static fromDays(d: number): number; | ||
static fromHours(h: number): number; | ||
static fromMinutes(m: number): number; | ||
static fromSeconds(s: number): number; | ||
static days(ts: TimeSpan): number; | ||
static hours(ts: TimeSpan): number; | ||
static minutes(ts: TimeSpan): number; | ||
static seconds(ts: TimeSpan): number; | ||
static milliseconds(ts: TimeSpan): number; | ||
static ticks(ts: TimeSpan): number; | ||
static totalDays(ts: TimeSpan): number; | ||
static totalHours(ts: TimeSpan): number; | ||
static totalMinutes(ts: TimeSpan): number; | ||
static totalSeconds(ts: TimeSpan): number; | ||
static negate(ts: TimeSpan): number; | ||
static add(ts1: TimeSpan, ts2: TimeSpan): number; | ||
static subtract(ts1: TimeSpan, ts2: TimeSpan): number; | ||
static compare: typeof Util.compareTo; | ||
static compareTo: typeof Util.compareTo; | ||
static duration: (x: number) => number; | ||
static negate: (ts: number) => number; | ||
static add: (ts1: number, ts2: number) => number; | ||
static subtract: (ts1: number, ts2: number) => number; | ||
static compareTo: (x: any, y: any) => any; | ||
static compare: (x: any, y: any) => any; | ||
} | ||
declare class FDate { | ||
static __changeKind: (d: any, kind: any) => any; | ||
static __getValue: (d: any, key: any) => any; | ||
static minValue: () => any; | ||
static maxValue: () => any; | ||
static parse: (v?: any, kind?: any) => any; | ||
static create: (year: any, month: any, day: any, h: any, m: any, s: any, ms: any, kind: any) => any; | ||
static now: (v?: any, kind?: any) => any; | ||
static utcNow: () => any; | ||
static today: () => any; | ||
static isLeapYear: (year: any) => boolean; | ||
static daysInMonth: (year: any, month: any) => number; | ||
static toUniversalTime: (d: any) => any; | ||
static toLocalTime: (d: any) => any; | ||
static timeOfDay: (d: any) => number; | ||
static date: (d: any) => any; | ||
static day: (d: any) => any; | ||
static hour: (d: any) => any; | ||
static millisecond: (d: any) => any; | ||
static minute: (d: any) => any; | ||
static month: (d: any) => any; | ||
static second: (d: any) => any; | ||
static year: (d: any) => any; | ||
static ticks: (d: any) => number; | ||
static toBinary: (d: any) => number; | ||
static dayOfWeek: (d: any) => any; | ||
static dayOfYear: (d: any) => any; | ||
static add: (d: any, ts: any) => any; | ||
static op_Addition: (d: any, ts: any) => any; | ||
static addDays: (d: any, v: any) => any; | ||
static addHours: (d: any, v: any) => any; | ||
static addMinutes: (d: any, v: any) => any; | ||
static addSeconds: (d: any, v: any) => any; | ||
static addMilliseconds: (d: any, v: any) => any; | ||
static addTicks: (d: any, v: any) => any; | ||
static addYears: (d: any, v: any) => any; | ||
static addMonths: (d: any, v: any) => any; | ||
static subtract: (d: any, that: any) => any; | ||
static op_Subtraction: (d: any, that: any) => any; | ||
static toLongDateString: (d: any) => any; | ||
static toShortDateString: (d: any) => any; | ||
static toLongTimeString: (d: any) => any; | ||
static toShortTimeString: (d: any) => any; | ||
static equals: (d1: any, d2: any) => boolean; | ||
static compareTo: (x: any, y: any) => any; | ||
static compare: (x: any, y: any) => any; | ||
export declare enum DateKind { | ||
UTC = 1, | ||
Local = 2, | ||
} | ||
declare class FDate extends Date { | ||
kind: DateKind; | ||
private static __changeKind(d, kind); | ||
private static __getValue(d, key); | ||
static minValue(): any; | ||
static maxValue(): any; | ||
static parse(v?: any, kind?: DateKind): any; | ||
static create(year: number, month: number, day: number, h?: number, m?: number, s?: number, ms?: number, kind?: DateKind): Date; | ||
static now: typeof FDate.parse; | ||
static utcNow(): any; | ||
static today(): Date; | ||
static isLeapYear(year: number): boolean; | ||
static daysInMonth(year: number, month: number): number; | ||
static toUniversalTime(d: Date): Date; | ||
static toLocalTime(d: Date): Date; | ||
static timeOfDay(d: Date): number; | ||
static date(d: Date): Date; | ||
static day(d: Date): number; | ||
static hour(d: Date): number; | ||
static millisecond(d: Date): number; | ||
static minute(d: Date): number; | ||
static month(d: Date): number; | ||
static second(d: Date): number; | ||
static year(d: Date): number; | ||
static ticks(d: Date): number; | ||
static toBinary: typeof FDate.ticks; | ||
static dayOfWeek(d: Date): number; | ||
static dayOfYear(d: Date): number; | ||
static add(d: Date, ts: TimeSpan): any; | ||
static addDays(d: Date, v: number): any; | ||
static addHours(d: Date, v: number): any; | ||
static addMinutes(d: Date, v: number): any; | ||
static addSeconds(d: Date, v: number): any; | ||
static addMilliseconds(d: Date, v: number): any; | ||
static addTicks(d: Date, v: number): any; | ||
static addYears(d: Date, v: number): Date; | ||
static addMonths(d: Date, v: number): Date; | ||
static subtract(d: Date, that: Date | number): any; | ||
static toLongDateString(d: Date): string; | ||
static toShortDateString(d: Date): string; | ||
static toLongTimeString(d: Date): string; | ||
static toShortTimeString(d: Date): string; | ||
static equals(d1: Date, d2: Date): boolean; | ||
static compareTo: typeof Util.compareTo; | ||
static compare: typeof Util.compareTo; | ||
static op_Addition: typeof FDate.add; | ||
static op_Subtraction: typeof FDate.subtract; | ||
} | ||
export { FDate as Date }; | ||
export declare class Timer { | ||
interval: any; | ||
export interface IDisposable { | ||
dispose(): void; | ||
} | ||
export declare class Timer implements IDisposable { | ||
interval: number; | ||
autoReset: boolean; | ||
_elapsed: any; | ||
_elapsed: Event<Date>; | ||
private _enabled; | ||
@@ -102,51 +120,53 @@ private _isDisposed; | ||
private _timeoutId; | ||
constructor(interval: any); | ||
readonly elapsed: number; | ||
constructor(interval?: number); | ||
elapsed: Event<Date>; | ||
enabled: boolean; | ||
dispose: any; | ||
close: any; | ||
start: any; | ||
stop: any; | ||
dispose(): void; | ||
close(): void; | ||
start(): void; | ||
stop(): void; | ||
} | ||
declare class FString { | ||
static fsFormatRegExp: RegExp; | ||
static fsFormat: (str: any) => (cont: any) => any; | ||
private static fsFormatRegExp; | ||
private static fsFormat(str); | ||
static formatRegExp: RegExp; | ||
static format: (str: any, args: any) => any; | ||
static init: (n: any, f: any) => string; | ||
static isNullOrEmpty: (str: any) => boolean; | ||
static isNullOrWhiteSpace: (str: any) => boolean; | ||
static padLeft: (str: any, len: any, ch: any, isRight: any) => any; | ||
static padRight: (str: any, len: any, ch: any) => any; | ||
static replace: (str: any, search: any, replace: any) => any; | ||
static replicate: (n: any, x: any) => string; | ||
static split: (str: any, splitters: any, count: any, removeEmpty: any) => any; | ||
static join: (delimiter: any, xs: any) => any; | ||
static concat: (delimiter: any, xs: any) => any; | ||
static endsWith: (str: any, search: any) => boolean; | ||
static newGuid: () => string; | ||
static format(str: string, ...args: any[]): string; | ||
static endsWith(str: string, search: string): boolean; | ||
static init(n: number, f: (i: number) => string): string; | ||
static isNullOrEmpty(str: string | any): boolean; | ||
static isNullOrWhiteSpace(str: string | any): boolean; | ||
static join(delimiter: string, xs: ArrayLike<string>): string; | ||
static concat: typeof FString.join; | ||
static newGuid(): string; | ||
static padLeft(str: any, len: number, ch?: string, isRight?: boolean): any; | ||
static padRight(str: any, len: number, ch?: string): any; | ||
static replace(str: string, search: string, replace: string): string; | ||
static replicate(n: number, x: string): string; | ||
static split(str: string, splitters: string[], count?: number, removeEmpty?: number): string[]; | ||
static trim(str: string, side: "start" | "end" | "both", ...chars: string[]): string; | ||
} | ||
export { FString as String }; | ||
export declare type MatchEvaluator = (match: any) => string; | ||
declare class FRegExp { | ||
static create: (pattern: any, options: any) => RegExp; | ||
static escape: (str: any) => any; | ||
static unescape: (str: any) => any; | ||
static isMatch: (str: any, pattern: any, options: any) => any; | ||
static match: (str: any, pattern: any, options: any) => any; | ||
static matches: (str: any, pattern: any, options?: any) => any; | ||
static options: (reg: any) => number; | ||
static replace: (reg: any, input: any, replacement: any, limit: any, offset: any) => any; | ||
static split: (reg: any, input: any, limit: any, offset: any) => any; | ||
static create(pattern: string, options: number): RegExp; | ||
static escape(str: string): string; | ||
static unescape(str: string): string; | ||
static isMatch(str: string | RegExp, pattern: string, options?: number): boolean; | ||
static match(str: string | RegExp, pattern: string, options?: number): RegExpExecArray; | ||
static matches(str: string | RegExp, pattern: string, options?: number): RegExpExecArray[]; | ||
static options(reg: RegExp): number; | ||
static replace(reg: string | RegExp, input: string, replacement: string | MatchEvaluator, limit?: number, offset?: number): string; | ||
static split(reg: string | RegExp, input: string, limit?: number, offset?: number): string[]; | ||
} | ||
export { FRegExp as RegExp }; | ||
declare class FArray { | ||
static addRangeInPlace: (range: any, xs: any) => void; | ||
static blit: (source: any, sourceIndex: any, target: any, targetIndex: any, count: any) => void; | ||
static partition: (f: any, xs: any) => any[]; | ||
static permute: (f: any, xs: any) => any; | ||
static removeInPlace: (item: any, xs: any) => boolean; | ||
static setSlice: (target: any, lower: any, upper: any, source: any) => void; | ||
static sortInPlaceBy: (f: any, xs: any, dir: any) => any; | ||
static unzip: (xs: any) => any[][]; | ||
static unzip3: (xs: any) => any[][]; | ||
static addRangeInPlace<T>(range: Iterable<T>, xs: Array<T>): void; | ||
static blit<T>(source: ArrayLike<T>, sourceIndex: number, target: ArrayLike<T>, targetIndex: number, count: number): void; | ||
static partition<T>(f: (x: T) => boolean, xs: ArrayLike<T>): [T[], T[]]; | ||
static permute<T>(f: (i: number) => number, xs: Array<T>): T[]; | ||
static removeInPlace<T>(item: T, xs: Array<T>): boolean; | ||
static setSlice<T>(target: any, lower: number, upper: number, source: ArrayLike<T>): void; | ||
static sortInPlaceBy<T>(f: (x: T) => T, xs: Array<T>, dir?: number): T[]; | ||
static unzip<T1, T2>(xs: ArrayLike<Tuple<T1, T2>>): [T1[], T2[]]; | ||
static unzip3<T1, T2, T3>(xs: ArrayLike<Tuple3<T1, T2, T3>>): [T1[], T2[], T3[]]; | ||
} | ||
@@ -159,3 +179,3 @@ export { FArray as Array }; | ||
static ofArray<T>(args: Array<T>, base?: List<T>): List<T>; | ||
readonly length: number; | ||
length: number; | ||
[Symbol.iterator](): Iterator<T>; | ||
@@ -186,219 +206,259 @@ append(ys: List<T>): List<T>; | ||
static slice<T>(lower: number, upper: number, xs: List<T>): List<T>; | ||
static unzip<T1, T2>(xs: List<TTuple<T1, T2>>): [List<T1>, List<T2>]; | ||
static unzip3<T1, T2, T3>(xs: List<TTuple3<T1, T2, T3>>): [List<T1>, List<T2>, List<T3>]; | ||
static unzip<T1, T2>(xs: List<Tuple<T1, T2>>): [List<T1>, List<T2>]; | ||
static unzip3<T1, T2, T3>(xs: List<Tuple3<T1, T2, T3>>): [List<T1>, List<T2>, List<T3>]; | ||
} | ||
export declare class Seq { | ||
static __failIfNone: (res: any) => any; | ||
static toList: (xs: any) => List<{}>; | ||
static ofList: (xs: any) => any; | ||
static ofArray: (xs: any) => any; | ||
static append: (xs: any, ys: any) => any; | ||
static average: (xs: any) => number; | ||
static averageBy: (f: any, xs: any) => number; | ||
static countBy: (f: any, xs: any) => any; | ||
static concat: (xs: any) => any; | ||
static collect: (f: any, xs: any) => any; | ||
static choose: (f: any, xs: any) => any; | ||
static compareWith: (f: any, xs: any, ys: any) => any; | ||
static delay: (f: any) => any; | ||
static distinctBy: (f: any, xs: any) => any; | ||
static distinct: (xs: any) => any; | ||
static empty: () => any; | ||
static enumerateWhile: (cond: any, xs: any) => any; | ||
static enumerateThenFinally: (xs: any, finalFn: any) => any; | ||
static enumerateUsing: (disp: any, work: any) => any; | ||
static exactlyOne: (xs: any) => any; | ||
static exists: (f: any, xs: any) => any; | ||
static exists2: (f: any, xs: any, ys: any) => any; | ||
static filter: (f: any, xs: any) => any; | ||
static where: (f: any, xs: any) => any; | ||
static fold<T, ST>(f: (previousValue: ST, currentValue: T, currentIndex?: number) => ST, acc: ST, xs: Iterable<T>): ST; | ||
static foldBack<T, ST>(f: (currentValue: T, previousValue: ST, currentIndex?: number) => ST, xs: Iterable<T>, acc: ST): ST; | ||
static fold2(f: any, acc: any, xs: any, ys: any): any; | ||
static foldBack2: (f: any, xs: any, ys: any, acc: any) => any; | ||
static forall: (f: any, xs: any) => boolean; | ||
static forall2: (f: any, xs: any, ys: any) => any; | ||
static groupBy: (f: any, xs: any) => Map<any, any>; | ||
static tryHead: (xs: any) => any; | ||
static head: (xs: any) => any; | ||
static init: (n: any, f: any) => any; | ||
static initInfinite: (f: any) => any; | ||
static tryItem: (i: any, xs: any) => any; | ||
static item: (i: any, xs: any) => any; | ||
static iter: (f: any, xs: any) => void; | ||
static iter2: (f: any, xs: any, ys: any) => void; | ||
static iteri: (f: any, xs: any) => void; | ||
static iteri2: (f: any, xs: any, ys: any) => void; | ||
static isEmpty: (xs: any) => any; | ||
static tryLast: (xs: any) => any; | ||
static last: (xs: any) => any; | ||
private static __failIfNone<T>(res); | ||
static toList<T>(xs: Iterable<T>): List<T>; | ||
static ofList<T>(xs: List<T>): Iterable<T>; | ||
static ofArray<T>(xs: ArrayLike<T>): Iterable<T>; | ||
static append<T>(xs: Iterable<T>, ys: Iterable<T>): Iterable<T>; | ||
static average(xs: Iterable<number>): number; | ||
static averageBy(f: (a: number) => number, xs: Iterable<number>): number; | ||
static countBy<T, K>(f: (x: T) => K, xs: Iterable<T>): Iterable<[K, number]>; | ||
static concat<T>(xs: Iterable<Iterable<T>>): Iterable<T>; | ||
static collect<T, U>(f: (x: T) => Iterable<U>, xs: Iterable<T>): Iterable<U>; | ||
static choose<T, U>(f: (x: T) => U, xs: Iterable<T>): Iterable<U>; | ||
static compareWith<T>(f: (x: T, y: T) => number, xs: Iterable<T>, ys: Iterable<T>): number; | ||
static delay<T>(f: () => Iterable<T>): Iterable<T>; | ||
static distinctBy<T, K>(f: (x: T) => K, xs: Iterable<T>): Iterable<T>; | ||
static distinct<T>(xs: Iterable<T>): Iterable<T>; | ||
static empty<T>(): Iterable<T>; | ||
static enumerateWhile<T>(cond: () => boolean, xs: Iterable<T>): Iterable<T>; | ||
static enumerateThenFinally<T>(xs: Iterable<T>, finalFn: () => void): Iterable<T>; | ||
static enumerateUsing<T extends IDisposable, U>(disp: T, work: (x: T) => Iterable<U>): Iterable<U>; | ||
static exactlyOne<T>(xs: Iterable<T>): T; | ||
static exists<T>(f: (x: T) => boolean, xs: Iterable<T>): boolean; | ||
static exists2<T1, T2>(f: (x: T1, y: T2) => boolean, xs: Iterable<T1>, ys: Iterable<T2>): boolean; | ||
static filter<T>(f: (x: T) => boolean, xs: Iterable<T>): Iterable<T>; | ||
static where<T>(f: (x: T) => boolean, xs: Iterable<T>): Iterable<T>; | ||
static fold<T, ST>(f: (acc: ST, x: T, i?: number) => ST, acc: ST, xs: Iterable<T>): ST; | ||
static foldBack<T, ST>(f: (x: T, acc: ST, i?: number) => ST, xs: Iterable<T>, acc: ST): ST; | ||
static fold2<T1, T2, ST>(f: (acc: ST, x: T1, y: T2, i?: number) => ST, acc: ST, xs: Iterable<T1>, ys: Iterable<T2>): ST; | ||
static foldBack2<T1, T2, ST>(f: (x: T1, y: T2, acc: ST, i?: number) => ST, xs: Iterable<T1>, ys: Iterable<T2>, acc: ST): ST; | ||
static forall<T>(f: (x: T) => boolean, xs: Iterable<T>): boolean; | ||
static forall2<T1, T2>(f: (x: T1, y: T2) => boolean, xs: Iterable<T1>, ys: Iterable<T2>): boolean; | ||
static groupBy<T, K>(f: (x: T) => K, xs: Iterable<T>): Map<K, Iterable<T>>; | ||
static tryHead<T>(xs: Iterable<T>): T; | ||
static head<T>(xs: Iterable<T>): T; | ||
static init<T>(n: number, f: (i: number) => T): Iterable<T>; | ||
static initInfinite<T>(f: (i: number) => T): Iterable<T>; | ||
static tryItem<T>(i: number, xs: Iterable<T>): T; | ||
static item<T>(i: number, xs: Iterable<T>): T; | ||
static iter<T>(f: (x: T) => void, xs: Iterable<T>): void; | ||
static iter2<T1, T2>(f: (x: T1, y: T2) => void, xs: Iterable<T1>, ys: Iterable<T2>): void; | ||
static iteri<T>(f: (i: number, x: T) => void, xs: Iterable<T>): void; | ||
static iteri2<T1, T2>(f: (i: number, x: T1, y: T2) => void, xs: Iterable<T1>, ys: Iterable<T2>): void; | ||
static isEmpty<T>(xs: Iterable<T>): boolean; | ||
static tryLast<T>(xs: Iterable<T>): T; | ||
static last<T>(xs: Iterable<T>): T; | ||
static count<T>(xs: Iterable<T>): number; | ||
static map: (f: any, xs: any) => any; | ||
static mapi: (f: any, xs: any) => any; | ||
static map2: (f: any, xs: any, ys: any) => any; | ||
static mapi2: (f: any, xs: any, ys: any) => any; | ||
static map3: (f: any, xs: any, ys: any, zs: any) => any; | ||
static max: (xs: any) => any; | ||
static maxBy: (f: any, xs: any) => any; | ||
static min: (xs: any) => any; | ||
static minBy: (f: any, xs: any) => any; | ||
static pairwise: (xs: any) => any; | ||
static permute: (f: any, xs: any) => any; | ||
static rangeStep: (first: any, step: any, last: any) => any; | ||
static rangeChar: (first: any, last: any) => any; | ||
static range: (first: any, last: any) => any; | ||
static readonly: (xs: any) => any; | ||
static reduce: (f: any, xs: any) => any; | ||
static reduceBack: (f: any, xs: any) => any; | ||
static replicate: (n: any, x: any) => any; | ||
static rev: (xs: any) => any; | ||
static scan: (f: any, seed: any, xs: any) => any; | ||
static scanBack: (f: any, xs: any, seed: any) => any; | ||
static singleton: (x: any) => any; | ||
static skip: (n: any, xs: any) => any; | ||
static skipWhile: (f: any, xs: any) => any; | ||
static sortWith: (f: any, xs: any) => any; | ||
static sum: (xs: any, add: any) => any; | ||
static sumBy: (f: any, xs: any, add: any) => any; | ||
static tail: (xs: any) => any; | ||
static take: (n: any, xs: any, truncate: any) => any; | ||
static truncate: (n: any, xs: any) => any; | ||
static takeWhile: (f: any, xs: any) => any; | ||
static tryFind: (f: any, xs: any) => any; | ||
static find: (f: any, xs: any) => any; | ||
static tryFindBack: (f: any, xs: any) => any; | ||
static findBack: (f: any, xs: any) => any; | ||
static tryFindIndex: (f: any, xs: any) => number; | ||
static findIndex: (f: any, xs: any) => any; | ||
static tryFindIndexBack: (f: any, xs: any) => any; | ||
static findIndexBack: (f: any, xs: any) => any; | ||
static tryPick: (f: any, xs: any) => any; | ||
static pick: (f: any, xs: any) => any; | ||
static unfold: (f: any, acc?: any) => any; | ||
static zip: (xs: any, ys: any) => any; | ||
static zip3: (xs: any, ys: any, zs: any) => any; | ||
static map<T, U>(f: (x: T) => U, xs: Iterable<T>): Iterable<U>; | ||
static mapi<T, U>(f: (i: number, x: T) => U, xs: Iterable<T>): Iterable<U>; | ||
static map2<T1, T2, U>(f: (x: T1, y: T2) => U, xs: Iterable<T1>, ys: Iterable<T2>): Iterable<U>; | ||
static mapi2<T1, T2, U>(f: (i: number, x: T1, y: T2) => U, xs: Iterable<T1>, ys: Iterable<T2>): Iterable<U>; | ||
static map3<T1, T2, T3, U>(f: (x: T1, y: T2, z: T3) => U, xs: Iterable<T1>, ys: Iterable<T2>, zs: Iterable<T3>): Iterable<U>; | ||
static max<T extends number>(xs: Iterable<T>): number; | ||
static maxBy<T, U extends number>(f: (x: T) => U, xs: Iterable<T>): T; | ||
static min<T extends number>(xs: Iterable<T>): number; | ||
static minBy<T, U extends number>(f: (x: T) => U, xs: Iterable<T>): T; | ||
static pairwise<T extends number>(xs: Iterable<T>): Iterable<[number, number]>; | ||
static permute<T>(f: (i: number) => number, xs: Iterable<T>): Iterable<T>; | ||
static rangeStep(first: number, step: number, last: number): Iterable<number>; | ||
static rangeChar(first: string, last: string): Iterable<string>; | ||
static range(first: number, last: number): Iterable<number>; | ||
static readonly<T>(xs: Iterable<T>): Iterable<T>; | ||
static reduce<T>(f: (acc: T, x: T) => T, xs: Iterable<T>): T; | ||
static reduceBack<T>(f: (acc: T, x: T, i?: number) => T, xs: Iterable<T>): T; | ||
static replicate<T>(n: number, x: T): Iterable<T>; | ||
static rev<T>(xs: Iterable<T>): Iterable<T>; | ||
static scan<T, ST>(f: (st: ST, x: T) => ST, seed: ST, xs: Iterable<T>): Iterable<ST>; | ||
static scanBack<T, ST>(f: (x: T, st: ST) => ST, xs: Iterable<T>, seed: ST): Iterable<ST>; | ||
static singleton<T>(x: T): Iterable<T>; | ||
static skip<T>(n: number, xs: Iterable<T>): Iterable<T>; | ||
static skipWhile<T>(f: (x: T) => boolean, xs: Iterable<T>): Iterable<T>; | ||
static sortWith<T>(f: (x: T, y: T) => number, xs: Iterable<T>): Iterable<T>; | ||
private static defaultAdder(x, y); | ||
static sum(xs: Iterable<number>, adder?: (x: number, y: number) => number): number; | ||
static sumBy(f: (x: number) => number, xs: Iterable<number>, adder?: (x: number, y: number) => number): number; | ||
static tail<T>(xs: Iterable<T>): Iterable<T>; | ||
static take<T>(n: number, xs: Iterable<T>, truncate?: boolean): Iterable<T>; | ||
static truncate<T>(n: number, xs: Iterable<T>): Iterable<T>; | ||
static takeWhile<T>(f: (x: T) => boolean, xs: Iterable<T>): Iterable<T>; | ||
static tryFind<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): T; | ||
static find<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): T; | ||
static tryFindBack<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): T; | ||
static findBack<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): T; | ||
static tryFindIndex<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): number; | ||
static findIndex<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): number; | ||
static tryFindIndexBack<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): number; | ||
static findIndexBack<T>(f: (x: T, i?: number) => boolean, xs: Iterable<T>): number; | ||
static tryPick<T, U>(f: (x: T, i?: number) => U, xs: Iterable<T>): U; | ||
static pick<T, U>(f: (x: T, i?: number) => U, xs: Iterable<T>): U; | ||
static unfold<T, ST>(f: (st: ST) => Tuple<T, ST>, acc?: ST): Iterable<T>; | ||
static zip<T1, T2>(xs: Iterable<T1>, ys: Iterable<T2>): Iterable<(T1 | T2)[]>; | ||
static zip3<T1, T2, T3>(xs: Iterable<T1>, ys: Iterable<T2>, zs: Iterable<T3>): Iterable<(T1 | T2 | T3)[]>; | ||
} | ||
declare class FSet { | ||
static op_Addition: (set1: any, set2: any) => Set<{}>; | ||
static union: (set1: any, set2: any) => Set<{}>; | ||
static unionMany: (sets: any) => any; | ||
static op_Subtraction: (set1: any, set2: any) => Set<{}>; | ||
static difference: (set1: any, set2: any) => Set<{}>; | ||
static intersect: (set1: any, set2: any) => Set<{}>; | ||
static intersectMany: (sets: any) => Set<{}>; | ||
static isProperSubsetOf: (set1: any, set2: any) => any; | ||
static isProperSubset: (set1: any, set2: any) => any; | ||
static isSubsetOf: (set1: any, set2: any) => boolean; | ||
static isSubset: (set1: any, set2: any) => boolean; | ||
static isProperSupersetOf: (set1: any, set2: any) => any; | ||
static isProperSuperset: (set1: any, set2: any) => any; | ||
static isSupersetOf: (set1: any, set2: any) => boolean; | ||
static isSuperset: (set1: any, set2: any) => boolean; | ||
static copyTo: (xs: any, arr: any, arrayIndex: any, count: any) => void; | ||
static partition: (f: any, xs: any) => Set<any>[]; | ||
static removeInPlace: (item: any, xs: any) => any; | ||
static remove: (item: any, xs: any) => any; | ||
static union<T>(set1: Set<T>, set2: Set<T>): Set<T>; | ||
static op_Addition: typeof FSet.union; | ||
static unionMany<T>(sets: Iterable<Set<T>>): Set<T>; | ||
static difference<T>(set1: Set<T>, set2: Set<T>): Set<T>; | ||
static op_Subtraction: typeof FSet.difference; | ||
static intersect<T>(set1: Set<T>, set2: Set<T>): Set<T>; | ||
static intersectMany<T>(sets: Iterable<Set<T>>): Set<T>; | ||
static isProperSubsetOf<T>(set1: Set<T>, set2: Set<T>): boolean; | ||
static isProperSubset: typeof FSet.isProperSubsetOf; | ||
static isSubsetOf<T>(set1: Set<T>, set2: Set<T>): boolean; | ||
static isSubset: typeof FSet.isSubsetOf; | ||
static isProperSupersetOf<T>(set1: Set<T>, set2: Set<T>): boolean; | ||
static isProperSuperset: typeof FSet.isProperSupersetOf; | ||
static isSupersetOf<T>(set1: Set<T>, set2: Set<T>): boolean; | ||
static isSuperset: typeof FSet.isSupersetOf; | ||
static copyTo<T>(xs: Set<T>, arr: ArrayLike<T>, arrayIndex?: number, count?: number): void; | ||
static partition<T>(f: (x: T) => boolean, xs: Set<T>): [Set<T>, Set<T>]; | ||
static remove<T>(item: T, xs: Set<T>): Set<T>; | ||
static removeInPlace<T>(item: T, xs: Set<T>): Set<T>; | ||
} | ||
export { FSet as Set }; | ||
declare class FMap { | ||
static containsValue: (v: any, map: any) => boolean; | ||
static exists: (f: any, map: any) => any; | ||
static filter: (f: any, map: any) => any; | ||
static fold: (f: any, seed: any, map: any) => any; | ||
static foldBack: (f: any, map: any, seed: any) => any; | ||
static forall: (f: any, map: any) => boolean; | ||
static iter: (f: any, map: any) => void; | ||
static map: (f: any, map: any) => any; | ||
static partition: (f: any, map: any) => any; | ||
static findKey: (f: any, map: any) => any; | ||
static tryFindKey: (f: any, map: any) => any; | ||
static pick: (f: any, map: any) => any; | ||
static removeInPlace: (item: any, xs: any) => any; | ||
static remove: (item: any, map: any) => any; | ||
static tryPick: (f: any, map: any) => any; | ||
static containsValue<K, V>(v: V, map: Map<K, V>): boolean; | ||
static exists<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): boolean; | ||
static filter<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): Map<K, V>; | ||
static fold<K, V, ST>(f: (acc: ST, k: K, v: V) => ST, seed: ST, map: Map<K, V>): ST; | ||
static foldBack<K, V, ST>(f: (k: K, v: V, acc: ST) => ST, map: Map<K, V>, seed: ST): ST; | ||
static forall<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): boolean; | ||
static iter<K, V>(f: (k: K, v: V) => void, map: Map<K, V>): void; | ||
static map<K, T, U>(f: (k: K, v: T) => U, map: Map<K, T>): Map<K, U>; | ||
static partition<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): [Map<K, V>, Map<K, V>]; | ||
static findKey<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): K; | ||
static tryFindKey<K, V>(f: (k: K, v: V) => boolean, map: Map<K, V>): K; | ||
static pick<K, T, U>(f: (k: K, v: T) => U, map: Map<K, T>): U; | ||
static remove<K, V>(item: K, map: Map<K, V>): Map<K, V>; | ||
static removeInPlace<K, V>(item: K, map: Map<K, V>): Map<K, V>; | ||
static tryPick<K, T, U>(f: (k: K, v: T) => U, map: Map<K, T>): U; | ||
} | ||
export { FMap as Map }; | ||
export declare type Unit = void; | ||
export declare const Nothing: Unit; | ||
export declare type Continuation<T> = (x: T) => Unit; | ||
export interface CancellationToken { | ||
isCancelled: boolean; | ||
} | ||
export interface IAsyncContext<T> { | ||
onSuccess: Continuation<T>; | ||
onError: Continuation<any>; | ||
onCancel: Continuation<any>; | ||
cancelToken: CancellationToken; | ||
} | ||
export declare type IAsync<T> = (x: IAsyncContext<T>) => void; | ||
export declare class Async { | ||
static __protectedCont: (f: any) => (ctx: any) => void; | ||
static bind: (work: any, cont: any) => (ctx: any) => void; | ||
static combine: (work1: any, work2: any) => (ctx: any) => void; | ||
static delay: (cont: any) => (ctx: any) => void; | ||
static for: (seq: any, body: any) => (ctx: any) => void; | ||
static return: (x?: any) => (ctx: any) => void; | ||
static returnFrom: (work: any) => any; | ||
static tryFinally: (work: any, finalFn: any) => (ctx: any) => void; | ||
static tryWith: (work: any, catchFn: any) => (ctx: any) => void; | ||
static using: (disp: any, cont: any) => (ctx: any) => void; | ||
static while: (cond: any, body: any) => (ctx: any) => void; | ||
static zero: () => (ctx: any) => void; | ||
static start: (work: any, onSuccess?: any, onError?: any, onCancel?: any, cancelToken?: any) => void; | ||
static startImmediate: (work: any, onSuccess?: any, onError?: any, onCancel?: any, cancelToken?: any) => void; | ||
static startWithContinuations: (work: any, onSuccess?: any, onError?: any, onCancel?: any, cancelToken?: any) => void; | ||
static ignore: (work: any) => (ctx: any) => void; | ||
readonly cancellationToken: (ctx: any) => void; | ||
static fromContinuations: (f: any) => (ctx: any) => void; | ||
static startAsPromise: (work: any, cancelToken?: any) => Promise<{}>; | ||
static awaitPromise: (p: any) => (ctx: any) => void; | ||
static parallel: (works: any) => (ctx: any) => void; | ||
static catch: (work: any) => (ctx: any) => void; | ||
static sleep: (ms: any) => (ctx: any) => void; | ||
private static __protectedAsync<T>(f); | ||
static bind<T, U>(computation: IAsync<T>, binder: (x: T) => IAsync<U>): (ctx: IAsyncContext<U>) => void; | ||
static combine<T>(computation1: IAsync<Unit>, computation2: IAsync<T>): (ctx: IAsyncContext<T>) => void; | ||
static delay<T>(generator: () => IAsync<T>): (ctx: IAsyncContext<T>) => void; | ||
static for<T>(sequence: Iterable<T>, body: (x: T) => IAsync<Unit>): (x: IAsyncContext<void>) => void; | ||
static return<T>(value?: T): (ctx: IAsyncContext<T>) => void; | ||
static returnFrom<T>(computation: IAsync<T>): (x: IAsyncContext<T>) => void; | ||
static tryFinally<T>(computation: IAsync<T>, compensation: () => void): (ctx: IAsyncContext<T>) => void; | ||
static tryWith<T>(computation: IAsync<T>, catchHandler: (e: any) => IAsync<T>): (ctx: IAsyncContext<T>) => void; | ||
static using<T extends IDisposable, U>(resource: T, binder: (x: T) => IAsync<U>): (ctx: IAsyncContext<U>) => void; | ||
static while(guard: () => boolean, computation: IAsync<Unit>): IAsync<Unit>; | ||
static zero(): (ctx: IAsyncContext<void>) => void; | ||
static awaitPromise<T>(p: Promise<T>): (ctx: IAsyncContext<T>) => void; | ||
cancellationToken: (ctx: IAsyncContext<CancellationToken>) => void; | ||
static catch<T>(work: IAsync<T>): (ctx: IAsyncContext<Choice<T, any>>) => void; | ||
static defaultCancellationToken: { | ||
isCancelled: boolean; | ||
}; | ||
static fromContinuations<T>(f: (conts: Array<Continuation<T>>) => void): (ctx: IAsyncContext<T>) => void; | ||
static ignore<T>(computation: IAsync<T>): (ctx: IAsyncContext<void>) => void; | ||
static parallel<T>(computations: Iterable<IAsync<T>>): (ctx: IAsyncContext<T[]>) => void; | ||
static sleep(millisecondsDueTime: number): (ctx: IAsyncContext<void>) => void; | ||
private static start<T>(computation, cancellationToken?); | ||
static startImmediate: typeof Async.start; | ||
private static emptyContinuation<T>(x); | ||
private static startWithContinuations<T>(computation, continuation?, exceptionContinuation?, cancellationContinuation?, cancelToken?); | ||
static startAsPromise<T>(computation: IAsync<T>, cancellationToken?: CancellationToken): Promise<T>; | ||
} | ||
export declare class MailboxProcessor { | ||
body: any; | ||
messages: any; | ||
export declare type MailboxBody<Msg> = (m: MailboxProcessor<Msg>) => IAsync<Unit>; | ||
export interface AsyncReplyChannel<Reply> { | ||
reply: (r: Reply) => Unit; | ||
} | ||
export declare class MailboxProcessor<Msg> { | ||
private body; | ||
private cancellationToken; | ||
private messages; | ||
private continuation; | ||
constructor(body: any); | ||
constructor(body: MailboxBody<Msg>, cancellationToken?: CancellationToken); | ||
static start<Msg>(body: MailboxBody<Msg>, cancellationToken?: CancellationToken): MailboxProcessor<Msg>; | ||
__processEvents(): void; | ||
start(): void; | ||
static start: (body: any) => MailboxProcessor; | ||
receive(): (ctx: any) => void; | ||
postAndAsyncReply(f: any): (ctx: any) => void; | ||
post(msg: any): void; | ||
receive(): (ctx: IAsyncContext<Msg>) => void; | ||
post(message: Msg): void; | ||
postAndAsyncReply<Reply>(buildMessage: (c: AsyncReplyChannel<Reply>) => Msg): (ctx: IAsyncContext<Reply>) => void; | ||
} | ||
declare class Obs { | ||
static __protect: (f: any, succeed: any, fail: any) => void; | ||
static map: (f: any, w: any) => any; | ||
static choose: (f: any, w: any) => any; | ||
static filter: (f: any, w: any) => any; | ||
static partition: (f: any, w: any) => any[]; | ||
static scan: (f: any, state: any, w: any) => any; | ||
static add: (f: any, w: any) => void; | ||
static subscribe: (f: any, w: any) => any; | ||
static pairwise: (w: any) => any; | ||
static merge: (w1: any, w2: any) => any; | ||
static split: (f: any, w: any) => any[]; | ||
export interface IObserver<T> { | ||
onNext: (x: T) => void; | ||
onError: (e: any) => void; | ||
onCompleted: () => void; | ||
} | ||
export { Obs as Observable }; | ||
export declare class Event { | ||
sbscrb: any; | ||
delegates: any; | ||
constructor(sbscrb?: any, delegates?: any); | ||
trigger(value: any): void; | ||
export interface IObservable<T> { | ||
subscribe: (o: IObserver<T>) => IDisposable; | ||
} | ||
declare class FObservable { | ||
static __protect<T>(f: () => T, succeed: (x: T) => void, fail: (e: any) => void): void; | ||
static add<T>(callback: (x: T) => Unit, source: IObservable<T>): void; | ||
static choose<T, U>(chooser: (x: T) => U, source: IObservable<T>): IObservable<U>; | ||
static filter<T>(predicate: (x: T) => boolean, source: IObservable<T>): IObservable<T>; | ||
static map<T, U>(mapping: (x: T) => U, source: IObservable<T>): IObservable<U>; | ||
static merge<T>(source1: IObservable<T>, source2: IObservable<T>): IObservable<T>; | ||
static pairwise<T>(source: IObservable<T>): IObservable<[T, T]>; | ||
static partition<T>(predicate: (x: T) => boolean, source: IObservable<T>): [IObservable<T>, IObservable<T>]; | ||
static scan<U, T>(collector: (u: U, t: T) => U, state: U, source: IObservable<T>): IObservable<U>; | ||
static split<T, U1, U2>(splitter: (x: T) => Choice<U1, U2>, source: IObservable<T>): [IObservable<U1>, IObservable<U2>]; | ||
static subscribe<T>(callback: (x: T) => Unit, source: IObservable<T>): IDisposable; | ||
} | ||
export { FObservable as Observable }; | ||
export declare type Delegate<T> = (x: T) => void; | ||
export declare type DotNetDelegate<T> = (sender: any, x: T) => void; | ||
export interface IDelegateEvent<T> { | ||
addHandler(d: DotNetDelegate<T>): void; | ||
removeHandler(d: DotNetDelegate<T>): void; | ||
} | ||
export interface IEvent<T> extends IObservable<T>, IDelegateEvent<T> { | ||
publish: IEvent<T>; | ||
trigger(x: T): void; | ||
} | ||
export declare class Event<T> implements IEvent<T> { | ||
private _subscriber; | ||
private delegates; | ||
constructor(_subscriber?: (o: IObserver<T>) => IDisposable, delegates?: any[]); | ||
add(f: Delegate<T>): void; | ||
publish: this; | ||
trigger(value: T): void; | ||
private _addHandler(f); | ||
private _removeHandler(f); | ||
subscribe(f: any): any; | ||
add(f: any): void; | ||
addHandler(f: any): void; | ||
removeHandler(f: any): void; | ||
_subscribe(observer: any): any; | ||
readonly publish: this; | ||
static add: (f: any, w: any) => void; | ||
static map: (f: any, w: any) => Event; | ||
static choose: (f: any, w: any) => Event; | ||
static filter: (f: any, w: any) => Event; | ||
static partition: (f: any, w: any) => Event[]; | ||
static scan: (f: any, state: any, w: any) => Event; | ||
static pairwise: (w: any) => Event; | ||
static merge: (w1: any, w2: any) => Event; | ||
static split: (f: any, w: any) => Event[]; | ||
addHandler(handler: DotNetDelegate<T>): void; | ||
removeHandler(handler: DotNetDelegate<T>): void; | ||
private _subscribeFromObserver(observer); | ||
private _subscribeFromCallback(callback); | ||
subscribe(arg: IObserver<T> | Delegate<T>): IDisposable; | ||
static add<T>(callback: (x: T) => Unit, sourceEvent: IEvent<T>): void; | ||
static choose<T, U>(chooser: (x: T) => U, sourceEvent: IEvent<T>): IEvent<U>; | ||
static filter<T>(predicate: (x: T) => boolean, sourceEvent: IEvent<T>): IEvent<T>; | ||
static map<T, U>(mapping: (x: T) => U, sourceEvent: IEvent<T>): IEvent<U>; | ||
static merge<T>(event1: IEvent<T>, event2: IEvent<T>): IEvent<T>; | ||
static pairwise<T>(sourceEvent: IEvent<T>): IEvent<[T, T]>; | ||
static partition<T>(predicate: (x: T) => boolean, sourceEvent: IEvent<T>): [IEvent<T>, IEvent<T>]; | ||
static scan<U, T>(collector: (u: U, t: T) => U, state: U, sourceEvent: IEvent<T>): IEvent<U>; | ||
static split<T, U1, U2>(splitter: (x: T) => Choice<U1, U2>, sourceEvent: IEvent<T>): [IEvent<U1>, IEvent<U2>]; | ||
} | ||
export declare class Lazy { | ||
factory: any; | ||
export declare class Lazy<T> { | ||
factory: () => T; | ||
isValueCreated: boolean; | ||
private createdValue; | ||
constructor(factory: any); | ||
static createFromValue: (v: any) => Lazy; | ||
readonly value: any; | ||
constructor(factory: () => T); | ||
static createFromValue<T>(v: T): Lazy<T>; | ||
value: T; | ||
} | ||
export declare type TTuple<T1, T2> = [T1, T2]; | ||
export declare type TTuple3<T1, T2, T3> = [T1, T2, T3]; |
@@ -1,2 +0,2 @@ | ||
!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.fableCore=e.exports}}(this,function(n){"use strict";function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var e=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},o={interfaces:Symbol("interfaces"),typeName:Symbol("typeName")};n.Symbol=o;var u=n.Choice=function k(n,e){t(this,k),this.Case=n,this.Fields=[e]},i=n.Util=function C(){t(this,C)};i.__types=new Map,i.setInterfaces=function(n,t,e){var r=n[o.interfaces];if(Array.isArray(t)&&t.length>0)if(Array.isArray(r))for(var u=0;u<t.length;u++)r.push(t[u]);else n[o.interfaces]=t;e&&(n[o.typeName]=e,i.__types.set(e,n.constructor))},i.hasInterface=function(n,t){return Array.isArray(n[o.interfaces])&&n[o.interfaces].indexOf(t)>=0},i.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},i.compareTo=function(n,t){function e(n){return Array.isArray(n)||ArrayBuffer.isView(n)||n instanceof p||n instanceof Map||n instanceof Set}function o(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(("undefined"==typeof n?"undefined":r(n))!=("undefined"==typeof t?"undefined":r(t)))return-1;if(null!=n&&null!=t&&"object"==("undefined"==typeof n?"undefined":r(n))&&"object"==("undefined"==typeof t?"undefined":r(t))){var u;if(Object.getPrototypeOf(n)!=Object.getPrototypeOf(t))return-1;if(i.hasInterface(n,"System.IComparable"))return n.compareTo(t);if(e(n))return u=i.compareTo(y.count(n),y.count(t)),0!=u?u:y.fold2(function(n,t,e){return 0!=n?n:i.compareTo(t,e)},0,o(n),o(t));if(n instanceof Date)return t>n?-1:n>t?1:0;var a=Object.getOwnPropertyNames(n),c=Object.getOwnPropertyNames(t);return u=i.compareTo(a.length,c.length),0!=u?u:y.fold2(function(e,r,o){return 0!=e?e:i.compareTo(n[r],t[o])},0,a.sort(),c.sort())}return t>n?-1:n>t?1:0},i.createObj=function(n){return y.fold(function(n,t){return n[t[0]]=t[1],n},{},n)},i.toJson=function(n){function t(n,t){if(ArrayBuffer.isView(t))return Array.from(t);if("object"==("undefined"==typeof t?"undefined":r(t))){if(t instanceof p||t instanceof Map||t instanceof Set)throw"JSON serialization of List, Map or Set is not supported";if(t[o.typeName]){var e={__type:t[o.typeName]};return Object.assign(e,t)}}return t}return JSON.stringify(n,t)},i.ofJson=function(n){function t(n,t){if("object"==("undefined"==typeof t?"undefined":r(t))&&t.__type){var e=i.__types.get(t.__type);if(e)return delete t.__type,Object.assign(new e,t)}return t}return JSON.parse(n,t)};var a=n.TimeSpan=function I(){t(this,I)};a.create=function(){var n=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],e=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4];switch(arguments.length){case 1:return arguments[0]/1e4;case 3:n=0,t=arguments[0],e=arguments[1],r=arguments[2],o=0;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},a.fromTicks=a.create,a.fromDays=function(n){return a.create(n,0,0,0)},a.fromHours=function(n){return a.create(n,0,0)},a.fromMinutes=function(n){return a.create(0,n,0)},a.fromSeconds=function(n){return a.create(0,0,n)},a.days=function(n){return Math.floor(n/864e5)},a.hours=function(n){return Math.floor(n%864e5/36e5)},a.minutes=function(n){return Math.floor(n%36e5/6e4)},a.seconds=function(n){return Math.floor(n%6e4/1e3)},a.milliseconds=function(n){return Math.floor(n%1e3)},a.ticks=function(n){return 1e4*n},a.totalDays=function(n){return n/864e5},a.totalHours=function(n){return n/36e5},a.totalMinutes=function(n){return n/6e4},a.totalSeconds=function(n){return n/1e3},a.duration=Math.abs,a.negate=function(n){return-n},a.add=function(n,t){return n+t},a.subtract=function(n,t){return n-t},a.compareTo=i.compareTo,a.compare=i.compareTo;var c=function T(){t(this,T)};c.__changeKind=function(n,t){var e;return n.kind==t?n:(e=new Date(n.getTime()),e.kind=t,e)},c.__getValue=function(n,t){return 1==n.kind?n["getUTC"+t]():n["get"+t]()},c.minValue=function(){return c.parse(-864e13,1)},c.maxValue=function(){return c.parse(864e13,1)},c.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},c.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},c.now=c.parse,c.utcNow=function(){return c.parse(null,1)},c.today=function(){return c.date(c.now())},c.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},c.daysInMonth=function(n,t){return 2==t?c.isLeapYear(n)?29:28:t>=8?t%2==0?31:30:t%2==0?30:31},c.toUniversalTime=function(n){return c.__changeKind(n,1)},c.toLocalTime=function(n){return c.__changeKind(n,2)},c.timeOfDay=function(n){return a.create(c.hour(n),c.minute(n),c.second(n))},c.date=function(n){return c.create(c.year(n),c.month(n),c.day(n),0,0,0,0,n.kind)},c.day=function(n){return c.__getValue(n,"Date")},c.hour=function(n){return c.__getValue(n,"Hours")},c.millisecond=function(n){return c.__getValue(n,"Milliseconds")},c.minute=function(n){return c.__getValue(n,"Minutes")},c.month=function(n){return c.__getValue(n,"Month")+1},c.second=function(n){return c.__getValue(n,"Seconds")},c.year=function(n){return c.__getValue(n,"FullYear")},c.ticks=function(n){return 1e4*(n.getTime()+62135604e6)},c.toBinary=c.ticks,c.dayOfWeek=function(n){return c.__getValue(n,"Day")},c.dayOfYear=function(n){for(var t=c.year(n),e=c.month(n),r=c.day(n),o=1;e>o;o++)r+=c.daysInMonth(t,o);return r},c.add=function(n,t){return c.parse(n.getTime()+t,n.kind)},c.op_Addition=c.add,c.addDays=function(n,t){return c.parse(n.getTime()+864e5*t,n.kind)},c.addHours=function(n,t){return c.parse(n.getTime()+36e5*t,n.kind)},c.addMinutes=function(n,t){return c.parse(n.getTime()+6e4*t,n.kind)},c.addSeconds=function(n,t){return c.parse(n.getTime()+1e3*t,n.kind)},c.addMilliseconds=function(n,t){return c.parse(n.getTime()+t,n.kind)},c.addTicks=function(n,t){return c.parse(n.getTime()+t/1e4,n.kind)},c.addYears=function(n,t){var e=c.month(n),r=c.year(n)+t,o=c.daysInMonth(r,e),u=Math.min(o,c.day(n));return c.create(r,e,u,c.hour(n),c.minute(n),c.second(n),c.millisecond(n),n.kind)},c.addMonths=function(n,t){var e=c.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 u=c.year(n)+o,i=c.daysInMonth(u,e),a=Math.min(i,c.day(n));return c.create(u,e,a,c.hour(n),c.minute(n),c.second(n),c.millisecond(n),n.kind)},c.subtract=function(n,t){return"number"==typeof t?c.parse(n.getTime()-t,n.kind):n.getTime()-t.getTime()},c.op_Subtraction=c.subtract,c.toLongDateString=function(n){return n.toDateString()},c.toShortDateString=function(n){return n.toLocaleDateString()},c.toLongTimeString=function(n){return n.toLocaleTimeString()},c.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},c.equals=function(n,t){return n.getTime()==t.getTime()},c.compareTo=i.compareTo,c.compare=i.compareTo,n.Date=c;var f=n.Timer=function(){function n(e){t(this,n),this.interval=e>0?e:100,this.autoReset=!0,this._elapsed=new x}return e(n,[{key:"elapsed",get:function(){return this._elapsed}},{key:"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)}}]),n}();f.prototype.dispose=f.prototype.close=function(){this.enabled=!1,this._isDisposed=!0},f.prototype.start=function(){this.enabled=!0},f.prototype.stop=function(){this.enabled=!1},i.setInterfaces(f.prototype,["System.IDisposable"]);var s=function E(){t(this,E)};s.fsFormatRegExp=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,s.fsFormat=function(n){function t(n){return!(null===n||"object"!==("undefined"==typeof n?"undefined":r(n))||n instanceof Number||n instanceof String||n instanceof Boolean)}function e(n,e){return n.replace(s.fsFormatRegExp,function(n,r,o,u,i,a){switch(a){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 c=o.indexOf("+")>=0&&parseInt(e)>=0;if(!isNaN(u=parseInt(u))){var f=u>=0&&o.indexOf("0")>=0?"0":" ";e=s.padLeft(e,Math.abs(u)-(c?1:0),f,0>u)}return r+(c?"+"+e:e)})}function o(n){return function(t){var r=e(n,t);return s.fsFormatRegExp.test(r)?o(r):u(r.replace(/%%/g,"%"))}}var u;return function(t){return u=t,s.fsFormatRegExp.test(n)?o(n):u(n)}},s.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,s.format=function(n,t){return t=i.getRestParams(arguments,1),n.replace(s.formatRegExp,function(n,e,r,o){var u=t[e];if("number"==typeof u)switch((o||"").substring(0,1)){case"f":case"F":u=o.length>1?u.toFixed(o.substring(1)):u.toFixed(2);break;case"g":case"G":u=o.length>1?u.toPrecision(o.substring(1)):u.toPrecision();break;case"e":case"E":u=o.length>1?u.toExponential(o.substring(1)):u.toExponential();break;case"p":case"P":u=(o.length>1?(100*u).toFixed(o.substring(1)):(100*u).toFixed(2))+" %"}else if(u instanceof Date){if(1===o.length)switch(o){case"D":u=u.toDateString();break;case"T":u=u.toLocaleTimeString();break;case"d":u=u.toLocaleDateString();break;case"t":u=u.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}u=o.replace(/\w+/g,function(n){var t=n;switch(n.substring(0,1)){case"y":t=n.length<4?c.year(u)%100:c.year(u);break;case"h":t=u.getHours()>12?c.hour(u)%12:c.hour(u);break;case"M":t=c.month(u);break;case"d":t=c.day(u);break;case"H":t=c.hour(u);break;case"m":t=c.minute(u);break;case"s":t=c.second(u)}return t!==n&&10>t&&n.length>1&&(t="0"+t),t})}return isNaN(r=parseInt((r||"").substring(1)))||(u=s.padLeft(u,Math.abs(r)," ",0>r)),u})},s.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("")},s.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},s.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},s.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},s.padRight=function(n,t,e){return s.padLeft(n,t,e,!0)},s.replace=function(n,t,e){return n.replace(new RegExp(l.escape(t),"g"),e)},s.replicate=function(n,t){return s.init(n,function(){return t})},s.split=function(n,t,e,r){if(e="number"==typeof e?e:null,r="number"==typeof r?r:null,0>e)throw"Count cannot be less than zero";if(0===e)return[];t=Array.isArray(t)?t:i.getRestParams(arguments,1),t=t.filter(function(n){return n}).map(function(n){return l.escape(n)}),t=t.length>0?t:[" "];for(var o,u=0,a=[],c=new RegExp(t.join("|"),"g");(null==e||e>1)&&null!==(o=c.exec(n));)(!r||o.index-u>0)&&(e=null!=e?e-1:e,a.push(n.substring(u,o.index))),u=c.lastIndex;return(!r||n.length-u>0)&&a.push(n.substring(u)),a},s.join=function(n,t){return t="string"==typeof t?i.getRestParams(arguments,1):t,(Array.isArray(t)?t:Array.from(t)).join(n)},s.concat=s.join,s.endsWith=function(n,t){var e=n.lastIndexOf(t);return e>=0&&e==n.length-t.length},s.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},n.String=s;var l=function N(){t(this,N)};l.create=function(n,t){var e="g";return e+=1&t?"i":"",e+=2&t?"m":"",new RegExp(n,e)},l.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},l.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},l.isMatch=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=l.create(t,e);return r.test(n)},l.match=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=l.create(t,e);return r.exec(n)},l.matches=function(n,t,e){var r=n instanceof RegExp?(r=n,n=t,r.lastIndex=null!=e?e:0,r):r=l.create(t,e);if(!r.global)throw"Non-global RegExp";for(var o,u=[];null!==(o=r.exec(n));)u.push(o);return u},l.options=function(n){var t=256;return t|=n.ignoreCase?1:0,t|=n.multiline?2:0},l.replace=function(n,t,e,r,o){if("string"==typeof n){var u=n;n=l.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 c=t.substring(o),f=l.matches(n,c),s=f.length>r?(a=f[r-1],c.substring(0,a.index+a[0].length)):c;return t.substring(0,o)+s.replace(n,e)+t.substring(o+s.length)}return t.replace(n,e)},l.split=function(n,t,e,r){if("string"==typeof n){var o=n;n=l.create(t,e),t=o,e=void 0}return t=null!=r?t.substring(r):t,t.split(n,e)},n.RegExp=l;var d=function M(){t(this,M)};d.addRangeInPlace=function(n,t){y.iter(function(n){t.push(n)},n)},d.blit=function(n,t,e,r,o){for(;o--;)e[r++]=n[t++]},d.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]},d.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},d.removeInPlace=function(n,t){var e=t.indexOf(n);return e>-1?(t.splice(e,1),!0):!1},d.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]},d.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})},d.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]},d.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]},n.Array=d;var p=n.List=function(){function n(e,r){t(this,n),this.head=e,this.tail=r}return n.ofArray=function(t,e){for(var r=e||new n,o=t.length-1;o>=0;o--)r=new n(t[o],r);return r},n.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var t=n;return n=n.tail,{done:null==t.tail,value:t.head}}}},n.prototype.append=function(t){return n.append(this,t)},n.append=function(t,e){return y.fold(function(t,e){return new n(e,t)},e,n.rev(t))},n.prototype.choose=function(t,e){return n.choose(t,this)},n.choose=function(t,e){var r=y.fold(function(e,r){var o=t(r);return null!=o?new n(o,e):e},new n,e);return n.rev(r)},n.prototype.collect=function(t){return n.collect(t,this)},n.collect=function(t,e){return y.fold(function(n,e){return n.append(t(e))},new n,e)},n.concat=function(t){return n.collect(function(n){return n},t)},n.prototype.filter=function(t){return n.filter(t,this)},n.filter=function(t,e){return n.rev(y.fold(function(e,r){return t(r)?new n(r,e):e},new n,e))},n.prototype.where=function(t){return n.filter(t,this)},n.where=function(t,e){return n.filter(t,e)},n.init=function(t,e){if(0>t)throw"List length must be non-negative";for(var r=new n,o=1;t>=o;o++)r=new n(e(t-o),r);return r},n.prototype.map=function(t){return n.map(t,this)},n.map=function(t,e){return n.rev(y.fold(function(e,r){return new n(t(r),e)},new n,e))},n.prototype.mapi=function(t){return n.mapi(t,this)},n.mapi=function(t,e){return n.rev(y.fold(function(e,r,o){return new n(t(o,r),e)},new n,e))},n.prototype.partition=function(t){return n.partition(t,this)},n.partition=function(t,e){var r=[new n,new n];return y.fold(function(e,r){var o=e[0],u=e[1],i=[new n(r,o),u],a=[o,new n(r,u)];return t(r)?i:a},r,n.rev(e))},n.replicate=function(t,e){return n.init(t,function(){return e})},n.prototype.rev=function(){return n.rev(this)},n.rev=function(t){return y.fold(function(t,e){return new n(e,t)},new n,t)},n.singleton=function(t){return new n(t,new n)},n.prototype.slice=function(t,e){return n.slice(t,e,this)},n.slice=function(t,e,r){var o=null==t,u=null==e;return n.rev(y.fold(function(r,i,a){return(o||a>=t)&&(u||e>=a)?new n(i,r):r},new n,r))},n.unzip=function(t){var e=[new n,new n];return y.foldBack(function(t,e){return[new n(t[0],e[0]),new n(t[1],e[1])]},t,e)},n.unzip3=function(t){var e=[new n,new n,new n];return y.foldBack(function(t,e){return[new n(t[0],e[0]),new n(t[1],e[1]),new n(t[2],e[2])]},t,e)},e(n,[{key:"length",get:function(){return y.fold(function(n,t){return n+1},0,this)}}]),n}(),y=n.Seq=function(){function n(){t(this,n)}return n.fold=function(n,t,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(n,t);for(var r=null,o=0,u=e[Symbol.iterator]();r=u.next(),!r.done;o++)t=n(t,r.value,o);return t},n.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},n.fold2=function(n,t,e,r){for(var o=e[Symbol.iterator](),u=r[Symbol.iterator](),i=void 0,a=void 0,c=0;i=o.next(),a=u.next(),!i.done&&!a.done;c++)t=n(t,i.value,a.value,c);return t},n.count=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)?t.length:n.fold(function(n,t){return n+1},0,t)},n}();y.__failIfNone=function(n){if(null==n)throw"Seq did not contain any matching element";return n},y.toList=function(n){return y.foldBack(function(n,t){return new p(n,t)},n,new p)},y.ofList=function(n){return y.delay(function(){return y.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},n)})},y.ofArray=function(n){return y.delay(function(){return y.unfold(function(t){return t<n.length?[n[t],t+1]:null},0)})},y.append=function(n,t){return y.delay(function(){var e=!1,r=[n[Symbol.iterator](),t];return y.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)})},y.average=function(n){var t=1,e=y.reduce(function(n,e){return t++,n+e},n);return e/t},y.averageBy=function(n,t){var e=1,r=y.reduce(function(t,r){return e++,(2===e?n(t):t)+n(r)},t);return r/e},y.countBy=function(n,t){return y.map(function(n){return[n[0],y.count(n[1])]},y.groupBy(n,t))},y.concat=function(n){return y.delay(function(){var t=n[Symbol.iterator]();return y.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)})},y.collect=function(n,t){return y.concat(y.map(n,t))},y.choose=function(n,t){var e=function r(t){var e=t.next();if(!e.done){var o=n(e.value);return null!=o?[o,t]:r(t)}};return y.delay(function(){return y.unfold(function(n){return e(n)},t[Symbol.iterator]())})},y.compareWith=function(n,t,e){var r=y.tryFind(function(n){return 0!=n},y.map2(function(t,e){return n(t,e)},t,e));return null!=r?r:y.count(t)-y.count(e)},y.delay=function(n){var t={};return t[Symbol.iterator]=function(){return n()[Symbol.iterator]()},t},y.distinctBy=function(n,t){return y.choose(function(n){return n[0]},y.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))},y.distinct=function(n){return y.distinctBy(function(n){return n},n)},y.empty=function(){return y.unfold(function(){})},y.enumerateWhile=function(n,t){return y.concat(y.unfold(function(){return n()?[t,!0]:null}))},y.enumerateThenFinally=function(n,t){return y.delay(function(){var e;try{e=n[Symbol.iterator]()}finally{t()}return y.unfold(function(n){try{var e=n.next();return e.done?null:[e.value,n]}finally{t()}},e)})},y.enumerateUsing=function(n,t){var e=!1,r=function(){e||(e=!0,n.dispose())};try{return y.enumerateThenFinally(t(n),r)}finally{r()}},y.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},y.exists=function(n,t){var e=function r(t){var e=t.next();return!e.done&&(n(e.value)||r(t))};return e(t[Symbol.iterator]())},y.exists2=function(n,t,e){var r=function o(t,e){var r=t.next(),u=e.next();return!r.done&&!u.done&&(n(r.value,u.value)||o(t,e))};return r(t[Symbol.iterator](),e[Symbol.iterator]())},y.filter=function(n,t){var e=function r(t){var e=t.next();return e.done?void 0:n(e.value)?[e.value,t]:r(t)};return y.delay(function(){return y.unfold(e,t[Symbol.iterator]())})},y.where=y.filter,y.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},y.forall=function(n,t){return y.fold(function(t,e){return t&&n(e)},!0,t)},y.forall2=function(n,t,e){return y.fold2(function(t,e,r){return t&&n(e,r)},!0,t,e)},y.groupBy=function(n,t){return y.fold(function(t,e){var r=n(e),o=t.get(r);return null!=o?t.set(r,new p(e,o)):t.set(r,new p(e,new p))},new Map,t)},y.tryHead=function(n){var t=n[Symbol.iterator](),e=t.next();return e.done?null:e.value},y.head=function(n){return y.__failIfNone(y.tryHead(n))},y.init=function(n,t){return y.delay(function(){return y.unfold(function(e){return n>e?[t(e),e+1]:null},0)})},y.initInfinite=function(n){return y.delay(function(){return y.unfold(function(t){return[n(t),t+1]},0)})},y.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}},y.item=function(n,t){return y.__failIfNone(y.tryItem(n,t))},y.iter=function(n,t){y.fold(function(t,e){n(e)},null,t)},y.iter2=function(n,t,e){y.fold2(function(t,e,r){n(e,r)},null,t,e)},y.iteri=function(n,t){y.fold(function(t,e,r){n(r,e)},null,t)},y.iteri2=function(n,t,e){y.fold2(function(t,e,r,o){n(o,e,r)},null,t,e)},y.isEmpty=function(n){var t=n[Symbol.iterator]();return t.next().done},y.tryLast=function(n){try{return y.reduce(function(n,t){return t},n)}catch(t){return null}},y.last=function(n){return y.__failIfNone(y.tryLast(n))},y.map=function(n,t){return y.delay(function(){return y.unfold(function(t){var e=t.next();return e.done?null:[n(e.value),t]},t[Symbol.iterator]())})},y.mapi=function(n,t){return y.delay(function(){var e=0;return y.unfold(function(t){var r=t.next();return r.done?null:[n(e++,r.value),t]},t[Symbol.iterator]())})},y.map2=function(n,t,e){return y.delay(function(){var r=t[Symbol.iterator](),o=e[Symbol.iterator]();return y.unfold(function(){var t=r.next(),e=o.next();return t.done||e.done?null:[n(t.value,e.value),null]})})},y.mapi2=function(n,t,e){return y.delay(function(){var r=0,o=t[Symbol.iterator](),u=e[Symbol.iterator]();return y.unfold(function(){var t=o.next(),e=u.next();return t.done||e.done?null:[n(r++,t.value,e.value),null]})})},y.map3=function(n,t,e,r){return y.delay(function(){var o=t[Symbol.iterator](),u=e[Symbol.iterator](),i=r[Symbol.iterator]();return y.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]})})},y.max=function(n){return y.reduce(function(n,t){return Math.max(n,t)},n)},y.maxBy=function(n,t){return y.reduce(function(t,e){return n(e)>n(t)?e:t},t)},y.min=function(n){return y.reduce(function(n,t){return Math.min(n,t)},n)},y.minBy=function(n,t){return y.reduce(function(t,e){return n(e)>n(t)?t:e},t)},y.pairwise=function(n){return y.skip(1,y.scan(function(n,t){return[n[1],t]},[0,0],n))},y.permute=function(n,t){var e=Array.from(t);return y.ofArray(d.permute(n,e))},y.rangeStep=function(n,t,e){if(0===t)throw"Step cannot be 0";return y.unfold(function(n){return t>0&&e>=n||0>t&&n>=e?[n,n+t]:null},n)},y.rangeChar=function(n,t){return y.unfold(function(n){return t>=n?[n,String.fromCharCode(n.charCodeAt(0)+1)]:null},n)},y.range=function(n,t){return y.rangeStep(n,1,t)},y.readonly=function(n){return y.map(function(n){return n},n)},y.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},y.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},y.replicate=function(n,t){return y.init(n,function(){return t})},y.rev=function(n){var t=Array.isArray(n)||ArrayBuffer.isView(n)?n.slice(0):Array.from(n);return t.reverse()},y.scan=function(n,t,e){return y.delay(function(){var r=e[Symbol.iterator]();return y.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)})},y.scanBack=function(n,t,e){return y.rev(y.scan(function(t,e){return n(e,t)},e,y.rev(t)))},y.singleton=function(n){return y.unfold(function(n){return null!=n?[n,null]:null},n)},y.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},y.skipWhile=function(n,t){return y.delay(function(){var e=!1;return y.filter(function(t){return e||(e=!n(t))},t)})},y.sortWith=function(n,t){var e=Array.from(t);return y.ofArray(e.sort(n))},y.sum=function(n,t){return t=t||function(n,t){return n+t},y.reduce(function(n,e){return t(n,e)},n)},y.sumBy=function(n,t,e){var r=!0;return e=e||function(n,t){return n+t},y.reduce(function(t,e){return t=r?n(t):t,r=!1,t+n(e)},t)},y.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},y.take=function(n,t,e){return y.delay(function(){var r=t[Symbol.iterator]();return y.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)})},y.truncate=function(n,t){return y.take(n,t,!0)},y.takeWhile=function(n,t){return y.delay(function(){var e=t[Symbol.iterator]();return y.unfold(function(t){var r=e.next();return!r.done&&n(r.value)?[r.value,null]:void 0},0)})},y.tryFind=function(n,t){for(var e=void 0,r=0,o=t[Symbol.iterator]();;r++){if(e=o.next(),e.done)return null;if(n(e.value,r))return e.value}},y.find=function(n,t){return y.__failIfNone(y.tryFind(n,t))},y.tryFindBack=function(n,t){for(var e=null,r=void 0,o=0,u=t[Symbol.iterator]();;o++){if(r=u.next(),r.done)return e;n(r.value,o)&&(e=r.value)}},y.findBack=function(n,t){return y.__failIfNone(y.tryFindBack(n,t))},y.tryFindIndex=function(n,t){for(var e=void 0,r=0,o=t[Symbol.iterator]();;r++){if(e=o.next(),e.done)return null;if(n(e.value,r))return r}},y.findIndex=function(n,t){return y.__failIfNone(y.tryFindIndex(n,t))},y.tryFindIndexBack=function(n,t){for(var e=null,r=void 0,o=0,u=t[Symbol.iterator]();;o++){if(r=u.next(),r.done)return e;n(r.value,o)&&(e=o)}},y.findIndexBack=function(n,t){return y.__failIfNone(y.tryFindIndexBack(n,t))},y.tryPick=function(n,t){for(var e=void 0,r=0,o=t[Symbol.iterator]();e=o.next(),!e.done;r++){var u=n(e.value,r);if(null!=u)return u}},y.pick=function(n,t){return y.__failIfNone(y.tryPick(n,t))},y.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},y.zip=function(n,t){return y.map2(function(n,t){return[n,t]},n,t)},y.zip3=function(n,t,e){return y.map3(function(n,t,e){return[n,t,e]},n,t,e)};var m=function O(){t(this,O)};m.op_Addition=function(n,t){var e=new Set(n);return t.forEach(function(n){e.add(n)}),e},m.union=m.op_Addition,m.unionMany=function(n){return y.fold(function(n,t){return t.forEach(function(t){n.add(t)}),n},new Set,n)},m.op_Subtraction=function(n,t){var e=new Set(n);return t.forEach(function(n){e["delete"](n)}),e},m.difference=m.op_Subtraction,m.intersect=function(n,t){var e=new Set(n);return n.forEach(function(n){t.has(n)||e["delete"](n)}),e},m.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 y.iter(function(n){for(var r=1;r<t.length;r++)if(!t[r].has(n)){e["delete"](n);break}},t[0]),e},m.isProperSubsetOf=function(n,t){return y.forall(function(n){return t.has(n)},n)&&y.exists(function(t){return!n.has(t)},t)},m.isProperSubset=m.isProperSubsetOf,m.isSubsetOf=function(n,t){return y.forall(function(n){return t.has(n)},n)},m.isSubset=m.isSubsetOf,m.isProperSupersetOf=function(n,t){return m.isProperSubset(t,n)},m.isProperSuperset=m.isProperSupersetOf,m.isSupersetOf=function(n,t){return m.isSubset(t,n)},m.isSuperset=m.isSupersetOf,m.copyTo=function(n,t,e,r){if(!Array.isArray(t)&&!ArrayBuffer.isView(t))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}},m.partition=function(n,t){return y.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)},m.removeInPlace=function(n,t){return t["delete"](n),t},m.remove=function(n,t){return m.removeInPlace(n,new Set(t))},n.Set=m;var h=function P(){t(this,P)};h.containsValue=function(n,t){return y.fold(function(e,r){return e||t.get(r)===n},!1,t.keys())},h.exists=function(n,t){return y.exists(function(t){return n(t[0],t[1])},t)},h.filter=function(n,t){return y.fold(function(t,e){return n(e[0],e[1])?t.set(e[0],e[1]):t},new Map,t)},h.fold=function(n,t,e){return y.fold(function(t,e){return n(t,e[0],e[1])},t,e)},h.foldBack=function(n,t,e){return y.foldBack(function(t,e){return n(t[0],t[1],e)},t,e)},h.forall=function(n,t){return y.forall(function(t){return n(t[0],t[1])},t)},h.iter=function(n,t){return y.iter(function(t){n(t[0],t[1])},t)},h.map=function(n,t){return y.fold(function(t,e){return t.set(e[0],n(e[0],e[1]))},new Map,t)},h.partition=function(n,t){return y.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)},h.findKey=function(n,t){return y.pick(function(t){return n(t[0],t[1])?t[0]:null},t)},h.tryFindKey=function(n,t){return y.tryPick(function(t){return n(t[0],t[1])?t[0]:null},t)},h.pick=function(n,t){return y.pick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},h.removeInPlace=m.removeInPlace,h.remove=function(n,t){return h.removeInPlace(n,new Map(t))},h.tryPick=function(n,t){return y.tryPick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n.Map=h;var v=n.Async=function(){function n(){t(this,n)}return e(n,[{key:"cancellationToken",get:function(){return n.__protectedCont(function(n){return n.onSuccess(n.cancelToken)})}}]),n}();v.__protectedCont=function(n){return function(t){if(t.cancelToken.isCancelled)t.onCancel("cancelled");else try{n(t)}catch(e){t.onError(e)}}},v.bind=function(n,t){return v.__protectedCont(function(e){n({onSuccess:function(n){return t(n)(e)},onError:e.onError,onCancel:e.onCancel,cancelToken:e.cancelToken})})},v.combine=function(n,t){return v.bind(n,function(){return t})},v.delay=function(n){return v.__protectedCont(function(t){n()(t)})},v["for"]=function(n,t){var e=n[Symbol.iterator](),r=e.next();return v["while"](function(){ | ||
return!r.done},v.delay(function(){var n=t(r.value);return r=e.next(),n}))},v["return"]=function(n){return v.__protectedCont(function(t){t.onSuccess(n)})},v.returnFrom=function(n){return n},v.tryFinally=function(n,t){return v.__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})})},v.tryWith=function(n,t){return v.__protectedCont(function(e){n({onSuccess:e.onSuccess,onCancel:e.onCancel,cancelToken:e.cancelToken,onError:function(n){e.onSuccess(t(n))}})})},v.using=function(n,t){return v.tryFinally(t(n),function(){n.dispose()})},v["while"]=function(n,t){return n()?v.bind(t,function(){return v["while"](n,t)}):v["return"]()},v.zero=function(){return v.__protectedCont(function(n){n.onSuccess()})},v.start=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:{}})},v.startImmediate=v.start,v.startWithContinuations=v.start,v.ignore=function(n){return v.bind(n,function(){return v["return"]()})},v.fromContinuations=function(n){return v.__protectedCont(function(t){return n([t.onSuccess,t.onError,t.onCancel])})},v.startAsPromise=function(n,t){return new Promise(function(e,r){v.startWithContinuations(n,e,r,r,t?t:{})})},v.awaitPromise=function(n){return v.fromContinuations(function(t){n.then(t[0])["catch"](function(n){("cancelled"==n?t[2]:t[1])(n)})})},v.parallel=function(n){return v.awaitPromise(Promise.all(y.map(function(n){return v.startAsPromise(n)},n)))},v["catch"]=function(n){return v.__protectedCont(function(t){n({onSuccess:function(n){t.onSuccess(new u("Choice1Of2",n))},onError:function(n){t.onSuccess(new u("Choice2Of2",n))},onCancel:t.onCancel,cancelToken:t.cancelToken})})},v.sleep=function(n){return v.__protectedCont(function(t){setTimeout(function(){t.cancelToken.isCancelled?t.onCancel("cancelled"):t.onSuccess()},n)})};var g=function(){function n(){t(this,n)}return n.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]},n.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}},n}(),b=n.MailboxProcessor=function(){function n(e){t(this,n),this.body=e,this.messages=new g}return n.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},n.prototype.start=function(){v.startImmediate(this.body(this))},n.prototype.receive=function(){var n=this;return v.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},n.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(),v.fromContinuations(function(n){r=n[0],t()})},n.prototype.post=function(n){this.messages.add(n),this.__processEvents()},n}();b.start=function(n){var t=new b(n);return t.start(),t};var w=function B(n,e,r){t(this,B),this.onNext=n,this.onError=e||function(n){},this.onCompleted=r||function(){}};i.setInterfaces(w.prototype,["System.IObserver"]);var S=function L(n){t(this,L),this.subscribe=n};i.setInterfaces(S.prototype,["System.IObservable"]);var _=function F(){t(this,F)};_.__protect=function(n,t,e){try{t(n())}catch(r){e(r)}},_.map=function(n,t){return new S(function(e){return t.subscribe(new w(function(t){_.__protect(function(){n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))})},_.choose=function(n,t){return new S(function(e){return t.subscribe(new w(function(t){_.__protect(function(){n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))})},_.filter=function(n,t){return _.choose(function(t){return n(t)?t:null},t)},_.partition=function(n,t){return[_.filter(n,t),_.filter(function(t){return!n(t)},t)]},_.scan=function(n,t,e){return new S(function(r){return e.subscribe(new w(function(e){_.__protect(function(){n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},_.add=function(n,t){t.subscribe(new w(n))},_.subscribe=function(n,t){return t.subscribe(new w(n))},_.pairwise=function(n){return new S(function(t){var e=null;return n.subscribe(new w(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},_.merge=function(n,t){return new S(function(e){var r=!1,u=!1,i=!1,a=n.subscribe(new w(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(u=!0,i&&(r=!0,e.onCompleted()))})),c=t.subscribe(new w(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(i=!0,u&&(r=!0,e.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[o.interfaces]=["System.IDisposable"],f})},_.split=function(n,t){return[_.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),_.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]},n.Observable=_;var x=n.Event=function(){function n(e,r){t(this,n),this.sbscrb=e,this.delegates=r||new Array}return n.prototype.trigger=function(n){y.iter(function(t){t(n)},this.delegates)},n.prototype._addHandler=function(n){this.delegates.push(n)},n.prototype._removeHandler=function(n){var t=function(t,e,r){return""+t==""+n},e=this.delegates.findIndex(t);e>-1&&this.delegates.splice(e,1)},n.prototype.subscribe=function(n){var t,e=this;return this._addHandler(n),t={dispose:function(){return e._removeHandler(n)}},t[o.interfaces]=["System.IDisposable"],t},n.prototype.add=function(n){this._addHandler(n)},n.prototype.addHandler=function(n){var t=function(t){return n(void 0,t)};this._addHandler(t)},n.prototype.removeHandler=function(n){var t=function(t){return n(void 0,t)};this._removeHandler(t)},n.prototype._subscribe=function(n){if(this.sbscrb)return this.sbscrb(n);var t,e=n.onNext;return this._addHandler(e),t={dispose:function(){this._removeHandler(e)}},t[o.interfaces]=["System.IDisposable"],t},e(n,[{key:"publish",get:function(){return this}}]),n}();x.add=function(n,t){t._subscribe(new w(n))},x.map=function(n,t){var e=function(e){t._subscribe(new w(function(t){_.__protect(function(){return n(t)},e.onNext,e.onError)},e.onError,e.onCompleted))};return new x(e,t.delegates)},x.choose=function(n,t){var e=function(e){return t._subscribe(new w(function(t){_.__protect(function(){return n(t)},function(n){null!=n&&e.onNext(n)},e.onError)},e.onError,e.onCompleted))};return new x(e,t.delegates)},x.filter=function(n,t){return x.choose(function(t){return n(t)?t:null},t)},x.partition=function(n,t){return[x.filter(n,t),x.filter(function(t){return!n(t)},t)]},x.scan=function(n,t,e){var r=function(r){return e._subscribe(new w(function(e){_.__protect(function(){return n(t,e)},function(n){t=n,r.onNext(n)},r.onError)},r.onError,r.onCompleted))};return new x(r,e.delegates)},x.pairwise=function(n){var t=function(t){var e=null;return n._subscribe(new w(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))};return new x(t,n.delegates)},x.merge=function(n,t){var e=function(e){var r=!1,u=!1,i=!1,a=n._subscribe(new w(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(u=!0,i&&(r=!0,e.onCompleted()))})),c=t._subscribe(new w(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(i=!0,u&&(r=!0,e.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[o.interfaces]=["System.IDisposable"],f};return new x(e,n.delegates.concat(t.delegates))},x.split=function(n,t){return[x.choose(function(t){var e=n(t);return"Choice1Of2"==e.Case?e.Fields[0]:null},t),x.choose(function(t){var e=n(t);return"Choice2Of2"==e.Case?e.Fields[0]:null},t)]};var A=n.Lazy=function(){function n(e){t(this,n),this.factory=e,this.isValueCreated=!1}return e(n,[{key:"value",get:function(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}}]),n}();A.createFromValue=function(n){return new A(function(){return n})}}); | ||
!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.fableCore=e.exports}}(this,function(n){"use strict";function t(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function r(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function u(n,t){return[n,t]}function i(n,t,e){return[n,t,e]}Object.defineProperty(n,"__esModule",{value:!0}),n.Tuple=u,n.Tuple3=i;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},c=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),f={interfaces:Symbol("interfaces"),typeName:Symbol("typeName")};n.Symbol=f;var l=n.Choice=function(){function n(t,e,r){o(this,n),this.Case=t,this.Fields=[r]}return n.Choice1Of2=function(t){return new n("Choice1Of2",1,t)},n.Choice2Of2=function(t){return new n("Choice2Of2",1,t)},c(n,[{key:"valueIfChoice1",get:function(){return"Choice1Of2"===this.Case?this.Fields[0]:null}},{key:"valueIfChoice2",get:function(){return"Choice2Of2"===this.Case?this.Fields[0]:null}}]),n}(),s=n.Util=function(){function n(){o(this,n)}return n.setInterfaces=function(t,e,r){if(Array.isArray(e)&&e.length>0){var o=t[f.interfaces];if(Array.isArray(o))for(var u=0;u<e.length;u++)o.push(e[u]);else t[f.interfaces]=e}r&&(t[f.typeName]=r,n.__types.set(r,t.constructor))},n.hasInterface=function(n,t){return Array.isArray(n[f.interfaces])&&n[f.interfaces].indexOf(t)>=0},n.getRestParams=function(n,t){for(var e=n.length,r=Array(e>t?e-t:0),o=t;o<e;o++)r[o-t]=n[o];return r},n.compareTo=function(t,e){function r(n){return Array.isArray(n)||ArrayBuffer.isView(n)||n instanceof b||n instanceof Map||n instanceof Set}function o(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(null==t&&null==e)return 0;if(("undefined"==typeof t?"undefined":a(t))!==("undefined"==typeof e?"undefined":a(e)))return-1;if(null!=t&&null!=e&&"object"===("undefined"==typeof t?"undefined":a(t))&&"object"===("undefined"==typeof e?"undefined":a(e))){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return-1;if(n.hasInterface(t,"System.IComparable"))return t.compareTo(e);if(r(t)){var u=n.compareTo(w.count(t),w.count(e));return 0!=u?u:w.fold2(function(t,e,r){return 0!=t?t:n.compareTo(e,r)},0,o(t),o(e))}if(t instanceof Date)return t<e?-1:t>e?1:0;var i=Object.getOwnPropertyNames(t),c=Object.getOwnPropertyNames(e),f=n.compareTo(i.length,c.length);return 0!=f?f:w.fold2(function(r,o,u){return 0!=r?r:n.compareTo(t[o],e[u])},0,i.sort(),c.sort())}return t<e?-1:t>e?1:0},n.createDisposable=function(n){var t={dispose:n};return t[f.interfaces]=["System.IDisposable"],t},n.createObj=function(n){return w.fold(function(n,t){return n[t[0]]=t[1],n},{},n)},n.toJson=function(n){return JSON.stringify(n,function(n,t){if(ArrayBuffer.isView(t))return Array.from(t);if("object"==("undefined"==typeof t?"undefined":a(t))){if(t instanceof b||t instanceof Map||t instanceof Set)throw"JSON serialization of List, Map or Set is not supported";if(t[f.typeName])return Object.assign({__type:t[f.typeName]},t)}return t})},n.ofJson=function(t){return JSON.parse(t,function(t,e){if("object"==("undefined"==typeof e?"undefined":a(e))&&e.__type){var r=n.__types.get(e.__type);if(r)return delete e.__type,Object.assign(new r,e)}return e})},n}();s.__types=new Map,s.toPlainJsObj=function(n){if(null!=n&&n.constructor!=Object){for(var t={},e=Object.getOwnPropertyNames(n),r=0;r<e.length;r++)t[e[r]]=n[e[r]];var o=Object.getPrototypeOf(n);if(null!=o){e=Object.getOwnPropertyNames(o);for(var u=0;u<e.length;u++){var i=Object.getOwnPropertyDescriptor(o,e[u]);i.value?t[e[u]]=i.value:i.get&&(t[e[u]]=i.get.apply(n))}}return t}return n};var d=n.TimeSpan=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.create=function(){var n=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],e=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4];switch(arguments.length){case 1:return this.fromTicks(arguments[0]);case 3:n=0,t=arguments[0],e=arguments[1],r=arguments[2],o=0;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},t.fromTicks=function(n){return n/1e4},t.fromDays=function(n){return t.create(n,0,0,0)},t.fromHours=function(n){return t.create(n,0,0)},t.fromMinutes=function(n){return t.create(0,n,0)},t.fromSeconds=function(n){return t.create(0,0,n)},t.days=function(n){return Math.floor(n/864e5)},t.hours=function(n){return Math.floor(n%864e5/36e5)},t.minutes=function(n){return Math.floor(n%36e5/6e4)},t.seconds=function(n){return Math.floor(n%6e4/1e3)},t.milliseconds=function(n){return Math.floor(n%1e3)},t.ticks=function(n){return 1e4*n},t.totalDays=function(n){return n/864e5},t.totalHours=function(n){return n/36e5},t.totalMinutes=function(n){return n/6e4},t.totalSeconds=function(n){return n/1e3},t.negate=function(n){return n*-1},t.add=function(n,t){return n+t},t.subtract=function(n,t){return n-t},t}(Number);d.compare=s.compareTo,d.compareTo=s.compareTo,d.duration=Math.abs;var p=n.DateKind=void 0;!function(n){n[n.UTC=1]="UTC",n[n.Local=2]="Local"}(p||(n.DateKind=p={}));var y=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.__changeKind=function(n,t){var e=void 0;return n.kind==t?n:(e=new Date(n.getTime()),e.kind=t,e)},t.__getValue=function(n,t){return n[(n.kind==p.UTC?"getUTC":"get")+t]()},t.minValue=function(){return t.parse(-864e13,1)},t.maxValue=function(){return t.parse(864e13,1)},t.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||p.Local,e},t.create=function(n,t,e){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4],u=arguments.length<=5||void 0===arguments[5]?0:arguments[5],i=arguments.length<=6||void 0===arguments[6]?0:arguments[6],a=arguments.length<=7||void 0===arguments[7]?p.Local:arguments[7],c=a===p.UTC?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},t.utcNow=function(){return t.parse(null,1)},t.today=function(){return t.date(t.now())},t.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},t.daysInMonth=function(n,e){return 2==e?t.isLeapYear(n)?29:28:e>=8?e%2==0?31:30:e%2==0?30:31},t.toUniversalTime=function(n){return t.__changeKind(n,1)},t.toLocalTime=function(n){return t.__changeKind(n,2)},t.timeOfDay=function(n){return d.create(t.hour(n),t.minute(n),t.second(n))},t.date=function(n){return t.create(t.year(n),t.month(n),t.day(n),0,0,0,0,n.kind)},t.day=function(n){return t.__getValue(n,"Date")},t.hour=function(n){return t.__getValue(n,"Hours")},t.millisecond=function(n){return t.__getValue(n,"Milliseconds")},t.minute=function(n){return t.__getValue(n,"Minutes")},t.month=function(n){return t.__getValue(n,"Month")+1},t.second=function(n){return t.__getValue(n,"Seconds")},t.year=function(n){return t.__getValue(n,"FullYear")},t.ticks=function(n){return 1e4*(n.getTime()+62135604e6)},t.dayOfWeek=function(n){return t.__getValue(n,"Day")},t.dayOfYear=function(n){for(var e=t.year(n),r=t.month(n),o=t.day(n),u=1;u<r;u++)o+=t.daysInMonth(e,u);return o},t.add=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addDays=function(n,e){return t.parse(n.getTime()+864e5*e,n.kind)},t.addHours=function(n,e){return t.parse(n.getTime()+36e5*e,n.kind)},t.addMinutes=function(n,e){return t.parse(n.getTime()+6e4*e,n.kind)},t.addSeconds=function(n,e){return t.parse(n.getTime()+1e3*e,n.kind)},t.addMilliseconds=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addTicks=function(n,e){return t.parse(n.getTime()+e/1e4,n.kind)},t.addYears=function(n,e){var r=t.month(n),o=t.year(n)+e,u=t.daysInMonth(o,r),i=Math.min(u,t.day(n));return t.create(o,r,i,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.addMonths=function(n,e){var r=t.month(n)+e,o=0,u=0;r>12?(o=r%12,u=Math.floor(r/12),r=o):r<1&&(o=12+r%12,u=Math.floor(r/12)+(12==o?-1:0),r=o);var i=t.year(n)+u,a=t.daysInMonth(i,r),c=Math.min(a,t.day(n));return t.create(i,r,c,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.subtract=function(n,e){return"number"==typeof e?t.parse(n.getTime()-e,n.kind):n.getTime()-e.getTime()},t.toLongDateString=function(n){return n.toDateString()},t.toShortDateString=function(n){return n.toLocaleDateString()},t.toLongTimeString=function(n){return n.toLocaleTimeString()},t.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},t.equals=function(n,t){return n.getTime()==t.getTime()},t}(Date);y.now=y.parse,y.toBinary=y.ticks,y.compareTo=s.compareTo,y.compare=s.compareTo,y.op_Addition=y.add,y.op_Subtraction=y.subtract,n.Date=y;var h=n.Timer=function(){function n(t){o(this,n),this.interval=t>0?t:100,this.autoReset=!0,this._elapsed=new E}return n.prototype.dispose=function(){this.enabled=!1,this._isDisposed=!0},n.prototype.close=function(){this.dispose()},n.prototype.start=function(){this.enabled=!0},n.prototype.stop=function(){this.enabled=!1},c(n,[{key:"elapsed",get:function(){return this._elapsed}},{key:"enabled",get:function(){return this._enabled},set:function(n){var t=this;this._isDisposed||this._enabled==n||((this._enabled=n)?this.autoReset?this._intervalId=setInterval(function(){t.autoReset||(t.enabled=!1),t._elapsed.trigger(new Date)},this.interval):this._timeoutId=setTimeout(function(){t.enabled=!1,t._timeoutId=0,t.autoReset&&(t.enabled=!0),t._elapsed.trigger(new Date)},this.interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}}]),n}();s.setInterfaces(h.prototype,["System.IDisposable"]);var v=function(){function n(){o(this,n)}return n.fsFormat=function(t){function e(n){return!(null===n||"object"!==("undefined"==typeof n?"undefined":a(n))||n instanceof Number||n instanceof String||n instanceof Boolean)}function r(t,r){return t.replace(n.fsFormatRegExp,function(t,o,u,i,a,c){switch(c){case"f":case"F":r=r.toFixed(a||6);break;case"g":case"G":r=r.toPrecision(a);break;case"e":case"E":r=r.toExponential(a);break;case"A":r=(r instanceof Map?"map ":r instanceof Set?"set ":"")+JSON.stringify(r,function(n,t){return t&&t[Symbol.iterator]&&!Array.isArray(t)&&e(t)?Array.from(t):t})}var f=u.indexOf("+")>=0&&parseInt(r)>=0;if(!isNaN(i=parseInt(i))){var l=i>=0&&u.indexOf("0")>=0?"0":" ";r=n.padLeft(r,Math.abs(i)-(f?1:0),l,i<0)}return o+(f?"+"+r:r)})}function o(t){return function(e){var i=r(t,e);return n.fsFormatRegExp.test(i)?o(i):u(i.replace(/%%/g,"%"))}}var u=void 0;return function(e){return u=e,n.fsFormatRegExp.test(t)?o(t):u(t)}},n.format=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return t.replace(n.formatRegExp,function(t,e,o,u){var i=r[e];if("number"==typeof i)switch((u||"").substring(0,1)){case"f":case"F":i=u.length>1?i.toFixed(u.substring(1)):i.toFixed(2);break;case"g":case"G":i=u.length>1?i.toPrecision(u.substring(1)):i.toPrecision();break;case"e":case"E":i=u.length>1?i.toExponential(u.substring(1)):i.toExponential();break;case"p":case"P":i=(u.length>1?(100*i).toFixed(u.substring(1)):(100*i).toFixed(2))+" %"}else if(i instanceof Date){if(1===u.length)switch(u){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=u.replace(/\w+/g,function(n){var t=n;switch(n.substring(0,1)){case"y":t=n.length<4?y.year(i)%100:y.year(i);break;case"h":t=i.getHours()>12?y.hour(i)%12:y.hour(i);break;case"M":t=y.month(i);break;case"d":t=y.day(i);break;case"H":t=y.hour(i);break;case"m":t=y.minute(i);break;case"s":t=y.second(i)}return t!==n&&t<10&&n.length>1&&(t="0"+t),t})}return isNaN(o=parseInt((o||"").substring(1)))||(i=n.padLeft(i,Math.abs(o)," ",o<0)),i})},n.endsWith=function(n,t){var e=n.lastIndexOf(t);return e>=0&&e==n.length-t.length},n.init=function(n,t){if(n<0)throw"String length must be non-negative";for(var e=new Array(n),r=0;r<n;r++)e[r]=t(r);return e.join("")},n.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},n.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},n.join=function(n,t){return t="string"==typeof t?s.getRestParams(arguments,1):t,(Array.isArray(t)?t:Array.from(t)).join(n)},n.newGuid=function(){for(var n="",t=0;t<32;t++){var e=16*Math.random()|0;8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16)}return n},n.padLeft=function(n,t,e,r){e=e||" ",n=String(n),t-=n.length;for(var o=-1;++o<t;)n=r?n+e:e+n;return n},n.padRight=function(t,e,r){return n.padLeft(t,e,r,!0)},n.replace=function(n,t,e){return n.replace(new RegExp(m.escape(t),"g"),e)},n.replicate=function(t,e){return n.init(t,function(){return e})},n.split=function(n,t,e,r){if(e="number"==typeof e?e:null,r="number"==typeof r?r:null,e<0)throw"Count cannot be less than zero";if(0===e)return[];t=Array.isArray(t)?t:s.getRestParams(arguments,1),t=t.map(function(n){return m.escape(n)}),t=t.length>0?t:[" "];for(var o=void 0,u=0,i=[],a=new RegExp(t.join("|"),"g");(null==e||e>1)&&null!==(o=a.exec(n));)(!r||o.index-u>0)&&(e=null!=e?e-1:e,i.push(n.substring(u,o.index))),u=a.lastIndex;return(!r||n.length-u>0)&&i.push(n.substring(u)),i},n.trim=function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];if("both"==t&&0==r.length)return n.trim();if("start"==t||"both"==t){var u=0==r.length?/^\s+/:new RegExp("^["+m.escape(r.join(""))+"]+");n=n.replace(u,"")}if("end"==t||"both"==t){var i=0==r.length?/\s+$/:new RegExp("["+m.escape(r.join(""))+"]+$");n=n.replace(i,"")}return n},n}();v.fsFormatRegExp=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,v.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,v.concat=v.join,n.String=v;var m=function(){function n(){o(this,n)}return n.create=function(n,t){var e="g";return e+=1&t?"i":"",e+=2&t?"m":"",new RegExp(n,e)},n.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},n.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},n.isMatch=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.test(t)},n.match=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.exec(t)},n.matches=function t(e,r){var o=arguments.length<=2||void 0===arguments[2]?0:arguments[2],u=e instanceof RegExp?(u=e,e=r,u.lastIndex=o,u):u=n.create(r,o);if(!u.global)throw"Non-global RegExp";for(var i=void 0,t=[];null!==(i=u.exec(e));)t.push(i);return t},n.options=function n(t){var n=256;return n|=t.ignoreCase?1:0,n|=t.multiline?2:0},n.replace=function(t,e,r,o){function u(){var n=arguments[0];if(0!==o){o--;for(var t=[],e=arguments.length,u=0;u<e-2;u++)t.push(arguments[u]);t.index=arguments[e-2],t.input=arguments[e-1],n=r(t)}return n}var i=arguments.length<=4||void 0===arguments[4]?0:arguments[4];if("string"==typeof t){var a=t;t=n.create(e,o),e=a,o=void 0}if("function"==typeof r)return o=null==o?-1:o,e.substring(0,i)+e.substring(i).replace(t,u);if(null!=o){var c=void 0,f=e.substring(i),l=n.matches(t,f),s=l.length>o?(c=l[o-1],f.substring(0,c.index+c[0].length)):f;return e.substring(0,i)+s.replace(t,r)+e.substring(i+s.length)}return e.replace(t,r)},n.split=function(t,e,r){var o=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if("string"==typeof t){var u=t;t=n.create(e,r),e=u,r=void 0}return e=e.substring(o),e.split(t,r)},n}();n.RegExp=m;var g=function(){function n(){o(this,n)}return n.addRangeInPlace=function(n,t){w.iter(function(n){return t.push(n)},n)},n.blit=function(n,t,e,r,o){for(;o--;)e[r++]=n[t++]},n.partition=function(n,t){for(var e=[],r=[],o=0,i=0,a=0;a<t.length;a++)n(t[a])?e[o++]=t[a]:r[i++]=t[a];return u(e,r)},n.permute=function(n,t){for(var e=t.map(function(){return null}),r=new Array(t.length),o=0;o<t.length;o++){var u=n(o);if(u<0||u>=t.length)throw"Not a valid permutation";e[u]=t[o],r[u]=1}for(var i=0;i<t.length;i++)if(1!=r[i])throw"Not a valid permutation";return e},n.removeInPlace=function(n,t){var e=t.indexOf(n);return e>-1&&(t.splice(e,1),!0)},n.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;i<=o;u++,i++)n[u]=r[i]},n.sortInPlaceBy=function(n,t){var e=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t.sort(function(t,r){return t=n(t),r=n(r),(t<r?-1:t==r?0:1)*e})},n.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 u(t,e)},n.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 i(t,e,r)},n}();n.Array=g;var b=n.List=function(){function n(t,e){o(this,n),this.head=t,this.tail=e}return n.ofArray=function(t,e){for(var r=e||new n,o=t.length-1;o>=0;o--)r=new n(t[o],r);return r},n.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var t=n;return n=n.tail,{done:null==t.tail,value:t.head}}}},n.prototype.append=function(t){return n.append(this,t)},n.append=function(t,e){return w.fold(function(t,e){return new n(e,t)},e,n.rev(t))},n.prototype.choose=function(t,e){return n.choose(t,this)},n.choose=function(t,e){var r=w.fold(function(e,r){var o=t(r);return null!=o?new n(o,e):e},new n,e);return n.rev(r)},n.prototype.collect=function(t){return n.collect(t,this)},n.collect=function(t,e){return w.fold(function(n,e){return n.append(t(e))},new n,e)},n.concat=function(t){return n.collect(function(n){return n},t)},n.prototype.filter=function(t){return n.filter(t,this)},n.filter=function(t,e){return n.rev(w.fold(function(e,r){return t(r)?new n(r,e):e},new n,e))},n.prototype.where=function(t){return n.filter(t,this)},n.where=function(t,e){return n.filter(t,e)},n.init=function(t,e){if(t<0)throw"List length must be non-negative";for(var r=new n,o=1;o<=t;o++)r=new n(e(t-o),r);return r},n.prototype.map=function(t){return n.map(t,this)},n.map=function(t,e){return n.rev(w.fold(function(e,r){return new n(t(r),e)},new n,e))},n.prototype.mapi=function(t){return n.mapi(t,this)},n.mapi=function(t,e){return n.rev(w.fold(function(e,r,o){return new n(t(o,r),e)},new n,e))},n.prototype.partition=function(t){return n.partition(t,this)},n.partition=function(t,e){return w.fold(function(e,r){var o=e[0],i=e[1];return t(r)?u(new n(r,o),i):u(o,new n(r,i))},u(new n,new n),n.rev(e))},n.replicate=function(t,e){return n.init(t,function(){return e})},n.prototype.rev=function(){return n.rev(this)},n.rev=function(t){return w.fold(function(t,e){return new n(e,t)},new n,t)},n.singleton=function(t){return new n(t,new n)},n.prototype.slice=function(t,e){return n.slice(t,e,this)},n.slice=function(t,e,r){var o=null==t,u=null==e;return n.rev(w.fold(function(r,i,a){return(o||t<=a)&&(u||a<=e)?new n(i,r):r},new n,r))},n.unzip=function(t){return w.foldBack(function(t,e){return u(new n(t[0],e[0]),new n(t[1],e[1]))},t,u(new n,new n))},n.unzip3=function(t){return w.foldBack(function(t,e){return i(new n(t[0],e[0]),new n(t[1],e[1]),new n(t[2],e[2]))},t,i(new n,new n,new n))},c(n,[{key:"length",get:function(){return w.fold(function(n,t){return n+1},0,this)}}]),n}(),w=n.Seq=function(){function n(){o(this,n)}return n.__failIfNone=function(n){if(null==n)throw"Seq did not contain any matching element";return n},n.toList=function(t){return n.foldBack(function(n,t){return new b(n,t)},t,new b)},n.ofList=function(t){return n.delay(function(){return n.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},t)})},n.ofArray=function(t){return n.delay(function(){return n.unfold(function(n){return n<t.length?[t[n],n+1]:null},0)})},n.append=function(t,e){return n.delay(function(){var r=!1,o=t[Symbol.iterator](),i=u(o,null);return n.unfold(function(){var n=void 0;if(!r){if(n=i[0].next(),!n.done)return[n.value,i];r=!0,i=[null,e[Symbol.iterator]()]}return n=i[1].next(),n.done?null:[n.value,i]},i)})},n.average=function(t){var e=1,r=n.reduce(function(n,t){return e++,n+t},t);return r/e},n.averageBy=function(t,e){var r=1,o=n.reduce(function(n,e){return r++,(2===r?t(n):n)+t(e)},e);return o/r},n.countBy=function(t,e){return n.map(function(t){return u(t[0],n.count(t[1]))},n.groupBy(t,e))},n.concat=function(t){return n.delay(function(){var e=t[Symbol.iterator](),r=null;return n.unfold(function(n){for(var t=!1;!t;)if(null==n){var o=e.next();o.done?t=!0:n=o.value[Symbol.iterator]()}else{var u=n.next();u.done?n=null:(r=u.value,t=!0)}return null!=n&&null!=r?[r,n]:null},null)})},n.collect=function(t,e){return n.concat(n.map(t,e))},n.choose=function(t,e){var r=function n(e){var r=e.next();if(!r.done){var o=t(r.value);return null!=o?u(o,e):n(e)}};return n.delay(function(){return n.unfold(function(n){return r(n)},e[Symbol.iterator]())})},n.compareWith=function(t,e,r){var o=n.tryFind(function(n){return 0!=n},n.map2(function(n,e){return t(n,e)},e,r));return null!=o?o:n.count(e)-n.count(r)},n.delay=function(n){return t({},Symbol.iterator,function(){return n()[Symbol.iterator]()})},n.distinctBy=function(t,e){return n.choose(function(n){return n[0]},n.scan(function(n,e){var r=n[1],o=t(e);return r.has(o)?u(null,r):u(e,r.add(o))},u(null,new Set),e))},n.distinct=function(t){return n.distinctBy(function(n){return n},t)},n.empty=function(){return n.unfold(function(){})},n.enumerateWhile=function(t,e){return n.concat(n.unfold(function(){return t()?[e,!0]:null}))},n.enumerateThenFinally=function(t,e){return n.delay(function(){var r=void 0;try{r=t[Symbol.iterator]()}finally{e()}return n.unfold(function(n){try{var t=n.next();return t.done?null:[t.value,n]}finally{e()}},r)})},n.enumerateUsing=function(t,e){var r=!1,o=function(){r||(r=!0,t.dispose())};try{return n.enumerateThenFinally(e(t),o)}finally{o()}},n.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},n.exists=function(n,t){function e(t){var r=t.next();return!r.done&&(n(r.value)||e(t))}return e(t[Symbol.iterator]())},n.exists2=function(n,t,e){function r(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]())},n.filter=function(t,e){function r(n){var e=n.next();if(!e.done)return t(e.value)?[e.value,n]:r(n)}return n.delay(function(){return n.unfold(r,e[Symbol.iterator]())})},n.where=function(t,e){return n.filter(t,e)},n.fold=function(n,t,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(n,t);for(var r=null,o=0,u=e[Symbol.iterator]();r=u.next(),!r.done;o++)t=n(t,r.value,o);return t},n.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},n.fold2=function(n,t,e,r){for(var o=e[Symbol.iterator](),u=r[Symbol.iterator](),i=void 0,a=void 0,c=0;i=o.next(),a=u.next(),!i.done&&!a.done;c++)t=n(t,i.value,a.value,c);return t},n.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},n.forall=function(t,e){return n.fold(function(n,e){return n&&t(e)},!0,e)},n.forall2=function(t,e,r){return n.fold2(function(n,e,r){return n&&t(e,r)},!0,e,r)},n.groupBy=function(t,e){return n.fold(function(n,e){var r=t(e),o=n.get(r);return null!=o?n.set(r,new b(e,o)):n.set(r,b.singleton(e))},new Map,e)},n.tryHead=function(n){var t=n[Symbol.iterator](),e=t.next();return e.done?null:e.value},n.head=function(t){return n.__failIfNone(n.tryHead(t))},n.init=function(t,e){return n.delay(function(){return n.unfold(function(n){return n<t?[e(n),n+1]:null},0)})},n.initInfinite=function(t){return n.delay(function(){return n.unfold(function(n){return[t(n),n+1]},0)})},n.tryItem=function(n,t){if(n<0)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}},n.item=function(t,e){return n.__failIfNone(n.tryItem(t,e))},n.iter=function(t,e){n.fold(function(n,e){return t(e)},null,e)},n.iter2=function(t,e,r){n.fold2(function(n,e,r){return t(e,r)},null,e,r)},n.iteri=function(t,e){n.fold(function(n,e,r){return t(r,e)},null,e)},n.iteri2=function(t,e,r){n.fold2(function(n,e,r,o){return t(o,e,r)},null,e,r)},n.isEmpty=function(n){var t=n[Symbol.iterator]();return t.next().done},n.tryLast=function(t){try{return n.reduce(function(n,t){return t},t)}catch(n){return null}},n.last=function(t){return n.__failIfNone(n.tryLast(t))},n.count=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)?t.length:n.fold(function(n,t){return n+1},0,t)},n.map=function(t,e){return n.delay(function(){return n.unfold(function(n){var e=n.next();return e.done?null:[t(e.value),n]},e[Symbol.iterator]())})},n.mapi=function(t,e){return n.delay(function(){var r=0;return n.unfold(function(n){var e=n.next();return e.done?null:[t(r++,e.value),n]},e[Symbol.iterator]())})},n.map2=function(t,e,r){return n.delay(function(){var o=e[Symbol.iterator](),u=r[Symbol.iterator]();return n.unfold(function(){var n=o.next(),e=u.next();return n.done||e.done?null:[t(n.value,e.value),null]})})},n.mapi2=function(t,e,r){return n.delay(function(){var o=0,u=e[Symbol.iterator](),i=r[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next();return n.done||e.done?null:[t(o++,n.value,e.value),null]})})},n.map3=function(t,e,r,o){return n.delay(function(){var u=e[Symbol.iterator](),i=r[Symbol.iterator](),a=o[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next(),r=a.next();return n.done||e.done||r.done?null:[t(n.value,e.value,r.value),null]})})},n.max=function(t){return n.reduce(function(n,t){return Math.max(n,t)},t)},n.maxBy=function(t,e){return n.reduce(function(n,e){return t(n)>t(e)?n:e},e)},n.min=function(t){return n.reduce(function(n,t){return Math.min(n,t)},t)},n.minBy=function(t,e){return n.reduce(function(n,e){return t(n)<t(e)?n:e},e)},n.pairwise=function(t){return n.skip(1,n.scan(function(n,t){return u(n[1],t)},u(0,0),t))},n.permute=function(t,e){return n.ofArray(g.permute(t,Array.from(e)))},n.rangeStep=function(t,e,r){if(0===e)throw"Step cannot be 0";return n.unfold(function(n){return e>0&&n<=r||e<0&&n>=r?[n,n+e]:null},t)},n.rangeChar=function(t,e){return n.unfold(function(n){return n<=e?[n,String.fromCharCode(n.charCodeAt(0)+1)]:null},t)},n.range=function(t,e){return n.rangeStep(t,1,e)},n.readonly=function(t){return n.map(function(n){return n},t)},n.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},n.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},n.replicate=function(t,e){return n.init(t,function(){return e})},n.rev=function(t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):Array.from(t);return n.ofArray(e.reverse())},n.scan=function(t,e,r){return n.delay(function(){var o=r[Symbol.iterator]();return n.unfold(function(n){if(null==n)return[e,e];var r=o.next();return r.done?void 0:(n=t(n,r.value),[n,n])},null)})},n.scanBack=function(t,e,r){return n.rev(n.scan(function(n,e){return t(e,n)},r,n.rev(e)))},n.singleton=function(t){return n.unfold(function(n){return null!=n?[n,null]:null},t)},n.skip=function(n,e){return t({},Symbol.iterator,function(){for(var t=e[Symbol.iterator](),r=1;r<=n;r++)if(t.next().done)throw"Seq has not enough elements";return t})},n.skipWhile=function(t,e){return n.delay(function(){var r=!1;return n.filter(function(n){return r||(r=!t(n))},e)})},n.sortWith=function(t,e){var r=Array.from(e);return n.ofArray(r.sort(t))},n.defaultAdder=function(n,t){return n+t},n.sum=function(t,e){return e=e||n.defaultAdder,n.reduce(function(n,t){return e(n,t)},t)},n.sumBy=function(t,e,r){var o=!0;return r=r||n.defaultAdder,n.reduce(function(n,e){return n=o?t(n):n,o=!1,r(n,t(e))},e)},n.tail=function(n){var e=n[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";return t({},Symbol.iterator,function(){return e})},n.take=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return n.delay(function(){var o=e[Symbol.iterator]();return n.unfold(function(n){if(n<t){var e=o.next();if(!e.done)return[e.value,n+1];if(!r)throw"Seq has not enough elements"}},0)})},n.truncate=function(t,e){return n.take(t,e,!0)},n.takeWhile=function(t,e){return n.delay(function(){var r=e[Symbol.iterator]();return n.unfold(function(n){var e=r.next();if(!e.done&&t(e.value))return[e.value,null]},0)})},n.tryFind=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return o.value}},n.find=function(t,e){return n.__failIfNone(n.tryFind(t,e))},n.tryFindBack=function(n,t){for(var e=null,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=u.value)}},n.findBack=function(t,e){return n.__failIfNone(n.tryFindBack(t,e))},n.tryFindIndex=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return e}},n.findIndex=function(t,e){return n.__failIfNone(n.tryFindIndex(t,e))},n.tryFindIndexBack=function(n,t){for(var e=0,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=r)}},n.findIndexBack=function(t,e){return n.__failIfNone(n.tryFindIndexBack(t,e))},n.tryPick=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)break;var u=n(o.value,e);if(null!=u)return u}},n.pick=function(t,e){return n.__failIfNone(n.tryPick(t,e))},n.unfold=function(n,e){return t({},Symbol.iterator,function(){return{next:function(){var t=n(e);return null!=t?(e=t[1],{done:!1,value:t[0]}):{done:!0}}}})},n.zip=function(t,e){return n.map2(function(n,t){return[n,t]},t,e)},n.zip3=function(t,e,r){return n.map3(function(n,t,e){return[n,t,e]},t,e,r)},n}(),S=function(){function n(){o(this,n)}return n.union=function(n,t){return w.fold(function(n,t){return n.add(t),n},new Set(n),t)},n.unionMany=function(t){return w.fold(function(t,e){return n.union(t,e)},new Set,t)},n.difference=function(n,t){return w.fold(function(n,t){return n.delete(t),n},new Set(n),t)},n.intersect=function(n,t){return w.fold(function(n,e){return t.has(e)||n.delete(e),n},new Set(n),n)},n.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 w.iter(function(n){for(var r=1;r<t.length;r++)if(!t[r].has(n)){e.delete(n);break}},t[0]),e},n.isProperSubsetOf=function(n,t){return w.forall(function(n){return t.has(n)},n)&&w.exists(function(t){ | ||
return!n.has(t)},t)},n.isSubsetOf=function(n,t){return w.forall(function(n){return t.has(n)},n)},n.isProperSupersetOf=function(t,e){return n.isProperSubset(e,t)},n.isSupersetOf=function(t,e){return n.isSubset(e,t)},n.copyTo=function(n,t,e,r){if(!Array.isArray(t)&&!ArrayBuffer.isView(t))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}},n.partition=function(n,t){return w.fold(function(t,e){var r=t[0],o=t[1];return n(e)?u(r.add(e),o):u(r,o.add(e))},u(new Set,new Set),t)},n.remove=function(t,e){return n.removeInPlace(t,new Set(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n}();S.op_Addition=S.union,S.op_Subtraction=S.difference,S.isProperSubset=S.isProperSubsetOf,S.isSubset=S.isSubsetOf,S.isProperSuperset=S.isProperSupersetOf,S.isSuperset=S.isSupersetOf,n.Set=S;var _=function(){function n(){o(this,n)}return n.containsValue=function(n,t){return w.fold(function(e,r){return e||t.get(r)===n},!1,t.keys())},n.exists=function(n,t){return w.exists(function(t){return n(t[0],t[1])},t)},n.filter=function(n,t){return w.fold(function(t,e){return n(e[0],e[1])?t.set(e[0],e[1]):t},new Map,t)},n.fold=function(n,t,e){return w.fold(function(t,e){return n(t,e[0],e[1])},t,e)},n.foldBack=function(n,t,e){return w.foldBack(function(t,e){return n(t[0],t[1],e)},t,e)},n.forall=function(n,t){return w.forall(function(t){return n(t[0],t[1])},t)},n.iter=function(n,t){return w.iter(function(t){return n(t[0],t[1])},t)},n.map=function(n,t){return w.fold(function(t,e){return t.set(e[0],n(e[0],e[1]))},new Map,t)},n.partition=function(n,t){return w.fold(function(t,e){var r=t[0],o=t[1],i=e[0],a=e[1];return n(i,a)?u(r.set(i,a),o):u(r,o.set(i,a))},u(new Map,new Map),t)},n.findKey=function(n,t){return w.pick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.tryFindKey=function(n,t){return w.tryPick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.pick=function(n,t){return w.pick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n.remove=function(t,e){return n.removeInPlace(t,new Map(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n.tryPick=function(n,t){return w.tryPick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n}();n.Map=_;var x=n.Nothing=void 0,A=n.Async=function(){function n(){o(this,n)}return n.__protectedAsync=function(n){return function(t){if(t.cancelToken.isCancelled)t.onCancel("cancelled");else try{return n(t)}catch(n){t.onError(n)}}},n.bind=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){return e(t)(n)},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.combine=function(t,e){return n.bind(t,function(){return e})},n.delay=function(t){return n.__protectedAsync(function(n){return t()(n)})},n.for=function(t,e){var r=t[Symbol.iterator](),o=r.next();return n.while(function(){return!o.done},n.delay(function(){var n=e(o.value);return o=r.next(),n}))},n.return=function(t){return n.__protectedAsync(function(n){return n.onSuccess(t)})},n.returnFrom=function(n){return n},n.tryFinally=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){e(),n.onSuccess(t)},onError:function(t){e(),n.onError(t)},onCancel:function(t){e(),n.onCancel(t)},cancelToken:n.cancelToken})})},n.tryWith=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,onError:function(t){return e(t)(n)}})})},n.using=function(t,e){return n.tryFinally(e(t),function(){return t.dispose()})},n.while=function(t,e){return t()?n.bind(e,function(){return n.while(t,e)}):n.return(x)},n.zero=function(){return n.__protectedAsync(function(n){return n.onSuccess(x)})},n.awaitPromise=function(t){return n.fromContinuations(function(n){return t.then(n[0]).catch(function(t){return("cancelled"==t?n[2]:n[1])(t)})})},n.catch=function(t){return n.__protectedAsync(function(n){t({onSuccess:function(t){return n.onSuccess(l.Choice1Of2(t))},onError:function(t){return n.onSuccess(l.Choice2Of2(t))},onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.fromContinuations=function(t){return n.__protectedAsync(function(n){return t([n.onSuccess,n.onError,n.onCancel])})},n.ignore=function(t){return n.bind(t,function(t){return n.return(x)})},n.parallel=function(t){return n.awaitPromise(Promise.all(w.map(function(t){return n.startAsPromise(t)},t)))},n.sleep=function(t){return n.__protectedAsync(function(n){setTimeout(function(){return n.cancelToken.isCancelled?n.onCancel("cancelled"):n.onSuccess(x)},t)})},n.start=function(t,e){return n.startWithContinuations(t,e)},n.emptyContinuation=function(n){},n.startWithContinuations=function(t,e,r,o,u){"function"!=typeof e&&(u=e,e=null),t({onSuccess:e?e:n.emptyContinuation,onError:r?r:n.emptyContinuation,onCancel:o?o:n.emptyContinuation,cancelToken:u?u:n.defaultCancellationToken})},n.startAsPromise=function(t,e){return new Promise(function(r,o){return n.startWithContinuations(t,r,o,o,e?e:n.defaultCancellationToken)})},c(n,[{key:"cancellationToken",get:function(){return n.__protectedAsync(function(n){return n.onSuccess(n.cancelToken)})}}]),n}();A.defaultCancellationToken={isCancelled:!1},A.startImmediate=A.start;var k=function n(t){o(this,n),this.value=t},C=function(){function n(){o(this,n)}return n.prototype.add=function(n){var t=new k(n);this.firstAndLast?(this.firstAndLast[1].next=t,this.firstAndLast=[this.firstAndLast[0],t]):this.firstAndLast=[t,t]},n.prototype.tryGet=function(){if(this.firstAndLast){var n=this.firstAndLast[0].value;return this.firstAndLast[0].next?this.firstAndLast=[this.firstAndLast[0].next,this.firstAndLast[1]]:delete this.firstAndLast,n}},n}(),T=(n.MailboxProcessor=function(){function n(t,e){o(this,n),this.body=t,this.cancellationToken=e||A.defaultCancellationToken,this.messages=new C}return n.start=function(t,e){var r=new n(t,e);return r.start(),r},n.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},n.prototype.start=function(){A.startImmediate(this.body(this),this.cancellationToken)},n.prototype.receive=function(){var n=this;return A.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},n.prototype.post=function(n){this.messages.add(n),this.__processEvents()},n.prototype.postAndAsyncReply=function(n){function t(){e&&r&&r(e)}var e=void 0,r=void 0,o={reply:function(n){e=n,t()}};return this.messages.add(n(o)),this.__processEvents(),A.fromContinuations(function(n){r=n[0],t()})},n}(),function n(t,e,r){o(this,n),this.onNext=t,this.onError=e||function(n){},this.onCompleted=r||function(){}});s.setInterfaces(T.prototype,["System.IObserver"]);var I=function n(t){o(this,n),this.subscribe=t};s.setInterfaces(I.prototype,["System.IObservable"]);var O=function(){function n(){o(this,n)}return n.__protect=function(n,t,e){try{return t(n())}catch(n){e(n)}},n.add=function(n,t){t.subscribe(new T(n))},n.choose=function(t,e){return new I(function(r){return e.subscribe(new T(function(e){return n.__protect(function(){return t(e)},function(n){null!=n&&r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){return new I(function(r){return e.subscribe(new T(function(e){n.__protect(function(){return t(e)},r.onNext,r.onError)},r.onError,r.onCompleted))})},n.merge=function(n,t){return new I(function(e){var r=!1,o=!1,u=!1,i=n.subscribe(new T(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(o=!0,u&&(r=!0,e.onCompleted()))})),a=t.subscribe(new T(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(u=!0,o&&(r=!0,e.onCompleted()))}));return s.createDisposable(function(){i.dispose(),a.dispose()})})},n.pairwise=function(n){return new I(function(t){var e=null;return n.subscribe(new T(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){return new I(function(o){return r.subscribe(new T(function(r){n.__protect(function(){return t(e,r)},function(n){e=n,o.onNext(n)},o.onError)},o.onError,o.onCompleted))})},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},n.subscribe=function(n,t){return t.subscribe(new T(n))},n}();n.Observable=O;var E=n.Event=function(){function n(t,e){o(this,n),this._subscriber=t,this.delegates=e||new Array}return n.prototype.add=function(n){this._addHandler(n)},n.prototype.trigger=function(n){w.iter(function(t){return t(n)},this.delegates)},n.prototype._addHandler=function(n){this.delegates.push(n)},n.prototype._removeHandler=function(n){var t=this.delegates.findIndex(function(t){return""+t==""+n});t>-1&&this.delegates.splice(t,1)},n.prototype.addHandler=function(n){this._addHandler(function(t){return n(void 0,t)})},n.prototype.removeHandler=function(n){this._removeHandler(function(t){return n(void 0,t)})},n.prototype._subscribeFromObserver=function(n){var t=this;if(this._subscriber)return this._subscriber(n);var e=n.onNext;return this._addHandler(e),s.createDisposable(function(){return t._removeHandler(e)})},n.prototype._subscribeFromCallback=function(n){var t=this;return this._addHandler(n),s.createDisposable(function(){return t._removeHandler(n)})},n.prototype.subscribe=function(n){return"function"==typeof n?this._subscribeFromCallback(n):this._subscribeFromObserver(n)},n.add=function(n,t){t.subscribe(new T(n))},n.choose=function(t,e){var r=e;return new n(function(n){return r.subscribe(new T(function(e){return O.__protect(function(){return t(e)},function(t){null!=t&&n.onNext(t)},n.onError)},n.onError,n.onCompleted))},r.delegates)},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){var r=e;return new n(function(n){return r.subscribe(new T(function(e){return O.__protect(function(){return t(e)},n.onNext,n.onError)},n.onError,n.onCompleted))},r.delegates)},n.merge=function(t,e){var r=t,o=e;return new n(function(n){var t=!1,e=!1,u=!1,i=r.subscribe(new T(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(e=!0,u&&(t=!0,n.onCompleted()))})),a=o.subscribe(new T(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(u=!0,e&&(t=!0,n.onCompleted()))}));return s.createDisposable(function(){i.dispose(),a.dispose()})},r.delegates.concat(o.delegates))},n.pairwise=function(t){var e=t;return new n(function(n){var t=null;return e.subscribe(new T(function(e){null!=t&&n.onNext([t,e]),t=e},n.onError,n.onCompleted))},e.delegates)},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){var o=r;return new n(function(n){return o.subscribe(new T(function(r){O.__protect(function(){return t(e,r)},function(t){e=t,n.onNext(t)},n.onError)},n.onError,n.onCompleted))},o.delegates)},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},c(n,[{key:"publish",get:function(){return this}}]),n}();n.Lazy=function(){function n(t){o(this,n),this.factory=t,this.isValueCreated=!1}return n.createFromValue=function(t){return new n(function(){return t})},c(n,[{key:"value",get:function(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}}]),n}()}); |
{ | ||
"name": "fable-core", | ||
"version": "0.2.0-alpha", | ||
"version": "0.2.0", | ||
"description": "Fable core lib & bindings for native JS objects, browser and node APIs", | ||
"main": "fable-core.js", | ||
"typings": "fable-core.d.ts", | ||
"scripts": { | ||
@@ -10,3 +11,3 @@ "tsc": "tsc", | ||
"uglifyjs": "uglifyjs" | ||
}, | ||
}, | ||
"repository": { | ||
@@ -27,2 +28,4 @@ "type": "git", | ||
"babel-cli": "^6.10.1", | ||
"babel-plugin-transform-es2015-classes": "^6.9.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.10.3", | ||
"babel-plugin-transform-es2015-modules-umd": "^6.8.0", | ||
@@ -29,0 +32,0 @@ "babel-preset-es2015": "^6.9.0", |
@@ -1,2 +0,2 @@ | ||
# fable-import | ||
# fable-core | ||
@@ -55,1 +55,25 @@ Fable core lib & bindings for native JS objects, browser and node APIs | ||
``` | ||
## Development | ||
The source is written in TypeScript. The use of a TypeScript-aware editor | ||
(like [VSCode](https://code.visualstudio.com) or [ALM](http://alm.tools/)) | ||
is highly recommended. | ||
Output files are generated as shown below: | ||
- `fable-core.ts` (source) | ||
- `es2015.js` (Created from `fable-core.ts |> tsc --target ES2015`) | ||
- `fable-core.js` (Created from `es2015.js |> babel --plugins ...umd`) | ||
- `fable-core.min.js` (Created from `fable-core.js |> uglifyjs`) | ||
- `commonjs.js` (Created from `es2015.js |> babel --plugins ...commonjs`) | ||
### To build | ||
Simply run | ||
``` | ||
build fablecore | ||
``` | ||
from Fable root project folder. |
@@ -5,7 +5,8 @@ { | ||
"module": "commonjs", | ||
"noImplicitAny": true | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true | ||
}, | ||
"files": [ | ||
"fable-core.tsc.ts" | ||
"fable-core.ts" | ||
] | ||
} |
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4396006
78
8
10395